How to set flatShading or smooth to material (load object with GLTFLoader)?

I tried with flatShading as

but didn’t see the result

gltf.scene.traverse((node) => {
if (node.isMesh) {
node.material.flatShading = true;
}
});

1 Like