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:
parent
52c8aaffd6
commit
cdc7c6d1eb
15 changed files with 160 additions and 38 deletions
|
|
@ -35,7 +35,7 @@ Object.assign(ACT,{
|
|||
settings:()=>{UI.setOpen=true;openModal(settingsHtml());},
|
||||
settingsClose:()=>{UI.setOpen=false;if(!S||!UI.started)showTitle();else closeModal();},
|
||||
prefSet:({v})=>{const [k,b]=String(v).split(':');if(!own(PREF_DEF,k))return;setPref(k,b==='1');sfx('click');refreshSettings();},
|
||||
vpSet:({v})=>{vpOn(v==='on');refreshSettings();},
|
||||
vpSet:({v})=>{diagOn(v==='on');refreshSettings();},
|
||||
resetAsk:()=>openModal(`<h2 style="font-size:26px">${tr('game_and_settings.start_a_new_network')}</h2><p class="tagline">${tr('game_and_settings.name_and_everything_it_owns_will',{name:esc(S?S.name:tr('common.your_network'))})}</p><div class="btns">${btn(tr('game_and_settings.delete_and_start_over'),'newgame',{},'red big')}${btn(tr('common.keep_playing'),'closeModal',{},'ghost big')}</div>`),
|
||||
whatsNewShow:()=>whatsNew(true,true),
|
||||
updateNow:()=>{save(true);location.reload();},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue