Skip to content

Commit

Permalink
fix(PointCloud): correct some issues after refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGlt authored and Desplandis committed Apr 30, 2024
1 parent cef15ea commit 65c4008
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions examples/3dtiles_pointcloud.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@
itowns.View.prototype.addLayer.call(view, $3dTilesLayerSetePC);
function switchMode(){
let pntsLayer = view.getLayerById("3d-tiles-sete");

if(pntsLayer){
pntsLayer = pntsLayer;
pntsLayer.pntsMode = pntsLayer.pntsMode == itowns.PNTS_MODE.COLOR ? itowns.PNTS_MODE.CLASSIFICATION : itowns.PNTS_MODE.COLOR;
pntsLayer.pntsMode = pntsLayer.pntsMode === itowns.PNTS_MODE.COLOR ? itowns.PNTS_MODE.CLASSIFICATION : itowns.PNTS_MODE.COLOR;
view.notifyChange(view.camera3D);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/PntsParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ function parseFeatureBinary(array, byteOffset, FTJSONLength) {

function setClassification(point, batchTable) {
if (!point.geometry) { return; }
if (batchTable.content && batchTable.content.Classification) { point.geometry.setAttribute('classification', new THREE.BufferAttribute(new Uint8Array(batchTable.content.Classification), 1, true)); }
if (batchTable.content && batchTable.content.Classification) { point.geometry.setAttribute('classification', new THREE.BufferAttribute(new Uint8Array(batchTable.content.Classification), 1)); }
return point;
}
2 changes: 1 addition & 1 deletion src/Renderer/PointsMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class PointsMaterial extends THREE.ShaderMaterial {
delete options.elevationRange;
delete options.angleRange;
delete options.orientedImageMaterial;
delete options.classificationScheme;
delete options.classification;
delete options.discreteScheme;
delete options.applyOpacityClassication;
delete options.size;
Expand Down

0 comments on commit 65c4008

Please sign in to comment.