I use STLLoader.load(url), and callback function is
const loadCallback = (geo: BufferGeometry<NormalBufferAttributes>) => {
const blockMaterial = new MeshStandardMaterial();
const obj = new Mesh(geo, blockMaterial);
return obj
};
meanwhile fbx just returned what I got in FBXLoader;
This cause Texture maps are not suitable so that I couldn’t solve the problem by setRotation the mesh
correct fbx file shows
error stl file shows
and the fuction that adding texture list here. hope it helpful
const pbr = new MeshStandardMaterial({});
if (texture.pbr) {
pbr.metalnessMap = texture.pbr;
pbr.roughnessMap = texture.pbr;
} else {
pbr.metalness = 0;
pbr.roughness = 0.5;
}
if (texture.normal) {
pbr.normalMap = texture.normal;
}
pbr.map = texture.diffuse;