fix: BUG修改

This commit is contained in:
kun 2023-12-11 10:59:39 +08:00
parent c96d56b4c6
commit 3caa9a8bd1

View File

@ -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"
@ -75,16 +79,18 @@
); );
// 监听相机改变 // 监听相机改变
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);