Assume I a have a single face in 3D space, which the camera turns around by user interaction. When the mouse cursor hits the face, a raycast detects the intersection. Nothing special so far.
Question: How to detect if the camera looks at the downside or upside of the face?
I do have the mouse direction vector and the faces normal as well. What would be the operation in three.js (or mathematically if you want).
You need to do a dot product between your face normal and your camera forward vector.
If the product is positive it's facing away from the camera, if it's negative it's facing the camera.
pseudocode: