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.
new XRVisibilityMaskChangeEvent(type, options)typeA string containing the name of the event, which is always visibilitymaskchange.
optionsAn object that, in addition of the properties defined in Event(), can have the following properties:
eyeThe eye the mask applies to.
indexThe index of the current XRView in the XRViewerPose.views array.
indicesA Uint32Array of values specifying the index position of each coordinate pair (not individual array index) inside the vertices array that define the triangles used to draw the currently visible part of the scene displayed in the XRView.
sessionThe XRSession to which the event belongs.
verticesA Float32Array of 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 the XRView will be drawn.
A new XRVisibilityMaskChangeEvent object instance.
See the main XRVisibilityMaskChangeEvent page for an example.