Class: SimpleRaycaster
components.SimpleRaycaster
A simple raycaster that allows to easily get items from the scene using the mouse and touch events.
Hierarchy
- Component<- THREE.Raycaster>- ↳ - SimpleRaycaster
Implements
Properties
enabled
• enabled: boolean = true
Overrides
Defined in
temp/components/core/SimpleRaycaster/index.ts:18
mouse
• Readonly mouse: Mouse
The position of the mouse in the screen.
Defined in
temp/components/core/SimpleRaycaster/index.ts:21
name
• name: string = "SimpleRaycaster"
Overrides
Defined in
temp/components/core/SimpleRaycaster/index.ts:15
Methods
castRay
▸ castRay(items?): null | Intersection<Object3D<Event>>
Throws a ray from the camera to the mouse or touch event point and returns the first item found. This also takes into account the clipping planes used by the renderer.
Parameters
| Name | Type | Description | 
|---|---|---|
| items | Mesh<BufferGeometry<NormalBufferAttributes>,Material|Material[]>[] | the meshes to query. If not provided, it will query all the meshes stored in meshes. | 
Returns
null | Intersection<Object3D<Event>>
Implementation of
Raycaster.castRay
Defined in
temp/components/core/SimpleRaycaster/index.ts:46
get
▸ get(): Raycaster
Returns
Raycaster
Overrides
Defined in
temp/components/core/SimpleRaycaster/index.ts:33
hasUI
▸ hasUI(): this is UI
Whether is component implements any kind of UI.
Returns
this is UI
Inherited from
Defined in
temp/components/base-types/component.ts:48
isDisposeable
▸ isDisposeable(): this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
Defined in
temp/components/base-types/component.ts:28
isHideable
▸ isHideable(): this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
Defined in
temp/components/base-types/component.ts:43
isResizeable
▸ isResizeable(): this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
Defined in
temp/components/base-types/component.ts:33
isUpdateable
▸ isUpdateable(): this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
Defined in
temp/components/base-types/component.ts:38