Interface XRFrame

    interface XRFrame {
        createAnchor?: ((pose: XRRigidTransform, space: XRSpace) => Promise<XRAnchor>);
        detectedMeshes?: XRMeshSet;
        detectedPlanes?: XRPlaneSet;
        getJointPose?: ((joint: XRJointSpace, baseSpace: XRSpace) => XRJointPose);
        predictedDisplayTime: number;
        session: XRSession;
        trackedAnchors?: XRAnchorSet;
        getDepthInformation(view: XRView): XRCPUDepthInformation;
        getHitTestResults(hitTestSource: XRHitTestSource): XRHitTestResult[];
        getHitTestResultsForTransientInput(hitTestSource: XRTransientInputHitTestSource): XRTransientInputHitTestResult[];
        getPose(space: XRSpace, baseSpace: XRSpace): XRPose;
        getViewerPose(referenceSpace: XRReferenceSpace): XRViewerPose;
    }

    Properties

    createAnchor?: ((pose: XRRigidTransform, space: XRSpace) => Promise<XRAnchor>)
    detectedMeshes?: XRMeshSet

    XRFrame is extended to contain detectedMeshes attribute which contains all meshes that are still tracked in the frame.

    The set is initially empty and will be populated by the update meshes algorithm. If this attribute is accessed when the frame is not active, the user agent MUST throw InvalidStateError.

    detectedPlanes?: XRPlaneSet

    XRFrame is extended to contain detectedPlanes attribute which contains all planes that are still tracked in the frame.

    The set is initially empty and will be populated by the update planes algorithm. If this attribute is accessed when the frame is not active, the user agent MUST throw InvalidStateError.

    getJointPose?: ((joint: XRJointSpace, baseSpace: XRSpace) => XRJointPose)
    predictedDisplayTime: number
    session: XRSession
    trackedAnchors?: XRAnchorSet

    Methods

    • Provides the pose of space relative to baseSpace as an XRPose, at the time represented by the XRFrame.

      Parameters

      Returns XRPose

    • Provides the pose of the viewer relative to referenceSpace as an XRViewerPose, at the XRFrame's time.

      Parameters

      Returns XRViewerPose