|
@@ -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 );
|
|
|
|
|
|
}
|