Skip to content

Commit 18ae441

Browse files
authored
Docs: Add some missing options to MeshPhysicalMaterial demo. (mrdoob#26753)
* Add some missing options to `MeshPhysicalMaterial` demo * Add GUI options for some missing properties including sheen, ior, iridescence, and others to the material browser embedded on the docs pages for materials * Use real default `sheenColor in material browser * Re-disable dirlights in `MeshPhysicalMaterial` material browser * Update docs to correct the default `sheenColor` * Docs stated it was 0xfffff, but it's actually 0x000000 * Fixes mrdoob#26757 * Add back deleted comment
1 parent 30164c9 commit 18ae441

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

docs/api/ar/materials/MeshPhysicalMaterial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <h3>[property:Texture sheenRoughnessMap]</h3>
186186
</p>
187187

188188
<h3>[property:Color sheenColor]</h3>
189-
<p>لون اللمعان. الافتراضي هو `0xffffffأبيض.</p>
189+
<p>لون اللمعان. الافتراضي هو `0x000000أسود.</p>
190190

191191
<h3>[property:Texture sheenColorMap]</h3>
192192
<p>

docs/api/en/materials/MeshPhysicalMaterial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ <h3>[property:Texture sheenRoughnessMap]</h3>
227227
</p>
228228

229229
<h3>[property:Color sheenColor]</h3>
230-
<p>The sheen tint. Default is `0xffffff`, white.</p>
230+
<p>The sheen tint. Default is `0x000000`, black.</p>
231231

232232
<h3>[property:Texture sheenColorMap]</h3>
233233
<p>

docs/api/fr/materials/MeshPhysicalMaterial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h3>[property:Texture sheenRoughnessMap]</h3>
161161

162162
<h3>[property:Color sheenColor]</h3>
163163
<p>
164-
La teinte brillante. La valeur par défaut est `0xffffff`, white.
164+
La teinte brillante. La valeur par défaut est `0x000000`, noire.
165165
</p>
166166

167167
<h3>[property:Texture sheenColorMap]</h3>

docs/api/it/materials/MeshPhysicalMaterial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ <h3>[property:Texture sheenRoughnessMap]</h3>
166166

167167
<h3>[property:Color sheenColor]</h3>
168168
<p>
169-
La tinta brillante. Il valore predefinito è `0xffffff`, bianco.
169+
La tinta brillante. Il valore predefinito è `0x000000`, nera.
170170
</p>
171171

172172
<h3>[property:Texture sheenColorMap]</h3>

docs/api/zh/materials/MeshPhysicalMaterial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <h3>[property:Texture sheenRoughnessMap]</h3>
149149

150150
<h3>[property:Color sheenColor]</h3>
151151
<p>
152-
光泽颜色,默认为*0xffffff*白色
152+
光泽颜色,默认为*0x000000*黑色
153153
</p>
154154

155155
<h3>[property:Texture sheenColorMap]</h3>

docs/scenes/material-browser.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@
530530
envMaps: envMapKeysPBR[ 0 ],
531531
map: diffuseMapKeys[ 0 ],
532532
roughnessMap: roughnessMapKeys[ 0 ],
533-
alphaMap: alphaMapKeys[ 0 ]
533+
alphaMap: alphaMapKeys[ 0 ],
534+
metalnessMap: alphaMapKeys[ 0 ]
534535
};
535536

536537
const folder = gui.addFolder( 'THREE.MeshStandardMaterial' );
@@ -548,8 +549,7 @@
548549
folder.add( data, 'map', diffuseMapKeys ).onChange( updateTexture( material, 'map', diffuseMaps ) );
549550
folder.add( data, 'roughnessMap', roughnessMapKeys ).onChange( updateTexture( material, 'roughnessMap', roughnessMaps ) );
550551
folder.add( data, 'alphaMap', alphaMapKeys ).onChange( updateTexture( material, 'alphaMap', alphaMaps ) );
551-
552-
// TODO metalnessMap
552+
folder.add( data, 'metalnessMap', alphaMapKeys ).onChange( updateTexture( material, 'metalnessMap', alphaMaps ) );
553553

554554
}
555555

@@ -561,7 +561,11 @@
561561
envMaps: envMapKeys[ 0 ],
562562
map: diffuseMapKeys[ 0 ],
563563
roughnessMap: roughnessMapKeys[ 0 ],
564-
alphaMap: alphaMapKeys[ 0 ]
564+
alphaMap: alphaMapKeys[ 0 ],
565+
metalnessMap: alphaMapKeys[ 0 ],
566+
sheenColor: material.sheenColor.getHex(),
567+
specularColor: material.specularColor.getHex(),
568+
iridescenceMap: alphaMapKeys[ 0 ]
565569
};
566570

567571
const folder = gui.addFolder( 'THREE.MeshPhysicalMaterial' );
@@ -571,9 +575,17 @@
571575

572576
folder.add( material, 'roughness', 0, 1 );
573577
folder.add( material, 'metalness', 0, 1 );
578+
folder.add( material, 'ior', 1, 2.333 );
574579
folder.add( material, 'reflectivity', 0, 1 );
580+
folder.add( material, 'iridescence', 0, 1 );
581+
folder.add( material, 'iridescenceIOR', 1, 2.333 );
582+
folder.add( material, 'sheen', 0, 1 );
583+
folder.add( material, 'sheenRoughness', 0, 1 );
584+
folder.addColor( data, 'sheenColor' ).onChange( handleColorChange( material.sheenColor ) );
575585
folder.add( material, 'clearcoat', 0, 1 ).step( 0.01 );
576586
folder.add( material, 'clearcoatRoughness', 0, 1 ).step( 0.01 );
587+
folder.add( material, 'specularIntensity', 0, 1);
588+
folder.addColor( data, 'specularColor' ).onChange( handleColorChange( material.specularColor ) );
577589
folder.add( material, 'flatShading' ).onChange( needsUpdate( material, geometry ) );
578590
folder.add( material, 'wireframe' );
579591
folder.add( material, 'vertexColors' ).onChange( needsUpdate( material, geometry ) );
@@ -582,8 +594,8 @@
582594
folder.add( data, 'map', diffuseMapKeys ).onChange( updateTexture( material, 'map', diffuseMaps ) );
583595
folder.add( data, 'roughnessMap', roughnessMapKeys ).onChange( updateTexture( material, 'roughnessMap', roughnessMaps ) );
584596
folder.add( data, 'alphaMap', alphaMapKeys ).onChange( updateTexture( material, 'alphaMap', alphaMaps ) );
585-
586-
// TODO metalnessMap
597+
folder.add( data, 'metalnessMap', alphaMapKeys ).onChange( updateTexture( material, 'metalnessMap', alphaMaps ) );
598+
folder.add( data, 'iridescenceMap', alphaMapKeys ).onChange( updateTexture( material, 'iridescenceMap', alphaMaps ) );
587599

588600
}
589601

0 commit comments

Comments
 (0)