A Boomtown model swaps in place through a cross-fade under reduced motion and on a tower's step down #146
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3790-a-boomtown-model-swaps-in-place-through"
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: #3790
Step 4 of plan #3561. Under reduced motion every re-model of a drawn Boomtown building or monument now swaps in place by a cross-fade over FADE_SECONDS (0.3 s) through the fade program. With motion, a re-model to a model no taller than the version that stands takes the same cross-fade, which is a monument tower's step down (D7, D11). The version that fades in becomes the placement's remembered version at full height, so the step up that follows a step down grows from the lower tower (D6).
What changes
swaps). When a building or monument is re-modelled in a batch its city draws in view, its old model's instances stay in that batch and fade out by a group slot drawing every key before and none after, as the reduced-motion fall fades, with no rubble. Its new model's instances fade in by a second slot, drawing none before and every key after, so the two screen doors are complementary. Both slots start on the cross-fade's first frame. The batches draw with the fade program meanwhile. After FADE_SECONDS the old instances leave, the new ones draw by the city's group slot again, and both slots are released.modelHeight(old) × riseScale); no rank-up makes one, but a tower's step down does. Every other re-model grows as in step 3. Street pieces still swap at once.clock − RISE_SECONDS,from0), so a re-model that follows, during the fade or after it, grows or fades from it.begin's stand-at-once, as before. With motion,beginRisesstands a placement whose model is no taller than its remembered version's height at once instead of rising it from its base. Both are remembered at full height.growFrombecomesreachedBy, the height the remembered version stands at, whichplaceandbeginRisescompare with the new model's height.towerscene. It takes the record's last growth step that steps the monument's tower up (&step=up, the default) or down (&step=down), by Boomtown's body heights andtowerStep, and throws when the record holds none. It stages the held city at the layout before that step, before the host's first push, and clears the trees of the layout after it. At the death's time its cue installs the layout after that step and syncs the game's blocks, as therankupcue does. It focuses on the monument and publishesdata-tower,{ before, after }.step=downscene would throw.Tests
keepshelper, exactly one of the two keeps each of the 16 Bayer cells, and the old keeps 16 − round(16 t / 0.3). Both stand at scale 1, and no cage stands over the plot. At FADE_SECONDS the old instance is gone, the new one is the placement's only instance, draws by its group's slot through the plain program at its full height, and both fade slots are among the released ones.grown(16)untilstepOffalls (bound 20 growth steps) and then until it rises (bound 10), and the test fails if either step does not come. On the families the city steps 12 → 10 at growth step 26 and 10 → 12 at step 29, the same steps as with main's looks at their target heights.towerHeight(10), and both slots are released.towerHeight(10)to 1e-4 tiles, with a cage. It never drops below that height, and climbs totowerHeight(12)at 0.68 s.towerHeight(10)to 1e-4 tiles, with a cage, as the placement's only instance.towerscene with&step=upand&step=downin every finish, with and without reduced motion (16 loads, 36 s), beside step 3'srankupcheck.data-towermoves as the scene names, and no load shows a WebGL or shader error or adds a program from before the cue to the scene's end.beginRisesrising a no-taller re-model from its base with a cage), fails the step-down test (no fade program at 0 s) and the step-up-during-fade test.Renders for the Reviewer
Wreck Yard pages from a vite build of the head, 520 × 360 per frame. Each listed page drew with no page error and added no program. Each is attached to #3790 as a strip of its frames (files 713–736), with crops around the watched tower.
?mode=frames&scene=rankup&frames=-0.1,0.05,0.1,0.15,0.2,0.3,0.6&zoom=3, reduced motion (files 713, 714, 716, 717, crop 715):?mode=frames&scene=tower&step=up&frames=-0.1,0.02,0.2,0.45,0.7,1.2&zoom=2, with motion,data-tower18 → 20 (files 731–735): in the three Boomtown finishes the new tower stands at the old height under its cage on the 0.02 frame and climbs to its own by 0.7 s, the growth of step 3. Classic swaps at once.?mode=frames&scene=tower&step=down&frames=-0.1,0.05,0.1,0.15,0.2,0.3,0.6&zoom=2,data-tower20 → 18, with motion (files 718–721, 727–730, 736) and under reduced motion (files 722–726): in the three Boomtown finishes the taller crown dithers out over 0.1–0.2 s and the lower tower stands from 0.3 s, at full height throughout, with no cage. Classic swaps at once at 0.05 s.Draw checks
The swap draws only during a re-model, so the game draws as before at rest; the bench was not run for that reason. One load per arm, view and finish of the Map Yard (
?bench&view=…&finish=…[&grown=full], WebKit, iPhone 15 landscape), base776e4b6against head1bf3464, both built fromgit archivetrees:Play
The esbuild bundles of src/ai/sim.ts and src/bench/net.ts from the base
776e4b6and the head are byte-identical (sim a3c510e5…, net 4ffd0007…), so the 14 AI matches andnpm run benchwere not run.Review
a0f3263drops the placement'sgrowsflag. A cross-fade now begins for any re-model that has not risen, tested byplacement.rise !== nullalone, because only a building or a monument is ever re-modelled unrisen. Every other placement is put built, and a rider is made risen. The flag never decided the branch, so the renders, draw checks and bundles above, made at1bf3464, still hold.Gates
sak-gate fast(tracker gate run 407) on1bf3464: passed,npm test1005/1005.sak-gate full(tracker gate run 408) on1bf3464: passed,npm test1005/1005 andtest:phone182/182, thetowerphone check included.sak-gate fast(tracker gate run 416) ona0f3263: passed,npm test1005/1005.sak-gate full(tracker gate run 417) ona0f3263: passed,npm test1005/1005 andtest:phone182/182.changelog.md and the in-game help are step 6's, for the whole plan.