Skip to content

deck9support - #46

Open
Kuznecoff wants to merge 34 commits into
masterfrom
deck2gisLayer-v3
Open

Kuznecoff wants to merge 34 commits into
masterfrom
deck2gisLayer-v3

Conversation

@Kuznecoff

Copy link
Copy Markdown
Collaborator

No description provided.

a.kuznecov and others added 10 commits August 10, 2026 17:13
Fix grid layer rendering broken by the hexagon index-buffer workaround.

The previous fix cleared fillModel.vertexArray.indexBuffer for every
sublayer. GridCellLayer's fillModel uses an indexed CubeGeometry
(topology 'triangle-list'), so clearing its index buffer made luma.gl
fall back to drawArrays over 24 raw cube vertices, rendering grid cells
as triangles and breaking extruded bars.

Only reset the index buffer for non-indexed (triangle-strip) fill
models, keeping the hexagon fix intact.
a.kuznecov and others added 5 commits September 30, 2026 15:07
deck.gl layers drifted from the map near the
top of the screen while dragging a pitched map (at pitch 0 the
projection matched).

Root cause: fovCorrection() used a linear empirical fovy correction
(100/h * 60) that did not reproduce the 2GIS camera. 2GIS computes its
fov with a minimum calculation screen height of 1000px
(tan(fov/2)_eff = tan(fov/2) * H / max(H, 1000)), and deck.gl applies
its own minimum-1000px screen height rule to the requested fovy.

Fix: request fovy = 2 * atan(tan(cameraFov / 2) * H / max(H, 1000)),
taken from map._impl.core.state.cameraConfig.fov. This makes deck's
effective perspective identical to the 2GIS camera (verified against
map.project: 0px mismatch across the screen at pitch 45, previously
up to ~19px on a 663px-high window and worse on larger windows).

Also stop passing map.getPadding() to deck: the 2GIS camera ignores
padding entirely (verified pixel-by-pixel), while deck.gl shifts the
projection by padding, adding up to ~49px misalignment with
padding + pitch.

demo/demo-bundle.js is a rebuilt build artifact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: deck.gl layers drift on pitched maps (viewport fovy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant