Skip to content

Commit

Permalink
MeshPhysicalMaterial: Renamed clearCoat* to clearcoat*.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Aug 21, 2019
1 parent 786e015 commit b75dd04
Show file tree
Hide file tree
Showing 34 changed files with 224 additions and 224 deletions.
8 changes: 4 additions & 4 deletions docs/api/en/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ <h3>[name]( [param:Object parameters] )</h3>
<h2>Properties</h2>
<p>See the base [page:Material] and [page:MeshStandardMaterial] classes for common properties.</p>

<h3>[property:Float clearCoat]</h3>
<h3>[property:Float clearcoat]</h3>
<p>
ClearCoat level, from *0.0* to *1.0*. Default is *0.0*.
Clearcoat level, from *0.0* to *1.0*. Default is *0.0*.
</p>

<h3>[property:Float clearCoatRoughness]</h3>
<p>How rough the clearCoat appears, from *0.0* to *1.0*. Default is *0.0*.</p>
<h3>[property:Float clearcoatRoughness]</h3>
<p>How rough the clearcoat appears, from *0.0* to *1.0*. Default is *0.0*.</p>

<h3>[property:Boolean isMeshPhysicalMaterial]</h3>
<p>
Expand Down
8 changes: 4 additions & 4 deletions docs/api/zh/materials/MeshPhysicalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ <h3>[name]( [param:Object parameters] )</h3>
<h2>属性(Properties)</h2>
<p>共有属性请参见其基类[page:Material]。</p>

<h3>[property:Float clearCoat]</h3>
<h3>[property:Float clearcoat]</h3>
<p>
ClearCoat级别,从*0.0*到*1.0*。默认值为*0.0*。
Clearcoat级别,从*0.0*到*1.0*。默认值为*0.0*。
</p>

<h3>[property:Float clearCoatRoughness]</h3>
<p> clearCoat看起来的粗糙程度,从*0.0*到*1.0*。默认值为*0.0*。</p>
<h3>[property:Float clearcoatRoughness]</h3>
<p> clearcoat看起来的粗糙程度,从*0.0*到*1.0*。默认值为*0.0*。</p>

<h3>[property:Boolean isMeshPhysicalMaterial]</h3>
<p> 用于检查此类或派生类是否为Lambert网格材质。默认值为 *true*。<br /><br />
Expand Down
4 changes: 2 additions & 2 deletions docs/scenes/material-browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@
folder.add( material, 'roughness', 0, 1 );
folder.add( material, 'metalness', 0, 1 );
folder.add( material, 'reflectivity', 0, 1 );
folder.add( material, 'clearCoat', 0, 1 ).step( 0.01 );
folder.add( material, 'clearCoatRoughness', 0, 1 ).step( 0.01 );
folder.add( material, 'clearcoat', 0, 1 ).step( 0.01 );
folder.add( material, 'clearcoatRoughness', 0, 1 ).step( 0.01 );
folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
folder.add( material, 'wireframe' );
folder.add( material, 'wireframeLinewidth', 0, 10 );
Expand Down
100 changes: 50 additions & 50 deletions editor/js/Sidebar.Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,25 @@ Sidebar.Material = function ( editor ) {

container.add( materialShininessRow );

// clearCoat
// clearcoat

var materialClearCoatRow = new UI.Row();
var materialClearCoat = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
var materialClearcoatRow = new UI.Row();
var materialClearcoat = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );

materialClearCoatRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoat' ) ).setWidth( '90px' ) );
materialClearCoatRow.add( materialClearCoat );
materialClearcoatRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoat' ) ).setWidth( '90px' ) );
materialClearcoatRow.add( materialClearcoat );

container.add( materialClearCoatRow );
container.add( materialClearcoatRow );

// clearCoatRoughness
// clearcoatRoughness

var materialClearCoatRoughnessRow = new UI.Row();
var materialClearCoatRoughness = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
var materialClearcoatRoughnessRow = new UI.Row();
var materialClearcoatRoughness = new UI.Number( 1 ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );

materialClearCoatRoughnessRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatroughness' ) ).setWidth( '90px' ) );
materialClearCoatRoughnessRow.add( materialClearCoatRoughness );
materialClearcoatRoughnessRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatroughness' ) ).setWidth( '90px' ) );
materialClearcoatRoughnessRow.add( materialClearcoatRoughness );

container.add( materialClearCoatRoughnessRow );
container.add( materialClearcoatRoughnessRow );

// vertex colors

Expand Down Expand Up @@ -353,19 +353,19 @@ Sidebar.Material = function ( editor ) {

// clearcoat normal map

var materialClearCoatNormalMapRow = new UI.Row();
var materialClearCoatNormalMapEnabled = new UI.Checkbox( false ).onChange( update );
var materialClearCoatNormalMap = new UI.Texture().onChange( update );
var materialClearCoatNormalScaleX = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
var materialClearCoatNormalScaleY = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
var materialClearcoatNormalMapRow = new UI.Row();
var materialClearcoatNormalMapEnabled = new UI.Checkbox( false ).onChange( update );
var materialClearcoatNormalMap = new UI.Texture().onChange( update );
var materialClearcoatNormalScaleX = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );
var materialClearcoatNormalScaleY = new UI.Number( 1 ).setWidth( '30px' ).onChange( update );

materialClearCoatNormalMapRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatnormalmap' ) ).setWidth( '90px' ) );
materialClearCoatNormalMapRow.add( materialClearCoatNormalMapEnabled );
materialClearCoatNormalMapRow.add( materialClearCoatNormalMap );
materialClearCoatNormalMapRow.add( materialClearCoatNormalScaleX );
materialClearCoatNormalMapRow.add( materialClearCoatNormalScaleY );
materialClearcoatNormalMapRow.add( new UI.Text( strings.getKey( 'sidebar/material/clearcoatnormalmap' ) ).setWidth( '90px' ) );
materialClearcoatNormalMapRow.add( materialClearcoatNormalMapEnabled );
materialClearcoatNormalMapRow.add( materialClearcoatNormalMap );
materialClearcoatNormalMapRow.add( materialClearcoatNormalScaleX );
materialClearcoatNormalMapRow.add( materialClearcoatNormalScaleY );

container.add( materialClearCoatNormalMapRow );
container.add( materialClearcoatNormalMapRow );

// displacement map

Expand Down Expand Up @@ -654,15 +654,15 @@ Sidebar.Material = function ( editor ) {

}

if ( material.clearCoat !== undefined && Math.abs( material.clearCoat - materialClearCoat.getValue() ) >= 0.01 ) {
if ( material.clearcoat !== undefined && Math.abs( material.clearcoat - materialClearcoat.getValue() ) >= 0.01 ) {

editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearCoat', materialClearCoat.getValue(), currentMaterialSlot ) );
editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearcoat', materialClearcoat.getValue(), currentMaterialSlot ) );

}

if ( material.clearCoatRoughness !== undefined && Math.abs( material.clearCoatRoughness - materialClearCoatRoughness.getValue() ) >= 0.01 ) {
if ( material.clearcoatRoughness !== undefined && Math.abs( material.clearcoatRoughness - materialClearcoatRoughness.getValue() ) >= 0.01 ) {

editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearCoatRoughness', materialClearCoatRoughness.getValue(), currentMaterialSlot ) );
editor.execute( new SetMaterialValueCommand( editor, currentObject, 'clearcoatRoughness', materialClearcoatRoughness.getValue(), currentMaterialSlot ) );

}

Expand Down Expand Up @@ -817,34 +817,34 @@ Sidebar.Material = function ( editor ) {

}

if ( material.clearCoatNormalMap !== undefined ) {
if ( material.clearcoatNormalMap !== undefined ) {

var clearCoatNormalMapEnabled = materialClearCoatNormalMapEnabled.getValue() === true;
var clearcoatNormalMapEnabled = materialClearcoatNormalMapEnabled.getValue() === true;

if ( objectHasUvs ) {

var clearCoatNormalMap = clearCoatNormalMapEnabled ? materialClearCoatNormalMap.getValue() : null;
var clearcoatNormalMap = clearcoatNormalMapEnabled ? materialClearcoatNormalMap.getValue() : null;

if ( material.clearCoatNormalMap !== clearCoatNormalMap ) {
if ( material.clearcoatNormalMap !== clearcoatNormalMap ) {

editor.execute( new SetMaterialMapCommand( editor, currentObject, 'clearCoatNormalMap', clearCoatNormalMap, currentMaterialSlot ) );
editor.execute( new SetMaterialMapCommand( editor, currentObject, 'clearcoatNormalMap', clearcoatNormalMap, currentMaterialSlot ) );

}

if ( material.clearCoatNormalScale.x !== materialClearCoatNormalScaleX.getValue() ||
material.clearCoatNormalScale.y !== materialClearCoatNormalScaleY.getValue() ) {
if ( material.clearcoatNormalScale.x !== materialClearcoatNormalScaleX.getValue() ||
material.clearcoatNormalScale.y !== materialClearcoatNormalScaleY.getValue() ) {

var value = [
materialClearCoatNormalScaleX.getValue(),
materialClearCoatNormalScaleY.getValue()
materialClearcoatNormalScaleX.getValue(),
materialClearcoatNormalScaleY.getValue()
];
editor.execute( new SetMaterialVectorCommand( editor, currentObject, 'clearCoatNormalScale', value, currentMaterialSlot ) );
editor.execute( new SetMaterialVectorCommand( editor, currentObject, 'clearcoatNormalScale', value, currentMaterialSlot ) );

}

} else {

if ( clearCoatNormalMapEnabled ) textureWarning = true;
if ( clearcoatNormalMapEnabled ) textureWarning = true;

}

Expand Down Expand Up @@ -1159,8 +1159,8 @@ Sidebar.Material = function ( editor ) {
'emissive': materialEmissiveRow,
'specular': materialSpecularRow,
'shininess': materialShininessRow,
'clearCoat': materialClearCoatRow,
'clearCoatRoughness': materialClearCoatRoughnessRow,
'clearcoat': materialClearcoatRow,
'clearcoatRoughness': materialClearcoatRoughnessRow,
'vertexShader': materialProgramRow,
'vertexColors': materialVertexColorsRow,
'depthPacking': materialDepthPackingRow,
Expand Down Expand Up @@ -1287,15 +1287,15 @@ Sidebar.Material = function ( editor ) {

}

if ( material.clearCoat !== undefined ) {
if ( material.clearcoat !== undefined ) {

materialClearCoat.setValue( material.clearCoat );
materialClearcoat.setValue( material.clearcoat );

}

if ( material.clearCoatRoughness !== undefined ) {
if ( material.clearcoatRoughness !== undefined ) {

materialClearCoatRoughness.setValue( material.clearCoatRoughness );
materialClearcoatRoughness.setValue( material.clearcoatRoughness );

}

Expand Down Expand Up @@ -1382,18 +1382,18 @@ Sidebar.Material = function ( editor ) {

}

if ( material.clearCoatNormalMap !== undefined ) {
if ( material.clearcoatNormalMap !== undefined ) {

materialClearCoatNormalMapEnabled.setValue( material.clearCoatNormalMap !== null );
materialClearcoatNormalMapEnabled.setValue( material.clearcoatNormalMap !== null );

if ( material.clearCoatNormalMap !== null || resetTextureSelectors ) {
if ( material.clearcoatNormalMap !== null || resetTextureSelectors ) {

materialClearCoatNormalMap.setValue( material.clearCoatNormalMap );
materialClearcoatNormalMap.setValue( material.clearcoatNormalMap );

}

materialClearCoatNormalScaleX.setValue( material.clearCoatNormalScale.x );
materialClearCoatNormalScaleY.setValue( material.clearCoatNormalScale.y );
materialClearcoatNormalScaleX.setValue( material.clearcoatNormalScale.x );
materialClearcoatNormalScaleY.setValue( material.clearcoatNormalScale.y );

}

Expand Down
8 changes: 4 additions & 4 deletions editor/js/Strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ var Strings = function ( config ) {
'sidebar/material/emissive': 'Emissive',
'sidebar/material/specular': 'Specular',
'sidebar/material/shininess': 'Shininess',
'sidebar/material/clearcoat': 'ClearCoat',
'sidebar/material/clearcoatroughness': 'ClearCoat Roughness',
'sidebar/material/clearcoat': 'Clearcoat',
'sidebar/material/clearcoatroughness': 'Clearcoat Roughness',
'sidebar/material/vertexcolors': 'Vertex Colors',
'sidebar/material/vertexcolors/no': 'No',
'sidebar/material/vertexcolors/face': 'Face',
Expand All @@ -236,7 +236,7 @@ var Strings = function ( config ) {
'sidebar/material/alphamap': 'Alpha Map',
'sidebar/material/bumpmap': 'Bump Map',
'sidebar/material/normalmap': 'Normal Map',
'sidebar/material/clearcoatnormalmap': 'ClearCoat Normal Map',
'sidebar/material/clearcoatnormalmap': 'Clearcoat Normal Map',
'sidebar/material/displacemap': 'Displace Map',
'sidebar/material/roughmap': 'Rough. Map',
'sidebar/material/metalmap': 'Metal. Map',
Expand Down Expand Up @@ -508,7 +508,7 @@ var Strings = function ( config ) {
'sidebar/material/alphamap': '透明贴图',
'sidebar/material/bumpmap': '凹凸贴图',
'sidebar/material/normalmap': '法线贴图',
'sidebar/material/clearcoatnormalmap': 'ClearCoat Normal Map',
'sidebar/material/clearcoatnormalmap': 'Clearcoat Normal Map',
'sidebar/material/displacemap': '置换贴图',
'sidebar/material/roughmap': '粗糙贴图',
'sidebar/material/metalmap': '金属贴图',
Expand Down
4 changes: 2 additions & 2 deletions examples/js/loaders/LWOLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2593,11 +2593,11 @@ MaterialParser.prototype = {

if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) {

params.clearCoat = attributes.Clearcoat.value;
params.clearcoat = attributes.Clearcoat.value;

if ( attributes[ 'Clearcoat Gloss' ] ) {

params.clearCoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );
params.clearcoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/js/shaders/TranslucentShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ THREE.TranslucentShader = {
" #if defined( RE_IndirectSpecular )",

" vec3 radiance = vec3( 0.0 );",
" vec3 clearCoatRadiance = vec3( 0.0 );",
" vec3 clearcoatRadiance = vec3( 0.0 );",

" #endif",
THREE.ShaderChunk[ "lights_fragment_end" ],
Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/loaders/LWOLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2622,11 +2622,11 @@ MaterialParser.prototype = {

if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) {

params.clearCoat = attributes.Clearcoat.value;
params.clearcoat = attributes.Clearcoat.value;

if ( attributes[ 'Clearcoat Gloss' ] ) {

params.clearCoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );
params.clearcoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value );

}

Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/loaders/sea3d/SEA3DLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2715,8 +2715,8 @@ SEA3D.prototype.materialTechnique =
techniques[ SEA3DSDK.Material.CLEAR_COAT ] =
function ( mat, tech ) {

mat.clearCoat = tech.strength;
mat.clearCoatRoughness = tech.roughness;
mat.clearcoat = tech.strength;
mat.clearcoatRoughness = tech.roughness;

};

Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/nodes/bsdfs/BlinnShininessExponentNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ BlinnShininessExponentNode.prototype.nodeType = "BlinnShininessExponent";

BlinnShininessExponentNode.prototype.generate = function ( builder, output ) {

if ( builder.isCache( 'clearCoat' ) ) {
if ( builder.isCache( 'clearcoat' ) ) {

return builder.format( 'Material_ClearCoat_BlinnShininessExponent( material )', this.type, output );
return builder.format( 'Material_Clearcoat_BlinnShininessExponent( material )', this.type, output );

} else {

Expand Down
6 changes: 3 additions & 3 deletions examples/jsm/nodes/materials/StandardNodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ NodeUtils.addShortcuts( StandardNodeMaterial.prototype, 'fragment', [
'roughness',
'metalness',
'reflectivity',
'clearCoat',
'clearCoatRoughness',
'clearCoatNormal',
'clearcoat',
'clearcoatRoughness',
'clearcoatNormal',
'normal',
'emissive',
'ambient',
Expand Down
Loading

0 comments on commit b75dd04

Please sign in to comment.