diff --git a/webvr-api/index.d.ts b/webvr-api/index.d.ts index 370941d739..6300d12b78 100644 --- a/webvr-api/index.d.ts +++ b/webvr-api/index.d.ts @@ -32,6 +32,12 @@ declare class VRDisplay extends EventTarget { */ displayName: string; + /** + * Populates the passed VRFrameData with the information required to render + * the current frame. + */ + getFrameData(frameData: VRFrameData): boolean; + /** * Return a VRPose containing the future predicted pose of the VRDisplay * when the current frame will be presented. The value returned will not @@ -40,7 +46,7 @@ declare class VRDisplay extends EventTarget { * The VRPose will contain the position, orientation, velocity, * and acceleration of each of these properties. */ - getPose() : VRPose; + getPose(): VRPose; /** * Return the current instantaneous pose of the VRDisplay, with no @@ -152,6 +158,18 @@ interface VRPose { angularAcceleration: Float32Array; } +declare class VRFrameData { + timestamp: number; // Should be DOMHighResTimeStamp + + leftProjectionMatrix: Float32Array; + leftViewMatrix: Float32Array; + + rightProjectionMatrix: Float32Array; + rightViewMatrix: Float32Array; + + pose: VRPose; +} + interface VREyeParameters { offset: Float32Array;