three-object-loader icon indicating copy to clipboard operation
three-object-loader copied to clipboard

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

Open tzvc opened this issue 7 years ago • 2 comments

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 ! 👍

tzvc avatar Jun 18 '18 12:06 tzvc

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

esnho avatar Jun 19 '18 09:06 esnho

Any news on that? Still getting the Warning

santacrab avatar Apr 26 '19 13:04 santacrab