O'Reilly logo

WebGL Game Development by Sumeet Arora

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

Animating a rigged JSON model

Well, we did not take much effort to load a static model, rather we took more effort to animate the model. Hence, let's first understand how animation data is encoded in a JSON file.

JSON model – animation data

Open model/obj/mrgreen.json in your text editor. In the file, you will find an element animation. When the file is viewed in any JSON viewer, you will see name, fps, length, and hierarchy as the animation object's child elements. To understand our JSON file, we used an online viewer (http://jsonviewer.stack.hu/). We loaded our JSON file in the viewer as shown in the following screenshot:

JSON model – animation data

The other child elements ...

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