From d1eb374788af1db3db11d481cd4178d335da786f Mon Sep 17 00:00:00 2001 From: ftoromanoff Date: Tue, 14 May 2024 15:28:35 +0200 Subject: [PATCH] refactor(PotreeDebug): rename PotreeDebug to PointCloudDebug --- examples/3dtiles_pointcloud.html | 7 ++++--- examples/copc_simple_loader.html | 2 +- examples/entwine_3d_loader.html | 2 +- examples/entwine_simple_loader.html | 2 +- examples/potree_25d_map.html | 2 +- examples/potree_3d_map.html | 2 +- src/Layer/C3DTilesLayer.js | 4 +++- utils/debug/Main.js | 2 +- utils/debug/{PotreeDebug.js => PointCloudDebug.js} | 0 9 files changed, 13 insertions(+), 10 deletions(-) rename utils/debug/{PotreeDebug.js => PointCloudDebug.js} (100%) diff --git a/examples/3dtiles_pointcloud.html b/examples/3dtiles_pointcloud.html index 2441b08ad9..3119e0cf6c 100644 --- a/examples/3dtiles_pointcloud.html +++ b/examples/3dtiles_pointcloud.html @@ -58,14 +58,15 @@ } // Create a new Layer 3d-tiles For Pointcloud // ------------------------------------------- + var $3dTilesSource = new itowns.C3DTilesSource({ + url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/pnts-sete-2021-0756_6256/tileset.json', + }); var $3dTilesLayerSetePC = new itowns.C3DTilesLayer('3d-tiles-sete', { name: 'SetePC', sseThreshold: 5, pntsMode: itowns.PNTS_MODE.CLASSIFICATION, pntsShape : itowns.PNTS_SHAPE.CIRCLE, - source: new itowns.C3DTilesSource({ - url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/pnts-sete-2021-0756_6256/tileset.json', - }), + source: $3dTilesSource, }, view); $3dTilesLayerSetePC.addEventListener( diff --git a/examples/copc_simple_loader.html b/examples/copc_simple_loader.html index da58880913..adc29f35a6 100644 --- a/examples/copc_simple_loader.html +++ b/examples/copc_simple_loader.html @@ -109,7 +109,7 @@ pointBudget: 3000000, }); view.addLayer(layer).then(onLayerReady); - debug.PotreeDebug.initTools(view, layer, gui); + debug.PointCloudDebug.initTools(view, layer, gui); } function loadAutzen() { diff --git a/examples/entwine_3d_loader.html b/examples/entwine_3d_loader.html index 1b9f303a41..bc75139d36 100644 --- a/examples/entwine_3d_loader.html +++ b/examples/entwine_3d_loader.html @@ -98,7 +98,7 @@ itowns.View.prototype.addLayer.call(view, eptLayer).then(onLayerReady); - debug.PotreeDebug.initTools(view, eptLayer, debugGui); + debug.PointCloudDebug.initTools(view, eptLayer, debugGui); } readEPTURL(); diff --git a/examples/entwine_simple_loader.html b/examples/entwine_simple_loader.html index 5d4dd1fab6..15e436e5e2 100644 --- a/examples/entwine_simple_loader.html +++ b/examples/entwine_simple_loader.html @@ -104,7 +104,7 @@ view.addLayer(eptLayer).then(onLayerReady); eptLayer.whenReady - .then(() => debug.PotreeDebug.initTools(view, eptLayer, debugGui)); + .then(() => debug.PointCloudDebug.initTools(view, eptLayer, debugGui)); function dblClickHandler(event) { var pick = view.pickObjectsAt(event, 5, eptLayer); diff --git a/examples/potree_25d_map.html b/examples/potree_25d_map.html index 1be0029a7e..74efbfc34e 100644 --- a/examples/potree_25d_map.html +++ b/examples/potree_25d_map.html @@ -102,7 +102,7 @@ potreeLayer.root.bbox.getSize(size); potreeLayer.root.bbox.getCenter(lookAt); - debug.PotreeDebug.initTools(view, potreeLayer, debugGui); + debug.PointCloudDebug.initTools(view, potreeLayer, debugGui); view.camera3D.far = 2.0 * size.length(); diff --git a/examples/potree_3d_map.html b/examples/potree_3d_map.html index 2df2b1a1e8..553a959ed5 100644 --- a/examples/potree_3d_map.html +++ b/examples/potree_3d_map.html @@ -71,7 +71,7 @@ // add potreeLayer to scene function onLayerReady() { - debug.PotreeDebug.initTools(view, potreeLayer, debugGui); + debug.PointCloudDebug.initTools(view, potreeLayer, debugGui); // update stats window var info = document.getElementById('info'); diff --git a/src/Layer/C3DTilesLayer.js b/src/Layer/C3DTilesLayer.js index ee48c5d62d..1a9710bbe3 100644 --- a/src/Layer/C3DTilesLayer.js +++ b/src/Layer/C3DTilesLayer.js @@ -95,7 +95,9 @@ class C3DTilesLayer extends GeometryLayer { * @param {Number} [config.cleanupDelay=1000] The time (in ms) after which a tile content (and its children) are * removed from the scene. * @param {C3DTExtensions} [config.registeredExtensions] 3D Tiles extensions managers registered for this tileset. - * @param {String} [config.pntsMode= PNTS_MODE.COLOR] {@link PointsMaterials} Point cloud coloring mode. Only 'COLOR' or 'CLASSIFICATION' are possible. COLOR uses RGB colors of the points, CLASSIFICATION uses a classification property of the batch table to color points. + * @param {String} [config.pntsMode= PNTS_MODE.COLOR] {@link PointsMaterials} Point cloud coloring mode. + * Only 'COLOR' or 'CLASSIFICATION' are possible. COLOR uses RGB colors of the points, + * CLASSIFICATION uses a classification property of the batch table to color points. * @param {String} [config.pntsShape= PNTS_SHAPE.CIRCLE] Point cloud point shape. Only 'CIRCLE' or 'SQUARE' are possible. * @param {String} [config.pntsSizeMode= PNTS_SIZE_MODE.VALUE] {@link PointsMaterials} Point cloud size mode. Only 'VALUE' or 'ATTENUATED' are possible. VALUE use constant size, ATTENUATED compute size depending on distance from point to camera. * @param {Number} [config.pntsMinAttenuatedSize=3] Minimum scale used by 'ATTENUATED' size mode diff --git a/utils/debug/Main.js b/utils/debug/Main.js index cbec7bf055..92d02a47b3 100644 --- a/utils/debug/Main.js +++ b/utils/debug/Main.js @@ -1,5 +1,5 @@ export { default as Debug } from './Debug'; -export { default as PotreeDebug } from './PotreeDebug'; +export { default as PointCloudDebug } from './PointCloudDebug'; export { default as createTileDebugUI } from './TileDebug'; export { default as create3dTilesDebugUI } from './3dTilesDebug'; export { default as GeometryDebug } from './GeometryDebug'; diff --git a/utils/debug/PotreeDebug.js b/utils/debug/PointCloudDebug.js similarity index 100% rename from utils/debug/PotreeDebug.js rename to utils/debug/PointCloudDebug.js