mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Reach the canvas through canvasOf, not the viewer
Every file that read the renderer's canvas as rendererOf(viewer)?.canvas falling back to viewer.canvas, and the share restoration's gesture listeners on viewer.canvas, now ask canvasOf(viewer). The 20 canvas reach-throughs leave the viewer access record.
This commit is contained in:
1 parent
73735b080a
commit
ebbe006924
13 files changed
+30
-43
No files matched your search
+1
-4
@@ -71,9 +71,9 @@ import { eyeMoved, eyeRotatedAbout, eyeTurned } from './geo/eyeMoves.js';
|
||||
import { heightsOf } from './queries/heights.js';
|
||||
import {
|
||||
cameraOf,
|
||||
canvasOf,
|
||||
findCamera,
|
||||
findFrame,
|
||||
rendererOf,
|
||||
} from './render/rendererOf.js';
|
||||
|
||||
let _isCockpitActive = null;
|
||||
@@ -1613,9 +1613,6 @@ function liveView(camera, pose = camera.pose()) {
|
||||
return { ...pose, projection, live: true };
|
||||
}
|
||||
|
||||
/** The canvas the renderer draws in (the viewer's own when none is bound). */
|
||||
const canvasOf = (viewer) => rendererOf(viewer)?.canvas ?? viewer.canvas;
|
||||
|
||||
/**
|
||||
* Whether a projection is a perspective one centred on the view: what the
|
||||
* keyhole cone below assumes. Column-major, so element 11 is row 3 of
|
||||
|
||||
Reference in new issue
Block a user