|
@@ -199,7 +199,7 @@ class Mesh extends Object3D {
|
|
|
const index = geometry.index;
|
|
|
const position = geometry.attributes.position;
|
|
|
const uv = geometry.attributes.uv;
|
|
|
- const uv2 = geometry.attributes.uv2;
|
|
|
+ const uv1 = geometry.attributes.uv1;
|
|
|
const normal = geometry.attributes.normal;
|
|
|
const groups = geometry.groups;
|
|
|
const drawRange = geometry.drawRange;
|
|
@@ -224,7 +224,7 @@ class Mesh extends Object3D {
|
|
|
const b = index.getX( j + 1 );
|
|
|
const c = index.getX( j + 2 );
|
|
|
|
|
|
- intersection = checkGeometryIntersection( this, groupMaterial, raycaster, _ray, uv, uv2, normal, a, b, c );
|
|
|
+ intersection = checkGeometryIntersection( this, groupMaterial, raycaster, _ray, uv, uv1, normal, a, b, c );
|
|
|
|
|
|
if ( intersection ) {
|
|
|
|
|
@@ -249,7 +249,7 @@ class Mesh extends Object3D {
|
|
|
const b = index.getX( i + 1 );
|
|
|
const c = index.getX( i + 2 );
|
|
|
|
|
|
- intersection = checkGeometryIntersection( this, material, raycaster, _ray, uv, uv2, normal, a, b, c );
|
|
|
+ intersection = checkGeometryIntersection( this, material, raycaster, _ray, uv, uv1, normal, a, b, c );
|
|
|
|
|
|
if ( intersection ) {
|
|
|
|
|
@@ -282,7 +282,7 @@ class Mesh extends Object3D {
|
|
|
const b = j + 1;
|
|
|
const c = j + 2;
|
|
|
|
|
|
- intersection = checkGeometryIntersection( this, groupMaterial, raycaster, _ray, uv, uv2, normal, a, b, c );
|
|
|
+ intersection = checkGeometryIntersection( this, groupMaterial, raycaster, _ray, uv, uv1, normal, a, b, c );
|
|
|
|
|
|
if ( intersection ) {
|
|
|
|
|
@@ -307,7 +307,7 @@ class Mesh extends Object3D {
|
|
|
const b = i + 1;
|
|
|
const c = i + 2;
|
|
|
|
|
|
- intersection = checkGeometryIntersection( this, material, raycaster, _ray, uv, uv2, normal, a, b, c );
|
|
|
+ intersection = checkGeometryIntersection( this, material, raycaster, _ray, uv, uv1, normal, a, b, c );
|
|
|
|
|
|
if ( intersection ) {
|
|
|
|
|
@@ -357,7 +357,7 @@ function checkIntersection( object, material, raycaster, ray, pA, pB, pC, point
|
|
|
|
|
|
}
|
|
|
|
|
|
-function checkGeometryIntersection( object, material, raycaster, ray, uv, uv2, normal, a, b, c ) {
|
|
|
+function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, normal, a, b, c ) {
|
|
|
|
|
|
object.getVertexPosition( a, _vA );
|
|
|
object.getVertexPosition( b, _vB );
|
|
@@ -377,13 +377,14 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv2, n
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( uv2 ) {
|
|
|
+ if ( uv1 ) {
|
|
|
|
|
|
- _uvA.fromBufferAttribute( uv2, a );
|
|
|
- _uvB.fromBufferAttribute( uv2, b );
|
|
|
- _uvC.fromBufferAttribute( uv2, c );
|
|
|
+ _uvA.fromBufferAttribute( uv1, a );
|
|
|
+ _uvB.fromBufferAttribute( uv1, b );
|
|
|
+ _uvC.fromBufferAttribute( uv1, c );
|
|
|
|
|
|
- intersection.uv2 = Triangle.getInterpolation( _intersectionPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() );
|
|
|
+ intersection.uv1 = Triangle.getInterpolation( _intersectionPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() );
|
|
|
+ intersection.uv2 = intersection.uv1; // Backwards compatibility
|
|
|
|
|
|
}
|
|
|
|