Follow-up to #276 P4.
Evidence / problem
The Canvas2D viewers currently size backing stores directly from window.devicePixelRatio || 1, while the Three.js renderer already bounds render density (mobile auto = 1x, desktop auto <= 1.45x, high <= 1.8x, low = 0.85x). On DPR3 hardware, native Canvas backing-store area is roughly 9x CSS pixel area.
Current Canvas source census with direct DPR handling:
public-viewer.js
public-radial-viewer.js
public-tree-viewer.js
public-treemap-viewer.js
public-timeline-viewer.js
public-cluster-viewer.js
public-sunburst-viewer.js
public-tree-router.js
Safe first increment
Do not change the 2D default yet.
- Add one browser-side render-density policy helper.
- With no
render query, return native DPR exactly (current behavior).
- Experimental URL-only modes:
render=auto: mobile <= 1x, desktop <= 1.45x
render=high: mobile <= 1.25x, desktop <= 1.8x
render=low: <= 0.85x
- Apply it to all Canvas runtimes through one build postprocessor rather than duplicating policy code.
- Keep
render renderer-local and outside transferable 2D/3D state.
- Add DPR3 Chromium evidence proving CSS geometry is unchanged while backing-store area is bounded for opt-in auto.
- Keep a native-mode regression proving absent
render preserves current DPR3 backing-store behavior.
- Only after visual/readability/performance evidence decide whether Auto should become a user-facing/default mode.
Non-goals
- no P3 Activity/Quality/semantic-edge work
- no immediate 2D default-quality reduction
- no layout/hit-test changes
- no addition to
Spatial Core
Refs #276.
Follow-up to #276 P4.
Evidence / problem
The Canvas2D viewers currently size backing stores directly from
window.devicePixelRatio || 1, while the Three.js renderer already bounds render density (mobile auto = 1x, desktop auto <= 1.45x, high <= 1.8x, low = 0.85x). On DPR3 hardware, native Canvas backing-store area is roughly 9x CSS pixel area.Current Canvas source census with direct DPR handling:
public-viewer.jspublic-radial-viewer.jspublic-tree-viewer.jspublic-treemap-viewer.jspublic-timeline-viewer.jspublic-cluster-viewer.jspublic-sunburst-viewer.jspublic-tree-router.jsSafe first increment
Do not change the 2D default yet.
renderquery, return native DPR exactly (current behavior).render=auto: mobile <= 1x, desktop <= 1.45xrender=high: mobile <= 1.25x, desktop <= 1.8xrender=low: <= 0.85xrenderrenderer-local and outside transferable 2D/3D state.renderpreserves current DPR3 backing-store behavior.Non-goals
Spatial CoreRefs #276.