Text Extrude

From PowerUI
Revision as of 16:13, 2 April 2018 by Bablakeluke (talk | contribs) (Usage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PowerUI's text library InfiniText loads fonts directly which gives it full access to all of the glyphs. There's lots of ways in which that can be exploited, and one example is the non-standard CSS text-extrude property. It is designed for use on a World UI so you can, for example, display e.g. "CITY LIBRARY" in localized, formatted, 3D text within your game.

Usage

It's as simple as declaring a CSS property:

text-extrude: <length>

The length is how far, in world units, to extrude the text. Other formatting, such as bold/ italic/ underlines and the colour will all be adopted by the 3D variant. It will also be located exactly where the flat version of the text would've been, so you can use any positioning that you wish with it.

Essentially, 3D text with the complete power of a layout engine.