Stories: Play resumes at the exact paused or sought moment

startScene takes fromProgress and starts partway into a shot: the camera
goes on along the rest of the flight, the hold waits only what is left
and the scene clock carries on from the same point.
This commit is contained in:
Sameh Khamis committed 2026-11-16 13:24:59 -08:00
1 parent fec84dbf78
commit 8734f5e515
11 files changed
+341 -45

No files matched your search

+5 -5
View File
@@ -727,11 +727,11 @@ a story played puts AUTHORING's own selection back (usually none);
Open in GEV leaves the story's scene selected there. Entering Stories
cancels in-flight Authoring work before it captures the view it will
restore. Dragging the timeline previews the time, and releasing
it seeks the globe once. A paused link in the
final quarter-second retains its final shot on Play instead of restarting
at the first shot. A scene that has actually ended still replays from the
beginning; SceneDirector resumes from the shot boundary, not a fractional
position inside a shot.
it seeks the globe once. Play after a pause, a seek or a paused link goes on
from that exact moment (`SceneDirector.startScene` with `fromProgress`), even
inside a shot or its final quarter-second: the camera, the hold and the scene
clock carry on from there. A scene that has actually ended replays from the
beginning.
Opening Stories claims the camera through the shared navigation policy, so
orbit, a tracked contact or a flight end, and Cockpit refuses with the
+10 -2
View File
@@ -17,7 +17,9 @@ file sharing, along with the remaining extensions.
The runner imports no renderer, UI, storage, recipe or dataset. An adapter supplies
these phases, in order: `selectShot`, `applyVisual`, `applyLayers`, `travel`,
`settle`, `hold`, `completeShot`. Each receives `{ scene, shot, index, total,
token }`. It also supplies `releaseScene(scene, token?)` and optionally `complete()`.
token, resume }`, where `resume` is the queue item's own (null unless the queue
starts partway into its first shot). It also supplies `releaseScene(scene, token?)`
and optionally `complete()`.
Callbacks may return promises. Each playback invocation requires its own adapter
state and token; the caller owns camera arbitration and concurrent-run refusal.
@@ -32,7 +34,13 @@ acquire no resources. This low-level API expects normalized scene objects;
untrusted file validation belongs at the import boundary.
`src/scenes/playbackAdapter.js` connects this runner to the existing
`SceneDirector`. The latter still owns editor state, saved-project import/export,
`SceneDirector`. `startScene(sceneId, { fromProgress })` starts a run at a
point of the scene's clock: the queue begins with the shot that point falls in,
carrying that point's seek state as `resume`. Inside the shot's flight the camera
goes on from there along the rest of the path a seek samples, over the rest of the
flight; inside its hold, the layers take that moment's state as a seek gives them
(a clip playing at that moment is not started again) and only the rest of the
hold is waited out. The scene clock carries on from the same point. `SceneDirector` still owns editor state, saved-project import/export,
camera ownership and asynchronous load/seek arbitration. Pure seek calculations
live in `src/director/timeline.js`; `src/director/clock.js` owns the run/load/shot
tickers, hold deadlines, snapshots and clock subscriptions. Stop settles pending