Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/threejs_4_deno/src/core/Raycaster.d.ts>Raycaster#intersectObject

A simple transformation of three.js for use within a Deno workflow
Go to Latest
method Raycaster.prototype.intersectObject
import { Raycaster } from "https://deno.land/x/threejs_4_deno@v121/src/core/Raycaster.d.ts";

Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.

Parameters

object: Object3D

The object to check for intersection with the ray.

optional
recursive: boolean

If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is false.

optional
optionalTarget: Intersection[]

(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;).