Picking is a great technique, and quite simple to implement by hand. For a javascript implementation, see mPicker:
- Previous discussion: Click event on 3D primitive - #4 by kfrajer
- Jave library version: Picking GitHub - nclavaud/picking: Processing Library Template for Eclipse