Stories: remove unreachable prototype paths

GEV stories never explore, carry no world time and are never live:
drop the resume play state, Jump to live, the exploring branches and
world-time arguments, the overridden play button rules, and the hidden
rail and fill. The legend reads a plain field instead of a mock one.
This commit is contained in:
Sameh Khamis committed 2026-11-16 13:35:05 -08:00
1 parent f4b535d89e
commit 7a0b649bf5
22 files changed
+26 -232

No files matched your search

+1 -1
View File
@@ -184,7 +184,7 @@ function sceneContext(recipe) {
places: own.places ?? [],
moments: own.moments ?? [],
// The layers' own names on the legend.
mock: { legend: layers.map((l) => ['dot', '#6be8ff', l.label]) },
legend: layers.map((l) => ['dot', '#6be8ff', l.label]),
sources: [...(own.sources ?? []), ...layers.flatMap((l) => l.sources)],
// Each part is translated on its own, as shown.
background: own.background ?? layers.map((l) => l.about),
+1 -6
View File
@@ -710,10 +710,8 @@ export function createStoriesController({
function onTick(state) {
store.playback = {
wallMs: state.wallMs,
worldMs: state.worldMs,
durationMs: state.durationMs,
playing: state.playing,
exploring: state.exploring,
chapterIndex: state.chapterIndex,
};
if (state.playing) store.bigPlay = false;
@@ -919,7 +917,7 @@ export function createStoriesController({
id: story.id,
title: story.title,
atMs,
when: anchorStamp(story, atMs, null),
when: anchorStamp(story, atMs),
};
}
@@ -1051,10 +1049,8 @@ export function createStoriesController({
: 0;
store.playback = {
wallMs: atMs,
worldMs: null,
durationMs: story.durationMs,
playing: false,
exploring: false,
chapterIndex: 0,
};
const start = () => {
@@ -1143,7 +1139,6 @@ export function createStoriesController({
play: () => player?.play(),
pause: () => player?.pause(),
seek: (ms) => player?.seek(ms),
resume: () => player?.resume(),
focusEvent: (event) => player?.focus(event),
get kind() {
return player ? 'gev' : null;
-5
View File
@@ -57,10 +57,8 @@ export function createGevPlayer(director, story, hooks = {}) {
const state = () => ({
wallMs,
worldMs: null,
durationMs,
playing,
exploring: false,
chapterIndex: Math.min(shotIndex, story.chapters.length - 1),
});
const tick = () => {
@@ -158,9 +156,6 @@ export function createGevPlayer(director, story, hooks = {}) {
shotIndex = chapterAt(story, wallMs);
seekToCurrentTime(options);
},
resume() {
return this.play();
},
/** A key moment: go to that point of the scene. */
focus(event) {
if (event?.wallMs != null) this.seek(event.wallMs);
+4 -4
View File
@@ -96,7 +96,7 @@ export function topicsOf(stories) {
}
/** The clock overlay: big line and small line. */
export function clockText(s, wallMs, worldMs, chapterIndex) {
export function clockText(s, chapterIndex) {
return {
big: t('Shot {n} of {total}', {
n: chapterIndex + 1,
@@ -133,12 +133,12 @@ export function anchorStamp(s, wallMs) {
/** Legend entries [shape, colour, label]. */
export function layersFor(s) {
if (s.mock?.legend?.length) return s.mock.legend;
if (s.legend?.length) return s.legend;
return (s.tags ?? []).map((tag) => ['dot', '#e8eaed', tag]);
}
/** "Right now" facts per story (prototype nowFacts): [value, label, warn]. */
export function nowFacts(s, worldMs, wallMs = 0) {
/** "Right now" facts per story: [value, label]. */
export function nowFacts(s) {
const out = [[String(s.chapters.length), msg('Shots')]];
if (s.tags?.length) out.push([String(s.tags.length), msg('Layers on')]);
return out;