Draw the map with WebGL2 by default, with the 2D canvas as fallback

- Sea, land, waves, clouds, cables, tubes and packets are drawn by the
  graphics card; the land is geometry built once, so panning and zooming
  repaint nothing.
- Cities, labels and markers are painted once into a sprite atlas and drawn
  in one call (with drawImage in 2D, which speeds up the 2D map too).
- Settings > Map drawing: Auto or Always 2D, per device. Browsers without
  WebGL2, a lost context and puzzles keep the 2D map.
- npm run bench:gpu compares 2D and WebGL in a real browser on a real GPU;
  ?fps shows a frame meter.
This commit is contained in:
Antoine 2026-11-04 11:37:27 +01:00
parent 7aa6506e70
commit cf9ab5e774
No known key found for this signature in database
GPG key ID: 728FF1CE15732B05
36 changed files with 862 additions and 83 deletions

View file

@ -102,6 +102,7 @@
</div>
</noscript>
<canvas id="map" aria-label="World map of your network" data-i18n-aria-label="page.world_map_of_your_network"></canvas>
<canvas id="mapgl" aria-hidden="true" hidden></canvas><canvas id="mapfx" aria-hidden="true" hidden></canvas>
<header id="hud">
<button class="chip brand menubtn" data-act="menu" aria-label="Network menu: save, load or start over" data-i18n-aria-label="page.network_menu_save_load_or_start">