XRVisibilityMaskChangeEvent: XRVisibilityMaskChangeEvent() constructor
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The XRVisibilityMaskChangeEvent() constructor creates and returns a new XRVisibilityMaskChangeEvent object.
Syntax
new XRVisibilityMaskChangeEvent(type, options)
Parameters
type-
A string containing the name of the event, which is always
visibilitymaskchange. options-
An object that, in addition of the properties defined in
Event(), can have the following properties:eye-
The
eyethe mask applies to. index-
The index of the current
XRViewin theXRViewerPose.viewsarray. indices-
A
Uint32Arrayof values specifying the index position of each coordinate pair (not individual array index) inside theverticesarray that define the triangles used to draw the currently visible part of the scene displayed in theXRView. session-
The
XRSessionto which the event belongs. vertices-
A
Float32Arrayof coordinates representing the set of possible coordinate values that may be used in a visibility mask. If this array is empty, the whole region of theXRViewwill be drawn.
Return value
A new XRVisibilityMaskChangeEvent object instance.
Examples
See the main XRVisibilityMaskChangeEvent page for an example.
Specifications
| Specification |
|---|
| WebXR Device API> # dom-xrvisibilitymaskchangeevent-xrvisibilitymaskchangeevent> |