未验证 提交 0aa87c99 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15613 from Mugen87/dev19

Mesh: Improve handling of material index.
......@@ -264,6 +264,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
if ( intersection ) {
intersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics
intersection.face.materialIndex = group.materialIndex;
intersects.push( intersection );
}
......@@ -321,6 +322,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
if ( intersection ) {
intersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics
intersection.face.materialIndex = group.materialIndex;
intersects.push( intersection );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册