Raanan Weber 7 سال پیش
والد
کامیت
cb5e7e2805
98فایلهای تغییر یافته به همراه14091 افزوده شده و 12818 حذف شده
  1. 3 3
      Tools/Publisher/index.js
  2. 5468 5468
      dist/preview release/babylon.d.ts
  3. 1 1
      dist/preview release/babylon.js
  4. 1 1
      dist/preview release/babylon.worker.js
  5. 6095 6095
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  6. 1 1
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  7. 2 2
      dist/preview release/gui/package.json
  8. 2 2
      dist/preview release/inspector/babylon.inspector.bundle.js
  9. 2 2
      dist/preview release/inspector/package.json
  10. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  11. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  12. 2 2
      dist/preview release/loaders/package.json
  13. 2 2
      dist/preview release/materialsLibrary/package.json
  14. 17 17
      dist/preview release/modules/actions/index.d.ts
  15. 17 17
      dist/preview release/modules/additionalCameras/index.d.ts
  16. 17 17
      dist/preview release/modules/additionalMeshes/index.d.ts
  17. 16 16
      dist/preview release/modules/additionalPostProcess_blur/index.d.ts
  18. 17 17
      dist/preview release/modules/additionalPostProcess_fxaa/index.d.ts
  19. 17 17
      dist/preview release/modules/additionalPostProcess_highlights/index.d.ts
  20. 17 17
      dist/preview release/modules/additionalPostProcess_imageProcessing/index.d.ts
  21. 17 17
      dist/preview release/modules/additionalPostProcesses/index.d.ts
  22. 17 17
      dist/preview release/modules/additionalRenderingPipeline/index.d.ts
  23. 16 16
      dist/preview release/modules/additionalTextures/index.d.ts
  24. 16 16
      dist/preview release/modules/animations/index.d.ts
  25. 16 16
      dist/preview release/modules/arcRotateCamera/index.d.ts
  26. 16 16
      dist/preview release/modules/assetsManager/index.d.ts
  27. 16 16
      dist/preview release/modules/audio/index.d.ts
  28. 17 17
      dist/preview release/modules/backgroundMaterial/index.d.ts
  29. 16 16
      dist/preview release/modules/bones/index.d.ts
  30. 16 16
      dist/preview release/modules/cameraBehaviors/index.d.ts
  31. 17 17
      dist/preview release/modules/collisions/index.d.ts
  32. 84 8
      dist/preview release/modules/core/es6.js
  33. 64 18
      dist/preview release/modules/core/index.d.ts
  34. 84 8
      dist/preview release/modules/core/index.js
  35. 17 17
      dist/preview release/modules/csg/index.d.ts
  36. 380 1
      dist/preview release/modules/debug/es6.js
  37. 96 16
      dist/preview release/modules/debug/index.d.ts
  38. 379 1
      dist/preview release/modules/debug/index.js
  39. 16 16
      dist/preview release/modules/defaultRenderingPipeline/index.d.ts
  40. 16 16
      dist/preview release/modules/depthRenderer/index.d.ts
  41. 17 17
      dist/preview release/modules/directionalLight/index.d.ts
  42. 17 17
      dist/preview release/modules/environmentHelper/index.d.ts
  43. 16 16
      dist/preview release/modules/freeCamera/index.d.ts
  44. 16 16
      dist/preview release/modules/fresnel/index.d.ts
  45. 17 17
      dist/preview release/modules/gamepad/index.d.ts
  46. 16 16
      dist/preview release/modules/geometryBufferRenderer/index.d.ts
  47. 17 17
      dist/preview release/modules/gpuParticles/index.d.ts
  48. 17 17
      dist/preview release/modules/hdr/index.d.ts
  49. 17 17
      dist/preview release/modules/hemisphericLight/index.d.ts
  50. 17 17
      dist/preview release/modules/highlights/index.d.ts
  51. 17 17
      dist/preview release/modules/instrumentation/index.d.ts
  52. 17 17
      dist/preview release/modules/layer/index.d.ts
  53. 16 16
      dist/preview release/modules/lensFlares/index.d.ts
  54. 16 16
      dist/preview release/modules/loader/index.d.ts
  55. 17 17
      dist/preview release/modules/meshBuilder/index.d.ts
  56. 16 16
      dist/preview release/modules/morphTargets/index.d.ts
  57. 16 16
      dist/preview release/modules/multiMaterial/index.d.ts
  58. 16 16
      dist/preview release/modules/nullEngine/index.d.ts
  59. 16 16
      dist/preview release/modules/octrees/index.d.ts
  60. 16 16
      dist/preview release/modules/offline/index.d.ts
  61. 17 17
      dist/preview release/modules/optimizations/index.d.ts
  62. 17 17
      dist/preview release/modules/particles/index.d.ts
  63. 6 1
      dist/preview release/modules/pbrMaterial/es6.js
  64. 21 17
      dist/preview release/modules/pbrMaterial/index.d.ts
  65. 6 1
      dist/preview release/modules/pbrMaterial/index.js
  66. 3 1
      dist/preview release/modules/physics/es6.js
  67. 16 16
      dist/preview release/modules/physics/index.d.ts
  68. 3 1
      dist/preview release/modules/physics/index.js
  69. 17 17
      dist/preview release/modules/picking/index.d.ts
  70. 17 17
      dist/preview release/modules/pointLight/index.d.ts
  71. 17 17
      dist/preview release/modules/polygonMesh/index.d.ts
  72. 17 17
      dist/preview release/modules/postProcesses/index.d.ts
  73. 17 17
      dist/preview release/modules/probes/index.d.ts
  74. 17 17
      dist/preview release/modules/procedural/index.d.ts
  75. 17 17
      dist/preview release/modules/renderingPipeline/index.d.ts
  76. 16 16
      dist/preview release/modules/serialization/index.d.ts
  77. 17 17
      dist/preview release/modules/shaderMaterial/index.d.ts
  78. 16 16
      dist/preview release/modules/shadows/index.d.ts
  79. 16 16
      dist/preview release/modules/simd/index.d.ts
  80. 16 16
      dist/preview release/modules/solidParticles/index.d.ts
  81. 17 17
      dist/preview release/modules/spotLight/index.d.ts
  82. 16 16
      dist/preview release/modules/sprites/index.d.ts
  83. 16 16
      dist/preview release/modules/stringDictionary/index.d.ts
  84. 17 17
      dist/preview release/modules/targetCamera/index.d.ts
  85. 17 17
      dist/preview release/modules/textureFormats/index.d.ts
  86. 17 17
      dist/preview release/modules/textureTools/index.d.ts
  87. 17 17
      dist/preview release/modules/touchCamera/index.d.ts
  88. 16 16
      dist/preview release/modules/userData/index.d.ts
  89. 17 17
      dist/preview release/modules/virtualJoystick/index.d.ts
  90. 26 12
      dist/preview release/modules/vr/es6.js
  91. 28 17
      dist/preview release/modules/vr/index.d.ts
  92. 26 12
      dist/preview release/modules/vr/index.js
  93. 2 2
      dist/preview release/postProcessesLibrary/package.json
  94. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  95. 2 2
      dist/preview release/serializers/package.json
  96. 9 9
      dist/preview release/viewer/babylon.viewer.js
  97. 2 2
      dist/preview release/viewer/package.json
  98. 210 29
      package.json

+ 3 - 3
Tools/Publisher/index.js

@@ -49,7 +49,7 @@ let packages = [
 //check if logged in
 console.log("Using npm user:");
 let loginCheck = shelljs.exec('npm whoami');
-console.log("No that I can check, but - did you forget to run gulp typescript-all?");
+console.log("Not that I can check, but - did you run gulp typescript-all?");
 if (loginCheck.code === 0) {
     prompt.start();
 
@@ -143,12 +143,12 @@ function processCore(package, version) {
 
     fs.writeFileSync(basePath + '/package/' + 'package.json', JSON.stringify(packageJson, null, 4));
 
-    console.log('Publishing ' + package.name + " from " + package.path);
+    console.log('Publishing ' + package.name + " from " + basePath + '/package/');
     //publish the respected package
     shelljs.exec('npm publish \"' + basePath + '/package/' + "\"");
 
     // remove package directory
-    fs.removeSync(basePath + '/package/');
+    //fs.removeSync(basePath + '/package/');
 
     // now update the main package.json
     packageJson.files = packageJson.files.map(file => {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5468 - 5468
dist/preview release/babylon.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/babylon.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/babylon.worker.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6095 - 6095
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 2 - 2
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2 - 2
dist/preview release/inspector/babylon.inspector.bundle.js


+ 2 - 2
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -25,7 +25,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/actions/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalCameras/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalMeshes/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/additionalPostProcess_blur/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalPostProcess_fxaa/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalPostProcess_highlights/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalPostProcess_imageProcessing/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalPostProcesses/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/additionalRenderingPipeline/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/additionalTextures/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/animations/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/arcRotateCamera/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/assetsManager/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/audio/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/backgroundMaterial/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/bones/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/cameraBehaviors/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/collisions/index.d.ts


+ 84 - 8
dist/preview release/modules/core/es6.js

@@ -1730,6 +1730,13 @@ var BABYLON;
             return this;
         };
         /**
+         * Divides the current Vector3 coordinates by the passed ones.
+         * Returns the updated Vector3.
+         */
+        Vector2.prototype.divideInPlace = function (otherVector) {
+            return this.divideToRef(otherVector, this);
+        };
+        /**
          * Returns a new Vector2 with current Vector2 negated coordinates.
          */
         Vector2.prototype.negate = function () {
@@ -2205,6 +2212,13 @@ var BABYLON;
             return this;
         };
         /**
+         * Divides the current Vector3 coordinates by the passed ones.
+         * Returns the updated Vector3.
+         */
+        Vector3.prototype.divideInPlace = function (otherVector) {
+            return this.divideToRef(otherVector, this);
+        };
+        /**
          * Updates the current Vector3 with the minimal coordinate values between its and the passed vector ones.
          * Returns the updated Vector3.
          */
@@ -2934,6 +2948,13 @@ var BABYLON;
             return this;
         };
         /**
+         * Divides the current Vector3 coordinates by the passed ones.
+         * Returns the updated Vector3.
+         */
+        Vector4.prototype.divideInPlace = function (otherVector) {
+            return this.divideToRef(otherVector, this);
+        };
+        /**
          * Updates the Vector4 coordinates with the minimum values between its own and the passed vector ones.
          */
         Vector4.prototype.MinimizeInPlace = function (other) {
@@ -6423,10 +6444,11 @@ var BABYLON;
         /**
          * Remove a callback from the Observable object
          * @param callback the callback to remove. If it doesn't belong to this Observable, false will be returned.
+         * @param scope optional scope. If used only the callbacks with this scope will be removed.
         */
-        Observable.prototype.removeCallback = function (callback) {
+        Observable.prototype.removeCallback = function (callback, scope) {
             for (var index = 0; index < this._observers.length; index++) {
-                if (this._observers[index].callback === callback) {
+                if (this._observers[index].callback === callback && (!scope || scope === this._observers[index].scope)) {
                     this._observers.splice(index, 1);
                     return true;
                 }
@@ -15201,7 +15223,6 @@ var BABYLON;
             this.getScene().stopAnimation(this);
             // Remove from scene
             this.getScene().removeTransformNode(this);
-            this._cache = {};
             if (!doNotRecurse) {
                 // Children
                 var objects = this.getDescendants(true);
@@ -17701,6 +17722,10 @@ var BABYLON;
             _this.orthoRight = null;
             _this.orthoBottom = null;
             _this.orthoTop = null;
+            /**
+             * default : 0.8
+             * FOV is set in Radians.
+             */
             _this.fov = 0.8;
             _this.minZ = 1;
             _this.maxZ = 10000.0;
@@ -17708,7 +17733,15 @@ var BABYLON;
             _this.mode = Camera.PERSPECTIVE_CAMERA;
             _this.isIntermediate = false;
             _this.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0);
+            /**
+            * Restricts the camera to viewing objects with the same layerMask.
+            * A camera with a layerMask of 1 will render meshes with no layerMask and meshes with a layerMask of 1.
+            */
             _this.layerMask = 0x0FFFFFFF;
+            /**
+            * default : FOVMODE_VERTICAL_FIXED
+            * fovMode sets the camera frustum bounds to the viewport bounds.
+            */
             _this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
             // Camera rig members
             _this.cameraRigMode = Camera.RIG_MODE_NONE;
@@ -17752,6 +17785,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(Camera, "FOVMODE_VERTICAL_FIXED", {
+            /**
+             * This is the default FOV mode for perspective cameras.
+             * This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.
+             *
+             */
             get: function () {
                 return Camera._FOVMODE_VERTICAL_FIXED;
             },
@@ -17759,6 +17797,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(Camera, "FOVMODE_HORIZONTAL_FIXED", {
+            /**
+             * This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.
+             *
+             */
             get: function () {
                 return Camera._FOVMODE_HORIZONTAL_FIXED;
             },
@@ -17969,7 +18011,7 @@ var BABYLON;
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
                 var cam = this._rigCameras[i];
                 var rigPostProcess = cam._rigPostProcess;
-                // for VR rig, there does not have to be a post process 
+                // for VR rig, there does not have to be a post process
                 if (rigPostProcess) {
                     var isPass = rigPostProcess instanceof BABYLON.PassPostProcess;
                     if (isPass) {
@@ -17996,7 +18038,7 @@ var BABYLON;
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
-            this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated            
+            this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
             return this._postProcesses.indexOf(postProcess);
         };
         Camera.prototype.detachPostProcess = function (postProcess) {
@@ -18229,7 +18271,7 @@ var BABYLON;
             }
             this.cameraRigMode = mode;
             this._cameraRigParams = {};
-            //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target, 
+            //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target,
             //not from a given angle as it is now, but until that complete code rewriting provisional stereoHalfAngle value is introduced
             this._cameraRigParams.interaxialDistance = rigParams.interaxialDistance || 0.0637;
             this._cameraRigParams.stereoHalfAngle = BABYLON.Tools.ToRadians(this._cameraRigParams.interaxialDistance / 0.0637);
@@ -20767,6 +20809,34 @@ var BABYLON;
         Scene.prototype.unregisterAfterRender = function (func) {
             this.onAfterRenderObservable.removeCallback(func);
         };
+        Scene.prototype._executeOnceBeforeRender = function (func) {
+            var _this = this;
+            var execFunc = function () {
+                func();
+                setTimeout(function () {
+                    _this.unregisterBeforeRender(execFunc);
+                });
+            };
+            this.registerBeforeRender(execFunc);
+        };
+        /**
+         * The provided function will run before render once and will be disposed afterwards.
+         * A timeout delay can be provided so that the function will be executed in N ms.
+         * The timeout is using the browser's native setTimeout so time percision cannot be guaranteed.
+         * @param func The function to be executed.
+         * @param timeout optional delay in ms
+         */
+        Scene.prototype.executeOnceBeforeRender = function (func, timeout) {
+            var _this = this;
+            if (timeout !== undefined) {
+                setTimeout(function () {
+                    _this._executeOnceBeforeRender(func);
+                }, timeout);
+            }
+            else {
+                this._executeOnceBeforeRender(func);
+            }
+        };
         Scene.prototype._addPendingData = function (data) {
             this._pendingData.push(data);
         };
@@ -24550,12 +24620,18 @@ var BABYLON;
                     source._geometry.applyToMesh(_this);
                 }
                 // Deep copy
-                BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source"], ["_poseMatrix", "_source"]);
+                BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source", "metadata"], ["_poseMatrix", "_source"]);
+                // Metadata
+                if (source.metadata && source.metadata.clone) {
+                    _this.metadata = source.metadata.clone();
+                }
+                else {
+                    _this.metadata = source.metadata;
+                }
                 // Tags
                 if (BABYLON.Tags && BABYLON.Tags.HasTags(source)) {
                     BABYLON.Tags.AddTagsTo(_this, BABYLON.Tags.GetTags(source, true));
                 }
-                _this.metadata = source.metadata;
                 // Parent
                 _this.parent = source.parent;
                 // Pivot

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 64 - 18
dist/preview release/modules/core/index.d.ts


+ 84 - 8
dist/preview release/modules/core/index.js

@@ -1733,6 +1733,13 @@ var BABYLON;
             return this;
         };
         /**
+         * Divides the current Vector3 coordinates by the passed ones.
+         * Returns the updated Vector3.
+         */
+        Vector2.prototype.divideInPlace = function (otherVector) {
+            return this.divideToRef(otherVector, this);
+        };
+        /**
          * Returns a new Vector2 with current Vector2 negated coordinates.
          */
         Vector2.prototype.negate = function () {
@@ -2208,6 +2215,13 @@ var BABYLON;
             return this;
         };
         /**
+         * Divides the current Vector3 coordinates by the passed ones.
+         * Returns the updated Vector3.
+         */
+        Vector3.prototype.divideInPlace = function (otherVector) {
+            return this.divideToRef(otherVector, this);
+        };
+        /**
          * Updates the current Vector3 with the minimal coordinate values between its and the passed vector ones.
          * Returns the updated Vector3.
          */
@@ -2937,6 +2951,13 @@ var BABYLON;
             return this;
         };
         /**
+         * Divides the current Vector3 coordinates by the passed ones.
+         * Returns the updated Vector3.
+         */
+        Vector4.prototype.divideInPlace = function (otherVector) {
+            return this.divideToRef(otherVector, this);
+        };
+        /**
          * Updates the Vector4 coordinates with the minimum values between its own and the passed vector ones.
          */
         Vector4.prototype.MinimizeInPlace = function (other) {
@@ -6426,10 +6447,11 @@ var BABYLON;
         /**
          * Remove a callback from the Observable object
          * @param callback the callback to remove. If it doesn't belong to this Observable, false will be returned.
+         * @param scope optional scope. If used only the callbacks with this scope will be removed.
         */
-        Observable.prototype.removeCallback = function (callback) {
+        Observable.prototype.removeCallback = function (callback, scope) {
             for (var index = 0; index < this._observers.length; index++) {
-                if (this._observers[index].callback === callback) {
+                if (this._observers[index].callback === callback && (!scope || scope === this._observers[index].scope)) {
                     this._observers.splice(index, 1);
                     return true;
                 }
@@ -15204,7 +15226,6 @@ var BABYLON;
             this.getScene().stopAnimation(this);
             // Remove from scene
             this.getScene().removeTransformNode(this);
-            this._cache = {};
             if (!doNotRecurse) {
                 // Children
                 var objects = this.getDescendants(true);
@@ -17704,6 +17725,10 @@ var BABYLON;
             _this.orthoRight = null;
             _this.orthoBottom = null;
             _this.orthoTop = null;
+            /**
+             * default : 0.8
+             * FOV is set in Radians.
+             */
             _this.fov = 0.8;
             _this.minZ = 1;
             _this.maxZ = 10000.0;
@@ -17711,7 +17736,15 @@ var BABYLON;
             _this.mode = Camera.PERSPECTIVE_CAMERA;
             _this.isIntermediate = false;
             _this.viewport = new BABYLON.Viewport(0, 0, 1.0, 1.0);
+            /**
+            * Restricts the camera to viewing objects with the same layerMask.
+            * A camera with a layerMask of 1 will render meshes with no layerMask and meshes with a layerMask of 1.
+            */
             _this.layerMask = 0x0FFFFFFF;
+            /**
+            * default : FOVMODE_VERTICAL_FIXED
+            * fovMode sets the camera frustum bounds to the viewport bounds.
+            */
             _this.fovMode = Camera.FOVMODE_VERTICAL_FIXED;
             // Camera rig members
             _this.cameraRigMode = Camera.RIG_MODE_NONE;
@@ -17755,6 +17788,11 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(Camera, "FOVMODE_VERTICAL_FIXED", {
+            /**
+             * This is the default FOV mode for perspective cameras.
+             * This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.
+             *
+             */
             get: function () {
                 return Camera._FOVMODE_VERTICAL_FIXED;
             },
@@ -17762,6 +17800,10 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(Camera, "FOVMODE_HORIZONTAL_FIXED", {
+            /**
+             * This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.
+             *
+             */
             get: function () {
                 return Camera._FOVMODE_HORIZONTAL_FIXED;
             },
@@ -17972,7 +18014,7 @@ var BABYLON;
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
                 var cam = this._rigCameras[i];
                 var rigPostProcess = cam._rigPostProcess;
-                // for VR rig, there does not have to be a post process 
+                // for VR rig, there does not have to be a post process
                 if (rigPostProcess) {
                     var isPass = rigPostProcess instanceof BABYLON.PassPostProcess;
                     if (isPass) {
@@ -17999,7 +18041,7 @@ var BABYLON;
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
-            this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated            
+            this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
             return this._postProcesses.indexOf(postProcess);
         };
         Camera.prototype.detachPostProcess = function (postProcess) {
@@ -18232,7 +18274,7 @@ var BABYLON;
             }
             this.cameraRigMode = mode;
             this._cameraRigParams = {};
-            //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target, 
+            //we have to implement stereo camera calcultating left and right viewpoints from interaxialDistance and target,
             //not from a given angle as it is now, but until that complete code rewriting provisional stereoHalfAngle value is introduced
             this._cameraRigParams.interaxialDistance = rigParams.interaxialDistance || 0.0637;
             this._cameraRigParams.stereoHalfAngle = BABYLON.Tools.ToRadians(this._cameraRigParams.interaxialDistance / 0.0637);
@@ -20770,6 +20812,34 @@ var BABYLON;
         Scene.prototype.unregisterAfterRender = function (func) {
             this.onAfterRenderObservable.removeCallback(func);
         };
+        Scene.prototype._executeOnceBeforeRender = function (func) {
+            var _this = this;
+            var execFunc = function () {
+                func();
+                setTimeout(function () {
+                    _this.unregisterBeforeRender(execFunc);
+                });
+            };
+            this.registerBeforeRender(execFunc);
+        };
+        /**
+         * The provided function will run before render once and will be disposed afterwards.
+         * A timeout delay can be provided so that the function will be executed in N ms.
+         * The timeout is using the browser's native setTimeout so time percision cannot be guaranteed.
+         * @param func The function to be executed.
+         * @param timeout optional delay in ms
+         */
+        Scene.prototype.executeOnceBeforeRender = function (func, timeout) {
+            var _this = this;
+            if (timeout !== undefined) {
+                setTimeout(function () {
+                    _this._executeOnceBeforeRender(func);
+                }, timeout);
+            }
+            else {
+                this._executeOnceBeforeRender(func);
+            }
+        };
         Scene.prototype._addPendingData = function (data) {
             this._pendingData.push(data);
         };
@@ -24553,12 +24623,18 @@ var BABYLON;
                     source._geometry.applyToMesh(_this);
                 }
                 // Deep copy
-                BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source"], ["_poseMatrix", "_source"]);
+                BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source", "metadata"], ["_poseMatrix", "_source"]);
+                // Metadata
+                if (source.metadata && source.metadata.clone) {
+                    _this.metadata = source.metadata.clone();
+                }
+                else {
+                    _this.metadata = source.metadata;
+                }
                 // Tags
                 if (BABYLON.Tags && BABYLON.Tags.HasTags(source)) {
                     BABYLON.Tags.AddTagsTo(_this, BABYLON.Tags.GetTags(source, true));
                 }
-                _this.metadata = source.metadata;
                 // Parent
                 _this.parent = source.parent;
                 // Pivot

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/csg/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 380 - 1
dist/preview release/modules/debug/es6.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 96 - 16
dist/preview release/modules/debug/index.d.ts


+ 379 - 1
dist/preview release/modules/debug/index.js

@@ -23,6 +23,384 @@ var BABYLON3 = require('babylonjs/stringDictionary');
 if(BABYLON !== BABYLON3) __extends(BABYLON, BABYLON3);
 var BABYLON4 = require('babylonjs/actions');
 if(BABYLON !== BABYLON4) __extends(BABYLON, BABYLON4);
+
+var BABYLON;
+(function (BABYLON) {
+    var Debug = /** @class */ (function () {
+        function Debug() {
+        }
+        Debug.AxesViewer = /** @class */ (function () {
+            function AxesViewer(scene, scaleLines) {
+                if (scaleLines === void 0) { scaleLines = 1; }
+                this._xline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                this._yline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                this._zline = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                this.scaleLines = 1;
+                this.scaleLines = scaleLines;
+                this._xmesh = BABYLON.Mesh.CreateLines("xline", this._xline, scene, true);
+                this._ymesh = BABYLON.Mesh.CreateLines("yline", this._yline, scene, true);
+                this._zmesh = BABYLON.Mesh.CreateLines("zline", this._zline, scene, true);
+                this._xmesh.renderingGroupId = 2;
+                this._ymesh.renderingGroupId = 2;
+                this._zmesh.renderingGroupId = 2;
+                this._xmesh.material.checkReadyOnlyOnce = true;
+                this._xmesh.color = new BABYLON.Color3(1, 0, 0);
+                this._ymesh.material.checkReadyOnlyOnce = true;
+                this._ymesh.color = new BABYLON.Color3(0, 1, 0);
+                this._zmesh.material.checkReadyOnlyOnce = true;
+                this._zmesh.color = new BABYLON.Color3(0, 0, 1);
+                this.scene = scene;
+            }
+            AxesViewer.prototype.update = function (position, xaxis, yaxis, zaxis) {
+                var scaleLines = this.scaleLines;
+                if (this._xmesh) {
+                    this._xmesh.position.copyFrom(position);
+                }
+                if (this._ymesh) {
+                    this._ymesh.position.copyFrom(position);
+                }
+                if (this._zmesh) {
+                    this._zmesh.position.copyFrom(position);
+                }
+                var point2 = this._xline[1];
+                point2.x = xaxis.x * scaleLines;
+                point2.y = xaxis.y * scaleLines;
+                point2.z = xaxis.z * scaleLines;
+                BABYLON.Mesh.CreateLines("", this._xline, null, false, this._xmesh);
+                point2 = this._yline[1];
+                point2.x = yaxis.x * scaleLines;
+                point2.y = yaxis.y * scaleLines;
+                point2.z = yaxis.z * scaleLines;
+                BABYLON.Mesh.CreateLines("", this._yline, null, false, this._ymesh);
+                point2 = this._zline[1];
+                point2.x = zaxis.x * scaleLines;
+                point2.y = zaxis.y * scaleLines;
+                point2.z = zaxis.z * scaleLines;
+                BABYLON.Mesh.CreateLines("", this._zline, null, false, this._zmesh);
+            };
+            AxesViewer.prototype.dispose = function () {
+                if (this._xmesh) {
+                    this._xmesh.dispose();
+                }
+                if (this._ymesh) {
+                    this._ymesh.dispose();
+                }
+                if (this._zmesh) {
+                    this._zmesh.dispose();
+                }
+                this._xmesh = null;
+                this._ymesh = null;
+                this._zmesh = null;
+                this.scene = null;
+            };
+            return AxesViewer;
+        }());
+        Debug.BoneAxesViewer = /** @class */ (function (_super) {
+            __extends(BoneAxesViewer, _super);
+            function BoneAxesViewer(scene, bone, mesh, scaleLines) {
+                if (scaleLines === void 0) { scaleLines = 1; }
+                var _this = _super.call(this, scene, scaleLines) || this;
+                _this.pos = BABYLON.Vector3.Zero();
+                _this.xaxis = BABYLON.Vector3.Zero();
+                _this.yaxis = BABYLON.Vector3.Zero();
+                _this.zaxis = BABYLON.Vector3.Zero();
+                _this.mesh = mesh;
+                _this.bone = bone;
+                return _this;
+            }
+            BoneAxesViewer.prototype.update = function () {
+                if (!this.mesh || !this.bone) {
+                    return;
+                }
+                var bone = this.bone;
+                bone.getAbsolutePositionToRef(this.mesh, this.pos);
+                bone.getDirectionToRef(BABYLON.Axis.X, this.mesh, this.xaxis);
+                bone.getDirectionToRef(BABYLON.Axis.Y, this.mesh, this.yaxis);
+                bone.getDirectionToRef(BABYLON.Axis.Z, this.mesh, this.zaxis);
+                _super.prototype.update.call(this, this.pos, this.xaxis, this.yaxis, this.zaxis);
+            };
+            BoneAxesViewer.prototype.dispose = function () {
+                if (this.mesh) {
+                    this.mesh = null;
+                    this.bone = null;
+                    _super.prototype.dispose.call(this);
+                }
+            };
+            return BoneAxesViewer;
+        }(Debug.AxesViewer));
+        Debug.PhysicsViewer = /** @class */ (function () {
+            function PhysicsViewer(scene) {
+                this._impostors = [];
+                this._meshes = [];
+                this._numMeshes = 0;
+                this._scene = scene || BABYLON.Engine.LastCreatedScene;
+                var physicEngine = this._scene.getPhysicsEngine();
+                if (physicEngine) {
+                    this._physicsEnginePlugin = physicEngine.getPhysicsPlugin();
+                }
+            }
+            PhysicsViewer.prototype._updateDebugMeshes = function () {
+                var plugin = this._physicsEnginePlugin;
+                for (var i = 0; i < this._numMeshes; i++) {
+                    var impostor = this._impostors[i];
+                    if (!impostor) {
+                        continue;
+                    }
+                    if (impostor.isDisposed) {
+                        this.hideImpostor(this._impostors[i--]);
+                    }
+                    else {
+                        var mesh = this._meshes[i];
+                        if (mesh && plugin) {
+                            plugin.syncMeshWithImpostor(mesh, impostor);
+                        }
+                    }
+                }
+            };
+            PhysicsViewer.prototype.showImpostor = function (impostor) {
+                if (!this._scene) {
+                    return;
+                }
+                for (var i = 0; i < this._numMeshes; i++) {
+                    if (this._impostors[i] == impostor) {
+                        return;
+                    }
+                }
+                var debugMesh = this._getDebugMesh(impostor, this._scene);
+                if (debugMesh) {
+                    this._impostors[this._numMeshes] = impostor;
+                    this._meshes[this._numMeshes] = debugMesh;
+                    if (this._numMeshes === 0) {
+                        this._renderFunction = this._updateDebugMeshes.bind(this);
+                        this._scene.registerBeforeRender(this._renderFunction);
+                    }
+                    this._numMeshes++;
+                }
+            };
+            PhysicsViewer.prototype.hideImpostor = function (impostor) {
+                if (!impostor || !this._scene) {
+                    return;
+                }
+                var removed = false;
+                for (var i = 0; i < this._numMeshes; i++) {
+                    if (this._impostors[i] == impostor) {
+                        var mesh = this._meshes[i];
+                        if (!mesh) {
+                            continue;
+                        }
+                        this._scene.removeMesh(mesh);
+                        mesh.dispose();
+                        this._numMeshes--;
+                        if (this._numMeshes > 0) {
+                            this._meshes[i] = this._meshes[this._numMeshes];
+                            this._impostors[i] = this._impostors[this._numMeshes];
+                            this._meshes[this._numMeshes] = null;
+                            this._impostors[this._numMeshes] = null;
+                        }
+                        else {
+                            this._meshes[0] = null;
+                            this._impostors[0] = null;
+                        }
+                        removed = true;
+                        break;
+                    }
+                }
+                if (removed && this._numMeshes === 0) {
+                    this._scene.unregisterBeforeRender(this._renderFunction);
+                }
+            };
+            PhysicsViewer.prototype._getDebugMaterial = function (scene) {
+                if (!this._debugMaterial) {
+                    this._debugMaterial = new BABYLON.StandardMaterial('', scene);
+                    this._debugMaterial.wireframe = true;
+                }
+                return this._debugMaterial;
+            };
+            PhysicsViewer.prototype._getDebugBoxMesh = function (scene) {
+                if (!this._debugBoxMesh) {
+                    this._debugBoxMesh = BABYLON.MeshBuilder.CreateBox('physicsBodyBoxViewMesh', { size: 1 }, scene);
+                    this._debugBoxMesh.renderingGroupId = 1;
+                    this._debugBoxMesh.rotationQuaternion = BABYLON.Quaternion.Identity();
+                    this._debugBoxMesh.material = this._getDebugMaterial(scene);
+                    scene.removeMesh(this._debugBoxMesh);
+                }
+                return this._debugBoxMesh.createInstance('physicsBodyBoxViewInstance');
+            };
+            PhysicsViewer.prototype._getDebugSphereMesh = function (scene) {
+                if (!this._debugSphereMesh) {
+                    this._debugSphereMesh = BABYLON.MeshBuilder.CreateSphere('physicsBodySphereViewMesh', { diameter: 1 }, scene);
+                    this._debugSphereMesh.renderingGroupId = 1;
+                    this._debugSphereMesh.rotationQuaternion = BABYLON.Quaternion.Identity();
+                    this._debugSphereMesh.material = this._getDebugMaterial(scene);
+                    scene.removeMesh(this._debugSphereMesh);
+                }
+                return this._debugSphereMesh.createInstance('physicsBodyBoxViewInstance');
+            };
+            PhysicsViewer.prototype._getDebugMesh = function (impostor, scene) {
+                var mesh = null;
+                if (impostor.type == BABYLON.PhysicsImpostor.BoxImpostor) {
+                    mesh = this._getDebugBoxMesh(scene);
+                    impostor.getBoxSizeToRef(mesh.scaling);
+                }
+                else if (impostor.type == BABYLON.PhysicsImpostor.SphereImpostor) {
+                    mesh = this._getDebugSphereMesh(scene);
+                    var radius = impostor.getRadius();
+                    mesh.scaling.x = radius * 2;
+                    mesh.scaling.y = radius * 2;
+                    mesh.scaling.z = radius * 2;
+                }
+                return mesh;
+            };
+            PhysicsViewer.prototype.dispose = function () {
+                for (var i = 0; i < this._numMeshes; i++) {
+                    this.hideImpostor(this._impostors[i]);
+                }
+                if (this._debugBoxMesh) {
+                    this._debugBoxMesh.dispose();
+                }
+                if (this._debugSphereMesh) {
+                    this._debugSphereMesh.dispose();
+                }
+                if (this._debugMaterial) {
+                    this._debugMaterial.dispose();
+                }
+                this._impostors.length = 0;
+                this._scene = null;
+                this._physicsEnginePlugin = null;
+            };
+            return PhysicsViewer;
+        }());
+        Debug.SkeletonViewer = /** @class */ (function () {
+            function SkeletonViewer(skeleton, mesh, scene, autoUpdateBonesMatrices, renderingGroupId) {
+                if (autoUpdateBonesMatrices === void 0) { autoUpdateBonesMatrices = true; }
+                if (renderingGroupId === void 0) { renderingGroupId = 1; }
+                this.skeleton = skeleton;
+                this.mesh = mesh;
+                this.autoUpdateBonesMatrices = autoUpdateBonesMatrices;
+                this.renderingGroupId = renderingGroupId;
+                this.color = BABYLON.Color3.White();
+                this._debugLines = new Array();
+                this._isEnabled = false;
+                this._scene = scene;
+                this.update();
+                this._renderFunction = this.update.bind(this);
+            }
+            Object.defineProperty(SkeletonViewer.prototype, "isEnabled", {
+                get: function () {
+                    return this._isEnabled;
+                },
+                set: function (value) {
+                    if (this._isEnabled === value) {
+                        return;
+                    }
+                    this._isEnabled = value;
+                    if (value) {
+                        this._scene.registerBeforeRender(this._renderFunction);
+                    }
+                    else {
+                        this._scene.unregisterBeforeRender(this._renderFunction);
+                    }
+                },
+                enumerable: true,
+                configurable: true
+            });
+            SkeletonViewer.prototype._getBonePosition = function (position, bone, meshMat, x, y, z) {
+                if (x === void 0) { x = 0; }
+                if (y === void 0) { y = 0; }
+                if (z === void 0) { z = 0; }
+                var tmat = BABYLON.Tmp.Matrix[0];
+                var parentBone = bone.getParent();
+                tmat.copyFrom(bone.getLocalMatrix());
+                if (x !== 0 || y !== 0 || z !== 0) {
+                    var tmat2 = BABYLON.Tmp.Matrix[1];
+                    BABYLON.Matrix.IdentityToRef(tmat2);
+                    tmat2.m[12] = x;
+                    tmat2.m[13] = y;
+                    tmat2.m[14] = z;
+                    tmat2.multiplyToRef(tmat, tmat);
+                }
+                if (parentBone) {
+                    tmat.multiplyToRef(parentBone.getAbsoluteTransform(), tmat);
+                }
+                tmat.multiplyToRef(meshMat, tmat);
+                position.x = tmat.m[12];
+                position.y = tmat.m[13];
+                position.z = tmat.m[14];
+            };
+            SkeletonViewer.prototype._getLinesForBonesWithLength = function (bones, meshMat) {
+                var len = bones.length;
+                var meshPos = this.mesh.position;
+                for (var i = 0; i < len; i++) {
+                    var bone = bones[i];
+                    var points = this._debugLines[i];
+                    if (!points) {
+                        points = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                        this._debugLines[i] = points;
+                    }
+                    this._getBonePosition(points[0], bone, meshMat);
+                    this._getBonePosition(points[1], bone, meshMat, 0, bone.length, 0);
+                    points[0].subtractInPlace(meshPos);
+                    points[1].subtractInPlace(meshPos);
+                }
+            };
+            SkeletonViewer.prototype._getLinesForBonesNoLength = function (bones, meshMat) {
+                var len = bones.length;
+                var boneNum = 0;
+                var meshPos = this.mesh.position;
+                for (var i = len - 1; i >= 0; i--) {
+                    var childBone = bones[i];
+                    var parentBone = childBone.getParent();
+                    if (!parentBone) {
+                        continue;
+                    }
+                    var points = this._debugLines[boneNum];
+                    if (!points) {
+                        points = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+                        this._debugLines[boneNum] = points;
+                    }
+                    childBone.getAbsolutePositionToRef(this.mesh, points[0]);
+                    parentBone.getAbsolutePositionToRef(this.mesh, points[1]);
+                    points[0].subtractInPlace(meshPos);
+                    points[1].subtractInPlace(meshPos);
+                    boneNum++;
+                }
+            };
+            SkeletonViewer.prototype.update = function () {
+                if (this.autoUpdateBonesMatrices) {
+                    this.skeleton.computeAbsoluteTransforms();
+                }
+                if (this.skeleton.bones[0].length === undefined) {
+                    this._getLinesForBonesNoLength(this.skeleton.bones, this.mesh.getWorldMatrix());
+                }
+                else {
+                    this._getLinesForBonesWithLength(this.skeleton.bones, this.mesh.getWorldMatrix());
+                }
+                if (!this._debugMesh) {
+                    this._debugMesh = BABYLON.MeshBuilder.CreateLineSystem("", { lines: this._debugLines, updatable: true, instance: null }, this._scene);
+                    this._debugMesh.renderingGroupId = this.renderingGroupId;
+                }
+                else {
+                    BABYLON.MeshBuilder.CreateLineSystem("", { lines: this._debugLines, updatable: true, instance: this._debugMesh }, this._scene);
+                }
+                this._debugMesh.position.copyFrom(this.mesh.position);
+                this._debugMesh.color = this.color;
+            };
+            SkeletonViewer.prototype.dispose = function () {
+                if (this._debugMesh) {
+                    this.isEnabled = false;
+                    this._debugMesh.dispose();
+                    this._debugMesh = null;
+                }
+            };
+            return SkeletonViewer;
+        }());
+        return Debug;
+    }());
+    BABYLON.Debug = Debug;
+})(BABYLON || (BABYLON = {}));
+
+//# sourceMappingURL=babylon.debugModules.js.map
+
 var BABYLON;
 (function (BABYLON) {
     var RayHelper = /** @class */ (function () {
@@ -371,7 +749,7 @@ BABYLON.Effect.IncludesShadersStore['lightFragment'] = "#ifdef LIGHT{X}\n#if def
 BABYLON.Effect.IncludesShadersStore['logDepthFragment'] = "#ifdef LOGARITHMICDEPTH\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\n#endif";
 BABYLON.Effect.IncludesShadersStore['fogFragment'] = "#ifdef FOG\nfloat fog=CalcFogFactor();\ncolor.rgb=fog*color.rgb+(1.0-fog)*vFogColor;\n#endif";
 (function() {
-var EXPORTS = {};EXPORTS['RayHelper'] = BABYLON['RayHelper'];EXPORTS['DebugLayer'] = BABYLON['DebugLayer'];EXPORTS['BoundingBoxRenderer'] = BABYLON['BoundingBoxRenderer'];
+var EXPORTS = {};EXPORTS['Debug'] = BABYLON['Debug'];EXPORTS['RayHelper'] = BABYLON['RayHelper'];EXPORTS['DebugLayer'] = BABYLON['DebugLayer'];EXPORTS['BoundingBoxRenderer'] = BABYLON['BoundingBoxRenderer'];
     globalObject["BABYLON"] = globalObject["BABYLON"] || BABYLON;
     module.exports = EXPORTS;
     })();

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/defaultRenderingPipeline/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/depthRenderer/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/directionalLight/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/environmentHelper/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/freeCamera/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/fresnel/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/gamepad/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/geometryBufferRenderer/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/gpuParticles/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/hdr/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/hemisphericLight/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/highlights/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/instrumentation/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/layer/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/lensFlares/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/loader/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/meshBuilder/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/morphTargets/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/multiMaterial/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/nullEngine/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/octrees/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/offline/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/optimizations/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/particles/index.d.ts


+ 6 - 1
dist/preview release/modules/pbrMaterial/es6.js

@@ -342,6 +342,10 @@ var BABYLON;
              * Force normal to face away from face.
              */
             _this._forceNormalForward = false;
+            /**
+             * Force metallic workflow.
+             */
+            _this._forceMetallicWorkflow = false;
             _this._renderTargets = new BABYLON.SmartArray(16);
             _this._globalAmbientColor = new BABYLON.Color3(0, 0, 0);
             // Setup the default processing configuration to the scene.
@@ -712,7 +716,7 @@ var BABYLON;
                 defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;
                 defines.USEPHYSICALLIGHTFALLOFF = this._usePhysicalLightFalloff;
                 defines.RADIANCEOVERALPHA = this._useRadianceOverAlpha;
-                if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
+                if (this._forceMetallicWorkflow || (this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
                     defines.METALLICWORKFLOW = true;
                 }
                 else {
@@ -2191,6 +2195,7 @@ var BABYLON;
             _this._useRoughnessFromMetallicTextureAlpha = false;
             _this._useRoughnessFromMetallicTextureGreen = true;
             _this._useMetallnessFromMetallicTextureBlue = true;
+            _this._forceMetallicWorkflow = true;
             return _this;
         }
         /**

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 21 - 17
dist/preview release/modules/pbrMaterial/index.d.ts


+ 6 - 1
dist/preview release/modules/pbrMaterial/index.js

@@ -346,6 +346,10 @@ var BABYLON;
              * Force normal to face away from face.
              */
             _this._forceNormalForward = false;
+            /**
+             * Force metallic workflow.
+             */
+            _this._forceMetallicWorkflow = false;
             _this._renderTargets = new BABYLON.SmartArray(16);
             _this._globalAmbientColor = new BABYLON.Color3(0, 0, 0);
             // Setup the default processing configuration to the scene.
@@ -716,7 +720,7 @@ var BABYLON;
                 defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;
                 defines.USEPHYSICALLIGHTFALLOFF = this._usePhysicalLightFalloff;
                 defines.RADIANCEOVERALPHA = this._useRadianceOverAlpha;
-                if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
+                if (this._forceMetallicWorkflow || (this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
                     defines.METALLICWORKFLOW = true;
                 }
                 else {
@@ -2195,6 +2199,7 @@ var BABYLON;
             _this._useRoughnessFromMetallicTextureAlpha = false;
             _this._useRoughnessFromMetallicTextureGreen = true;
             _this._useMetallnessFromMetallicTextureBlue = true;
+            _this._forceMetallicWorkflow = true;
             return _this;
         }
         /**

+ 3 - 1
dist/preview release/modules/physics/es6.js

@@ -1845,6 +1845,7 @@ var BABYLON;
             var center = impostor.getObjectCenter();
             //m.getAbsolutePosition().subtract(m.getBoundingInfo().boundingBox.centerWorld)
             this._tmpDeltaPosition.copyFrom(object.getAbsolutePivotPoint().subtract(center));
+            this._tmpDeltaPosition.divideInPlace(impostor.object.scaling);
             this._tmpPosition.copyFrom(center);
             var quaternion = object.rotationQuaternion;
             if (!quaternion) {
@@ -2164,7 +2165,8 @@ var BABYLON;
                     var extendSize = i.getObjectExtendSize();
                     if (i === impostor) {
                         var center = impostor.getObjectCenter();
-                        impostor.object.position.subtractToRef(center, _this._tmpPositionVector);
+                        impostor.object.getAbsolutePivotPoint().subtractToRef(center, _this._tmpPositionVector);
+                        _this._tmpPositionVector.divideInPlace(impostor.object.scaling);
                         //Can also use Array.prototype.push.apply
                         bodyConfig.pos.push(center.x);
                         bodyConfig.pos.push(center.y);

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/physics/index.d.ts


+ 3 - 1
dist/preview release/modules/physics/index.js

@@ -1849,6 +1849,7 @@ var BABYLON;
             var center = impostor.getObjectCenter();
             //m.getAbsolutePosition().subtract(m.getBoundingInfo().boundingBox.centerWorld)
             this._tmpDeltaPosition.copyFrom(object.getAbsolutePivotPoint().subtract(center));
+            this._tmpDeltaPosition.divideInPlace(impostor.object.scaling);
             this._tmpPosition.copyFrom(center);
             var quaternion = object.rotationQuaternion;
             if (!quaternion) {
@@ -2168,7 +2169,8 @@ var BABYLON;
                     var extendSize = i.getObjectExtendSize();
                     if (i === impostor) {
                         var center = impostor.getObjectCenter();
-                        impostor.object.position.subtractToRef(center, _this._tmpPositionVector);
+                        impostor.object.getAbsolutePivotPoint().subtractToRef(center, _this._tmpPositionVector);
+                        _this._tmpPositionVector.divideInPlace(impostor.object.scaling);
                         //Can also use Array.prototype.push.apply
                         bodyConfig.pos.push(center.x);
                         bodyConfig.pos.push(center.y);

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/picking/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/pointLight/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/polygonMesh/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/postProcesses/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/probes/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/procedural/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/renderingPipeline/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/serialization/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/shaderMaterial/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/shadows/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/simd/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/solidParticles/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/spotLight/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/sprites/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/stringDictionary/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/targetCamera/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/textureFormats/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/textureTools/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/touchCamera/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 16 - 16
dist/preview release/modules/userData/index.d.ts


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 17 - 17
dist/preview release/modules/virtualJoystick/index.d.ts


+ 26 - 12
dist/preview release/modules/vr/es6.js

@@ -1017,8 +1017,15 @@ var BABYLON;
             this._haloCenter = new BABYLON.Vector3(0, 0, 0);
             this._padSensibilityUp = 0.65;
             this._padSensibilityDown = 0.35;
+            /**
+             * Observable raised when a new mesh is selected based on meshSelectionPredicate
+             */
             this.onNewMeshSelected = new BABYLON.Observable();
             /**
+             * Observable raised when a new mesh is picked based on meshSelectionPredicate
+             */
+            this.onNewMeshPicked = new BABYLON.Observable();
+            /**
              * Observable raised before camera teleportation
             */
             this.onBeforeCameraTeleport = new BABYLON.Observable();
@@ -1030,9 +1037,13 @@ var BABYLON;
             * Observable raised when current selected mesh gets unselected
             */
             this.onSelectedMeshUnselected = new BABYLON.Observable();
+            /**
+             * Set teleportation enabled. If set to false camera teleportation will be disabled but camera rotation will be kept.
+             */
+            this.teleportationEnabled = true;
             this._pointerDownOnMeshAsked = false;
             this._isActionableMesh = false;
-            this._teleportationEnabled = false;
+            this._teleportationInitialized = false;
             this._interactionsEnabled = false;
             this._interactionsRequested = false;
             this._displayGaze = true;
@@ -1072,7 +1083,7 @@ var BABYLON;
                 if (gamepad.type !== BABYLON.Gamepad.POSE_ENABLED) {
                     if (gamepad.leftStick) {
                         gamepad.onleftstickchanged(function (stickValues) {
-                            if (_this._teleportationEnabled) {
+                            if (_this._teleportationInitialized && _this.teleportationEnabled) {
                                 // Listening to classic/xbox gamepad only if no VR controller is active
                                 if ((!_this._leftLaserPointer && !_this._rightLaserPointer) ||
                                     ((_this._leftLaserPointer && !_this._leftLaserPointer.isVisible) &&
@@ -1085,7 +1096,7 @@ var BABYLON;
                     }
                     if (gamepad.rightStick) {
                         gamepad.onrightstickchanged(function (stickValues) {
-                            if (_this._teleportationEnabled) {
+                            if (_this._teleportationInitialized) {
                                 _this._checkRotate(stickValues);
                             }
                         });
@@ -1587,13 +1598,13 @@ var BABYLON;
                 }
                 this._createGazeTracker();
                 this.raySelectionPredicate = function (mesh) {
-                    return true;
+                    return mesh.isVisible;
                 };
                 this.meshSelectionPredicate = function (mesh) {
                     return true;
                 };
                 this._raySelectionPredicate = function (mesh) {
-                    if (_this._isTeleportationFloor(mesh) || (mesh.isVisible && mesh.name.indexOf("gazeTracker") === -1
+                    if (_this._isTeleportationFloor(mesh) || (mesh.name.indexOf("gazeTracker") === -1
                         && mesh.name.indexOf("teleportationTarget") === -1
                         && mesh.name.indexOf("torusTeleportation") === -1
                         && mesh.name.indexOf("laserPointer") === -1)) {
@@ -1635,7 +1646,7 @@ var BABYLON;
         };
         VRExperienceHelper.prototype.enableTeleportation = function (vrTeleportationOptions) {
             if (vrTeleportationOptions === void 0) { vrTeleportationOptions = {}; }
-            if (!this._teleportationEnabled) {
+            if (!this._teleportationInitialized) {
                 this._teleportationRequested = true;
                 this.enableInteractions();
                 if (vrTeleportationOptions.floorMeshName) {
@@ -1659,7 +1670,7 @@ var BABYLON;
                 this._postProcessMove = new BABYLON.ImageProcessingPostProcess("postProcessMove", 1.0, this._webVRCamera, undefined, undefined, undefined, undefined, imageProcessingConfiguration);
                 this._webVRCamera.detachPostProcess(this._postProcessMove);
                 this._passProcessMove = new BABYLON.PassPostProcess("pass", 1.0, this._webVRCamera);
-                this._teleportationEnabled = true;
+                this._teleportationInitialized = true;
                 if (this._isDefaultTeleportationTarget) {
                     this._createTeleportationCircles();
                 }
@@ -1880,8 +1891,10 @@ var BABYLON;
                     });
                 }
                 webVRController.onPadValuesChangedObservable.add(function (stateObject) {
-                    _this._checkTeleportBackwards(stateObject);
-                    _this._checkTeleportWithRay(stateObject, webVRController);
+                    if (_this.teleportationEnabled) {
+                        _this._checkTeleportBackwards(stateObject);
+                        _this._checkTeleportWithRay(stateObject, webVRController);
+                    }
                     _this._checkRotate(stateObject);
                 });
             }
@@ -1947,7 +1960,7 @@ var BABYLON;
             this._hideTeleportationTarget();
         };
         VRExperienceHelper.prototype._displayTeleportationTarget = function () {
-            if (this._teleportationEnabled) {
+            if (this._teleportationInitialized) {
                 this._teleportationTarget.isVisible = true;
                 if (this._isDefaultTeleportationTarget) {
                     this._teleportationTarget.getChildren()[0].isVisible = true;
@@ -1955,7 +1968,7 @@ var BABYLON;
             }
         };
         VRExperienceHelper.prototype._hideTeleportationTarget = function () {
-            if (this._teleportationEnabled) {
+            if (this._teleportationInitialized) {
                 this._teleportationTarget.isVisible = false;
                 if (this._isDefaultTeleportationTarget) {
                     this._teleportationTarget.getChildren()[0].isVisible = false;
@@ -2209,7 +2222,7 @@ var BABYLON;
                     this._scene.simulatePointerMove(this._currentHit);
                 }
                 // The object selected is the floor, we're in a teleportation scenario
-                if (this._teleportationEnabled && this._isTeleportationFloor(hit.pickedMesh) && hit.pickedPoint) {
+                if (this._teleportationInitialized && this._isTeleportationFloor(hit.pickedMesh) && hit.pickedPoint) {
                     // Moving the teleportation area to this targetted point
                     this._moveTeleportationSelectorTo(hit);
                     return;
@@ -2219,6 +2232,7 @@ var BABYLON;
                 this._teleportationAllowed = false;
                 if (hit.pickedMesh !== this._currentMeshSelected) {
                     if (this.meshSelectionPredicate(hit.pickedMesh)) {
+                        this.onNewMeshPicked.notifyObservers(hit);
                         this._currentMeshSelected = hit.pickedMesh;
                         if (hit.pickedMesh.isPickable && hit.pickedMesh.actionManager) {
                             this.changeGazeColor(new BABYLON.Color3(0, 0, 1));

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 28 - 17
dist/preview release/modules/vr/index.d.ts


+ 26 - 12
dist/preview release/modules/vr/index.js

@@ -1021,8 +1021,15 @@ var BABYLON;
             this._haloCenter = new BABYLON.Vector3(0, 0, 0);
             this._padSensibilityUp = 0.65;
             this._padSensibilityDown = 0.35;
+            /**
+             * Observable raised when a new mesh is selected based on meshSelectionPredicate
+             */
             this.onNewMeshSelected = new BABYLON.Observable();
             /**
+             * Observable raised when a new mesh is picked based on meshSelectionPredicate
+             */
+            this.onNewMeshPicked = new BABYLON.Observable();
+            /**
              * Observable raised before camera teleportation
             */
             this.onBeforeCameraTeleport = new BABYLON.Observable();
@@ -1034,9 +1041,13 @@ var BABYLON;
             * Observable raised when current selected mesh gets unselected
             */
             this.onSelectedMeshUnselected = new BABYLON.Observable();
+            /**
+             * Set teleportation enabled. If set to false camera teleportation will be disabled but camera rotation will be kept.
+             */
+            this.teleportationEnabled = true;
             this._pointerDownOnMeshAsked = false;
             this._isActionableMesh = false;
-            this._teleportationEnabled = false;
+            this._teleportationInitialized = false;
             this._interactionsEnabled = false;
             this._interactionsRequested = false;
             this._displayGaze = true;
@@ -1076,7 +1087,7 @@ var BABYLON;
                 if (gamepad.type !== BABYLON.Gamepad.POSE_ENABLED) {
                     if (gamepad.leftStick) {
                         gamepad.onleftstickchanged(function (stickValues) {
-                            if (_this._teleportationEnabled) {
+                            if (_this._teleportationInitialized && _this.teleportationEnabled) {
                                 // Listening to classic/xbox gamepad only if no VR controller is active
                                 if ((!_this._leftLaserPointer && !_this._rightLaserPointer) ||
                                     ((_this._leftLaserPointer && !_this._leftLaserPointer.isVisible) &&
@@ -1089,7 +1100,7 @@ var BABYLON;
                     }
                     if (gamepad.rightStick) {
                         gamepad.onrightstickchanged(function (stickValues) {
-                            if (_this._teleportationEnabled) {
+                            if (_this._teleportationInitialized) {
                                 _this._checkRotate(stickValues);
                             }
                         });
@@ -1591,13 +1602,13 @@ var BABYLON;
                 }
                 this._createGazeTracker();
                 this.raySelectionPredicate = function (mesh) {
-                    return true;
+                    return mesh.isVisible;
                 };
                 this.meshSelectionPredicate = function (mesh) {
                     return true;
                 };
                 this._raySelectionPredicate = function (mesh) {
-                    if (_this._isTeleportationFloor(mesh) || (mesh.isVisible && mesh.name.indexOf("gazeTracker") === -1
+                    if (_this._isTeleportationFloor(mesh) || (mesh.name.indexOf("gazeTracker") === -1
                         && mesh.name.indexOf("teleportationTarget") === -1
                         && mesh.name.indexOf("torusTeleportation") === -1
                         && mesh.name.indexOf("laserPointer") === -1)) {
@@ -1639,7 +1650,7 @@ var BABYLON;
         };
         VRExperienceHelper.prototype.enableTeleportation = function (vrTeleportationOptions) {
             if (vrTeleportationOptions === void 0) { vrTeleportationOptions = {}; }
-            if (!this._teleportationEnabled) {
+            if (!this._teleportationInitialized) {
                 this._teleportationRequested = true;
                 this.enableInteractions();
                 if (vrTeleportationOptions.floorMeshName) {
@@ -1663,7 +1674,7 @@ var BABYLON;
                 this._postProcessMove = new BABYLON.ImageProcessingPostProcess("postProcessMove", 1.0, this._webVRCamera, undefined, undefined, undefined, undefined, imageProcessingConfiguration);
                 this._webVRCamera.detachPostProcess(this._postProcessMove);
                 this._passProcessMove = new BABYLON.PassPostProcess("pass", 1.0, this._webVRCamera);
-                this._teleportationEnabled = true;
+                this._teleportationInitialized = true;
                 if (this._isDefaultTeleportationTarget) {
                     this._createTeleportationCircles();
                 }
@@ -1884,8 +1895,10 @@ var BABYLON;
                     });
                 }
                 webVRController.onPadValuesChangedObservable.add(function (stateObject) {
-                    _this._checkTeleportBackwards(stateObject);
-                    _this._checkTeleportWithRay(stateObject, webVRController);
+                    if (_this.teleportationEnabled) {
+                        _this._checkTeleportBackwards(stateObject);
+                        _this._checkTeleportWithRay(stateObject, webVRController);
+                    }
                     _this._checkRotate(stateObject);
                 });
             }
@@ -1951,7 +1964,7 @@ var BABYLON;
             this._hideTeleportationTarget();
         };
         VRExperienceHelper.prototype._displayTeleportationTarget = function () {
-            if (this._teleportationEnabled) {
+            if (this._teleportationInitialized) {
                 this._teleportationTarget.isVisible = true;
                 if (this._isDefaultTeleportationTarget) {
                     this._teleportationTarget.getChildren()[0].isVisible = true;
@@ -1959,7 +1972,7 @@ var BABYLON;
             }
         };
         VRExperienceHelper.prototype._hideTeleportationTarget = function () {
-            if (this._teleportationEnabled) {
+            if (this._teleportationInitialized) {
                 this._teleportationTarget.isVisible = false;
                 if (this._isDefaultTeleportationTarget) {
                     this._teleportationTarget.getChildren()[0].isVisible = false;
@@ -2213,7 +2226,7 @@ var BABYLON;
                     this._scene.simulatePointerMove(this._currentHit);
                 }
                 // The object selected is the floor, we're in a teleportation scenario
-                if (this._teleportationEnabled && this._isTeleportationFloor(hit.pickedMesh) && hit.pickedPoint) {
+                if (this._teleportationInitialized && this._isTeleportationFloor(hit.pickedMesh) && hit.pickedPoint) {
                     // Moving the teleportation area to this targetted point
                     this._moveTeleportationSelectorTo(hit);
                     return;
@@ -2223,6 +2236,7 @@ var BABYLON;
                 this._teleportationAllowed = false;
                 if (hit.pickedMesh !== this._currentMeshSelected) {
                     if (this.meshSelectionPredicate(hit.pickedMesh)) {
+                        this.onNewMeshPicked.notifyObservers(hit);
                         this._currentMeshSelected = hit.pickedMesh;
                         if (hit.pickedMesh.isPickable && hit.pickedMesh.actionManager) {
                             this.changeGazeColor(new BABYLON.Color3(0, 0, 1));

+ 2 - 2
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 9 - 9
dist/preview release/viewer/babylon.viewer.js


+ 2 - 2
dist/preview release/viewer/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-viewer",
     "description": "A simple-to-use viewer based on BabylonJS to display 3D elements natively",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -24,7 +24,7 @@
     ],
     "license": "Apache-2.0",
     "peerDependencies": {
-        "babylonjs": ">=3.1.0-alpha"
+        "babylonjs": ">=3.2.0-alpha"
     },
     "engines": {
         "node": "*"

+ 210 - 29
package.json

@@ -9,46 +9,227 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.2.0-alpha0",
+    "version": "3.2.0-alpha2",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
     },
     "main": "dist/preview release/babylon.max.js",
     "files": [
+        "package.json",
         "dist/preview release/babylon.d.ts",
         "dist/preview release/babylon.js",
         "dist/preview release/babylon.max.js",
         "dist/preview release/babylon.worker.js",
-        "dist/preview release/loaders/babylon.glTFFileLoader.min.js",
-        "dist/preview release/loaders/babylon.objFileLoader.min.js",
-        "dist/preview release/loaders/babylon.stlFileLoader.min.js",
-        "dist/preview release/inspector/babylon.inspector.bundle.js",
-        "dist/preview release/materialsLibrary/babylon.fireMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.waterMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.normalMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.skyMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.furMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.gridMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.customMaterial.min.js",
-        "dist/preview release/materialsLibrary/babylon.cellMaterial.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js",
-        "dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js",
-        "dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js",
-        "dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js",
         "dist/preview release/Oimo.js",
-        "package.json"
+        "readme.md",
+        "dist/preview release/actions/index.js",
+        "dist/preview release/actions/index.d.ts",
+        "dist/preview release/actions/es6.js",
+        "dist/preview release/additionalCameras/index.js",
+        "dist/preview release/additionalCameras/index.d.ts",
+        "dist/preview release/additionalCameras/es6.js",
+        "dist/preview release/additionalMeshes/index.js",
+        "dist/preview release/additionalMeshes/index.d.ts",
+        "dist/preview release/additionalMeshes/es6.js",
+        "dist/preview release/additionalPostProcesses/index.js",
+        "dist/preview release/additionalPostProcesses/index.d.ts",
+        "dist/preview release/additionalPostProcesses/es6.js",
+        "dist/preview release/additionalPostProcess_blur/index.js",
+        "dist/preview release/additionalPostProcess_blur/index.d.ts",
+        "dist/preview release/additionalPostProcess_blur/es6.js",
+        "dist/preview release/additionalPostProcess_fxaa/index.js",
+        "dist/preview release/additionalPostProcess_fxaa/index.d.ts",
+        "dist/preview release/additionalPostProcess_fxaa/es6.js",
+        "dist/preview release/additionalPostProcess_highlights/index.js",
+        "dist/preview release/additionalPostProcess_highlights/index.d.ts",
+        "dist/preview release/additionalPostProcess_highlights/es6.js",
+        "dist/preview release/additionalPostProcess_imageProcessing/index.js",
+        "dist/preview release/additionalPostProcess_imageProcessing/index.d.ts",
+        "dist/preview release/additionalPostProcess_imageProcessing/es6.js",
+        "dist/preview release/additionalRenderingPipeline/index.js",
+        "dist/preview release/additionalRenderingPipeline/index.d.ts",
+        "dist/preview release/additionalRenderingPipeline/es6.js",
+        "dist/preview release/additionalTextures/index.js",
+        "dist/preview release/additionalTextures/index.d.ts",
+        "dist/preview release/additionalTextures/es6.js",
+        "dist/preview release/animations/index.js",
+        "dist/preview release/animations/index.d.ts",
+        "dist/preview release/animations/es6.js",
+        "dist/preview release/arcRotateCamera/index.js",
+        "dist/preview release/arcRotateCamera/index.d.ts",
+        "dist/preview release/arcRotateCamera/es6.js",
+        "dist/preview release/assetsManager/index.js",
+        "dist/preview release/assetsManager/index.d.ts",
+        "dist/preview release/assetsManager/es6.js",
+        "dist/preview release/audio/index.js",
+        "dist/preview release/audio/index.d.ts",
+        "dist/preview release/audio/es6.js",
+        "dist/preview release/backgroundMaterial/index.js",
+        "dist/preview release/backgroundMaterial/index.d.ts",
+        "dist/preview release/backgroundMaterial/es6.js",
+        "dist/preview release/bones/index.js",
+        "dist/preview release/bones/index.d.ts",
+        "dist/preview release/bones/es6.js",
+        "dist/preview release/cameraBehaviors/index.js",
+        "dist/preview release/cameraBehaviors/index.d.ts",
+        "dist/preview release/cameraBehaviors/es6.js",
+        "dist/preview release/collisions/index.js",
+        "dist/preview release/collisions/index.d.ts",
+        "dist/preview release/collisions/es6.js",
+        "dist/preview release/core/index.js",
+        "dist/preview release/core/index.d.ts",
+        "dist/preview release/core/es6.js",
+        "dist/preview release/csg/index.js",
+        "dist/preview release/csg/index.d.ts",
+        "dist/preview release/csg/es6.js",
+        "dist/preview release/debug/index.js",
+        "dist/preview release/debug/index.d.ts",
+        "dist/preview release/debug/es6.js",
+        "dist/preview release/defaultRenderingPipeline/index.js",
+        "dist/preview release/defaultRenderingPipeline/index.d.ts",
+        "dist/preview release/defaultRenderingPipeline/es6.js",
+        "dist/preview release/depthRenderer/index.js",
+        "dist/preview release/depthRenderer/index.d.ts",
+        "dist/preview release/depthRenderer/es6.js",
+        "dist/preview release/directionalLight/index.js",
+        "dist/preview release/directionalLight/index.d.ts",
+        "dist/preview release/directionalLight/es6.js",
+        "dist/preview release/environmentHelper/index.js",
+        "dist/preview release/environmentHelper/index.d.ts",
+        "dist/preview release/environmentHelper/es6.js",
+        "dist/preview release/freeCamera/index.js",
+        "dist/preview release/freeCamera/index.d.ts",
+        "dist/preview release/freeCamera/es6.js",
+        "dist/preview release/fresnel/index.js",
+        "dist/preview release/fresnel/index.d.ts",
+        "dist/preview release/fresnel/es6.js",
+        "dist/preview release/gamepad/index.js",
+        "dist/preview release/gamepad/index.d.ts",
+        "dist/preview release/gamepad/es6.js",
+        "dist/preview release/geometryBufferRenderer/index.js",
+        "dist/preview release/geometryBufferRenderer/index.d.ts",
+        "dist/preview release/geometryBufferRenderer/es6.js",
+        "dist/preview release/gpuParticles/index.js",
+        "dist/preview release/gpuParticles/index.d.ts",
+        "dist/preview release/gpuParticles/es6.js",
+        "dist/preview release/hdr/index.js",
+        "dist/preview release/hdr/index.d.ts",
+        "dist/preview release/hdr/es6.js",
+        "dist/preview release/hemisphericLight/index.js",
+        "dist/preview release/hemisphericLight/index.d.ts",
+        "dist/preview release/hemisphericLight/es6.js",
+        "dist/preview release/highlights/index.js",
+        "dist/preview release/highlights/index.d.ts",
+        "dist/preview release/highlights/es6.js",
+        "dist/preview release/instrumentation/index.js",
+        "dist/preview release/instrumentation/index.d.ts",
+        "dist/preview release/instrumentation/es6.js",
+        "dist/preview release/layer/index.js",
+        "dist/preview release/layer/index.d.ts",
+        "dist/preview release/layer/es6.js",
+        "dist/preview release/lensFlares/index.js",
+        "dist/preview release/lensFlares/index.d.ts",
+        "dist/preview release/lensFlares/es6.js",
+        "dist/preview release/loader/index.js",
+        "dist/preview release/loader/index.d.ts",
+        "dist/preview release/loader/es6.js",
+        "dist/preview release/meshBuilder/index.js",
+        "dist/preview release/meshBuilder/index.d.ts",
+        "dist/preview release/meshBuilder/es6.js",
+        "dist/preview release/morphTargets/index.js",
+        "dist/preview release/morphTargets/index.d.ts",
+        "dist/preview release/morphTargets/es6.js",
+        "dist/preview release/multiMaterial/index.js",
+        "dist/preview release/multiMaterial/index.d.ts",
+        "dist/preview release/multiMaterial/es6.js",
+        "dist/preview release/nullEngine/index.js",
+        "dist/preview release/nullEngine/index.d.ts",
+        "dist/preview release/nullEngine/es6.js",
+        "dist/preview release/octrees/index.js",
+        "dist/preview release/octrees/index.d.ts",
+        "dist/preview release/octrees/es6.js",
+        "dist/preview release/offline/index.js",
+        "dist/preview release/offline/index.d.ts",
+        "dist/preview release/offline/es6.js",
+        "dist/preview release/optimizations/index.js",
+        "dist/preview release/optimizations/index.d.ts",
+        "dist/preview release/optimizations/es6.js",
+        "dist/preview release/particles/index.js",
+        "dist/preview release/particles/index.d.ts",
+        "dist/preview release/particles/es6.js",
+        "dist/preview release/pbrMaterial/index.js",
+        "dist/preview release/pbrMaterial/index.d.ts",
+        "dist/preview release/pbrMaterial/es6.js",
+        "dist/preview release/physics/index.js",
+        "dist/preview release/physics/index.d.ts",
+        "dist/preview release/physics/es6.js",
+        "dist/preview release/picking/index.js",
+        "dist/preview release/picking/index.d.ts",
+        "dist/preview release/picking/es6.js",
+        "dist/preview release/pointLight/index.js",
+        "dist/preview release/pointLight/index.d.ts",
+        "dist/preview release/pointLight/es6.js",
+        "dist/preview release/polygonMesh/index.js",
+        "dist/preview release/polygonMesh/index.d.ts",
+        "dist/preview release/polygonMesh/es6.js",
+        "dist/preview release/postProcesses/index.js",
+        "dist/preview release/postProcesses/index.d.ts",
+        "dist/preview release/postProcesses/es6.js",
+        "dist/preview release/probes/index.js",
+        "dist/preview release/probes/index.d.ts",
+        "dist/preview release/probes/es6.js",
+        "dist/preview release/procedural/index.js",
+        "dist/preview release/procedural/index.d.ts",
+        "dist/preview release/procedural/es6.js",
+        "dist/preview release/renderingPipeline/index.js",
+        "dist/preview release/renderingPipeline/index.d.ts",
+        "dist/preview release/renderingPipeline/es6.js",
+        "dist/preview release/serialization/index.js",
+        "dist/preview release/serialization/index.d.ts",
+        "dist/preview release/serialization/es6.js",
+        "dist/preview release/shaderMaterial/index.js",
+        "dist/preview release/shaderMaterial/index.d.ts",
+        "dist/preview release/shaderMaterial/es6.js",
+        "dist/preview release/shadows/index.js",
+        "dist/preview release/shadows/index.d.ts",
+        "dist/preview release/shadows/es6.js",
+        "dist/preview release/simd/index.js",
+        "dist/preview release/simd/index.d.ts",
+        "dist/preview release/simd/es6.js",
+        "dist/preview release/solidParticles/index.js",
+        "dist/preview release/solidParticles/index.d.ts",
+        "dist/preview release/solidParticles/es6.js",
+        "dist/preview release/spotLight/index.js",
+        "dist/preview release/spotLight/index.d.ts",
+        "dist/preview release/spotLight/es6.js",
+        "dist/preview release/sprites/index.js",
+        "dist/preview release/sprites/index.d.ts",
+        "dist/preview release/sprites/es6.js",
+        "dist/preview release/stringDictionary/index.js",
+        "dist/preview release/stringDictionary/index.d.ts",
+        "dist/preview release/stringDictionary/es6.js",
+        "dist/preview release/targetCamera/index.js",
+        "dist/preview release/targetCamera/index.d.ts",
+        "dist/preview release/targetCamera/es6.js",
+        "dist/preview release/textureFormats/index.js",
+        "dist/preview release/textureFormats/index.d.ts",
+        "dist/preview release/textureFormats/es6.js",
+        "dist/preview release/textureTools/index.js",
+        "dist/preview release/textureTools/index.d.ts",
+        "dist/preview release/textureTools/es6.js",
+        "dist/preview release/touchCamera/index.js",
+        "dist/preview release/touchCamera/index.d.ts",
+        "dist/preview release/touchCamera/es6.js",
+        "dist/preview release/userData/index.js",
+        "dist/preview release/userData/index.d.ts",
+        "dist/preview release/userData/es6.js",
+        "dist/preview release/virtualJoystick/index.js",
+        "dist/preview release/virtualJoystick/index.d.ts",
+        "dist/preview release/virtualJoystick/es6.js",
+        "dist/preview release/vr/index.js",
+        "dist/preview release/vr/index.d.ts",
+        "dist/preview release/vr/es6.js"
     ],
     "typings": "dist/preview release/babylon.d.ts",
     "keywords": [