Raycasting in WebGL.
Raycasting is often used in Computer Graphics for hit detection. In this example, drag the quadrant in order to hit on a circle. Only the front of the quadrant is draggable.
The scene can also be tinkered with. Zoom in or out using your mouse (or whichever gesture your device is configured with), rotate by dragging/tapping.
The code is organize to ease your understanding of Raycasting as a concept.
The raycasting method uses the quadrant geometry to cast rays. When multiple rays are hitting a circle, something else happens.