refactor: 重命名SDK为iflow-engine,使用npm包引入第三方引擎
- 将包名从 @fishdingding/bim-engine-sdk 改为 iflow-engine - 将构建输出文件从 bim-engine-sdk.*.js 改为 iflow-engine.*.js - 将全局变量从 LyzBimEngineSDK 改为 IflowEngine - 将第三方引擎SDK从本地引入改为npm包引入 (iflow-engine-base) - 移除本地 src/engine_base 目录,移至回收站 - 更新所有文档和demo中的引用
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
- 采用延迟初始化模式,需要用户主动调用 `init()` 方法
|
||||
|
||||
### 1.3 第三方 SDK 依赖
|
||||
- 依赖 `src/bim-engine-sdk.es.js` 中的 `createEngine` 函数
|
||||
- 依赖 `iflow-engine-base` npm 包中的 `createEngine` 函数
|
||||
- 通过依赖注入方式使用,不直接导入
|
||||
|
||||
---
|
||||
@@ -396,7 +396,7 @@ public setTheme(theme: ThemeConfig): void {
|
||||
### 9.1 基本使用(通过 EngineManager)
|
||||
|
||||
```typescript
|
||||
import { BimEngine } from 'bim-engine-sdk';
|
||||
import { BimEngine } from 'iflow-engine';
|
||||
|
||||
const engine = new BimEngine('container');
|
||||
|
||||
@@ -539,9 +539,9 @@ function updateEngineBackground(engine: any, color: number): void {
|
||||
- 不抛出未捕获的异常
|
||||
|
||||
7. **第三方 SDK 依赖**:
|
||||
- 依赖 `bim-engine-sdk.es.js` 文件
|
||||
- 通过动态导入或全局变量访问
|
||||
- 需要确保 SDK 文件已加载
|
||||
- 依赖 `iflow-engine-base` npm 包
|
||||
- 通过 npm 包导入
|
||||
- 需要确保依赖已安装
|
||||
|
||||
---
|
||||
|
||||
@@ -579,7 +579,7 @@ interface ModelLoadOptions {
|
||||
- `src/components/engine/index.ts` - 主组件类
|
||||
- `src/components/engine/types.ts` - 类型定义
|
||||
- `src/managers/engine-manager.ts` - 管理器类
|
||||
- `src/bim-engine-sdk.es.js` - 第三方 SDK(依赖)
|
||||
- `iflow-engine-base` - 第三方 SDK(npm 依赖)
|
||||
|
||||
### 12.2 依赖文件
|
||||
|
||||
|
||||
@@ -640,7 +640,7 @@ public setTheme(theme: ThemeConfig) {
|
||||
### 9.1 基本使用(通过 Manager)
|
||||
|
||||
```typescript
|
||||
import { BimEngine } from 'bim-engine-sdk';
|
||||
import { BimEngine } from 'iflow-engine';
|
||||
|
||||
const engine = new BimEngine('container');
|
||||
|
||||
|
||||
@@ -921,7 +921,7 @@ label.textContent = t(button.label);
|
||||
### 9.1 基本使用(通过 ButtonGroupManager)
|
||||
|
||||
```typescript
|
||||
import { BimEngine } from 'bim-engine-sdk';
|
||||
import { BimEngine } from 'iflow-engine';
|
||||
|
||||
const engine = new BimEngine('container');
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ new BimDescription({
|
||||
**组件内部不进行翻译**。调用者应在传入 `label` 之前使用 `t()` 函数进行翻译。
|
||||
|
||||
```typescript
|
||||
import { t } from 'bim-engine-sdk/services/locale';
|
||||
import { t } from 'iflow-engine/services/locale';
|
||||
|
||||
new BimDescription({
|
||||
// ...
|
||||
|
||||
Reference in New Issue
Block a user