From d9cdbbbde2d359ed4a1afd0aaecdb5326964ed17 Mon Sep 17 00:00:00 2001 From: LucaP Date: Sat, 10 Oct 2026 20:43:49 +0300 Subject: [PATCH] fix(scene): land the opening crane before a sign can latch its placement --- src/scene/world/environment.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/scene/world/environment.ts b/src/scene/world/environment.ts index 6d8ad27..64bd198 100644 --- a/src/scene/world/environment.ts +++ b/src/scene/world/environment.ts @@ -522,8 +522,9 @@ export async function createProceduralSceneGeneration( } if (introProgress < 1) { // The shot belongs to a visitor who waits at the top. Once they scroll - // or navigate it lands within about 0.4 s of wall time, so the chase - // framing (and every sign placed against it) is back before arrival. + // or navigate it lands within INTRO_LANDING_SECONDS of wall time: a sign + // latches its placement after its 300 ms anticipation, so the chase + // framing must be back before then. if (snapshot.scrollY > 40 || snapshot.activeSectionId !== 'start') introHurried = true; // A crane that stutters is worse than none: on a device that cannot // hold the shot smoothly, land it straight away. @@ -532,7 +533,7 @@ export async function createProceduralSceneGeneration( introFrames += 1; if (introFrames > 3 && wallSeconds > 0.1) introSlowFrames += 1; if (introSlowFrames >= 3) introHurried = true; - const step = introHurried ? Math.min(0.5, wallSeconds) / 0.4 : deltaSeconds / INTRO_SECONDS; + const step = introHurried ? Math.min(0.5, wallSeconds) / INTRO_LANDING_SECONDS : deltaSeconds / INTRO_SECONDS; introProgress = Math.min(1, introProgress + step); } const crane = easeInOutCubic( @@ -618,6 +619,7 @@ export async function createProceduralSceneGeneration( }; } +const INTRO_LANDING_SECONDS = 0.18; const INTRO_SECONDS = 4.2; function easeInOutCubic(t: number): number {