Prechádzať zdrojové kódy

Fix forceCompilation in shadowGenerator to be more efficient

Gary Hsu 7 rokov pred
rodič
commit
4add14c240

+ 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) {