API

Interface VRExperienceHelperOptions

Options to modify the vr experience helper's behavior.

interface VRExperienceHelperOptions {
    createDeviceOrientationCamera?: boolean;
    createFallbackVRDeviceOrientationFreeCamera?: boolean;
    floorMeshes?: Mesh[];
    laserToggle?: boolean;
    useXR?: boolean;
    vrDeviceOrientationCameraMetrics?: VRCameraMetrics;
}
Index
createDeviceOrientationCamera?: boolean

Create a DeviceOrientationCamera to be used as your out of vr camera. (default: true)

createFallbackVRDeviceOrientationFreeCamera?: boolean

Create a VRDeviceOrientationFreeCamera to be used for VR when no external HMD is found. (default: true)

floorMeshes?: Mesh[]

A list of meshes to be used as the teleportation floor. If specified, teleportation will be enabled (default: undefined)

laserToggle?: boolean

Uses the main button on the controller to toggle the laser casted. (default: true)

useXR?: boolean

Defines if WebXR should be used (if available)

vrDeviceOrientationCameraMetrics?: VRCameraMetrics

Distortion metrics for the fallback vrDeviceOrientationCamera (default: VRCameraMetrics.Default)