Loading 3D Models
If you want to load 3D models, first be aware that loading arbitrary formats is tricky and we make no guarantees that you will be able to load the model of your choice. We do, however, provide some default functionality in the example scenes.
We do not want you importing shader materials from external files---you should be implementing these yourself! The cat example we provide uses the vertices and uv coordinates of the model, as well as a texture atlas, but they are rendered with a shader written and linked in AniGraph.
The cat model in this example was converted from an .obj
file downloaded from this link.
Exporting glTF files from Blender
The gltf format is probably the easiest to get working in threejs / anigraph. You can export it from Blender, which you can use as a way to convert from other formats.
Select the object
Fist select the object you want to export
Then go to File->Export->glTF 2.0
Here are the settings that I used to export the cat model:
Importing the model
Check out how the cat is loaded in the LoadTheCat
function defined in ExampleSceneModel.