@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="XRSession")
public class XRSession
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
EventHandler |
onend |
EventHandler |
oninputsourceschange |
EventHandler |
onselect |
EventHandler |
onselectend |
EventHandler |
onselectstart |
EventHandler |
onsqueeze |
EventHandler |
onsqueezeend |
EventHandler |
onsqueezestart |
EventHandler |
onvisibilitychange |
| Modifier | Constructor and Description |
|---|---|
protected |
XRSession() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAnimationFrame(int handle)
The cancelAnimationFrame() method of the XRSession interface cancels an animation frame which was previously requested by calling requestAnimationFrame.
|
Promise<java.lang.Void> |
end()
The end() method shuts down the XRSession on which it's called, returning a promise which resolves once the session has fully shut down.
|
XRInputSourceArray |
inputSources()
The read-only inputSources property of the XRSession interface returns an XRInputSourceArray object which lists all controllers and input devices which are expressly associated with the XR device and are currently available.
|
XRRenderState |
renderState()
The read-only renderState property of an XRSession object indicates the returns a XRRenderState object describing how the user's environment which should be rendered.
|
int |
requestAnimationFrame(XRFrameRequestCallback callback)
The XRSession method requestAnimationFrame(), much like the Window method of the same name, schedules a callback to be executed the next time the browser is ready to paint the session's virtual environment to the XR display.
|
Promise<XRReferenceSpace> |
requestReferenceSpace(java.lang.String type)
The requestReferenceSpace() method of the XRSession interface returns a promise that resolves with an instance of either XRReferenceSpace or XRBoundedReferenceSpace as appropriate given the type of reference space requested.
|
void |
updateRenderState()
The updateRenderState() method of the XRSession interface of WebXR API schedules changes to be applied to the active render state prior to rendering of the next frame.
|
void |
updateRenderState(XRRenderStateInit state)
The updateRenderState() method of the XRSession interface of WebXR API schedules changes to be applied to the active render state prior to rendering of the next frame.
|
java.lang.String |
visibilityState()
The read-only visibilityState property of the XRSession interface is a string indicating whether the WebXR content is currently visible to the user, and if it is, whether it's the primary focus.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListener@Nullable public EventHandler onend
@Nullable public EventHandler oninputsourceschange
@Nullable public EventHandler onselect
@Nullable public EventHandler onselectend
@Nullable public EventHandler onselectstart
@Nullable public EventHandler onsqueeze
@Nullable public EventHandler onsqueezeend
@Nullable public EventHandler onsqueezestart
@Nullable public EventHandler onvisibilitychange
@JsProperty(name="inputSources") @Nonnull public XRInputSourceArray inputSources()
@JsProperty(name="renderState") @Nonnull public XRRenderState renderState()
@JsProperty(name="visibilityState") @Nonnull @XRVisibilityState public java.lang.String visibilityState()
public void cancelAnimationFrame(int handle)
@Nonnull public Promise<java.lang.Void> end()
public int requestAnimationFrame(@Nonnull
XRFrameRequestCallback callback)
@Nonnull public Promise<XRReferenceSpace> requestReferenceSpace(@XRReferenceSpaceType @Nonnull java.lang.String type)
public void updateRenderState(@Nonnull
XRRenderStateInit state)
public void updateRenderState()