David Catuhe vor 5 Jahren
Ursprung
Commit
75109b9ffd
24 geänderte Dateien mit 612 neuen und 386 gelöschten Zeilen
  1. 58 22
      dist/preview release/babylon.d.ts
  2. 2 2
      dist/preview release/babylon.js
  3. 127 69
      dist/preview release/babylon.max.js
  4. 1 1
      dist/preview release/babylon.max.js.map
  5. 116 49
      dist/preview release/babylon.module.d.ts
  6. 58 22
      dist/preview release/documentation.d.ts
  7. 25 32
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  8. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.js.map
  9. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  10. 25 32
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  11. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.js.map
  12. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  13. 25 32
      dist/preview release/loaders/babylon.glTFFileLoader.js
  14. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.js.map
  15. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  16. 25 32
      dist/preview release/loaders/babylonjs.loaders.js
  17. 1 1
      dist/preview release/loaders/babylonjs.loaders.js.map
  18. 2 2
      dist/preview release/loaders/babylonjs.loaders.min.js
  19. 2 2
      dist/preview release/nodeEditor/babylon.nodeEditor.js
  20. 1 11
      dist/preview release/nodeEditor/babylon.nodeEditor.max.js
  21. 1 1
      dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map
  22. 116 49
      dist/preview release/viewer/babylon.module.d.ts
  23. 18 18
      dist/preview release/viewer/babylon.viewer.js
  24. 2 2
      dist/preview release/viewer/babylon.viewer.max.js

+ 58 - 22
dist/preview release/babylon.d.ts

@@ -42551,10 +42551,10 @@ declare module BABYLON {
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         /**
         /**
          * Sets the reference space on the xr session
          * Sets the reference space on the xr session
-         * @param referenceSpace space to set
+         * @param referenceSpaceType space to set
          * @returns a promise that will resolve once the reference space has been set
          * @returns a promise that will resolve once the reference space has been set
          */
          */
-        setReferenceSpaceAsync(referenceSpace?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
+        setReferenceSpaceTypeAsync(referenceSpaceType?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
         /**
         /**
          * Resets the reference space to the one started the session
          * Resets the reference space to the one started the session
          */
          */
@@ -42620,10 +42620,6 @@ declare module BABYLON {
      */
      */
     export class WebXRCamera extends FreeCamera {
     export class WebXRCamera extends FreeCamera {
         private _xrSessionManager;
         private _xrSessionManager;
-        /**
-         * Is the camera in debug mode. Used when using an emulator
-         */
-        debugMode: boolean;
         private _firstFrame;
         private _firstFrame;
         private _referencedPosition;
         private _referencedPosition;
         private _referenceQuaternion;
         private _referenceQuaternion;
@@ -42641,7 +42637,7 @@ declare module BABYLON {
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          */
          */
-        setTransformationFromNonVRCamera(otherCamera: Camera, resetToBaseReferenceSpace?: boolean): void;
+        setTransformationFromNonVRCamera(otherCamera?: Camera, resetToBaseReferenceSpace?: boolean): void;
         /** @hidden */
         /** @hidden */
         _updateForDualEyeDebugging(): void;
         _updateForDualEyeDebugging(): void;
         private _updateReferenceSpace;
         private _updateReferenceSpace;
@@ -42659,12 +42655,17 @@ declare module BABYLON {
          */
          */
         attached: boolean;
         attached: boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * Attach the feature to the session
          * Attach the feature to the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful.
          * @returns true if successful.
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * Detach the feature from the session
          * Detach the feature from the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
@@ -42674,6 +42675,35 @@ declare module BABYLON {
         detach(): boolean;
         detach(): boolean;
     }
     }
     /**
     /**
+     * A list of the currently available features without referencing them
+     */
+    export class WebXRFeatureName {
+        /**
+         * The name of the hit test feature
+         */
+        static HIT_TEST: string;
+        /**
+         * The name of the anchor system feature
+         */
+        static ANCHOR_SYSTEM: string;
+        /**
+         * The name of the background remover feature
+         */
+        static BACKGROUND_REMOVER: string;
+        /**
+         * The name of the pointer selection feature
+         */
+        static POINTER_SELECTION: string;
+        /**
+         * The name of the teleportation feature
+         */
+        static TELEPORTATION: string;
+        /**
+         * The name of the plane detection feature
+         */
+        static PLANE_DETECTION: string;
+    }
+    /**
      * Defining the constructor of a feature. Used to register the modules.
      * Defining the constructor of a feature. Used to register the modules.
      */
      */
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
@@ -43963,11 +43993,16 @@ declare module BABYLON {
          */
          */
         get attached(): boolean;
         get attached(): boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * attach this feature
          * attach this feature
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful, false is failed or already attached
          * @returns true if successful, false is failed or already attached
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * detach this feature.
          * detach this feature.
          *
          *
@@ -43983,7 +44018,7 @@ declare module BABYLON {
          * This function will not execute after the feature is detached.
          * This function will not execute after the feature is detached.
          * @param _xrFrame the current frame
          * @param _xrFrame the current frame
          */
          */
-        protected _onXRFrame(_xrFrame: XRFrame): void;
+        protected abstract _onXRFrame(_xrFrame: XRFrame): void;
         /**
         /**
          * This is used to register callbacks that will automatically be removed when detach is called.
          * This is used to register callbacks that will automatically be removed when detach is called.
          * @param observable the observable to which the observer will be attached
          * @param observable the observable to which the observer will be attached
@@ -44032,12 +44067,12 @@ declare module BABYLON {
     /**
     /**
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      */
      */
-    export class WebXRControllerPointerSelection extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
         private readonly _options;
         private readonly _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -44352,12 +44387,12 @@ declare module BABYLON {
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * the input of the attached controllers.
      * the input of the attached controllers.
      */
      */
-    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -44966,7 +45001,7 @@ declare module BABYLON {
      * Hit test (or raycasting) is used to interact with the real world.
      * Hit test (or raycasting) is used to interact with the real world.
      * For further information read here - https://github.com/immersive-web/hit-test
      * For further information read here - https://github.com/immersive-web/hit-test
      */
      */
-    export class WebXRHitTestLegacy extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRHitTestLegacy extends WebXRAbstractFeature {
         /**
         /**
          * options to use when constructing this feature
          * options to use when constructing this feature
          */
          */
@@ -44974,7 +45009,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45080,12 +45115,12 @@ declare module BABYLON {
      * The plane detector is used to detect planes in the real world when in AR
      * The plane detector is used to detect planes in the real world when in AR
      * For more information see https://github.com/immersive-web/real-world-geometry/
      * For more information see https://github.com/immersive-web/real-world-geometry/
      */
      */
-    export class WebXRPlaneDetector extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRPlaneDetector extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45169,12 +45204,12 @@ declare module BABYLON {
      * will use the frame to create an anchor and not the session or a detected plane
      * will use the frame to create an anchor and not the session or a detected plane
      * For further information see https://github.com/immersive-web/anchors/
      * For further information see https://github.com/immersive-web/anchors/
      */
      */
-    export class WebXRAnchorSystem extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRAnchorSystem extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45283,7 +45318,7 @@ declare module BABYLON {
     /**
     /**
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      */
      */
-    export class WebXRBackgroundRemover extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRBackgroundRemover extends WebXRAbstractFeature {
         /**
         /**
          * read-only options to be used in this module
          * read-only options to be used in this module
          */
          */
@@ -45291,7 +45326,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45331,6 +45366,7 @@ declare module BABYLON {
          * Dispose this feature and all of the resources attached
          * Dispose this feature and all of the resources attached
          */
          */
         dispose(): void;
         dispose(): void;
+        protected _onXRFrame(_xrFrame: XRFrame): void;
     }
     }
 }
 }
 declare module BABYLON {
 declare module BABYLON {

Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 2
dist/preview release/babylon.js


Datei-Diff unterdrückt, da er zu groß ist
+ 127 - 69
dist/preview release/babylon.max.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 116 - 49
dist/preview release/babylon.module.d.ts

@@ -44033,10 +44033,10 @@ declare module "babylonjs/Cameras/XR/webXRSessionManager" {
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         /**
         /**
          * Sets the reference space on the xr session
          * Sets the reference space on the xr session
-         * @param referenceSpace space to set
+         * @param referenceSpaceType space to set
          * @returns a promise that will resolve once the reference space has been set
          * @returns a promise that will resolve once the reference space has been set
          */
          */
-        setReferenceSpaceAsync(referenceSpace?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
+        setReferenceSpaceTypeAsync(referenceSpaceType?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
         /**
         /**
          * Resets the reference space to the one started the session
          * Resets the reference space to the one started the session
          */
          */
@@ -44106,10 +44106,6 @@ declare module "babylonjs/Cameras/XR/webXRCamera" {
      */
      */
     export class WebXRCamera extends FreeCamera {
     export class WebXRCamera extends FreeCamera {
         private _xrSessionManager;
         private _xrSessionManager;
-        /**
-         * Is the camera in debug mode. Used when using an emulator
-         */
-        debugMode: boolean;
         private _firstFrame;
         private _firstFrame;
         private _referencedPosition;
         private _referencedPosition;
         private _referenceQuaternion;
         private _referenceQuaternion;
@@ -44127,7 +44123,7 @@ declare module "babylonjs/Cameras/XR/webXRCamera" {
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          */
          */
-        setTransformationFromNonVRCamera(otherCamera: Camera, resetToBaseReferenceSpace?: boolean): void;
+        setTransformationFromNonVRCamera(otherCamera?: Camera, resetToBaseReferenceSpace?: boolean): void;
         /** @hidden */
         /** @hidden */
         _updateForDualEyeDebugging(): void;
         _updateForDualEyeDebugging(): void;
         private _updateReferenceSpace;
         private _updateReferenceSpace;
@@ -44147,12 +44143,17 @@ declare module "babylonjs/Cameras/XR/webXRFeaturesManager" {
          */
          */
         attached: boolean;
         attached: boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * Attach the feature to the session
          * Attach the feature to the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful.
          * @returns true if successful.
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * Detach the feature from the session
          * Detach the feature from the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
@@ -44162,6 +44163,35 @@ declare module "babylonjs/Cameras/XR/webXRFeaturesManager" {
         detach(): boolean;
         detach(): boolean;
     }
     }
     /**
     /**
+     * A list of the currently available features without referencing them
+     */
+    export class WebXRFeatureName {
+        /**
+         * The name of the hit test feature
+         */
+        static HIT_TEST: string;
+        /**
+         * The name of the anchor system feature
+         */
+        static ANCHOR_SYSTEM: string;
+        /**
+         * The name of the background remover feature
+         */
+        static BACKGROUND_REMOVER: string;
+        /**
+         * The name of the pointer selection feature
+         */
+        static POINTER_SELECTION: string;
+        /**
+         * The name of the teleportation feature
+         */
+        static TELEPORTATION: string;
+        /**
+         * The name of the plane detection feature
+         */
+        static PLANE_DETECTION: string;
+    }
+    /**
      * Defining the constructor of a feature. Used to register the modules.
      * Defining the constructor of a feature. Used to register the modules.
      */
      */
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
@@ -45494,11 +45524,16 @@ declare module "babylonjs/Cameras/XR/features/WebXRAbstractFeature" {
          */
          */
         get attached(): boolean;
         get attached(): boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * attach this feature
          * attach this feature
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful, false is failed or already attached
          * @returns true if successful, false is failed or already attached
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * detach this feature.
          * detach this feature.
          *
          *
@@ -45514,7 +45549,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRAbstractFeature" {
          * This function will not execute after the feature is detached.
          * This function will not execute after the feature is detached.
          * @param _xrFrame the current frame
          * @param _xrFrame the current frame
          */
          */
-        protected _onXRFrame(_xrFrame: XRFrame): void;
+        protected abstract _onXRFrame(_xrFrame: XRFrame): void;
         /**
         /**
          * This is used to register callbacks that will automatically be removed when detach is called.
          * This is used to register callbacks that will automatically be removed when detach is called.
          * @param observable the observable to which the observer will be attached
          * @param observable the observable to which the observer will be attached
@@ -45524,7 +45559,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRAbstractFeature" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRControllerPointerSelection" {
 declare module "babylonjs/Cameras/XR/features/WebXRControllerPointerSelection" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRInput } from "babylonjs/Cameras/XR/webXRInput";
     import { WebXRInput } from "babylonjs/Cameras/XR/webXRInput";
     import { WebXRController } from "babylonjs/Cameras/XR/webXRController";
     import { WebXRController } from "babylonjs/Cameras/XR/webXRController";
@@ -45570,12 +45604,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRControllerPointerSelection" {
     /**
     /**
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      */
      */
-    export class WebXRControllerPointerSelection extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
         private readonly _options;
         private readonly _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45906,12 +45940,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRControllerTeleportation" {
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * the input of the attached controllers.
      * the input of the attached controllers.
      */
      */
-    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46527,7 +46561,6 @@ declare module "babylonjs/Cameras/VR/index" {
     export * from "babylonjs/Cameras/VR/webVRCamera";
     export * from "babylonjs/Cameras/VR/webVRCamera";
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
 declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
     import { Matrix } from "babylonjs/Maths/math.vector";
     import { Matrix } from "babylonjs/Maths/math.vector";
@@ -46564,7 +46597,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
      * Hit test (or raycasting) is used to interact with the real world.
      * Hit test (or raycasting) is used to interact with the real world.
      * For further information read here - https://github.com/immersive-web/hit-test
      * For further information read here - https://github.com/immersive-web/hit-test
      */
      */
-    export class WebXRHitTestLegacy extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRHitTestLegacy extends WebXRAbstractFeature {
         /**
         /**
          * options to use when constructing this feature
          * options to use when constructing this feature
          */
          */
@@ -46572,7 +46605,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46642,7 +46675,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
 declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { TransformNode } from "babylonjs/Meshes/transformNode";
     import { TransformNode } from "babylonjs/Meshes/transformNode";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
@@ -46684,12 +46716,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
      * The plane detector is used to detect planes in the real world when in AR
      * The plane detector is used to detect planes in the real world when in AR
      * For more information see https://github.com/immersive-web/real-world-geometry/
      * For more information see https://github.com/immersive-web/real-world-geometry/
      */
      */
-    export class WebXRPlaneDetector extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRPlaneDetector extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46732,7 +46764,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
 declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
     import { Matrix } from "babylonjs/Maths/math.vector";
     import { Matrix } from "babylonjs/Maths/math.vector";
@@ -46781,12 +46812,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
      * will use the frame to create an anchor and not the session or a detected plane
      * will use the frame to create an anchor and not the session or a detected plane
      * For further information see https://github.com/immersive-web/anchors/
      * For further information see https://github.com/immersive-web/anchors/
      */
      */
-    export class WebXRAnchorSystem extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRAnchorSystem extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46865,7 +46896,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
 declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
@@ -46900,7 +46930,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
     /**
     /**
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      */
      */
-    export class WebXRBackgroundRemover extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRBackgroundRemover extends WebXRAbstractFeature {
         /**
         /**
          * read-only options to be used in this module
          * read-only options to be used in this module
          */
          */
@@ -46908,7 +46938,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46948,6 +46978,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
          * Dispose this feature and all of the resources attached
          * Dispose this feature and all of the resources attached
          */
          */
         dispose(): void;
         dispose(): void;
+        protected _onXRFrame(_xrFrame: XRFrame): void;
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/index" {
 declare module "babylonjs/Cameras/XR/features/index" {
@@ -115018,10 +115049,10 @@ declare module BABYLON {
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         /**
         /**
          * Sets the reference space on the xr session
          * Sets the reference space on the xr session
-         * @param referenceSpace space to set
+         * @param referenceSpaceType space to set
          * @returns a promise that will resolve once the reference space has been set
          * @returns a promise that will resolve once the reference space has been set
          */
          */
-        setReferenceSpaceAsync(referenceSpace?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
+        setReferenceSpaceTypeAsync(referenceSpaceType?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
         /**
         /**
          * Resets the reference space to the one started the session
          * Resets the reference space to the one started the session
          */
          */
@@ -115087,10 +115118,6 @@ declare module BABYLON {
      */
      */
     export class WebXRCamera extends FreeCamera {
     export class WebXRCamera extends FreeCamera {
         private _xrSessionManager;
         private _xrSessionManager;
-        /**
-         * Is the camera in debug mode. Used when using an emulator
-         */
-        debugMode: boolean;
         private _firstFrame;
         private _firstFrame;
         private _referencedPosition;
         private _referencedPosition;
         private _referenceQuaternion;
         private _referenceQuaternion;
@@ -115108,7 +115135,7 @@ declare module BABYLON {
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          */
          */
-        setTransformationFromNonVRCamera(otherCamera: Camera, resetToBaseReferenceSpace?: boolean): void;
+        setTransformationFromNonVRCamera(otherCamera?: Camera, resetToBaseReferenceSpace?: boolean): void;
         /** @hidden */
         /** @hidden */
         _updateForDualEyeDebugging(): void;
         _updateForDualEyeDebugging(): void;
         private _updateReferenceSpace;
         private _updateReferenceSpace;
@@ -115126,12 +115153,17 @@ declare module BABYLON {
          */
          */
         attached: boolean;
         attached: boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * Attach the feature to the session
          * Attach the feature to the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful.
          * @returns true if successful.
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * Detach the feature from the session
          * Detach the feature from the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
@@ -115141,6 +115173,35 @@ declare module BABYLON {
         detach(): boolean;
         detach(): boolean;
     }
     }
     /**
     /**
+     * A list of the currently available features without referencing them
+     */
+    export class WebXRFeatureName {
+        /**
+         * The name of the hit test feature
+         */
+        static HIT_TEST: string;
+        /**
+         * The name of the anchor system feature
+         */
+        static ANCHOR_SYSTEM: string;
+        /**
+         * The name of the background remover feature
+         */
+        static BACKGROUND_REMOVER: string;
+        /**
+         * The name of the pointer selection feature
+         */
+        static POINTER_SELECTION: string;
+        /**
+         * The name of the teleportation feature
+         */
+        static TELEPORTATION: string;
+        /**
+         * The name of the plane detection feature
+         */
+        static PLANE_DETECTION: string;
+    }
+    /**
      * Defining the constructor of a feature. Used to register the modules.
      * Defining the constructor of a feature. Used to register the modules.
      */
      */
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
@@ -116430,11 +116491,16 @@ declare module BABYLON {
          */
          */
         get attached(): boolean;
         get attached(): boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * attach this feature
          * attach this feature
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful, false is failed or already attached
          * @returns true if successful, false is failed or already attached
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * detach this feature.
          * detach this feature.
          *
          *
@@ -116450,7 +116516,7 @@ declare module BABYLON {
          * This function will not execute after the feature is detached.
          * This function will not execute after the feature is detached.
          * @param _xrFrame the current frame
          * @param _xrFrame the current frame
          */
          */
-        protected _onXRFrame(_xrFrame: XRFrame): void;
+        protected abstract _onXRFrame(_xrFrame: XRFrame): void;
         /**
         /**
          * This is used to register callbacks that will automatically be removed when detach is called.
          * This is used to register callbacks that will automatically be removed when detach is called.
          * @param observable the observable to which the observer will be attached
          * @param observable the observable to which the observer will be attached
@@ -116499,12 +116565,12 @@ declare module BABYLON {
     /**
     /**
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      */
      */
-    export class WebXRControllerPointerSelection extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
         private readonly _options;
         private readonly _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -116819,12 +116885,12 @@ declare module BABYLON {
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * the input of the attached controllers.
      * the input of the attached controllers.
      */
      */
-    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117433,7 +117499,7 @@ declare module BABYLON {
      * Hit test (or raycasting) is used to interact with the real world.
      * Hit test (or raycasting) is used to interact with the real world.
      * For further information read here - https://github.com/immersive-web/hit-test
      * For further information read here - https://github.com/immersive-web/hit-test
      */
      */
-    export class WebXRHitTestLegacy extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRHitTestLegacy extends WebXRAbstractFeature {
         /**
         /**
          * options to use when constructing this feature
          * options to use when constructing this feature
          */
          */
@@ -117441,7 +117507,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117547,12 +117613,12 @@ declare module BABYLON {
      * The plane detector is used to detect planes in the real world when in AR
      * The plane detector is used to detect planes in the real world when in AR
      * For more information see https://github.com/immersive-web/real-world-geometry/
      * For more information see https://github.com/immersive-web/real-world-geometry/
      */
      */
-    export class WebXRPlaneDetector extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRPlaneDetector extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117636,12 +117702,12 @@ declare module BABYLON {
      * will use the frame to create an anchor and not the session or a detected plane
      * will use the frame to create an anchor and not the session or a detected plane
      * For further information see https://github.com/immersive-web/anchors/
      * For further information see https://github.com/immersive-web/anchors/
      */
      */
-    export class WebXRAnchorSystem extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRAnchorSystem extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117750,7 +117816,7 @@ declare module BABYLON {
     /**
     /**
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      */
      */
-    export class WebXRBackgroundRemover extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRBackgroundRemover extends WebXRAbstractFeature {
         /**
         /**
          * read-only options to be used in this module
          * read-only options to be used in this module
          */
          */
@@ -117758,7 +117824,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117798,6 +117864,7 @@ declare module BABYLON {
          * Dispose this feature and all of the resources attached
          * Dispose this feature and all of the resources attached
          */
          */
         dispose(): void;
         dispose(): void;
+        protected _onXRFrame(_xrFrame: XRFrame): void;
     }
     }
 }
 }
 declare module BABYLON {
 declare module BABYLON {

+ 58 - 22
dist/preview release/documentation.d.ts

@@ -42551,10 +42551,10 @@ declare module BABYLON {
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         /**
         /**
          * Sets the reference space on the xr session
          * Sets the reference space on the xr session
-         * @param referenceSpace space to set
+         * @param referenceSpaceType space to set
          * @returns a promise that will resolve once the reference space has been set
          * @returns a promise that will resolve once the reference space has been set
          */
          */
-        setReferenceSpaceAsync(referenceSpace?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
+        setReferenceSpaceTypeAsync(referenceSpaceType?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
         /**
         /**
          * Resets the reference space to the one started the session
          * Resets the reference space to the one started the session
          */
          */
@@ -42620,10 +42620,6 @@ declare module BABYLON {
      */
      */
     export class WebXRCamera extends FreeCamera {
     export class WebXRCamera extends FreeCamera {
         private _xrSessionManager;
         private _xrSessionManager;
-        /**
-         * Is the camera in debug mode. Used when using an emulator
-         */
-        debugMode: boolean;
         private _firstFrame;
         private _firstFrame;
         private _referencedPosition;
         private _referencedPosition;
         private _referenceQuaternion;
         private _referenceQuaternion;
@@ -42641,7 +42637,7 @@ declare module BABYLON {
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          */
          */
-        setTransformationFromNonVRCamera(otherCamera: Camera, resetToBaseReferenceSpace?: boolean): void;
+        setTransformationFromNonVRCamera(otherCamera?: Camera, resetToBaseReferenceSpace?: boolean): void;
         /** @hidden */
         /** @hidden */
         _updateForDualEyeDebugging(): void;
         _updateForDualEyeDebugging(): void;
         private _updateReferenceSpace;
         private _updateReferenceSpace;
@@ -42659,12 +42655,17 @@ declare module BABYLON {
          */
          */
         attached: boolean;
         attached: boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * Attach the feature to the session
          * Attach the feature to the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful.
          * @returns true if successful.
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * Detach the feature from the session
          * Detach the feature from the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
@@ -42674,6 +42675,35 @@ declare module BABYLON {
         detach(): boolean;
         detach(): boolean;
     }
     }
     /**
     /**
+     * A list of the currently available features without referencing them
+     */
+    export class WebXRFeatureName {
+        /**
+         * The name of the hit test feature
+         */
+        static HIT_TEST: string;
+        /**
+         * The name of the anchor system feature
+         */
+        static ANCHOR_SYSTEM: string;
+        /**
+         * The name of the background remover feature
+         */
+        static BACKGROUND_REMOVER: string;
+        /**
+         * The name of the pointer selection feature
+         */
+        static POINTER_SELECTION: string;
+        /**
+         * The name of the teleportation feature
+         */
+        static TELEPORTATION: string;
+        /**
+         * The name of the plane detection feature
+         */
+        static PLANE_DETECTION: string;
+    }
+    /**
      * Defining the constructor of a feature. Used to register the modules.
      * Defining the constructor of a feature. Used to register the modules.
      */
      */
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
@@ -43963,11 +43993,16 @@ declare module BABYLON {
          */
          */
         get attached(): boolean;
         get attached(): boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * attach this feature
          * attach this feature
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful, false is failed or already attached
          * @returns true if successful, false is failed or already attached
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * detach this feature.
          * detach this feature.
          *
          *
@@ -43983,7 +44018,7 @@ declare module BABYLON {
          * This function will not execute after the feature is detached.
          * This function will not execute after the feature is detached.
          * @param _xrFrame the current frame
          * @param _xrFrame the current frame
          */
          */
-        protected _onXRFrame(_xrFrame: XRFrame): void;
+        protected abstract _onXRFrame(_xrFrame: XRFrame): void;
         /**
         /**
          * This is used to register callbacks that will automatically be removed when detach is called.
          * This is used to register callbacks that will automatically be removed when detach is called.
          * @param observable the observable to which the observer will be attached
          * @param observable the observable to which the observer will be attached
@@ -44032,12 +44067,12 @@ declare module BABYLON {
     /**
     /**
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      */
      */
-    export class WebXRControllerPointerSelection extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
         private readonly _options;
         private readonly _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -44352,12 +44387,12 @@ declare module BABYLON {
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * the input of the attached controllers.
      * the input of the attached controllers.
      */
      */
-    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -44966,7 +45001,7 @@ declare module BABYLON {
      * Hit test (or raycasting) is used to interact with the real world.
      * Hit test (or raycasting) is used to interact with the real world.
      * For further information read here - https://github.com/immersive-web/hit-test
      * For further information read here - https://github.com/immersive-web/hit-test
      */
      */
-    export class WebXRHitTestLegacy extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRHitTestLegacy extends WebXRAbstractFeature {
         /**
         /**
          * options to use when constructing this feature
          * options to use when constructing this feature
          */
          */
@@ -44974,7 +45009,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45080,12 +45115,12 @@ declare module BABYLON {
      * The plane detector is used to detect planes in the real world when in AR
      * The plane detector is used to detect planes in the real world when in AR
      * For more information see https://github.com/immersive-web/real-world-geometry/
      * For more information see https://github.com/immersive-web/real-world-geometry/
      */
      */
-    export class WebXRPlaneDetector extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRPlaneDetector extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45169,12 +45204,12 @@ declare module BABYLON {
      * will use the frame to create an anchor and not the session or a detected plane
      * will use the frame to create an anchor and not the session or a detected plane
      * For further information see https://github.com/immersive-web/anchors/
      * For further information see https://github.com/immersive-web/anchors/
      */
      */
-    export class WebXRAnchorSystem extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRAnchorSystem extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45283,7 +45318,7 @@ declare module BABYLON {
     /**
     /**
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      */
      */
-    export class WebXRBackgroundRemover extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRBackgroundRemover extends WebXRAbstractFeature {
         /**
         /**
          * read-only options to be used in this module
          * read-only options to be used in this module
          */
          */
@@ -45291,7 +45326,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45331,6 +45366,7 @@ declare module BABYLON {
          * Dispose this feature and all of the resources attached
          * Dispose this feature and all of the resources attached
          */
          */
         dispose(): void;
         dispose(): void;
+        protected _onXRFrame(_xrFrame: XRFrame): void;
     }
     }
 }
 }
 declare module BABYLON {
 declare module BABYLON {

+ 25 - 32
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -3095,7 +3095,10 @@ var GLTFFileLoader = /** @class */ (function () {
                     readAsync: function (byteOffset, byteLength) {
                     readAsync: function (byteOffset, byteLength) {
                         return new Promise(function (resolve, reject) {
                         return new Promise(function (resolve, reject) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
-                                dataBuffer_1.byteLength = Number(webRequest.getResponseHeader("Content-Range").split("/")[1]);
+                                var contentRange = webRequest.getResponseHeader("Content-Range");
+                                if (contentRange) {
+                                    dataBuffer_1.byteLength = Number(contentRange.split("/")[1]);
+                                }
                                 resolve(new Uint8Array(data));
                                 resolve(new Uint8Array(data));
                             }, onProgress, true, true, function (error) {
                             }, onProgress, true, true, function (error) {
                                 reject(error);
                                 reject(error);
@@ -3306,17 +3309,17 @@ var GLTFFileLoader = /** @class */ (function () {
                 _this._log("Binary version: " + version);
                 _this._log("Binary version: " + version);
             }
             }
             var length = dataReader.readUint32();
             var length = dataReader.readUint32();
-            if (length !== dataReader.buffer.byteLength) {
+            if (dataReader.buffer.byteLength != 0 && length !== dataReader.buffer.byteLength) {
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
             }
             }
             var unpacked;
             var unpacked;
             switch (version) {
             switch (version) {
                 case 1: {
                 case 1: {
-                    unpacked = _this._unpackBinaryV1Async(dataReader);
+                    unpacked = _this._unpackBinaryV1Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 case 2: {
                 case 2: {
-                    unpacked = _this._unpackBinaryV2Async(dataReader);
+                    unpacked = _this._unpackBinaryV2Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 default: {
                 default: {
@@ -3327,7 +3330,7 @@ var GLTFFileLoader = /** @class */ (function () {
             return unpacked;
             return unpacked;
         });
         });
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader, length) {
         var ContentFormat = {
         var ContentFormat = {
             JSON: 0
             JSON: 0
         };
         };
@@ -3336,7 +3339,7 @@ var GLTFFileLoader = /** @class */ (function () {
         if (contentFormat !== ContentFormat.JSON) {
         if (contentFormat !== ContentFormat.JSON) {
             throw new Error("Unexpected content format: " + contentFormat);
             throw new Error("Unexpected content format: " + contentFormat);
         }
         }
-        var bodyLength = dataReader.buffer.byteLength - dataReader.byteOffset;
+        var bodyLength = length - dataReader.byteOffset;
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         if (bodyLength !== 0) {
         if (bodyLength !== 0) {
             var startByteOffset_1 = dataReader.byteOffset;
             var startByteOffset_1 = dataReader.byteOffset;
@@ -3347,33 +3350,23 @@ var GLTFFileLoader = /** @class */ (function () {
         }
         }
         return Promise.resolve(data);
         return Promise.resolve(data);
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader, length) {
         var _this = this;
         var _this = this;
         var ChunkFormat = {
         var ChunkFormat = {
             JSON: 0x4E4F534A,
             JSON: 0x4E4F534A,
             BIN: 0x004E4942
             BIN: 0x004E4942
         };
         };
-        // Read the JSON chunk header.
-        var chunkLength = dataReader.readUint32();
-        var chunkFormat = dataReader.readUint32();
-        if (chunkFormat !== ChunkFormat.JSON) {
-            throw new Error("First chunk format is not JSON");
-        }
-        // Bail if there are no other chunks.
-        if (dataReader.byteOffset + chunkLength === dataReader.buffer.byteLength) {
-            return dataReader.loadAsync(chunkLength).then(function () {
-                return { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            });
-        }
-        // Read the JSON chunk and the length and type of the next chunk.
-        return dataReader.loadAsync(chunkLength + 8).then(function () {
-            var data = { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            var readAsync = function () {
-                var chunkLength = dataReader.readUint32();
-                var chunkFormat = dataReader.readUint32();
+        var data = { json: {}, bin: null };
+        var readAsync = function () {
+            var chunkLength = dataReader.readUint32();
+            var chunkFormat = dataReader.readUint32();
+            var finalChunk = (dataReader.byteOffset + chunkLength + 8 > length);
+            // Read the chunk and (if available) the length and type of the next chunk.
+            return dataReader.loadAsync(finalChunk ? chunkLength : chunkLength + 8).then(function () {
                 switch (chunkFormat) {
                 switch (chunkFormat) {
                     case ChunkFormat.JSON: {
                     case ChunkFormat.JSON: {
-                        throw new Error("Unexpected JSON chunk");
+                        data.json = _this._parseJson(dataReader.readString(chunkLength));
+                        break;
                     }
                     }
                     case ChunkFormat.BIN: {
                     case ChunkFormat.BIN: {
                         var startByteOffset_2 = dataReader.byteOffset;
                         var startByteOffset_2 = dataReader.byteOffset;
@@ -3390,13 +3383,13 @@ var GLTFFileLoader = /** @class */ (function () {
                         break;
                         break;
                     }
                     }
                 }
                 }
-                if (dataReader.byteOffset !== dataReader.buffer.byteLength) {
-                    return dataReader.loadAsync(8).then(readAsync);
+                if (finalChunk) {
+                    return data;
                 }
                 }
-                return Promise.resolve(data);
-            };
-            return readAsync();
-        });
+                return readAsync();
+            });
+        };
+        return readAsync();
     };
     };
     GLTFFileLoader._parseVersion = function (version) {
     GLTFFileLoader._parseVersion = function (version) {
         if (version === "1.0" || version === "1.0.1") {
         if (version === "1.0" || version === "1.0.1") {

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 25 - 32
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -4345,7 +4345,10 @@ var GLTFFileLoader = /** @class */ (function () {
                     readAsync: function (byteOffset, byteLength) {
                     readAsync: function (byteOffset, byteLength) {
                         return new Promise(function (resolve, reject) {
                         return new Promise(function (resolve, reject) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
-                                dataBuffer_1.byteLength = Number(webRequest.getResponseHeader("Content-Range").split("/")[1]);
+                                var contentRange = webRequest.getResponseHeader("Content-Range");
+                                if (contentRange) {
+                                    dataBuffer_1.byteLength = Number(contentRange.split("/")[1]);
+                                }
                                 resolve(new Uint8Array(data));
                                 resolve(new Uint8Array(data));
                             }, onProgress, true, true, function (error) {
                             }, onProgress, true, true, function (error) {
                                 reject(error);
                                 reject(error);
@@ -4556,17 +4559,17 @@ var GLTFFileLoader = /** @class */ (function () {
                 _this._log("Binary version: " + version);
                 _this._log("Binary version: " + version);
             }
             }
             var length = dataReader.readUint32();
             var length = dataReader.readUint32();
-            if (length !== dataReader.buffer.byteLength) {
+            if (dataReader.buffer.byteLength != 0 && length !== dataReader.buffer.byteLength) {
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
             }
             }
             var unpacked;
             var unpacked;
             switch (version) {
             switch (version) {
                 case 1: {
                 case 1: {
-                    unpacked = _this._unpackBinaryV1Async(dataReader);
+                    unpacked = _this._unpackBinaryV1Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 case 2: {
                 case 2: {
-                    unpacked = _this._unpackBinaryV2Async(dataReader);
+                    unpacked = _this._unpackBinaryV2Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 default: {
                 default: {
@@ -4577,7 +4580,7 @@ var GLTFFileLoader = /** @class */ (function () {
             return unpacked;
             return unpacked;
         });
         });
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader, length) {
         var ContentFormat = {
         var ContentFormat = {
             JSON: 0
             JSON: 0
         };
         };
@@ -4586,7 +4589,7 @@ var GLTFFileLoader = /** @class */ (function () {
         if (contentFormat !== ContentFormat.JSON) {
         if (contentFormat !== ContentFormat.JSON) {
             throw new Error("Unexpected content format: " + contentFormat);
             throw new Error("Unexpected content format: " + contentFormat);
         }
         }
-        var bodyLength = dataReader.buffer.byteLength - dataReader.byteOffset;
+        var bodyLength = length - dataReader.byteOffset;
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         if (bodyLength !== 0) {
         if (bodyLength !== 0) {
             var startByteOffset_1 = dataReader.byteOffset;
             var startByteOffset_1 = dataReader.byteOffset;
@@ -4597,33 +4600,23 @@ var GLTFFileLoader = /** @class */ (function () {
         }
         }
         return Promise.resolve(data);
         return Promise.resolve(data);
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader, length) {
         var _this = this;
         var _this = this;
         var ChunkFormat = {
         var ChunkFormat = {
             JSON: 0x4E4F534A,
             JSON: 0x4E4F534A,
             BIN: 0x004E4942
             BIN: 0x004E4942
         };
         };
-        // Read the JSON chunk header.
-        var chunkLength = dataReader.readUint32();
-        var chunkFormat = dataReader.readUint32();
-        if (chunkFormat !== ChunkFormat.JSON) {
-            throw new Error("First chunk format is not JSON");
-        }
-        // Bail if there are no other chunks.
-        if (dataReader.byteOffset + chunkLength === dataReader.buffer.byteLength) {
-            return dataReader.loadAsync(chunkLength).then(function () {
-                return { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            });
-        }
-        // Read the JSON chunk and the length and type of the next chunk.
-        return dataReader.loadAsync(chunkLength + 8).then(function () {
-            var data = { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            var readAsync = function () {
-                var chunkLength = dataReader.readUint32();
-                var chunkFormat = dataReader.readUint32();
+        var data = { json: {}, bin: null };
+        var readAsync = function () {
+            var chunkLength = dataReader.readUint32();
+            var chunkFormat = dataReader.readUint32();
+            var finalChunk = (dataReader.byteOffset + chunkLength + 8 > length);
+            // Read the chunk and (if available) the length and type of the next chunk.
+            return dataReader.loadAsync(finalChunk ? chunkLength : chunkLength + 8).then(function () {
                 switch (chunkFormat) {
                 switch (chunkFormat) {
                     case ChunkFormat.JSON: {
                     case ChunkFormat.JSON: {
-                        throw new Error("Unexpected JSON chunk");
+                        data.json = _this._parseJson(dataReader.readString(chunkLength));
+                        break;
                     }
                     }
                     case ChunkFormat.BIN: {
                     case ChunkFormat.BIN: {
                         var startByteOffset_2 = dataReader.byteOffset;
                         var startByteOffset_2 = dataReader.byteOffset;
@@ -4640,13 +4633,13 @@ var GLTFFileLoader = /** @class */ (function () {
                         break;
                         break;
                     }
                     }
                 }
                 }
-                if (dataReader.byteOffset !== dataReader.buffer.byteLength) {
-                    return dataReader.loadAsync(8).then(readAsync);
+                if (finalChunk) {
+                    return data;
                 }
                 }
-                return Promise.resolve(data);
-            };
-            return readAsync();
-        });
+                return readAsync();
+            });
+        };
+        return readAsync();
     };
     };
     GLTFFileLoader._parseVersion = function (version) {
     GLTFFileLoader._parseVersion = function (version) {
         if (version === "1.0" || version === "1.0.1") {
         if (version === "1.0" || version === "1.0.1") {

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 25 - 32
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -6905,7 +6905,10 @@ var GLTFFileLoader = /** @class */ (function () {
                     readAsync: function (byteOffset, byteLength) {
                     readAsync: function (byteOffset, byteLength) {
                         return new Promise(function (resolve, reject) {
                         return new Promise(function (resolve, reject) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
-                                dataBuffer_1.byteLength = Number(webRequest.getResponseHeader("Content-Range").split("/")[1]);
+                                var contentRange = webRequest.getResponseHeader("Content-Range");
+                                if (contentRange) {
+                                    dataBuffer_1.byteLength = Number(contentRange.split("/")[1]);
+                                }
                                 resolve(new Uint8Array(data));
                                 resolve(new Uint8Array(data));
                             }, onProgress, true, true, function (error) {
                             }, onProgress, true, true, function (error) {
                                 reject(error);
                                 reject(error);
@@ -7116,17 +7119,17 @@ var GLTFFileLoader = /** @class */ (function () {
                 _this._log("Binary version: " + version);
                 _this._log("Binary version: " + version);
             }
             }
             var length = dataReader.readUint32();
             var length = dataReader.readUint32();
-            if (length !== dataReader.buffer.byteLength) {
+            if (dataReader.buffer.byteLength != 0 && length !== dataReader.buffer.byteLength) {
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
             }
             }
             var unpacked;
             var unpacked;
             switch (version) {
             switch (version) {
                 case 1: {
                 case 1: {
-                    unpacked = _this._unpackBinaryV1Async(dataReader);
+                    unpacked = _this._unpackBinaryV1Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 case 2: {
                 case 2: {
-                    unpacked = _this._unpackBinaryV2Async(dataReader);
+                    unpacked = _this._unpackBinaryV2Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 default: {
                 default: {
@@ -7137,7 +7140,7 @@ var GLTFFileLoader = /** @class */ (function () {
             return unpacked;
             return unpacked;
         });
         });
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader, length) {
         var ContentFormat = {
         var ContentFormat = {
             JSON: 0
             JSON: 0
         };
         };
@@ -7146,7 +7149,7 @@ var GLTFFileLoader = /** @class */ (function () {
         if (contentFormat !== ContentFormat.JSON) {
         if (contentFormat !== ContentFormat.JSON) {
             throw new Error("Unexpected content format: " + contentFormat);
             throw new Error("Unexpected content format: " + contentFormat);
         }
         }
-        var bodyLength = dataReader.buffer.byteLength - dataReader.byteOffset;
+        var bodyLength = length - dataReader.byteOffset;
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         if (bodyLength !== 0) {
         if (bodyLength !== 0) {
             var startByteOffset_1 = dataReader.byteOffset;
             var startByteOffset_1 = dataReader.byteOffset;
@@ -7157,33 +7160,23 @@ var GLTFFileLoader = /** @class */ (function () {
         }
         }
         return Promise.resolve(data);
         return Promise.resolve(data);
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader, length) {
         var _this = this;
         var _this = this;
         var ChunkFormat = {
         var ChunkFormat = {
             JSON: 0x4E4F534A,
             JSON: 0x4E4F534A,
             BIN: 0x004E4942
             BIN: 0x004E4942
         };
         };
-        // Read the JSON chunk header.
-        var chunkLength = dataReader.readUint32();
-        var chunkFormat = dataReader.readUint32();
-        if (chunkFormat !== ChunkFormat.JSON) {
-            throw new Error("First chunk format is not JSON");
-        }
-        // Bail if there are no other chunks.
-        if (dataReader.byteOffset + chunkLength === dataReader.buffer.byteLength) {
-            return dataReader.loadAsync(chunkLength).then(function () {
-                return { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            });
-        }
-        // Read the JSON chunk and the length and type of the next chunk.
-        return dataReader.loadAsync(chunkLength + 8).then(function () {
-            var data = { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            var readAsync = function () {
-                var chunkLength = dataReader.readUint32();
-                var chunkFormat = dataReader.readUint32();
+        var data = { json: {}, bin: null };
+        var readAsync = function () {
+            var chunkLength = dataReader.readUint32();
+            var chunkFormat = dataReader.readUint32();
+            var finalChunk = (dataReader.byteOffset + chunkLength + 8 > length);
+            // Read the chunk and (if available) the length and type of the next chunk.
+            return dataReader.loadAsync(finalChunk ? chunkLength : chunkLength + 8).then(function () {
                 switch (chunkFormat) {
                 switch (chunkFormat) {
                     case ChunkFormat.JSON: {
                     case ChunkFormat.JSON: {
-                        throw new Error("Unexpected JSON chunk");
+                        data.json = _this._parseJson(dataReader.readString(chunkLength));
+                        break;
                     }
                     }
                     case ChunkFormat.BIN: {
                     case ChunkFormat.BIN: {
                         var startByteOffset_2 = dataReader.byteOffset;
                         var startByteOffset_2 = dataReader.byteOffset;
@@ -7200,13 +7193,13 @@ var GLTFFileLoader = /** @class */ (function () {
                         break;
                         break;
                     }
                     }
                 }
                 }
-                if (dataReader.byteOffset !== dataReader.buffer.byteLength) {
-                    return dataReader.loadAsync(8).then(readAsync);
+                if (finalChunk) {
+                    return data;
                 }
                 }
-                return Promise.resolve(data);
-            };
-            return readAsync();
-        });
+                return readAsync();
+            });
+        };
+        return readAsync();
     };
     };
     GLTFFileLoader._parseVersion = function (version) {
     GLTFFileLoader._parseVersion = function (version) {
         if (version === "1.0" || version === "1.0.1") {
         if (version === "1.0" || version === "1.0.1") {

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 25 - 32
dist/preview release/loaders/babylonjs.loaders.js

@@ -8272,7 +8272,10 @@ var GLTFFileLoader = /** @class */ (function () {
                     readAsync: function (byteOffset, byteLength) {
                     readAsync: function (byteOffset, byteLength) {
                         return new Promise(function (resolve, reject) {
                         return new Promise(function (resolve, reject) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
                             fileRequests_1.push(scene._requestFile(url, function (data, webRequest) {
-                                dataBuffer_1.byteLength = Number(webRequest.getResponseHeader("Content-Range").split("/")[1]);
+                                var contentRange = webRequest.getResponseHeader("Content-Range");
+                                if (contentRange) {
+                                    dataBuffer_1.byteLength = Number(contentRange.split("/")[1]);
+                                }
                                 resolve(new Uint8Array(data));
                                 resolve(new Uint8Array(data));
                             }, onProgress, true, true, function (error) {
                             }, onProgress, true, true, function (error) {
                                 reject(error);
                                 reject(error);
@@ -8483,17 +8486,17 @@ var GLTFFileLoader = /** @class */ (function () {
                 _this._log("Binary version: " + version);
                 _this._log("Binary version: " + version);
             }
             }
             var length = dataReader.readUint32();
             var length = dataReader.readUint32();
-            if (length !== dataReader.buffer.byteLength) {
+            if (dataReader.buffer.byteLength != 0 && length !== dataReader.buffer.byteLength) {
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
                 throw new Error("Length in header does not match actual data length: " + length + " != " + dataReader.buffer.byteLength);
             }
             }
             var unpacked;
             var unpacked;
             switch (version) {
             switch (version) {
                 case 1: {
                 case 1: {
-                    unpacked = _this._unpackBinaryV1Async(dataReader);
+                    unpacked = _this._unpackBinaryV1Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 case 2: {
                 case 2: {
-                    unpacked = _this._unpackBinaryV2Async(dataReader);
+                    unpacked = _this._unpackBinaryV2Async(dataReader, length);
                     break;
                     break;
                 }
                 }
                 default: {
                 default: {
@@ -8504,7 +8507,7 @@ var GLTFFileLoader = /** @class */ (function () {
             return unpacked;
             return unpacked;
         });
         });
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV1Async = function (dataReader, length) {
         var ContentFormat = {
         var ContentFormat = {
             JSON: 0
             JSON: 0
         };
         };
@@ -8513,7 +8516,7 @@ var GLTFFileLoader = /** @class */ (function () {
         if (contentFormat !== ContentFormat.JSON) {
         if (contentFormat !== ContentFormat.JSON) {
             throw new Error("Unexpected content format: " + contentFormat);
             throw new Error("Unexpected content format: " + contentFormat);
         }
         }
-        var bodyLength = dataReader.buffer.byteLength - dataReader.byteOffset;
+        var bodyLength = length - dataReader.byteOffset;
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         var data = { json: this._parseJson(dataReader.readString(contentLength)), bin: null };
         if (bodyLength !== 0) {
         if (bodyLength !== 0) {
             var startByteOffset_1 = dataReader.byteOffset;
             var startByteOffset_1 = dataReader.byteOffset;
@@ -8524,33 +8527,23 @@ var GLTFFileLoader = /** @class */ (function () {
         }
         }
         return Promise.resolve(data);
         return Promise.resolve(data);
     };
     };
-    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader) {
+    GLTFFileLoader.prototype._unpackBinaryV2Async = function (dataReader, length) {
         var _this = this;
         var _this = this;
         var ChunkFormat = {
         var ChunkFormat = {
             JSON: 0x4E4F534A,
             JSON: 0x4E4F534A,
             BIN: 0x004E4942
             BIN: 0x004E4942
         };
         };
-        // Read the JSON chunk header.
-        var chunkLength = dataReader.readUint32();
-        var chunkFormat = dataReader.readUint32();
-        if (chunkFormat !== ChunkFormat.JSON) {
-            throw new Error("First chunk format is not JSON");
-        }
-        // Bail if there are no other chunks.
-        if (dataReader.byteOffset + chunkLength === dataReader.buffer.byteLength) {
-            return dataReader.loadAsync(chunkLength).then(function () {
-                return { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            });
-        }
-        // Read the JSON chunk and the length and type of the next chunk.
-        return dataReader.loadAsync(chunkLength + 8).then(function () {
-            var data = { json: _this._parseJson(dataReader.readString(chunkLength)), bin: null };
-            var readAsync = function () {
-                var chunkLength = dataReader.readUint32();
-                var chunkFormat = dataReader.readUint32();
+        var data = { json: {}, bin: null };
+        var readAsync = function () {
+            var chunkLength = dataReader.readUint32();
+            var chunkFormat = dataReader.readUint32();
+            var finalChunk = (dataReader.byteOffset + chunkLength + 8 > length);
+            // Read the chunk and (if available) the length and type of the next chunk.
+            return dataReader.loadAsync(finalChunk ? chunkLength : chunkLength + 8).then(function () {
                 switch (chunkFormat) {
                 switch (chunkFormat) {
                     case ChunkFormat.JSON: {
                     case ChunkFormat.JSON: {
-                        throw new Error("Unexpected JSON chunk");
+                        data.json = _this._parseJson(dataReader.readString(chunkLength));
+                        break;
                     }
                     }
                     case ChunkFormat.BIN: {
                     case ChunkFormat.BIN: {
                         var startByteOffset_2 = dataReader.byteOffset;
                         var startByteOffset_2 = dataReader.byteOffset;
@@ -8567,13 +8560,13 @@ var GLTFFileLoader = /** @class */ (function () {
                         break;
                         break;
                     }
                     }
                 }
                 }
-                if (dataReader.byteOffset !== dataReader.buffer.byteLength) {
-                    return dataReader.loadAsync(8).then(readAsync);
+                if (finalChunk) {
+                    return data;
                 }
                 }
-                return Promise.resolve(data);
-            };
-            return readAsync();
-        });
+                return readAsync();
+            });
+        };
+        return readAsync();
     };
     };
     GLTFFileLoader._parseVersion = function (version) {
     GLTFFileLoader._parseVersion = function (version) {
         if (version === "1.0" || version === "1.0.1") {
         if (version === "1.0" || version === "1.0.1") {

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 2
dist/preview release/loaders/babylonjs.loaders.min.js


Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 2
dist/preview release/nodeEditor/babylon.nodeEditor.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 11
dist/preview release/nodeEditor/babylon.nodeEditor.max.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map


+ 116 - 49
dist/preview release/viewer/babylon.module.d.ts

@@ -44033,10 +44033,10 @@ declare module "babylonjs/Cameras/XR/webXRSessionManager" {
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         /**
         /**
          * Sets the reference space on the xr session
          * Sets the reference space on the xr session
-         * @param referenceSpace space to set
+         * @param referenceSpaceType space to set
          * @returns a promise that will resolve once the reference space has been set
          * @returns a promise that will resolve once the reference space has been set
          */
          */
-        setReferenceSpaceAsync(referenceSpace?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
+        setReferenceSpaceTypeAsync(referenceSpaceType?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
         /**
         /**
          * Resets the reference space to the one started the session
          * Resets the reference space to the one started the session
          */
          */
@@ -44106,10 +44106,6 @@ declare module "babylonjs/Cameras/XR/webXRCamera" {
      */
      */
     export class WebXRCamera extends FreeCamera {
     export class WebXRCamera extends FreeCamera {
         private _xrSessionManager;
         private _xrSessionManager;
-        /**
-         * Is the camera in debug mode. Used when using an emulator
-         */
-        debugMode: boolean;
         private _firstFrame;
         private _firstFrame;
         private _referencedPosition;
         private _referencedPosition;
         private _referenceQuaternion;
         private _referenceQuaternion;
@@ -44127,7 +44123,7 @@ declare module "babylonjs/Cameras/XR/webXRCamera" {
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          */
          */
-        setTransformationFromNonVRCamera(otherCamera: Camera, resetToBaseReferenceSpace?: boolean): void;
+        setTransformationFromNonVRCamera(otherCamera?: Camera, resetToBaseReferenceSpace?: boolean): void;
         /** @hidden */
         /** @hidden */
         _updateForDualEyeDebugging(): void;
         _updateForDualEyeDebugging(): void;
         private _updateReferenceSpace;
         private _updateReferenceSpace;
@@ -44147,12 +44143,17 @@ declare module "babylonjs/Cameras/XR/webXRFeaturesManager" {
          */
          */
         attached: boolean;
         attached: boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * Attach the feature to the session
          * Attach the feature to the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful.
          * @returns true if successful.
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * Detach the feature from the session
          * Detach the feature from the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
@@ -44162,6 +44163,35 @@ declare module "babylonjs/Cameras/XR/webXRFeaturesManager" {
         detach(): boolean;
         detach(): boolean;
     }
     }
     /**
     /**
+     * A list of the currently available features without referencing them
+     */
+    export class WebXRFeatureName {
+        /**
+         * The name of the hit test feature
+         */
+        static HIT_TEST: string;
+        /**
+         * The name of the anchor system feature
+         */
+        static ANCHOR_SYSTEM: string;
+        /**
+         * The name of the background remover feature
+         */
+        static BACKGROUND_REMOVER: string;
+        /**
+         * The name of the pointer selection feature
+         */
+        static POINTER_SELECTION: string;
+        /**
+         * The name of the teleportation feature
+         */
+        static TELEPORTATION: string;
+        /**
+         * The name of the plane detection feature
+         */
+        static PLANE_DETECTION: string;
+    }
+    /**
      * Defining the constructor of a feature. Used to register the modules.
      * Defining the constructor of a feature. Used to register the modules.
      */
      */
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
@@ -45494,11 +45524,16 @@ declare module "babylonjs/Cameras/XR/features/WebXRAbstractFeature" {
          */
          */
         get attached(): boolean;
         get attached(): boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * attach this feature
          * attach this feature
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful, false is failed or already attached
          * @returns true if successful, false is failed or already attached
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * detach this feature.
          * detach this feature.
          *
          *
@@ -45514,7 +45549,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRAbstractFeature" {
          * This function will not execute after the feature is detached.
          * This function will not execute after the feature is detached.
          * @param _xrFrame the current frame
          * @param _xrFrame the current frame
          */
          */
-        protected _onXRFrame(_xrFrame: XRFrame): void;
+        protected abstract _onXRFrame(_xrFrame: XRFrame): void;
         /**
         /**
          * This is used to register callbacks that will automatically be removed when detach is called.
          * This is used to register callbacks that will automatically be removed when detach is called.
          * @param observable the observable to which the observer will be attached
          * @param observable the observable to which the observer will be attached
@@ -45524,7 +45559,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRAbstractFeature" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRControllerPointerSelection" {
 declare module "babylonjs/Cameras/XR/features/WebXRControllerPointerSelection" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRInput } from "babylonjs/Cameras/XR/webXRInput";
     import { WebXRInput } from "babylonjs/Cameras/XR/webXRInput";
     import { WebXRController } from "babylonjs/Cameras/XR/webXRController";
     import { WebXRController } from "babylonjs/Cameras/XR/webXRController";
@@ -45570,12 +45604,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRControllerPointerSelection" {
     /**
     /**
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      */
      */
-    export class WebXRControllerPointerSelection extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
         private readonly _options;
         private readonly _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -45906,12 +45940,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRControllerTeleportation" {
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * the input of the attached controllers.
      * the input of the attached controllers.
      */
      */
-    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46527,7 +46561,6 @@ declare module "babylonjs/Cameras/VR/index" {
     export * from "babylonjs/Cameras/VR/webVRCamera";
     export * from "babylonjs/Cameras/VR/webVRCamera";
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
 declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
     import { Matrix } from "babylonjs/Maths/math.vector";
     import { Matrix } from "babylonjs/Maths/math.vector";
@@ -46564,7 +46597,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
      * Hit test (or raycasting) is used to interact with the real world.
      * Hit test (or raycasting) is used to interact with the real world.
      * For further information read here - https://github.com/immersive-web/hit-test
      * For further information read here - https://github.com/immersive-web/hit-test
      */
      */
-    export class WebXRHitTestLegacy extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRHitTestLegacy extends WebXRAbstractFeature {
         /**
         /**
          * options to use when constructing this feature
          * options to use when constructing this feature
          */
          */
@@ -46572,7 +46605,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46642,7 +46675,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRHitTestLegacy" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
 declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { TransformNode } from "babylonjs/Meshes/transformNode";
     import { TransformNode } from "babylonjs/Meshes/transformNode";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
@@ -46684,12 +46716,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
      * The plane detector is used to detect planes in the real world when in AR
      * The plane detector is used to detect planes in the real world when in AR
      * For more information see https://github.com/immersive-web/real-world-geometry/
      * For more information see https://github.com/immersive-web/real-world-geometry/
      */
      */
-    export class WebXRPlaneDetector extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRPlaneDetector extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46732,7 +46764,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRPlaneDetector" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
 declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
     import { Matrix } from "babylonjs/Maths/math.vector";
     import { Matrix } from "babylonjs/Maths/math.vector";
@@ -46781,12 +46812,12 @@ declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
      * will use the frame to create an anchor and not the session or a detected plane
      * will use the frame to create an anchor and not the session or a detected plane
      * For further information see https://github.com/immersive-web/anchors/
      * For further information see https://github.com/immersive-web/anchors/
      */
      */
-    export class WebXRAnchorSystem extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRAnchorSystem extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46865,7 +46896,6 @@ declare module "babylonjs/Cameras/XR/features/WebXRAnchorSystem" {
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
 declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
-    import { IWebXRFeature } from "babylonjs/Cameras/XR/webXRFeaturesManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { WebXRSessionManager } from "babylonjs/Cameras/XR/webXRSessionManager";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Observable } from "babylonjs/Misc/observable";
     import { Observable } from "babylonjs/Misc/observable";
@@ -46900,7 +46930,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
     /**
     /**
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      */
      */
-    export class WebXRBackgroundRemover extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRBackgroundRemover extends WebXRAbstractFeature {
         /**
         /**
          * read-only options to be used in this module
          * read-only options to be used in this module
          */
          */
@@ -46908,7 +46938,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -46948,6 +46978,7 @@ declare module "babylonjs/Cameras/XR/features/WebXRBackgroundRemover" {
          * Dispose this feature and all of the resources attached
          * Dispose this feature and all of the resources attached
          */
          */
         dispose(): void;
         dispose(): void;
+        protected _onXRFrame(_xrFrame: XRFrame): void;
     }
     }
 }
 }
 declare module "babylonjs/Cameras/XR/features/index" {
 declare module "babylonjs/Cameras/XR/features/index" {
@@ -115018,10 +115049,10 @@ declare module BABYLON {
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         initializeSessionAsync(xrSessionMode?: XRSessionMode, xrSessionInit?: XRSessionInit): Promise<XRSession>;
         /**
         /**
          * Sets the reference space on the xr session
          * Sets the reference space on the xr session
-         * @param referenceSpace space to set
+         * @param referenceSpaceType space to set
          * @returns a promise that will resolve once the reference space has been set
          * @returns a promise that will resolve once the reference space has been set
          */
          */
-        setReferenceSpaceAsync(referenceSpace?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
+        setReferenceSpaceTypeAsync(referenceSpaceType?: XRReferenceSpaceType): Promise<XRReferenceSpace>;
         /**
         /**
          * Resets the reference space to the one started the session
          * Resets the reference space to the one started the session
          */
          */
@@ -115087,10 +115118,6 @@ declare module BABYLON {
      */
      */
     export class WebXRCamera extends FreeCamera {
     export class WebXRCamera extends FreeCamera {
         private _xrSessionManager;
         private _xrSessionManager;
-        /**
-         * Is the camera in debug mode. Used when using an emulator
-         */
-        debugMode: boolean;
         private _firstFrame;
         private _firstFrame;
         private _referencedPosition;
         private _referencedPosition;
         private _referenceQuaternion;
         private _referenceQuaternion;
@@ -115108,7 +115135,7 @@ declare module BABYLON {
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param otherCamera the non-vr camera to copy the transformation from
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          * @param resetToBaseReferenceSpace should XR reset to the base reference space
          */
          */
-        setTransformationFromNonVRCamera(otherCamera: Camera, resetToBaseReferenceSpace?: boolean): void;
+        setTransformationFromNonVRCamera(otherCamera?: Camera, resetToBaseReferenceSpace?: boolean): void;
         /** @hidden */
         /** @hidden */
         _updateForDualEyeDebugging(): void;
         _updateForDualEyeDebugging(): void;
         private _updateReferenceSpace;
         private _updateReferenceSpace;
@@ -115126,12 +115153,17 @@ declare module BABYLON {
          */
          */
         attached: boolean;
         attached: boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * Attach the feature to the session
          * Attach the feature to the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful.
          * @returns true if successful.
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * Detach the feature from the session
          * Detach the feature from the session
          * Will usually be called by the features manager
          * Will usually be called by the features manager
@@ -115141,6 +115173,35 @@ declare module BABYLON {
         detach(): boolean;
         detach(): boolean;
     }
     }
     /**
     /**
+     * A list of the currently available features without referencing them
+     */
+    export class WebXRFeatureName {
+        /**
+         * The name of the hit test feature
+         */
+        static HIT_TEST: string;
+        /**
+         * The name of the anchor system feature
+         */
+        static ANCHOR_SYSTEM: string;
+        /**
+         * The name of the background remover feature
+         */
+        static BACKGROUND_REMOVER: string;
+        /**
+         * The name of the pointer selection feature
+         */
+        static POINTER_SELECTION: string;
+        /**
+         * The name of the teleportation feature
+         */
+        static TELEPORTATION: string;
+        /**
+         * The name of the plane detection feature
+         */
+        static PLANE_DETECTION: string;
+    }
+    /**
      * Defining the constructor of a feature. Used to register the modules.
      * Defining the constructor of a feature. Used to register the modules.
      */
      */
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
     export type WebXRFeatureConstructor = (xrSessionManager: WebXRSessionManager, options?: any) => (() => IWebXRFeature);
@@ -116430,11 +116491,16 @@ declare module BABYLON {
          */
          */
         get attached(): boolean;
         get attached(): boolean;
         /**
         /**
+         * Should auto-attach be disabled?
+         */
+        disableAutoAttach: boolean;
+        /**
          * attach this feature
          * attach this feature
          *
          *
+         * @param force should attachment be forced (even when already attached)
          * @returns true if successful, false is failed or already attached
          * @returns true if successful, false is failed or already attached
          */
          */
-        attach(): boolean;
+        attach(force?: boolean): boolean;
         /**
         /**
          * detach this feature.
          * detach this feature.
          *
          *
@@ -116450,7 +116516,7 @@ declare module BABYLON {
          * This function will not execute after the feature is detached.
          * This function will not execute after the feature is detached.
          * @param _xrFrame the current frame
          * @param _xrFrame the current frame
          */
          */
-        protected _onXRFrame(_xrFrame: XRFrame): void;
+        protected abstract _onXRFrame(_xrFrame: XRFrame): void;
         /**
         /**
          * This is used to register callbacks that will automatically be removed when detach is called.
          * This is used to register callbacks that will automatically be removed when detach is called.
          * @param observable the observable to which the observer will be attached
          * @param observable the observable to which the observer will be attached
@@ -116499,12 +116565,12 @@ declare module BABYLON {
     /**
     /**
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      * A module that will enable pointer selection for motion controllers of XR Input Sources
      */
      */
-    export class WebXRControllerPointerSelection extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
         private readonly _options;
         private readonly _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -116819,12 +116885,12 @@ declare module BABYLON {
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
      * the input of the attached controllers.
      * the input of the attached controllers.
      */
      */
-    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117433,7 +117499,7 @@ declare module BABYLON {
      * Hit test (or raycasting) is used to interact with the real world.
      * Hit test (or raycasting) is used to interact with the real world.
      * For further information read here - https://github.com/immersive-web/hit-test
      * For further information read here - https://github.com/immersive-web/hit-test
      */
      */
-    export class WebXRHitTestLegacy extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRHitTestLegacy extends WebXRAbstractFeature {
         /**
         /**
          * options to use when constructing this feature
          * options to use when constructing this feature
          */
          */
@@ -117441,7 +117507,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117547,12 +117613,12 @@ declare module BABYLON {
      * The plane detector is used to detect planes in the real world when in AR
      * The plane detector is used to detect planes in the real world when in AR
      * For more information see https://github.com/immersive-web/real-world-geometry/
      * For more information see https://github.com/immersive-web/real-world-geometry/
      */
      */
-    export class WebXRPlaneDetector extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRPlaneDetector extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117636,12 +117702,12 @@ declare module BABYLON {
      * will use the frame to create an anchor and not the session or a detected plane
      * will use the frame to create an anchor and not the session or a detected plane
      * For further information see https://github.com/immersive-web/anchors/
      * For further information see https://github.com/immersive-web/anchors/
      */
      */
-    export class WebXRAnchorSystem extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRAnchorSystem extends WebXRAbstractFeature {
         private _options;
         private _options;
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117750,7 +117816,7 @@ declare module BABYLON {
     /**
     /**
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      * A module that will automatically disable background meshes when entering AR and will enable them when leaving AR.
      */
      */
-    export class WebXRBackgroundRemover extends WebXRAbstractFeature implements IWebXRFeature {
+    export class WebXRBackgroundRemover extends WebXRAbstractFeature {
         /**
         /**
          * read-only options to be used in this module
          * read-only options to be used in this module
          */
          */
@@ -117758,7 +117824,7 @@ declare module BABYLON {
         /**
         /**
          * The module's name
          * The module's name
          */
          */
-        static readonly Name: string;
+        static readonly Name: string;
         /**
         /**
          * The (Babylon) version of this module.
          * The (Babylon) version of this module.
          * This is an integer representing the implementation version.
          * This is an integer representing the implementation version.
@@ -117798,6 +117864,7 @@ declare module BABYLON {
          * Dispose this feature and all of the resources attached
          * Dispose this feature and all of the resources attached
          */
          */
         dispose(): void;
         dispose(): void;
+        protected _onXRFrame(_xrFrame: XRFrame): void;
     }
     }
 }
 }
 declare module BABYLON {
 declare module BABYLON {

Datei-Diff unterdrückt, da er zu groß ist
+ 18 - 18
dist/preview release/viewer/babylon.viewer.js


Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 2
dist/preview release/viewer/babylon.viewer.max.js