提交 bccaa60f 编写于 作者: M Mr.doob

MeshPhongMaterial: Removed metal property. Now that we have MeshPhysicalMaterial...

上级 65174476
......@@ -70,13 +70,6 @@
<h3>[property:Float shininess]</h3>
<div>How shiny the specular highlight is; a higher value gives a sharper highlight. Default is *30*.</div>
<h3>[property:boolean metal]</h3>
<div>
If set to true the shader multiplies the specular highlight by the underlying color of the object, making
it appear to be more metal-like and darker. If set to false the specular highlight is added ontop of the
underlying colors.
</div>
<h3>[property:Texture map]</h3>
<div>Set color texture map. Default is null. The texture map color is modulated by the diffuse color.</div>
......
......@@ -348,10 +348,22 @@ Object.defineProperties( THREE, {
}
} );
Object.defineProperties( THREE.MeshPhongMaterial.prototype, {
metal: {
get: function () {
console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshPhysicalMaterial instead.' );
return false;
},
set: function ( value ) {
console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshPhysicalMaterial instead' );
}
}
} );
Object.defineProperties( THREE.ShaderMaterial.prototype, {
derivatives: {
get: function () {
console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
return this.extensions.derivatives;
},
set: function ( value ) {
......
......@@ -67,8 +67,6 @@ THREE.MeshPhongMaterial = function ( parameters ) {
this.specular = new THREE.Color( 0x111111 );
this.shininess = 30;
this.metal = false;
this.map = null;
this.lightMap = null;
......@@ -129,8 +127,6 @@ THREE.MeshPhongMaterial.prototype.copy = function ( source ) {
this.specular.copy( source.specular );
this.shininess = source.shininess;
this.metal = source.metal;
this.map = source.map;
this.lightMap = source.lightMap;
......
......@@ -395,15 +395,7 @@ THREE.ShaderLib = {
"reflectedLight.directDiffuse *= shadowMask;",
"reflectedLight.directSpecular *= shadowMask;",
"#ifdef METAL",
" vec3 outgoingLight = ( reflectedLight.directDiffuse + reflectedLight.indirectDiffuse ) * specular + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;",
"#else",
" vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;",
"#endif",
"vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;",
THREE.ShaderChunk[ "envmap_fragment" ],
THREE.ShaderChunk[ "linear_to_gamma_fragment" ],
......
......@@ -391,7 +391,6 @@ THREE.WebGLProgram = ( function () {
parameters.flatShading ? '#define FLAT_SHADED' : '',
parameters.metal ? '#define METAL' : '',
parameters.doubleSided ? '#define DOUBLE_SIDED' : '',
parameters.flipSided ? '#define FLIP_SIDED' : '',
......
......@@ -23,7 +23,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
"maxBones", "useVertexTexture", "morphTargets", "morphNormals",
"maxMorphTargets", "maxMorphNormals", "maxDirLights", "maxPointLights",
"maxSpotLights", "maxHemiLights", "maxShadows", "shadowMapEnabled", "pointLightShadows",
"shadowMapType", "shadowMapDebug", "alphaTest", "metal", "doubleSided",
"shadowMapType", "shadowMapDebug", "alphaTest", "doubleSided",
"flipSided"
];
......@@ -144,7 +144,6 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
shadowMapDebug: renderer.shadowMap.debug,
alphaTest: material.alphaTest,
metal: material.metal,
doubleSided: material.side === THREE.DoubleSide,
flipSided: material.side === THREE.BackSide
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册