itowns 2.43.2-next.16 → 2.43.2-next.17
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.
|
@@ -72,12 +72,12 @@ class C3DTFeature {
|
|
|
72
72
|
target.min.y = Infinity;
|
|
73
73
|
target.min.z = Infinity;
|
|
74
74
|
this.groups.forEach(group => {
|
|
75
|
-
const positionIndexStart = group.start *
|
|
76
|
-
const positionIndexCount = (group.start + group.count) *
|
|
77
|
-
for (let index = positionIndexStart; index < positionIndexCount; index
|
|
78
|
-
const x = this.object3d.geometry.attributes.position.
|
|
79
|
-
const y = this.object3d.geometry.attributes.position.
|
|
80
|
-
const z = this.object3d.geometry.attributes.position.
|
|
75
|
+
const positionIndexStart = group.start * this.object3d.geometry.attributes.position.itemSize;
|
|
76
|
+
const positionIndexCount = (group.start + group.count) * this.object3d.geometry.attributes.position.itemSize;
|
|
77
|
+
for (let index = positionIndexStart; index < positionIndexCount; index++) {
|
|
78
|
+
const x = this.object3d.geometry.attributes.position.getX(index);
|
|
79
|
+
const y = this.object3d.geometry.attributes.position.getY(index);
|
|
80
|
+
const z = this.object3d.geometry.attributes.position.getZ(index);
|
|
81
81
|
target.max.x = Math.max(x, target.max.x);
|
|
82
82
|
target.max.y = Math.max(y, target.max.y);
|
|
83
83
|
target.max.z = Math.max(z, target.max.z);
|
|
@@ -243,7 +243,7 @@ class C3DTilesLayer extends GeometryLayer {
|
|
|
243
243
|
// face is a Face3 object of THREE which is a
|
|
244
244
|
// triangular face. face.a is its first vertex
|
|
245
245
|
const vertex = closestIntersect.face.a;
|
|
246
|
-
const batchID = closestIntersect.object.geometry.attributes._BATCHID.
|
|
246
|
+
const batchID = closestIntersect.object.geometry.attributes._BATCHID.getX(vertex);
|
|
247
247
|
return this.tilesC3DTileFeatures.get(tileId).get(batchID);
|
|
248
248
|
}
|
|
249
249
|
|