Show DOM content at screen position of Three.js object

I made a simple example that shows drawing a DOM element at the screen position of an object. This could be useful for tooltips, for example. Drag the camera to move the red cube and the pink <div> will move accordingly. (Pardon the other stuff also happening in the example):

Are you aware of CSS2DRenderer?
https://threejs.org/examples/?q=css#css2d_label

2 Likes

Thanks! I also want to render labels with WebGL though (not in the above demo).