Class: Text

X3D: 3.3
Component: Text
Status:
experimental

.nodeTypes. Text

The Text node specifies a two-sided, flat text string object positioned in the Z=0 plane of the local coordinate system based on values defined in the fontStyle field. Text nodes may contain multiple text strings specified using the UTF-8 encoding. The text strings are stored in the order in which the text mode characters are to be produced as defined by the parameters in the FontStyle node.

HTML Encoding and Default Values

<Text ccw='true' fontStyle='x3dom.nodeTypes.X3DFontStyleNode' length='[]' lit='true' maxExtent='0.0' metadata='X3DMetadataObject' solid='true' string='[]' useGeoCache='true' ></Text>

Inheritance


Constructor

Text(ctx)

Constructor for Text

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
ccw SFBool true X3DGeometryNode The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations.
fontStyle SFNode X3DFontStyleNode The fontStyle field contains one FontStyle node that specifies the font size, font family and style, direction of the text strings, and any specific language rendering techniques used for the text.
length MFFloat [] [0, inf] The length field contains an MFFloat value that specifies the length of each text string in the local coordinate system. The length of each line of type is measured horizontally for horizontal text (FontStyle node: horizontal=TRUE) and vertically for vertical text (FontStyle node: horizontal=FALSE).
lit SFBool true X3DGeometryNode Specifies whether this geometry should be rendered with or without lighting.
maxExtent SFFloat 0 [0, inf] The maxExtent field limits and compresses all of the text strings if the length of the maximum string is longer than the maximum extent, as measured in the local coordinate system. If the text string with the maximum length is shorter than the maxExtent, then there is no compressing. The maximum extent is measured horizontally for horizontal text (FontStyle node: horizontal=TRUE) and vertically for vertical text (FontStyle node: horizontal=FALSE).
metadata SFNode X3DMetadataObject X3DNode Field to add metadata information
solid SFBool true X3DGeometryNode Specifies whether backface-culling is used. If solid is TRUE only front-faces are drawn.
string MFString [] The text strings are contained in the string field.
useGeoCache SFBool true X3DGeometryNode Most geo primitives use geo cache and others might later on, but one should be able to disable cache per geometry node. Defaults to global useGeoCache setting parameter.