Change ambient and color in mesh phong material.

I have this code.

var DefaultWallOutMaterial = new THREE.MeshPhongMaterial( { ambient: 0xffffff, color: 0xffffff  }  );

But when i do

DefaultWallOutMaterial .ambient = 0xF7DBD7;
DefaultWallOutMaterial .color= 0xF7DBD7;

The object doesn’t update the material with the new color (It appears black).

Any Help please?

Author: Fantashit

1 thought on “Change ambient and color in mesh phong material.

  1. DefaultWallOutMaterial.ambient.setHex( 0xF7DBD7 );
    DefaultWallOutMaterial.color.setHex( 0xF7DBD7 );

    Tip: You can find the type of an object by doing this console.log( DefaultWallOutMaterial.ambient ).

Comments are closed.