提交 415b3371 编写于 作者: S Sneha Belkhale

allowing custom geometry attributes to be loaded from gltfs

上级 327c9dde
......@@ -2441,12 +2441,18 @@ THREE.GLTFLoader = ( function () {
var threeAttributeName = ATTRIBUTES[ gltfAttributeName ];
if ( ! threeAttributeName ) continue;
// Skip attributes already provided by e.g. Draco extension.
if ( threeAttributeName in geometry.attributes ) continue;
pending.push( assignAttributeAccessor( attributes[ gltfAttributeName ], threeAttributeName ) );
if ( threeAttributeName ) {
pending.push( assignAttributeAccessor( attributes[ gltfAttributeName ], threeAttributeName ) );
} else {
pending.push( assignAttributeAccessor( attributes[ gltfAttributeName ], gltfAttributeName.toLowerCase() ) );
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册