Book Image

Three.js Cookbook

By : Jos Dirksen
Book Image

Three.js Cookbook

By: Jos Dirksen

Overview of this book

Table of Contents (15 chapters)
Three.js Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and exporting a model from Blender


Blender, which you can download from http://www.blender.org/download/, is a great tool to create 3D models and has excellent support for Three.js. With the right plugin, Blender can export models directly into Three.js' own JSON format, which can then easily be added to your scene.

Getting ready

Before we can use the JSON exporter in Blender, we first need to install the plugin in Blender. To install the plugin, take the following steps:

  1. The first thing you need to do is get the latest version of the plugin. We've added this to the source code of this book. You can find this plugin in the assets/plugin folder. In that directory, you'll find a single directory with the io_mesh_threejs name. To install the plugin, just copy this complete directory to the plugin location of Blender. As Blender is multiplatform, depending on your OS, this plugin directory might be stored in a different location.

  2. For Windows, copy the io_mesh_threejs directory to C:\Users...