O'Reilly logo

Three.js Essentials by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Programmatic Geometries

In this chapter, we're going to look at a different approaches to creating geometries. Instead of using the built-in geometries from Three.js as we did in earlier chapters, we will create the geometries programmatically. This will allow us to create many different-looking types of objects without having to specify the models in detail or model them in a 3D modeling program. We'll cover the following topics in this chapter:

  • Creating a geometry from scratch using vertices and faces.
  • Coloring the generated geometries; we'll use the color property of the created faces.
  • Working with textures; we need to configure an additional property besides the faces and the vertices. This is called UV mapping.
  • Using Perlin noise, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required