fix(ColumnLayer): closed shapes with binary data and transition props#10094
Open
charlieforward9 wants to merge 3 commits intovisgl:masterfrom
Open
fix(ColumnLayer): closed shapes with binary data and transition props#10094charlieforward9 wants to merge 3 commits intovisgl:masterfrom
charlieforward9 wants to merge 3 commits intovisgl:masterfrom
Conversation
7 tasks
5 tasks
7 tasks
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.
Closes #9463 , #10021
Background
When using
ColumnLayerwith binary data attributes, column shapes render with missing faces — one or more sides of each column appear open/incomplete.The root cause is an index buffer leak between the wireframe and fill models.
ColumnLayeruses geometry indices for wireframe rendering (line-list). When model state is rebuilt (e.g. due to data changes or HMR), the wireframe index buffer can get reattached to the fill model's vertex array. Since the fill geometry uses triangle-strip topology without indices, this causes incorrect rendering and broken shapes.The fix calls
_disableFillIndexBuffer()at the top ofdraw()every frame to ensure the fill model never uses wireframe indices. The method is extracted as aprotectedhelper soHexagonCellLayer(which had an inline copy of the same workaround) can share it.A regression test is included in
test/modules/layers/column-layer.spec.tsthat simulates the leak and assertsdraw()clears it.Change List
modules/layers/src/column-layer/column-layer.ts— call_disableFillIndexBuffer()indraw()before rendering fill geometry; extract as protected methodmodules/aggregation-layers/src/hexagon-layer/hexagon-cell-layer.ts— use the shared_disableFillIndexBuffer()methodtest/modules/layers/column-layer.spec.ts— regression test for the index buffer leakRender Test Golden Image
A render test case for this fix (
column-lnglat-binary-extruded) should be added once the vitest render test migration lands. @chrisgervang — can you help wire up the golden image capture when that's ready?