XR Actions
os.arSupported(): Promise<boolean>
Gets whether this device supports AR or not.
Returns a promise that resolves with a boolean indicating wether or not augmented reality is supported by the device.
Examples
const supported = await os.arSupported();
os.disableAR(): EnableARAction
Disables augmented reality on the device.
When disabled, @onExitAR
shout is sent to all bots.
Examples
os.disableAR();
os.enableAR(options?: EnableXROptions): EnableARAction
Enables augmented reality on the device.
You can check for device support by calling os.arSupported()
.
If enabled successfully, the @onEnterAR
shout is sent to all bots.
The first parameter is optional and is a EnableXROptions and is the options that should be used for the AR session.
Examples
os.enableAR();
os.enableAR({
frameBufferScaleFactor: 0.5
});
os.disableVR(): EnableVRAction
Disables virtual reality on the device.
When disabled, @onExitVR
shout is sent to all bots.
Examples
os.disableVR();
os.enableVR(options?: EnableXROptions): EnableVRAction
Enables virtual reality on the device.
You can check for device support by calling os.vrSupported()
.
If enabled successfully, the @onEnterVR
shout is sent to all bots.
The first parameter is optional and is a EnableXROptions and is the options that should be used for the VR session.
Examples
os.enableVR();
os.enableVR({
frameBufferScaleFactor: 0.5
});
os.vrSupported(): Promise<boolean>
Gets whether this device supports VR or not.
Returns a promise that resolves with a boolean indicating wether or not virtual reality is supported by the device.
Examples
const supported = await os.vrSupported();