Skip to content

Commit

Permalink
Show material type in sidebar.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Jul 21, 2021
1 parent e49bd60 commit 1c2dab2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions website/o3dv/detailssidebarpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ OV.DetailsSidebarPanel = class extends OV.SidebarPanel

this.Clear ();
let table = $('<div>').addClass ('ov_property_table').appendTo (this.contentDiv);
let typeString = null;
if (material.type === OV.MaterialType.Phong) {
typeString = 'Phong';
} else if (material.type === OV.MaterialType.Physical) {
typeString = 'Physical';
}
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));
this.AddProperty (table, new OV.Property (OV.PropertyType.Percent, 'Opacity', material.opacity));
AddTextureMap (this, table, 'Diffuse Map', material.diffuseMap);
Expand Down

0 comments on commit 1c2dab2

Please sign in to comment.