feat(examples): add useDevicePixels toggle to basemap-browser#10332
feat(examples): add useDevicePixels toggle to basemap-browser#10332chrisgervang wants to merge 24 commits into
Conversation
This reverts commit b13922f.
Adds a checkbox to test useDevicePixels override (toggles between true and 1.5) across all renderer configurations. This helps verify that custom DPR settings are correctly forwarded in attached-gl/interleaved mode paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… test pages Pass pixelRatio to MapLibre/Mapbox Map constructor when useDevicePixels is set to a custom value, since the basemap owns the canvas in interleaved mode. Also adds standalone HTML test pages for validating useDevicePixels across deck.gl 9.1, 9.2, 9.3, and local builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…p-browser-use-device-pixels
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 82902eb. Configure here.
| setInterval(updateInfo, 500); | ||
| </script> | ||
| </body> | ||
| </html> |
There was a problem hiding this comment.
Standalone HTML test files accidentally committed to repo
Medium Severity
Six standalone HTML test harnesses (use-device-pixels-cdn-test.html, use-device-pixels-cdn-test-9.2.html, use-device-pixels-cdn-test-9.3.html, use-device-pixels-local-test.html, use-device-pixels-maplibre-ratio-test.html, use-device-pixels-maplibre-ratio-test-9.3.html) are committed to the example root. These are development debugging tools — not referenced by the example's build, index.html, or package.json — totaling ~1000 lines of near-duplicate code across CDN versions. They appear to be manual test artifacts from the development process that were inadvertently included.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 82902eb. Configure here.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>


Summary
useDevicePixelscheckbox to the basemap-browser control panel (toggles betweentrueand1.5)Test plan
useDevicePixelsis silently ignored, buffer dimensions won't change🤖 Generated with Claude Code
Note
Low Risk
Changes are confined to the basemap-browser example and manual HTML test pages; no core deck.gl runtime behavior is modified in this diff.
Overview
Adds a
useDevicePixelsdimension to the basemap-browser example (defaulttrue), synced via URL and a control-panel checkbox that toggles between native DPR and 1.5.The value flows through
buildConfiginto every renderer path (pure JS and React): Deck / DeckGL, GoogleMapsOverlay, and MapboxOverlay, with MapLibre/Mapbox maps also gettingpixelRatiowhen the setting is a number orfalse(forced to1). React map components remount when the ratio changes so buffer size updates.Several standalone HTML harnesses compare standalone Deck vs interleaved MapboxOverlay and MapLibre
pixelRatiovs DeckuseDevicePixelsacross published deck.gl versions.Reviewed by Cursor Bugbot for commit cbecd54. Bugbot is set up for automated code reviews on this repo. Configure here.