@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="XRSession")
public class XRSession
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
@JsNullable EventHandler |
onend |
@JsNullable EventHandler |
onframeratechange |
@JsNullable EventHandler |
oninputsourceschange |
@JsNullable EventHandler |
onselect |
@JsNullable EventHandler |
onselectend |
@JsNullable EventHandler |
onselectstart |
@JsNullable EventHandler |
onsqueeze |
@JsNullable EventHandler |
onsqueezeend |
@JsNullable EventHandler |
onsqueezestart |
@JsNullable 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.
|
@JsNonNull 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.
|
java.lang.Double |
frameRate() |
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.
|
@JsNonNull 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.
|
Float32Array |
supportedFrameRates() |
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.
|
@JsNonNull Promise<java.lang.Void> |
updateTargetFrameRate(float rate) |
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, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic @JsNullable EventHandler onend
public @JsNullable EventHandler onframeratechange
public @JsNullable EventHandler oninputsourceschange
public @JsNullable EventHandler onselect
public @JsNullable EventHandler onselectend
public @JsNullable EventHandler onselectstart
public @JsNullable EventHandler onsqueeze
public @JsNullable EventHandler onsqueezeend
public @JsNullable EventHandler onsqueezestart
public @JsNullable EventHandler onvisibilitychange
@JsProperty(name="frameRate") @Nullable public java.lang.Double frameRate()
@JsProperty(name="inputSources") @Nonnull public XRInputSourceArray inputSources()
@JsProperty(name="renderState") @Nonnull public XRRenderState renderState()
@JsProperty(name="supportedFrameRates") @Nullable public Float32Array supportedFrameRates()
@JsProperty(name="visibilityState") @Nonnull @XRVisibilityState public java.lang.String visibilityState()
public void cancelAnimationFrame(int handle)
public @JsNonNull Promise<java.lang.Void> end()
public int requestAnimationFrame(@Nonnull
XRFrameRequestCallback callback)
public @JsNonNull Promise<XRReferenceSpace> requestReferenceSpace(@XRReferenceSpaceType @Nonnull java.lang.String type)
public void updateRenderState(@Nonnull
XRRenderStateInit state)
public void updateRenderState()
public @JsNonNull Promise<java.lang.Void> updateTargetFrameRate(float rate)