feat(ColumnLayer): add cap prop for dome and cone top geometry#10221
Open
charlieforward9 wants to merge 1 commit intovisgl:masterfrom
Open
feat(ColumnLayer): add cap prop for dome and cone top geometry#10221charlieforward9 wants to merge 1 commit intovisgl:masterfrom
charlieforward9 wants to merge 1 commit intovisgl:masterfrom
Conversation
Adds a geometry-only `cap` prop to ColumnLayer that shapes the top of each column when extruded. No per-instance attributes — zero rendering overhead on existing usage. - `'flat'` (default): current behavior, unchanged - `'dome'`: smooth hemispherical cap with proper normals - `'cone'`: pointed conical cap Fixes visgl#9942
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
Adds a geometry-only
capprop toColumnLayerthat shapes the top of each extruded column. No new accessors, no shader changes, no per-instance attributes — zero performance impact on existing usage.'flat'(default)'dome''cone'Cap height equals the column radius. Only applies when
extruded: true.Why this belongs in the base layer
cap: 'flat'(the default) produces the exact same geometry as before. The cap is built at geometry-construction time, not per-instance.HexagonLayerrendersColumnLayerunder the hood, this flows through to aggregation-based hexagon maps.Demo
agintel.ai use case for allowing users to swap between 3D TreeLayer and '2D' ColumnLayer - preserving aesthetic depth and visibility of tree (in contrast to the flat Scatterplot layer that can be a little more difficult to contrast and style.
Screen.Recording.2026-04-14.142120.mp4
Changes
ColumnGeometry: Whencapis not'flat'andextruded: true, replaces the flat top tessellation with interleaved ring triangle strips. Dome usesmax(2, round(diskResolution / 4))rings along a quarter-circle arc; cone uses 1 ring to a single apex.ColumnLayer: Addedcapprop (default'flat'), forwarded throughgetGeometry→ColumnGeometry, wired intoupdateStategeometry-regeneration check.height=0passthrough.capentry tocolumn-layer.md.Fixes #9942
Test plan
cap: 'flat'produces identical geometry to current behaviorcapignored whenheight=0(not extruded)