mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Read the canvas from the renderer in the layers, voice and tools
Files off the Cesium list sized themselves by, listened on and set the cursor of `viewer.scene.canvas`. They now read `canvasOf(viewer)` from src/render/rendererOf.js: the bound renderer's canvas, else the viewer's own, the same element. Recent Imagery's divider moves the split through the globe port (`globeSplitTarget`, moved from the flood event into src/ui/imagerySplit.js), and traffic flow passes the viewer to the listed surface module (`viewerRoadSurface`) instead of reaching for its scene. The test fakes give their viewers a canvas, and the fake renderers report it, as the Cesium renderer reports the viewer's.
This commit is contained in:
1 parent
abe9f97768
commit
b19fa56565
49 files changed
+269
-119
No files matched your search
@@ -80,7 +80,7 @@ test('superseding a stalled pass aborts promptly without clearing newer loading'
|
||||
// and the near plane, and window positions from the scene itself.
|
||||
const ANGLE = 35 * Math.PI / 180;
|
||||
function portView(scene) {
|
||||
const viewer = { scene };
|
||||
const viewer = { scene, canvas: scene.canvas };
|
||||
const position = { x: 0, y: 0, z: 450 };
|
||||
const direction = { x: 0, y: Math.cos(ANGLE), z: -Math.sin(ANGLE) };
|
||||
bindRenderer(viewer, {
|
||||
@@ -213,6 +213,9 @@ function flowFixture(source) {
|
||||
_roadMode: 'osm',
|
||||
_parseRoads: (data) => data.roads,
|
||||
_viewer: {
|
||||
get canvas() {
|
||||
return this.scene?.canvas;
|
||||
},
|
||||
scene: {
|
||||
globe: {
|
||||
show: true,
|
||||
|
||||
Reference in new issue
Block a user