未验证 提交 b6859429 编写于 作者: M Michael Herzog 提交者: GitHub

Merge pull request #16265 from Mugen87/dev28

GLTFExporter: Fix export of multi-material meshes.
......@@ -1358,14 +1358,16 @@ THREE.GLTFExporter.prototype = {
if ( geometry.index !== null ) {
if ( cachedData.attributes.has( geometry.index ) ) {
var cacheKey = geometry.uuid + ':' + groups[ i ].start + ':' + groups[ i ].count;
if ( cachedData.attributes.has( cacheKey ) ) {
primitive.indices = cachedData.attributes.get( geometry.index );
} else {
primitive.indices = processAccessor( geometry.index, geometry, groups[ i ].start, groups[ i ].count );
cachedData.attributes.set( geometry.index, primitive.indices );
cachedData.attributes.set( cacheKey, primitive.indices );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册