fix: BUG修改
This commit is contained in:
parent
c96d56b4c6
commit
3caa9a8bd1
@ -11,7 +11,11 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div id="viewer" style="width: 100%; height: 95vh" class="my-obv-viewer"></div>
|
<div
|
||||||
|
id="viewer"
|
||||||
|
style="width: 100%; height: 95vh"
|
||||||
|
class="my-obv-viewer"
|
||||||
|
></div>
|
||||||
<script
|
<script
|
||||||
src="https://api.cloud.pkpm.cn/bimviewer/viewer/v5/obv.js"
|
src="https://api.cloud.pkpm.cn/bimviewer/viewer/v5/obv.js"
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
@ -74,25 +78,27 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 监听相机改变
|
// 监听相机改变
|
||||||
obvApi.addEventListener(OBV.ViewerEventTypes.V3dCameraChangeEvent, (event) => {
|
obvApi.addEventListener(
|
||||||
console.log('V3dCameraChangeEvent', event);
|
OBV.ViewerEventTypes.V3dCameraChangeEvent,
|
||||||
|
(event) => {
|
||||||
|
console.log("V3dCameraChangeEvent", event);
|
||||||
// 操作模型
|
// 操作模型
|
||||||
renderConfigModel(obvApi);
|
renderConfigModel(obvApi);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
function renderConfigModel(obvApi) {
|
function renderConfigModel(obvApi) {
|
||||||
console.log(obvApi);
|
console.log(obvApi);
|
||||||
console.log(configValue.hideArr);
|
console.log(configValue.hideArr);
|
||||||
let arr = [{"modelId":1,"dbId":6103}]
|
|
||||||
// 隐藏构件
|
// 隐藏构件
|
||||||
if(configValue.hideArr.length > 0){
|
if (configValue.hideArr.length > 0) {
|
||||||
obvApi.hide(configValue.hideArr);
|
obvApi.hide(configValue.hideArr);
|
||||||
} else {
|
} else {
|
||||||
obvApi.showAll();
|
obvApi.showAll();
|
||||||
}
|
}
|
||||||
// 构件着色
|
// 构件着色
|
||||||
if(configValue.colorArr.length > 0){
|
if (configValue.colorArr.length > 0) {
|
||||||
configValue.colorArr.map((item) => {
|
configValue.colorArr.map((item) => {
|
||||||
let firstIndex = item.color.indexOf(",");
|
let firstIndex = item.color.indexOf(",");
|
||||||
let secondIndex = item.color.indexOf(",", firstIndex + 1);
|
let secondIndex = item.color.indexOf(",", firstIndex + 1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user