提交 fe70963a 编写于 作者: T Takahiro

GLTFExporter: Add workaround for no-index geometry with multi-material

上级 b14f706e
......@@ -1004,9 +1004,19 @@ THREE.GLTFExporter.prototype = {
}
var forceIndices = options.forceIndices;
if ( ! forceIndices && Array.isArray( mesh.material ) ) {
// temporal workaround.
console.warn( 'THREE.GLTFExporter: Force index for a mesh with multi-material.', mesh );
forceIndices = true;
}
var forcedIndex = false;
if ( geometry.index === null && options.forceIndices ) {
if ( geometry.index === null && forceIndices ) {
var indices = new Uint32Array( geometry.attributes.position.count );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册