Import
TextGeometry is an addon, and must be imported explicitly, see Installation#Addons.
import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';
Constructor
new TextGeometry( text : string, parameters : TextGeometry~Options )
Constructs a new text geometry.
| text |
The text that should be transformed into a geometry. |
| parameters |
The text settings. |
Type Definitions
.Options
Represents the options type of the geometry's constructor.
|
font
Font |
The font. |
|
size
number |
The text size. Default is |
|
depth
number |
Depth to extrude the shape. Default is |
|
curveSegments
number |
Number of points on the curves. Default is |
|
steps
number |
Number of points used for subdividing segments along the depth of the extruded spline. Default is |
|
bevelEnabled
boolean |
Whether to beveling to the shape or not. Default is |
|
bevelThickness
number |
How deep into the original shape the bevel goes. Default is |
|
bevelSize
number |
Distance from the shape outline that the bevel extends. Default is |
|
bevelOffset
number |
Distance from the shape outline that the bevel starts. Default is |
|
bevelSegments
number |
Number of bevel layers. Default is |
|
direction
string |
Char direction: ltr(left to right), rtl(right to left) & tb(top bottom). Default is |
|
extrudePath
Curve |
A 3D spline path along which the shape should be extruded. Bevels not supported for path extrusion. Default is |
|
UVGenerator
Object |
An object that provides UV generator functions for custom UV generation. |