XR · function

eyeViews

Turn a pose's views into eye views, into reused storage.

Explained in XR.

function eyeViews(pose: XrViewerPose, layer: XrWebGlLayer | null, out?: EyeView[]): EyeView[]
import { eyeViews } from '@driftengine/xr';

Parameters

ParameterTypeDescription
poseXrViewerPose
layerXrWebGlLayer | null
out?EyeView[]

In depth

out is filled and returned so a caller in a frame loop allocates nothing. Its length is set to the number of views the pose carried, which is one for an inline session and two for a stereo one, and which this package never assumes.