瀏覽代碼

Fix forceCompilation in shadowGenerator to be more efficient

Gary Hsu 7 年之前
父節點
當前提交
4add14c240
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/Lights/Shadows/babylon.shadowGenerator.ts

+ 1 - 3
src/Lights/Shadows/babylon.shadowGenerator.ts

@@ -626,9 +626,7 @@
                     return;
                 }
 
-                let subMesh = subMeshes[currentIndex];
-
-                if (this.isReady(subMesh, options ? options.useInstances : false)) {
+                while (this.isReady(subMeshes[currentIndex], options ? options.useInstances : false)) {
                     currentIndex++;
                     if (currentIndex >= subMeshes.length) {
                         if (onCompiled) {