clean-up 3d code

Use THREE Math objects instead of scene for click detection.