Game Development Reference
In-Depth Information
if (elapsedTime < rate) return;
AnimationHandler.update(elapsedTime/1000);
...
}
If you have your RiggedMesh class in place, animation data is simple to understand
and work with.
Exporting models from 3D software
in JSON
In our code, we strictly follow the three.js JSON 3.1 format ( https://github.com/
mrdoob/three.js/wiki/JSON-Model-format-3.1 ). Hence, we can directly use
three.js exporters to load 3D objects in our code.
Our code only handles models with a single material/texture
file. Hence, if you use the code directly, make sure that you
create models with a single texture.
Exporting from Blender
We can download the Blender add-on from here https://github.com/mrdoob/
three.js/tree/master/utils/exporters/blender/2.65 . We can install it in
Blender using following simple steps:
1.
Copy the add-on to the following path:
° Windows: C:\Users\USERNAME\AppData\Roaming\Blender
Foundation\Blender\2.6X\scripts\addons
° Mac: /Applications/Blender/blender.app/Contents/
MacOS/2.6X/scripts/addons
° Linux: /home/USERNAME/.config/blender/2.6X/scripts/addons
2.
In Blender preferences, in add-ons, look for option three.
3.
Enable the checkbox next to Import-Export: three.js format .
Now, you can use the Export menu to export the JSON file.
 
Search WWH ::




Custom Search