diff --git a/website/o3dv/js/sidebardetailspanel.js b/website/o3dv/js/sidebardetailspanel.js index b02a252..e9b5216 100644 --- a/website/o3dv/js/sidebardetailspanel.js +++ b/website/o3dv/js/sidebardetailspanel.js @@ -78,12 +78,15 @@ OV.SidebarDetailsPanel = 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.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)); + if (material.vertexColors) { + this.AddProperty (table, new OV.Property (OV.PropertyType.Text, 'Color', 'Vertex colors')); + } else { + this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Color', material.color)); + 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)); + } } - this.AddProperty (table, new OV.Property (OV.PropertyType.Boolean, 'Vertex Colors', material.vertexColors)); 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));