XR · function
chooseLayer
Build the layer this session and these sources allow.
Explained in XR.
function chooseLayer(session: XrSession, sources: LayerSources): XrLayerimport { chooseLayer } from '@driftengine/xr';Parameters
| Parameter | Type | Description |
|---|---|---|
session | XrSession | |
sources | LayerSources |
In depth
Never throws. It is called at the moment a session starts, which is a moment a consumer is
showing a user something, and AGENTS.md's rule about not throwing in a frame loop is the same
rule one step earlier: a session that cannot draw should say so and leave the page alive.