XRView: projectionMatrix property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
TheXRView interface's read-onlyprojectionMatrix property specifies the projection matrixto apply to the underlying view. This should be used to integrate perspective toeverything in the scene, in order to ensure the result is consistent with what the eyeexpects to see.
Note:Failure to apply proper perspective, or inconsistenciesin perspective, may result in possibly serious user discomfort or distress.
In this article
Value
AFloat32Array object representing the projection matrix for the view.The projection matrix for each eye's view is used to ensure that the correct area of thescene is presented to each eye in order to create a believable 3D scene withoutintroducing discomfort for the user.
Specifications
| Specification |
|---|
| WebXR Device API> # dom-xrviewgeometry-projectionmatrix> |