From 6a2315fbff77532fe7ea2194be00f0506f1b5976 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sat, 7 Aug 2021 22:08:06 +0200 Subject: [PATCH] Show physical material properties in the sidebar. --- website/o3dv/js/detailssidebarpanel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/o3dv/js/detailssidebarpanel.js b/website/o3dv/js/detailssidebarpanel.js index 1debaef..b0da02a 100644 --- a/website/o3dv/js/detailssidebarpanel.js +++ b/website/o3dv/js/detailssidebarpanel.js @@ -71,6 +71,10 @@ OV.DetailsSidebarPanel = class extends OV.SidebarPanel this.AddProperty (table, new OV.Property (OV.PropertyType.Text, 'Source', material.isDefault ? 'Default' : 'Model')); this.AddProperty (table, new OV.Property (OV.PropertyType.Text, 'Type', typeString)); this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Color', material.color)); + if (material.type === OV.MaterialType.Physical) { + this.AddProperty (table, new OV.Property (OV.PropertyType.Percent, 'Metalness', material.metalness)); + this.AddProperty (table, new OV.Property (OV.PropertyType.Percent, 'Roughness', material.roughness)); + } this.AddProperty (table, new OV.Property (OV.PropertyType.Percent, 'Opacity', material.opacity)); AddTextureMap (this, table, 'Diffuse Map', material.diffuseMap); AddTextureMap (this, table, 'Specular Map', material.specularMap);