David Catuhe 6 سال پیش
والد
کامیت
d34156eb83

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 14759 - 14760
Playground/babylon.d.txt


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


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


+ 28 - 35
dist/preview release/babylon.max.js

@@ -8396,8 +8396,8 @@ var BABYLON;
          * @param result defines the target matrix
          */
         Matrix.RotationYawPitchRollToRef = function (yaw, pitch, roll, result) {
-            Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, this._tempQuaternion);
-            this._tempQuaternion.toRotationMatrix(result);
+            Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, MathTmp.Quaternion[0]);
+            MathTmp.Quaternion[0].toRotationMatrix(result);
         };
         /**
          * Creates a scaling matrix
@@ -8997,7 +8997,6 @@ var BABYLON;
             result.m[15] = 1.0;
             result._markAsUpdated();
         };
-        Matrix._tempQuaternion = new Quaternion();
         Matrix._xAxis = Vector3.Zero();
         Matrix._yAxis = Vector3.Zero();
         Matrix._zAxis = Vector3.Zero();
@@ -19274,7 +19273,7 @@ var BABYLON;
             this.reConstruct(min, max, worldMatrix);
         }
         /**
-         * Recreates the entire bounding sphere from scratch
+         * Recreates the entire bounding sphere from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19298,9 +19297,16 @@ var BABYLON;
             var tempRadiusVector = tmpVectors[0].setAll(newRadius);
             var min = this.center.subtractToRef(tempRadiusVector, tmpVectors[1]);
             var max = this.center.addToRef(tempRadiusVector, tmpVectors[2]);
-            this.reConstruct(min, max);
+            this.reConstruct(min, max, this._worldMatrix);
             return this;
         };
+        /**
+         * Gets the world matrix of the bounding box
+         * @returns a matrix
+         */
+        BoundingSphere.prototype.getWorldMatrix = function () {
+            return this._worldMatrix;
+        };
         // Methods
         /** @hidden */
         BoundingSphere.prototype._update = function (worldMatrix) {
@@ -19424,7 +19430,7 @@ var BABYLON;
         }
         // Methods
         /**
-         * Recreates the entire bounding box from scratch
+         * Recreates the entire bounding box from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19445,7 +19451,7 @@ var BABYLON;
             // OBB
             max.addToRef(min, this.center).scaleInPlace(0.5);
             max.subtractToRef(min, this.extendSize).scaleInPlace(0.5);
-            this._update(worldMatrix || this._worldMatrix || BABYLON.Matrix.Identity());
+            this._update(worldMatrix || BABYLON.Matrix.IdentityReadOnly);
         };
         /**
          * Scale the current bounding box by applying a scale factor
@@ -19461,7 +19467,7 @@ var BABYLON;
             var newRadius = diff.scaleInPlace(distance * 0.5);
             var min = this.center.subtractToRef(newRadius, tmpVectors[1]);
             var max = this.center.addToRef(newRadius, tmpVectors[2]);
-            this.reConstruct(min, max);
+            this.reConstruct(min, max, this._worldMatrix);
             return this;
         };
         /**
@@ -19471,15 +19477,6 @@ var BABYLON;
         BoundingBox.prototype.getWorldMatrix = function () {
             return this._worldMatrix;
         };
-        /**
-         * Sets the world matrix stored in the bounding box
-         * @param matrix defines the matrix to store
-         * @returns current bounding box
-         */
-        BoundingBox.prototype.setWorldMatrix = function (matrix) {
-            this._worldMatrix.copyFrom(matrix);
-            return this;
-        };
         /** @hidden */
         BoundingBox.prototype._update = function (world) {
             var minWorld = this.minimumWorld;
@@ -19655,22 +19652,21 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
-    var computeBoxExtents = function (axis, box) {
+    var _result0 = { min: 0, max: 0 };
+    var _result1 = { min: 0, max: 0 };
+    var computeBoxExtents = function (axis, box, result) {
         var p = BABYLON.Vector3.Dot(box.centerWorld, axis);
         var r0 = Math.abs(BABYLON.Vector3.Dot(box.directions[0], axis)) * box.extendSize.x;
         var r1 = Math.abs(BABYLON.Vector3.Dot(box.directions[1], axis)) * box.extendSize.y;
         var r2 = Math.abs(BABYLON.Vector3.Dot(box.directions[2], axis)) * box.extendSize.z;
         var r = r0 + r1 + r2;
-        return {
-            min: p - r,
-            max: p + r
-        };
+        result.min = p - r;
+        result.max = p + r;
     };
-    var extentsOverlap = function (min0, max0, min1, max1) { return !(min0 > max1 || min1 > max0); };
     var axisOverlap = function (axis, box0, box1) {
-        var result0 = computeBoxExtents(axis, box0);
-        var result1 = computeBoxExtents(axis, box1);
-        return extentsOverlap(result0.min, result0.max, result1.min, result1.max);
+        computeBoxExtents(axis, box0, _result0);
+        computeBoxExtents(axis, box1, _result1);
+        return !(_result0.min > _result1.max || _result1.min > _result0.max);
     };
     /**
      * Info for a bounding data of a mesh
@@ -19688,7 +19684,7 @@ var BABYLON;
             this.boundingSphere = new BABYLON.BoundingSphere(minimum, maximum, worldMatrix);
         }
         /**
-         * Recreates the entire bounding info from scratch
+         * Recreates the entire bounding info from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19751,8 +19747,8 @@ var BABYLON;
         BoundingInfo.prototype.centerOn = function (center, extend) {
             var minimum = BoundingInfo.TmpVector3[0].copyFrom(center).subtractInPlace(extend);
             var maximum = BoundingInfo.TmpVector3[1].copyFrom(center).addInPlace(extend);
-            this.boundingBox.reConstruct(minimum, maximum);
-            this.boundingSphere.reConstruct(minimum, maximum);
+            this.boundingBox.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());
+            this.boundingSphere.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());
             return this;
         };
         /**
@@ -19832,9 +19828,6 @@ var BABYLON;
          * @returns if the bounding info intersects
          */
         BoundingInfo.prototype.intersects = function (boundingInfo, precise) {
-            if (!this.boundingSphere.centerWorld || !boundingInfo.boundingSphere.centerWorld) {
-                return false;
-            }
             if (!BABYLON.BoundingSphere.Intersects(this.boundingSphere, boundingInfo.boundingSphere)) {
                 return false;
             }
@@ -27134,6 +27127,9 @@ var BABYLON;
                     evt.preventDefault();
                     canvas.focus();
                 }
+                _this._startingPointerPosition.x = _this._pointerX;
+                _this._startingPointerPosition.y = _this._pointerY;
+                _this._startingPointerTime = Date.now();
                 // PreObservable support
                 if (_this._checkPrePointerObservable(null, evt, BABYLON.PointerEventTypes.POINTERDOWN)) {
                     return;
@@ -27142,9 +27138,6 @@ var BABYLON;
                     return;
                 }
                 _this._pointerCaptures[evt.pointerId] = true;
-                _this._startingPointerPosition.x = _this._pointerX;
-                _this._startingPointerPosition.y = _this._pointerY;
-                _this._startingPointerTime = Date.now();
                 if (!_this.pointerDownPredicate) {
                     _this.pointerDownPredicate = function (mesh) {
                         return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled();

+ 28 - 35
dist/preview release/babylon.no-module.max.js

@@ -8363,8 +8363,8 @@ var BABYLON;
          * @param result defines the target matrix
          */
         Matrix.RotationYawPitchRollToRef = function (yaw, pitch, roll, result) {
-            Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, this._tempQuaternion);
-            this._tempQuaternion.toRotationMatrix(result);
+            Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, MathTmp.Quaternion[0]);
+            MathTmp.Quaternion[0].toRotationMatrix(result);
         };
         /**
          * Creates a scaling matrix
@@ -8964,7 +8964,6 @@ var BABYLON;
             result.m[15] = 1.0;
             result._markAsUpdated();
         };
-        Matrix._tempQuaternion = new Quaternion();
         Matrix._xAxis = Vector3.Zero();
         Matrix._yAxis = Vector3.Zero();
         Matrix._zAxis = Vector3.Zero();
@@ -19241,7 +19240,7 @@ var BABYLON;
             this.reConstruct(min, max, worldMatrix);
         }
         /**
-         * Recreates the entire bounding sphere from scratch
+         * Recreates the entire bounding sphere from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19265,9 +19264,16 @@ var BABYLON;
             var tempRadiusVector = tmpVectors[0].setAll(newRadius);
             var min = this.center.subtractToRef(tempRadiusVector, tmpVectors[1]);
             var max = this.center.addToRef(tempRadiusVector, tmpVectors[2]);
-            this.reConstruct(min, max);
+            this.reConstruct(min, max, this._worldMatrix);
             return this;
         };
+        /**
+         * Gets the world matrix of the bounding box
+         * @returns a matrix
+         */
+        BoundingSphere.prototype.getWorldMatrix = function () {
+            return this._worldMatrix;
+        };
         // Methods
         /** @hidden */
         BoundingSphere.prototype._update = function (worldMatrix) {
@@ -19391,7 +19397,7 @@ var BABYLON;
         }
         // Methods
         /**
-         * Recreates the entire bounding box from scratch
+         * Recreates the entire bounding box from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19412,7 +19418,7 @@ var BABYLON;
             // OBB
             max.addToRef(min, this.center).scaleInPlace(0.5);
             max.subtractToRef(min, this.extendSize).scaleInPlace(0.5);
-            this._update(worldMatrix || this._worldMatrix || BABYLON.Matrix.Identity());
+            this._update(worldMatrix || BABYLON.Matrix.IdentityReadOnly);
         };
         /**
          * Scale the current bounding box by applying a scale factor
@@ -19428,7 +19434,7 @@ var BABYLON;
             var newRadius = diff.scaleInPlace(distance * 0.5);
             var min = this.center.subtractToRef(newRadius, tmpVectors[1]);
             var max = this.center.addToRef(newRadius, tmpVectors[2]);
-            this.reConstruct(min, max);
+            this.reConstruct(min, max, this._worldMatrix);
             return this;
         };
         /**
@@ -19438,15 +19444,6 @@ var BABYLON;
         BoundingBox.prototype.getWorldMatrix = function () {
             return this._worldMatrix;
         };
-        /**
-         * Sets the world matrix stored in the bounding box
-         * @param matrix defines the matrix to store
-         * @returns current bounding box
-         */
-        BoundingBox.prototype.setWorldMatrix = function (matrix) {
-            this._worldMatrix.copyFrom(matrix);
-            return this;
-        };
         /** @hidden */
         BoundingBox.prototype._update = function (world) {
             var minWorld = this.minimumWorld;
@@ -19622,22 +19619,21 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
-    var computeBoxExtents = function (axis, box) {
+    var _result0 = { min: 0, max: 0 };
+    var _result1 = { min: 0, max: 0 };
+    var computeBoxExtents = function (axis, box, result) {
         var p = BABYLON.Vector3.Dot(box.centerWorld, axis);
         var r0 = Math.abs(BABYLON.Vector3.Dot(box.directions[0], axis)) * box.extendSize.x;
         var r1 = Math.abs(BABYLON.Vector3.Dot(box.directions[1], axis)) * box.extendSize.y;
         var r2 = Math.abs(BABYLON.Vector3.Dot(box.directions[2], axis)) * box.extendSize.z;
         var r = r0 + r1 + r2;
-        return {
-            min: p - r,
-            max: p + r
-        };
+        result.min = p - r;
+        result.max = p + r;
     };
-    var extentsOverlap = function (min0, max0, min1, max1) { return !(min0 > max1 || min1 > max0); };
     var axisOverlap = function (axis, box0, box1) {
-        var result0 = computeBoxExtents(axis, box0);
-        var result1 = computeBoxExtents(axis, box1);
-        return extentsOverlap(result0.min, result0.max, result1.min, result1.max);
+        computeBoxExtents(axis, box0, _result0);
+        computeBoxExtents(axis, box1, _result1);
+        return !(_result0.min > _result1.max || _result1.min > _result0.max);
     };
     /**
      * Info for a bounding data of a mesh
@@ -19655,7 +19651,7 @@ var BABYLON;
             this.boundingSphere = new BABYLON.BoundingSphere(minimum, maximum, worldMatrix);
         }
         /**
-         * Recreates the entire bounding info from scratch
+         * Recreates the entire bounding info from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19718,8 +19714,8 @@ var BABYLON;
         BoundingInfo.prototype.centerOn = function (center, extend) {
             var minimum = BoundingInfo.TmpVector3[0].copyFrom(center).subtractInPlace(extend);
             var maximum = BoundingInfo.TmpVector3[1].copyFrom(center).addInPlace(extend);
-            this.boundingBox.reConstruct(minimum, maximum);
-            this.boundingSphere.reConstruct(minimum, maximum);
+            this.boundingBox.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());
+            this.boundingSphere.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());
             return this;
         };
         /**
@@ -19799,9 +19795,6 @@ var BABYLON;
          * @returns if the bounding info intersects
          */
         BoundingInfo.prototype.intersects = function (boundingInfo, precise) {
-            if (!this.boundingSphere.centerWorld || !boundingInfo.boundingSphere.centerWorld) {
-                return false;
-            }
             if (!BABYLON.BoundingSphere.Intersects(this.boundingSphere, boundingInfo.boundingSphere)) {
                 return false;
             }
@@ -27101,6 +27094,9 @@ var BABYLON;
                     evt.preventDefault();
                     canvas.focus();
                 }
+                _this._startingPointerPosition.x = _this._pointerX;
+                _this._startingPointerPosition.y = _this._pointerY;
+                _this._startingPointerTime = Date.now();
                 // PreObservable support
                 if (_this._checkPrePointerObservable(null, evt, BABYLON.PointerEventTypes.POINTERDOWN)) {
                     return;
@@ -27109,9 +27105,6 @@ var BABYLON;
                     return;
                 }
                 _this._pointerCaptures[evt.pointerId] = true;
-                _this._startingPointerPosition.x = _this._pointerX;
-                _this._startingPointerPosition.y = _this._pointerY;
-                _this._startingPointerTime = Date.now();
                 if (!_this.pointerDownPredicate) {
                     _this.pointerDownPredicate = function (mesh) {
                         return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled();

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


+ 28 - 35
dist/preview release/es6.js

@@ -8363,8 +8363,8 @@ var BABYLON;
          * @param result defines the target matrix
          */
         Matrix.RotationYawPitchRollToRef = function (yaw, pitch, roll, result) {
-            Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, this._tempQuaternion);
-            this._tempQuaternion.toRotationMatrix(result);
+            Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, MathTmp.Quaternion[0]);
+            MathTmp.Quaternion[0].toRotationMatrix(result);
         };
         /**
          * Creates a scaling matrix
@@ -8964,7 +8964,6 @@ var BABYLON;
             result.m[15] = 1.0;
             result._markAsUpdated();
         };
-        Matrix._tempQuaternion = new Quaternion();
         Matrix._xAxis = Vector3.Zero();
         Matrix._yAxis = Vector3.Zero();
         Matrix._zAxis = Vector3.Zero();
@@ -19241,7 +19240,7 @@ var BABYLON;
             this.reConstruct(min, max, worldMatrix);
         }
         /**
-         * Recreates the entire bounding sphere from scratch
+         * Recreates the entire bounding sphere from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19265,9 +19264,16 @@ var BABYLON;
             var tempRadiusVector = tmpVectors[0].setAll(newRadius);
             var min = this.center.subtractToRef(tempRadiusVector, tmpVectors[1]);
             var max = this.center.addToRef(tempRadiusVector, tmpVectors[2]);
-            this.reConstruct(min, max);
+            this.reConstruct(min, max, this._worldMatrix);
             return this;
         };
+        /**
+         * Gets the world matrix of the bounding box
+         * @returns a matrix
+         */
+        BoundingSphere.prototype.getWorldMatrix = function () {
+            return this._worldMatrix;
+        };
         // Methods
         /** @hidden */
         BoundingSphere.prototype._update = function (worldMatrix) {
@@ -19391,7 +19397,7 @@ var BABYLON;
         }
         // Methods
         /**
-         * Recreates the entire bounding box from scratch
+         * Recreates the entire bounding box from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19412,7 +19418,7 @@ var BABYLON;
             // OBB
             max.addToRef(min, this.center).scaleInPlace(0.5);
             max.subtractToRef(min, this.extendSize).scaleInPlace(0.5);
-            this._update(worldMatrix || this._worldMatrix || BABYLON.Matrix.Identity());
+            this._update(worldMatrix || BABYLON.Matrix.IdentityReadOnly);
         };
         /**
          * Scale the current bounding box by applying a scale factor
@@ -19428,7 +19434,7 @@ var BABYLON;
             var newRadius = diff.scaleInPlace(distance * 0.5);
             var min = this.center.subtractToRef(newRadius, tmpVectors[1]);
             var max = this.center.addToRef(newRadius, tmpVectors[2]);
-            this.reConstruct(min, max);
+            this.reConstruct(min, max, this._worldMatrix);
             return this;
         };
         /**
@@ -19438,15 +19444,6 @@ var BABYLON;
         BoundingBox.prototype.getWorldMatrix = function () {
             return this._worldMatrix;
         };
-        /**
-         * Sets the world matrix stored in the bounding box
-         * @param matrix defines the matrix to store
-         * @returns current bounding box
-         */
-        BoundingBox.prototype.setWorldMatrix = function (matrix) {
-            this._worldMatrix.copyFrom(matrix);
-            return this;
-        };
         /** @hidden */
         BoundingBox.prototype._update = function (world) {
             var minWorld = this.minimumWorld;
@@ -19622,22 +19619,21 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
-    var computeBoxExtents = function (axis, box) {
+    var _result0 = { min: 0, max: 0 };
+    var _result1 = { min: 0, max: 0 };
+    var computeBoxExtents = function (axis, box, result) {
         var p = BABYLON.Vector3.Dot(box.centerWorld, axis);
         var r0 = Math.abs(BABYLON.Vector3.Dot(box.directions[0], axis)) * box.extendSize.x;
         var r1 = Math.abs(BABYLON.Vector3.Dot(box.directions[1], axis)) * box.extendSize.y;
         var r2 = Math.abs(BABYLON.Vector3.Dot(box.directions[2], axis)) * box.extendSize.z;
         var r = r0 + r1 + r2;
-        return {
-            min: p - r,
-            max: p + r
-        };
+        result.min = p - r;
+        result.max = p + r;
     };
-    var extentsOverlap = function (min0, max0, min1, max1) { return !(min0 > max1 || min1 > max0); };
     var axisOverlap = function (axis, box0, box1) {
-        var result0 = computeBoxExtents(axis, box0);
-        var result1 = computeBoxExtents(axis, box1);
-        return extentsOverlap(result0.min, result0.max, result1.min, result1.max);
+        computeBoxExtents(axis, box0, _result0);
+        computeBoxExtents(axis, box1, _result1);
+        return !(_result0.min > _result1.max || _result1.min > _result0.max);
     };
     /**
      * Info for a bounding data of a mesh
@@ -19655,7 +19651,7 @@ var BABYLON;
             this.boundingSphere = new BABYLON.BoundingSphere(minimum, maximum, worldMatrix);
         }
         /**
-         * Recreates the entire bounding info from scratch
+         * Recreates the entire bounding info from scratch as if we call the constructor in place
          * @param min defines the new minimum vector (in local space)
          * @param max defines the new maximum vector (in local space)
          * @param worldMatrix defines the new world matrix
@@ -19718,8 +19714,8 @@ var BABYLON;
         BoundingInfo.prototype.centerOn = function (center, extend) {
             var minimum = BoundingInfo.TmpVector3[0].copyFrom(center).subtractInPlace(extend);
             var maximum = BoundingInfo.TmpVector3[1].copyFrom(center).addInPlace(extend);
-            this.boundingBox.reConstruct(minimum, maximum);
-            this.boundingSphere.reConstruct(minimum, maximum);
+            this.boundingBox.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());
+            this.boundingSphere.reConstruct(minimum, maximum, this.boundingBox.getWorldMatrix());
             return this;
         };
         /**
@@ -19799,9 +19795,6 @@ var BABYLON;
          * @returns if the bounding info intersects
          */
         BoundingInfo.prototype.intersects = function (boundingInfo, precise) {
-            if (!this.boundingSphere.centerWorld || !boundingInfo.boundingSphere.centerWorld) {
-                return false;
-            }
             if (!BABYLON.BoundingSphere.Intersects(this.boundingSphere, boundingInfo.boundingSphere)) {
                 return false;
             }
@@ -27101,6 +27094,9 @@ var BABYLON;
                     evt.preventDefault();
                     canvas.focus();
                 }
+                _this._startingPointerPosition.x = _this._pointerX;
+                _this._startingPointerPosition.y = _this._pointerY;
+                _this._startingPointerTime = Date.now();
                 // PreObservable support
                 if (_this._checkPrePointerObservable(null, evt, BABYLON.PointerEventTypes.POINTERDOWN)) {
                     return;
@@ -27109,9 +27105,6 @@ var BABYLON;
                     return;
                 }
                 _this._pointerCaptures[evt.pointerId] = true;
-                _this._startingPointerPosition.x = _this._pointerX;
-                _this._startingPointerPosition.y = _this._pointerY;
-                _this._startingPointerTime = Date.now();
                 if (!_this.pointerDownPredicate) {
                     _this.pointerDownPredicate = function (mesh) {
                         return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled();

+ 1 - 15
dist/preview release/viewer/babylon.viewer.d.ts

@@ -924,7 +924,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1558,20 +1558,6 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {

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


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


+ 1 - 18
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -985,14 +985,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1663,22 +1662,6 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
-declare module 'babylonjs-viewer/optimizer/custom/extended' {
-    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';