I am encountering issues while exporting individual pieces from a larger model in Blender. Some objects are throwing errors and failing to load. Here is the specific error message:
Uncaught TypeError: Cannot read property 'attributes' of undefined
Uncaught TypeError: Cannot read property 'transparent' of undefined
One of the JSON files from Blender that is causing trouble can be found here:
The JSON file passes linting tests, and other objects from the same model load without any issue. It's puzzling why this particular one isn't working.
Below is the code snippet I am using to load the JSON:
App.JsonLoader.load(mesh, function (geometry, materials) {
var componentMesh = new THREE.Mesh(geometry, new THREE.MeshFaceMaterial(materials));
componentMesh.scale.set(50, 50, 50);
componentMesh.position.y = 50;
componentMesh.position.x = 0;
App.vehicle.object3d.add(componentMesh);
});