WebXR Device API
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.
- : A string containing the name of the event, which is always
options- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
eye- : The XRVisibilityMaskChangeEvent.eye the mask applies to.
index- : The index of the current XRView in the XRViewerPose.views array.
indices- : A Uint32Array of values specifying the index position of each coordinate pair (not individual array index) inside the
verticesarray that define the triangles used to draw the currently visible part of the scene displayed in the XRView.
- : A Uint32Array of values specifying the index position of each coordinate pair (not individual array index) inside the
session- : The XRSession to which the event belongs.
vertices- : A 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
XRViewwill be drawn.
- : A 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
- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
Return value
A new XRVisibilityMaskChangeEvent object instance.
Examples
See the main XRVisibilityMaskChangeEvent page for an example.
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
