diff --git a/lib/cacheOptimization.js b/lib/cacheOptimization.js index 2ddd85a2..943d1e6a 100644 --- a/lib/cacheOptimization.js +++ b/lib/cacheOptimization.js @@ -49,9 +49,7 @@ function getIndependentPrimitive(dictionary, indicesId, attributeAccessors) { if (attributes.hasOwnProperty(semantic)) { var accessorId = attributes[semantic]; if (defined(attributeAccessors[accessorId])) { - if (attributeAccessors[semantic] === attributes[semantic]) { - equalCount++; - } + equalCount++; } } } diff --git a/lib/cesiumGeometryToGltfPrimitive.js b/lib/cesiumGeometryToGltfPrimitive.js index 380cd04b..159f76f5 100644 --- a/lib/cesiumGeometryToGltfPrimitive.js +++ b/lib/cesiumGeometryToGltfPrimitive.js @@ -8,7 +8,7 @@ function getFirstAttributeSemantic(primitive, semantic) { var attributes = primitive.attributes; for (var attributeSemantic in attributes) { if (attributes.hasOwnProperty(attributeSemantic)) { - if (attributeSemantic.replace(/[0-9]|_/g, '') === semantic) { + if (attributeSemantic.indexOf(semantic) === 0) { return attributeSemantic; } }