Text3D 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.

Constructor

Text3D

(
  • text
  • material
  • font
  • height
  • bevel
  • bevelThickness
  • size
  • curveSegments
)

Parameters:

  • text String

    Text to be draw

  • material Material

    Material used to shade the superficie of the geometry

  • font Font

    Font

  • height Number

    Text height

  • bevel Boolean
  • bevelThickness Number
  • size Number
  • curveSegments Number

Methods

clone

() Text3D

Clone this Text3D instance.

Returns:

Text3D:

Clone of this object

dispose

()

Dispose mesh along with its material and geometry.

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

updateText

()

Update text geometry.

Should be called after chaging any attribute.

Properties

bevel

Boolean

Bevel

bevelSize

Number

Bevel size

bevelThickness

Number

Bevel thickness

font

Font

Font used to draw text

height

Number

Height of the text

material

Material

Material is used to define how the geometry surface is shaded

size

Number

Size of the text (depth)

text

String

Text