Skip to content

Update broke fbx loader, doesn't load textures #22285

@Heaust-ops

Description

@Heaust-ops

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);
    });
  }

how it is with older version:
image

how it is in the current version:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions