type
During the initialization phase of a Spatial Scene, you can set the scene type.
Availability
| Item | Value |
|---|---|
| Applies to | All Spatial Scenes. |
| New scenes | Set through initScene before calling window.open(...). |
| Start scene | Set 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
| Value | Meaning |
|---|---|
"window" | Primarily serves GUI needs. |
"volume" | Simulates a real-world object. |