mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Read the camera verbs' and voice actions' canvas from the renderer
The camera verbs size their keyhole fit by the renderer's canvas and listen on it for the user's input, and the voice actions size their view samples by it, rather than reaching through `viewer.scene`; a viewer with no renderer bound answers with its own canvas, the same element. The test fakes give their viewers a canvas, and a fake camera binding's renderer reports the fake viewer's.
This commit is contained in:
1 parent
20fdfd492e
commit
b47aa5f3de
14 files changed
+46
-9
No files matched your search
@@ -57,6 +57,9 @@ test('real runner and facade use visual settings, preserve visibility and return
|
||||
camera: { moveEnd: { addEventListener() {} } },
|
||||
clock: { onTick: { addEventListener: () => () => {} } },
|
||||
scene: { canvas: new EventTarget() },
|
||||
get canvas() {
|
||||
return this.scene.canvas;
|
||||
},
|
||||
};
|
||||
try {
|
||||
const runner = createGevActionRunner({ styleManager: owner, viewer, dataManager: {} });
|
||||
|
||||
@@ -254,6 +254,7 @@ test('Display and voice HUD routes preserve explicit Cyber entry and exit author
|
||||
const viewer = {
|
||||
camera: { moveEnd: { addEventListener() {} } },
|
||||
clock: { onTick: { addEventListener: () => () => {} } },
|
||||
canvas: eventSource,
|
||||
scene: { canvas: eventSource },
|
||||
};
|
||||
const runVoiceAction = createGevActionRunner({
|
||||
|
||||
Reference in new issue
Block a user