Skip to content

Commit 4a378c3

Browse files
move that here
1 parent 7a0c66e commit 4a378c3

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/model/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ let createCube = function (width, height, depth, name, faces, fallbackFaces, tex
761761
}
762762
let face = faces[f];
763763
let textureRef = face.texture.substr(1);
764-
if (!textures.hasOwnProperty(textureRef)) {
764+
if (!textures.hasOwnProperty(textureRef) || !textures[textureRef]) {
765765
console.warn("Missing texture '" + textureRef + "' for face " + f + " in model " + name);
766766
resolve(null);
767767
return;
@@ -1023,12 +1023,7 @@ let createCube = function (width, height, depth, name, faces, fallbackFaces, tex
10231023
canvasCache[canvasKey] = {
10241024
img: img
10251025
};
1026-
if (!textures.hasOwnProperty(textureRef) || !textures[textureRef]) {
1027-
console.warn("Missing texture for " + textureRef + " / " + canvasKey);
1028-
resolve(null);
1029-
} else {
1030-
img.src = textures[textureRef];
1031-
}
1026+
img.src = textures[textureRef];
10321027
}
10331028
}));
10341029
}

0 commit comments

Comments
 (0)