mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Load the default renderer as the page starts, and follow through the camera port in tests
- The standalone page starts loading the default renderer as it starts (loadDefaultRenderer), so Cesium arrives beside the page's own setup, not after it; the scene takes a plugin or a promise of one. - Where a follow target's layer has no display position yet, the followed position is the target's own position at the frame port's scene time. - The globe engine's photoreal base that fails to come back is off again and the globe shown; a later switch tries again. The draped-imagery host asks the map engine whether the globe is shown where the renderer cannot say. The scene resizes the renderer with its container. - Cockpit and voice tests follow through the camera port (followEntity), not by setting the viewer's tracked entity; the fake frame port has a scene time.
This commit is contained in:
1 parent
6daf63d90c
commit
ae4fbb5053
21 files changed
+328
-87
No files matched your search
@@ -2,7 +2,7 @@ import { createStandaloneCatalog } from './catalog.js';
|
||||
import { createStandalonePlaceSearch } from './placeSearch.js';
|
||||
import { CITY_POIS } from '../cityPois.js';
|
||||
import { createApplication } from '../app/application.js';
|
||||
import { createStandaloneScene } from './scene.js';
|
||||
import { createStandaloneScene, loadDefaultRenderer } from './scene.js';
|
||||
import { createStandaloneControls } from './controls.js';
|
||||
import { createStandaloneData } from './data.js';
|
||||
import { createStandaloneTools } from './tools.js';
|
||||
@@ -36,6 +36,8 @@ export function createStandaloneApplication({
|
||||
if (constructed)
|
||||
throw new Error('The standalone application already owns this page');
|
||||
constructed = true;
|
||||
// The default renderer starts loading now, beside the page's own setup.
|
||||
const rendererPlugin = renderer ?? loadDefaultRenderer();
|
||||
// Locale is resolved before any UI initialization so <html lang>/<html dir>
|
||||
// and every catalog lookup agree from the first painted frame. Module
|
||||
// scripts execute after parsing, so the DOM is ready here: the views
|
||||
@@ -72,7 +74,7 @@ export function createStandaloneApplication({
|
||||
const scene = await createStandaloneScene({
|
||||
...context,
|
||||
// The renderer plugin; the default (Cesium) when none is given.
|
||||
renderer,
|
||||
renderer: rendererPlugin,
|
||||
googleApiKey,
|
||||
// Without a key, Google 3D can still load with tokens from the
|
||||
// app's server when it offers them.
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { createApplicationScene } from '../app/scene.js';
|
||||
import { createApplicationScene, loadDefaultRenderer } from '../app/scene.js';
|
||||
import { createApplicationRequestServices } from '../services/requests.js';
|
||||
/** The default renderer plugin, loading from the first call (`app/scene.js`). */
|
||||
export { loadDefaultRenderer };
|
||||
|
||||
/** Supply standalone request services when directly constructing a scene. */
|
||||
export function createStandaloneScene(options) {
|
||||
return createApplicationScene({
|
||||
|
||||
Reference in new issue
Block a user