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.
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
});
});
text — The text that needs to be shown.
parameters — Object that can contains the following parameters.
100
.50
.12
.false
.10
.8
.0
.3
.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.
See the base ExtrudeGeometry class for common properties.
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
See the base ExtrudeGeometry class for common methods.
For more info on how to obtain the source code of this module see this page.