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

Summary


In this chapter, we discussed all of the standard geometries Three.js has to offer. As you saw, there are a whole lot of geometries you can use right out of the box. To best learn how to use the geometries, experiment with the geometries. Use the examples in this chapter to get to know the properties you can use to customize the standard set of geometries available from Three.js. It is also a good thing that when you start with geometries, you choose a basic material; don't go directly for the complex materials, but start simple with THREE.MeshBasicMaterial with the wireframe set to true, or THREE.MeshNormalMaterial. That way, you'll get a much better picture of the true shape of a geometry. For two-dimensional shapes, it's important to remember that they are placed on the x-y plane. If you want to have a two-dimensional shape horizontally, you'll have to rotate the mesh around the x axis for -0.5 * PI. And finally, take care that if you're rotating a two-dimensional shape, or a...