Skip to content

feat: ink render mode, contour effects, and the loaders gallery - #33

Merged
apresmoi merged 78 commits into
mainfrom
feat/glyph-render-modes
Aug 14, 2026
Merged

feat: ink render mode, contour effects, and the loaders gallery#33
apresmoi merged 78 commits into
mainfrom
feat/glyph-render-modes

Conversation

@apresmoi

Copy link
Copy Markdown
Owner

Adds the ink render mode, three new character encodings, hidden-line removal, and a font-weight shading axis to the rasterizer; extends field-synth with iso-contour output, categorical argmax combining, and per-voice placement; and adds /examples/loaders, a gallery of ASCII loaders built from stock effects.

Rasterizer

  • mode: "ink" — silhouette + crease outlines traced with oriented glyphs, with hidden-line removal that exempts each edge's own vertex neighbourhood so a mesh never self-occludes its outline.
  • charMode: "braille" | "halfblock" | "quadrant" — sub-cell dot coverage, and two-colour-per-cell encodings that trade glyph shape for colour resolution.
  • hiddenLines: "hide" for wireframe and ink; wireframeJunctions for box-drawing joints.
  • solidWeightRamp — CSS font-weight as a second density axis, calibrated against measured ink coverage.

Effects

  • subcellRes: "ink" contours the field at inkLevels cuts through the amplitude axis, oriented to the local gradient. Lines only — plateaus stay empty.
  • combine: "argmax" is categorical rather than value-folding: it reports which voice won, so regions get one flat level. This is what makes hard-edged tilings expressible.
  • Per-voice angleN and originUN/originVN — steerable plane waves and independent field centres.
  • New presets: Cube tiles, Ink cells.

Website

  • /examples/loaders — 27 loaders (indeterminate and determinate) shown at nine box sizes each, with per-example code export in HTML/JS/React/Vue.
  • /synth split into a reusable kit so both pages share the voice cards and dock.

Fixes found while documenting

Four bugs surfaced from auditing the docs against the code:

  • Vue <GlyphScene> was missing smoothShading/creaseAngle, and Vue had no useGlyphMesh composable — both mirroring violations.
  • directional-direction was in the custom element's observed attributes but never read, so HTML could not set light direction at all.
  • Per-voice origin was applied in unscaled units, so its effect changed with scale.

Docs

Four audit passes against the real API. The guides described the predecessor's architecture — a pre-baked frame strip animated with CSS steps() — across eight files; that is now the actual render model. Two code samples imported a package name that does not exist and called a fabricated signature. Roughly forty further corrections, plus previously undocumented surfaces: scene options, every stock effect's parameters, custom-element attributes, compile options, and the static effect export.

Breaking

  • UseGlyphAnimationResultVue renamed to UseGlyphAnimationResult to match React. No shim, per the repo's no-BC rule.

Verification

pnpm test (7 packages) and pnpm build green. Browser-verified on /synth, /gallery, /wordart and /examples/loaders.

apresmoi added 30 commits July 22, 2026 02:31
@apresmoi
apresmoi merged commit caf4768 into main Aug 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant