فهرست منبع

Moving to beta stage

David Catuhe 7 سال پیش
والد
کامیت
36055674ec

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


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


+ 12 - 10
dist/preview release/babylon.max.js

@@ -8471,7 +8471,7 @@ var BABYLON;
         });
         Object.defineProperty(Engine, "Version", {
             get: function () {
-                return "3.1-alpha";
+                return "3.1-beta";
             },
             enumerable: true,
             configurable: true
@@ -13710,12 +13710,15 @@ var BABYLON;
          * Returns the last update of the World matrix
          * Returns a Matrix.
          */
-        AbstractMesh.prototype.getWorldMatrix = function () {
+        AbstractMesh.prototype.getWorldMatrix = function (useCachedVersion) {
+            if (useCachedVersion === void 0) { useCachedVersion = false; }
             if (this._masterMesh) {
                 return this._masterMesh.getWorldMatrix();
             }
-            if (this._currentRenderId !== this.getScene().getRenderId() || !this.isSynchronized()) {
-                this.computeWorldMatrix();
+            if (!useCachedVersion) {
+                if (this._currentRenderId !== this.getScene().getRenderId() || !this.isSynchronized()) {
+                    this.computeWorldMatrix();
+                }
             }
             return this._worldMatrix;
         };
@@ -14114,7 +14117,6 @@ var BABYLON;
                 return this._worldMatrix;
             }
             if (!force && this.isSynchronized(true)) {
-                this._currentRenderId = this.getScene().getRenderId();
                 return this._worldMatrix;
             }
             this._cache.position.copyFrom(this.position);
@@ -23466,7 +23468,7 @@ var BABYLON;
             }
             var offset = 0;
             var instancesCount = 0;
-            var world = this.getWorldMatrix();
+            var world = this.getWorldMatrix(true);
             if (batch.renderSelf[subMesh._id]) {
                 world.copyToArray(this._instancesData, offset);
                 offset += 16;
@@ -23475,7 +23477,7 @@ var BABYLON;
             if (visibleInstances) {
                 for (var instanceIndex = 0; instanceIndex < visibleInstances.length; instanceIndex++) {
                     var instance = visibleInstances[instanceIndex];
-                    instance.getWorldMatrix().copyToArray(this._instancesData, offset);
+                    instance.getWorldMatrix(true).copyToArray(this._instancesData, offset);
                     offset += 16;
                     instancesCount++;
                 }
@@ -23509,7 +23511,7 @@ var BABYLON;
                 if (batch.renderSelf[subMesh._id]) {
                     // Draw
                     if (onBeforeDraw) {
-                        onBeforeDraw(false, this.getWorldMatrix(), effectiveMaterial);
+                        onBeforeDraw(false, this.getWorldMatrix(true), effectiveMaterial);
                     }
                     this._draw(subMesh, fillMode, this._overridenInstanceCount);
                 }
@@ -23518,7 +23520,7 @@ var BABYLON;
                     for (var instanceIndex = 0; instanceIndex < visibleInstancesForSubMesh.length; instanceIndex++) {
                         var instance = visibleInstancesForSubMesh[instanceIndex];
                         // World
-                        var world = instance.getWorldMatrix();
+                        var world = instance.getWorldMatrix(true);
                         if (onBeforeDraw) {
                             onBeforeDraw(true, world, effectiveMaterial);
                         }
@@ -23596,7 +23598,7 @@ var BABYLON;
             if (!hardwareInstancedRendering) {
                 this._bind(subMesh, effect, fillMode);
             }
-            var world = this.getWorldMatrix();
+            var world = this.getWorldMatrix(true);
             if (this._effectiveMaterial.storeEffectOnSubMeshes) {
                 this._effectiveMaterial.bindForSubMesh(world, this, subMesh);
             }

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


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


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


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


+ 12 - 10
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -8471,7 +8471,7 @@ var BABYLON;
         });
         Object.defineProperty(Engine, "Version", {
             get: function () {
-                return "3.1-alpha";
+                return "3.1-beta";
             },
             enumerable: true,
             configurable: true
@@ -13710,12 +13710,15 @@ var BABYLON;
          * Returns the last update of the World matrix
          * Returns a Matrix.
          */
-        AbstractMesh.prototype.getWorldMatrix = function () {
+        AbstractMesh.prototype.getWorldMatrix = function (useCachedVersion) {
+            if (useCachedVersion === void 0) { useCachedVersion = false; }
             if (this._masterMesh) {
                 return this._masterMesh.getWorldMatrix();
             }
-            if (this._currentRenderId !== this.getScene().getRenderId() || !this.isSynchronized()) {
-                this.computeWorldMatrix();
+            if (!useCachedVersion) {
+                if (this._currentRenderId !== this.getScene().getRenderId() || !this.isSynchronized()) {
+                    this.computeWorldMatrix();
+                }
             }
             return this._worldMatrix;
         };
@@ -14114,7 +14117,6 @@ var BABYLON;
                 return this._worldMatrix;
             }
             if (!force && this.isSynchronized(true)) {
-                this._currentRenderId = this.getScene().getRenderId();
                 return this._worldMatrix;
             }
             this._cache.position.copyFrom(this.position);
@@ -23466,7 +23468,7 @@ var BABYLON;
             }
             var offset = 0;
             var instancesCount = 0;
-            var world = this.getWorldMatrix();
+            var world = this.getWorldMatrix(true);
             if (batch.renderSelf[subMesh._id]) {
                 world.copyToArray(this._instancesData, offset);
                 offset += 16;
@@ -23475,7 +23477,7 @@ var BABYLON;
             if (visibleInstances) {
                 for (var instanceIndex = 0; instanceIndex < visibleInstances.length; instanceIndex++) {
                     var instance = visibleInstances[instanceIndex];
-                    instance.getWorldMatrix().copyToArray(this._instancesData, offset);
+                    instance.getWorldMatrix(true).copyToArray(this._instancesData, offset);
                     offset += 16;
                     instancesCount++;
                 }
@@ -23509,7 +23511,7 @@ var BABYLON;
                 if (batch.renderSelf[subMesh._id]) {
                     // Draw
                     if (onBeforeDraw) {
-                        onBeforeDraw(false, this.getWorldMatrix(), effectiveMaterial);
+                        onBeforeDraw(false, this.getWorldMatrix(true), effectiveMaterial);
                     }
                     this._draw(subMesh, fillMode, this._overridenInstanceCount);
                 }
@@ -23518,7 +23520,7 @@ var BABYLON;
                     for (var instanceIndex = 0; instanceIndex < visibleInstancesForSubMesh.length; instanceIndex++) {
                         var instance = visibleInstancesForSubMesh[instanceIndex];
                         // World
-                        var world = instance.getWorldMatrix();
+                        var world = instance.getWorldMatrix(true);
                         if (onBeforeDraw) {
                             onBeforeDraw(true, world, effectiveMaterial);
                         }
@@ -23596,7 +23598,7 @@ var BABYLON;
             if (!hardwareInstancedRendering) {
                 this._bind(subMesh, effect, fillMode);
             }
-            var world = this.getWorldMatrix();
+            var world = this.getWorldMatrix(true);
             if (this._effectiveMaterial.storeEffectOnSubMeshes) {
                 this._effectiveMaterial.bindForSubMesh(world, this, subMesh);
             }

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


+ 1 - 1
src/Engine/babylon.engine.ts

@@ -531,7 +531,7 @@
         }
 
         public static get Version(): string {
-            return "3.1-alpha";
+            return "3.1-beta";
         }
 
         // Updatable statics so stick with vars here

+ 5 - 4
src/Mesh/babylon.abstractMesh.ts

@@ -823,13 +823,15 @@
          * Returns the last update of the World matrix
          * Returns a Matrix.  
          */
-        public getWorldMatrix(): Matrix {
+        public getWorldMatrix(useCachedVersion = false): Matrix {
             if (this._masterMesh) {
                 return this._masterMesh.getWorldMatrix();
             }
 
-            if (this._currentRenderId !== this.getScene().getRenderId() || !this.isSynchronized()) {
-                this.computeWorldMatrix();
+            if (!useCachedVersion) {
+                if (this._currentRenderId !== this.getScene().getRenderId() || !this.isSynchronized()) {
+                    this.computeWorldMatrix();
+                }
             }
             return this._worldMatrix;
         }
@@ -1259,7 +1261,6 @@
             }
 
             if (!force && this.isSynchronized(true)) {
-                this._currentRenderId = this.getScene().getRenderId();
                 return this._worldMatrix;
             }
 

+ 5 - 5
src/Mesh/babylon.mesh.ts

@@ -1140,7 +1140,7 @@
             var offset = 0;
             var instancesCount = 0;
 
-            var world = this.getWorldMatrix();
+            var world = this.getWorldMatrix(true);
             if (batch.renderSelf[subMesh._id]) {
                 world.copyToArray(this._instancesData, offset);
                 offset += 16;
@@ -1150,7 +1150,7 @@
             if (visibleInstances) {
                 for (var instanceIndex = 0; instanceIndex < visibleInstances.length; instanceIndex++) {
                     var instance = visibleInstances[instanceIndex];
-                    instance.getWorldMatrix().copyToArray(this._instancesData, offset);
+                    instance.getWorldMatrix(true).copyToArray(this._instancesData, offset);
                     offset += 16;
                     instancesCount++;
                 }
@@ -1190,7 +1190,7 @@
                 if (batch.renderSelf[subMesh._id]) {
                     // Draw
                     if (onBeforeDraw) {
-                        onBeforeDraw(false, this.getWorldMatrix(), effectiveMaterial);
+                        onBeforeDraw(false, this.getWorldMatrix(true), effectiveMaterial);
                     }
 
                     this._draw(subMesh, fillMode, this._overridenInstanceCount);
@@ -1203,7 +1203,7 @@
                         var instance = visibleInstancesForSubMesh[instanceIndex];
 
                         // World
-                        var world = instance.getWorldMatrix();
+                        var world = instance.getWorldMatrix(true);
                         if (onBeforeDraw) {
                             onBeforeDraw(true, world, effectiveMaterial);
                         }
@@ -1301,7 +1301,7 @@
                 this._bind(subMesh, effect, fillMode);
             }
 
-            var world = this.getWorldMatrix();
+            var world = this.getWorldMatrix(true);
 
             if (this._effectiveMaterial.storeEffectOnSubMeshes) {
                 this._effectiveMaterial.bindForSubMesh(world, this, subMesh);