Update importerbim.js with default color (#414)
* Update importerbim.js with default color # Update if the color is undefined use the default color instead. * Update `defaultMaterialIndex` to null
This commit is contained in:
parent
1b199dffe0
commit
8ebcba7591
@ -72,12 +72,16 @@ export class ImporterBim extends ImporterBase
|
||||
|
||||
ImportElement (bimElement)
|
||||
{
|
||||
let defaultMaterialIndex = this.colorToMaterial.GetMaterialIndex (
|
||||
bimElement.color.r,
|
||||
bimElement.color.g,
|
||||
bimElement.color.b,
|
||||
bimElement.color.a
|
||||
);
|
||||
let defaultMaterialIndex = null;
|
||||
if (bimElement.color)
|
||||
{
|
||||
defaultMaterialIndex = this.colorToMaterial.GetMaterialIndex (
|
||||
bimElement.color.r,
|
||||
bimElement.color.g,
|
||||
bimElement.color.b,
|
||||
bimElement.color.a
|
||||
);
|
||||
}
|
||||
|
||||
let rootNode = this.model.GetRootNode ();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user