|
@@ -142,7 +142,16 @@
|
|
|
positions[ c * 3 + 2 ]
|
|
|
);
|
|
|
|
|
|
- var intersectionPoint = localRay.intersectTriangle( vA, vB, vC, material.side !== THREE.DoubleSide );
|
|
|
+
|
|
|
+ if ( material.side === THREE.BackSide ) {
|
|
|
+
|
|
|
+ var intersectionPoint = localRay.intersectTriangle( vC, vB, vA, true );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ var intersectionPoint = localRay.intersectTriangle( vA, vB, vC, material.side !== THREE.DoubleSide );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if ( intersectionPoint === null ) continue;
|
|
|
|
|
@@ -196,7 +205,16 @@
|
|
|
positions[ c * 3 + 2 ]
|
|
|
);
|
|
|
|
|
|
- var intersectionPoint = localRay.intersectTriangle( vA, vB, vC, material.side !== THREE.DoubleSide );
|
|
|
+
|
|
|
+ if ( material.side === THREE.BackSide ) {
|
|
|
+
|
|
|
+ var intersectionPoint = localRay.intersectTriangle( vC, vB, vA, true );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ var intersectionPoint = localRay.intersectTriangle( vA, vB, vC, material.side !== THREE.DoubleSide );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if ( intersectionPoint === null ) continue;
|
|
|
|
|
@@ -242,7 +260,15 @@
|
|
|
b = vertices[ face.b ];
|
|
|
c = vertices[ face.c ];
|
|
|
|
|
|
- var intersectionPoint = localRay.intersectTriangle( a, b, c, material.side !== THREE.DoubleSide );
|
|
|
+ if ( material.side === THREE.BackSide ) {
|
|
|
+
|
|
|
+ var intersectionPoint = localRay.intersectTriangle( c, b, a, true );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ var intersectionPoint = localRay.intersectTriangle( a, b, c, material.side !== THREE.DoubleSide );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if ( intersectionPoint === null ) continue;
|
|
|
|