Options
All
  • Public
  • Public/Protected
  • All
Menu

The currently-working hit-test module. Hit test (or Ray-casting) is used to interact with the real world. For further information read here - https://github.com/immersive-web/hit-test

Hierarchy

Implements

Index

Constructors

Properties

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposed: boolean

Is this feature disposed?

lastNativeXRHitResults: XRHitResult[]

Populated with the last native XR Hit Results

onHitTestResultObservable: Observable<IWebXRLegacyHitResult[]>

Triggered when new babylon (transformed) hit test results are available

options to use when constructing this feature

xrNativeFeatureName: string

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

Name: "xr-hit-test" = "xr-hit-test"

The module's name

Version: 1 = 1

The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the WebXR specs version

Accessors

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

    Returns boolean

Methods

  • attach(): boolean
  • detach(): boolean
  • dispose(): void
  • 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

  • execute a hit test with an XR Ray

    Parameters

    • xrSession: XRSession

      a native xrSession that will execute this hit test

    • xrRay: XRRay

      the ray (position and direction) to use for ray-casting

    • referenceSpace: XRReferenceSpace

      native XR reference space to use for the hit-test

    • Optional filter: (result: XRHitResult) => boolean

      filter function that will filter the results

    Returns Promise<XRHitResult[]>

    a promise that resolves with an array of native XR hit result in xr coordinates system

  • Execute a hit test on the current running session using a select event returned from a transient input (such as touch)

    Parameters

    Returns Promise<XRHitResult[]>

    a promise that resolves with an array of native XR hit result in xr coordinates system

Legend

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

Settings

Theme