raycaster optimized b/c no children in widget mesh
This commit is contained in:
parent
82e2742b8d
commit
d133a4f076
1 changed files with 1 additions and 1 deletions
|
|
@ -673,7 +673,7 @@ function contourPolys(widget, polys) {
|
||||||
for (let poly of polys) {
|
for (let poly of polys) {
|
||||||
for (let point of poly.points) {
|
for (let point of poly.points) {
|
||||||
raycaster.ray.origin.set(point.x, point.y, 10000);
|
raycaster.ray.origin.set(point.x, point.y, 10000);
|
||||||
const intersects = raycaster.intersectObject(widget.mesh, true);
|
const intersects = raycaster.intersectObject(widget.mesh, false);
|
||||||
const firstHit = intersects[0] || null;
|
const firstHit = intersects[0] || null;
|
||||||
point.z = firstHit.point.z;
|
point.z = firstHit.point.z;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue