-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
FBXLoader doesn't load textures,
I tried swapping out the threejs lib in the node modules to an older one (a month old) and it works,
so some update happened which either broke it or changed the way it works?
Import:
import { FBXLoader } from "three/examples/jsm/loaders/FBXLoader";
Code:
loadFBXModel(path, modelFile, pos = [0, 0, 0], size = 0.1) {
const loader = new FBXLoader();
loader.setPath(path);
loader.load(modelFile, (fbx) => {
fbx.scale.setScalar(size);
fbx.traverse((c) => {
c.castShadow = true;
});
fbx.position.copy(new THREE.Vector3(...pos));
this._scene.add(fbx);
});
}
worstpractice

