raycaster optimized b/c no children in widget mesh

This commit is contained in:
Stewart Allen 2025-06-27 01:09:58 -04:00
commit d133a4f076

View file

@ -673,7 +673,7 @@ function contourPolys(widget, polys) {
for (let poly of polys) {
for (let point of poly.points) {
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;
point.z = firstHit.point.z;
}