You are on the editable version of MDN Web Docs

MDN 웹 문서 사용자로 보기:


이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

This page is not complete.

The XRRenderStateInit dictionary is a writeable version of the XRRenderState interface, and is used when calling an XRSession's updateRenderState() method to apply changes to the render state prior to rendering the next frame.

All distances are specified as floating-point values in meters; you can specify a value of 50 centimeters using a value of 0.5, for example.


baseLayer Optional
An XRWebGLLayer object from which the WebXR compositor will obtain imagery. This is null by default.
depthFar Optional
A floating-point value specifying the distance in meters from the viewer to the far clip plane, which is a plane parallel to the display surface beyond which no further rendering will occur. All rendering will take place between the distances specified by depthNear and depthFar. This is 1000 meters (1 kilometer) by default.
depthNear Optional
A floating-point value indicating the distance in meters from the viewer to a plane parallel to the display surface to be the near clip plane. No part of the scene on the viewer's side of this plane will be rendered. This is 0.1 meters (10 centimeters) by default.
inlineVerticalFieldOfView Optional
A floating-point value indicating the default field of view, in radians, to be used when computing the projection matrix for an inline XRSession. The projection matrix calculation also takes into account the output canvas's aspect ratio. This property must not be specified for immersive sessions, so the value is null by default for immersive sessions. The default value is otherwise π * 0.5 (half of the value of pi).

Usage notes

Any properties not specified in the XRRenderStateInit compliant object passed into updateRenderState() are left at their current values.


Specification Status Comment
WebXR Device API
The definition of 'XRRenderStateInit' in that specification.
Working Draft Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.XRRenderStateInit" (depth: 1) to the MDN compatibility data repository.

See also

문서 태그 및 공헌자

이 페이지의 공헌자: Sheppy
최종 변경자: Sheppy,