|
@@ -141,9 +141,11 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
var uvC = new Vector2();
|
|
var uvC = new Vector2();
|
|
|
|
|
|
var barycoord = new Vector3();
|
|
var barycoord = new Vector3();
|
|
|
|
+ var triangle = new Triangle();
|
|
|
|
|
|
var intersectionPoint = new Vector3();
|
|
var intersectionPoint = new Vector3();
|
|
var intersectionPointWorld = new Vector3();
|
|
var intersectionPointWorld = new Vector3();
|
|
|
|
+ var faceNormal = new Vector3();
|
|
|
|
|
|
function uvIntersection( point, p1, p2, p3, uv1, uv2, uv3 ) {
|
|
function uvIntersection( point, p1, p2, p3, uv1, uv2, uv3 ) {
|
|
|
|
|
|
@@ -210,7 +212,12 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- intersection.face = new Face3( a, b, c, Triangle.normal( vA, vB, vC ) );
|
|
|
|
|
|
+ var face = new Face3( a, b, c );
|
|
|
|
+
|
|
|
|
+ triangle.set( vA, vB, vC ).normal( faceNormal );
|
|
|
|
+ face.normal.copy( faceNormal );
|
|
|
|
+
|
|
|
|
+ intersection.face = face;
|
|
intersection.faceIndex = a;
|
|
intersection.faceIndex = a;
|
|
|
|
|
|
}
|
|
}
|