import { three } from "https://deno.land/x/remapper@3.0.0/src/deps.ts";
const { Raycaster } = three;
Checks all intersection between the ray and the objects with or without the descendants. Intersections are returned sorted by distance, closest first. Intersections are of the same form as those returned by .intersectObject.
Type Parameters
TIntersected extends Object3D
Parameters
objects: Object3D[]
The objects to check for intersection with the ray.
If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is true.
optional
optionalTarget: Array<Intersection<TIntersected>>(optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
Returns
Array<Intersection<TIntersected>>