diff --git a/examples/js/loaders/GLTFLoader.js b/examples/js/loaders/GLTFLoader.js index a459195768be1206ca4dc3aeec52926d8b84536f..d010c743b3a43411af70dde349667cadad39e2ca 100644 --- a/examples/js/loaders/GLTFLoader.js +++ b/examples/js/loaders/GLTFLoader.js @@ -528,21 +528,23 @@ THREE.GLTFLoader = ( function () { for ( var attributeName in gltfAttributeMap ) { - if ( ! ( attributeName in ATTRIBUTES ) ) continue; + var threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase(); - threeAttributeMap[ ATTRIBUTES[ attributeName ] ] = gltfAttributeMap[ attributeName ]; + threeAttributeMap[ threeAttributeName ] = gltfAttributeMap[ attributeName ]; } for ( attributeName in primitive.attributes ) { - if ( ATTRIBUTES[ attributeName ] !== undefined && gltfAttributeMap[ attributeName ] !== undefined ) { + var threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase(); + + if ( gltfAttributeMap[ attributeName ] !== undefined ) { var accessorDef = json.accessors[ primitive.attributes[ attributeName ] ]; var componentType = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ]; - attributeTypeMap[ ATTRIBUTES[ attributeName ] ] = componentType; - attributeNormalizedMap[ ATTRIBUTES[ attributeName ] ] = accessorDef.normalized === true; + attributeTypeMap[ threeAttributeName ] = componentType; + attributeNormalizedMap[ threeAttributeName ] = accessorDef.normalized === true; }