Browse Source

small performance optimization through math

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

+ 1 - 1
src/objects/Points.js

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