mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Stories: reach the globe through the renderer's ports
Main now keeps Cesium behind the renderer contract, so Stories stops reaching Cesium and the viewer directly. - Camera: flights, the -60 degree story framing, cancel, the pose saved on open and put back on Close go through the camera port; a follow is released with stopFollowing. - Pins: placed in the frame port's postRender from the query port's projection and horizon test, still written straight to each pin's transform on every drawn frame. - Tile settling: a continuous-render hold until the globe port reports the base settled, for at most 10 s. - Clock: Close and Back to Explore put back the page's world clock (live, or the time it showed, playing on), and leave a clock that is still where it should be alone. - Card images: drawn from Esri World Imagery's own Web Mercator tiles while the Esri map stack is active, read as images; no Cesium imagery provider is touched. - THUMBNAIL: the director hands captureStoryThumb the frame port and the renderer's canvas, so the scene document's module stays renderer-free. - Credits: Stories places and keeps visible the application's credit line (#gev-credits) and its list as well as the renderer's own display. - Tests fake the ports instead of a Cesium viewer, and cover pins per frame, the flights, the settling bound and the clock restore; the share link tests Stories added build their manager over a camera port.
This commit is contained in:
1 parent
9e9ce1db22
commit
b8e622aac8
15 files changed
+695
-376
No files matched your search
@@ -143,7 +143,7 @@ test("the app's own hash writes never trigger a restore", (t) => {
|
||||
|
||||
test('restore applies a hash even when the address already shows it', (t) => {
|
||||
installTab(t, SHARE_A);
|
||||
const manager = new ShareLinkManager(fakeViewer());
|
||||
const manager = new ShareLinkManager(bindFakeCesiumCamera(fakeViewer()));
|
||||
manager.completeInitialRestore(manager.parseInitialHash().restoreToken);
|
||||
const restored = [];
|
||||
manager.watchNavigation((state) => restored.push(state));
|
||||
@@ -158,7 +158,7 @@ test('restore applies a hash even when the address already shows it', (t) => {
|
||||
test('holding writes first writes a view change still waiting for its debounce', (t) => {
|
||||
installTab(t, SHARE_A);
|
||||
const timers = installManualTimers(t);
|
||||
const manager = new ShareLinkManager(fakeViewer());
|
||||
const manager = new ShareLinkManager(bindFakeCesiumCamera(fakeViewer()));
|
||||
manager.completeInitialRestore(manager.parseInitialHash().restoreToken);
|
||||
const before = window.location.hash;
|
||||
manager._buildHashParams = () => new URLSearchParams('v=2&lat=5');
|
||||
@@ -187,7 +187,7 @@ test('a hash write keeps the state another owner stored on the entry', (t) => {
|
||||
written.push(state);
|
||||
replace(state, title, next);
|
||||
};
|
||||
const manager = new ShareLinkManager(fakeViewer());
|
||||
const manager = new ShareLinkManager(bindFakeCesiumCamera(fakeViewer()));
|
||||
manager.completeInitialRestore(manager.parseInitialHash().restoreToken);
|
||||
manager._updateHash();
|
||||
assert.deepEqual(written, [{ gevStories: { stories: 'explore', depth: 1 } }]);
|
||||
|
||||
Reference in new issue
Block a user