Class: Raycaster
Defined in: src/core/components/Raycaster.ts:47
Extends
Constructors
Constructor
new Raycaster(
origin?,direction?,near?,far?):Raycaster
Defined in: node_modules/@types/three/src/core/Raycaster.d.ts:101
This creates a new Raycaster object.
Parameters
origin?
The origin vector where the ray casts from. Default new Vector3()
direction?
The direction vector that gives direction to the ray. Should be normalized. Default new Vector3(0, 0, -1)
near?
number
All results returned are further away than near. Near can't be negative. Expects a Float. Default 0
far?
number
All results returned are closer than far. Far can't be lower than near. Expects a Float. Default Infinity
Returns
Raycaster
Inherited from
THREE.Raycaster.constructor
Properties
sortFunction()
sortFunction: (
a,b) =>number=defaultSortFunction
Defined in: src/core/components/Raycaster.ts:49
Parameters
a
Intersection
b
Intersection
Returns
number
Methods
intersectObject()
intersectObject<
TIntersected>(object,recursive,intersects):Intersection<TIntersected>[]
Defined in: src/core/components/Raycaster.ts:59
Intersects a single object with the raycaster, using the custom sort function.
Type Parameters
TIntersected
TIntersected extends Object3D<Object3DEventMap>
Parameters
object
The object to intersect with.
recursive
boolean = true
Whether to intersect with the object's children.
intersects
Intersection<TIntersected>[] = []
The array to store the intersections in.
Returns
Intersection<TIntersected>[]
The intersections found.
Overrides
THREE.Raycaster.intersectObject
intersectObjects()
intersectObjects<
TIntersected>(objects,recursive,intersects):Intersection<TIntersected>[]
Defined in: src/core/components/Raycaster.ts:76
Intersects multiple objects with the raycaster, using the custom sort function.
Type Parameters
TIntersected
TIntersected extends Object3D<Object3DEventMap>
Parameters
objects
Object3D<Object3DEventMap>[]
The objects to intersect with.
recursive
boolean = true
Whether to intersect with the objects' children.
intersects
Intersection<TIntersected>[] = []
The array to store the intersections in.
Returns
Intersection<TIntersected>[]
The intersections found.
Overrides
THREE.Raycaster.intersectObjects