Skip to content

fix(ftl): use child.text instead of child.texture for text updates - #63

Merged
wouterlucas merged 1 commit into
mainfrom
fix-ftl-texture-to-text
Nov 15, 2026
Merged

wouterlucas merged 1 commit into
mainfrom
fix-ftl-texture-to-text

Conversation

@wouterlucas

Copy link
Copy Markdown
Contributor

Summary

Verifies the FTL worker adjustment (child.texture = createText(...) → child.text = createText(...) in updateMany and selectRandomNode) and aligns all FTL frameworks on the same API.

Verification

  • Confirmed against FTL source (src/element/element.js): createText() returns a text config handled by the text setter (font tracking, canvas texture baking, MSDF/BMF cache invalidation). Assigning it to texture bypasses that path, so .text is the correct API.
  • frameworks/ftl/index.js was the only FTL benchmark still using .texture (2 sites); ftl-canvas, ftl-canvas-bitmap, ftl-webgl-bitmap already used .text. No .texture = assignments remain in any FTL benchmark.
  • vite build passes for all 4 FTL frameworks.
  • Playwright smoke tests (headless Chromium, local dist/): all 4 FTL frameworks report Startup! and run the full throughput benchmark to Done! with zero console/page errors (exercises the changed update/select paths). Non-FTL frameworks (blits, lightning2, lightning2-core, renderer, renderer-canvasfonts) all report Startup! cleanly.

The FTL element API exposes text configs via the text property;
assigning a createText() result to texture bypasses the text setter
(font tracking, canvas texture baking, MSDF/BMF cache invalidation).
This aligns frameworks/ftl with ftl-canvas, ftl-canvas-bitmap and
ftl-webgl-bitmap, which already use child.text.
@wouterlucas
wouterlucas merged commit 01a70c7 into main Nov 15, 2026
3 checks 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