Replace tabs with spaces.

This commit is contained in:
kovacsv 2022-05-10 08:04:37 +02:00
parent 4ee1a5734e
commit 5dcedf559f

View File

@ -29,11 +29,11 @@ export class ImporterIfc extends ImporterBase
return Direction.Y; return Direction.Y;
} }
ClearContent () ClearContent ()
{ {
this.materialNameToIndex = null; this.materialNameToIndex = null;
this.expressIDToMesh = null; this.expressIDToMesh = null;
} }
ResetContent () ResetContent ()
{ {
@ -43,8 +43,8 @@ export class ImporterIfc extends ImporterBase
ImportContent (fileContent, onFinish) ImportContent (fileContent, onFinish)
{ {
if (this.ifc === null) { if (this.ifc === null) {
LoadExternalLibrary ('loaders/web-ifc-api-browser.js').then (() => { LoadExternalLibrary ('loaders/web-ifc-api-browser.js').then (() => {
this.ifc = new WebIFC.IfcAPI (); this.ifc = new WebIFC.IfcAPI ();
this.ifc.Init ().then (() => { this.ifc.Init ().then (() => {
this.ImportIfcContent (fileContent); this.ImportIfcContent (fileContent);
@ -54,16 +54,16 @@ export class ImporterIfc extends ImporterBase
this.SetError ('Failed to load web-ifc.'); this.SetError ('Failed to load web-ifc.');
onFinish (); onFinish ();
}); });
} else { } else {
this.ImportIfcContent (fileContent); this.ImportIfcContent (fileContent);
onFinish (); onFinish ();
} }
} }
ImportIfcContent (fileContent) ImportIfcContent (fileContent)
{ {
const fileBuffer = new Uint8Array (fileContent); const fileBuffer = new Uint8Array (fileContent);
const modelID = this.ifc.OpenModel (fileBuffer, { const modelID = this.ifc.OpenModel (fileBuffer, {
COORDINATE_TO_ORIGIN : true COORDINATE_TO_ORIGIN : true
}); });
const ifcMeshes = this.ifc.LoadAllGeometry (modelID); const ifcMeshes = this.ifc.LoadAllGeometry (modelID);
@ -75,7 +75,7 @@ export class ImporterIfc extends ImporterBase
} }
this.ImportProperties (modelID); this.ImportProperties (modelID);
this.ifc.CloseModel (modelID); this.ifc.CloseModel (modelID);
} }
ImportIfcMesh (modelID, ifcMesh) ImportIfcMesh (modelID, ifcMesh)
{ {
@ -219,9 +219,9 @@ export class ImporterIfc extends ImporterBase
if (this.materialNameToIndex.has (materialName)) { if (this.materialNameToIndex.has (materialName)) {
return this.materialNameToIndex.get (materialName); return this.materialNameToIndex.get (materialName);
} else { } else {
let material = new PhongMaterial (); let material = new PhongMaterial ();
material.name = materialName; material.name = materialName;
material.color = color; material.color = color;
material.opacity = ifcColor.w; material.opacity = ifcColor.w;
UpdateMaterialTransparency (material); UpdateMaterialTransparency (material);
let materialIndex = this.model.AddMaterial (material); let materialIndex = this.model.AddMaterial (material);