Xeonzinc Posted October 11, 2014 Share Posted October 11, 2014 Hi All, I've been spending some time trying to figure out the best way to add some decent 2D UI elements to a Babylon js game (i.e. alert boxes, status bars,clickable graphics on the edge of the screen). Ideally I'm trying to create the feel I've seen on the HTML5 polycraft game. Currently my only options seems to be: • Use a dynamic texture on a plane always facing the camera - I can't use existing components on here and it seems like it might be quite inefficient rendering all the 2D elements in 3D space. • Use multiple canvas layers - The works and allows the use of pre-built HTML5 canvas components (such as zebkit components), but gets quite messy and your canvas layers have to be precisely sized as clicks don't propagate through layers. What I think I probably really need is a way directly draw in 2D to the canvas as Babylon uses after the 3D rendering cycle completes, is this possible/efficient? Or is there some a simpler way to make a nice UI I have completely missed? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.