David Catuhe 7 年之前
父节点
当前提交
0c8380e919

文件差异内容过多而无法显示
+ 1418 - 1392
Playground/babylon.d.txt


+ 1 - 0
Tools/Gulp/config.json

@@ -332,6 +332,7 @@
         "animations": {
             "files": [
                 "../../src/Animations/babylon.animation.js",
+                "../../src/Animations/babylon.animationGroup.js",
                 "../../src/Animations/babylon.runtimeAnimation.js",
                 "../../src/Animations/babylon.animatable.js",
                 "../../src/Animations/babylon.easing.js"

文件差异内容过多而无法显示
+ 1393 - 1367
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 12 - 12
dist/preview release/babylon.js


+ 59 - 8
dist/preview release/babylon.max.js

@@ -41831,6 +41831,18 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    var AnimationGroup = /** @class */ (function () {
+        function AnimationGroup() {
+        }
+        return AnimationGroup;
+    }());
+    BABYLON.AnimationGroup = AnimationGroup;
+})(BABYLON || (BABYLON = {}));
+
+//# sourceMappingURL=babylon.animationGroup.js.map
+
+var BABYLON;
+(function (BABYLON) {
     var RuntimeAnimation = /** @class */ (function () {
         function RuntimeAnimation(target, animation) {
             this._offsetsCache = {};
@@ -72527,9 +72539,18 @@ var BABYLON;
             this._webVRpresenting = false;
             // Are we presenting in the fullscreen fallback?
             this._fullscreenVRpresenting = false;
-            this.onEnteringVR = new BABYLON.Observable();
-            this.onExitingVR = new BABYLON.Observable();
-            this.onControllerMeshLoaded = new BABYLON.Observable();
+            /**
+             * Observable raised when entering VR.
+             */
+            this.onEnteringVRObservable = new BABYLON.Observable();
+            /**
+             * Observable raised when exiting VR.
+             */
+            this.onExitingVRObservable = new BABYLON.Observable();
+            /**
+             * Observable raised when controller mesh is loaded.
+             */
+            this.onControllerMeshLoadedObservable = new BABYLON.Observable();
             this._useCustomVRButton = false;
             this._teleportationRequested = false;
             this._teleportationEnabledOnLeftController = false;
@@ -72826,6 +72847,36 @@ var BABYLON;
             this._circleEase = new BABYLON.CircleEase();
             this._circleEase.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT);
         }
+        Object.defineProperty(VRExperienceHelper.prototype, "onEnteringVR", {
+            /** Return this.onEnteringVRObservable
+             * Note: This one is for backward compatibility. Please use onEnteringVRObservable directly
+             */
+            get: function () {
+                return this.onEnteringVRObservable;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(VRExperienceHelper.prototype, "onExitingVR", {
+            /** Return this.onExitingVRObservable
+             * Note: This one is for backward compatibility. Please use onExitingVRObservable directly
+             */
+            get: function () {
+                return this.onExitingVRObservable;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(VRExperienceHelper.prototype, "onControllerMeshLoaded", {
+            /** Return this.onControllerMeshLoadedObservable
+             * Note: This one is for backward compatibility. Please use onControllerMeshLoadedObservable directly
+             */
+            get: function () {
+                return this.onControllerMeshLoadedObservable;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(VRExperienceHelper.prototype, "teleportationTarget", {
             get: function () {
                 return this._teleportationTarget;
@@ -72917,7 +72968,7 @@ var BABYLON;
         VRExperienceHelper.prototype._onDefaultMeshLoaded = function (webVRController) {
             this._tryEnableInteractionOnController(webVRController);
             try {
-                this.onControllerMeshLoaded.notifyObservers(webVRController);
+                this.onControllerMeshLoadedObservable.notifyObservers(webVRController);
             }
             catch (err) {
                 BABYLON.Tools.Warn("Error in your custom logic onControllerMeshLoaded: " + err);
@@ -72987,9 +73038,9 @@ var BABYLON;
          * Otherwise, will use the fullscreen API.
          */
         VRExperienceHelper.prototype.enterVR = function () {
-            if (this.onEnteringVR) {
+            if (this.onEnteringVRObservable) {
                 try {
-                    this.onEnteringVR.notifyObservers(this);
+                    this.onEnteringVRObservable.notifyObservers(this);
                 }
                 catch (err) {
                     BABYLON.Tools.Warn("Error in your custom logic onEnteringVR: " + err);
@@ -73021,9 +73072,9 @@ var BABYLON;
          * Attempt to exit VR, or fullscreen.
          */
         VRExperienceHelper.prototype.exitVR = function () {
-            if (this.onExitingVR) {
+            if (this.onExitingVRObservable) {
                 try {
-                    this.onExitingVR.notifyObservers(this);
+                    this.onExitingVRObservable.notifyObservers(this);
                 }
                 catch (err) {
                     BABYLON.Tools.Warn("Error in your custom logic onExitingVR: " + err);

文件差异内容过多而无法显示
+ 12 - 12
dist/preview release/babylon.worker.js


文件差异内容过多而无法显示
+ 9 - 9
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 59 - 8
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -41831,6 +41831,18 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    var AnimationGroup = /** @class */ (function () {
+        function AnimationGroup() {
+        }
+        return AnimationGroup;
+    }());
+    BABYLON.AnimationGroup = AnimationGroup;
+})(BABYLON || (BABYLON = {}));
+
+//# sourceMappingURL=babylon.animationGroup.js.map
+
+var BABYLON;
+(function (BABYLON) {
     var RuntimeAnimation = /** @class */ (function () {
         function RuntimeAnimation(target, animation) {
             this._offsetsCache = {};
@@ -72373,9 +72385,18 @@ var BABYLON;
             this._webVRpresenting = false;
             // Are we presenting in the fullscreen fallback?
             this._fullscreenVRpresenting = false;
-            this.onEnteringVR = new BABYLON.Observable();
-            this.onExitingVR = new BABYLON.Observable();
-            this.onControllerMeshLoaded = new BABYLON.Observable();
+            /**
+             * Observable raised when entering VR.
+             */
+            this.onEnteringVRObservable = new BABYLON.Observable();
+            /**
+             * Observable raised when exiting VR.
+             */
+            this.onExitingVRObservable = new BABYLON.Observable();
+            /**
+             * Observable raised when controller mesh is loaded.
+             */
+            this.onControllerMeshLoadedObservable = new BABYLON.Observable();
             this._useCustomVRButton = false;
             this._teleportationRequested = false;
             this._teleportationEnabledOnLeftController = false;
@@ -72672,6 +72693,36 @@ var BABYLON;
             this._circleEase = new BABYLON.CircleEase();
             this._circleEase.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT);
         }
+        Object.defineProperty(VRExperienceHelper.prototype, "onEnteringVR", {
+            /** Return this.onEnteringVRObservable
+             * Note: This one is for backward compatibility. Please use onEnteringVRObservable directly
+             */
+            get: function () {
+                return this.onEnteringVRObservable;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(VRExperienceHelper.prototype, "onExitingVR", {
+            /** Return this.onExitingVRObservable
+             * Note: This one is for backward compatibility. Please use onExitingVRObservable directly
+             */
+            get: function () {
+                return this.onExitingVRObservable;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(VRExperienceHelper.prototype, "onControllerMeshLoaded", {
+            /** Return this.onControllerMeshLoadedObservable
+             * Note: This one is for backward compatibility. Please use onControllerMeshLoadedObservable directly
+             */
+            get: function () {
+                return this.onControllerMeshLoadedObservable;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(VRExperienceHelper.prototype, "teleportationTarget", {
             get: function () {
                 return this._teleportationTarget;
@@ -72763,7 +72814,7 @@ var BABYLON;
         VRExperienceHelper.prototype._onDefaultMeshLoaded = function (webVRController) {
             this._tryEnableInteractionOnController(webVRController);
             try {
-                this.onControllerMeshLoaded.notifyObservers(webVRController);
+                this.onControllerMeshLoadedObservable.notifyObservers(webVRController);
             }
             catch (err) {
                 BABYLON.Tools.Warn("Error in your custom logic onControllerMeshLoaded: " + err);
@@ -72833,9 +72884,9 @@ var BABYLON;
          * Otherwise, will use the fullscreen API.
          */
         VRExperienceHelper.prototype.enterVR = function () {
-            if (this.onEnteringVR) {
+            if (this.onEnteringVRObservable) {
                 try {
-                    this.onEnteringVR.notifyObservers(this);
+                    this.onEnteringVRObservable.notifyObservers(this);
                 }
                 catch (err) {
                     BABYLON.Tools.Warn("Error in your custom logic onEnteringVR: " + err);
@@ -72867,9 +72918,9 @@ var BABYLON;
          * Attempt to exit VR, or fullscreen.
          */
         VRExperienceHelper.prototype.exitVR = function () {
-            if (this.onExitingVR) {
+            if (this.onExitingVRObservable) {
                 try {
-                    this.onExitingVR.notifyObservers(this);
+                    this.onExitingVRObservable.notifyObservers(this);
                 }
                 catch (err) {
                     BABYLON.Tools.Warn("Error in your custom logic onExitingVR: " + err);

文件差异内容过多而无法显示
+ 23 - 23
dist/preview release/viewer/babylon.viewer.js


+ 4 - 0
src/Animations/babylon.animationGroup.ts

@@ -0,0 +1,4 @@
+module BABYLON {
+    export class AnimationGroup {
+    }
+}

+ 42 - 8
src/Cameras/VR/babylon.vrExperienceHelper.ts

@@ -39,9 +39,43 @@ module BABYLON {
         private _onVRRequestPresentStart: () => void;
         private _onVRRequestPresentComplete: (success: boolean) => void;
 
-        public onEnteringVR = new Observable<VRExperienceHelper>();
-        public onExitingVR = new Observable<VRExperienceHelper>();
-        public onControllerMeshLoaded = new Observable<WebVRController>();
+        /**
+         * Observable raised when entering VR.
+         */
+        public onEnteringVRObservable = new Observable<VRExperienceHelper>();
+
+
+        /**
+         * Observable raised when exiting VR.
+         */
+        public onExitingVRObservable = new Observable<VRExperienceHelper>();
+
+
+        /**
+         * Observable raised when controller mesh is loaded.
+         */
+        public onControllerMeshLoadedObservable = new Observable<WebVRController>();
+
+        /** Return this.onEnteringVRObservable
+         * Note: This one is for backward compatibility. Please use onEnteringVRObservable directly
+         */
+        public get onEnteringVR(): Observable<VRExperienceHelper> {
+            return this.onEnteringVRObservable;
+        }
+
+        /** Return this.onExitingVRObservable
+         * Note: This one is for backward compatibility. Please use onExitingVRObservable directly
+         */
+        public get onExitingVR(): Observable<VRExperienceHelper> {
+            return this.onExitingVRObservable;
+        }
+
+        /** Return this.onControllerMeshLoadedObservable
+         * Note: This one is for backward compatibility. Please use onControllerMeshLoadedObservable directly
+         */
+        public get onControllerMeshLoaded(): Observable<WebVRController> {
+            return this.onControllerMeshLoadedObservable;
+        }
 
         private _rayLength: number;
         private _useCustomVRButton: boolean = false;
@@ -340,7 +374,7 @@ module BABYLON {
         private _onDefaultMeshLoaded(webVRController: WebVRController) {
             this._tryEnableInteractionOnController(webVRController);
             try {
-                this.onControllerMeshLoaded.notifyObservers(webVRController);
+                this.onControllerMeshLoadedObservable.notifyObservers(webVRController);
             }
             catch (err) {
                 Tools.Warn("Error in your custom logic onControllerMeshLoaded: " + err);
@@ -438,9 +472,9 @@ module BABYLON {
          * Otherwise, will use the fullscreen API.
          */
         public enterVR() {
-            if (this.onEnteringVR) {
+            if (this.onEnteringVRObservable) {
                 try {
-                    this.onEnteringVR.notifyObservers(this);
+                    this.onEnteringVRObservable.notifyObservers(this);
                 }
                 catch (err) {
                     Tools.Warn("Error in your custom logic onEnteringVR: " + err);
@@ -477,9 +511,9 @@ module BABYLON {
          * Attempt to exit VR, or fullscreen.
          */
         public exitVR() {
-            if (this.onExitingVR) {
+            if (this.onExitingVRObservable) {
                 try {
-                    this.onExitingVR.notifyObservers(this);
+                    this.onExitingVRObservable.notifyObservers(this);
                 }
                 catch (err) {
                     Tools.Warn("Error in your custom logic onExitingVR: " + err);