polish: time the scene payoffs to the gaps between cards
One shared window (journey/card-gaps.ts, CARD_GAP) describes the open road after each chapter's panel in section-local progress; the district relight and cutover, the last yard lift and the relay station's beams now key off it instead of their own numbers, and the chapter margin widens from 44vh to 48vh so the gap reads as a stretch of road. Unit tests prove every payoff's peak sits inside the window for every chapter span.
This commit is contained in:
@@ -57,8 +57,8 @@ describe('the 03:12 window timeline', () => {
|
||||
expect(maintenanceTimeline(0.1).packetPhase).toBe(0);
|
||||
expect(maintenanceTimeline(0.36).packetPhase).toBe(1);
|
||||
expect(maintenanceTimeline(0.6).packetPhase).toBe(1);
|
||||
expect(maintenanceTimeline(0.66).packetPhase).toBe(1);
|
||||
expect(maintenanceTimeline(0.89).packetPhase).toBe(2);
|
||||
expect(maintenanceTimeline(0.65).packetPhase).toBe(1);
|
||||
expect(maintenanceTimeline(0.9).packetPhase).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -111,8 +111,8 @@ describe('maintenance window meshes', () => {
|
||||
it('drops rain, packets and lightning on the lite tier but keeps the power-down', () => {
|
||||
const resources = new SceneResourceBag();
|
||||
const window = createMaintenanceWindow(resources);
|
||||
let state = window.update(0.5, 1, 0.016, 'lite');
|
||||
for (let i = 0; i < 200; i += 1) state = window.update(0.5, 1, 0.05, 'lite');
|
||||
let state = window.update(0.95, 1, 0.016, 'lite');
|
||||
for (let i = 0; i < 200; i += 1) state = window.update(0.95, 1, 0.05, 'lite');
|
||||
expect(state.rain).toBe(0);
|
||||
expect(state.flash).toBe(0);
|
||||
expect(state.lightning).toBe(0);
|
||||
|
||||
Reference in New Issue
Block a user