javascript - Can't create a mesh from a loaded Three.js object -
I exported a model to Clara with four textures in three jazz object formats. It results in a .json file. I am trying to load it and displayed it correctly. If I do the following (taken directly from clara.io export support), it loads and displays, but without texture:
var loader = new three.ObjectLoader (); Loader.load ("wsc3.json", function (obj) {scene.add (obj);});
One thing I have found is the context of using a different type of loader, it is possible to convert the weighted object into three. Get mesh, texture, and then apply them in the net I have an example of this:
loader = new three JSONLoder (); Loader.load ("wsc3.js", function (geometry, content) {// file Y contentForphylll = Get content loaded from new three.MacefaceMaterial (content); // Loaded geometry and content of mesh Make our net together = new three. Aries (geometry, contentframe file); scene.add (Aries);}); The problem with using JSONLoader is that I am exporting the sub-part in the model, and when the .js file is exported when JSONLoader is exported, then this model loses the hierarchy (I checked it The .js file itself does not have any sub-parts, this is just a big list of verticals). if I. If there is a look at the Json file that exports clara.io, then I can list different sub-parts, so I think I need to use this format. I have looked around and noticed that to create just one new mesh from OBJE produced by ObjectOlder is something like this:
var loader = new three. Object loader (); Get the material from loader.load ("wsc3.json", function (obj) {// obj var geometry = obj.geometry; //; obj var content = obj.materials; mesh = new 3. Aries (Geometry, content); scene.add (mesh);});
Unfortunately, this does not work, does not show anything. I do not know what I'm doing wrong. Is there a format that threes Will load, which not only brings texture but also hierarchy?
Comments
Post a Comment