Repository navigation
feat(extensions): add dashUnits - #10583
Merged
Merged
Conversation
chrisgervang
marked this pull request as ready for review
August 21, 2026 23:15
Greptile SummaryThe PR adds configurable measurement units for path dash patterns while retaining width-relative behavior as the default.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| modules/extensions/src/path-style/path-style-extension.ts | Adds the documented dashUnits prop, default, public type, and runtime uniform mapping. |
| modules/extensions/src/path-style/shaders.glsl.ts | Converts dash values from the selected semantic units into the fragment shader’s path-position units. |
| test/modules/extensions/path.spec.ts | Covers unit mapping and propagation through PolygonLayer and GeoJsonLayer. |
| test/render/test-cases/path-dash.spec.ts | Adds visual cases for zoom, stroke-width, billboard, rounded-cap, and offset behavior; the previously flagged callback naming issue is resolved. |
Reviews (43): Last reviewed commit: "Merge latest master" | Re-trigger Greptile
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9365041. Configure here.
Pessimistress
approved these changes
Aug 22, 2026
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 22, 2026 00:59
9365041 to
c0f6b90
Compare
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 22, 2026 01:05
c0f6b90 to
bc1ed23
Compare
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 22, 2026 01:09
bc1ed23 to
5387360
Compare
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 22, 2026 01:54
5387360 to
2c629d0
Compare
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 22, 2026 22:00
2c629d0 to
1da7f31
Compare
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 22, 2026 22:15
1da7f31 to
e05d917
Compare
…ension Adds a render-test matrix and an interactive app for PathStyleExtension dashing, covering segment density, dash arrays, corners, zoom levels, device pixel ratio, 3D elevation and billboard/flat parity. The golden images record current behavior, defects included, so that subsequent work shows up as a direct image diff. Measured from these goldens with getDashArray [4, 5]: - Six strips drawing the identical straight line diverge purely by vertex count. 1, 2 and 4 segments dash correctly at a 43.4px period, 12 segments drifts to 55.4px, and 40 and 120 segments render fully solid. Dash phase restarts at every vertex, so once a segment is shorter than one dash period nothing is discarded. - dashJustified collapses the same way; justification is also per segment. - highPrecisionDash renders all six strips identically and correctly, confirming the continuous-arclength mechanism works and is merely opt-in. - billboard: true combined with highPrecisionDash is broken: the same geometry renders solid when dense and at a 52.0px period, 1.5x too long, when sparse, against 34.8px for the flat copy. - Dash length grows along paths that climb in Z, because the CPU accumulates 3D distance while the shader coordinate measures 2D. No source changes. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014GipN1niYRgRuLVat2wujw
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
3 times, most recently
from
August 23, 2026 19:44
3074225 to
f826f36
Compare
chrisgervang
force-pushed
the
claude/deck-gl-path-dashing-2jnq8i-5
branch
from
August 24, 2026 00:05
f826f36 to
a4056ba
Compare
# Conflicts: # modules/extensions/src/path-style/path-style-extension.ts # modules/extensions/src/path-style/shaders.glsl.ts
# Conflicts: # modules/extensions/src/path-style/shaders.glsl.ts # test/modules/extensions/path.spec.ts
# Conflicts: # modules/extensions/src/path-style/shaders.glsl.ts # test/modules/extensions/path.spec.ts
# Conflicts: # test/render/golden-images/path-dash-clipped-composition.png
# Conflicts: # test/render/test-cases/path-dash.spec.ts
# Conflicts: # test/render/test-cases/path-dash.spec.ts
# Conflicts: # test/render/test-cases/path-dash.spec.ts
Base automatically changed from
claude/deck-gl-path-dashing-2jnq8i-4
to
master
September 2, 2026 04:04
1 of 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.

Stack position: Part 5 of 6; base #10582.
Goal
Let applications choose the semantic measurement for a dash pattern instead of always tying it to stroke width.
Changes
dashUnits: 'widths' | 'pixels' | 'meters' | 'common';widthspreserves existing behavior and remains the default.DashUnitsand cover live uniform mapping plus forwarding through PolygonLayer and GeoJsonLayer.Performance snapshot
Measured at production benchmark head
bb4bdd7818on Apple M1 Max, headless Chromium/ANGLE Metal, WebGL2, 3840×2160, with 20 timestamp-query samples. Subsequent parent-only merges supply the CPU benchmark viewport fixture, correct rounded-cap AA composition, scope the remapped rounded-corner envelope toPATH_STYLE_OFFSET, and preserve both phase and visible cap/joint bounds for camera-clipped billboards. These GPU variants use flat Orthographic paths with square caps andantialiasing: false, so the AA and billboard-clipping branches do not execute. The inherited bounds fix adds one dash-onlyvec2varying, plus onevec2multiply in dash+offset variants, so the table is the closest measured reference rather than a post-fix A/B.PathLayerIn the heavy workload, all controls add 0.230 ms to the PathLayer pass: 1.38% of a 60 Hz frame or 2.76% of a 120 Hz frame. Path mode adds 0.015 ms beyond segment mode; pixels add 0.003 ms and justification changes the measured median by -0.001 ms, both immaterial here; adding offset capability to that combination adds 0.006 ms.
For 100,000 segments, seven calibrated CPU runs measured approximately 3.8 ms for production normalized rendered-path metrics, 1.5 ms for the public nested-position compatibility helper, and 3.1 ms for its flat-position input. These are hardware- and workload-specific comparison results, not expected application FPS.
The unit render benchmark also confirms semantics: width-relative periods scale 17.6/34.7/67.9 px across zooms 12/13/14, while pixel units remain 43.6/43.6/43.6 px with flat/billboard parity.
Validation
Note
Medium Risk
Touches core path dash GLSL and coordinate conversion (billboard, offset, projection), so visual regressions are possible despite broad golden tests; default
widthslimits breakage for existing apps.Overview
Adds
dashUnits('widths' | 'pixels' | 'meters' | 'common') sogetDashArrayis no longer tied only to half stroke width.'widths'stays the default and preserves today’s scaling with line width.Path-layer dash vertex math now converts each mode into screen pixels (including flat vs billboard via
strokeHalfWidthPixels/dashWidthPixels) and passes adashUnitsuniform to the shader. Absolute units (pixels,meters,common) are not rescaled when path offset widens geometry;widthsstill follows the original stroke.Exports
DashUnits. Scatterplot/text-background dashes remain width-relative. The dash-styles demo, GPU/CPU benches, unit tests, and golden render cases cover zoom-stable pixels, width independence, and offset + pixel dashes.Reviewed by Cursor Bugbot for commit 692fbb8. Bugbot is set up for automated code reviews on this repo. Configure here.