API

Class WebXRHitTest

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

Tested on chrome (mobile) 80.

Hierarchy (View Summary)

Implements

Index
autoCloneTransformation: boolean = false

When set to true, each hit test will have its own position/rotation objects When set to false, position and rotation objects will be reused for each hit test. It is expected that the developers will clone them or copy them as they see fit.

dependsOn?: string[]

The dependencies of this feature, if any

disableAutoAttach: boolean = false

Should auto-attach be disabled?

isDisposed: boolean = false

Is this feature disposed?

onFeatureAttachObservable: Observable<IWebXRFeature> = ...

Observers registered here will be executed when the feature is attached

onFeatureDetachObservable: Observable<IWebXRFeature> = ...

Observers registered here will be executed when the feature is detached

onHitTestResultObservable: Observable<IWebXRHitResult[]> = ...

Triggered when new babylon (transformed) hit test results are available Note - this will be called when results come back from the device. It can be an empty array!!

options: IWebXRHitTestOptions = {}

[Empty Object] options to use when constructing this feature

paused: boolean = false

Use this to temporarily pause hit test checks.

Name: "xr-hit-test" = WebXRFeatureName.HIT_TEST

The module's name

Version: 2

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