Garrett Johnson 4 年之前
父节点
当前提交
2362e90683
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/geometries/EdgesGeometry.js
  2. 1 1
      test/unit/src/geometries/EdgesGeometry.tests.js

+ 1 - 1
src/geometries/EdgesGeometry.js

@@ -90,7 +90,7 @@ class EdgesGeometry extends BufferGeometry {
 				const hash = `${ vecHash0 }_${ vecHash1 }`;
 				const reverseHash = `${ vecHash1 }_${ vecHash0 }`;
 
-				if ( reverseHash in edgeData ) {
+				if ( reverseHash in edgeData && edgeData[ reverseHash ] ) {
 
 					// if we found a sibling edge add it into the vertex array if
 					// it meets the angle threshold and delete the edge from the map.

+ 1 - 1
test/unit/src/geometries/EdgesGeometry.tests.js

@@ -285,7 +285,7 @@ export default QUnit.module( 'Geometries', () => {
 
 		QUnit.test( "three triangles, coplanar first", ( assert ) => {
 
-			testEdges( vertList, [ 0, 1, 2, 0, 2, 3, 0, 4, 2 ], 7, assert );
+			testEdges( vertList, [ 0, 2, 3, 0, 1, 2, 0, 4, 2 ], 7, assert );
 
 		} );