JavaScripture
Contribute via GitHub
Feedback
XRWebGLLayer
Constructors
Instance Properties
antialias
framebuffer
framebufferHeight
framebufferWidth
ignoreDepthValues
Instance Methods
getViewport
XRWebGLLayer Methods
getNativeFramebufferScaleFactor
WebXR API
All API
No API set selected.
XRWebGLLayer
:
XRLayer
constructor
Spec
Constructors
new
XRWebGLLayer
(
session
:
XRSession
,
gl
:
WebGLRenderingContext
,
[
layerInit
:
Object
]
) :
XRWebGLLayer
layerInit
: {
antialias
:
Boolean
Default =
true
depth
:
Boolean
Default =
true
stencil
:
Boolean
Default =
false
alpha
:
Boolean
Default =
true
ignoreDepthValues
:
Boolean
Default =
false
framebufferScaleFactor
:
Number
Default =
1.0
}
Instance Properties
antialias
:
Boolean
readonly
framebuffer
:
WebGLFramebuffer
readonly
framebufferHeight
:
Number
readonly
framebufferWidth
:
Number
readonly
ignoreDepthValues
:
Boolean
readonly
Instance Methods
getViewport
(
view
:
XRView
) :
XRViewport
XRWebGLLayer Methods
getNativeFramebufferScaleFactor
(
session
:
XRSession
) :
Number
Example:
<script> (async () => { const session = await navigator.xr.requestSession('inline'); console.log(XRWebGLLayer.getNativeFramebufferScaleFactor(session)); })(); </script>
Run
Results:
home
license
contribute
feedback
toggle light/dark mode
Copyright © JavaScripture Contributors