@Lakshmi
At all the respect, I won’t do your job for you.
The thing you’re requesting is something not basic.
There are several options:
- Create a topic in Jobs category.
- a) Create an object, containing 12 lines (box edges), each line has two normals - find dot-product of those normals with the view vectors in camera space, and if the result for both of them is negative, then set
.visible
property of a specific line object tofalse
.
b) Create a custom buffer geometry of pairs of points, where each pair defines a line of edge. Using a buffer attribute, add two normals to each point of each line egde. Do the same math, described in a), but now you process it in shaders, hiding lines withdiscard
. - Maybe my approaches are overcomplicated and somebody has easier/simpler ideas to share.
References:
- Way to hide Points if geometry is seen from backside? - #8 by prisoner849
- Get OrbitControls Azimuth Angle - #2 by prisoner849
- And maybe this one will be helpful too (thanks to @gkjohnson): LDraw-like edges