fix(scene): land the opening crane before a sign can latch its placement
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user