Skip to content

Commit

Permalink
remove material.ambient from everything per discussion here: mrdoob/t…
Browse files Browse the repository at this point in the history
  • Loading branch information
bhouston committed Dec 23, 2014
1 parent b2d1201 commit b80e848
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions AssimpJSONLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@ THREE.AssimpJSONLoader.prototype = {
else if(prop.key === '$clr.specular') {
init_props.specular = toColor(prop.value);
}
else if(prop.key === '$clr.ambient') {
init_props.ambient = toColor(prop.value);
}
else if(prop.key === '$clr.emissive') {
init_props.emissive = toColor(prop.value);
}
Expand All @@ -281,10 +278,6 @@ THREE.AssimpJSONLoader.prototype = {
}
}

if(!init_props.ambient) {
init_props.ambient = init_props.color;
}

// note: three.js does not like it when a texture is added after the geometry
// has been rendered once, see http://stackoverflow.com/questions/16531759/.
// for this reason we fill all slots upfront with default textures
Expand Down
1 change: 0 additions & 1 deletion BabylonLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ THREE.BabylonLoader.prototype = {

var material = new THREE.MeshPhongMaterial();
material.name = data.name;
material.ambient.fromArray( data.ambient );
material.color.fromArray( data.diffuse );
material.emissive.fromArray( data.emissive );
material.specular.fromArray( data.specular );
Expand Down
1 change: 0 additions & 1 deletion ColladaLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3576,7 +3576,6 @@ THREE.ColladaLoader = function () {

switch ( child.nodeName ) {

case 'ambient':
case 'emission':
case 'diffuse':
case 'specular':
Expand Down
3 changes: 0 additions & 3 deletions MTLLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ THREE.MTLLoader.MaterialCreator.prototype = {

// Ambient color (color under shadow) using RGB values

params[ 'ambient' ] = new THREE.Color().fromArray( value );

break;

case 'ks':
Expand Down Expand Up @@ -350,7 +348,6 @@ THREE.MTLLoader.MaterialCreator.prototype = {

if ( params[ 'diffuse' ] ) {

if ( !params[ 'ambient' ]) params[ 'ambient' ] = params[ 'diffuse' ];
params[ 'color' ] = params[ 'diffuse' ];

}
Expand Down
5 changes: 0 additions & 5 deletions gltf/glTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,11 +785,6 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
params.shininess = shininess;
}

if (!(values.ambient === undefined) && !(typeof(values.ambient) == 'string'))
{
params.ambient = RgbArraytoHex(values.ambient);
}

if (!(values.emission === undefined))
{
params.emissive = RgbArraytoHex(values.emission);
Expand Down

0 comments on commit b80e848

Please sign in to comment.