Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tzvc opened this issue Jun 18, 2018 · 2 comments
Open

Comments

@tzvc
Copy link

tzvc commented Jun 18, 2018

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
Copy link

esnho commented Jun 19, 2018

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

@santacrab
Copy link

Any news on that? Still getting the Warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants