Reputation: 3
I have converted my OBJ 3d Model into a .js file using this python script:
python convert_obj_three.py -i infile.obj -o outfile.js
but now I am having issues implementing the 3d model into my html. Im not sure what kind of script is necessary to load the .js file or .obj if that works. Any help is appreciated. Thanks!
Upvotes: 0
Views: 1311
Reputation: 51857
You should check that the version of the converter script is compatible with the json format version used by the three.js release you're using.
Regardless, you can probably simply load the .obj file directly in three.js: check out the loader obj example
Another quick'n'dirty option, if you really must convert the .obj to a .json file is simply to:
Upvotes: 1
Reputation: 179
I use https://clara.io/ tool to export to Json. Then in the html use https://threejs.org/ lib to load and render the model.
Upvotes: 0