Skip to content

Commit

Permalink
fix(Debug): fix 3dTiles bbox visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie authored and jailln committed Apr 7, 2023
1 parent 68b78f0 commit cd8d106
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions utils/debug/3dTilesDebug.js
Expand Up @@ -19,15 +19,20 @@ export default function create3dTilesDebugUI(datDebugTool, view, _3dTileslayer)
const obb_layer_id = `${_3dTileslayer.id}_obb_debug`;

function debugIdUpdate(context, layer, node) {
const enabled = context.camera.camera3D.layers.test({ mask: 1 << layer.threejsLayer });

if (!enabled) {
return;
}
const metadata = node.userData.metadata;

let helper = node.userData.obb;

if (!layer.visible) {
if (helper) {
helper.visible = false;
if (typeof helper.setMaterialVisibility === 'function') {
helper.setMaterialVisibility(false);
}
}
return;
}

if (node.visible && metadata.boundingVolume) {
if (!helper) {
// 3dtiles with region
Expand Down

0 comments on commit cd8d106

Please sign in to comment.