mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-12 02:09:01 +08:00
check if texCoords defined before looping through all coordinates
This commit is contained in:
parent
c2449397d3
commit
554909a156
@ -175,14 +175,14 @@ THREE.DRACOLoader.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < numTextureCoordinates; i += 2) {
|
// Add texture coordinates.
|
||||||
// Add texture coordinates.
|
if (texCoordAttId != -1) {
|
||||||
if (texCoordAttId != -1) {
|
for (let i = 0; i < numTextureCoordinates; i += 2) {
|
||||||
geometryBuffer.uvs.push(
|
geometryBuffer.uvs.push(
|
||||||
textCoordAttributeData.GetValue(i),
|
textCoordAttributeData.GetValue(i),
|
||||||
textCoordAttributeData.GetValue(i + 1));
|
textCoordAttributeData.GetValue(i + 1));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DracoModule.destroy(posAttributeData);
|
DracoModule.destroy(posAttributeData);
|
||||||
if (colorAttId != -1)
|
if (colorAttId != -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user