XRWebGLLayer class

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The interface of the WebXR Device API provides a linkage between the WebXR device (or simulated XR device, in the case of an inline session) and a WebGL context used to render the scene for display on the device. In particular, it provides access to the WebGL framebuffer and viewport to ease access to the context. Although is currently the only type of framebuffer layer supported by WebGL, it's entirely possible that future updates to the WebXR specification may allow for other layer types and corresponding image sources.

EventTarget

XRLayer

XRWebGLLayer

Implemented types
Available extensions
Annotations
  • @experimental
  • @JS()
  • @staticInterop

Constructors

XRWebGLLayer(XRSession session, dynamic context, [XRWebGLLayerInit? layerInit])
factory

Properties

antialias bool

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

no setter
fixedFoveation double?

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

getter/setter pair
framebuffer WebGLFramebuffer?

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

no setter
framebufferHeight int

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

no setter
framebufferWidth int

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

no setter
hashCode int
The hash code for this object.
no setterinherited
ignoreDepthValues bool

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

getViewport(XRView view) XRViewport?

Available on XRWebGLLayer, provided by the PropsXRWebGLLayer extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getNativeFramebufferScaleFactor(XRSession session) double