From 1d06bc0bce5c7dc89c429b5774054a80ab336a7b Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sun, 7 Nov 2021 11:31:06 +0100 Subject: [PATCH] Show ambient and specular color. --- website/o3dv/js/sidebarpanels.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/o3dv/js/sidebarpanels.js b/website/o3dv/js/sidebarpanels.js index 89e715d..a9a3a00 100644 --- a/website/o3dv/js/sidebarpanels.js +++ b/website/o3dv/js/sidebarpanels.js @@ -108,7 +108,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) { + if (material.type === OV.MaterialType.Phong) { + this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Ambient', material.ambient)); + this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Specular', material.specular)); + } else 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)); }