8

Creating and Loading Advanced Meshes and Geometries

In this chapter, we’ll look at a couple of different ways that you can create and load advanced and complex geometries and meshes. In Chapter 5, Learning to Work with Geometries, and Chapter 6, Exploring Advanced Geometries, we showed you how to create a few advanced geometries using the built-in objects from Three.js. In this chapter, we’ll use the following two approaches to create advanced geometries and meshes:

  • Geometry grouping and merging
  • Loading geometries from external resources

We start with the “group and merge” approach. With this approach, we use the standard Three.js grouping (THREE.Group) and the BufferGeometryUtils.mergeBufferGeometries() function to create new objects.

Get Learn Three.js - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.