see: How do i get occlusions of WebGLObjects onto CSS3DObject - #2 by drcmda
there’s two ways to solve this,
-
raycasting. every html object casts a ray (through the entire scene) towards the camera. if the ray hits anything the object suddenly disappears. this is complicated, very expensive and looks
-
blending. this makes html practically part of your scene and objects occlude naturally without suddenly disappearing, without any expense or complex calculation, it comes practically for free.