|
@@ -195,6 +195,18 @@ Sidebar.Material = function ( editor ) {
|
|
|
|
|
|
container.add( materialMetalnessRow );
|
|
|
|
|
|
+ // sheen
|
|
|
+
|
|
|
+ var materialSheenRow = new UI.Row();
|
|
|
+ var materialSheenEnabled = new UI.Checkbox( false ).onChange( update );
|
|
|
+ var materialSheen = new UI.Color().setHexValue(0x000000).onChange( update );
|
|
|
+
|
|
|
+ materialSheenRow.add( new UI.Text( strings.getKey( 'sidebar/material/sheen' ) ).setWidth( '90px' ) )
|
|
|
+ materialSheenRow.add( materialSheenEnabled );
|
|
|
+ materialSheenRow.add( materialSheen );
|
|
|
+
|
|
|
+ container.add( materialSheenRow );
|
|
|
+
|
|
|
// emissive
|
|
|
|
|
|
var materialEmissiveRow = new UI.Row();
|
|
@@ -636,6 +648,22 @@ Sidebar.Material = function ( editor ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if ( material.sheen !== undefined ) {
|
|
|
+
|
|
|
+ var sheenEnabled = materialSheenEnabled.getValue() === true;
|
|
|
+
|
|
|
+ var sheen = sheenEnabled ? new THREE.Color(materialSheen.getHexValue()) : null;
|
|
|
+
|
|
|
+ editor.execute( new SetMaterialValueCommand( editor, currentObject, 'sheen', sheen, currentMaterialSlot ) );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( material.sheen !== undefined && material.sheen !== null && material.sheen.getHex() !== materialSheen.getHexValue() ) {
|
|
|
+
|
|
|
+ editor.execute( new SetMaterialColorCommand( editor, currentObject, 'sheen', materialSheen.getHexValue(), currentMaterialSlot ) );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ( material.emissive !== undefined && material.emissive.getHex() !== materialEmissive.getHexValue() ) {
|
|
|
|
|
|
editor.execute( new SetMaterialColorCommand( editor, currentObject, 'emissive', materialEmissive.getHexValue(), currentMaterialSlot ) );
|
|
@@ -1157,6 +1185,7 @@ Sidebar.Material = function ( editor ) {
|
|
|
'roughness': materialRoughnessRow,
|
|
|
'metalness': materialMetalnessRow,
|
|
|
'emissive': materialEmissiveRow,
|
|
|
+ 'sheen': materialSheenRow,
|
|
|
'specular': materialSpecularRow,
|
|
|
'shininess': materialShininessRow,
|
|
|
'clearcoat': materialClearcoatRow,
|
|
@@ -1268,6 +1297,13 @@ Sidebar.Material = function ( editor ) {
|
|
|
materialMetalness.setValue( material.metalness );
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ if ( material.sheen !== undefined && material.sheen !== null ) {
|
|
|
+
|
|
|
+ materialSheenEnabled.setValue( true );
|
|
|
+ materialSheen.setHexValue( material.sheen.getHexString() );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if ( material.emissive !== undefined ) {
|
|
|
|