If it doesn’t have to be done using the 2D GUI you can do the same as you did with the other engine with a place and a material. If you want to do it with the 2D GUI it might be a little more complicated. And I assume you are referring to the background, right?
For the masking from Top to Bottom, Left right, etc… It’s almost already done in the previous playground… It’s just a matter of alignement
Please have a look at this new Playground
For the alignement I advise you to use flags such as BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT; instead of 0. Even if the result is exactly the same, you avoid confusion and also it’s better for reading the code later…
For the circular shaped, I’m not sure you can do it just using the arc of Ellipse. It might be simpler using a mesh
In that case I suggest you to use native canvas2d functions to draw on the canvas2d context of the AdvancedDynamicTexture. You’ll have full control of your mask. Here is a star for example: