Editorial review: Document WebXR visibilitymaskchange event#43975
Editorial review: Document WebXR visibilitymaskchange event#43975chrisdavidmills wants to merge 2 commits intomdn:mainfrom
Conversation
|
|
||
| ```js | ||
| xrSession.addEventListener("visibilitymaskchange", (e) => { | ||
| if (userSessionEnded) { |
There was a problem hiding this comment.
NIT: This is a little confusing, I thought it was tracking some variable that the session had already ended at first glance/read through. maybe userRequestsSessionEnd and clear it in the block as well?
There was a problem hiding this comment.
That's a fair comment. I've updated the variable name throughout to userRequestsSessionEnd in my next commit.
|
|
||
| {{APIRef("WebXR Device API")}}{{SecureContext_Header}} | ||
|
|
||
| The read-only **`vertices`** property of the {{domxref("XRVisibilityMaskChangeEvent")}} interface is an array of coordinates representing the vertices required to draw the entire scene displayed in the {{domxref("XRView")}}. If this array is empty, the whole region of the `XRView` will be drawn. |
There was a problem hiding this comment.
Maybe also reference here that it's intended to be referenced into by the indices property.
There was a problem hiding this comment.
Sure, makes sense. I've added the following in a new paragraph:
The {{domxref("XRVisibilityMaskChangeEvent.indices", "indices")}} array specifies the indices of the
verticesarray that should be drawn to display the currently visible part of the scene displayed in theXRView.
Description
Chrome 144 adds support for the
visibilitymaskchangeevent/XRVisibilityMaskChangeevent object; see https://chromestatus.com/feature/5073760055066624.This PR adds documentation for:
XRVisibilityMaskChangeevent object and all its members.visibilitymaskchangeeventXRView.indexproperty.Motivation
Additional details
Related issues and pull requests