提交 850b7359 编写于 作者: D Don McCurdy

GLTFLoader: Support per-node morph weights on instanced meshes.

Fixes #15142.
上级 e371fe25
......@@ -3136,6 +3136,23 @@ THREE.GLTFLoader = ( function () {
}
// if weights are provided on the node, override weights on the mesh.
if ( nodeDef.weights !== undefined ) {
node.traverse( function ( o ) {
if ( ! o.isMesh ) return;
for ( var i = 0, il = nodeDef.weights.length; i < il; i ++ ) {
o.morphTargetInfluences[ i ] = nodeDef.weights[ i ];
}
} );
}
resolve( node );
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册