THREE.JS / FOUNDATIONS 164

Flat or wrapped?

Compare a flat quad layer with a curved cylinder layer. Each has its own render callback and fallback proxy, while the XR manager decides whether a real session can promote them to native layers.

Initializing Preparing renderer

Preparing one quad layer, one cylinder layer, two independent layer scenes, and the desktop fallback proxies...

session
-
layers
-
native
-
renderLayers
-
quad frames
-
cylinder frames
-
draw calls
-
Topology controlsdesktop fallback

Both layer callbacks continue to render even when a proxy is hidden; visibility only affects the ordinary desktop scene mesh.

Geometry contractfixed at creation
quad2.10 × 1.30 world units
cylinderr 1.15 · 103° · 1.60:1
target size640 × 400 px each

The topology and pixel dimensions are passed when the layer is created. Content animation belongs in each layer's render callback.

Real session entry pointprobing

The official helper requests immersive-vr with local-floor and layers. A device must grant the feature before either proxy can become native.

Native promotion boundaryprobing
WebXR API-
immersive VR support-
renderer.xr.enabled-
enabled features-
binding-

Outside XR, both callbacks render into emulated XRRenderTargets. Native bindings and XRFrame timing are session-owned.

Use ?forceWebGL=1 to inspect the WebGL2 companion. This comparison intentionally distinguishes fallback geometry from physical native-layer evidence.

THREE.JS FOUNDATIONS LAB