Skip to content

r3f-xr-widgets / XRLayerSkybox

Function: XRLayerSkybox()

XRLayerSkybox(__namedParameters): Element

Defined in: src/components/XRLayerSkybox.tsx:52

A skybox component that uses XRLayer with equirect shape to create a spherical background that surrounds the viewer.

Uses WebXR's native equirect layer when available, with automatic fallback rendering for non-XR contexts.

Parameters

__namedParameters

XRLayerSkyboxProps

Returns

Element

Example

tsx
// Black skybox (default)
<XRLayerSkybox />

// Custom color skybox
<XRLayerSkybox color="#1a1a2e" />

See

Skybox for a simple mesh-based skybox without XRLayer

Released under the MIT License.