فهرست منبع

rename interfaces while supporting existing ones

Raanan Weber 5 سال پیش
والد
کامیت
acc608a46d
1فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 6 6
      src/XR/features/WebXRHitTestLegacy.ts

+ 6 - 6
src/XR/features/WebXRHitTestLegacy.ts

@@ -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);