Book Image

Learning Three.js - the JavaScript 3D Library for WebGL

By : Jos Dirksen
Book Image

Learning Three.js - the JavaScript 3D Library for WebGL

By: Jos Dirksen

Overview of this book

Table of Contents (20 chapters)
Learning Three.js – the JavaScript 3D Library for WebGL Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
8
Creating and Loading Advanced Meshes and Geometries
Index

Creating animations using external models


In Chapter 8, Creating and Loading Advanced Meshes and Geometries, we looked at a number of 3D formats that are supported by Three.js. A couple of those formats also support animations. In this chapter, we'll look at the following examples:

  • Blender with the JSON exporter: We'll start with an animation created in Blender and exported to the Three.js JSON format.

  • Collada model: The Collada format has support for animations. For this example, we'll load an animation from a Collada file and render it with Three.js.

  • MD2 model: The MD2 model is a simple format used in the older Quake engines. Even though the format is a bit dated, it is still a very good format for storing character animations.

We'll start with the Blender model.

Creating a bones animation using Blender

To get started with animations from Blender, you can load the example we've included in the models folder. You can find the hand.blend file there, which you can load into Blender. The following...