Methods
intersect
All intersect calls from this class will use the available acceleration structures. This makes the intersection significantly faster than using your own three.js raycasters.
- scene: Scene
- camera: Camera
- point: The NDC point to cast the ray from
- castLayers: The ObjectLayers enabled on the raycaster
- nearest: If the results should be sorted by dinstance. i.e nearest first
- bounds: An optional bounds where the intersecting takes place. Everything outside this bounds is disregarded from the result list for this cast. Any object outside of these layers is disregarded from intersection
- firstOnly: When this flag is enabled the acceleration structure will stop traversing after encountering the first intersection. Only applies to meshes
- tasOnly: When this flag is enabled, onyl the TAS will be intersected. Can be combined with
firstOnly
if wanted Returns: Array< Intersection > Three.js defined intersection
intersectRay
All intersect calls from this class will use the available acceleration structures. This makes the intersection significantly faster than using your own three.js raycasters.
- scene: Scene
- camera: Camera
- ray: The ray to use for casting
- castLayers: The ObjectLayers enabled on the raycaster
- nearest: If the results should be sorted by dinstance. i.e nearest first
- bounds: An optional bounds where the intersecting takes place. Everything outside this bounds is disregarded from the result list for this cast. Any object outside of these layers is disregarded from intersection
- firstOnly: When this flag is enabled the acceleration structure will stop traversing after encountering the first intersection. Only applies to meshes
- tasOnly: When this flag is enabled, onyl the TAS will be intersected. Can be combined with
firstOnly
if wanted Returns: Array< Intersection > Three.js defined intersection