Skip to content

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

Open
@tzvc

Description

@tzvc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions