Use a Single Material for Cube While Preserving Per-Face Raycasting

Currently, the cube uses 6 separate materials (one for each face) to identify the clicked face during raycasting. We need to investigate whether it’s possible to use a single material for the entire cube while still detecting the individual face that was hit by the raycaster. This discussion should evaluate the feasibility, implementation approach, performance implications, and whether face detection can rely on geometry information (e.g., faceIndex or groups) instead of separate materials.

Raycaster’s intersected array objects contain the face that has been intersected… three.js docs

if you’re intersecring just a cube you can also likely rely on the normal

@Taron_Holikyan for context, you can see the usage of normals to calculate the intersected face in the render loop and console log of this example… https://codepen.io/forerunrun/pen/pvRrJPV