WebIDLpedia

XRFrame interface

Definition

WebXR Device API defines XRFrame



[SecureContext, Exposed=Window] interface XRFrame {
  [SameObject] readonly attribute XRSession session;
  readonly attribute DOMHighResTimeStamp predictedDisplayTime;

  XRViewerPose? getViewerPose(XRReferenceSpace referenceSpace);
  XRPose? getPose(XRSpace space, XRSpace baseSpace);
};

This interface is extended in the following specifications:

Consolidated IDL (across mixin and partials)


[SecureContext, Exposed=Window] interface XRFrame {
  [SameObject] readonly attribute XRSession session;
  readonly attribute DOMHighResTimeStamp predictedDisplayTime;

  XRViewerPose? getViewerPose(XRReferenceSpace referenceSpace);
  XRPose? getPose(XRSpace space, XRSpace baseSpace);
  Promise<XRAnchor> createAnchor(XRRigidTransform pose, XRSpace space);
  [SameObject] readonly attribute XRAnchorSet trackedAnchors;
  readonly attribute XRPlaneSet detectedPlanes;
  readonly attribute XRMeshSet detectedMeshes;
  XRCPUDepthInformation? getDepthInformation(XRView view);
    XRJointPose? getJointPose(XRJointSpace joint, XRSpace baseSpace);
    boolean fillJointRadii(sequence<XRJointSpace> jointSpaces, Float32Array radii);

    boolean fillPoses(sequence<XRSpace> spaces, XRSpace baseSpace, Float32Array transforms);
  FrozenArray<XRHitTestResult> getHitTestResults(XRHitTestSource hitTestSource);
  FrozenArray<XRTransientInputHitTestResult> getHitTestResultsForTransientInput(XRTransientInputHitTestSource hitTestSource);
  XRLightEstimate? getLightEstimate(XRLightProbe lightProbe);
};

Methods and attributes that return objects implementing XRFrame

Referring IDL interfaces/dictionaries

Referring specifications