Unclear loader usage

I’m just trying to get a hang of threejs. Right now I’m at the point where I like to import some external 3d models. The documentation is very unclear on how to achieve this.

I have found several ways on how to achieve this:

1: Blender export addon.
This gives me the ability to export a .json file that should be readable by three, however, the json loader is unable to handle the json, it will throw an error. (trying to get length of undefined property)

2: Obj loader
Here is the documentation for the OBJ loader. But, the loader is not included in the default three package. This is not at all mentioned in the documentation, it just places a link to some example. Therefore it seems to be a part of an example so I will have to use that by including it directly to my html file or something? (<script src=””>).

After some googling I found a package that I should be able to use: https://www.npmjs.com/package/three-obj-loader

This is not working as well. The following error occurs: THREE.MultiMaterial has been removed. Use an Array instead.

So… if the documentation on importing objects could be a bit more solid… that would be great :).

If anyone is interested:
I finally went with manually updating the ‘three-obj-loader’ package to use the latest loader. And following the answer here: https://stackoverflow.com/questions/32039553/three-js-typeerror-cannot-read-property-center-of-undefined

Author: Fantashit

1 thought on “Unclear loader usage

  1. A simpler option would be to add a line to to the top of all the docs pages for examples, something like:

    NOTE This is not part of the three.js core. To use OBJLoader you will have to include it separately to the main three.js script.

Comments are closed.