Skip to content

Commit

Permalink
fix(PointCloud): fix after pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGlt committed Jul 4, 2024
1 parent 8654ccb commit 19c0e65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/Layer/C3DTilesLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ class C3DTilesLayer extends GeometryLayer {
this.pntsShape = PNTS_SHAPE.CIRCLE;
this.classification = config.classification;
this.pntsSizeMode = PNTS_SIZE_MODE.VALUE;
this.pntsMinAttenuatedSize = config.pntsMinAttenuatedSize || 3;
this.pntsMaxAttenuatedSize = config.pntsMaxAttenuatedSize || 10;
this.pntsMinAttenuatedSize = config.pntsMinAttenuatedSize || 1;
this.pntsMaxAttenuatedSize = config.pntsMaxAttenuatedSize || 7;
if (config.pntsMode) {
const exists = Object.values(PNTS_MODE).includes(config.pntsMode);
if (!exists) {
Expand Down Expand Up @@ -196,8 +196,7 @@ class C3DTilesLayer extends GeometryLayer {
}

preUpdate(context) {
this.scale = context.camera._preSSE;
return pre3dTilesUpdate.bind(this)();
return pre3dTilesUpdate.bind(this)(context);
}

update(context, layer, node) {
Expand Down
3 changes: 2 additions & 1 deletion src/Process/3dTilesProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,11 @@ function cleanup3dTileset(layer, n, depth = 0) {
}

// this is a layer
export function pre3dTilesUpdate() {
export function pre3dTilesUpdate(context) {
if (!this.visible) {
return [];
}
this.scale = context.camera._preSSE;

// Elements removed are added in the layer._cleanableTiles list.
// Since we simply push in this array, the first item is always
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/3dTilesProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function pntsParse(data, layer) {
const material = layer.material ?
layer.material.clone() :
new PointsMaterial({
size: 0.05,
size: 1,
mode: layer.pntsMode,
shape: layer.pntsShape,
classification: layer.classification,
Expand Down

0 comments on commit 19c0e65

Please sign in to comment.