|
@@ -10,7 +10,7 @@ import { WebXRAbstractFeature } from './WebXRAbstractFeature';
|
|
|
/**
|
|
|
* Options used for hit testing
|
|
|
*/
|
|
|
-export interface IWebXRHitTestOptions {
|
|
|
+export interface IWebXRLegacyHitTestOptions {
|
|
|
/**
|
|
|
* Only test when user interacted with the scene. Default - hit test every frame
|
|
|
*/
|
|
@@ -24,7 +24,7 @@ export interface IWebXRHitTestOptions {
|
|
|
/**
|
|
|
* Interface defining the babylon result of raycasting/hit-test
|
|
|
*/
|
|
|
-export interface IWebXRHitResult {
|
|
|
+export interface IWebXRLegacyHitResult {
|
|
|
/**
|
|
|
* Transformation matrix that can be applied to a node that will put it in the hit point location
|
|
|
*/
|
|
@@ -32,7 +32,7 @@ export interface IWebXRHitResult {
|
|
|
/**
|
|
|
* The native hit test result
|
|
|
*/
|
|
|
- xrHitResult: XRHitResult;
|
|
|
+ xrHitResult: XRHitResult | XRHitTestResult;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -65,7 +65,7 @@ export class WebXRHitTestLegacy extends WebXRAbstractFeature {
|
|
|
/**
|
|
|
* Triggered when new babylon (transformed) hit test results are available
|
|
|
*/
|
|
|
- public onHitTestResultObservable: Observable<IWebXRHitResult[]> = new Observable();
|
|
|
+ public onHitTestResultObservable: Observable<IWebXRLegacyHitResult[]> = new Observable();
|
|
|
|
|
|
/**
|
|
|
* Creates a new instance of the (legacy version) hit test feature
|
|
@@ -76,7 +76,7 @@ export class WebXRHitTestLegacy extends WebXRAbstractFeature {
|
|
|
/**
|
|
|
* options to use when constructing this feature
|
|
|
*/
|
|
|
- public readonly options: IWebXRHitTestOptions = {}) {
|
|
|
+ public readonly options: IWebXRLegacyHitTestOptions = {}) {
|
|
|
super(_xrSessionManager);
|
|
|
}
|
|
|
|
|
@@ -204,4 +204,4 @@ export class WebXRHitTestLegacy extends WebXRAbstractFeature {
|
|
|
//register the plugin versions
|
|
|
WebXRFeaturesManager.AddWebXRFeature(WebXRHitTestLegacy.Name, (xrSessionManager, options) => {
|
|
|
return () => new WebXRHitTestLegacy(xrSessionManager, options);
|
|
|
-}, WebXRHitTestLegacy.Version, true);
|
|
|
+}, WebXRHitTestLegacy.Version, false);
|