I'm trying to load the scene from Blender, using ObjectLoader. The scene is loaded, but with no material colors.
Here are my blender exporter settings:
JSON: https://jsonblob.com/9e58bd8a-46ff-11e7-ae4c-0f21997a0996
And this is how I add the model to three.js scene:
const objectLoader = new THREE.ObjectLoader();
objectLoader.load('/static/models/lighthouse.json', (group) => {
scene.add(group);
});
I might have missed something. Any help would be appreciated.
ObjectLoader.parse
. Put a breakpoint on the line wherematerials
is assigned, and ensure it actually contains data whenparseMaterials
returns. If it doesn't, open your JSON file and ensure it actually created amaterials
section (it would be a root-level object, likejson.geometries
). – TheJim01