I'm currently utilizing the Blender plugin to export JSON files, but I've encountered an issue where the texture of my object is not being exported.
The materials section within the JSON file appears as follows:
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "new",
"blending" : "NormalBlending",
"colorAmbient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorEmissive" : [0.1, 0.1, 0.1],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
Additionally, the JavaScript segment is as follows:
var loader = new THREE.JSONLoader();
loader.load( "./try.js", function(geometry,materials) {
material = new THREE.MeshFaceMaterial( materials );
object = new THREE.Mesh(geometry,material);
object.scale.set(0.5,0.5,0.5);
object.position.x=0;
object.position.y=0;
object.position.z=0;
});
loader.onLoadComplete=function(){ //render
}
To create the object, I referenced a tutorial on https://www.youtube.com/watch?v=cUkNOF8eORA. While the method isn't exactly how I would do it myself, it provided a similar starting point for me.