Class: StereoParams

StereoParams

new StereoParams()

Stereo rendering parameters.

You should not create this directly. Instead, use vr.StereoRenderer#getParams to get an instance that is kept up to date auotmatically.

Source:
  • vr.js, line 1532

Methods

getDistortionScale() → {number}

Gets the distortion scale. The data in the eyes must be updated for the frame with a call to vr.StereoParams#update.

Source:
  • vr.js, line 1630
Returns:

Distortion scale.

Type
number

getEyes() → {!Array.<!vr.StereoEye>}

Gets a list of eyes. The data in the eyes must be updated for the frame with a call to vr.StereoParams#update.

Source:
  • vr.js, line 1641
Returns:
Type
!Array.<!vr.StereoEye>

getInterpupillaryDistance() → {number|undefined}

Gets the current value of the interpupillary distance, if overriden.

Source:
  • vr.js, line 1609
Returns:

Current value or undefined if not set.

Type
number | undefined

setInterpupillaryDistance(value)

Sets the value of the interpupillary distance override. Use a value of undefined to clear the override and use device defaults.

Parameters:
Name Type Description
value number | undefined

New value or undefined to disable override.

Source:
  • vr.js, line 1619

setZFar(value)

Sets the value of the far Z plane.

Parameters:
Name Type Description
value number

New value.

Source:
  • vr.js, line 1600

setZNear(value)

Sets the value of the near Z plane.

Parameters:
Name Type Description
value number

New value.

Source:
  • vr.js, line 1591

update(info)

Updates the stereo parameters with the given HMD data.

Parameters:
Name Type Description
info vr.HmdInfo

HMD info.

Source:
  • vr.js, line 1650