Interface: WindowHost
Defined in: adapter.ts:143
The engine-agnostic surface an app needs to build a UI: spawn windows and
regions from portable data, observe when panels become wireable, and reach
the shared WindowManager.
Panels load asynchronously on every adapter (IWSDK fetches the config; uikit lays out over following frames), so app code must never assume a panel exists immediately after creating its window. onPanelReady is the portable answer - it replaces engine-specific discovery (ECS queries on IWSDK, polling anywhere else) and fires for panels that became ready before the listener was registered, so wiring order never matters.
Extends
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
supportsStandalonePanels | readonly | boolean | Whether PanelHost.createPanel works on this host. When false the method is not available and throws; spawn a window instead, so the engine owns the panel lifecycle. IWSDK is false, three.js/XR Blocks is true. | adapter.ts:150 |
Methods
createPanel()
createPanel(configJson: unknown): PanelHandle;
Defined in: adapter.ts:105
Create a panel from compiled UIKitML JSON (the { element, classes }
shape produced by the build plugin or by
@realitycollective/uix-devtools' compilePanelSource).
Parameters
| Parameter | Type |
|---|---|
configJson | unknown |
Returns
Inherited from
onPanelReady()
onPanelReady(listener: (event: PanelReadyEvent) => void): () => void;
Defined in: adapter.ts:155
Subscribe to panel readiness. Late subscribers are replayed the windows that are already live. Returns an unsubscribe function.
Parameters
| Parameter | Type |
|---|---|
listener | (event: PanelReadyEvent) => void |
Returns
() => void