Settings: one Diagnostic info readout for the screen, the map's drawing and its speed

Settings › Viewport info is now Diagnostic info, and the frame meter of the WebGL work joins it: one readout in a
corner instead of two, for bug reports. It shows:
- what the screen tells the game, as before (sizes, visual viewport, safe areas, standalone, the tab bar);
- what draws the map: WebGL2 and the graphics card's name, or 2D and why (Always 2D, a puzzle, no WebGL2, a
  processor pretending to be a card, a lost context, a card out of memory: glKill() keeps the reason);
- how fast: frames per second, the 95th percentile and slowest frame, draw()'s mean time, the speed and zoom, and on
  the card its segments and packets.
?vp and ?fps open it, ?novp and ?nofps close it, five taps on the date toggle it, and a device that had the frame
meter on keeps it. Its text stays technical and in English: it is pasted into reports. On a 360 px phone it wraps
inside the screen and never takes a tap. The setting's name and description are translated.

tests/diagnostic-info.test.js: the setting, the readout's parts, each reason for 2D, the frame figures, the address
flags and the old setting, the taps, and the phone layout.
This commit is contained in:
Antoine 2026-11-04 19:21:23 +01:00
parent 52c8aaffd6
commit cdc7c6d1eb
No known key found for this signature in database
GPG key ID: 728FF1CE15732B05
15 changed files with 160 additions and 38 deletions

View file

@ -12,8 +12,8 @@ function frame(now){
if(S&&!S.lost&&$('modal').hidden&&UI.speed&&!pzOn())runClock(dt);
if((UI.speed||pzOn())&&!(S&&S.lost))animT+=dt; /* paused = frozen dots, waves and clouds */
const t=animOn()?animT:0;
if(!(UI.mapHid=mapHidden())&&!mapStill(t,now)){const d0=FPSM.on?performance.now():0;try{draw(t);}catch(e){tickErr(e);}UI.drawnAt=now;if(FPSM.on)FPSM.dms=performance.now()-d0;}
if(FPSM.on)fpsNote(now);
if(!(UI.mapHid=mapHidden())&&!mapStill(t,now)){const d0=DIAG.on?performance.now():0;try{draw(t);}catch(e){tickErr(e);}UI.drawnAt=now;if(DIAG.on)DIAG.dms=performance.now()-d0;}
if(DIAG.on)diagFrame(now);
}
// dt of real time at UI.speed: the days it adds up to. The frame calls it; so may a clock that also runs where frames
// do not (src/agent/, a hidden tab), under the frame's own conditions otherwise.