Переглянути джерело

fix doc, unregister anchor system

Raanan Weber 5 роки тому
батько
коміт
d30cb5b4d7

+ 1 - 0
src/Cameras/XR/features/WebXRAbstractFeature.ts

@@ -38,6 +38,7 @@ export abstract class WebXRAbstractFeature implements IWebXRFeature {
     /**
      * attach this feature
      *
+     * @param force should attachment be forced (even when already attached)
      * @returns true if successful, false is failed or already attached
      */
     public attach(force?: boolean): boolean {

+ 3 - 3
src/Cameras/XR/features/WebXRAnchorSystem.ts

@@ -260,6 +260,6 @@ export class WebXRAnchorSystem extends WebXRAbstractFeature {
 }
 
 //register the plugin
-WebXRFeaturesManager.AddWebXRFeature(WebXRAnchorSystem.Name, (xrSessionManager, options) => {
-    return () => new WebXRAnchorSystem(xrSessionManager, options);
-}, WebXRAnchorSystem.Version);
+// WebXRFeaturesManager.AddWebXRFeature(WebXRAnchorSystem.Name, (xrSessionManager, options) => {
+//     return () => new WebXRAnchorSystem(xrSessionManager, options);
+// }, WebXRAnchorSystem.Version);

+ 26 - 8
src/Cameras/XR/webXRFeaturesManager.ts

@@ -33,14 +33,32 @@ export interface IWebXRFeature extends IDisposable {
 /**
  * A list of the currently available features without referencing them
  */
-export const WebXRFeatureName: { [globalName: string]: string } = {
-    HIT_TEST: "xr-hit-test",
-    ANCHOR_SYSTEM: "xr-anchor-system",
-    BACKGROUND_REMOVER: "xr-background-remover",
-    POINTER_SELECTION: "xr-controller-pointer-selection",
-    TELEPORTATION: "xr-controller-teleportation",
-    PLANE_DETECTION: "xr-plane-detection"
-};
+export class WebXRFeatureName {
+    /**
+     * The name of the hit test feature
+     */
+    public static HIT_TEST = "xr-hit-test";
+    /**
+     * The name of the anchor system feature
+     */
+    public static ANCHOR_SYSTEM = "xr-anchor-system";
+    /**
+     * The name of the background remover feature
+     */
+    public static BACKGROUND_REMOVER = "xr-background-remover";
+    /**
+     * The name of the pointer selection feature
+     */
+    public static POINTER_SELECTION = "xr-controller-pointer-selection";
+    /**
+     * The name of the teleportation feature
+     */
+    public static TELEPORTATION = "xr-controller-teleportation";
+    /**
+     * The name of the plane detection feature
+     */
+    public static PLANE_DETECTION = "xr-plane-detection";
+}
 
 /**
  * Defining the constructor of a feature. Used to register the modules.