From 664de458683029b260c24f3d5d109f5226bb415e Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Mon, 23 Nov 2026 23:30:33 +0400 Subject: [PATCH] Play the opening 30% faster --- src/app/openingIntro.js | 18 +++++++++--------- src/app/openingIntro.test.mjs | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/app/openingIntro.js b/src/app/openingIntro.js index 2a3117a583..a2fb86b94a 100644 --- a/src/app/openingIntro.js +++ b/src/app/openingIntro.js @@ -11,25 +11,25 @@ import { isEmbedded } from './embed.js'; */ export const OPENING = Object.freeze({ /** The words under the logo fade. */ - textMs: 150, + textMs: 105, /** The logo moves to the centre. */ - centreMs: 900, + centreMs: 630, // The rest is timed from the end of the move. /** The eye grows past the screen's edges. */ - eyeMs: 1100, + eyeMs: 770, /** The drawn planet fades into the real one. */ - pupilMs: Object.freeze([600, 1200]), + pupilMs: Object.freeze([420, 840]), /** The camera's flight starts. */ - flightStartMs: 300, + flightStartMs: 210, /** The globe grows to the whole planet's size. */ - zoomMs: 1600, + zoomMs: 1120, /** It turns there, slowing to a stop over the view it ends at: the turn * starts halfway through the zoom and ends this long after it. */ - spinMs: 2600, + spinMs: 1820, /** Then the camera closes in on a closer view (a shared one), per tenfold * change of height, within `approachMs`. */ - approachPerDecadeMs: 1100, - approachMs: Object.freeze([1200, 4000]), + approachPerDecadeMs: 770, + approachMs: Object.freeze([840, 2800]), /** How far the globe turns, degrees. */ spinDeg: 360, }); diff --git a/src/app/openingIntro.test.mjs b/src/app/openingIntro.test.mjs index bf960f498e..bc13dcfca4 100644 --- a/src/app/openingIntro.test.mjs +++ b/src/app/openingIntro.test.mjs @@ -371,7 +371,9 @@ test("the logo's grid fades from its own opacity", () => { const cage = s.doc.getElementById('globe_cage'); const opening = s.play(); assert.equal(Number(s.window.getComputedStyle(cage).opacity), 0.63); - s.advance(1800); + // Halfway through the drawn planet's fade. + const [from, to] = OPENING.pupilMs; + s.advance(OPENING.centreMs + (from + to) / 2); assert.ok( Math.abs(Number(s.window.getComputedStyle(cage).opacity) - 0.315) < 0.01, );