BufferGeometryExtrudeGeometry

TextGeometry

A class for generating text as a single geometry. It is constructed by providing a string of text, and a hash of parameters consisting of a loaded Font and settings for the geometry's parent ExtrudeGeometry. See the Font and TTFLoader pages for additional details.

Code Example

const loader = new v3d.TTFLoader(); loader.load('fonts/bfont.woff', function(fontInfo) { const geometry = new v3d.TextGeometry('Hello Verge3D!', { font: new Font(fontInfo), size: 80, height: 5, curveSegments: 12, bevelEnabled: true, bevelThickness: 10, bevelSize: 8, bevelOffset: 0, bevelSegments: 5 }); });

Constructor

TextGeometry(text : String, parameters : Object)

text — The text that needs to be shown.
parameters — Object that can contains the following parameters.

Procedural geometry is fun. However, in real life applications this feature is rarely needed. It would be more efficient do design text in the preferred modelling suite and export/load to Verge3D via glTF.

Properties

See the base ExtrudeGeometry class for common properties.

.parameters : Object

An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.

Methods

See the base ExtrudeGeometry class for common methods.

Source

For more info on how to obtain the source code of this module see this page.