Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 1.01 KB

README.md

File metadata and controls

54 lines (43 loc) · 1.01 KB

Bim-Operator

bim 轻量化模型操作接口

Install && Useage

npm i bim-operator --save

Usage

import getProvider, { ProviderType } from 'bim-operator';

const provider = getProvider(ProviderType.BIMFACE);
// 获取3D模型操作对象
const bim3DModel = provider.bim3DModel;
// 获取3D模型操作对象
const bimDrawing = provider.bimDrawing;

// 加载模型
bim3DModel
    .load({
        viewToken: '<your view token>',
        domId: '<html dom id>',
        viewConfig: {
            // 支持hover
            enableHover: true,
            // 右键
            enableToggleContextMenuDisplay: true
        }
    })
    .then(() => {
        //help your self
    });

// 加载图纸
bimDrawing
    .load({
        viewToken: '<your view token>',
        domId: '<html dom id>'
    })
    .then(() => {
        //help your self
    });

支持的供应商