Viewport Aligned Objects

Other than using labels, billboards, and ViewportQuads, are there any other viewport-aligned objects in cesium?

I’m trying to render an informational block that appears at a pixel offset relative to a position on the earth, with a binding line to the target.

So far I’ve been using this approach to handle the line, which works okay, but I was wondering if there was a better method.

I’m also trying to render a border around the informational block, and as far as I can tell there’s nothing in cesium to create what I’m looking for. I suppose I could create a white border image and use it on a billboard which I could color, but I have to support a dynamic border size so I don’t know if that would work.

Currently I’m using two labels, one behind the other, with showBackground set to true for both. The bottom label is slightly larger and has transparent text, and the top label is nested in the middle (so that the bottom label appears like a border around it). This is problematic since I want the background to have transparency, so the color of the labels interfere with each other.

I thought using a ViewportQuad would be perfect, but I can’t find a way to get it to only render the border of the bounding rectangle.

I was wondering if there are any other viewport-aligned objects in cesium that I could use to accomplish my goal, or if there is just a better way to do this with labels/billboards/ViewportQuads.

Thanks!

I think Ed Macky’s answer there might be your best bet. I wonder if another option could be to create an HTML div on top of the canvas, and you can use the SceneTransforms class to translate between world coordinates to window coordinates.