Skip to content

Commit

Permalink
feat: Set log level of FragmentIfcLoader (#273)
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael Stärk <rst@icomedias.com>
  • Loading branch information
cytostatic and Raphael Stärk authored Jan 26, 2024
1 parent 8b879d6 commit d7b5817
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fragments/FragmentIfcLoader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export * from "./src/types";

export interface FragmentIfcLoaderConfig {
autoSetWasm: boolean;
logLevel?: WEBIFC.LogLevel;
}

/**
Expand All @@ -43,6 +44,7 @@ export class FragmentIfcLoader

config: Required<FragmentIfcLoaderConfig> = {
autoSetWasm: true,
logLevel: WEBIFC.LogLevel.LOG_LEVEL_ERROR,
};

readonly onSetup = new Event<FragmentIfcLoader>();
Expand Down Expand Up @@ -214,6 +216,7 @@ export class FragmentIfcLoader
const { path, absolute } = this.settings.wasm;
this._webIfc.SetWasmPath(path, absolute);
await this._webIfc.Init();
this._webIfc.SetLogLevel(this.config.logLevel);
return this._webIfc.OpenModel(data, this.settings.webIfc);
}

Expand Down

0 comments on commit d7b5817

Please sign in to comment.