Browse Source

Minor loop optimizaiton. Declare submesh once vs each loop.

Michael Schlotfeldt 7 năm trước cách đây
mục cha
commit
434b8b8eb7
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/babylon.scene.ts

+ 2 - 2
src/babylon.scene.ts

@@ -3131,8 +3131,8 @@
                     len = subMeshes.length;
                 }
 
-                for (var subIndex = 0; subIndex < len; subIndex++) {
-                    var subMesh = subMeshes[subIndex];
+                for (var subIndex = 0, subMesh; subIndex < len; subIndex++) {
+                    subMesh = subMeshes[subIndex];
 
                     this._evaluateSubMesh(subMesh, mesh);
                 }