i am currently trying to do such thing: a 3d model of a laptop is opening and after it is opened user is able to see html content on display.
so i need to now how to do next: when a camera doesn’t see a mesh of a display everything renders as usual, but when it sees a mesh of display it doesn’t render it and anything behind it, leaving empty space in shape of a display mesh.
While this can be done with vanilla three, you’ll save yourself quite a bit of pain by going for react-three-fiber and drei, specifically <Html/>
element from drei (example, docs.)
If you feel like implementing it by hand: ref 1, ref 2, ref 3, ref 4, ref 5
thank you but that is not exactly what i am looking for. i am trying to make three render an area with 100% opacity so i could scale scene until scene would disappear and html appear
Maybe is checking frustumCulling