feat: ink render mode, contour effects, and the loaders gallery - #33
Merged
Conversation
…alibrated ramps, font kerning
…ordart, calibrated ramps, docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
inkrender mode, three new character encodings, hidden-line removal, and a font-weight shading axis to the rasterizer; extends field-synth with iso-contour output, categoricalargmaxcombining, 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;wireframeJunctionsfor box-drawing joints.solidWeightRamp— CSSfont-weightas a second density axis, calibrated against measured ink coverage.Effects
subcellRes: "ink"contours the field atinkLevelscuts 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.angleNandoriginUN/originVN— steerable plane waves and independent field centres.Website
/examples/loaders— 27 loaders (indeterminate and determinate) shown at nine box sizes each, with per-example code export in HTML/JS/React/Vue./synthsplit 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:
<GlyphScene>was missingsmoothShading/creaseAngle, and Vue had nouseGlyphMeshcomposable — both mirroring violations.directional-directionwas in the custom element's observed attributes but never read, so HTML could not set light direction at all.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
UseGlyphAnimationResultVuerenamed toUseGlyphAnimationResultto match React. No shim, per the repo's no-BC rule.Verification
pnpm test(7 packages) andpnpm buildgreen. Browser-verified on /synth, /gallery, /wordart and /examples/loaders.