API reference

createWindowScene Function

Creates the Window initializer passed to <SpatialSceneProvider>. Use fallback to choose the default presentation for windows that are not spatial. An individual <SpatialWindow> can override that default. The optional retry policy is fixed when the provider mounts.
import {SpatialSceneProvider} from '@metavr/layout-compat';
import {createWindowScene} from '@metavr/layout-window-compat';

const windowScene = createWindowScene({
  fallback: 'inline',
  retryConfig: {attempts: 5, holdoffMs: 250},
});

<SpatialSceneProvider initializer={windowScene}>
  <App />
</SpatialSceneProvider>

Signature

createWindowScene(options?: Readonly<{
    fallback?: SpatialWindowFallback;
    retryConfig?: Readonly<{
        attempts?: number;
        holdoffMs?: number;
    }>;
}>): WindowSceneInitializer

Parameters

options: Readonly<{ fallback?: SpatialWindowFallback; retryConfig?: Readonly<{ attempts?: number; holdoffMs?: number; }>; }>

Returns