itowns 2.43.2-next.12 → 2.43.2-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,8 +116,8 @@ class C3DTilesLayer extends GeometryLayer {
|
|
|
116
116
|
this.pntsShape = PNTS_SHAPE.CIRCLE;
|
|
117
117
|
this.classification = config.classification;
|
|
118
118
|
this.pntsSizeMode = PNTS_SIZE_MODE.VALUE;
|
|
119
|
-
this.pntsMinAttenuatedSize = config.pntsMinAttenuatedSize ||
|
|
120
|
-
this.pntsMaxAttenuatedSize = config.pntsMaxAttenuatedSize ||
|
|
119
|
+
this.pntsMinAttenuatedSize = config.pntsMinAttenuatedSize || 1;
|
|
120
|
+
this.pntsMaxAttenuatedSize = config.pntsMaxAttenuatedSize || 7;
|
|
121
121
|
if (config.pntsMode) {
|
|
122
122
|
const exists = Object.values(PNTS_MODE).includes(config.pntsMode);
|
|
123
123
|
if (!exists) {
|
|
@@ -186,8 +186,8 @@ class C3DTilesLayer extends GeometryLayer {
|
|
|
186
186
|
init3dTilesLayer(view, view.mainLoop.scheduler, this, tileset.root).then(resolve);
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
preUpdate() {
|
|
190
|
-
return pre3dTilesUpdate.bind(this)();
|
|
189
|
+
preUpdate(context) {
|
|
190
|
+
return pre3dTilesUpdate.bind(this)(context);
|
|
191
191
|
}
|
|
192
192
|
update(context, layer, node) {
|
|
193
193
|
return update(context, layer, node);
|
|
@@ -38,6 +38,11 @@ function ReferLayerProperties(material, layer) {
|
|
|
38
38
|
get: () => material.layer.pntsMaxAttenuatedSize
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
if (material.uniforms && material.uniforms.scale != undefined) {
|
|
42
|
+
Object.defineProperty(material.uniforms.scale, 'value', {
|
|
43
|
+
get: () => material.layer.scale
|
|
44
|
+
});
|
|
45
|
+
}
|
|
41
46
|
Object.defineProperty(material, 'wireframe', {
|
|
42
47
|
get: () => material.layer.wireframe
|
|
43
48
|
});
|
|
@@ -160,10 +160,11 @@ function cleanup3dTileset(layer, n) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// this is a layer
|
|
163
|
-
export function pre3dTilesUpdate() {
|
|
163
|
+
export function pre3dTilesUpdate(context) {
|
|
164
164
|
if (!this.visible) {
|
|
165
165
|
return [];
|
|
166
166
|
}
|
|
167
|
+
this.scale = context.camera._preSSE;
|
|
167
168
|
|
|
168
169
|
// Elements removed are added in the layer._cleanableTiles list.
|
|
169
170
|
// Since we simply push in this array, the first item is always
|
|
@@ -35,7 +35,7 @@ function gltfToMesh(data, layer, url) {
|
|
|
35
35
|
function pntsParse(data, layer) {
|
|
36
36
|
return PntsParser.parse(data, layer.registeredExtensions).then(result => {
|
|
37
37
|
const material = layer.material ? layer.material.clone() : new PointsMaterial({
|
|
38
|
-
size:
|
|
38
|
+
size: 1,
|
|
39
39
|
mode: layer.pntsMode,
|
|
40
40
|
shape: layer.pntsShape,
|
|
41
41
|
classification: layer.classification,
|