Skip to main content

type

During the initialization phase of a Spatial Scene, you can set the scene type.

Availability​

ItemValue
Applies toAll Spatial Scenes.
New scenesSet through initScene before calling window.open(...).
Start sceneSet through the Web App Manifest.
Default value"window"

Type Signature​

"window" | "volume"

Examples​

Using initScene​

Set the type for a new scene
import { initScene } from "@webspatial/react-sdk";

initScene("newSceneName", defaultConfig => {
return {
...defaultConfig,
type: "volume",
};
});
window.open(newSceneUrl, "newSceneName");

Using the Web App Manifest​

Set the type for the start scene
{
"name": "example app",
"start_url": "/",
"xr_main_scene": {
"type": "volume"
}
}

Default Value​

"window"

Accepted Values​

ValueMeaning
"window"Primarily serves GUI needs.
"volume"Simulates a real-world object.