sohamkamani / three-object-loader

[DEPRECATED] NodeJS wrapper for Three.js' OBJLoader function
30 stars 31 forks source link

Warning: .shading has been removed. Use the boolean .flatShading instead #20

Open tzvc opened 6 years ago

tzvc commented 6 years ago

Hi ,

I get this weird warning when I try to load an object

three.module.js?8012:45254 THREE.MeshPhongMaterial: .shading has been removed. Use the boolean .flatShading instead.

Am I doing something wrong here ?

My code

class Marker extends THREE.Object3D {
  constructor() {
    super();

    const textureLoader = new THREE.TextureLoader();
    const texture = textureLoader.load(
      "https://storage.googleapis.com/zenly-web/footsteps/FlyingSatellite.png"
    );
    // load obj model
    const loader = new OBJLoader();
    loader.load(
      "https://storage.googleapis.com/zenly-web/footsteps/FlyingSatellite.obj",
      object => {
        object.traverse(child => {
          if (child instanceof THREE.Mesh) {
            // child.material.map = texture;
            child.scale.set(0.002, 0.002, 0.002);
          }
        });
        this.add(object);
      }
    );

Thanks ! 👍

esnho commented 6 years ago

Is normal, trying to remove that annoying warning in #19 pull request. Is just a warning, you can ignore it.

santacrab commented 5 years ago

Any news on that? Still getting the Warning