@thatopen/components 2.4.0-alpha.8 → 2.4.0-alpha.9

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.
package/dist/index.mjs CHANGED
@@ -9535,13 +9535,15 @@ class SimpleRaycaster {
9535
9535
  * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
9536
9536
  * to query. If not provided, it will query all the meshes stored in
9537
9537
  * {@link Components.meshes}.
9538
+ * @param position - the screen position to use for raycasting. If not provided,
9539
+ * the last pointer (mouse/touch) position will be used.
9538
9540
  */
9539
- castRay(items = Array.from(this.world.meshes)) {
9541
+ castRay(items = Array.from(this.world.meshes), position = this.mouse.position) {
9540
9542
  if (!this.world) {
9541
9543
  throw new Error("A world is needed to cast rays!");
9542
9544
  }
9543
9545
  const camera = this.world.camera.three;
9544
- this.three.setFromCamera(this.mouse.position, camera);
9546
+ this.three.setFromCamera(position, camera);
9545
9547
  return this.intersect(items);
9546
9548
  }
9547
9549
  /**