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

Exporting a model from Blender and showing it in Three.js

Let's define a model of a 3D geometric shape in Blender, export it using the plugin we just installed, and render it in Three.js. You can also find the Blender model used in this example in the assets/models folder from the source code of this book.

Exporting the model

For this first example, we're just going to use one of the standard geometries that are provided by Blender. First off though, let's remove the cube that we see. If you've opened Blender, the cube will be selected, so just delete it by pressing x and clicking on Delete in the pop up menu. Next, click on Add (at the bottom of the 3D window) and select Monkey via the Mesh option's submenu. This is shown in the following screenshot: ...

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