diff --git a/globe.js b/globe.js index a41048f..72212dc 100644 --- a/globe.js +++ b/globe.js @@ -60,8 +60,17 @@ cardWrap.appendChild(el); return el; }); - // The scroll story needs one viewport of runway per chapter, plus the intro. - document.getElementById("story").style.height = (CHAPTERS.length + 1) * 100 + "vh"; + /* Scroll runway per beat, as a fraction of the viewport. + The original gave each chapter a full viewport, which on a pre-order page + means seven screens of scrolling before the visitor reaches anything they + can buy. Two thirds is enough to read a card and still let the globe travel + a visible distance between chapters — it just gets there sooner. */ + var UNIT = 0.66; + // The sticky pane occupies one viewport that is NOT scroll runway, so the + // travel available is height - 100vh. Sizing this as (n+1)*UNIT left the last + // chapter unreachable — the payoff card peaked at 0.15 opacity and the + // wishes-turn-gold moment never actually landed. + document.getElementById("story").style.height = (100 + CHAPTERS.length * UNIT * 100) + "vh"; var state = { lon: 8, wished: new Set(WISHED), visited: new Set(VISITED) }; var world = null; @@ -105,7 +114,7 @@ /* ── scroll → state ──────────────────────────────────────────────── */ function story_tick() { - var vh = innerHeight; + var vh = innerHeight * UNIT; var rect = story.getBoundingClientRect(); var scrolled = -rect.top; var fx = Math.max(0, Math.min(CHAPTERS.length, scrolled / vh));