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:
@@ -1,6 +1,6 @@
|
||||
# BIM Engine SDK Vue3 Demo
|
||||
# iFlow Engine Vue3 Demo
|
||||
|
||||
这是一个使用 Vue3 + TypeScript 的演示项目,用于验证 BIM Engine SDK 在 Vue 环境下的兼容性。
|
||||
这是一个使用 Vue3 + TypeScript 的演示项目,用于验证 iFlow Engine 在 Vue 环境下的兼容性。
|
||||
|
||||
## 前置要求
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
或者手动复制:
|
||||
```bash
|
||||
mkdir -p public/lib
|
||||
cp ../dist/bim-engine-sdk.umd.js public/lib/
|
||||
cp ../dist/bim-engine-sdk.umd.js.map public/lib/
|
||||
cp ../dist/iflow-engine.umd.js public/lib/
|
||||
cp ../dist/iflow-engine.umd.js.map public/lib/
|
||||
```
|
||||
|
||||
## 运行
|
||||
@@ -61,7 +61,7 @@ demo-vue/
|
||||
│ └── vite-env.d.ts # TypeScript 类型声明
|
||||
├── public/
|
||||
│ ├── lib/ # SDK 文件目录
|
||||
│ │ └── bim-engine-sdk.umd.js
|
||||
│ │ └── iflow-engine.umd.js
|
||||
│ └── model/ # 3D 模型文件
|
||||
│ └── gujianzhu.glb
|
||||
├── index.html # HTML 入口
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>BIM Engine SDK Vue3 Demo</title>
|
||||
<title>iFlow Engine Vue3 Demo</title>
|
||||
<!-- 从 public/lib 目录加载 SDK 文件 -->
|
||||
<script src="/lib/bim-engine-sdk.umd.js"></script>
|
||||
<script src="/lib/iflow-engine.umd.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "bim-engine-demo-vue",
|
||||
"name": "iflow-engine-demo-vue",
|
||||
"version": "1.0.0",
|
||||
"description": "BIM Engine SDK Vue3 Demo",
|
||||
"description": "iFlow Engine SDK Vue3 Demo",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"copy-sdk": "mkdir -p public/lib && cp ../dist/bim-engine-sdk.umd.js public/lib/ && cp ../dist/bim-engine-sdk.umd.js.map public/lib/ 2>/dev/null || true"
|
||||
"copy-sdk": "mkdir -p public/lib && cp ../dist/iflow-engine.umd.js public/lib/ && cp ../dist/iflow-engine.umd.js.map public/lib/ 2>/dev/null || true"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.4.21"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
44732
demo-vue/public/lib/iflow-engine.es.js
Normal file
44732
demo-vue/public/lib/iflow-engine.es.js
Normal file
File diff suppressed because one or more lines are too long
4808
demo-vue/public/lib/iflow-engine.umd.js
Normal file
4808
demo-vue/public/lib/iflow-engine.umd.js
Normal file
File diff suppressed because one or more lines are too long
1
demo-vue/public/lib/iflow-engine.umd.js.map
Normal file
1
demo-vue/public/lib/iflow-engine.umd.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<!-- 左侧控制面板 -->
|
||||
<aside class="sidebar">
|
||||
<h1>BIM SDK Demo (Vue3)</h1>
|
||||
<h1>iFlow Engine Demo (Vue3)</h1>
|
||||
|
||||
<!-- 1. 语言设置 -->
|
||||
<div class="control-group">
|
||||
@@ -84,8 +84,8 @@ const engineStatusColor = ref('#666');
|
||||
|
||||
// 初始化引擎
|
||||
onMounted(() => {
|
||||
if (window.LyzBimEngineSDK) {
|
||||
const Engine = window.LyzBimEngineSDK.BimEngine;
|
||||
if (window.IflowEngine) {
|
||||
const Engine = window.IflowEngine.BimEngine;
|
||||
try {
|
||||
if (appContainer.value) {
|
||||
engine.value = new Engine(appContainer.value, { locale: 'zh-CN' });
|
||||
|
||||
2
demo-vue/src/vite-env.d.ts
vendored
2
demo-vue/src/vite-env.d.ts
vendored
@@ -9,7 +9,7 @@ declare module '*.vue' {
|
||||
// 声明全局 SDK 类型
|
||||
declare global {
|
||||
interface Window {
|
||||
LyzBimEngineSDK: {
|
||||
IflowEngine: {
|
||||
BimEngine: any;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user