一、加载思路
方式一:
使用工具将rvt转成glb格式,并且支持通过glb的metadata访问建筑的参数数据。
方式二:
使用工具将rvt转成ifc格式,再使用babylonjs加载ifc文件显示;
ThatOpen/engine_web-ifc: Reading and writing IFC files with Javascript, at native speeds.
anders-lundgren/web-ifc-babylon: Demo at https://anders-lundgren.github.io/web-ifc-babylon/app/

三、IFC测试文件
http://ifc.bimant.com/
web-ifc-babylon/src/test.ifc at master · anders-lundgren/web-ifc-babylon


四、性能优化
因为BIM模型的Mesh很多,如果稍微大的场景不做性能优化,那么drawcall导致帧率过低。
可以考虑用Mesh合并的方式,做成可配置的:
- 高帧率模式(全合并mesh)
- 自由模式(同色合并mesh)
- 高保真模式(不合并)