I am trying to mimic the screenshots below in Babylon. The screenshots show a plane with an image texture (simple in Babylon) that has an expanding label attached to it. This was originally written in Konva and after some poking around, I am unsure how to do the expanding label. The label text expands as the camera moves closer to the image however the label font stays the same size (the containing box gets bigger showing more of the label and the opposite happens as the camera moves further away).
I’ve tried using the GUI and attaching a label which does what I want in terms of keeping the font size the same. However, that label gets further away from the mesh as the camera moves out and when the camera moves in eventually the label will be on top of the mesh. What I want is for the label to stay right under the mesh.
Below is a playground showing the general idea of trying to mimic a 2D space in 3D. But, being a new at 3D and Babylon, I’m having trouble with everything from the camera to getting text to clip with an ellipse.
Any help much appreciated!