Hand the application the renderer's own engine

An application may draw with a renderer's engine directly beside the
contract. ApplicationHooks gains engine, whose kind names the engine;
Cesium's plugin hands {kind: 'cesium', viewer}. An application draws only
with engines whose kind it knows, and what it draws is its own to add,
update and remove.
This commit is contained in:
Sameh Khamis committed 2026-11-17 22:19:21 -08:00
1 parent 96fac711f4
commit 0e6973e0b2
5 files changed
+21 -1

No files matched your search

+8
View File
@@ -58,6 +58,14 @@ export interface ApplicationHooks {
viewerDrawsEntity?(entity: unknown): boolean;
/** Values QA scripts read from the page's debug handle. */
qaHandles?: Readonly<Record<string, unknown>>;
/**
* The renderer's own engine, for an application that draws with it
* directly beside the contract: `kind` names the engine (`'cesium'` for
* Cesium, whose `Cesium.Viewer` is `viewer`) and the rest is that engine's
* own. An application draws only with engines whose kind it knows, and
* whatever it draws there is its own to add, update and remove.
*/
engine?: Readonly<{ kind: string; [key: string]: unknown }>;
/**
* Show a recoverable notice when the renderer stops drawing (an error, a
* lost context), with Retry and, if `allowReload`, Reset, by publishing it