Class: UixWindowHost
Defined in: xrblocks-uiextensions/src/host.ts:182
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.
Implements
Constructors
Constructor
new UixWindowHost(options: UixWindowHostOptions): UixWindowHost;
Defined in: xrblocks-uiextensions/src/host.ts:200
Parameters
| Parameter | Type |
|---|---|
options | UixWindowHostOptions |
Returns
UixWindowHost
Properties
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
manager | readonly | WindowManager | undefined | - | xrblocks-uiextensions/src/host.ts:185 |
regions | readonly | RegionRegistry | undefined | - | xrblocks-uiextensions/src/host.ts:186 |
supportsStandalonePanels | readonly | boolean | true | Bare panels work here - the host does not own a panel lifecycle. | xrblocks-uiextensions/src/host.ts:184 |
Methods
createPanel()
createPanel(configJson: unknown): UixPanelDocument;
Defined in: xrblocks-uiextensions/src/host.ts:262
PanelHost - bare panel, unmanaged (used by devtools and tests). Always
available here, which is what supportsStandalonePanels reports.
Parameters
| Parameter | Type |
|---|---|
configJson | unknown |
Returns
Implementation of
createRegion()
createRegion(options: CreateRegionOptions): RegionHandle;
Defined in: xrblocks-uiextensions/src/host.ts:344
Create a dock region anchored in the scene.
Parameters
| Parameter | Type |
|---|---|
options | CreateRegionOptions |
Returns
createWindow()
createWindow(options: CreateWindowOptions): XrBlocksWindowHandle;
Defined in: xrblocks-uiextensions/src/host.ts:425
Spawn a managed window from compiled UIKitML JSON.
Parameters
| Parameter | Type |
|---|---|
options | CreateWindowOptions |
Returns
dock()
dock(windowId: string, regionId: string | undefined): void;
Defined in: xrblocks-uiextensions/src/host.ts:373
Dock a window into a region (or undock it with undefined). A thin
forwarder to the manager, kept so existing callers read the same;
manager.dockTo / manager.undock are the portable calls.
Parameters
| Parameter | Type |
|---|---|
windowId | string |
regionId | string | undefined |
Returns
void
onPanelReady()
onPanelReady(listener: (event: PanelReadyEvent) => void): () => void;
Defined in: xrblocks-uiextensions/src/host.ts:270
Observe panel readiness. Windows already live are replayed immediately, so wiring code never races window creation.
Parameters
| Parameter | Type |
|---|---|
listener | (event: PanelReadyEvent) => void |
Returns
() => void
Implementation of
region()
region(id: string): RegionHandle | undefined;
Defined in: xrblocks-uiextensions/src/host.ts:364
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
RegionHandle | undefined
spawnRegion()
spawnRegion(region: SceneRegion): void;
Defined in: xrblocks-uiextensions/src/host.ts:280
Parameters
| Parameter | Type |
|---|---|
region | SceneRegion |
Returns
void
Implementation of
spawnWindow()
spawnWindow(window: SceneWindow): void;
Defined in: xrblocks-uiextensions/src/host.ts:303
Scene descriptors carry config PATHS; this resolves the path and spawns the window when it arrives. Fire-and-forget by design - subscribe with onPanelReady to wire behaviour once the panel exists.
Parameters
| Parameter | Type |
|---|---|
window | SceneWindow |
Returns
void
Implementation of
update()
update(deltaSeconds: number): void;
Defined in: xrblocks-uiextensions/src/host.ts:512
Drive per-frame from the engine loop (delta in SECONDS).
Parameters
| Parameter | Type |
|---|---|
deltaSeconds | number |
Returns
void
window()
window(id: string):
| XrBlocksWindowHandle
| undefined;
Defined in: xrblocks-uiextensions/src/host.ts:507
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
| XrBlocksWindowHandle
| undefined