Freigeben über


VRDisplayCapabilities object

The VRDisplay object forms the base of all VR devices supported by this API, including generic information such as device IDs and descriptions.

Syntax

 var display = new VRDisplay(); 

Members

The VRDisplayCapabilities object has these types of members:

  • Methods
  • Properties

Methods

The VRDisplayCapabilities object has these methods.

Method Description
cancelAnimationFrame

The cancelAnimationFrame method takes the handle returned by requestAnimationFrame and unregisters the callback.

exitPresent

The exitPresent method stops presenting the VRDisplay.

getEyeParameters

The getEyeParameters method returns the current VREyeParameters for the given eye.

getFrameData

The getFrameData property populates a VRFrameData object with the VRPose and view/projection matrices for the current frame.

getLayers

The getLayers method returns an array with the VRLayers currently being presented.

getPose

The getPose method returns a VRPose describing the position, orientation, acceleration, and velocity of the VRDisplay object that should be used when rendering the next frame of a scene.

requestAnimationFrame

The requestAnimationFrame method contains a callback function that will be called every time a frame of the VRDisplay presentation is rendered.

requestPresent

The requestPresent method begins presenting the contents of the specified VRLayers on the VRDisplay.

resetPose

The resetPose property resets the pose for the VRDisplay.

submitFrame

The submitFrame method captures the current state of the VRLayer currently being presented and displays it on the VRDisplay.

 

Properties

The VRDisplayCapabilities object has these properties.

Property Access type Description

capabilities

Read-only

The capabilities property returns the VRDisplay's VRDisplayCapabilities object which describes the capabilities of the VRDisplay.

depthFar

Read-only

The depthFar property represents the z-depth defining the far plane of the eye view frustum.

depthNear

Read-only

The depthNear property represents the z-depth defining the near plane of the eye view frustum.

displayId

Read-only

The displayId property represents an identifier that is distinct for each VRDisplay object.

displayName

Read-only

The displayName property represents a display name that identifies the VRDisplay.

isConnected

Read-only

The isConnected property returns the connected state of a VRDisplay.

isPresenting

Read-only

The isPresenting property returns the presentation state of a VRDisplay.

stageParameters

Read-only

The stageParameters property returns the VRStageParameters that describes the room-scale parameters.