Files
bim_engine/demo
yuding c3bd82c03a feat: upgrade to v1.3.2 with settings panel overhaul, clear height enhancements and bug fixes
- Overhaul settings dialog: add edge line toggle, contrast/saturation/light intensity sliders, environment and ground type selectors
- Add clear height measurement options: direction (up/down) and select type (point/element) with radio button UI
- Fix right-click context menu triggering during model drag rotation (add move threshold)
- Fix measure dialog event listener leak (on → off for cleanup)
- Update mini map API to use engine.minMap.toggle()
- Replace text-based measure icons with proper SVG assets (净高/净距/坐标/面积)
- Add i18n keys for all new settings and clear height options (zh-CN / en-US)
- Bump iflow-engine-base dependency to ^2.0.5
- Rebuild dist and sync demo libs
2026-03-04 16:40:35 +08:00
..
2026-01-29 17:03:25 +08:00

iFlow Engine Demo

这是一个独立的演示项目,展示如何使用 iFlow Engine。

前置要求

  1. 确保父项目已经构建完成:

    cd ..
    npm run build
    
  2. 安装依赖:

    npm install
    
  3. 复制 SDK 文件到 demo 目录:

    npm run copy-sdk
    

    或者手动复制:

    mkdir -p lib
    cp ../dist/iflow-engine.umd.js lib/
    

运行

开发模式

npm run dev

服务器会在 http://localhost:8080 启动,并自动打开浏览器。

构建

npm run build

构建后的文件会在 dist 目录中。

预览构建结果

npm run preview

项目结构

demo/
├── index.html          # 主页面
├── model/              # 3D 模型文件
│   └── gujianzhu.glb
├── lib/                # SDK 文件目录
│   └── iflow-engine.umd.js
├── package.json        # 项目配置
├── vite.config.js      # Vite 配置
└── README.md           # 说明文档

使用说明

  1. 点击 "初始化引擎" 按钮初始化 3D 引擎
  2. 点击 "加载模型" 按钮加载 3D 模型
  3. 其他功能按钮可以测试 SDK 的各种功能

注意事项

  • 确保父项目的 dist 目录中有构建好的 SDK 文件
  • 模型文件路径是相对于 index.html
  • 使用 HTTP 服务器运行(不能直接打开 HTML 文件)以避免 CORS 问题