diff --git a/docs/api/core/Raycaster.html b/docs/api/core/Raycaster.html index ce6b442c41308bfd75947112577c820bd0f124b6..aa252921335f42285cc439784ed2ce4ca4bb2b0e 100644 --- a/docs/api/core/Raycaster.html +++ b/docs/api/core/Raycaster.html @@ -98,11 +98,6 @@ This value shouldn't be negative and should be larger than the near property. -

[property:float precision]

-
- The precision factor of the raycaster when intersecting [page:Mesh] objects. -
-

.[page:float linePrecision]

The precision factor of the raycaster when intersecting [page:Line] objects. diff --git a/src/core/Raycaster.js b/src/core/Raycaster.js index 4df366ba466a06dbfceaabeb904a3e1b34470db2..e7e3a4d2207b1de70b94d2933f1b8d8487f54f27 100644 --- a/src/core/Raycaster.js +++ b/src/core/Raycaster.js @@ -54,7 +54,6 @@ constructor: THREE.Raycaster, - precision: 0.0001, linePrecision: 1, set: function ( origin, direction ) { diff --git a/src/objects/Mesh.js b/src/objects/Mesh.js index 0d261a75bd5b0a7473ae397f15bd68b89afaf841..5fb19a9b7bd36c3d1f0037368b9e2855399cf4f0 100644 --- a/src/objects/Mesh.js +++ b/src/objects/Mesh.js @@ -107,7 +107,6 @@ THREE.Mesh.prototype.raycast = ( function () { var attributes = geometry.attributes; var a, b, c; - var precision = raycaster.precision; if ( attributes.index !== undefined ) { @@ -153,7 +152,7 @@ THREE.Mesh.prototype.raycast = ( function () { var distance = raycaster.ray.origin.distanceTo( intersectionPoint ); - if ( distance < precision || distance < raycaster.near || distance > raycaster.far ) continue; + if ( distance < raycaster.near || distance > raycaster.far ) continue; intersects.push( { @@ -199,7 +198,7 @@ THREE.Mesh.prototype.raycast = ( function () { var distance = raycaster.ray.origin.distanceTo( intersectionPoint ); - if ( distance < precision || distance < raycaster.near || distance > raycaster.far ) continue; + if ( distance < raycaster.near || distance > raycaster.far ) continue; intersects.push( { @@ -221,7 +220,6 @@ THREE.Mesh.prototype.raycast = ( function () { var objectMaterials = isFaceMaterial === true ? this.material.materials : null; var a, b, c; - var precision = raycaster.precision; var vertices = geometry.vertices; @@ -294,7 +292,7 @@ THREE.Mesh.prototype.raycast = ( function () { var distance = raycaster.ray.origin.distanceTo( intersectionPoint ); - if ( distance < precision || distance < raycaster.near || distance > raycaster.far ) continue; + if ( distance < raycaster.near || distance > raycaster.far ) continue; intersects.push( { diff --git a/src/objects/PointCloud.js b/src/objects/PointCloud.js index 3511414ee78481f1de4beafc82c49ede28cf508b..f2148f2342a3e66af01766cc71d33066313e38f3 100644 --- a/src/objects/PointCloud.js +++ b/src/objects/PointCloud.js @@ -54,6 +54,8 @@ THREE.PointCloud.prototype.raycast = ( function () { var distance = raycaster.ray.origin.distanceTo( intersectPoint ); + if ( distance < raycaster.near || distance > raycaster.far ) return; + intersects.push( { distance: distance,