aWeirdo 4 лет назад
Родитель
Сommit
f0e01cce38
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/Meshes/meshSimplification.ts

+ 2 - 2
src/Meshes/meshSimplification.ts

@@ -138,7 +138,7 @@ export class SimplificationQueue {
             task.settings.forEach((setting) => {
                 var simplifier = this.getSimplifier(task);
                 simplifier.simplify(setting, (newMesh) => {
-                    if (settings.distance !== undefined) {
+                    if (setting.distance !== undefined) {
                         task.mesh.addLODLevel(setting.distance, newMesh);
                     }
                     newMesh.isVisible = true;
@@ -156,7 +156,7 @@ export class SimplificationQueue {
 
             var runDecimation = (setting: ISimplificationSettings, callback: () => void) => {
                 simplifier.simplify(setting, (newMesh) => {
-                    if (settings.distance !== undefined) {
+                    if (setting.distance !== undefined) {
                         task.mesh.addLODLevel(setting.distance, newMesh);
                     }
                     newMesh.isVisible = true;