@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.
|
java.lang.String |
depthDataFormat() |
java.lang.String |
depthUsage() |
XRDOMOverlayState |
domOverlayState() |
@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.String |
environmentBlendMode()
The XRSession interface's read-only environmentBlendMode property identifies if—and to what degree—the computer-generated imagery is overlaid atop the real world.
|
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.
|
java.lang.String |
interactionMode() |
boolean |
isDepthDataFormatSupported() |
boolean |
isDepthUsageSupported() |
boolean |
isDomOverlayStateSupported() |
boolean |
isEnvironmentBlendModeSupported() |
boolean |
isInteractionModeSupported() |
boolean |
isPreferredReflectionFormatSupported() |
boolean |
isRequestHitTestSourceForTransientInputSupported() |
boolean |
isRequestHitTestSourceSupported() |
boolean |
isRequestLightProbeSupported() |
java.lang.String |
preferredReflectionFormat() |
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<XRHitTestSource> |
requestHitTestSource(XRHitTestOptionsInit options) |
@JsNonNull Promise<XRTransientInputHitTestSource> |
requestHitTestSourceForTransientInput(XRTransientInputHitTestOptionsInit options) |
@JsNonNull Promise<XRLightProbe> |
requestLightProbe() |
@JsNonNull Promise<XRLightProbe> |
requestLightProbe(XRLightProbeInit options) |
@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
@JsOverlay public final boolean isDepthDataFormatSupported()
@JsProperty(name="depthDataFormat") @Nonnull @XRDepthDataFormat public java.lang.String depthDataFormat()
@JsOverlay public final boolean isDepthUsageSupported()
@JsProperty(name="depthUsage") @Nonnull @XRDepthUsage public java.lang.String depthUsage()
@JsOverlay public final boolean isDomOverlayStateSupported()
@JsProperty(name="domOverlayState") @Nullable public XRDOMOverlayState domOverlayState()
@JsOverlay public final boolean isEnvironmentBlendModeSupported()
@JsProperty(name="environmentBlendMode") @Nonnull @XREnvironmentBlendMode public java.lang.String environmentBlendMode()
@JsProperty(name="frameRate") @Nullable public java.lang.Double frameRate()
@JsProperty(name="inputSources") @Nonnull public XRInputSourceArray inputSources()
@JsOverlay public final boolean isInteractionModeSupported()
@JsProperty(name="interactionMode") @Nonnull @XRInteractionMode public java.lang.String interactionMode()
@JsOverlay public final boolean isPreferredReflectionFormatSupported()
@JsProperty(name="preferredReflectionFormat") @Nonnull @XRReflectionFormat public java.lang.String preferredReflectionFormat()
@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)
@JsOverlay public final boolean isRequestHitTestSourceSupported()
public @JsNonNull Promise<XRHitTestSource> requestHitTestSource(@Nonnull XRHitTestOptionsInit options)
@JsOverlay public final boolean isRequestHitTestSourceForTransientInputSupported()
public @JsNonNull Promise<XRTransientInputHitTestSource> requestHitTestSourceForTransientInput(@Nonnull XRTransientInputHitTestOptionsInit options)
@JsOverlay public final boolean isRequestLightProbeSupported()
public @JsNonNull Promise<XRLightProbe> requestLightProbe(@Nonnull XRLightProbeInit options)
public @JsNonNull Promise<XRLightProbe> requestLightProbe()