Clears the UI, i.e. removes all the elements it contains.
Creates and adds a text element (i.e. UITextElement object) to the UI.
The Font to use for the text element
The text to be displayed. This can be dynamically changed later with UITextElement.setText()
Creates and adds a VoxelObject element (i.e. UIVoxelObjectElement object) to the UI.
The VoxelObject to be displayed.
Gets all the UITextElements that exist in the UI.
When provided, return the elements in this array instead of allocating one.
Gets all the UIVoxelObjectElement that exist in the UI.
When provided, return the elements in this array instead of allocating one.
Remove a given element from the UI.
The element to remove from the UI.
Returns a UI-position (i.e. position on screen in normalized coordinates) from a position expressed in world units. The return value is a Vector3, and not a Vector2 as one might expect. This is because the z component indicates whether the point is visible or not. If it's less than 1, it is in front of the camera and therefore potentially visible (it might still be outside the camera frustum). If it's more than 1, it is behind the camera and thus necessarily invisible.
The world-unit position to convert to UI-position units.
When provided, return the UI-position in this Vector3 instead of allocating one.
Returns a UI-position (i.e. position on screen in normalized coordinates) from a position expressed in canvas space, i.e. in CSS pixels from the top-left corner.