Interface IWebXRHitTestFeature<T>
attached: boolean;
dependsOn?: string[];
disableAutoAttach: boolean;
getXRSessionInitExtension?: () => Promise<XRSessionInit>;
isDisposed: boolean;
onFeatureAttachObservable: Observable<IWebXRFeature>;
onFeatureDetachObservable: Observable<IWebXRFeature>;
onHitTestResultObservable: Observable<T[]>;
xrNativeFeatureName?: string;
attach(force?: boolean): boolean;
detach(): boolean;
dispose(): void;
isCompatible(): boolean;
}
Type Parameters
- T extends IWebXRLegacyHitResult
Hierarchy (View Summary)
- IWebXRFeature
- IWebXRHitTestFeature
Implemented by
Properties
attached
Is this feature attached
Optionaldepends On
A list of (Babylon WebXR) features this feature depends on
disable Auto Attach
Should auto-attach be disabled?
Optionalget XR Session Init Extension
If this feature requires to extend the XRSessionInit object, this function will return the partial XR session init object
is Disposed
Was this feature disposed;
on Feature Attach Observable
Triggered when the feature is attached
on Feature Detach Observable
Triggered when the feature is detached
on Hit Test Result Observable
Triggered when new babylon (transformed) hit test results are available
Optionalxr Native Feature Name
The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
Methods
attach
-
Attach the feature to the session Will usually be called by the features manager
Parameters
Optionalforce: booleanshould attachment be forced (even when already attached)
Returns boolean
true if successful.
detach
-
Detach the feature from the session Will usually be called by the features manager
Returns boolean
true if successful.
dispose
-
Releases all held resources
Returns void
is Compatible
-
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
An interface for all Hit test features