소스 검색

fixed wrong default value for EdgesHelper constructor, fixed edge case (angle of 0°)

Arthur Silber 10 년 전
부모
커밋
0e6d3a7bc9
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/extras/helpers/EdgesHelper.js

+ 2 - 2
src/extras/helpers/EdgesHelper.js

@@ -5,7 +5,7 @@
 THREE.EdgesHelper = function ( object, hex, thresholdAngle ) {
 
 	var color = ( hex !== undefined ) ? hex : 0xffffff;
-	thresholdAngle = ( thresholdAngle !== undefined ) ? thresholdAngle : 170;
+	thresholdAngle = ( thresholdAngle !== undefined ) ? thresholdAngle : 10;
 
 	thresholdAngle = thresholdAngle * 0.0175; //deg -> radian
 	var thresholdDot = Math.cos( thresholdAngle );
@@ -72,7 +72,7 @@ THREE.EdgesHelper = function ( object, hex, thresholdAngle ) {
 
 		var h = hash[ key ];
 
-		if ( h.face2 === undefined || faces[ h.face1 ].normal.dot( faces[ h.face2 ].normal ) < thresholdDot ) {
+		if ( h.face2 === undefined || faces[ h.face1 ].normal.dot( faces[ h.face2 ].normal ) <= thresholdDot ) {
 
 			var vertex = vertices[ h.vert1 ];
 			coords[ index ++ ] = vertex.x;