VRExperienceHelper

Description

class VRExperienceHelper

Constructor

new VRExperienceHelper(scene, webVROptions)

Parameters

Name Type Description
scene Scene
optional webVROptions VRExperienceHelperOptions

Members

webVROptions : VRExperienceHelperOptions

onEnteringVR : Observable<VRExperienceHelper>

onExitingVR : Observable<VRExperienceHelper>

onControllerMeshLoaded : Observable<WebVRController>

onNewMeshSelected : Observable<AbstractMesh>

raySelectionPredicate : (mesh: AbstractMesh) => boolean

To be optionaly changed by user to define custom ray selection

Parameters

Name Type Description
mesh AbstractMesh

meshSelectionPredicate : (mesh: AbstractMesh) => boolean

To be optionaly changed by user to define custom selection logic (after ray selection)

Parameters

Name Type Description
mesh AbstractMesh

teleportationTarget : Mesh

displayGaze : boolean

displayLaserPointer : boolean

deviceOrientationCamera : Nullable<DeviceOrientationCamera>

currentVRCamera : Nullable<Camera>

webVRCamera : WebVRFreeCamera

vrDeviceOrientationCamera : Nullable<VRDeviceOrientationFreeCamera>

isInVRMode : boolean

Gets a value indicating if we are currently in VR mode.

position : Vector3

Methods

enterVR() void

Attempt to enter VR. If a headset is connected and ready, will request present on that.

Otherwise, will use the fullscreen API.

exitVR() void

Attempt to exit VR, or fullscreen.

enableInteractions() void

addFloorMesh(floorMesh) void

Parameters

Name Type Description
floorMesh Mesh

removeFloorMesh(floorMesh) void

Parameters

Name Type Description
floorMesh Mesh

enableTeleportation(vrTeleportationOptions) void

Parameters

Name Type Description
optional vrTeleportationOptions VRTeleportationOptions

changeLaserColor(color) void

Parameters

Name Type Description
color Color3

changeGazeColor(color) void

Parameters

Name Type Description
color Color3

dispose() void

getClassName() string