In the next part of this chapter, we'll have a quick look at how you can create 3D text effects. First, we'll look at how to render text using the fonts provided by Three.js, and after that, we'll have a quick look at how you can use your own fonts for this.
Creating 3D text
Rendering text
Rendering text in Three.js is very easy. All you have to do is define the font you want to use and use the same extrude properties we saw when we discussed THREE.ExtrudeGeometry. The following screenshot shows the 07-text-geometry.html example of how to render text in Three.js:
46 FPS (2-60)
The code required to create this 3D text is as follows:
var loadedFont;
var fontload = new THREE.FontLoader();
fontload...