Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWebXRFeature

Defining the interface required for a (webxr) feature

Hierarchy

Implemented by

Index

Properties

attachedSearch playground for attached

attached: boolean

Is this feature attached

Optional dependsOnSearch playground for dependsOn

dependsOn: string[]

A list of (Babylon WebXR) features this feature depends on

disableAutoAttachSearch playground for disableAutoAttach

disableAutoAttach: boolean

Should auto-attach be disabled?

Optional getXRSessionInitExtensionSearch playground for getXRSessionInitExtension

getXRSessionInitExtension: () => Promise<Partial<XRSessionInit>>

If this feature requires to extend the XRSessionInit object, this function will return the partial XR session init object

Type declaration

isDisposedSearch playground for isDisposed

isDisposed: boolean

Was this feature disposed;

Optional xrNativeFeatureNameSearch playground for xrNativeFeatureName

xrNativeFeatureName: string

The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)

Methods

attachSearch playground for attach

  • attach(force?: boolean): boolean
  • Attach the feature to the session Will usually be called by the features manager

    Parameters

    • Optional force: boolean

      should attachment be forced (even when already attached)

    Returns boolean

    true if successful.

detachSearch playground for detach

  • detach(): boolean
  • Detach the feature from the session Will usually be called by the features manager

    Returns boolean

    true if successful.

disposeSearch playground for dispose

  • dispose(): void
  • Releases all held resources

    Returns void

isCompatibleSearch playground for isCompatible

  • isCompatible(): boolean
  • This function will be executed during before enabling the feature and can be used to not-allow enabling it. Note that at this point the session has NOT started, so this is purely checking if the browser supports it

    Returns boolean

    whether or not the feature is compatible in this environment

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method