-
Notifications
You must be signed in to change notification settings - Fork 36
Text
With RUIText you can easily create an Entity with the specified text placed with its bounding box centre at the middle of your entity.
See RUIText documentation here.
With the very simplest example, you could just write RUIText(with: "hello")
, and the result will be an Entity containing a mesh of the word "hello", with the origin being the centre of the mesh bounding box. Other properties include colour, font, and width and height dimensions for purposes of text wrapping.
When I want to add an icon like ❤︎, ✓ or ♻︎ to my application, my least favourite thing to do is create or download a 3D asset to include in my app. Instead, with many symbols included in the default font (such as ascii symbols), we can create our 3D model with RUIText, like this:
RUIText(with: "❤︎ ✓ ♻︎ ●", color: .systemOrange)