From 4dd82a2166e3754376b0ba52a3d552303cdaf35a Mon Sep 17 00:00:00 2001 From: wouterlucas Date: Sun, 15 Nov 2026 20:39:41 +0100 Subject: [PATCH] fix(ftl): use child.text instead of child.texture for text updates 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. --- frameworks/ftl/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/ftl/index.js b/frameworks/ftl/index.js index 64985d8..b5cde10 100644 --- a/frameworks/ftl/index.js +++ b/frameworks/ftl/index.js @@ -194,7 +194,7 @@ const updateMany = (count, skip = 0) => new Promise((resolve) => { if (!element || !element.children?.[0]) continue; element.color = pick(colours); const child = element.children[0]; - child.texture = createText({ + child.text = createText({ fontFamily: 'Ubuntu', alpha: 0.8, type: 1, @@ -259,7 +259,7 @@ const selectRandomNode = () => new Promise((resolve) => { node.children[0].x = 10; node.children[0].y = 10; - node.children[0].texture = createText({ + node.children[0].text = createText({ fontFamily: 'Ubuntu', fontSize: 128, text: `${pick(adjectives)} ${pick(nouns)}`,