Describe the bug
When I use OBJModel.js to load a .obj file, the loaded model's meshes property hasn't any content.
To Reproduce
Look like this code:
model.on("loaded", () => {
for (let id in model.meshes) {
console.info(id);
}
});
Repair Method
I review the source code and discovered the 972 line in createMeshes function in OBJModel.js file。
var mesh = new xeogl.Mesh(model, {
id: model.id + "#" + object.id,
geometry: xeoGeometry,
material: material,
pickable: true
});
model.addChild(mesh);
The code just add mesh into model's children property, but not call Component._addComponent to add to compnents array, so the meshes property can't get anything.
I modify this code to
Describe the bug When I use OBJModel.js to load a .obj file, the loaded model's meshes property hasn't any content.
To Reproduce Look like this code:
Repair Method I review the source code and discovered the 972 line in createMeshes function in OBJModel.js file。
The code just add mesh into model's children property, but not call Component._addComponent to add to compnents array, so the meshes property can't get anything. I modify this code to
Then the model.meshes can get meshes.