O'Reilly logo

Learning Three.js: The JavaScript 3D Library for WebGL 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

Using binary operations to combine meshes

In this section we'll look at a different way of creating geometries. In this chapter so far and in the previous chapter we use the default geometries provided by Three.js to create interesting-looking geometries. With the default set of properties you can create beautiful models, but you are limited to what Three.js provides. In this section we'll show you how you can combine various of these standard geometries to create new ones. For this we use the Three.js extension THREEBSP, which you can find online here: https://github.com/skalnik/ThreeBSP. This additional library provides the following three functions:

Name

Description

intersect

This function allows you to create a new geometry based on the ...

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