1

I exported a model from Blender using the three.js exporter, and managed to load it correctly using the JSONLoader. But I need now to store the JSON information in a variable and parse it to display the model, without loading an external file.

According to the docs, I could do it using the parse function from the GeometryLoader (http://mrdoob.github.com/three.js/docs/56/#Reference/Loaders/GeometryLoader), but I checked the source at github and saw that it doesn't exist. I'm not sure wether the documentation is outdated or serving as a guide for future implementations, and could find no further information on how to do this parsing. Does anybody have any idea?

Thanks in advance.

1 Answer 1

2

In the JSONLoader you have the method createModel that should do what you want: this method is called by loadAjaxJSON when the JSON data string has been retrieved by the Ajax request.

The createModel method has this signature:

createModel  = function ( json, callback, texturePath )
Sign up to request clarification or add additional context in comments.

1 Comment

Just tried it, worked perfectly! Just trying to work out the textures now. Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.