|
@@ -283,48 +283,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
} else if ( geometry.isGeometry ) {
|
|
|
|
|
|
- const isMultiMaterial = Array.isArray( material );
|
|
|
-
|
|
|
- const vertices = geometry.vertices;
|
|
|
- const faces = geometry.faces;
|
|
|
- let uvs;
|
|
|
-
|
|
|
- const faceVertexUvs = geometry.faceVertexUvs[ 0 ];
|
|
|
- if ( faceVertexUvs.length > 0 ) uvs = faceVertexUvs;
|
|
|
-
|
|
|
- for ( let f = 0, fl = faces.length; f < fl; f ++ ) {
|
|
|
-
|
|
|
- const face = faces[ f ];
|
|
|
- const faceMaterial = isMultiMaterial ? material[ face.materialIndex ] : material;
|
|
|
-
|
|
|
- if ( faceMaterial === undefined ) continue;
|
|
|
-
|
|
|
- const fvA = vertices[ face.a ];
|
|
|
- const fvB = vertices[ face.b ];
|
|
|
- const fvC = vertices[ face.c ];
|
|
|
-
|
|
|
- intersection = checkIntersection( this, faceMaterial, raycaster, _ray, fvA, fvB, fvC, _intersectionPoint );
|
|
|
-
|
|
|
- if ( intersection ) {
|
|
|
-
|
|
|
- if ( uvs && uvs[ f ] ) {
|
|
|
-
|
|
|
- const uvs_f = uvs[ f ];
|
|
|
- _uvA.copy( uvs_f[ 0 ] );
|
|
|
- _uvB.copy( uvs_f[ 1 ] );
|
|
|
- _uvC.copy( uvs_f[ 2 ] );
|
|
|
-
|
|
|
- intersection.uv = Triangle.getUV( _intersectionPoint, fvA, fvB, fvC, _uvA, _uvB, _uvC, new Vector2() );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- intersection.face = face;
|
|
|
- intersection.faceIndex = f;
|
|
|
- intersects.push( intersection );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ console.error( 'THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );
|
|
|
|
|
|
}
|
|
|
|