feat(app): voice on the Navara engine

createViewerlessTools creates the voice commands with viewer: null on the
engine (tools.js passes it the voice options and place search), so
window.__gevVoiceCommands exists in ?engine=navara: the W1 tools drive the
engine and the viewer-only tools answer UNAVAILABLE_ON_ENGINE. The Cesium
path hands its engine to initGevVoiceCommands explicitly.

viewerlessTools.test.mjs: the Navara tools now return voice commands
(created without DOM through injected control and session stand-ins),
whose runner answers get_current_view_state on the engine and refuses
control_scene; the debug handle carries them and teardown removes them.
This commit is contained in:
German Khokhlov committed 2026-10-16 22:52:21 +04:00
1 parent bc281ab246
commit 18b5475b8a
3 files changed
+74 -12

No files matched your search

+6 -2
View File
@@ -17,8 +17,9 @@ import {
/**
* Attach scene tools, rendering listeners and the application debug handle.
* Without a viewer (the experimental Navara engine) the viewer-bound tools
* (director, annotations, drawing, imagery box, scope mask, tracking, voice,
* embedded views) are not created; their handles are null.
* (director, annotations, drawing, imagery box, scope mask, tracking,
* embedded views) are not created; their handles are null. Voice runs on
* the engine there (src/app/navaraMode.js).
*/
export function createApplicationTools({
scene,
@@ -44,6 +45,8 @@ export function createApplicationTools({
controls,
data,
loadingScreen,
placeSearch,
voice,
startChrome,
signal,
defer,
@@ -189,6 +192,7 @@ export function createApplicationTools({
signal,
placeSearch,
viewer,
engine,
styleManager,
dataManager,
sceneDirector,