feat(tilemap): ImageLayerNode — render Tiled image layers with parallax, tint, and infinite repeat#384
Merged
Merged
Conversation
added 5 commits
July 16, 2026 22:03
…or Tiled image layers
…okup, destroy, snap cascade) TileMapView now constructs one canonical ImageLayerNode per TileMap image layer (map document order), exposed via imageLayerNodes, getImageLayerNodeById, and getImageLayerNodeByName. The view owns these nodes: destroy() destroys and detaches them, and pixelSnapMode cascades to them, mirroring the tile-layer node conventions. Image layers remain outside band selectors (documented rationale: no combined document order with tile layers to interleave against).
Adds the public export next to TileLayerNode, a TileMapNode JSDoc pointer to TileMapView/ImageLayerNode for image-layer rendering, and three review follow-ups: ImageLayerNode JSDoc on repeat+parallax bounds/hit-test staleness, TileMapView.refreshLayers JSDoc noting image-layer nodes aren't reconciled, and two new ImageLayerNode tests (combined repeatX+repeatY coverage, and the per-frame coverage cache skip).
…ling The cull test runs before the collect-time parallax patch, so a parallax layer was culled at its base offset while rendering elsewhere — a parallax background could pop out while still on-screen. Same camera-dependent-position rationale as the existing repeat-axis guard. Also documents the retained-tier implication for repeat/parallax image layers.
Exoridus
enabled auto-merge (squash)
July 16, 2026 23:43
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will increase total bundle size by 28.52kB (0.12%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: exo-full-iife-Exo-iifeAssets Changed:
Files in
view changes for bundle: exojs-tilemap-esmAssets Changed:
Files in
Files in
Files in
|
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.
Summary
Wave-5 roadmap item.
ImageLayer(data class) finally gets a render node:ImageLayerNode extends Containerwrapping one coreRepeatingSprite, with collect-time parallax (TileLayerNode's exact pattern) and per-axis infinite repeat (period-aligned coverage of the view, recomputed only when view bounds or the patched origin change).TileMapViewconstructs/owns canonical nodes (imageLayerNodes,getImageLayerNodeById/ByName, destroy + pixel-snap cascade).Design decisions (made autonomously — owner review welcome)
RepeatingSprite— the existing primitive does all GPU work; no new renderer.cullable = false(position is camera-dependent, static bounds can't be culled against).toTileMap()walks Tiled document order once but stores tile/image layers separately, discarding combined position — and Tiledlayer.idis creation-order, NOT stacking-order, so id-ordering is no safe proxy. Correct fix (combined document index recorded during the existing walk) is a small TileMap schema addition, deferred. Apps parent image nodes explicitly.visible/opacity/tintColorapplied once at construction —ImageLayeris immutable.texture: null⇒ empty node, documented.TileMapNodeunchanged (same document-order reason); JSDoc pointer added.Review findings addressed
TileLayerNode(bounded parallax tile layers cull at base bounds) — deliberately not touched here; flag if you want a follow-up.refreshLayers()/removeImageLayerdon't reconcile image nodes; combined document order for band membership.Verification
TDD throughout (17+2+1 new node tests incl. hand-derived coverage math, 8 view tests); tilemap suite 467/467; test:core green; docs regenerated +
docs:api:checkclean; repeat math independently re-derived in two reviews (no off-by-one, world-stable under panning, pixel-snap cannot fight period alignment).