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;
}
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
Optional
createAnchor
Optional
Readonly
detectedMeshes
Optional
Readonly
detectedPlanes
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.
Optional
getJointPose
Readonly
predictedDisplayTime
predictedDisplayTime : number
Readonly
session
Optional
trackedAnchors
Methods
getDepthInformation
- get
Depth (view): XRCPUDepthInformationInformation Parameters
- view: XRView
Returns XRCPUDepthInformation
getHitTestResults
- get
Hit (hitTestSource): XRHitTestResult[]Test Results Parameters
- hitTestSource: XRHitTestSource
Returns XRHitTestResult[]
getHitTestResultsForTransientInput
- get
Hit (hitTestSource): XRTransientInputHitTestResult[]Test Results For Transient Input Parameters
- hitTestSource: XRTransientInputHitTestSource
Returns XRTransientInputHitTestResult[]
getPose
getViewerPose
- get
Viewer (referenceSpace): XRViewerPosePose Provides the pose of the viewer relative to referenceSpace as an XRViewerPose, at the XRFrame's time.
Parameters
- referenceSpace: XRReferenceSpace
Returns XRViewerPose
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.