THREE.JS / FOUNDATIONS 323

A layer can need a redraw.

Model the WebXR composition-layer lifecycle without pretending a desktop browser owns a native compositor: dirty source, session redraw, resource loss, recovery upload, destroy, and rejected post-destroy work.

Initializing Preparing WebGL2

Preparing a desktop WebGL2 mirror of one composition layer...

layer
-
source gen
-
dest gen
-
needs redraw
-
uploads
-
losses
-
invalid ops
-
frames
-
Lifecycle harnessdesktop mirror

A frame clears needsRedraw only after the destination exists and the source has been uploaded.

Desktop mirrorsynthetic state
state pathcreated
local destinationpending
last readbacknot run
destroy behaviorpending

The local texture stands in for a desktop destination only. Native XR sub-images are opaque, frame-scoped, and never exposed by this mirror.

Native boundaryhardware gated
WebXR API-
immersive VR support-
XRManager sessionnot requested
native bindingnot available
native redraw eventnot observed

The official Layers path requires an immersive session, binding, XR frame, and compositor-owned layer. None is inferred from this desktop run.

This route intentionally stays on WebGL2. It is an application-owned lifecycle mirror, not native XR layer evidence and not a universal WebGPU/WebGL fallback.

THREE.JS FOUNDATIONS LAB