(WIP) Blits FTL support - #738
Draft
wouterlucas wants to merge 6 commits into
Draft
wouterlucas wants to merge 6 commits into
wouterlucas wants to merge 6 commits into
Conversation
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
marked this pull request as draft
September 3, 2026 21:31
Test Results: ✅ PASSEDRun at: 2026-09-03T21:32:01.250Z Summary: |
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.
Test Results: ✅ PASSEDRun at: 2026-09-03T22:02:45.254Z Summary: |
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.
Test Results: ✅ PASSEDRun at: 2026-09-04T06:36:05.604Z Summary: |
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.
Test Results: ✅ PASSEDRun at: 2026-09-04T13:17:20.801Z Summary: |
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.
Test Results: ✅ PASSEDRun at: 2026-09-04T21:04:21.393Z Summary: |
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.
Test Results: ✅ PASSEDRun at: 2026-09-08T15:07:42.312Z Summary: |
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.
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:
See also:
lightning-js/blits-example-app#98
https://github.com/lightning-js/ftl/pull/92