Book Image

Learning Three.js - the JavaScript 3D Library for WebGL

By : Jos Dirksen
Book Image

Learning Three.js - the JavaScript 3D Library for WebGL

By: Jos Dirksen

Overview of this book

Table of Contents (20 chapters)
Learning Three.js – the JavaScript 3D Library for WebGL Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
8
Creating and Loading Advanced Meshes and Geometries
Index

Chapter 6. Advanced Geometries and Binary Operations

In the previous chapter, we showed you all the basic geometries provided by Three.js. Besides these basic geometries, Three.js also offers a set of more advanced and specialized objects. In this chapter, we'll show you these advanced geometries and cover the following subjects:

  • How to use advanced geometries such as THREE.ConvexGeometry, THREE.LatheGeometry, and THREE.TubeGeometry.

  • How to create 3D shapes from 2D shapes using THREE.ExtrudeGeometry. We'll do this based on a 2D shape drawn using functionality provided by Three.js, and we'll show an example where we create a 3D shape based on an externally loaded SVG image.

  • If you want to create custom shapes yourself, you can easily amend the ones we've discussed in the previous chapters. Three.js, however, also offers a THREE.ParamtericGeometry object. With this object, you can create a geometry based on a set of equations.

  • Finally, we'll look at how you can create 3D text effects using THREE...