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:
parent
7aa6506e70
commit
cf9ab5e774
36 changed files with 862 additions and 83 deletions
|
|
@ -3,7 +3,7 @@
|
|||
// stay in lockstep; this file only offers what a player could do now (buttons on screen, POPs, cities) and digests what
|
||||
// routing gave, as strings the driver compares.
|
||||
(() => {
|
||||
const DENY = new Set(['animSet', 'cont', 'exportSave', 'importGo', 'importPick', 'install', 'langSet', 'menu', 'mute', 'newgame', 'phonePlay', 'phoneSpeed',
|
||||
const DENY = new Set(['animSet', 'cont', 'exportSave', 'importGo', 'importPick', 'install', 'langSet', 'mapSet', 'menu', 'mute', 'newgame', 'phonePlay', 'phoneSpeed',
|
||||
'prefSet', 'pzShare', 'resetAsk', 'settings', 'settingsClose', 'share', 'shareDl', 'shareGo', 'slotBack', 'slotDel', 'slotDelGo', 'slotExport', 'slotMenu',
|
||||
'slotRetry', 'slotSpace', 'slotSwitch', 'slotTake', 'soundSet', 'speed', 'start', 'toTitle', 'traceCopy', 'updateLater', 'updateNow', 'vpSet', 'wsShare',
|
||||
// Leave the game or open what is not this game: the title screen, menus of other modes, AI helpers that fetch.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue