David Catuhe 10 سال پیش
والد
کامیت
5a06c54287

+ 1 - 2
Babylon/Mesh/babylon.abstractMesh.js

@@ -814,5 +814,4 @@ var BABYLON;
     })(BABYLON.Node);
     BABYLON.AbstractMesh = AbstractMesh;
 })(BABYLON || (BABYLON = {}));
-
-//# sourceMappingURL=../Mesh/babylon.abstractMesh.js.map
+//# sourceMappingURL=babylon.abstractMesh.js.map

+ 10 - 10
Babylon/Mesh/babylon.abstractMesh.ts

@@ -159,7 +159,7 @@
         public get useBones(): boolean {
             return this.skeleton && this.getScene().skeletonsEnabled && this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind) && this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind);
         }
-        
+
         public _preActivate(): void {
         }
 
@@ -196,8 +196,8 @@
             this._isWorldMatrixFrozen = false;
             this.computeWorldMatrix(true);
         }
-        
-        public get isWorldMatrixFrozen() :boolean {
+
+        public get isWorldMatrixFrozen(): boolean {
             return this._isWorldMatrixFrozen;
         }
 
@@ -285,7 +285,7 @@
          * @param {number} amountUp
          * @param {number} amountForward
          */
-        public movePOV(amountRight : number, amountUp : number, amountForward : number) : void {
+        public movePOV(amountRight: number, amountUp: number, amountForward: number): void {
             this.position.addInPlace(this.calcMovePOV(amountRight, amountUp, amountForward));
         }
         
@@ -297,11 +297,11 @@
          * @param {number} amountUp
          * @param {number} amountForward
          */
-        public calcMovePOV(amountRight : number, amountUp : number, amountForward : number) : Vector3 {
+        public calcMovePOV(amountRight: number, amountUp: number, amountForward: number): Vector3 {
             var rotMatrix = new Matrix();
             var rotQuaternion = (this.rotationQuaternion) ? this.rotationQuaternion : Quaternion.RotationYawPitchRoll(this.rotation.y, this.rotation.x, this.rotation.z);
             rotQuaternion.toRotationMatrix(rotMatrix);
-            
+
             var translationDelta = Vector3.Zero();
             var defForwardMult = this.definedFacingForward ? -1 : 1;
             Vector3.TransformCoordinatesFromFloatsToRef(amountRight * defForwardMult, amountUp, amountForward * defForwardMult, rotMatrix, translationDelta);
@@ -315,7 +315,7 @@
          * @param {number} twirlClockwise
          * @param {number} tiltRight
          */
-        public rotatePOV(flipBack : number, twirlClockwise : number, tiltRight : number) : void {
+        public rotatePOV(flipBack: number, twirlClockwise: number, tiltRight: number): void {
             this.rotation.addInPlace(this.calcRotatePOV(flipBack, twirlClockwise, tiltRight));
         }
         
@@ -326,11 +326,11 @@
          * @param {number} twirlClockwise
          * @param {number} tiltRight
          */
-        public calcRotatePOV(flipBack : number, twirlClockwise : number, tiltRight : number) : Vector3 {
+        public calcRotatePOV(flipBack: number, twirlClockwise: number, tiltRight: number): Vector3 {
             var defForwardMult = this.definedFacingForward ? 1 : -1;
             return new Vector3(flipBack * defForwardMult, twirlClockwise, tiltRight * defForwardMult);
         }
-        
+
         public setPivotMatrix(matrix: Matrix): void {
             this._pivotMatrix = matrix;
             this._cache.pivotMatrixUpdated = true;
@@ -957,4 +957,4 @@
             }
         }
     }
-}
+}

+ 1 - 1
Babylon/babylon.engine.js

@@ -309,7 +309,6 @@ var BABYLON;
         }
         gl.bindTexture(gl.TEXTURE_2D, null);
         engine._activeTexturesCache = [];
-        texture.samplingMode = samplingMode;
         scene._removePendingData(texture);
     };
     var partialLoad = function (url, index, loadedImages, scene, onfinish) {
@@ -1260,6 +1259,7 @@ var BABYLON;
             texture.url = url;
             texture.noMipmap = noMipmap;
             texture.references = 1;
+            texture.samplingMode = samplingMode;
             this._loadedTexturesCache.push(texture);
             var onerror = function () {
                 scene._removePendingData(texture);

+ 1 - 1
Babylon/babylon.engine.ts

@@ -330,7 +330,6 @@
         gl.bindTexture(gl.TEXTURE_2D, null);
 
         engine._activeTexturesCache = [];
-        texture.samplingMode = samplingMode;
         scene._removePendingData(texture);
     };
 
@@ -1515,6 +1514,7 @@
             texture.url = url;
             texture.noMipmap = noMipmap;
             texture.references = 1;
+            texture.samplingMode = samplingMode;
             this._loadedTexturesCache.push(texture);
 
             var onerror = () => {

+ 10 - 2
babylon.2.1-beta.debug.js

@@ -3966,7 +3966,6 @@ var __extends = this.__extends || function (d, b) {
         }
         gl.bindTexture(gl.TEXTURE_2D, null);
         engine._activeTexturesCache = [];
-        texture.samplingMode = samplingMode;
         scene._removePendingData(texture);
     };
     var partialLoad = function (url, index, loadedImages, scene, onfinish) {
@@ -4917,6 +4916,7 @@ var __extends = this.__extends || function (d, b) {
             texture.url = url;
             texture.noMipmap = noMipmap;
             texture.references = 1;
+            texture.samplingMode = samplingMode;
             this._loadedTexturesCache.push(texture);
             var onerror = function () {
                 scene._removePendingData(texture);
@@ -10275,13 +10275,21 @@ var BABYLON;
             configurable: true
         });
         AbstractMesh.prototype.freezeWorldMatrix = function () {
+            this._isWorldMatrixFrozen = false; // no guarantee world is not already frozen, switch off temporarily
             this.computeWorldMatrix(true);
             this._isWorldMatrixFrozen = true;
         };
         AbstractMesh.prototype.unfreezeWorldMatrix = function () {
-            this.computeWorldMatrix(true);
             this._isWorldMatrixFrozen = false;
+            this.computeWorldMatrix(true);
         };
+        Object.defineProperty(AbstractMesh.prototype, "isWorldMatrixFrozen", {
+            get: function () {
+                return this._isWorldMatrixFrozen;
+            },
+            enumerable: true,
+            configurable: true
+        });
         AbstractMesh.prototype.rotate = function (axis, amount, space) {
             if (!this.rotationQuaternion) {
                 this.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(this.rotation.y, this.rotation.x, this.rotation.z);

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6 - 7
babylon.2.1-beta.js