Text component

This component defines nodes for rendering 3D text.

See also X3D specification of the Text component.

Contents:

1. Demos

For complete demos and tests of these features, see the text subdirectory inside our VRML/X3D demo models.

2. Supported nodes

  • Text (API reference),
    FontStyle (API reference)

    Most important properties (size, spacing, justify (including 2nd justify for vertical), family, style) are handled fully.

    TODO: But some properties are ignored for now:

    • FontStyle properties: From section 6.22.3 Direction and justification horizontal, leftToRight, topToBottom fields are ignored (and things are always handled like they had default values TRUE, TRUE, TRUE). From section 6.22.4 Language language field is ignored.
    • Text: length, maxExtent are ignored (and handled like they had default values, which means that the text is not stretched).

    Text is "clickable" within Anchor and TouchSensor nodes. Although I didn't find any mention in the specifications that I should do this, many VRML models seem to assume this. We make an ultra-simple triangulation of the text (just taking 2 triangles to cover whole text, you don't want to produce real triangles for text node, as text node would have a lot of triangles!).
    TODO: unfortunately, for now these triangles also participate in collision detection, while spec says that text shouldn't collide.