TextMesh Class

Extends Mesh
Module: Meshes

Special mesh type used to draw 3D text.

It receives a Font resource that is used to triangulate and extrude font data into a 3D mesh.

Methods

clone

() TextMesh

Clone this object instance into a new object.

Returns:

TextMesh:

Clone of this object.

setFont

(
  • font
)

Set font used by this text 3D instance.

Parameters:

setText

(
  • text
)

Change text.

Parameters:

  • text String

toJSON

(
  • meta
)
Object

Create JSON for object.

Need to backup geometry and set to undefined to avoid it being stored.

Parameters:

  • meta Object

Returns:

Object:

json

updateGeometry

()

Update the text geometry.

Should be called after chaging any attribute to generate a new geometry.

Properties

bevel

Boolean

If true a bevel is added to the text.

bevelSize

Number

Bevel size.

bevelThickness

Number

Bevel thickness.

curveSegments

Number

Number of segments that compose a curve in the font.

extruded

Boolean

Indicates if the text mesh has volume or not.

font

Font

Font used to draw text.

height

Number

Height of the text.

size

Number

Size of the text (depth).

text

String

Text to be diplayed in the mesh.