提交 30400aad 编写于 作者: G Gary Oberbrunner

GLTFExporter: handle morph target attribute specially, per review comment

上级 5a41bcd6
......@@ -1162,6 +1162,9 @@ THREE.GLTFExporter.prototype = {
var modifiedAttribute = null;
for ( var attributeName in geometry.attributes ) {
// Ignore morph target attributes, which are exported later.
if ( attributeName.substr( 0, 5 ) === 'morph' ) continue;
var attribute = geometry.attributes[ attributeName ];
attributeName = nameConversion[ attributeName ] || attributeName.toUpperCase();
......@@ -1194,15 +1197,11 @@ THREE.GLTFExporter.prototype = {
}
if ( attributeName.substr( 0, 5 ) !== 'MORPH' ) {
var accessor = processAccessor( modifiedAttribute || attribute, geometry );
if ( accessor !== null ) {
var accessor = processAccessor( modifiedAttribute || attribute, geometry );
if ( accessor !== null ) {
attributes[ attributeName ] = accessor;
cachedData.attributes.set( attribute, accessor );
}
attributes[ attributeName ] = accessor;
cachedData.attributes.set( attribute, accessor );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册