@jdultra/threedtiles 13.0.29 → 13.0.30
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/assets/PointsManager.worker-5fpGpVvf.js.map +1 -1
- package/dist/splats/SplatsMesh.d.ts +2 -0
- package/dist/threedtiles.cjs.js +6 -6
- package/dist/threedtiles.cjs.js.map +1 -1
- package/dist/threedtiles.es.js +100 -104
- package/dist/threedtiles.es.js.map +1 -1
- package/dist/threedtiles.umd.js +6 -6
- package/dist/threedtiles.umd.js.map +1 -1
- package/dist/tileset/OGC3DTile.d.ts +0 -1
- package/package.json +1 -1
package/dist/threedtiles.es.js
CHANGED
|
@@ -318,8 +318,8 @@ class Dt {
|
|
|
318
318
|
return new Promise(async (p, u) => {
|
|
319
319
|
await this.checkLoaderInitialized(), this.gltfLoader.parse(I, null, (B) => {
|
|
320
320
|
const C = h.getData("RTC_CENTER");
|
|
321
|
-
C ? (this.tempMatrix.makeTranslation(C[0], C[1], C[2]), B.scene.applyMatrix4(this.tempMatrix)) : B.userData.gltfExtensions && B.userData.gltfExtensions.CESIUM_RTC && (this.tempMatrix.makeTranslation(B.userData.gltfExtensions.CESIUM_RTC.center[0], B.userData.gltfExtensions.CESIUM_RTC.center[1], B.userData.gltfExtensions.CESIUM_RTC.center[2]), B.scene.applyMatrix4(this.tempMatrix)), t && B.scene.applyMatrix4(i.zUpToYUpMatrix), B.scene.asset = B.asset, B.scene.traverse((
|
|
322
|
-
|
|
321
|
+
C ? (this.tempMatrix.makeTranslation(C[0], C[1], C[2]), B.scene.applyMatrix4(this.tempMatrix)) : B.userData.gltfExtensions && B.userData.gltfExtensions.CESIUM_RTC && (this.tempMatrix.makeTranslation(B.userData.gltfExtensions.CESIUM_RTC.center[0], B.userData.gltfExtensions.CESIUM_RTC.center[1], B.userData.gltfExtensions.CESIUM_RTC.center[2]), B.scene.applyMatrix4(this.tempMatrix)), t && B.scene.applyMatrix4(i.zUpToYUpMatrix), B.scene.asset = B.asset, B.scene.traverse((y) => {
|
|
322
|
+
y.isMesh && (A && y.applyMatrix4(i.zUpToYUpMatrix), a && a(y));
|
|
323
323
|
}), p(B.scene);
|
|
324
324
|
}, (B) => {
|
|
325
325
|
console.error(B);
|
|
@@ -356,8 +356,8 @@ class Dt {
|
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
}), function(b, f = !1) {
|
|
359
|
-
const I = b[0].index !== null, p = new Set(Object.keys(b[0].attributes)), u = new Set(Object.keys(b[0].morphAttributes)), B = {}, C = {},
|
|
360
|
-
let
|
|
359
|
+
const I = b[0].index !== null, p = new Set(Object.keys(b[0].attributes)), u = new Set(Object.keys(b[0].morphAttributes)), B = {}, C = {}, y = b[0].morphTargetsRelative, x = new ea();
|
|
360
|
+
let w = 0;
|
|
361
361
|
for (let m = 0; m < b.length; ++m) {
|
|
362
362
|
const Q = b[m];
|
|
363
363
|
let k = 0;
|
|
@@ -367,7 +367,7 @@ class Dt {
|
|
|
367
367
|
B[D] === void 0 && (B[D] = []), B[D].push(Q.attributes[D]), k++;
|
|
368
368
|
}
|
|
369
369
|
if (k !== p.size) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + m + ". Make sure all geometries have the same number of attributes."), null;
|
|
370
|
-
if (
|
|
370
|
+
if (y !== Q.morphTargetsRelative) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + m + ". .morphTargetsRelative must be consistent throughout all geometries."), null;
|
|
371
371
|
for (const D in Q.morphAttributes) {
|
|
372
372
|
if (!u.has(D)) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + m + ". .morphAttributes must be consistent throughout all geometries."), null;
|
|
373
373
|
C[D] === void 0 && (C[D] = []), C[D].push(Q.morphAttributes[D]);
|
|
@@ -379,7 +379,7 @@ class Dt {
|
|
|
379
379
|
if (Q.attributes.position === void 0) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + m + ". The geometry must have either an index or a position attribute"), null;
|
|
380
380
|
D = Q.attributes.position.count;
|
|
381
381
|
}
|
|
382
|
-
x.addGroup(
|
|
382
|
+
x.addGroup(w, D, m), w += D;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
if (I) {
|
|
@@ -1042,8 +1042,8 @@ class St extends jA {
|
|
|
1042
1042
|
interpolate_(e, a, t, A) {
|
|
1043
1043
|
const i = this.resultBuffer, s = this.sampleValues, r = this.valueSize, o = 2 * r, n = 3 * r, l = A - a, d = (t - a) / l, g = d * d, h = g * d, b = e * n, f = b - n, I = -2 * h + 3 * g, p = h - g, u = 1 - I, B = p - g + d;
|
|
1044
1044
|
for (let C = 0; C !== r; C++) {
|
|
1045
|
-
const
|
|
1046
|
-
i[C] = u *
|
|
1045
|
+
const y = s[f + C + r], x = s[f + C + o] * l, w = s[b + C + r], m = s[b + C] * l;
|
|
1046
|
+
i[C] = u * y + B * x + I * w + p * m;
|
|
1047
1047
|
}
|
|
1048
1048
|
return i;
|
|
1049
1049
|
}
|
|
@@ -1280,11 +1280,11 @@ class Si {
|
|
|
1280
1280
|
B || (f = new n(r, p * h, A.count * h / l), B = new oA(f, h / l), a.cache.add(u, B)), I = new cA(B, o, g % h / l, b);
|
|
1281
1281
|
} else f = r === null ? new n(A.count * o) : new n(r, g, A.count * o), I = new be(f, o, b);
|
|
1282
1282
|
if (A.sparse !== void 0) {
|
|
1283
|
-
const p = na.SCALAR, u = ke[A.sparse.indices.componentType], B = A.sparse.indices.byteOffset || 0, C = A.sparse.values.byteOffset || 0,
|
|
1283
|
+
const p = na.SCALAR, u = ke[A.sparse.indices.componentType], B = A.sparse.indices.byteOffset || 0, C = A.sparse.values.byteOffset || 0, y = new u(s[1], B, A.sparse.count * p), x = new n(s[2], C, A.sparse.count * o);
|
|
1284
1284
|
r !== null && (I = new be(I.array.slice(), I.itemSize, I.normalized)), I.normalized = !1;
|
|
1285
|
-
for (let
|
|
1286
|
-
const Q = w
|
|
1287
|
-
if (I.setX(Q, x[
|
|
1285
|
+
for (let w = 0, m = y.length; w < m; w++) {
|
|
1286
|
+
const Q = y[w];
|
|
1287
|
+
if (I.setX(Q, x[w * o]), o >= 2 && I.setY(Q, x[w * o + 1]), o >= 3 && I.setZ(Q, x[w * o + 2]), o >= 4 && I.setW(Q, x[w * o + 3]), o >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1288
1288
|
}
|
|
1289
1289
|
I.normalized = b;
|
|
1290
1290
|
}
|
|
@@ -1495,10 +1495,10 @@ class Si {
|
|
|
1495
1495
|
return Promise.all([Promise.all(s), Promise.all(r), Promise.all(o), Promise.all(n), Promise.all(l)]).then(function(d) {
|
|
1496
1496
|
const g = d[0], h = d[1], b = d[2], f = d[3], I = d[4], p = [];
|
|
1497
1497
|
for (let u = 0, B = g.length; u < B; u++) {
|
|
1498
|
-
const C = g[u],
|
|
1498
|
+
const C = g[u], y = h[u], x = b[u], w = f[u], m = I[u];
|
|
1499
1499
|
if (C === void 0) continue;
|
|
1500
1500
|
C.updateMatrix && C.updateMatrix();
|
|
1501
|
-
const Q = t._createAnimationTracks(C,
|
|
1501
|
+
const Q = t._createAnimationTracks(C, y, x, w, m);
|
|
1502
1502
|
if (Q) for (let k = 0; k < Q.length; k++) p.push(Q[k]);
|
|
1503
1503
|
}
|
|
1504
1504
|
return new BA(i, void 0, p);
|
|
@@ -1643,8 +1643,8 @@ function at(c, e, a) {
|
|
|
1643
1643
|
const u = o.json.accessors[p.POSITION], B = u.min, C = u.max;
|
|
1644
1644
|
if (B !== void 0 && C !== void 0) {
|
|
1645
1645
|
if (b.setX(Math.max(Math.abs(B[0]), Math.abs(C[0]))), b.setY(Math.max(Math.abs(B[1]), Math.abs(C[1]))), b.setZ(Math.max(Math.abs(B[2]), Math.abs(C[2]))), u.normalized) {
|
|
1646
|
-
const
|
|
1647
|
-
b.multiplyScalar(
|
|
1646
|
+
const y = Ma(ke[u.componentType]);
|
|
1647
|
+
b.multiplyScalar(y);
|
|
1648
1648
|
}
|
|
1649
1649
|
h.max(b);
|
|
1650
1650
|
} else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
@@ -1849,24 +1849,24 @@ function vi() {
|
|
|
1849
1849
|
u = new g.PointCloud(), B = h.DecodeArrayToPointCloud(b, b.byteLength, u);
|
|
1850
1850
|
}
|
|
1851
1851
|
if (!B.ok() || u.ptr === 0) throw new Error("THREE.DRACOLoader: Decoding failed: " + B.error_msg());
|
|
1852
|
-
const
|
|
1852
|
+
const y = { index: null, attributes: [] };
|
|
1853
1853
|
for (const x in I) {
|
|
1854
|
-
const
|
|
1854
|
+
const w = self[p[x]];
|
|
1855
1855
|
let m, Q;
|
|
1856
1856
|
if (f.useUniqueIDs) Q = I[x], m = h.GetAttributeByUniqueId(u, Q);
|
|
1857
1857
|
else {
|
|
1858
1858
|
if (Q = h.GetAttributeId(u, g[I[x]]), Q === -1) continue;
|
|
1859
1859
|
m = h.GetAttribute(u, Q);
|
|
1860
1860
|
}
|
|
1861
|
-
const k = a(g, h, u, x,
|
|
1862
|
-
x === "color" && (k.vertexColorSpace = f.vertexColorSpace),
|
|
1861
|
+
const k = a(g, h, u, x, w, m);
|
|
1862
|
+
x === "color" && (k.vertexColorSpace = f.vertexColorSpace), y.attributes.push(k);
|
|
1863
1863
|
}
|
|
1864
|
-
return C === g.TRIANGULAR_MESH && (
|
|
1864
|
+
return C === g.TRIANGULAR_MESH && (y.index = function(x, w, m) {
|
|
1865
1865
|
const Q = m.num_faces(), k = 3 * Q, D = 4 * k, F = x._malloc(D);
|
|
1866
|
-
|
|
1866
|
+
w.GetTrianglesUInt32Array(m, D, F);
|
|
1867
1867
|
const _ = new Uint32Array(x.HEAPF32.buffer, F, k).slice();
|
|
1868
1868
|
return x._free(F), { array: _, itemSize: 1 };
|
|
1869
|
-
}(g, h, u)), g.destroy(u),
|
|
1869
|
+
}(g, h, u)), g.destroy(u), y;
|
|
1870
1870
|
}(o, n, new Int8Array(i), s), d = l.attributes.map((g) => g.array.buffer);
|
|
1871
1871
|
l.index && d.push(l.index.array.buffer), self.postMessage({ type: "decode", id: A.id, geometry: l }, d);
|
|
1872
1872
|
} catch (l) {
|
|
@@ -2053,20 +2053,20 @@ class P extends Fa {
|
|
|
2053
2053
|
n.supercompressionScheme = d._nextUint32();
|
|
2054
2054
|
const h = d._nextUint32(), b = d._nextUint32(), f = d._nextUint32(), I = d._nextUint32(), p = d._nextUint64(), u = d._nextUint64(), B = new Fe(r, U.length + l, 3 * g * 8, !0);
|
|
2055
2055
|
for (let S = 0; S < g; S++) n.levels.push({ levelData: new Uint8Array(r.buffer, r.byteOffset + B._nextUint64(), B._nextUint64()), uncompressedByteLength: B._nextUint64() });
|
|
2056
|
-
const C = new Fe(r, h, b, !0),
|
|
2056
|
+
const C = new Fe(r, h, b, !0), y = { vendorId: C._skip(4)._nextUint16(), descriptorType: C._nextUint16(), versionNumber: C._nextUint16(), descriptorBlockSize: C._nextUint16(), colorModel: C._nextUint8(), colorPrimaries: C._nextUint8(), transferFunction: C._nextUint8(), flags: C._nextUint8(), texelBlockDimension: [C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8()], bytesPlane: [C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8()], samples: [] }, x = (y.descriptorBlockSize / 4 - 6) / 4;
|
|
2057
2057
|
for (let S = 0; S < x; S++) {
|
|
2058
2058
|
const L = { bitOffset: C._nextUint16(), bitLength: C._nextUint8(), channelType: C._nextUint8(), samplePosition: [C._nextUint8(), C._nextUint8(), C._nextUint8(), C._nextUint8()], sampleLower: -1 / 0, sampleUpper: 1 / 0 };
|
|
2059
|
-
64 & L.channelType ? (L.sampleLower = C._nextInt32(), L.sampleUpper = C._nextInt32()) : (L.sampleLower = C._nextUint32(), L.sampleUpper = C._nextUint32()),
|
|
2059
|
+
64 & L.channelType ? (L.sampleLower = C._nextInt32(), L.sampleUpper = C._nextInt32()) : (L.sampleLower = C._nextUint32(), L.sampleUpper = C._nextUint32()), y.samples[S] = L;
|
|
2060
2060
|
}
|
|
2061
|
-
n.dataFormatDescriptor.length = 0, n.dataFormatDescriptor.push(
|
|
2062
|
-
const
|
|
2063
|
-
for (;
|
|
2064
|
-
const S =
|
|
2065
|
-
if (n.keyValue[q] =
|
|
2061
|
+
n.dataFormatDescriptor.length = 0, n.dataFormatDescriptor.push(y);
|
|
2062
|
+
const w = new Fe(r, f, I, !0);
|
|
2063
|
+
for (; w._offset < I; ) {
|
|
2064
|
+
const S = w._nextUint32(), L = w._scan(S), q = tt(L);
|
|
2065
|
+
if (n.keyValue[q] = w._nextUint8Array(S - L.byteLength - 1), q.match(/^ktx/i)) {
|
|
2066
2066
|
const V = tt(n.keyValue[q]);
|
|
2067
2067
|
n.keyValue[q] = V.substring(0, V.lastIndexOf("\0"));
|
|
2068
2068
|
}
|
|
2069
|
-
|
|
2069
|
+
w._skip(S % 4 ? 4 - S % 4 : 0);
|
|
2070
2070
|
}
|
|
2071
2071
|
if (u <= 0) return n;
|
|
2072
2072
|
const m = new Fe(r, p, u, !0), Q = m._nextUint16(), k = m._nextUint16(), D = m._nextUint32(), F = m._nextUint32(), _ = m._nextUint32(), aa = m._nextUint32(), Me = [];
|
|
@@ -2124,20 +2124,20 @@ P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC
|
|
|
2124
2124
|
case "transcode":
|
|
2125
2125
|
e.then(() => {
|
|
2126
2126
|
try {
|
|
2127
|
-
const { faces: b, buffers: f, width: I, height: p, hasAlpha: u, format: B, type: C, dfdFlags:
|
|
2128
|
-
const
|
|
2127
|
+
const { faces: b, buffers: f, width: I, height: p, hasAlpha: u, format: B, type: C, dfdFlags: y } = function(x) {
|
|
2128
|
+
const w = new a.KTX2File(new Uint8Array(x));
|
|
2129
2129
|
function m() {
|
|
2130
|
-
|
|
2130
|
+
w.close(), w.delete();
|
|
2131
2131
|
}
|
|
2132
|
-
if (!
|
|
2132
|
+
if (!w.isValid()) throw m(), new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");
|
|
2133
2133
|
let Q;
|
|
2134
|
-
if (
|
|
2135
|
-
else if (
|
|
2134
|
+
if (w.isUASTC()) Q = s.UASTC;
|
|
2135
|
+
else if (w.isETC1S()) Q = s.ETC1S;
|
|
2136
2136
|
else {
|
|
2137
|
-
if (!
|
|
2137
|
+
if (!w.isHDR()) throw new Error("THREE.KTX2Loader: Unknown Basis encoding");
|
|
2138
2138
|
Q = s.UASTC_HDR;
|
|
2139
2139
|
}
|
|
2140
|
-
const k =
|
|
2140
|
+
const k = w.getWidth(), D = w.getHeight(), F = w.getLayers() || 1, _ = w.getLevels(), aa = w.getFaces(), Me = w.getHasAlpha(), qe = w.getDFDFlags(), { transcoderFormat: Re, engineFormat: Se, engineType: ve } = function(z, me, S, L) {
|
|
2141
2141
|
const q = o[z];
|
|
2142
2142
|
for (let V = 0; V < q.length; V++) {
|
|
2143
2143
|
const O = q[V];
|
|
@@ -2147,7 +2147,7 @@ P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC
|
|
|
2147
2147
|
throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.");
|
|
2148
2148
|
}(Q, k, D, Me);
|
|
2149
2149
|
if (!k || !D || !_) throw m(), new Error("THREE.KTX2Loader: Invalid texture");
|
|
2150
|
-
if (!
|
|
2150
|
+
if (!w.startTranscoding()) throw m(), new Error("THREE.KTX2Loader: .startTranscoding failed");
|
|
2151
2151
|
const Oe = [], Je = [];
|
|
2152
2152
|
for (let z = 0; z < aa; z++) {
|
|
2153
2153
|
const me = [];
|
|
@@ -2155,10 +2155,10 @@ P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC
|
|
|
2155
2155
|
const L = [];
|
|
2156
2156
|
let q, V;
|
|
2157
2157
|
for (let Ee = 0; Ee < F; Ee++) {
|
|
2158
|
-
const Qe =
|
|
2158
|
+
const Qe = w.getImageLevelInfo(S, Ee, z);
|
|
2159
2159
|
z !== 0 || S !== 0 || Ee !== 0 || Qe.origWidth % 4 == 0 && Qe.origHeight % 4 == 0 || console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), _ > 1 ? (q = Qe.origWidth, V = Qe.origHeight) : (q = Qe.width, V = Qe.height);
|
|
2160
|
-
let ye = new Uint8Array(
|
|
2161
|
-
const Xt =
|
|
2160
|
+
let ye = new Uint8Array(w.getImageTranscodedSizeInBytes(S, Ee, 0, Re));
|
|
2161
|
+
const Xt = w.transcodeImage(ye, S, Ee, z, Re, 0, -1, -1);
|
|
2162
2162
|
if (ve === A.HalfFloatType && (ye = new Uint16Array(ye.buffer, ye.byteOffset, ye.byteLength / Uint16Array.BYTES_PER_ELEMENT)), !Xt) throw m(), new Error("THREE.KTX2Loader: .transcodeImage failed.");
|
|
2163
2163
|
L.push(ye);
|
|
2164
2164
|
}
|
|
@@ -2169,7 +2169,7 @@ P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC
|
|
|
2169
2169
|
}
|
|
2170
2170
|
return m(), { faces: Oe, buffers: Je, width: k, height: D, hasAlpha: Me, dfdFlags: qe, format: Se, type: ve };
|
|
2171
2171
|
}(g.buffer);
|
|
2172
|
-
self.postMessage({ type: "transcode", id: g.id, data: { faces: b, width: I, height: p, hasAlpha: u, format: B, type: C, dfdFlags:
|
|
2172
|
+
self.postMessage({ type: "transcode", id: g.id, data: { faces: b, width: I, height: p, hasAlpha: u, format: B, type: C, dfdFlags: y } }, f);
|
|
2173
2173
|
} catch (b) {
|
|
2174
2174
|
console.error(b), self.postMessage({ type: "error", id: g.id, error: b.message });
|
|
2175
2175
|
}
|
|
@@ -2235,7 +2235,7 @@ async function st(c) {
|
|
|
2235
2235
|
const D = k % 8;
|
|
2236
2236
|
return m[Q + Math.floor(k / 8)] >> D & !0;
|
|
2237
2237
|
}
|
|
2238
|
-
function
|
|
2238
|
+
function y(m) {
|
|
2239
2239
|
let Q = 0;
|
|
2240
2240
|
return Q = m.z == null ? Ia(m.x, m.y, m.level) : Ca(m.x, m.y, m.z, m.level), B(p.tileAvailability, Q);
|
|
2241
2241
|
}
|
|
@@ -2247,11 +2247,11 @@ async function st(c) {
|
|
|
2247
2247
|
k.push(B(D, Q));
|
|
2248
2248
|
}), k;
|
|
2249
2249
|
}
|
|
2250
|
-
function
|
|
2250
|
+
function w(m) {
|
|
2251
2251
|
let Q = 0;
|
|
2252
2252
|
return Q = m.z == null ? Ia(m.x, m.y) : Ca(m.x, m.y, m.z), B(p.childSubtreeAvailability, Q);
|
|
2253
2253
|
}
|
|
2254
|
-
return { isTileAvailable:
|
|
2254
|
+
return { isTileAvailable: y, isContentAvailable: x, isChildSubtreeAvailable: w };
|
|
2255
2255
|
}(b, I);
|
|
2256
2256
|
}(await a.arrayBuffer(), rt(c));
|
|
2257
2257
|
throw new Error(`Unsupported file extension: ${e}`);
|
|
@@ -2309,14 +2309,14 @@ async function La(c, e) {
|
|
|
2309
2309
|
for (let u = 0; u < f.length; u++) {
|
|
2310
2310
|
const B = f[u], C = I[u];
|
|
2311
2311
|
h.subtree.isChildSubtreeAvailable(B) && (a && t.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y), a || t.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y).replace("{z}", C.z)), Te.has(s) || Te.set(s, await st(i + s));
|
|
2312
|
-
const
|
|
2312
|
+
const y = Te.get(s), x = { level: 0, x: 0, y: 0 };
|
|
2313
2313
|
a || (x.z = 0);
|
|
2314
|
-
const
|
|
2315
|
-
|
|
2314
|
+
const w = [];
|
|
2315
|
+
y.isContentAvailable(x) && A.forEach((Q) => {
|
|
2316
2316
|
let k;
|
|
2317
|
-
a && (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y)), a || (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y).replace("{z}", C.z)),
|
|
2317
|
+
a && (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y)), a || (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y).replace("{z}", C.z)), w.push({ uri: k });
|
|
2318
2318
|
});
|
|
2319
|
-
const m = { geometricError: h.geometricError / 2, boundingVolume: p[u], refine: c.root.refine, globalAddress: C, localAddress: x, subtree:
|
|
2319
|
+
const m = { geometricError: h.geometricError / 2, boundingVolume: p[u], refine: c.root.refine, globalAddress: C, localAddress: x, subtree: y, contents: w, getChildren: async () => g(m) };
|
|
2320
2320
|
b.push(m);
|
|
2321
2321
|
}
|
|
2322
2322
|
} else {
|
|
@@ -2324,15 +2324,15 @@ async function La(c, e) {
|
|
|
2324
2324
|
for (let u = 0; u < f.length; u++) {
|
|
2325
2325
|
const B = f[u], C = I[u];
|
|
2326
2326
|
if (!h.subtree.isTileAvailable(B)) continue;
|
|
2327
|
-
const
|
|
2327
|
+
const y = [], x = h.subtree.isContentAvailable(B);
|
|
2328
2328
|
for (let m = 0; m < A.length; m++) {
|
|
2329
2329
|
if (!x[m]) continue;
|
|
2330
2330
|
const Q = A[m];
|
|
2331
2331
|
let k;
|
|
2332
|
-
a && (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y)), a || (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y).replace("{z}", C.z)),
|
|
2332
|
+
a && (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y)), a || (k = Q.replace("{level}", C.level).replace("{x}", C.x).replace("{y}", C.y).replace("{z}", C.z)), y.push({ uri: k });
|
|
2333
2333
|
}
|
|
2334
|
-
const
|
|
2335
|
-
b.push(
|
|
2334
|
+
const w = { geometricError: h.geometricError / 2, boundingVolume: p[u], refine: c.root.refine, globalAddress: C, localAddress: B, subtree: h.subtree, contents: y, getChildren: async () => g(w) };
|
|
2335
|
+
b.push(w);
|
|
2336
2336
|
}
|
|
2337
2337
|
}
|
|
2338
2338
|
return b.length > 0 ? b : void 0;
|
|
@@ -2418,10 +2418,10 @@ var Vt = function() {
|
|
|
2418
2418
|
return b.buffer.slice(0, p);
|
|
2419
2419
|
}
|
|
2420
2420
|
function s(h, b, f, I, p, u, B) {
|
|
2421
|
-
var C = h.exports.sbrk,
|
|
2422
|
-
m.set(u,
|
|
2423
|
-
var Q = b(x, I, p,
|
|
2424
|
-
if (Q == 0 && B && B(x,
|
|
2421
|
+
var C = h.exports.sbrk, y = I + 3 & -4, x = C(y * p), w = C(u.length), m = new Uint8Array(h.exports.memory.buffer);
|
|
2422
|
+
m.set(u, w);
|
|
2423
|
+
var Q = b(x, I, p, w, u.length);
|
|
2424
|
+
if (Q == 0 && B && B(x, y, p), f.set(m.subarray(x, x + I * p)), C(x - C(0)), Q != 0) throw new Error("Malformed buffer data: " + Q);
|
|
2425
2425
|
}
|
|
2426
2426
|
var r = { NONE: "", OCTAHEDRAL: "meshopt_decodeFilterOct", QUATERNION: "meshopt_decodeFilterQuat", EXPONENTIAL: "meshopt_decodeFilterExp" }, o = { ATTRIBUTES: "meshopt_decodeVertexBuffer", TRIANGLES: "meshopt_decodeIndexBuffer", INDICES: "meshopt_decodeIndexSequence" }, n = [], l = 0;
|
|
2427
2427
|
function d(h) {
|
|
@@ -2458,11 +2458,11 @@ var Vt = function() {
|
|
|
2458
2458
|
}, decodeGltfBuffer: function(h, b, f, I, p, u) {
|
|
2459
2459
|
s(a, a.exports[o[p]], h, b, f, I, a.exports[r[u]]);
|
|
2460
2460
|
}, decodeGltfBufferAsync: function(h, b, f, I, p) {
|
|
2461
|
-
return n.length > 0 ? function(u, B, C,
|
|
2462
|
-
for (var
|
|
2461
|
+
return n.length > 0 ? function(u, B, C, y, x) {
|
|
2462
|
+
for (var w = n[0], m = 1; m < n.length; ++m) n[m].pending < w.pending && (w = n[m]);
|
|
2463
2463
|
return new Promise(function(Q, k) {
|
|
2464
2464
|
var D = new Uint8Array(C), F = ++l;
|
|
2465
|
-
|
|
2465
|
+
w.pending += u, w.requests[F] = { resolve: Q, reject: k }, w.object.postMessage({ id: F, count: u, size: B, source: D, mode: y, filter: x }, [D.buffer]);
|
|
2466
2466
|
});
|
|
2467
2467
|
}(h, b, f, o[I], r[p]) : A.then(function() {
|
|
2468
2468
|
var u = new Uint8Array(h * b);
|
|
@@ -2495,8 +2495,8 @@ var Vt = function() {
|
|
|
2495
2495
|
B.set(A(o), p), d && B.set(A(d), u);
|
|
2496
2496
|
var C = r(I, p, n, l, u, g, h, b);
|
|
2497
2497
|
new Uint8Array(c.exports.memory.buffer);
|
|
2498
|
-
var
|
|
2499
|
-
return A(
|
|
2498
|
+
var y = new Uint32Array(C);
|
|
2499
|
+
return A(y).set(B.subarray(I, I + 4 * C)), f(I - f(0)), y;
|
|
2500
2500
|
}
|
|
2501
2501
|
var s = { LockBorder: 1 };
|
|
2502
2502
|
})();
|
|
@@ -2589,7 +2589,7 @@ class Ni {
|
|
|
2589
2589
|
}).then((u) => this.b3dmDecoder.parseB3DM(u, (B) => {
|
|
2590
2590
|
h.meshCallback(B, d);
|
|
2591
2591
|
}, n, l)).then((u) => {
|
|
2592
|
-
h.cache.put(b, u),
|
|
2592
|
+
h.cache.put(b, u), this._meshReceived(h.cache, h.register, b, i, s, r, a), h._checkSize();
|
|
2593
2593
|
}).catch((u) => {
|
|
2594
2594
|
}).finally(() => {
|
|
2595
2595
|
te--;
|
|
@@ -2600,7 +2600,7 @@ class Ni {
|
|
|
2600
2600
|
if (!u.ok) throw console.error("could not load tile with path : " + t), new Error(`couldn't load "${t}". Request failed with status ${u.status} : ${u.statusText}`);
|
|
2601
2601
|
return u.arrayBuffer();
|
|
2602
2602
|
}).then((u) => this.splatsDecoder.parseSplats(u, n, l, g)).then((u) => {
|
|
2603
|
-
h.cache.put(b, u), h.
|
|
2603
|
+
h.cache.put(b, u), h._meshReceived(h.cache, h.register, b, i, s, r, a), h._checkSize();
|
|
2604
2604
|
}).catch((u) => {
|
|
2605
2605
|
}).finally(() => {
|
|
2606
2606
|
te--;
|
|
@@ -2613,14 +2613,14 @@ class Ni {
|
|
|
2613
2613
|
}).then(async (u) => {
|
|
2614
2614
|
await async function(B) {
|
|
2615
2615
|
return new Promise((C) => {
|
|
2616
|
-
const
|
|
2617
|
-
B.hasDracoLoader && !B.dracoLoader || B.hasKTX2Loader && !B.ktx2Loader || (clearInterval(
|
|
2616
|
+
const y = setInterval(() => {
|
|
2617
|
+
B.hasDracoLoader && !B.dracoLoader || B.hasKTX2Loader && !B.ktx2Loader || (clearInterval(y), C());
|
|
2618
2618
|
}, 10);
|
|
2619
2619
|
});
|
|
2620
2620
|
}(this.gltfLoader), this.gltfLoader.parse(u, null, (B) => {
|
|
2621
2621
|
B.scene.asset = B.asset, n && B.scene.applyMatrix4(this.zUpToYUpMatrix), B.scene.traverse((C) => {
|
|
2622
2622
|
C.isMesh && (l && C.applyMatrix4(this.zUpToYUpMatrix), h.meshCallback && h.meshCallback(C, d)), C.isPoints && h.pointsCallback && h.pointsCallback(C, d);
|
|
2623
|
-
}), h.cache.put(b, B.scene), h.
|
|
2623
|
+
}), h.cache.put(b, B.scene), h._meshReceived(h.cache, h.register, b, i, s, r, a), h._checkSize();
|
|
2624
2624
|
});
|
|
2625
2625
|
}).catch((u) => {
|
|
2626
2626
|
u !== "user abort" && u.code;
|
|
@@ -2633,7 +2633,7 @@ class Ni {
|
|
|
2633
2633
|
if (!u.ok) throw console.error("could not load tile with path : " + t), new Error(`couldn't load "${t}". Request failed with status ${u.status} : ${u.statusText}`);
|
|
2634
2634
|
return u.json();
|
|
2635
2635
|
}).then((u) => La(u, t)).then((u) => {
|
|
2636
|
-
h.cache.put(b, u), h.
|
|
2636
|
+
h.cache.put(b, u), h._meshReceived(h.cache, h.register, b), h._checkSize();
|
|
2637
2637
|
}).catch((u) => {
|
|
2638
2638
|
console.error(u);
|
|
2639
2639
|
}).finally(() => {
|
|
@@ -3061,19 +3061,19 @@ class qi extends ka {
|
|
|
3061
3061
|
const l = new ia({ uniforms: { textureSize: { value: 512 }, numSlices: { value: 1 }, cov1Texture: { value: o.texture }, cov2Texture: { value: n.texture }, colorTexture: { value: s.texture }, positionTexture: { value: r.texture }, zUpToYUpMatrix3x3: { value: Yt }, sizeMultiplier: { value: 1 }, cropRadius: { value: Number.MAX_VALUE }, cameraNear: { value: 0.01 }, cameraFar: { value: 10 }, computeLinearDepth: { value: !0 } }, vertexShader: Oi(), fragmentShader: a || Ji(), transparent: !0, side: Ze, depthTest: !1, depthWrite: !1 }), d = new Ja(), g = new Float32Array([-0.5, 0.5, 0, 0.5, 0.5, 0, -0.5, -0.5, 0, 0.5, -0.5, 0]);
|
|
3062
3062
|
d.setIndex([0, 2, 1, 2, 3, 1]), d.setAttribute("position", new be(g, 3));
|
|
3063
3063
|
const h = new Uint32Array(i), b = new wa(h, 1, !1);
|
|
3064
|
-
b.needsUpdate = !0, b.setUsage(Ka), d.setAttribute("order", b), d.instanceCount = 0, super(d, l), this.orderAttribute = b, this.textureSize = 512, this.numTextures = 1, this.batchSize = A, this.maxSplats = i, this.colorRenderTarget = s, this.positionRenderTarget = r, this.cov1RenderTarget = o, this.cov2RenderTarget = n, this.renderer = e, this.sortID = 0, this.freeAddresses = new He();
|
|
3065
|
-
for (let
|
|
3066
|
-
this.worker = new _i({ type: "module" }), this.sortListeners = [], this.worker.onmessage = (
|
|
3067
|
-
const
|
|
3068
|
-
if (
|
|
3069
|
-
const
|
|
3070
|
-
|
|
3071
|
-
const
|
|
3072
|
-
|
|
3064
|
+
b.needsUpdate = !0, b.setUsage(Ka), d.setAttribute("order", b), d.instanceCount = 0, super(d, l), this.numBatches = 0, this.numVisibleBatches = 0, this.orderAttribute = b, this.textureSize = 512, this.numTextures = 1, this.batchSize = A, this.maxSplats = i, this.colorRenderTarget = s, this.positionRenderTarget = r, this.cov1RenderTarget = o, this.cov2RenderTarget = n, this.renderer = e, this.sortID = 0, this.freeAddresses = new He();
|
|
3065
|
+
for (let I = 0; I < this.maxSplats; I += A) this.freeAddresses.add(I);
|
|
3066
|
+
this.worker = new _i({ type: "module" }), this.sortListeners = [], this.worker.onmessage = (I) => {
|
|
3067
|
+
const p = new Uint32Array(I.data.order);
|
|
3068
|
+
if (p.length > this.orderAttribute.count) {
|
|
3069
|
+
const u = new Ja(), B = new Float32Array([-0.5, 0.5, 0, 0.5, 0.5, 0, -0.5, -0.5, 0, 0.5, -0.5, 0]), C = [0, 2, 1, 2, 3, 1];
|
|
3070
|
+
u.setIndex(C), u.setAttribute("position", new be(B, 3));
|
|
3071
|
+
const y = new Uint32Array(this.maxSplats), x = new wa(y, 1, !1);
|
|
3072
|
+
x.needsUpdate = !0, x.setUsage(Ka), u.setAttribute("order", x), u.instanceCount = 0, this.geometry.dispose(), this.geometry = u, this.orderAttribute = x;
|
|
3073
3073
|
}
|
|
3074
|
-
this.orderAttribute.clearUpdateRanges(), this.orderAttribute.set(
|
|
3075
|
-
for (let
|
|
3076
|
-
this.sortListeners[
|
|
3074
|
+
this.orderAttribute.clearUpdateRanges(), this.orderAttribute.set(p), this.orderAttribute.addUpdateRange(0, p.length), this.orderAttribute.needsUpdate = !0, this.geometry.instanceCount = I.data.count, this.geometry.needsUpdate = !0;
|
|
3075
|
+
for (let u = this.sortListeners.length - 1; u >= 0; u--)
|
|
3076
|
+
this.sortListeners[u](I.data.id) && this.sortListeners.splice(u, 1);
|
|
3077
3077
|
}, this.cameraPosition = new M(0, 0, 0), this.rotateOnAxis(new M(1, 0, 0), 0.5 * Math.PI), this.frustumCulled = !1, this.copyMaterial2D = new ia({ uniforms: { sourceTexture: {} }, vertexShader: bt(), fragmentShader: `
|
|
3078
3078
|
precision highp float;
|
|
3079
3079
|
|
|
@@ -3096,10 +3096,6 @@ void main() {
|
|
|
3096
3096
|
}`, transparent: !1, side: Ze, depthTest: !1, depthWrite: !1 }), this.copyCamera = new Qt(-0.5, 0.5, 0.5, -0.5, 0.1, 10), this.copyCamera.position.z = 1, this.copyScene = new qA();
|
|
3097
3097
|
const f = new OA(1, 1);
|
|
3098
3098
|
this.copyQuad = new ka(f, this.copyMaterial2D), this.copyScene.add(this.copyQuad), this.copyScene.matrixAutoUpdate = !1, this.copyQuad.matrixAutoUpdate = !1;
|
|
3099
|
-
const I = this;
|
|
3100
|
-
document.addEventListener("keyup", function(p) {
|
|
3101
|
-
p.key === "a" && (I.growTextures(), console.log(I.positionRenderTarget.depth));
|
|
3102
|
-
});
|
|
3103
3099
|
}
|
|
3104
3100
|
dispose() {
|
|
3105
3101
|
this.material.dispose(), this.copyMaterial2D.dispose(), this.copyMaterial3D.dispose(), this.cov1RenderTarget.dispose(), this.cov2RenderTarget.dispose(), this.positionRenderTarget.dispose(), this.colorRenderTarget.dispose(), this.worker.terminate(), this.worker = null, this.geometry.dispose();
|
|
@@ -3130,9 +3126,7 @@ void main() {
|
|
|
3130
3126
|
raycast(e, a) {
|
|
3131
3127
|
}
|
|
3132
3128
|
addSplatsTile(e, a, t, A) {
|
|
3133
|
-
const i = this;
|
|
3134
|
-
e.count;
|
|
3135
|
-
const s = e.data ? e.data.array : e.array, r = e.data && e.data.isInterleavedBuffer ? e.data.stride : 3, o = e.data && e.data.isInterleavedBuffer ? e.offset : 0, n = Math.ceil(s.length / (this.batchSize * r)), l = [], d = [];
|
|
3129
|
+
const i = this, s = e.data ? e.data.array : e.array, r = e.data && e.data.isInterleavedBuffer ? e.data.stride : 3, o = e.data && e.data.isInterleavedBuffer ? e.offset : 0, n = Math.ceil(s.length / (this.batchSize * r)), l = [], d = [];
|
|
3136
3130
|
let g = () => {
|
|
3137
3131
|
};
|
|
3138
3132
|
const h = new Float32Array(s.length / r * 3);
|
|
@@ -3154,21 +3148,23 @@ void main() {
|
|
|
3154
3148
|
i.worker.postMessage({ method: "addBatches", insertionIndexes: d, positions: s.buffer, offset: o, stride: r, batchSize: i.batchSize }, [s.buffer]);
|
|
3155
3149
|
let b = !1;
|
|
3156
3150
|
return { hide: () => {
|
|
3157
|
-
b == 1 && (b = !1, i.worker.postMessage({ method: "hideBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ }));
|
|
3151
|
+
b == 1 && (i.numVisibleBatches--, b = !1, i.worker.postMessage({ method: "hideBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ }));
|
|
3158
3152
|
}, show: (f) => {
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3153
|
+
if (b == 0) {
|
|
3154
|
+
i.numVisibleBatches--, b = !0;
|
|
3155
|
+
const I = i.sortID, p = (u) => u >= I && (f(), !0);
|
|
3156
|
+
i.sortListeners.push(p), i.worker.postMessage({ method: "showBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ });
|
|
3157
|
+
}
|
|
3162
3158
|
}, remove: () => {
|
|
3163
|
-
g = void 0, i.worker.postMessage({ method: "removeBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ }), l.forEach((f) => i.freeAddresses.add(f));
|
|
3159
|
+
console.log("remove"), g = void 0, i.worker.postMessage({ method: "removeBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ }), l.forEach((f) => i.freeAddresses.add(f));
|
|
3164
3160
|
}, sort: this.sort, raycast: g, isSplatsBatch: !0 };
|
|
3165
3161
|
}
|
|
3166
3162
|
addSplatsBatch(e, a, t, A, i, s) {
|
|
3167
3163
|
const r = new Float32Array(4 * this.batchSize), o = new Uint8Array(4 * this.batchSize), n = new Float32Array(4 * this.batchSize), l = new Float32Array(4 * this.batchSize);
|
|
3168
3164
|
for (let u = a; u < a + this.batchSize; u++) {
|
|
3169
|
-
const B = u - a, C = 4 * B,
|
|
3170
|
-
if (
|
|
3171
|
-
r[C] = t.getX(
|
|
3165
|
+
const B = u - a, C = 4 * B, y = e + B;
|
|
3166
|
+
if (y >= t.count) break;
|
|
3167
|
+
r[C] = t.getX(y), r[C + 1] = t.getY(y), r[C + 2] = t.getZ(y), Math.floor(255 * A.getX(y)), Math.floor(255 * A.getY(y)), Math.floor(255 * A.getZ(y)), Math.floor(255 * A.getW(y)), o[C] = Math.floor(255 * A.getX(y)), o[C + 1] = Math.floor(255 * A.getY(y)), o[C + 2] = Math.floor(255 * A.getZ(y)), o[C + 3] = Math.floor(255 * A.getW(y)), n[C] = i.getX(y), n[C + 1] = i.getY(y), n[C + 2] = i.getZ(y), l[C] = s.getX(y), l[C + 1] = s.getY(y), l[C + 2] = s.getZ(y);
|
|
3172
3168
|
}
|
|
3173
3169
|
const d = Math.floor(a / Math.pow(this.textureSize, 2)), g = Math.ceil(this.batchSize / this.textureSize), h = [0, a / this.textureSize - d * this.textureSize, this.textureSize];
|
|
3174
3170
|
h.push(h[1] + g);
|
|
@@ -3513,7 +3509,7 @@ class Wt extends E.Object3D {
|
|
|
3513
3509
|
for (let g in t.queryParams) t.queryParams.hasOwnProperty(g) && (d += "&" + g + "=" + t.queryParams[g]);
|
|
3514
3510
|
n.includes("?") ? n += d : n += "?" + d.substring(1);
|
|
3515
3511
|
}
|
|
3516
|
-
if (n) if (o && (n.includes(".b3dm") || n.includes(".glb") || n.includes(".gltf"))) try {
|
|
3512
|
+
if (n) if (t.contentURL.push(n), o && (n.includes(".b3dm") || n.includes(".glb") || n.includes(".gltf"))) try {
|
|
3517
3513
|
t.tileLoader.get(t.abortController, t.uuid, n, (g) => {
|
|
3518
3514
|
t.deleted || (g.asset && g.asset.copyright && (g.asset.copyright.split(";").forEach((h) => {
|
|
3519
3515
|
Z[h] ? Z[h]++ : Z[h] = 1;
|
|
@@ -3539,9 +3535,9 @@ class Wt extends E.Object3D {
|
|
|
3539
3535
|
a && a.asset && a.asset.copyright && (a.asset.copyright.split(";").forEach((t) => {
|
|
3540
3536
|
Z[t] && Z[t]--;
|
|
3541
3537
|
}), e.displayCopyright && ma());
|
|
3542
|
-
}), e.
|
|
3538
|
+
}), e.childrenTiles.forEach((a) => a.dispose()), e.deleted = !0, e.splatsMesh && (e.meshContent.forEach((a) => a.hide()), e.parentTile || e.splatsMesh.dispose()), e.contentURL && (e.contentURL.forEach((a) => {
|
|
3543
3539
|
e.tileLoader.invalidate(a, e.uuid);
|
|
3544
|
-
}), e.contentURL = []), e.abortController && !e.jsonRequested && e.abortController.abort("tile not needed"), this.parent = null, this.dispatchEvent({ type: "removed" });
|
|
3540
|
+
}), e.contentURL = []), e.abortController && !e.jsonRequested && e.abortController.abort("tile not needed"), this.parent = null, e.meshContent = [], e.bbox && e.bbox.dispose(), this.dispatchEvent({ type: "removed" });
|
|
3545
3541
|
}
|
|
3546
3542
|
_disposeMeshContent() {
|
|
3547
3543
|
const e = this;
|
|
@@ -3724,7 +3720,7 @@ class Wt extends E.Object3D {
|
|
|
3724
3720
|
if (this.metric < 0) return !0;
|
|
3725
3721
|
if (this.hasUnloadedJSONContent) return !1;
|
|
3726
3722
|
if (!this.hasMeshContent && this.json.children.length == 0 && !this.hasUnloadedJSONContent) return !0;
|
|
3727
|
-
if (!this.hasMeshContent || this.meshContent.length == 0 || !this.materialVisibility ||
|
|
3723
|
+
if (!this.hasMeshContent || this.meshContent.length == 0 || !this.materialVisibility || this.splatsMesh && !this.splatsReady) {
|
|
3728
3724
|
if (this.children.length > 0) {
|
|
3729
3725
|
var e = !0;
|
|
3730
3726
|
return this.childrenTiles.every((a) => !!a._isReady() || (e = !1, !1)), e;
|
|
@@ -3746,7 +3742,7 @@ class Wt extends E.Object3D {
|
|
|
3746
3742
|
if (a.bbox && (a.bbox.material.visible = e), a.splatsMesh) e != a.materialVisibility && (a.meshContent.forEach((t) => {
|
|
3747
3743
|
e && t.isSplatsBatch ? (a.splatsReady = !0, t.show(() => {
|
|
3748
3744
|
a.materialVisibility && (a.splatsReady = !0);
|
|
3749
|
-
})) : t.hide();
|
|
3745
|
+
})) : (t.hide(), a.splatsReady = !1);
|
|
3750
3746
|
}), a.materialVisibility = e);
|
|
3751
3747
|
else {
|
|
3752
3748
|
if (a.hasMeshContent && a.meshContent.length > 0 && (e ? a.meshContent.forEach((t) => {
|
|
@@ -3795,7 +3791,7 @@ class Wt extends E.Object3D {
|
|
|
3795
3791
|
return this.boundingVolume instanceof $ ? (ue.copy(this.boundingVolume), ue.applyMatrix4(this.matrixWorld), Math.max(0, ue.distanceToPoint(e.position))) : this.boundingVolume instanceof E.Sphere ? (Ae.copy(this.boundingVolume), Ae.applyMatrix4(this.matrixWorld), Math.max(0, e.position.distanceTo(Ae.center) - Ae.radius)) : (console.error("unsupported shape"), -1);
|
|
3796
3792
|
}
|
|
3797
3793
|
setGeometricErrorMultiplier(e) {
|
|
3798
|
-
this.geometricErrorMultiplier = e, this.
|
|
3794
|
+
this.geometricErrorMultiplier = e, this.childrenTiles.forEach((a) => a.setGeometricErrorMultiplier(e));
|
|
3799
3795
|
}
|
|
3800
3796
|
setDistanceBias(e) {
|
|
3801
3797
|
this.distanceBias = e, this.childrenTiles.forEach((a) => a.setDistanceBias(e));
|