Optional
camOptional
layerraw layer mask, use setLayer to set an individual layer active
Optional
lineOptional
maxSet the raycaster far distance:
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.
Optional
minSet the raycaster near distance:
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.
Optional
preciseIf true, the raycaster will use a more precise method to test for intersections. This is slower but more accurate.
Optional
rayOptional ray that can be used for raycasting
Optional
raycasterOptionally a custom raycaster can be provided. Other properties will then be set on this raycaster
Optional
recursiveIf true, the raycaster will traverse the scene recursively.
Optional
resultsRaycast results array. You can provide an array here to avoid creating a new one (note that if your array already contains items they will be removed)
Optional
screenPoint on screen in raycast space / normalized device coordinates (-1 to 1).
Optional
targetsObjects to raycast against. If no target array is provided the whole scene will be raycasted
Optional
testOptional calback function to be called per object before tested for intersections.
This can be used to filter objects.
Return false
to ignore the object completely or "continue in children"
to skip the object but continue to traverse its children (if you do raycast with recursive
enabled)
Optional
useUse MeshBVH for raycasting. This is faster than the default threejs raycaster but uses more memory.
The camera to use for the raycaster