Browse Source

changes for clarity

Marc-Sefan Cassola 7 years ago
parent
commit
6c621acca5
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/objects/Line.js
  2. 1 1
      src/objects/Points.js

+ 1 - 1
src/objects/Line.js

@@ -63,7 +63,7 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), {
 			inverseMatrix.getInverse( matrixWorld );
 			inverseMatrix.getInverse( matrixWorld );
 			ray.copy( raycaster.ray ).applyMatrix4( inverseMatrix );
 			ray.copy( raycaster.ray ).applyMatrix4( inverseMatrix );
 
 
-			var localPrecision = 3 * precision / ( this.scale.x + this.scale.y + this.scale.z );
+			var localPrecision = precision / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );
 			var localPrecisionSq = localPrecision * localPrecision;
 			var localPrecisionSq = localPrecision * localPrecision;
 
 
 			var vStart = new Vector3();
 			var vStart = new Vector3();

+ 1 - 1
src/objects/Points.js

@@ -55,7 +55,7 @@ Points.prototype = Object.assign( Object.create( Object3D.prototype ), {
 			inverseMatrix.getInverse( matrixWorld );
 			inverseMatrix.getInverse( matrixWorld );
 			ray.copy( raycaster.ray ).applyMatrix4( inverseMatrix );
 			ray.copy( raycaster.ray ).applyMatrix4( inverseMatrix );
 
 
-			var localThreshold = 3 * threshold / ( this.scale.x + this.scale.y + this.scale.z );
+			var localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );
 			var localThresholdSq = localThreshold * localThreshold;
 			var localThresholdSq = localThreshold * localThreshold;
 			var position = new Vector3();
 			var position = new Vector3();