Class: ClickHandler

ClickHandler(renderer)

Class to handle object detection via mouse clicks/touch events and raycasting.

Constructor

new ClickHandler(renderer)

Create a ClickHandler.
Parameters:
Name Type Description
renderer THREE.WebGLRenderer The Three.js renderer on which the click events will be handled.
Source:

Methods

raycast(camera, scene) → {Array}

Cast a ray into the scene to detect objects.
Parameters:
Name Type Description
camera THREE.Camera The active Three.js camera, from which the ray will be cast.
scene THREE.Scene The active Three.js scene, which the ray will be cast into.
Source:
Returns:
- array of all intersected objects.
Type
Array