check if texCoords defined before looping through all coordinates

This commit is contained in:
Jeff Nusz 2017-01-24 16:54:03 -08:00
parent c2449397d3
commit 554909a156

View File

@ -175,9 +175,9 @@ THREE.DRACOLoader.prototype = {
}
}
for (let i = 0; i < numTextureCoordinates; i += 2) {
// Add texture coordinates.
if (texCoordAttId != -1) {
for (let i = 0; i < numTextureCoordinates; i += 2) {
geometryBuffer.uvs.push(
textCoordAttributeData.GetValue(i),
textCoordAttributeData.GetValue(i + 1));