feat: upgrade iflow-engine-base to v1.0.5, add pause/resume rendering API
- Update iflow-engine-base from 1.0.1 to 1.0.5 - Change default engine version from v1 to v2 - Add pauseRendering() and resumeRendering() methods - Add switch model feature in demos - Update model URLs in demos - Add new documentation files
This commit is contained in:
@@ -59,7 +59,7 @@ export class Engine implements IBimComponent {
|
||||
// 保存配置选项(设置默认值)
|
||||
this.options = {
|
||||
backgroundColor: 'linear-gradient(to bottom, rgb(214, 224, 235), rgb(246, 250, 255))', // 固定背景渐变色
|
||||
version: options.version ?? 'v1', // 默认使用 v1 版本
|
||||
version: options.version ?? 'v2', // 默认使用 v2 版本
|
||||
showStats: options.showStats ?? false, // 默认不显示统计
|
||||
showViewCube: options.showViewCube ?? true, // 默认显示视图立方体
|
||||
};
|
||||
@@ -179,6 +179,28 @@ export class Engine implements IBimComponent {
|
||||
return this.engine;
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停渲染
|
||||
*/
|
||||
public pauseRendering(): void {
|
||||
if (!this._isInitialized || !this.engine) {
|
||||
console.warn('[Engine] Engine not initialized.');
|
||||
return;
|
||||
}
|
||||
this.engine.pauseRendering();
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复渲染
|
||||
*/
|
||||
public resumeRendering(): void {
|
||||
if (!this._isInitialized || !this.engine) {
|
||||
console.warn('[Engine] Engine not initialized.');
|
||||
return;
|
||||
}
|
||||
this.engine.resumeRendering();
|
||||
}
|
||||
|
||||
// ==================== 测量功能方法 ====================
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user