XR Actions
os.disableAR(): EnableARAction
Disables augmented reality on the device.
When disabled,
@onExitARshout is sent to all bots.Examples
Disable AR.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
@onEnterARshout 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
Enable AR.os.enableAR();Enable AR running at half the resolution of normal.os.enableAR({
frameBufferScaleFactor: 0.5
});os.disableVR(): EnableVRAction
Disables virtual reality on the device.
When disabled,
@onExitVRshout is sent to all bots.Examples
Disable VR.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
@onEnterVRshout 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
Enable VR.os.enableVR();Enable VR running at half the resolution of normal.os.enableVR({
frameBufferScaleFactor: 0.5
});