Repository navigation
New API: read a layer's background
TextmodeLayer.background returns the background last set while the layer was drawing, or null after clear() or before one has been set.
const veil = t.layers.add();
veil.draw(() => {
t.background(14, 38, 52);
});
veil.background; // TextmodeColor | nullThe accessor reports only the layer's own explicit background. It does not include inherited renderer state or the composited canvas background. It pairs with the background: 'layer' option added in textmode.export.js 1.11.0.
Rebuilt example gallery
- All 386 example sketches rebuilt around a shared label panel, responsive font sizes, and descriptive naming.
- New
TextmodeLayer.backgroundexample. - Example statuses reset to
unratedfor the next review pass. - Every runnable example is available as an editor in the API reference on code.textmode.art.
Internal organization
No public API changed in this section.
src/textmode/fontsis nowsrc/textmode/charset. Thefontsnamespace,TextmodeFont,TextmodeTileset, and all type exports keep their names.- Built-in extensions are grouped under
extensions/inputandextensions/text. loadFont,loadTileset,fontSize,useTileColors, and thefontaccessor moved intoextensions/text/charset.ts. They still attach toTextmodifier.prototype.
Examples, assets, and tooling
- Add BESCII Mono (CC0) and the Rook tileset to
examples/assets, with attribution inTHIRD_PARTY_LICENSES.md. - Update
@textmode/docsto 0.4.3 and@textmode/lintto 0.1.3. - Remove the redundant blend-mode shader constants check.
Compatibility
This release adds the TextmodeLayer.background accessor. No existing export or signature changes, so current sketches continue to run as they are.
npm install textmode.js@0.19.0Full changelog: v0.18.2...v0.19.0