Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXRAbstractFeature

This is the base class for all WebXR features. Since most features require almost the same resources and callbacks, this class can be used to simplify the development Note that since the features manager is using the IWebXRFeature you are in no way obligated to use this class

Hierarchy

Implements

Index

Constructors

constructor

  • Construct a new (abstract) WebXR feature

    Parameters

    Returns WebXRAbstractFeature

Properties

disableAutoAttachSearch playground for disableAutoAttach

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposedSearch playground for isDisposed

isDisposed: boolean

Is this feature disposed?

xrNativeFeatureNameSearch playground for xrNativeFeatureName

xrNativeFeatureName: string

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

Accessors

attached

  • get attached(): boolean
  • Is this feature attached

    Returns boolean

Methods

attachSearch playground for attach

  • attach(force?: boolean): boolean
  • attach this feature

    Parameters

    • Optional force: boolean

      should attachment be forced (even when already attached)

    Returns boolean

    true if successful, false is failed or already attached

detachSearch playground for detach

  • detach(): boolean
  • detach this feature.

    Returns boolean

    true if successful, false if failed or already detached

disposeSearch playground for dispose

  • dispose(): void
  • Dispose this feature and all of the resources attached

    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