@ithinkdt/jt-web3
v0.0.10
Published
a javascript jt-web3
Downloads
5
Readme
@ithinkdt/jt-web3
bom 3d模型的 jt数据在web端的展示工具
how to install
For TypeScript such as Angular Vue React
install
npm i @ithinkdt/jt-web3 --save-dev
Import
import jt-web from '@ithinkdt/jt-web3';
publish
根目录运行
npm run build
修改package.json中的版本号后
npm publish
How to use
html
// 这里的 id 固定 JT_WEB, class 固定 siemens-app-container
<div class="siemens-app-container" id="JT_WEB"></div>
js
初始化 (渲染配置)
const jt_web = jt_web({
// 数据
data: {
title: '测试产品', // 模型组件名称
psId: '122', // 模型组件ID
"units": 5,
}
})
DATA 数据格式
Data {
bboxMax: number[];
bboxMin: number[];
mat64: string;
psId: string;
title: string;
children: NonleafNode[] | LeafNode[];
}
LeafNode {
b64data: string;
bboxMax: number[];
bboxMin: number[];
psId: string;
title: string;
units: 5;
xform: number[];
}
NonleafNode {
bboxMax: number[];
bboxMin: number[];
psId: string;
title: string;
children: NonleafNode[] | LeafNode[];
}