Marc-Sefan Cassola пре 8 година
родитељ
комит
6c621acca5
2 измењених фајлова са 2 додато и 2 уклоњено
  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();
 
 

粤ICP备19079148号