Sfoglia il codice sorgente

Merge pull request #3086 from bghgary/shadowGenerator-fix

Fix forceCompilation in shadowGenerator to be more efficient
David Catuhe 7 anni fa
parent
commit
085f9cecae
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  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) {