@inweb/viewer-three 27.2.3 → 27.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,12 +84,7 @@ export class Snapper {
84
84
  return target.set(event.clientX, event.clientY);
85
85
  }
86
86
 
87
- getPointerIntersects(
88
- mouse: Vector2,
89
- objects: Object3D[],
90
- recursive = false,
91
- clip = true
92
- ): Array<Intersection<Object3D>> {
87
+ getPointerIntersects(mouse: Vector2, objects: Object3D[]): Array<Intersection<Object3D>> {
93
88
  const rect = this.canvas.getBoundingClientRect();
94
89
  const x = ((mouse.x - rect.left) / rect.width) * 2 - 1;
95
90
  const y = (-(mouse.y - rect.top) / rect.height) * 2 + 1;
@@ -106,14 +101,11 @@ export class Snapper {
106
101
  Sprite: {},
107
102
  };
108
103
 
109
- let intersects = this.raycaster.intersectObjects(objects, recursive);
104
+ let intersects = this.raycaster.intersectObjects(objects, false);
110
105
 
111
- if (clip) {
112
- const clippingPlanes = this.renderer.clippingPlanes || [];
113
- clippingPlanes.forEach((plane: Plane) => {
114
- intersects = intersects.filter((intersect) => plane.distanceToPoint(intersect.point) >= 0);
115
- });
116
- }
106
+ (this.renderer.clippingPlanes || []).forEach((plane: Plane) => {
107
+ intersects = intersects.filter((intersect) => plane.distanceToPoint(intersect.point) >= 0);
108
+ });
117
109
 
118
110
  return intersects;
119
111
  }