Skip to content

Commit

Permalink
fix(PointCloud): use preSSE for C3DTilesLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGlt committed Jul 4, 2024
1 parent 624880d commit 8654ccb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Layer/C3DTilesLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class C3DTilesLayer extends GeometryLayer {
this.pntsSizeMode = PNTS_SIZE_MODE.VALUE;
this.pntsMinAttenuatedSize = config.pntsMinAttenuatedSize || 3;
this.pntsMaxAttenuatedSize = config.pntsMaxAttenuatedSize || 10;

if (config.pntsMode) {
const exists = Object.values(PNTS_MODE).includes(config.pntsMode);
if (!exists) {
Expand Down Expand Up @@ -196,7 +195,8 @@ class C3DTilesLayer extends GeometryLayer {
});
}

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

Expand Down
6 changes: 6 additions & 0 deletions src/Layer/ReferencingLayerProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ function ReferLayerProperties(material, layer) {
});
}

if (material.uniforms && material.uniforms.scale != undefined) {
Object.defineProperty(material.uniforms.scale, 'value', {
get: () => material.layer.scale,
});
}

Object.defineProperty(material, 'wireframe', {
get: () => material.layer.wireframe,
});
Expand Down

0 comments on commit 8654ccb

Please sign in to comment.