fix(tilemap): bounded parallax tile layers opt out of static-bounds culling#385
Merged
Conversation
…ulling The cull test runs before the collect-time parallax patch, so a bounded parallax layer was culled at its base offset while rendering elsewhere and could pop out on screen. Same camera-dependent-position rationale as ImageLayerNode's guard.
Exoridus
enabled auto-merge (squash)
July 17, 2026 00:04
Bundle ReportChanges will increase total bundle size by 1.21kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: exojs-tilemap-esmAssets Changed:
Files in
view changes for bundle: exo-full-iife-Exo-iifeAssets Changed:
Files in
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Companion to the ImageLayerNode culling guard from #384, closing the symmetric pre-existing gap flagged there:
RenderNode._collectruns theinViewcull test before_collectContentapplies the collect-time parallax position patch, so a boundedTileLayerNodewithparallax !== 1was culled against its static base-offset bounds while rendering atbaseOffset + camCenter·(1−parallax)— divergence grows without bound with camera distance, so the layer could pop out while still partially on-screen.Fix: the constructor's
cullable = falseguard (previously unbounded-only) now also covers parallax layers — same camera-dependent-position rationale asImageLayerNode.Verified in review
TileLayer.parallaxX/Yarereadonly(no setter, single assignment) — the constructor-time guard is complete, no live-sync needed.super._collectContentrecurses, so chunkinViewsees the patched parent transform in the same frame. Only the node-level cull was stale.cullable === true) and unbounded tests bracket the guard on both sides. Tilemap suite 468/468.