ddd
This commit is contained in:
parent
0a343ecbc5
commit
c3a6f5ff37
80 changed files with 2512 additions and 1625 deletions
|
|
@ -31,7 +31,7 @@ assert(minimapBuildSource.includes('minimapCache={revision:minimapWorldRevision'
|
|||
assert(functionSource('drawMapLongLines').includes('minimapGeometryForComponent(component,caches.geometries)'),'Long-line minimap geometry is recalculated during every world-layer rebuild');
|
||||
assert(functionSource('markStateDirty').includes('invalidateWorldPresentation()'),'State changes do not invalidate minimap/overview content');
|
||||
assert(app.includes('globalThis.BEND_PERF=')&&functionSource('perfObserve').includes('samples.length>240'),'Performance measurements are missing or unbounded');
|
||||
assert(css.includes('#noiseCanvas.interaction-muted')&&css.includes('body.reduced-effects #noiseCanvas')&&functionSource('scheduleNoiseBackground').includes('noisePainted')&&!functionSource('scheduleNoiseBackground').includes('setTimeout'),'Decorative noise is not static or interaction/reduced-motion suppression is missing');
|
||||
assert(!css.includes('#noiseCanvas.interaction-muted')&&css.includes('body.reduced-effects #noiseCanvas')&&functionSource('applyUiSettings').includes("uiSettings.lightweightRendering")&&functionSource('scheduleNoiseBackground').includes('noisePainted')&&!functionSource('scheduleNoiseBackground').includes('setTimeout'),'Decorative noise is not static or the explicit lightweight setting is not the only suppression path');
|
||||
assert((ensureBoardsSource.match(/changes<LOD_CHANGES_PER_PASS/g)||[]).length>=3&&ensureBoardsSource.includes('if(pending)scheduleLodPass()'),'LOD creation or eviction bypasses the per-pass budget');
|
||||
assert(functionSource('desiredInteractiveBoardIds').includes('for(const id of ids)')&&!app.includes('INTERACTIVE_DETAIL_CELL_BUDGET'),'Visible-puzzle detail selection is incomplete or still budget-culls boards');
|
||||
assert(ensureBoardsSource.includes("perfGauge('visibleUnsolvedBoards'"),'LOD performance telemetry cannot prove visible unsolved-board coverage');
|
||||
|
|
@ -113,7 +113,7 @@ const mapContext2d={setTransform(){},clearRect(){},drawImage(){drawCopies++},beg
|
|||
minimapCache:{revision:1,width:210,height:132,dpr:1,anchorX:0,anchorY:0,scale:5,overscanPixels:50,baseWidth:310,baseHeight:232,longSegments:0},
|
||||
window:{devicePixelRatio:1},MINIMAP_VIEW_CHUNKS_X:42,data:{metas:{}},getMinimapRect:()=>({width:210,height:132}),
|
||||
cameraCenterInChunks:()=>center,visibleMetaIdsForBounds:()=>new Set(),metaState:()=>({solved:false}),
|
||||
perfStart:()=>0,perfEnd:()=>0,perfCount:()=>{}
|
||||
interactionActive:()=>false,perfStart:()=>0,perfEnd:()=>0,perfCount:()=>{}
|
||||
};
|
||||
minimapContext.rebuildMinimapWorld=(width,height,dpr,x,y)=>{
|
||||
minimapBuilds++;minimapContext.minimapCache={...minimapContext.minimapCache,revision:minimapContext.minimapWorldRevision,width,height,dpr,anchorX:x,anchorY:y};
|
||||
|
|
@ -124,28 +124,26 @@ minimapContext.drawMinimap();assert(minimapBuilds===0&&drawCopies===1,'Small cam
|
|||
center=[20,0];minimapContext.drawMinimap();assert(minimapBuilds===1&&drawCopies===2,'Camera movement beyond minimap overscan did not rebuild exactly once');
|
||||
|
||||
let overviewLodSchedules=0;
|
||||
const overviewRendered=new Map(Array.from({length:6},(_,index)=>[`D${index}`,{id:`D${index}`,drawing:null}])),
|
||||
overviewStatic=new Map(Array.from({length:6},(_,index)=>[`S${index}`,{id:`S${index}`}]));
|
||||
const overviewRendered=new Map(Array.from({length:6},(_,index)=>[`D${index}`,{id:`D${index}`,drawing:null}]));
|
||||
const overviewLodContext={
|
||||
LOD_CHANGES_PER_PASS:4,rendered:overviewRendered,staticRendered:overviewStatic,inWorldOverview:()=>true,
|
||||
destroyBoard:board=>overviewRendered.delete(board.id),destroyStaticBoard:board=>overviewStatic.delete(board.id),
|
||||
LOD_CHANGES_PER_PASS:4,rendered:overviewRendered,inWorldOverview:()=>true,interactionActive:()=>false,
|
||||
destroyBoard:board=>overviewRendered.delete(board.id),
|
||||
scheduleLodPass:()=>overviewLodSchedules++,scheduleWorldOverview:()=>{},perfStart:()=>0,perfCount:()=>{},perfEnd:()=>{}
|
||||
};
|
||||
vm.createContext(overviewLodContext);vm.runInContext(`${ensureBoardsSource}\nthis.ensureBoards=ensureBoards;`,overviewLodContext);overviewLodContext.ensureBoards();
|
||||
assert(overviewRendered.size+overviewStatic.size===8&&overviewLodSchedules===1,'Overview eviction exceeded its four-change budget or failed to schedule continuation');
|
||||
assert(overviewRendered.size===2&&overviewLodSchedules===1,'Overview eviction exceeded its four-change budget or failed to schedule continuation');
|
||||
|
||||
let creationLodSchedules=0;
|
||||
const visibleIds=new Set(Array.from({length:10},(_,index)=>`B${index}`)),creationStatic=new Map(),
|
||||
const visibleIds=new Set(Array.from({length:10},(_,index)=>`B${index}`)),
|
||||
creationData={metas:Object.fromEntries([...visibleIds].map(id=>[id,{id,puzzle:{}}]))};
|
||||
const creationLodContext={
|
||||
LOD_CHANGES_PER_PASS:4,rendered:new Map(),staticRendered:creationStatic,data:creationData,inWorldOverview:()=>false,
|
||||
LOD_CHANGES_PER_PASS:4,rendered:new Map(),data:creationData,inWorldOverview:()=>false,interactionActive:()=>false,
|
||||
visibleMetaIds:()=>visibleIds,desiredInteractiveBoardIds:ids=>new Set(ids),metaState:()=>({solved:false}),
|
||||
makeStaticBoard:meta=>creationStatic.set(meta.id,{id:meta.id,signature:'current'}),destroyStaticBoard:board=>board&&creationStatic.delete(board.id),
|
||||
destroyBoard:()=>{},makeBoard:meta=>creationLodContext.rendered.set(meta.id,{id:meta.id,drawing:null}),staticBoardSignature:()=> 'current',
|
||||
destroyBoard:()=>{},makeBoard:meta=>creationLodContext.rendered.set(meta.id,{id:meta.id,drawing:null}),
|
||||
scheduleLodPass:()=>creationLodSchedules++,perfStart:()=>0,perfCount:()=>{},perfGauge:()=>{},perfEnd:()=>{}
|
||||
};
|
||||
vm.createContext(creationLodContext);vm.runInContext(`${ensureBoardsSource}\nthis.ensureBoards=ensureBoards;`,creationLodContext);creationLodContext.ensureBoards();
|
||||
assert(creationLodContext.rendered.size===4&&creationStatic.size===0&&creationLodSchedules===1,'Detailed board creation exceeded its four-change budget or hid visible boards behind static summaries');
|
||||
assert(creationLodContext.rendered.size===4&&creationLodSchedules===1,'Detailed board creation exceeded its four-change budget or hid visible boards');
|
||||
|
||||
(async()=>{
|
||||
let workerConstructions=0,workerNow=1000,timerId=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue