I am trying to export this https://www.dropbox.com/s/zz1g38xaci2ibod/sailor.blend?dl=1 Blender model using exporter from Three.js 73 (from github master branch).
But when I load it I see no texture:
var loader = new THREE.JSONLoader();
loader.load("assets/sailor.json",
function (geom, mat) {
console.log(mat);
var model = new THREE.Mesh(geom, mat[0]);
model.castShadow = true;
scene.add(model);
});
The model has two meshes (body and eyes) but looks like this exporter can export only one mesh... So for now I exported without eyes.
Exporter settings:
Exporter output file: sailor.json
io_three.export.log is empty with any logging level.
I'm not sure this will solve your problem but it might atleast give you a hint of where the problem is.
I compared my converted JSON files and compared to yours, and noticed that the JSON file that you use does not specify what texture the object should use.
Add:
"mapDiffuse" : "nameoftexture.png",
to your
"materials: [{
...,
...,
...
}]"
array.
Good luck.
EDIT
Your model seems to work with textures for me when I added this line to the materials property array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With