diff --git a/examples/3dtiles.html b/examples/3dtiles.html index f9c0cfc4f1..475e272625 100644 --- a/examples/3dtiles.html +++ b/examples/3dtiles.html @@ -130,7 +130,7 @@ $3dTilesLayerRequestVolume.overrideMaterials = true; // custom cesium shaders are not functional $3dTilesLayerRequestVolume.type = 'geometry'; $3dTilesLayerRequestVolume.visible = true; - $3dTilesLayerRequestVolume.sseThreshold = 1; + $3dTilesLayerRequestVolume.sseThreshold = 1; // add an event for have information when you move your mouse on a building itowns.View.prototype.addLayer.call(globe, $3dTilesLayerRequestVolume).then(function _() { window.addEventListener('mousemove', picking, false); }) diff --git a/src/Core/Scheduler/Providers/3dTiles_Provider.js b/src/Core/Scheduler/Providers/3dTiles_Provider.js index 03568095d4..ddf30ab820 100644 --- a/src/Core/Scheduler/Providers/3dTiles_Provider.js +++ b/src/Core/Scheduler/Providers/3dTiles_Provider.js @@ -166,7 +166,11 @@ function configureTile(tile, layer, metadata, parent) { tile.applyMatrix(tile.transform); tile.geometricError = metadata.geometricError; tile.tileId = metadata.tileId; - tile.additiveRefinement = (metadata.refine === 'add'); + if (metadata.refine) { + tile.additiveRefinement = (metadata.refine.toUpperCase() === 'ADD'); + } else { + tile.additiveRefinement = parent ? (parent.additiveRefinement) : false; + } tile.parentFromLocalTransform = tile.transform; tile.worldFromLocalTransform = new THREE.Matrix4().multiplyMatrices(parent ? parent.worldFromLocalTransform : new THREE.Matrix4(), tile.parentFromLocalTransform); const m = new THREE.Matrix4(); @@ -177,6 +181,7 @@ function configureTile(tile, layer, metadata, parent) { tile.add(tile.boundingVolume.region); } tile.updateMatrixWorld(); + console.log(parent); } const textDecoder = new TextDecoder('utf-8'); diff --git a/src/Process/3dTilesProcessing.js b/src/Process/3dTilesProcessing.js index 999af8c026..f61b214278 100644 --- a/src/Process/3dTilesProcessing.js +++ b/src/Process/3dTilesProcessing.js @@ -167,7 +167,6 @@ export function process3dTilesNode(cullingTest, subdivisionTest) { n.visible = false; } } - return returnValue; }