Browse Source

Merge pull request #7773 from Immugio/raycast-check-uvs-length

THREE.Mesh.raycast - check uvs array length before accessing
Mr.doob 8 years ago
parent
commit
235925c2bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/objects/Mesh.js

+ 1 - 1
src/objects/Mesh.js

@@ -316,7 +316,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 					if ( intersection ) {
 
-						if ( uvs ) {
+				    if ( uvs && uvs[ f ] ) {
 
 							var uvs_f = uvs[ f ];
 							uvA.copy( uvs_f[ 0 ] );