Classic keeps a plot's Kenney kind where the kit holds a taller one #147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3791-classic-keeps-a-plot-s-kenney-kind-where"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3791
Step 5 of plan #3561: Classic draws each plot's Kenney model by decision D8, in
filland infall.What it delivers
classicModel). A Kenney model's kind is its name's stem: building, chimney, detail-tank, shipping-container, solar-panel, windmill or water-tower (KenneyKind). At rank 1 the plot's hash picks among rank 1's models. At each later rank, the plot's hash picks among that rank's models of the kind the plot drew at the rank below that draw taller than it drew, where any exist, and else among all of the rank's models. A model's drawn height is its top ×classicRiseof its rank, worked out once as the kit arrives. The model depends on the plot and the server's rank alone.filldraws that model for every building, and the monument's tower step (towerStep) follows its drawn heights.falldraws a fallen building as the model it stood as.Tests
src/client/render/city-layers.test.ts, with a stand-in kit whose models differ in height (and in width, which names the drawn model in the merged mesh):
Mutation checks, run from whole-tree copies outside the checkout. The first five ran at
4456bad, where the control passed 14/14, and the last three at1a5f2a2, where it passes 15/15. Each mutant fails the test aimed at it:fillandfalldraw the server's pick (main)falldraws the server's pickfill's pick depends on the server's pickfall's block height from the server's pick (topOf(kit.buildings[building.model]) * rise)fall's footprint from the server's pick (footprintOf(kit.buildings[building.model]))fill's tower heights from the server's pick (topOf(kit.buildings[building.model]) * classicRise(rank))The last three passed the whole suite (1007/1007) before the block and tower tests, and they still pass the earlier version of city-layers.test.ts (14/14) beside the new one.
The real kit
The kit's OBJs from assets/kenney-industrial, parsed and fitted as
loadKenneyfits them, with D8 walked over a 64 × 64 grid of plots through ranks 1–20. It matches D8's list:grown(300)andgrown(600)at 36,36, seed 7): the Classic tower step is 11 on main and 11 on the head for both. 17 of 19 and 20 of 22 buildings draw the server's pick.Draw checks
The bench, the renders and the bundles below are of
4456bad. The head1a5f2a2changes only city-layers.test.ts over it: vite builds of mock/shore.html, mock/map.html, mock/wrecks.html and mock/cities.html fromgit archivetrees of both heads give byte-identical dists, so these figures hold for the head. Review run 810's own bench at4456bad(8 arms, 840 pages) matched these calls and triangles, with D10 paired head − base default −0.003 / +0.000 / +0.000 ms and full +0.003 / −0.003 / −0.013 ms.Map Yard bench (src/bench/map.ts), every arm with
?finish=0, 8 arms in onemap.ts 7 …call per session, 5 sessions × 7 runs (840 pages, 07:37–08:18 on s32). Base9d318ecand head4456badwere built fromgit archivetrees and served with vitepreview().Calls and triangles per arm (1× · 0.5× · 0.25×):
grown=fullgrown=fulldoom=battledoom=battle&sparedoom=nukedoom=nuke&spareD10, head − base, paired median (same session, run and view), with the phone estimate (7.5×) and map.ts's pooled medians:
grown=fullCalls are the base's at every view and growth. Every paired median is within D10's +0.05 ms.
The head's doom peaks against their spare arms (paired): battle +0.087 / +0.103 / +0.080 ms, nuke +0.103 / +0.107 / +0.107 ms at 1×, 0.5× and 0.25×.
While the bench ran, other projects' runs 782, 787, 788, 790 and 791 started on s32. A single-core
sxbuild ran at about 95%, and two Android emulators ran, throughout.Renders for the Reviewer
Attached to #3791:
3791-classic-rank-line.png: the Wreck Yard'srankupscene in Classic at&zoom=3, frame −0.1 at&rank=1through&rank=19, then frame 1.2 of&rank=19. That is the watched plot's line through ranks 1–20: building-i, solar-panel-portrait, solar-panel-portrait-group, solar-panel-landscape-group, windmill-low, windmill, then the buildings. Every page drew its 2 frames, added no program and threw no error.grown=full, under reduced motion (3791-map-*.png).3791-crop-1-city.png: the 1× city at the east, base then head at default growth, then base then head grown out. At default growth the base's water tower stands as a windmill on the head. Grown out, several plots draw other buildings.Play
The esbuild bundles of src/ai/sim.ts (30ac6bf5…) and src/bench/net.ts (9178cad1…) are byte-identical between base and head, so the AI matches and
npm run benchwere not run.Gates
sak-gate fast(tracker gate run 446) on1a5f2a2: passed,npm test1008/1008.sak-gate full(tracker gate run 448) on1a5f2a2, clean tree: passed,npm test1008/1008 andtest:phone182/182.4456bad:fast(tracker gate run 424) passed 1007/1007, andfull(tracker gate run 431) passed,npm test1007/1007 andtest:phone182/182.