Skip to content

(WIP) Blits FTL support - #738

Draft
wouterlucas wants to merge 6 commits into
masterfrom
ftl-dual-renderer
Draft

wouterlucas wants to merge 6 commits into
masterfrom
ftl-dual-renderer

Conversation

@wouterlucas

@wouterlucas wouterlucas commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

WORK IN PROGRESS

Wiring up FTL to Blits, draft.
Support for both L3 Renderer and FTL - transition phase.

Selectable via Blits.Launch settings (renderer: 'ftl', default 'l3').
FTL resolves through dynamic imports so L3 bundles never include it.

Adds NodeAdapter contract, FTL element/launch/nodeAdapter, L3 adapter, optional ftl peer dependency and FTL usage docs.

Screenshot of the example app in FTL:

2026-09-04-082856_hyprshot

See also:
lightning-js/blits-example-app#98
https://github.com/lightning-js/ftl/pull/92

Selectable via Blits.Launch settings (renderer: 'ftl', default 'l3').
FTL resolves through dynamic imports so L3 bundles never include it.
Adds NodeAdapter contract, FTL element/launch/nodeAdapter, L3 adapter,
optional ftl peer dependency and FTL usage docs.
@wouterlucas
wouterlucas marked this pull request as draft September 3, 2026 21:31
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-03T21:32:01.250Z

Summary:
passed: 1370 failed: 0 of 1370 tests

Blits-owned animation support: tween.js emulates the L3 animation
controller (exact cubic-bezier easing parity, start/progress/end,
cancel vs finish-early, color channels) on AnimeJS, driven by FTL's
own loop. animejs is an optional peer (FTL chunk only); missing peer
falls back to instant-apply. Adds devDependency so the peer resolves
at build/test time, plus 40 tween unit tests.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-03T22:02:45.254Z

Summary:
passed: 1410 failed: 0 of 1410 tests

Translates Blits rounded/border/shadow props (all combos), gradient
color objects and shader={type} for built-in types into FTL shader
instances, with reactive live updates and z-bucket re-listing on
null<->set switches. Text nodes keep glyph rendering (no gradient
instances on text). Adds 56 bridge unit tests.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-04T06:36:05.604Z

Summary:
passed: 1466 failed: 0 of 1466 tests

TODO.md served its purpose (all items shipped across the PRs);
durable findings folded into FTL/README-FTL.md.

Sprites: new FTL/sprite.js resolves <Sprite image map frame> to FTL
image/subtexture textures with L3-identical map lookup, coalesced
live sync, texture-level @loaded and destroy cleanup. Canvas backing
store is now CSS-fitted to the display (refit on resize). Adds 17
sprite unit tests.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-04T13:17:20.801Z

Summary:
passed: 1483 failed: 0 of 1483 tests

MSDF: new FTL/fonts.js (atlas derivation, engine resolution, family
registry) feeds launch (msdf engine + shader registration, per-type
font loading awaited pre-init) and element (per-text type selection,
live fontFamily engine-switch). Adds 16 font unit tests.

Freshness: setProp re-resolves the subtree via dirtyBranch (FTL
caches world state per element; children of moved/faded/resized
nodes went stale) and layoutFn re-resolves after positioning.

Coercion: static template attributes arrive as strings; new shared
toNumber() converts numeric strings at the FTL boundary (geometry,
text metrics, shader/sprite values) so FTL arithmetic can't NaN.
Adds utils tests.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-04T21:04:21.393Z

Summary:
passed: 1513 failed: 0 of 1513 tests

Single-key gradients become opaque-to-transparent fades, adjacent-pair
and 3-4 key gradients resolve to bilinear corners, and linear gradients
with translucent stops opt into alpha propagation.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-08T15:07:42.312Z

Summary:
passed: 1537 failed: 0 of 1537 tests

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