Optional
origin: THREE.Vector3The origin vector where the ray casts from.
Optional
direction: THREE.Vector3The direction vector that gives direction to the ray. Should be normalized.
Optional
near: numberAll results returned are further away than near. Near can't be negative. Default value is 0.
Optional
far: numberAll results returned are closer then far. Far can't be lower then near . Default value is Infinity.
The camera to use when raycasting against view-dependent objects such as billboarded objects like Sprites. This field can be set manually or is set when calling "setFromCamera".
The far factor of the raycaster. This value indicates which objects can be discarded based on the distance. This value shouldn't be negative and should be larger than the near property.
Infinity
Used by Raycaster to selectively ignore 3D objects when performing intersection tests.
new THREE.Layers()
The near factor of the raycaster. This value indicates which objects can be discarded based on the distance. This value shouldn't be negative and should be smaller than the far property.
0
The Ray used for the raycasting.
Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.
The object to check for intersection with the ray.
Optional
recursive: booleanIf true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is true.
Optional
optionalTarget: 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;).
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.
The objects to check for intersection with the ray.
Optional
recursive: booleanIf true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is true.
Optional
optionalTarget: 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;).
Generated using TypeDoc
This creates a new raycaster object.