VRLayer Dictionary object

The VRLayer dictionary represents a content layer to be presented to a head mounted display (HMD).

Dictionary

Member Type Description
source VRSource An HTMLCanvasElement or OffscreenCanvas object that will be presented by the VRDisplay. Set to null by default.
leftBounds sequence<float> Contains four values that define the texture bounds within the source canvas to present to the eye in UV space. Set to null by default.
rightBounds sequence<float> Contains four values that define the texture bounds within the source canvas to present to the eye in UV space. Set to null by default.

 

Remarks

The four values of the left and right bounds are: [0] left offset of the bounds (0.0 - 1.0); [1] bottom offset of the bounds (0.0 - 1.0); [2] right offset of the bounds (0.0 - 1.0); [3] top offset of the bounds (0.0 - 1.0)

The leftBounds member defaults to [0.0, 0.0, 0.5, 1.0].

The rightBounds member defaults to [0.5, 0.0, 1.0, 1.0].