Don't try to read vertex colors from draco compressed models.

This commit is contained in:
kovacsv 2021-12-29 12:18:43 +01:00
parent 7000368040
commit 36c3cd5405

View File

@ -415,7 +415,7 @@ OV.GltfExtensions = class
}
let hasVertices = (extensionParams.attributes.POSITION !== undefined);
let hasVertexColors = (extensionParams.attributes.COLOR_0 !== undefined);
let hasVertexColors = false;
let hasNormals = (extensionParams.attributes.NORMAL !== undefined);
let hasUVs = (extensionParams.attributes.TEXCOORD_0 !== undefined);
@ -432,13 +432,6 @@ OV.GltfExtensions = class
mesh.AddVertex (vertex);
});
if (hasVertexColors) {
EnumerateComponents (this.draco, decoder, dracoMesh, extensionParams.attributes.COLOR_0, (vertexColor) => {
let color = OV.GetGltfVertexColor ([vertexColor.x, vertexColor.y, vertexColor.z]);
mesh.AddVertexColor (color);
});
}
if (hasNormals) {
EnumerateComponents (this.draco, decoder, dracoMesh, extensionParams.attributes.NORMAL, (normal) => {
mesh.AddNormal (normal);