I need to show runtime strings above an entity; achieved points, a timer, health percentage etc., like below:
When the entity rotates, the info should also rotate, so I can’t just use 2D texts. I could use a 3D quad with the right texture, but since I don’t have all the possible textures, I would have to draw the runtime string onto frame buffer texture and then use it to draw the quad in world space. How can this be done with playcanvas? And more important, is there a better/easier solution?
If you want to make text rotating, then yes, you will have to use the way Dave suggested, which is a bit too complicated.
Basically you will have to create <canvas> element and then get 2d context from it, then set font and measure text you want to print, then scale that canvas to that resolution, and then draw text. Then you can use that canvas element as a buffer to set to texture that is used on name billboard on top of player.
To work with canvas2d and text, check out here: http://www.html5canvastutorials.com/tutorials/html5-canvas-text-font-size/
As said before - this is too complicated for newbies, so I recommend to stick to suggested simple scenario with floating div on top.