Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. XRFrame

XRFrame

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

AWebXR Device APIXRFrame object is passed into therequestAnimationFrame() callback function and provides access to the information needed in order to render a single frame of animation for anXRSession describing a VR or AR scene. Events which communicate the tracking state of objects also provide anXRFrame reference as part of their structure.

In addition to providing a reference to theXRSession for which this frame is to be rendered, thegetViewerPose() method is provided to obtain theXRViewerPose describing the viewer's position and orientation in space, andgetPose() can be used to create anXRPose describing the relative position of oneXRSpace relative to another.

Instance properties

sessionRead onlyExperimental

TheXRSession that for which thisXRFrame describes the tracking details for all objects. The information about a specific object can be obtained by calling one of the methods on the object.

trackedAnchorsRead onlyExperimental

AnXRAnchorSet containing all anchors still tracked in the frame.

Instance methods

createAnchor()Experimental

Returns aPromise which resolves to a free-floatingXRAnchor object.

fillJointRadii()Experimental

Populates aFloat32Array with radii for a list of hand joint spaces. Returnstrue if successful for all spaces.

fillPoses()Experimental

Populates aFloat32Array with the matrices of the poses, relative to a given base space. Returnstrue if all spaces have a valid pose.

getDepthInformation()Experimental

Returns anXRCPUDepthInformation object containing CPU depth information for the frame.

getHitTestResults()Experimental

Returns an array ofXRHitTestResult objects containing hit test results for a givenXRHitTestSource.

getHitTestResultsForTransientInput()Experimental

Returns an array ofXRTransientInputHitTestResult objects containing hit test results for a givenXRTransientInputHitTestSource.

getJointPose()Experimental

Returns anXRJointPose object providing the pose of a hand joint (seeXRHand) relative to a given base space.

getLightEstimate()Experimental

Returns anXRLightEstimate object containing estimated lighting values for anXRLightProbe.

getPose()Experimental

Returns anXRPose object representing the spatial relationship between the two specifiedXRSpace objects.

getViewerPose()Experimental

Returns anXRViewerPose describing the viewer's position and orientation in a givenXRReferenceSpace.

Specifications

Specification
WebXR Device API
# xrframe-interface

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp