Skip to content

P4: evaluate bounded Canvas render density without changing 2D defaults #285

Description

@nekomario28

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.

  1. Add one browser-side render-density policy helper.
  2. With no render query, return native DPR exactly (current behavior).
  3. Experimental URL-only modes:
    • render=auto: mobile <= 1x, desktop <= 1.45x
    • render=high: mobile <= 1.25x, desktop <= 1.8x
    • render=low: <= 0.85x
  4. Apply it to all Canvas runtimes through one build postprocessor rather than duplicating policy code.
  5. Keep render renderer-local and outside transferable 2D/3D state.
  6. Add DPR3 Chromium evidence proving CSS geometry is unchanged while backing-store area is bounded for opt-in auto.
  7. Keep a native-mode regression proving absent render preserves current DPR3 backing-store behavior.
  8. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions