@jdultra/threedtiles 13.0.23 → 13.0.25
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.
package/dist/threedtiles.es.js
CHANGED
|
@@ -3462,7 +3462,7 @@ class Wt extends E.Object3D {
|
|
|
3462
3462
|
function t(A) {
|
|
3463
3463
|
A.uri && A.uri.includes("json") || A.url && A.url.includes("json") ? a.hasUnloadedJSONContent++ : a.hasMeshContent++;
|
|
3464
3464
|
}
|
|
3465
|
-
if (a.json.content ? (t(a.json.content), a.hasMeshContent == 0 && (a.level = Math.max(0, a.parentTile ? a.parentTile.level + 0.01 : 0)), a.loadingStrategy === "IMMEDIATE" ? a._load(!0, !1) : a._load()) : a.json.contents && (a.json.contents.forEach((A) => t(A)), a.hasMeshContent == 0 && (a.level = Math.max(0, a.parentTile ? a.parentTile.level + 0.01 : 0)), a.loadingStrategy === "IMMEDIATE" ? a._load(!0, !1) : a._load()), a.centerModel && (we.copy(a.boundingVolume.center), this.json.boundingVolume.region && (this._transformWGS84ToCartesian(0.5 * (this.json.boundingVolume.region[0] + this.json.boundingVolume.region[2]), 0.5 * (this.json.boundingVolume.region[1] + this.json.boundingVolume.region[3]), 0.5 * (this.json.boundingVolume.region[4] + this.json.boundingVolume.region[5]), ce), ht.setFromUnitVectors(ce.normalize(), Ki.normalize()), a.applyQuaternion(ht)), we.applyMatrix4(a.matrix), a.position.sub(we), a.updateMatrices()),
|
|
3465
|
+
if (a.json.content ? (t(a.json.content), a.hasMeshContent == 0 && (a.level = Math.max(0, a.parentTile ? a.parentTile.level + 0.01 : 0)), a.loadingStrategy === "IMMEDIATE" ? a._load(!0, !1) : a._load()) : a.json.contents && (a.json.contents.forEach((A) => t(A)), a.hasMeshContent == 0 && (a.level = Math.max(0, a.parentTile ? a.parentTile.level + 0.01 : 0)), a.loadingStrategy === "IMMEDIATE" ? a._load(!0, !1) : a._load()), a.centerModel && (we.copy(a.boundingVolume.center), this.json.boundingVolume.region && (this._transformWGS84ToCartesian(0.5 * (this.json.boundingVolume.region[0] + this.json.boundingVolume.region[2]), 0.5 * (this.json.boundingVolume.region[1] + this.json.boundingVolume.region[3]), 0.5 * (this.json.boundingVolume.region[4] + this.json.boundingVolume.region[5]), ce), ht.setFromUnitVectors(ce.normalize(), Ki.normalize()), a.applyQuaternion(ht)), we.applyMatrix4(a.matrix), a.position.sub(we), a.updateMatrices()), a.onLoadCallback && a.onLoadCallback(a), a.isSetup = !0, a.level > 0 && a.drawBoundingVolume) if (a.bbox && console.log("double setup"), this.boundingVolume.aabb) {
|
|
3466
3466
|
let A = this.boundingVolume.aabb.clone();
|
|
3467
3467
|
A.applyMatrix4(this.matrixWorld), a.bbox = new E.Box3Helper(A, new E.Color(Math.random(), Math.random(), Math.random())), a.add(a.bbox), a.bbox.material.visible = !1;
|
|
3468
3468
|
} else a.boundingVolume instanceof $ && (a.bbox = a.boundingVolume.helper(), a.add(a.bbox), a.bbox.material.visible = !1);
|
|
@@ -3515,7 +3515,7 @@ class Wt extends E.Object3D {
|
|
|
3515
3515
|
h.geometry.setAttribute("color", new E.Float32BufferAttribute(f, 3));
|
|
3516
3516
|
}
|
|
3517
3517
|
}), t.add(g), t.updateMatrices()));
|
|
3518
|
-
}, t.cameraOnLoad ? () => t.metric && t.metric < 0 || t.deleted ? Number.MAX_VALUE : t.loadingStrategy == "IMMEDIATE" ? t._calculateDistanceToCamera(t.cameraOnLoad) : t.loadingStrategy == "
|
|
3518
|
+
}, t.cameraOnLoad ? () => t.metric && t.metric < 0 || t.deleted ? Number.MAX_VALUE : t.loadingStrategy == "IMMEDIATE" ? t._calculateDistanceToCamera(t.cameraOnLoad) : t.loadingStrategy == "INCREMENTAL" ? t.parentTile ? t.parentTile._calculateDistanceToCamera(t.cameraOnLoad) / t.level : t._calculateDistanceToCamera(t.cameraOnLoad) / t.level : t.loadingStrategy == "PERLEVEL" ? t.parentTile ? t.level + t.parentTile._calculateDistanceToCamera(t.cameraOnLoad) : t.level + t._calculateDistanceToCamera(t.cameraOnLoad) : 0 : () => 0, () => t._getSiblings(), t.level, t.loadingStrategy, !t.json.boundingVolume.region, !!t.json.boundingVolume.region, t.geometricError, t.splatsMesh);
|
|
3519
3519
|
} catch (g) {
|
|
3520
3520
|
t.displayErrors && gt(g);
|
|
3521
3521
|
}
|