Class: HmdInfo

HmdInfo

new HmdInfo(opt_values)

HMD device info.

Parameters:
Name Type Argument Description
opt_values Array.<number>= <optional>

Device values.

Source:
  • vr.js, line 774

Members

<static> DEFAULT :vr.HmdInfo

Default HMD info. Do not modify.

Type:
  • vr.HmdInfo
Source:
  • vr.js, line 945

<readonly> chromaAbCorrection :Float32Array

Additional per-channel scaling is applied after distortion: Index [0] - Red channel constant coefficient. Index [1] - Red channel r^2 coefficient. Index [2] - Blue channel constant coefficient. Index [3] - Blue channel r^2 coefficient.

Type:
  • Float32Array
Source:
  • vr.js, line 911

<readonly> desktopX :number

Desktop coordinate position of the screen (can be negative) along X.

Type:
  • number
Source:
  • vr.js, line 806

<readonly> desktopY :number

Desktop coordinate position of the screen (can be negative) along Y.

Type:
  • number
Source:
  • vr.js, line 814

<readonly> deviceManufacturer :string

Manufacturer name.

Type:
  • string
Source:
  • vr.js, line 790

<readonly> deviceName :string

Name string describing the product: "Oculus Rift DK1", etc.

Type:
  • string
Source:
  • vr.js, line 782

<readonly> deviceVersion :number

Device version.

Type:
  • number
Source:
  • vr.js, line 798

<readonly> distortionK :Float32Array

Radial distortion correction coefficients. The distortion assumes that the input texture coordinates will be scaled by the following equation: uvResult = uvInput (K0 + K1 uvLength^2 + K2 * uvLength^4) Where uvInput is the UV vector from the center of distortion in direction of the mapped pixel, uvLength is the magnitude of that vector, and uvResult the corresponding location after distortion.

Type:
  • Float32Array
Source:
  • vr.js, line 897

<readonly> eyeToScreenDistance :number

Distance from the eye to screen surface, in meters. Useful for calculating FOV and projection.

Type:
  • number
Source:
  • vr.js, line 865

<readonly> interpupillaryDistance :number

Configured distance between the user's eye centers, in meters. Defaults to 0.0635.

Type:
  • number
Source:
  • vr.js, line 883

<readonly> lensSeparationDistance :number

Distance between physical lens centers useful for calculating distortion center.

Type:
  • number
Source:
  • vr.js, line 874

<readonly> resolutionHorz :number

Horizontal resolution of the entire screen, in pixels.

Type:
  • number
Source:
  • vr.js, line 822

<readonly> resolutionVert :number

Vertical resolution of the entire screen, in pixels.

Type:
  • number
Source:
  • vr.js, line 830

<readonly> screenCenterVert :number

Physical offset from the top of the screen to the eye center, in meters. This will usually, but not necessarily be half of vr.HmdInfo#screenSizeVert.

Type:
  • number
Source:
  • vr.js, line 856

<readonly> screenSizeHorz :number

Horizontal physical size of the screen, in meters.

Type:
  • number
Source:
  • vr.js, line 838

<readonly> screenSizeVert :number

Vertical physical size of the screen, in meters.

Type:
  • number
Source:
  • vr.js, line 846

Methods

distort(r) → {number}

Distorts the given value the same way the shader would.

Parameters:
Name Type Description
r number

Value to distort.

Source:
  • vr.js, line 933
Returns:

Distorted value.

Type
number

toString() → {string}

Gets a human readable string describing the device.

Source:
  • vr.js, line 922
Returns:

String.

Type
string