@jdultra/threedtiles 13.0.12 → 13.0.13
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/splats/SplatsMesh.d.ts +1 -1
- package/dist/threedtiles.cjs.js +33 -19
- package/dist/threedtiles.cjs.js.map +1 -1
- package/dist/threedtiles.es.js +653 -639
- package/dist/threedtiles.es.js.map +1 -1
- package/dist/threedtiles.umd.js +34 -20
- package/dist/threedtiles.umd.js.map +1 -1
- package/dist/tileset/OGC3DTile.d.ts +2 -0
- package/package.json +1 -1
package/dist/threedtiles.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var Wt = Object.defineProperty;
|
|
|
2
2
|
var Xt = (o, e, a) => e in o ? Wt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[e] = a;
|
|
3
3
|
var ge = (o, e, a) => Xt(o, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
import * as m from "three";
|
|
5
|
-
import { Matrix3 as Ma, Vector3 as S, Box3 as Ra, Matrix4 as De, Ray as Zt, BufferGeometry as Sa, BufferAttribute as le, TrianglesDrawMode as $t, TriangleFanDrawMode as ma, TriangleStripDrawMode as ut, Loader as Fa, LoaderUtils as Ne, FileLoader as
|
|
5
|
+
import { Matrix3 as Ma, Vector3 as S, Box3 as Ra, Matrix4 as De, Ray as Zt, BufferGeometry as Sa, BufferAttribute as le, TrianglesDrawMode as $t, TriangleFanDrawMode as ma, TriangleStripDrawMode as ut, Loader as Fa, LoaderUtils as Ne, FileLoader as Ce, Color as he, LinearSRGBColorSpace as K, SpotLight as eA, PointLight as aA, DirectionalLight as tA, MeshBasicMaterial as Te, SRGBColorSpace as re, MeshPhysicalMaterial as ee, Vector2 as pt, Quaternion as Ct, InstancedMesh as AA, InstancedBufferAttribute as Qa, Object3D as Bt, TextureLoader as iA, ImageBitmapLoader as sA, InterleavedBuffer as rA, InterleavedBufferAttribute as nA, LinearFilter as He, LinearMipmapLinearFilter as va, RepeatWrapping as ya, NearestFilter as M, PointsMaterial as oA, Material as ea, LineBasicMaterial as cA, MeshStandardMaterial as Ua, DoubleSide as dA, PropertyBinding as bA, SkinnedMesh as lA, Mesh as wa, LineSegments as hA, Line as gA, LineLoop as fA, Points as IA, Group as aa, PerspectiveCamera as uA, MathUtils as pA, OrthographicCamera as Et, Skeleton as CA, AnimationClip as BA, Bone as EA, InterpolateLinear as mt, ColorManagement as xa, NearestMipmapNearestFilter as mA, LinearMipmapNearestFilter as QA, NearestMipmapLinearFilter as yA, ClampToEdgeWrapping as wA, MirroredRepeatWrapping as xA, InterpolateDiscrete as kA, FrontSide as Ze, Texture as Na, VectorKeyframeTrack as Pa, NumberKeyframeTrack as _a, QuaternionKeyframeTrack as Ha, Sphere as DA, Interpolant as jA, CompressedCubeTexture as MA, CompressedArrayTexture as RA, CompressedTexture as qa, RGBAFormat as $, RGBA_ASTC_4x4_Format as Qt, RGB_BPTC_UNSIGNED_Format as SA, RGBA_BPTC_Format as FA, RGBA_ETC2_EAC_Format as vA, RGBA_PVRTC_4BPPV1_Format as TA, RGBA_S3TC_DXT5_Format as LA, RGB_ETC1_Format as GA, RGB_ETC2_Format as UA, RGB_PVRTC_4BPPV1_Format as NA, RGBA_S3TC_DXT1_Format as PA, UnsignedByteType as X, HalfFloatType as we, FloatType as F, DataTexture as Le, Data3DTexture as _A, NoColorSpace as HA, RGFormat as Ge, RedFormat as Ue, RGBA_ASTC_6x6_Format as Oa, WebGL3DRenderTarget as ne, ShaderMaterial as ta, AlwaysDepth as qA, InstancedBufferGeometry as Ja, DynamicDrawUsage as Ka, Scene as OA, PlaneGeometry as JA } from "three";
|
|
6
6
|
class Zi {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.cullMap = [], this.cullMaterial = new m.MeshBasicMaterial({ vertexColors: !0 }), this.cullMaterial.side = m.FrontSide, this.cullTarget = this._createCullTarget(), this.cullPixels = new Uint8Array(4 * this.cullTarget.width * this.cullTarget.height);
|
|
@@ -183,10 +183,10 @@ class wt {
|
|
|
183
183
|
if (s instanceof Object) {
|
|
184
184
|
if (Array.isArray(s)) return s;
|
|
185
185
|
{
|
|
186
|
-
const { buffer: r, binOffset: c, binLength: n } = this,
|
|
186
|
+
const { buffer: r, binOffset: c, binLength: n } = this, b = s.byteOffset || 0, d = s.type || A, l = s.componentType || t;
|
|
187
187
|
if ("type" in s && A && s.type !== A) throw new Error("FeatureTable: Specified type does not match expected type.");
|
|
188
188
|
let g, h;
|
|
189
|
-
switch (
|
|
189
|
+
switch (d) {
|
|
190
190
|
case "SCALAR":
|
|
191
191
|
g = 1;
|
|
192
192
|
break;
|
|
@@ -202,36 +202,36 @@ class wt {
|
|
|
202
202
|
default:
|
|
203
203
|
throw new Error(`FeatureTable : Feature type not provided for "${e}".`);
|
|
204
204
|
}
|
|
205
|
-
const f = c +
|
|
205
|
+
const f = c + b, u = a * g;
|
|
206
206
|
switch (l) {
|
|
207
207
|
case "BYTE":
|
|
208
|
-
h = new Int8Array(r, f,
|
|
208
|
+
h = new Int8Array(r, f, u);
|
|
209
209
|
break;
|
|
210
210
|
case "UNSIGNED_BYTE":
|
|
211
|
-
h = new Uint8Array(r, f,
|
|
211
|
+
h = new Uint8Array(r, f, u);
|
|
212
212
|
break;
|
|
213
213
|
case "SHORT":
|
|
214
|
-
h = new Int16Array(r, f,
|
|
214
|
+
h = new Int16Array(r, f, u);
|
|
215
215
|
break;
|
|
216
216
|
case "UNSIGNED_SHORT":
|
|
217
|
-
h = new Uint16Array(r, f,
|
|
217
|
+
h = new Uint16Array(r, f, u);
|
|
218
218
|
break;
|
|
219
219
|
case "INT":
|
|
220
|
-
h = new Int32Array(r, f,
|
|
220
|
+
h = new Int32Array(r, f, u);
|
|
221
221
|
break;
|
|
222
222
|
case "UNSIGNED_INT":
|
|
223
|
-
h = new Uint32Array(r, f,
|
|
223
|
+
h = new Uint32Array(r, f, u);
|
|
224
224
|
break;
|
|
225
225
|
case "FLOAT":
|
|
226
|
-
h = new Float32Array(r, f,
|
|
226
|
+
h = new Float32Array(r, f, u);
|
|
227
227
|
break;
|
|
228
228
|
case "DOUBLE":
|
|
229
|
-
h = new Float64Array(r, f,
|
|
229
|
+
h = new Float64Array(r, f, u);
|
|
230
230
|
break;
|
|
231
231
|
default:
|
|
232
232
|
throw new Error(`FeatureTable : Feature component type not provided for "${e}".`);
|
|
233
233
|
}
|
|
234
|
-
if (f +
|
|
234
|
+
if (f + u * h.BYTES_PER_ELEMENT > c + n) throw new Error("FeatureTable: Feature data read outside binary body length.");
|
|
235
235
|
return h;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -249,25 +249,25 @@ class zA extends wt {
|
|
|
249
249
|
function Xa(o) {
|
|
250
250
|
let e, a, t, A = -1, i = 0;
|
|
251
251
|
for (let n = 0; n < o.length; ++n) {
|
|
252
|
-
const
|
|
253
|
-
if (e === void 0 && (e =
|
|
254
|
-
if (a === void 0 && (a =
|
|
255
|
-
if (t === void 0 && (t =
|
|
256
|
-
if (A === -1 && (A =
|
|
257
|
-
i +=
|
|
252
|
+
const b = o[n];
|
|
253
|
+
if (e === void 0 && (e = b.array.constructor), e !== b.array.constructor) return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."), null;
|
|
254
|
+
if (a === void 0 && (a = b.itemSize), a !== b.itemSize) return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."), null;
|
|
255
|
+
if (t === void 0 && (t = b.normalized), t !== b.normalized) return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."), null;
|
|
256
|
+
if (A === -1 && (A = b.gpuType), A !== b.gpuType) return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
257
|
+
i += b.count * a;
|
|
258
258
|
}
|
|
259
259
|
const s = new e(i), r = new le(s, a, t);
|
|
260
260
|
let c = 0;
|
|
261
261
|
for (let n = 0; n < o.length; ++n) {
|
|
262
|
-
const
|
|
263
|
-
if (
|
|
264
|
-
const
|
|
265
|
-
for (let l = 0, g =
|
|
266
|
-
const f =
|
|
267
|
-
r.setComponent(l +
|
|
262
|
+
const b = o[n];
|
|
263
|
+
if (b.isInterleavedBufferAttribute) {
|
|
264
|
+
const d = c / a;
|
|
265
|
+
for (let l = 0, g = b.count; l < g; l++) for (let h = 0; h < a; h++) {
|
|
266
|
+
const f = b.getComponent(l, h);
|
|
267
|
+
r.setComponent(l + d, h, f);
|
|
268
268
|
}
|
|
269
|
-
} else s.set(
|
|
270
|
-
c +=
|
|
269
|
+
} else s.set(b.array, c);
|
|
270
|
+
c += b.count * a;
|
|
271
271
|
}
|
|
272
272
|
return A !== void 0 && (r.gpuType = A), r;
|
|
273
273
|
}
|
|
@@ -304,35 +304,35 @@ class xt {
|
|
|
304
304
|
console.assert(r === "b3dm");
|
|
305
305
|
const c = s.getUint32(8, !0);
|
|
306
306
|
console.assert(c === e.byteLength);
|
|
307
|
-
const n = s.getUint32(12, !0),
|
|
308
|
-
new zA(e, g.getData("BATCH_LENGTH"), h,
|
|
309
|
-
const f = h +
|
|
310
|
-
return new Promise(async (
|
|
311
|
-
await this.checkLoaderInitialized(), this.gltfLoader.parse(
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}),
|
|
316
|
-
}, (
|
|
317
|
-
console.error(
|
|
307
|
+
const n = s.getUint32(12, !0), b = s.getUint32(16, !0), d = s.getUint32(20, !0), l = s.getUint32(24, !0), g = new wt(e, 28, n, b), h = 28 + n + b;
|
|
308
|
+
new zA(e, g.getData("BATCH_LENGTH"), h, d, l);
|
|
309
|
+
const f = h + d + l, u = new Uint8Array(e, f, c - f).slice().buffer;
|
|
310
|
+
return new Promise(async (I, p) => {
|
|
311
|
+
await this.checkLoaderInitialized(), this.gltfLoader.parse(u, null, (B) => {
|
|
312
|
+
const C = g.getData("RTC_CENTER");
|
|
313
|
+
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((w) => {
|
|
314
|
+
w.isMesh && (A && w.applyMatrix4(i.zUpToYUpMatrix), a && a(w));
|
|
315
|
+
}), I(B.scene);
|
|
316
|
+
}, (B) => {
|
|
317
|
+
console.error(B);
|
|
318
318
|
});
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
parseB3DMInstanced(e, a, t, A, i) {
|
|
322
322
|
return this.parseB3DM(e, a, A, i).then((s) => {
|
|
323
323
|
let r, c = [], n = [];
|
|
324
|
-
s.updateWorldMatrix(!1, !0), s.traverse((
|
|
325
|
-
|
|
324
|
+
s.updateWorldMatrix(!1, !0), s.traverse((d) => {
|
|
325
|
+
d.isMesh && (d.geometry.applyMatrix4(d.matrixWorld), c.push(d.geometry), n.push(d.material));
|
|
326
326
|
});
|
|
327
|
-
let
|
|
327
|
+
let b = function(d) {
|
|
328
328
|
let l = /* @__PURE__ */ new Set();
|
|
329
|
-
return
|
|
329
|
+
return d.forEach((h) => {
|
|
330
330
|
for (let f in h.attributes) l.add(f);
|
|
331
|
-
}),
|
|
331
|
+
}), d.forEach((h) => {
|
|
332
332
|
l.forEach((f) => {
|
|
333
333
|
if (!h.attributes[f]) {
|
|
334
|
-
const
|
|
335
|
-
switch (
|
|
334
|
+
const u = function(p) {
|
|
335
|
+
switch (p) {
|
|
336
336
|
case "position":
|
|
337
337
|
case "normal":
|
|
338
338
|
case "color":
|
|
@@ -341,40 +341,40 @@ class xt {
|
|
|
341
341
|
case "uv2":
|
|
342
342
|
return 2;
|
|
343
343
|
default:
|
|
344
|
-
throw new Error(`Unknown attribute ${
|
|
344
|
+
throw new Error(`Unknown attribute ${p}`);
|
|
345
345
|
}
|
|
346
|
-
}(f),
|
|
347
|
-
h.setAttribute(f, new m.BufferAttribute(
|
|
346
|
+
}(f), I = new Float32Array(u * h.getAttribute("position").count).fill(0);
|
|
347
|
+
h.setAttribute(f, new m.BufferAttribute(I, u));
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
}), function(h, f = !1) {
|
|
351
|
-
const
|
|
352
|
-
let
|
|
351
|
+
const u = h[0].index !== null, I = new Set(Object.keys(h[0].attributes)), p = new Set(Object.keys(h[0].morphAttributes)), B = {}, C = {}, w = h[0].morphTargetsRelative, x = new Sa();
|
|
352
|
+
let y = 0;
|
|
353
353
|
for (let E = 0; E < h.length; ++E) {
|
|
354
354
|
const Q = h[E];
|
|
355
355
|
let k = 0;
|
|
356
|
-
if (
|
|
356
|
+
if (u !== (Q.index !== null)) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + E + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."), null;
|
|
357
357
|
for (const D in Q.attributes) {
|
|
358
|
-
if (!
|
|
359
|
-
|
|
358
|
+
if (!I.has(D)) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + E + '. All geometries must have compatible attributes; make sure "' + D + '" attribute exists among all geometries, or in none of them.'), null;
|
|
359
|
+
B[D] === void 0 && (B[D] = []), B[D].push(Q.attributes[D]), k++;
|
|
360
360
|
}
|
|
361
|
-
if (k !==
|
|
362
|
-
if (
|
|
361
|
+
if (k !== I.size) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + E + ". Make sure all geometries have the same number of attributes."), null;
|
|
362
|
+
if (w !== Q.morphTargetsRelative) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + E + ". .morphTargetsRelative must be consistent throughout all geometries."), null;
|
|
363
363
|
for (const D in Q.morphAttributes) {
|
|
364
|
-
if (!
|
|
365
|
-
|
|
364
|
+
if (!p.has(D)) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + E + ". .morphAttributes must be consistent throughout all geometries."), null;
|
|
365
|
+
C[D] === void 0 && (C[D] = []), C[D].push(Q.morphAttributes[D]);
|
|
366
366
|
}
|
|
367
367
|
if (f) {
|
|
368
368
|
let D;
|
|
369
|
-
if (
|
|
369
|
+
if (u) D = Q.index.count;
|
|
370
370
|
else {
|
|
371
371
|
if (Q.attributes.position === void 0) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + E + ". The geometry must have either an index or a position attribute"), null;
|
|
372
372
|
D = Q.attributes.position.count;
|
|
373
373
|
}
|
|
374
|
-
x.addGroup(
|
|
374
|
+
x.addGroup(y, D, E), y += D;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
if (
|
|
377
|
+
if (u) {
|
|
378
378
|
let E = 0;
|
|
379
379
|
const Q = [];
|
|
380
380
|
for (let k = 0; k < h.length; ++k) {
|
|
@@ -384,27 +384,27 @@ class xt {
|
|
|
384
384
|
}
|
|
385
385
|
x.setIndex(Q);
|
|
386
386
|
}
|
|
387
|
-
for (const E in
|
|
388
|
-
const Q = Xa(
|
|
387
|
+
for (const E in B) {
|
|
388
|
+
const Q = Xa(B[E]);
|
|
389
389
|
if (!Q) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + E + " attribute."), null;
|
|
390
390
|
x.setAttribute(E, Q);
|
|
391
391
|
}
|
|
392
|
-
for (const E in
|
|
393
|
-
const Q =
|
|
392
|
+
for (const E in C) {
|
|
393
|
+
const Q = C[E][0].length;
|
|
394
394
|
if (Q === 0) break;
|
|
395
395
|
x.morphAttributes = x.morphAttributes || {}, x.morphAttributes[E] = [];
|
|
396
396
|
for (let k = 0; k < Q; ++k) {
|
|
397
397
|
const D = [];
|
|
398
|
-
for (let _ = 0; _ <
|
|
398
|
+
for (let _ = 0; _ < C[E].length; ++_) D.push(C[E][_][k]);
|
|
399
399
|
const v = Xa(D);
|
|
400
400
|
if (!v) return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + E + " morphAttribute."), null;
|
|
401
401
|
x.morphAttributes[E].push(v);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
return x;
|
|
405
|
-
}(
|
|
405
|
+
}(d, !0);
|
|
406
406
|
}(c);
|
|
407
|
-
return r = new m.InstancedMesh(
|
|
407
|
+
return r = new m.InstancedMesh(b, n, t), r.baseMatrix = new m.Matrix4().identity(), r;
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
@@ -443,7 +443,7 @@ class ZA {
|
|
|
443
443
|
return new Promise(async (s, r) => {
|
|
444
444
|
await i.checkLoaderInitialized(), i.gltfLoader.parse(e, null, (c) => {
|
|
445
445
|
c.scene;
|
|
446
|
-
const n = c.scene.children[0],
|
|
446
|
+
const n = c.scene.children[0], b = n.geometry.attributes.position, d = n.geometry.attributes.color, l = n.geometry.attributes.cov_0, g = n.geometry.attributes.cov_1, h = A.addSplatsTile(b, d, l, g);
|
|
447
447
|
c.scene.traverse((f) => {
|
|
448
448
|
f.dispose && f.dispose();
|
|
449
449
|
}), s(h);
|
|
@@ -502,14 +502,14 @@ class Dt extends Fa {
|
|
|
502
502
|
this.manager.itemStart(e);
|
|
503
503
|
const r = function(n) {
|
|
504
504
|
A ? A(n) : console.error(n), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
505
|
-
}, c = new
|
|
505
|
+
}, c = new Ce(this.manager);
|
|
506
506
|
c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(e, function(n) {
|
|
507
507
|
try {
|
|
508
|
-
i.parse(n, s, function(
|
|
509
|
-
a(
|
|
508
|
+
i.parse(n, s, function(b) {
|
|
509
|
+
a(b), i.manager.itemEnd(e);
|
|
510
510
|
}, r);
|
|
511
|
-
} catch (
|
|
512
|
-
r(
|
|
511
|
+
} catch (b) {
|
|
512
|
+
r(b);
|
|
513
513
|
}
|
|
514
514
|
}, t, r);
|
|
515
515
|
}
|
|
@@ -535,9 +535,9 @@ class Dt extends Fa {
|
|
|
535
535
|
else if (e instanceof ArrayBuffer)
|
|
536
536
|
if (c.decode(new Uint8Array(e, 0, 4)) === jt) {
|
|
537
537
|
try {
|
|
538
|
-
s[j.KHR_BINARY_GLTF] = new
|
|
539
|
-
} catch (
|
|
540
|
-
return void (A && A(
|
|
538
|
+
s[j.KHR_BINARY_GLTF] = new Bi(e);
|
|
539
|
+
} catch (b) {
|
|
540
|
+
return void (A && A(b));
|
|
541
541
|
}
|
|
542
542
|
i = JSON.parse(s[j.KHR_BINARY_GLTF].content);
|
|
543
543
|
} else i = JSON.parse(c.decode(e));
|
|
@@ -545,27 +545,27 @@ class Dt extends Fa {
|
|
|
545
545
|
if (i.asset === void 0 || i.asset.version[0] < 2) return void (A && A(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));
|
|
546
546
|
const n = new Fi(i, { path: a || this.resourcePath || "", crossOrigin: this.crossOrigin, requestHeader: this.requestHeader, manager: this.manager, ktx2Loader: this.ktx2Loader, meshoptDecoder: this.meshoptDecoder });
|
|
547
547
|
n.fileLoader.setRequestHeader(this.requestHeader);
|
|
548
|
-
for (let
|
|
549
|
-
const
|
|
550
|
-
|
|
548
|
+
for (let b = 0; b < this.pluginCallbacks.length; b++) {
|
|
549
|
+
const d = this.pluginCallbacks[b](n);
|
|
550
|
+
d.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), r[d.name] = d, s[d.name] = !0;
|
|
551
551
|
}
|
|
552
|
-
if (i.extensionsUsed) for (let
|
|
553
|
-
const
|
|
554
|
-
switch (
|
|
552
|
+
if (i.extensionsUsed) for (let b = 0; b < i.extensionsUsed.length; ++b) {
|
|
553
|
+
const d = i.extensionsUsed[b], l = i.extensionsRequired || [];
|
|
554
|
+
switch (d) {
|
|
555
555
|
case j.KHR_MATERIALS_UNLIT:
|
|
556
|
-
s[
|
|
556
|
+
s[d] = new ai();
|
|
557
557
|
break;
|
|
558
558
|
case j.KHR_DRACO_MESH_COMPRESSION:
|
|
559
|
-
s[
|
|
559
|
+
s[d] = new Ei(i, this.dracoLoader);
|
|
560
560
|
break;
|
|
561
561
|
case j.KHR_TEXTURE_TRANSFORM:
|
|
562
|
-
s[
|
|
562
|
+
s[d] = new mi();
|
|
563
563
|
break;
|
|
564
564
|
case j.KHR_MESH_QUANTIZATION:
|
|
565
|
-
s[
|
|
565
|
+
s[d] = new Qi();
|
|
566
566
|
break;
|
|
567
567
|
default:
|
|
568
|
-
l.indexOf(
|
|
568
|
+
l.indexOf(d) >= 0 && r[d] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + d + '".');
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
n.setExtensions(s), n.setPlugins(r), n.parse(t, A);
|
|
@@ -681,7 +681,7 @@ class Ai {
|
|
|
681
681
|
const i = [], s = A.extensions[this.name];
|
|
682
682
|
if (s.clearcoatFactor !== void 0 && (a.clearcoat = s.clearcoatFactor), s.clearcoatTexture !== void 0 && i.push(t.assignTexture(a, "clearcoatMap", s.clearcoatTexture)), s.clearcoatRoughnessFactor !== void 0 && (a.clearcoatRoughness = s.clearcoatRoughnessFactor), s.clearcoatRoughnessTexture !== void 0 && i.push(t.assignTexture(a, "clearcoatRoughnessMap", s.clearcoatRoughnessTexture)), s.clearcoatNormalTexture !== void 0 && (i.push(t.assignTexture(a, "clearcoatNormalMap", s.clearcoatNormalTexture)), s.clearcoatNormalTexture.scale !== void 0)) {
|
|
683
683
|
const r = s.clearcoatNormalTexture.scale;
|
|
684
|
-
a.clearcoatNormalScale = new
|
|
684
|
+
a.clearcoatNormalScale = new pt(r, r);
|
|
685
685
|
}
|
|
686
686
|
return Promise.all(i);
|
|
687
687
|
}
|
|
@@ -915,12 +915,12 @@ class Ii {
|
|
|
915
915
|
return null;
|
|
916
916
|
}
|
|
917
917
|
return i.then(function(r) {
|
|
918
|
-
const c = A.byteOffset || 0, n = A.byteLength || 0,
|
|
919
|
-
return s.decodeGltfBufferAsync ? s.decodeGltfBufferAsync(
|
|
918
|
+
const c = A.byteOffset || 0, n = A.byteLength || 0, b = A.count, d = A.byteStride, l = new Uint8Array(r, c, n);
|
|
919
|
+
return s.decodeGltfBufferAsync ? s.decodeGltfBufferAsync(b, d, l, A.mode, A.filter).then(function(g) {
|
|
920
920
|
return g.buffer;
|
|
921
921
|
}) : s.ready.then(function() {
|
|
922
|
-
const g = new ArrayBuffer(
|
|
923
|
-
return s.decodeGltfBuffer(new Uint8Array(g),
|
|
922
|
+
const g = new ArrayBuffer(b * d);
|
|
923
|
+
return s.decodeGltfBuffer(new Uint8Array(g), b, d, l, A.mode, A.filter), g;
|
|
924
924
|
});
|
|
925
925
|
});
|
|
926
926
|
}
|
|
@@ -939,22 +939,22 @@ class ui {
|
|
|
939
939
|
const i = t.extensions[this.name].attributes, s = [], r = {};
|
|
940
940
|
for (const c in i) s.push(this.parser.getDependency("accessor", i[c]).then((n) => (r[c] = n, r[c])));
|
|
941
941
|
return s.length < 1 ? null : (s.push(this.parser.createNodeMesh(e)), Promise.all(s).then((c) => {
|
|
942
|
-
const n = c.pop(),
|
|
943
|
-
for (const g of
|
|
944
|
-
const h = new De(), f = new S(),
|
|
945
|
-
for (let
|
|
946
|
-
for (const
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
} else
|
|
950
|
-
|
|
942
|
+
const n = c.pop(), b = n.isGroup ? n.children : [n], d = c[0].count, l = [];
|
|
943
|
+
for (const g of b) {
|
|
944
|
+
const h = new De(), f = new S(), u = new Ct(), I = new S(1, 1, 1), p = new AA(g.geometry, g.material, d);
|
|
945
|
+
for (let B = 0; B < d; B++) r.TRANSLATION && f.fromBufferAttribute(r.TRANSLATION, B), r.ROTATION && u.fromBufferAttribute(r.ROTATION, B), r.SCALE && I.fromBufferAttribute(r.SCALE, B), p.setMatrixAt(B, h.compose(f, u, I));
|
|
946
|
+
for (const B in r) if (B === "_COLOR_0") {
|
|
947
|
+
const C = r[B];
|
|
948
|
+
p.instanceColor = new Qa(C.array, C.itemSize, C.normalized);
|
|
949
|
+
} else B !== "TRANSLATION" && B !== "ROTATION" && B !== "SCALE" && g.geometry.setAttribute(B, r[B]);
|
|
950
|
+
Bt.prototype.copy.call(p, g), this.parser.assignFinalMaterial(p), l.push(p);
|
|
951
951
|
}
|
|
952
952
|
return n.isGroup ? (n.clear(), n.add(...l), n) : l[0];
|
|
953
953
|
}));
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
|
-
const jt = "glTF",
|
|
957
|
-
class
|
|
956
|
+
const jt = "glTF", pi = 1313821514, Ci = 5130562;
|
|
957
|
+
class Bi {
|
|
958
958
|
constructor(e) {
|
|
959
959
|
this.name = j.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
960
960
|
const a = new DataView(e, 0, 12), t = new TextDecoder();
|
|
@@ -966,10 +966,10 @@ class pi {
|
|
|
966
966
|
const r = i.getUint32(s, !0);
|
|
967
967
|
s += 4;
|
|
968
968
|
const c = i.getUint32(s, !0);
|
|
969
|
-
if (s += 4, c ===
|
|
969
|
+
if (s += 4, c === pi) {
|
|
970
970
|
const n = new Uint8Array(e, 12 + s, r);
|
|
971
971
|
this.content = t.decode(n);
|
|
972
|
-
} else if (c ===
|
|
972
|
+
} else if (c === Ci) {
|
|
973
973
|
const n = 12 + s;
|
|
974
974
|
this.body = e.slice(n, n + r);
|
|
975
975
|
}
|
|
@@ -985,25 +985,25 @@ class Ei {
|
|
|
985
985
|
}
|
|
986
986
|
decodePrimitive(e, a) {
|
|
987
987
|
const t = this.json, A = this.dracoLoader, i = e.extensions[this.name].bufferView, s = e.extensions[this.name].attributes, r = {}, c = {}, n = {};
|
|
988
|
-
for (const
|
|
989
|
-
const
|
|
990
|
-
r[
|
|
988
|
+
for (const b in s) {
|
|
989
|
+
const d = ka[b] || b.toLowerCase();
|
|
990
|
+
r[d] = s[b];
|
|
991
991
|
}
|
|
992
|
-
for (const
|
|
993
|
-
const
|
|
994
|
-
if (s[
|
|
995
|
-
const l = t.accessors[e.attributes[
|
|
996
|
-
n[
|
|
992
|
+
for (const b in e.attributes) {
|
|
993
|
+
const d = ka[b] || b.toLowerCase();
|
|
994
|
+
if (s[b] !== void 0) {
|
|
995
|
+
const l = t.accessors[e.attributes[b]], g = xe[l.componentType];
|
|
996
|
+
n[d] = g.name, c[d] = l.normalized === !0;
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
return a.getDependency("bufferView", i).then(function(
|
|
1000
|
-
return new Promise(function(
|
|
1001
|
-
A.decodeDracoFile(
|
|
999
|
+
return a.getDependency("bufferView", i).then(function(b) {
|
|
1000
|
+
return new Promise(function(d, l) {
|
|
1001
|
+
A.decodeDracoFile(b, function(g) {
|
|
1002
1002
|
for (const h in g.attributes) {
|
|
1003
|
-
const f = g.attributes[h],
|
|
1004
|
-
|
|
1003
|
+
const f = g.attributes[h], u = c[h];
|
|
1004
|
+
u !== void 0 && (f.normalized = u);
|
|
1005
1005
|
}
|
|
1006
|
-
|
|
1006
|
+
d(g);
|
|
1007
1007
|
}, r, n, K, l);
|
|
1008
1008
|
});
|
|
1009
1009
|
});
|
|
@@ -1032,15 +1032,15 @@ class Mt extends jA {
|
|
|
1032
1032
|
return a;
|
|
1033
1033
|
}
|
|
1034
1034
|
interpolate_(e, a, t, A) {
|
|
1035
|
-
const i = this.resultBuffer, s = this.sampleValues, r = this.valueSize, c = 2 * r, n = 3 * r,
|
|
1036
|
-
for (let
|
|
1037
|
-
const
|
|
1038
|
-
i[
|
|
1035
|
+
const i = this.resultBuffer, s = this.sampleValues, r = this.valueSize, c = 2 * r, n = 3 * r, b = A - a, d = (t - a) / b, l = d * d, g = l * d, h = e * n, f = h - n, u = -2 * g + 3 * l, I = g - l, p = 1 - u, B = I - l + d;
|
|
1036
|
+
for (let C = 0; C !== r; C++) {
|
|
1037
|
+
const w = s[f + C + r], x = s[f + C + c] * b, y = s[h + C + r], E = s[h + C] * b;
|
|
1038
|
+
i[C] = p * w + B * x + u * y + I * E;
|
|
1039
1039
|
}
|
|
1040
1040
|
return i;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
const yi = new
|
|
1043
|
+
const yi = new Ct();
|
|
1044
1044
|
class wi extends Mt {
|
|
1045
1045
|
interpolate_(e, a, t, A) {
|
|
1046
1046
|
const i = super.interpolate_(e, a, t, A);
|
|
@@ -1101,7 +1101,7 @@ class Fi {
|
|
|
1101
1101
|
const c = r.match(/Version\/(\d+)/);
|
|
1102
1102
|
A = t && c ? parseInt(c[1], 10) : -1, i = r.indexOf("Firefox") > -1, s = i ? r.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
1103
1103
|
}
|
|
1104
|
-
typeof createImageBitmap > "u" || t && A < 17 || i && s < 98 ? this.textureLoader = new iA(this.options.manager) : this.textureLoader = new sA(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new
|
|
1104
|
+
typeof createImageBitmap > "u" || t && A < 17 || i && s < 98 ? this.textureLoader = new iA(this.options.manager) : this.textureLoader = new sA(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Ce(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
1105
1105
|
}
|
|
1106
1106
|
setExtensions(e) {
|
|
1107
1107
|
this.extensions = e;
|
|
@@ -1146,7 +1146,7 @@ class Fi {
|
|
|
1146
1146
|
const A = t.clone(), i = (s, r) => {
|
|
1147
1147
|
const c = this.associations.get(s);
|
|
1148
1148
|
c != null && this.associations.set(r, c);
|
|
1149
|
-
for (const [n,
|
|
1149
|
+
for (const [n, b] of s.children.entries()) i(b, r.children[n]);
|
|
1150
1150
|
};
|
|
1151
1151
|
return i(t, A), A.name += "_instance_" + e.uses[a]++, A;
|
|
1152
1152
|
}
|
|
@@ -1264,23 +1264,23 @@ class Fi {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
const i = [];
|
|
1266
1266
|
return A.bufferView !== void 0 ? i.push(this.getDependency("bufferView", A.bufferView)) : i.push(null), A.sparse !== void 0 && (i.push(this.getDependency("bufferView", A.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", A.sparse.values.bufferView))), Promise.all(i).then(function(s) {
|
|
1267
|
-
const r = s[0], c = sa[A.type], n = xe[A.componentType],
|
|
1268
|
-
let f,
|
|
1269
|
-
if (g && g !==
|
|
1270
|
-
const
|
|
1271
|
-
let
|
|
1272
|
-
|
|
1273
|
-
} else f = r === null ? new n(A.count * c) : new n(r, l, A.count * c),
|
|
1267
|
+
const r = s[0], c = sa[A.type], n = xe[A.componentType], b = n.BYTES_PER_ELEMENT, d = b * c, l = A.byteOffset || 0, g = A.bufferView !== void 0 ? t.bufferViews[A.bufferView].byteStride : void 0, h = A.normalized === !0;
|
|
1268
|
+
let f, u;
|
|
1269
|
+
if (g && g !== d) {
|
|
1270
|
+
const I = Math.floor(l / g), p = "InterleavedBuffer:" + A.bufferView + ":" + A.componentType + ":" + I + ":" + A.count;
|
|
1271
|
+
let B = a.cache.get(p);
|
|
1272
|
+
B || (f = new n(r, I * g, A.count * g / b), B = new rA(f, g / b), a.cache.add(p, B)), u = new nA(B, c, l % g / b, h);
|
|
1273
|
+
} else f = r === null ? new n(A.count * c) : new n(r, l, A.count * c), u = new le(f, c, h);
|
|
1274
1274
|
if (A.sparse !== void 0) {
|
|
1275
|
-
const
|
|
1276
|
-
r !== null && (
|
|
1277
|
-
for (let
|
|
1278
|
-
const Q = y
|
|
1279
|
-
if (
|
|
1275
|
+
const I = sa.SCALAR, p = xe[A.sparse.indices.componentType], B = A.sparse.indices.byteOffset || 0, C = A.sparse.values.byteOffset || 0, w = new p(s[1], B, A.sparse.count * I), x = new n(s[2], C, A.sparse.count * c);
|
|
1276
|
+
r !== null && (u = new le(u.array.slice(), u.itemSize, u.normalized)), u.normalized = !1;
|
|
1277
|
+
for (let y = 0, E = w.length; y < E; y++) {
|
|
1278
|
+
const Q = w[y];
|
|
1279
|
+
if (u.setX(Q, x[y * c]), c >= 2 && u.setY(Q, x[y * c + 1]), c >= 3 && u.setZ(Q, x[y * c + 2]), c >= 4 && u.setW(Q, x[y * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1281
|
+
u.normalized = h;
|
|
1282
1282
|
}
|
|
1283
|
-
return
|
|
1283
|
+
return u;
|
|
1284
1284
|
});
|
|
1285
1285
|
}
|
|
1286
1286
|
loadTexture(e) {
|
|
@@ -1295,10 +1295,10 @@ class Fi {
|
|
|
1295
1295
|
loadTextureImage(e, a, t) {
|
|
1296
1296
|
const A = this, i = this.json, s = i.textures[e], r = i.images[a], c = (r.uri || r.bufferView) + ":" + s.sampler;
|
|
1297
1297
|
if (this.textureCache[c]) return this.textureCache[c];
|
|
1298
|
-
const n = this.loadImageSource(a, t).then(function(
|
|
1299
|
-
|
|
1300
|
-
const
|
|
1301
|
-
return
|
|
1298
|
+
const n = this.loadImageSource(a, t).then(function(b) {
|
|
1299
|
+
b.flipY = !1, b.name = s.name || r.name || "", b.name === "" && typeof r.uri == "string" && r.uri.startsWith("data:image/") === !1 && (b.name = r.uri);
|
|
1300
|
+
const d = (i.samplers || {})[s.sampler] || {};
|
|
1301
|
+
return b.magFilter = $a[d.magFilter] || He, b.minFilter = $a[d.minFilter] || va, b.wrapS = et[d.wrapS] || ya, b.wrapT = et[d.wrapT] || ya, b.generateMipmaps = !b.isCompressedTexture && b.minFilter !== M && b.minFilter !== He, A.associations.set(b, { textures: e }), b;
|
|
1302
1302
|
}).catch(function() {
|
|
1303
1303
|
return null;
|
|
1304
1304
|
});
|
|
@@ -1306,30 +1306,30 @@ class Fi {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
loadImageSource(e, a) {
|
|
1308
1308
|
const t = this, A = this.json, i = this.options;
|
|
1309
|
-
if (this.sourceCache[e] !== void 0) return this.sourceCache[e].then((
|
|
1309
|
+
if (this.sourceCache[e] !== void 0) return this.sourceCache[e].then((d) => d.clone());
|
|
1310
1310
|
const s = A.images[e], r = self.URL || self.webkitURL;
|
|
1311
1311
|
let c = s.uri || "", n = !1;
|
|
1312
|
-
if (s.bufferView !== void 0) c = t.getDependency("bufferView", s.bufferView).then(function(
|
|
1312
|
+
if (s.bufferView !== void 0) c = t.getDependency("bufferView", s.bufferView).then(function(d) {
|
|
1313
1313
|
n = !0;
|
|
1314
|
-
const l = new Blob([
|
|
1314
|
+
const l = new Blob([d], { type: s.mimeType });
|
|
1315
1315
|
return c = r.createObjectURL(l), c;
|
|
1316
1316
|
});
|
|
1317
1317
|
else if (s.uri === void 0) throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
|
|
1318
|
-
const
|
|
1318
|
+
const b = Promise.resolve(c).then(function(d) {
|
|
1319
1319
|
return new Promise(function(l, g) {
|
|
1320
1320
|
let h = l;
|
|
1321
1321
|
a.isImageBitmapLoader === !0 && (h = function(f) {
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1324
|
-
}), a.load(Ne.resolveURL(
|
|
1322
|
+
const u = new Na(f);
|
|
1323
|
+
u.needsUpdate = !0, l(u);
|
|
1324
|
+
}), a.load(Ne.resolveURL(d, i.path), h, void 0, g);
|
|
1325
1325
|
});
|
|
1326
|
-
}).then(function(
|
|
1326
|
+
}).then(function(d) {
|
|
1327
1327
|
var l;
|
|
1328
|
-
return n === !0 && r.revokeObjectURL(c), ie(
|
|
1329
|
-
}).catch(function(
|
|
1330
|
-
throw console.error("THREE.GLTFLoader: Couldn't load texture", c),
|
|
1328
|
+
return n === !0 && r.revokeObjectURL(c), ie(d, s), d.userData.mimeType = s.mimeType || ((l = s.uri).search(/\.jpe?g($|\?)/i) > 0 || l.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : l.search(/\.webp($|\?)/i) > 0 || l.search(/^data\:image\/webp/) === 0 ? "image/webp" : l.search(/\.ktx2($|\?)/i) > 0 || l.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png"), d;
|
|
1329
|
+
}).catch(function(d) {
|
|
1330
|
+
throw console.error("THREE.GLTFLoader: Couldn't load texture", c), d;
|
|
1331
1331
|
});
|
|
1332
|
-
return this.sourceCache[e] =
|
|
1332
|
+
return this.sourceCache[e] = b, b;
|
|
1333
1333
|
}
|
|
1334
1334
|
assignTexture(e, a, t, A) {
|
|
1335
1335
|
const i = this;
|
|
@@ -1374,33 +1374,33 @@ class Fi {
|
|
|
1374
1374
|
let s;
|
|
1375
1375
|
const r = {}, c = [];
|
|
1376
1376
|
if ((i.extensions || {})[j.KHR_MATERIALS_UNLIT]) {
|
|
1377
|
-
const
|
|
1378
|
-
s =
|
|
1377
|
+
const b = A[j.KHR_MATERIALS_UNLIT];
|
|
1378
|
+
s = b.getMaterialType(), c.push(b.extendParams(r, i, a));
|
|
1379
1379
|
} else {
|
|
1380
|
-
const
|
|
1381
|
-
if (r.color = new he(1, 1, 1), r.opacity = 1, Array.isArray(
|
|
1382
|
-
const
|
|
1383
|
-
r.color.setRGB(
|
|
1380
|
+
const b = i.pbrMetallicRoughness || {};
|
|
1381
|
+
if (r.color = new he(1, 1, 1), r.opacity = 1, Array.isArray(b.baseColorFactor)) {
|
|
1382
|
+
const d = b.baseColorFactor;
|
|
1383
|
+
r.color.setRGB(d[0], d[1], d[2], K), r.opacity = d[3];
|
|
1384
1384
|
}
|
|
1385
|
-
|
|
1386
|
-
return
|
|
1387
|
-
}), c.push(Promise.all(this._invokeAll(function(
|
|
1388
|
-
return
|
|
1385
|
+
b.baseColorTexture !== void 0 && c.push(a.assignTexture(r, "map", b.baseColorTexture, re)), r.metalness = b.metallicFactor !== void 0 ? b.metallicFactor : 1, r.roughness = b.roughnessFactor !== void 0 ? b.roughnessFactor : 1, b.metallicRoughnessTexture !== void 0 && (c.push(a.assignTexture(r, "metalnessMap", b.metallicRoughnessTexture)), c.push(a.assignTexture(r, "roughnessMap", b.metallicRoughnessTexture))), s = this._invokeOne(function(d) {
|
|
1386
|
+
return d.getMaterialType && d.getMaterialType(e);
|
|
1387
|
+
}), c.push(Promise.all(this._invokeAll(function(d) {
|
|
1388
|
+
return d.extendMaterialParams && d.extendMaterialParams(e, r);
|
|
1389
1389
|
})));
|
|
1390
1390
|
}
|
|
1391
1391
|
i.doubleSided === !0 && (r.side = dA);
|
|
1392
1392
|
const n = i.alphaMode || ki;
|
|
1393
|
-
if (n === ji ? (r.transparent = !0, r.depthWrite = !1) : (r.transparent = !1, n === Di && (r.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && s !== Te && (c.push(a.assignTexture(r, "normalMap", i.normalTexture)), r.normalScale = new
|
|
1394
|
-
const
|
|
1395
|
-
r.normalScale.set(
|
|
1393
|
+
if (n === ji ? (r.transparent = !0, r.depthWrite = !1) : (r.transparent = !1, n === Di && (r.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && s !== Te && (c.push(a.assignTexture(r, "normalMap", i.normalTexture)), r.normalScale = new pt(1, 1), i.normalTexture.scale !== void 0)) {
|
|
1394
|
+
const b = i.normalTexture.scale;
|
|
1395
|
+
r.normalScale.set(b, b);
|
|
1396
1396
|
}
|
|
1397
1397
|
if (i.occlusionTexture !== void 0 && s !== Te && (c.push(a.assignTexture(r, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (r.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && s !== Te) {
|
|
1398
|
-
const
|
|
1399
|
-
r.emissive = new he().setRGB(
|
|
1398
|
+
const b = i.emissiveFactor;
|
|
1399
|
+
r.emissive = new he().setRGB(b[0], b[1], b[2], K);
|
|
1400
1400
|
}
|
|
1401
1401
|
return i.emissiveTexture !== void 0 && s !== Te && c.push(a.assignTexture(r, "emissiveMap", i.emissiveTexture, re)), Promise.all(c).then(function() {
|
|
1402
|
-
const
|
|
1403
|
-
return i.name && (
|
|
1402
|
+
const b = new s(r);
|
|
1403
|
+
return i.name && (b.name = i.name), ie(b, i), a.associations.set(b, { materials: e }), i.extensions && fe(A, b, i), b;
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
1406
|
createUniqueName(e) {
|
|
@@ -1416,37 +1416,37 @@ class Fi {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
const s = [];
|
|
1418
1418
|
for (let r = 0, c = e.length; r < c; r++) {
|
|
1419
|
-
const n = e[r],
|
|
1420
|
-
if (
|
|
1419
|
+
const n = e[r], b = Ri(n), d = A[b];
|
|
1420
|
+
if (d) s.push(d.promise);
|
|
1421
1421
|
else {
|
|
1422
1422
|
let l;
|
|
1423
|
-
l = n.extensions && n.extensions[j.KHR_DRACO_MESH_COMPRESSION] ? i(n) : at(new Sa(), n, a), A[
|
|
1423
|
+
l = n.extensions && n.extensions[j.KHR_DRACO_MESH_COMPRESSION] ? i(n) : at(new Sa(), n, a), A[b] = { primitive: n, promise: l }, s.push(l);
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
return Promise.all(s);
|
|
1427
1427
|
}
|
|
1428
1428
|
loadMesh(e) {
|
|
1429
1429
|
const a = this, t = this.json, A = this.extensions, i = t.meshes[e], s = i.primitives, r = [];
|
|
1430
|
-
for (let n = 0,
|
|
1431
|
-
const
|
|
1432
|
-
r.push(
|
|
1430
|
+
for (let n = 0, b = s.length; n < b; n++) {
|
|
1431
|
+
const d = s[n].material === void 0 ? ((c = this.cache).DefaultMaterial === void 0 && (c.DefaultMaterial = new Ua({ color: 16777215, emissive: 0, metalness: 1, roughness: 1, transparent: !1, depthTest: !0, side: Ze })), c.DefaultMaterial) : this.getDependency("material", s[n].material);
|
|
1432
|
+
r.push(d);
|
|
1433
1433
|
}
|
|
1434
1434
|
var c;
|
|
1435
1435
|
return r.push(a.loadGeometries(s)), Promise.all(r).then(function(n) {
|
|
1436
|
-
const
|
|
1437
|
-
for (let h = 0, f =
|
|
1438
|
-
const
|
|
1439
|
-
let
|
|
1440
|
-
const
|
|
1441
|
-
if (
|
|
1442
|
-
else if (
|
|
1443
|
-
else if (
|
|
1444
|
-
else if (
|
|
1436
|
+
const b = n.slice(0, n.length - 1), d = n[n.length - 1], l = [];
|
|
1437
|
+
for (let h = 0, f = d.length; h < f; h++) {
|
|
1438
|
+
const u = d[h], I = s[h];
|
|
1439
|
+
let p;
|
|
1440
|
+
const B = b[h];
|
|
1441
|
+
if (I.mode === H.TRIANGLES || I.mode === H.TRIANGLE_STRIP || I.mode === H.TRIANGLE_FAN || I.mode === void 0) p = i.isSkinnedMesh === !0 ? new lA(u, B) : new wa(u, B), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), I.mode === H.TRIANGLE_STRIP ? p.geometry = Za(p.geometry, ut) : I.mode === H.TRIANGLE_FAN && (p.geometry = Za(p.geometry, ma));
|
|
1442
|
+
else if (I.mode === H.LINES) p = new hA(u, B);
|
|
1443
|
+
else if (I.mode === H.LINE_STRIP) p = new gA(u, B);
|
|
1444
|
+
else if (I.mode === H.LINE_LOOP) p = new fA(u, B);
|
|
1445
1445
|
else {
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1446
|
+
if (I.mode !== H.POINTS) throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + I.mode);
|
|
1447
|
+
p = new IA(u, B);
|
|
1448
1448
|
}
|
|
1449
|
-
Object.keys(
|
|
1449
|
+
Object.keys(p.geometry.morphAttributes).length > 0 && Mi(p, i), p.name = a.createUniqueName(i.name || "mesh_" + e), ie(p, i), I.extensions && fe(A, p, I), a.assignFinalMaterial(p), l.push(p);
|
|
1450
1450
|
}
|
|
1451
1451
|
for (let h = 0, f = l.length; h < f; h++) a.associations.set(l[h], { meshes: e, primitives: h });
|
|
1452
1452
|
if (l.length === 1) return i.extensions && fe(A, l[0], i), l[0];
|
|
@@ -1459,7 +1459,7 @@ class Fi {
|
|
|
1459
1459
|
loadCamera(e) {
|
|
1460
1460
|
let a;
|
|
1461
1461
|
const t = this.json.cameras[e], A = t[t.type];
|
|
1462
|
-
if (A) return t.type === "perspective" ? a = new uA(
|
|
1462
|
+
if (A) return t.type === "perspective" ? a = new uA(pA.radToDeg(A.yfov), A.aspectRatio || 1, A.znear || 1, A.zfar || 2e6) : t.type === "orthographic" && (a = new Et(-A.xmag, A.xmag, A.ymag, -A.ymag, A.znear, A.zfar)), t.name && (a.name = this.createUniqueName(t.name)), ie(a, t), Promise.resolve(a);
|
|
1463
1463
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
1464
1464
|
}
|
|
1465
1465
|
loadSkin(e) {
|
|
@@ -1467,33 +1467,33 @@ class Fi {
|
|
|
1467
1467
|
for (let A = 0, i = a.joints.length; A < i; A++) t.push(this._loadNodeShallow(a.joints[A]));
|
|
1468
1468
|
return a.inverseBindMatrices !== void 0 ? t.push(this.getDependency("accessor", a.inverseBindMatrices)) : t.push(null), Promise.all(t).then(function(A) {
|
|
1469
1469
|
const i = A.pop(), s = A, r = [], c = [];
|
|
1470
|
-
for (let n = 0,
|
|
1471
|
-
const
|
|
1472
|
-
if (
|
|
1473
|
-
r.push(
|
|
1470
|
+
for (let n = 0, b = s.length; n < b; n++) {
|
|
1471
|
+
const d = s[n];
|
|
1472
|
+
if (d) {
|
|
1473
|
+
r.push(d);
|
|
1474
1474
|
const l = new De();
|
|
1475
1475
|
i !== null && l.fromArray(i.array, 16 * n), c.push(l);
|
|
1476
1476
|
} else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', a.joints[n]);
|
|
1477
1477
|
}
|
|
1478
|
-
return new
|
|
1478
|
+
return new CA(r, c);
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
1481
1481
|
loadAnimation(e) {
|
|
1482
|
-
const a = this.json, t = this, A = a.animations[e], i = A.name ? A.name : "animation_" + e, s = [], r = [], c = [], n = [],
|
|
1483
|
-
for (let
|
|
1484
|
-
const g = A.channels[
|
|
1485
|
-
f.node !== void 0 && (s.push(this.getDependency("node",
|
|
1482
|
+
const a = this.json, t = this, A = a.animations[e], i = A.name ? A.name : "animation_" + e, s = [], r = [], c = [], n = [], b = [];
|
|
1483
|
+
for (let d = 0, l = A.channels.length; d < l; d++) {
|
|
1484
|
+
const g = A.channels[d], h = A.samplers[g.sampler], f = g.target, u = f.node, I = A.parameters !== void 0 ? A.parameters[h.input] : h.input, p = A.parameters !== void 0 ? A.parameters[h.output] : h.output;
|
|
1485
|
+
f.node !== void 0 && (s.push(this.getDependency("node", u)), r.push(this.getDependency("accessor", I)), c.push(this.getDependency("accessor", p)), n.push(h), b.push(f));
|
|
1486
1486
|
}
|
|
1487
|
-
return Promise.all([Promise.all(s), Promise.all(r), Promise.all(c), Promise.all(n), Promise.all(
|
|
1488
|
-
const l =
|
|
1489
|
-
for (let
|
|
1490
|
-
const
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1493
|
-
const Q = t._createAnimationTracks(
|
|
1494
|
-
if (Q) for (let k = 0; k < Q.length; k++)
|
|
1487
|
+
return Promise.all([Promise.all(s), Promise.all(r), Promise.all(c), Promise.all(n), Promise.all(b)]).then(function(d) {
|
|
1488
|
+
const l = d[0], g = d[1], h = d[2], f = d[3], u = d[4], I = [];
|
|
1489
|
+
for (let p = 0, B = l.length; p < B; p++) {
|
|
1490
|
+
const C = l[p], w = g[p], x = h[p], y = f[p], E = u[p];
|
|
1491
|
+
if (C === void 0) continue;
|
|
1492
|
+
C.updateMatrix && C.updateMatrix();
|
|
1493
|
+
const Q = t._createAnimationTracks(C, w, x, y, E);
|
|
1494
|
+
if (Q) for (let k = 0; k < Q.length; k++) I.push(Q[k]);
|
|
1495
1495
|
}
|
|
1496
|
-
return new
|
|
1496
|
+
return new BA(i, void 0, I);
|
|
1497
1497
|
});
|
|
1498
1498
|
}
|
|
1499
1499
|
createNodeMesh(e) {
|
|
@@ -1510,11 +1510,11 @@ class Fi {
|
|
|
1510
1510
|
for (let c = 0, n = s.length; c < n; c++) i.push(a.getDependency("node", s[c]));
|
|
1511
1511
|
const r = t.skin === void 0 ? Promise.resolve(null) : a.getDependency("skin", t.skin);
|
|
1512
1512
|
return Promise.all([A, Promise.all(i), r]).then(function(c) {
|
|
1513
|
-
const n = c[0],
|
|
1514
|
-
|
|
1515
|
-
l.isSkinnedMesh && l.bind(
|
|
1513
|
+
const n = c[0], b = c[1], d = c[2];
|
|
1514
|
+
d !== null && n.traverse(function(l) {
|
|
1515
|
+
l.isSkinnedMesh && l.bind(d, Si);
|
|
1516
1516
|
});
|
|
1517
|
-
for (let l = 0, g =
|
|
1517
|
+
for (let l = 0, g = b.length; l < g; l++) n.add(b[l]);
|
|
1518
1518
|
return n;
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
@@ -1531,13 +1531,13 @@ class Fi {
|
|
|
1531
1531
|
}).forEach(function(n) {
|
|
1532
1532
|
r.push(n);
|
|
1533
1533
|
}), this.nodeCache[e] = Promise.all(r).then(function(n) {
|
|
1534
|
-
let
|
|
1535
|
-
if (
|
|
1536
|
-
if (i.name && (
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1539
|
-
} else i.translation !== void 0 &&
|
|
1540
|
-
return A.associations.has(
|
|
1534
|
+
let b;
|
|
1535
|
+
if (b = i.isBone === !0 ? new EA() : n.length > 1 ? new aa() : n.length === 1 ? n[0] : new Bt(), b !== n[0]) for (let d = 0, l = n.length; d < l; d++) b.add(n[d]);
|
|
1536
|
+
if (i.name && (b.userData.name = i.name, b.name = s), ie(b, i), i.extensions && fe(t, b, i), i.matrix !== void 0) {
|
|
1537
|
+
const d = new De();
|
|
1538
|
+
d.fromArray(i.matrix), b.applyMatrix4(d);
|
|
1539
|
+
} else i.translation !== void 0 && b.position.fromArray(i.translation), i.rotation !== void 0 && b.quaternion.fromArray(i.rotation), i.scale !== void 0 && b.scale.fromArray(i.scale);
|
|
1540
|
+
return A.associations.has(b) || A.associations.set(b, {}), A.associations.get(b).nodes = e, b;
|
|
1541
1541
|
}), this.nodeCache[e];
|
|
1542
1542
|
}
|
|
1543
1543
|
loadScene(e) {
|
|
@@ -1546,14 +1546,14 @@ class Fi {
|
|
|
1546
1546
|
const s = t.nodes || [], r = [];
|
|
1547
1547
|
for (let c = 0, n = s.length; c < n; c++) r.push(A.getDependency("node", s[c]));
|
|
1548
1548
|
return Promise.all(r).then(function(c) {
|
|
1549
|
-
for (let n = 0,
|
|
1549
|
+
for (let n = 0, b = c.length; n < b; n++) i.add(c[n]);
|
|
1550
1550
|
return A.associations = ((n) => {
|
|
1551
|
-
const
|
|
1552
|
-
for (const [
|
|
1553
|
-
return n.traverse((
|
|
1554
|
-
const l = A.associations.get(
|
|
1555
|
-
l != null &&
|
|
1556
|
-
}),
|
|
1551
|
+
const b = /* @__PURE__ */ new Map();
|
|
1552
|
+
for (const [d, l] of A.associations) (d instanceof ea || d instanceof Na) && b.set(d, l);
|
|
1553
|
+
return n.traverse((d) => {
|
|
1554
|
+
const l = A.associations.get(d);
|
|
1555
|
+
l != null && b.set(d, l);
|
|
1556
|
+
}), b;
|
|
1557
1557
|
})(i), i;
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
@@ -1576,9 +1576,9 @@ class Fi {
|
|
|
1576
1576
|
default:
|
|
1577
1577
|
t.itemSize === 1 ? n = _a : n = Pa;
|
|
1578
1578
|
}
|
|
1579
|
-
const
|
|
1579
|
+
const b = A.interpolation !== void 0 ? xi[A.interpolation] : mt, d = this._getArrayFromAccessor(t);
|
|
1580
1580
|
for (let l = 0, g = c.length; l < g; l++) {
|
|
1581
|
-
const h = new n(c[l] + "." + oe[i.path], a.array,
|
|
1581
|
+
const h = new n(c[l] + "." + oe[i.path], a.array, d, b);
|
|
1582
1582
|
A.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(h), s.push(h);
|
|
1583
1583
|
}
|
|
1584
1584
|
return s;
|
|
@@ -1616,64 +1616,64 @@ function at(o, e, a) {
|
|
|
1616
1616
|
A.push(s);
|
|
1617
1617
|
}
|
|
1618
1618
|
return xa.workingColorSpace !== K && "COLOR_0" in t && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${xa.workingColorSpace}" not supported.`), ie(o, e), function(s, r, c) {
|
|
1619
|
-
const n = r.attributes,
|
|
1619
|
+
const n = r.attributes, b = new Ra();
|
|
1620
1620
|
if (n.POSITION === void 0) return;
|
|
1621
1621
|
{
|
|
1622
1622
|
const g = c.json.accessors[n.POSITION], h = g.min, f = g.max;
|
|
1623
1623
|
if (h === void 0 || f === void 0) return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1624
|
-
if (
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1624
|
+
if (b.set(new S(h[0], h[1], h[2]), new S(f[0], f[1], f[2])), g.normalized) {
|
|
1625
|
+
const u = Da(xe[g.componentType]);
|
|
1626
|
+
b.min.multiplyScalar(u), b.max.multiplyScalar(u);
|
|
1627
1627
|
}
|
|
1628
1628
|
}
|
|
1629
|
-
const
|
|
1630
|
-
if (
|
|
1629
|
+
const d = r.targets;
|
|
1630
|
+
if (d !== void 0) {
|
|
1631
1631
|
const g = new S(), h = new S();
|
|
1632
|
-
for (let f = 0,
|
|
1633
|
-
const
|
|
1634
|
-
if (
|
|
1635
|
-
const
|
|
1636
|
-
if (
|
|
1637
|
-
if (h.setX(Math.max(Math.abs(
|
|
1638
|
-
const
|
|
1639
|
-
h.multiplyScalar(
|
|
1632
|
+
for (let f = 0, u = d.length; f < u; f++) {
|
|
1633
|
+
const I = d[f];
|
|
1634
|
+
if (I.POSITION !== void 0) {
|
|
1635
|
+
const p = c.json.accessors[I.POSITION], B = p.min, C = p.max;
|
|
1636
|
+
if (B !== void 0 && C !== void 0) {
|
|
1637
|
+
if (h.setX(Math.max(Math.abs(B[0]), Math.abs(C[0]))), h.setY(Math.max(Math.abs(B[1]), Math.abs(C[1]))), h.setZ(Math.max(Math.abs(B[2]), Math.abs(C[2]))), p.normalized) {
|
|
1638
|
+
const w = Da(xe[p.componentType]);
|
|
1639
|
+
h.multiplyScalar(w);
|
|
1640
1640
|
}
|
|
1641
1641
|
g.max(h);
|
|
1642
1642
|
} else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
|
-
|
|
1645
|
+
b.expandByVector(g);
|
|
1646
1646
|
}
|
|
1647
|
-
s.boundingBox =
|
|
1647
|
+
s.boundingBox = b;
|
|
1648
1648
|
const l = new DA();
|
|
1649
|
-
|
|
1649
|
+
b.getCenter(l.center), l.radius = b.min.distanceTo(b.max) / 2, s.boundingSphere = l;
|
|
1650
1650
|
}(o, e, a), Promise.all(A).then(function() {
|
|
1651
1651
|
return e.targets !== void 0 ? function(s, r, c) {
|
|
1652
|
-
let n = !1,
|
|
1653
|
-
for (let f = 0,
|
|
1654
|
-
const
|
|
1655
|
-
if (
|
|
1652
|
+
let n = !1, b = !1, d = !1;
|
|
1653
|
+
for (let f = 0, u = r.length; f < u; f++) {
|
|
1654
|
+
const I = r[f];
|
|
1655
|
+
if (I.POSITION !== void 0 && (n = !0), I.NORMAL !== void 0 && (b = !0), I.COLOR_0 !== void 0 && (d = !0), n && b && d) break;
|
|
1656
1656
|
}
|
|
1657
|
-
if (!n && !
|
|
1657
|
+
if (!n && !b && !d) return Promise.resolve(s);
|
|
1658
1658
|
const l = [], g = [], h = [];
|
|
1659
|
-
for (let f = 0,
|
|
1660
|
-
const
|
|
1659
|
+
for (let f = 0, u = r.length; f < u; f++) {
|
|
1660
|
+
const I = r[f];
|
|
1661
1661
|
if (n) {
|
|
1662
|
-
const
|
|
1663
|
-
l.push(
|
|
1664
|
-
}
|
|
1665
|
-
if (d) {
|
|
1666
|
-
const C = u.NORMAL !== void 0 ? c.getDependency("accessor", u.NORMAL) : s.attributes.normal;
|
|
1667
|
-
g.push(C);
|
|
1662
|
+
const p = I.POSITION !== void 0 ? c.getDependency("accessor", I.POSITION) : s.attributes.position;
|
|
1663
|
+
l.push(p);
|
|
1668
1664
|
}
|
|
1669
1665
|
if (b) {
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1666
|
+
const p = I.NORMAL !== void 0 ? c.getDependency("accessor", I.NORMAL) : s.attributes.normal;
|
|
1667
|
+
g.push(p);
|
|
1668
|
+
}
|
|
1669
|
+
if (d) {
|
|
1670
|
+
const p = I.COLOR_0 !== void 0 ? c.getDependency("accessor", I.COLOR_0) : s.attributes.color;
|
|
1671
|
+
h.push(p);
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
1674
|
return Promise.all([Promise.all(l), Promise.all(g), Promise.all(h)]).then(function(f) {
|
|
1675
|
-
const
|
|
1676
|
-
return n && (s.morphAttributes.position =
|
|
1675
|
+
const u = f[0], I = f[1], p = f[2];
|
|
1676
|
+
return n && (s.morphAttributes.position = u), b && (s.morphAttributes.normal = I), d && (s.morphAttributes.color = p), s.morphTargetsRelative = !0, s;
|
|
1677
1677
|
});
|
|
1678
1678
|
}(o, e.targets, a) : o;
|
|
1679
1679
|
});
|
|
@@ -1693,7 +1693,7 @@ class Rt extends Fa {
|
|
|
1693
1693
|
return this.workerLimit = e, this;
|
|
1694
1694
|
}
|
|
1695
1695
|
load(e, a, t, A) {
|
|
1696
|
-
const i = new
|
|
1696
|
+
const i = new Ce(this.manager);
|
|
1697
1697
|
i.setPath(this.path), i.setResponseType("arraybuffer"), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, (s) => {
|
|
1698
1698
|
this.parse(s, a, A);
|
|
1699
1699
|
}, t, A);
|
|
@@ -1715,8 +1715,8 @@ class Rt extends Fa {
|
|
|
1715
1715
|
if (e.byteLength === 0) throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.");
|
|
1716
1716
|
}
|
|
1717
1717
|
let A;
|
|
1718
|
-
const i = this.workerNextTaskID++, s = e.byteLength, r = this._getWorker(i, s).then((c) => (A = c, new Promise((n,
|
|
1719
|
-
A._callbacks[i] = { resolve: n, reject:
|
|
1718
|
+
const i = this.workerNextTaskID++, s = e.byteLength, r = this._getWorker(i, s).then((c) => (A = c, new Promise((n, b) => {
|
|
1719
|
+
A._callbacks[i] = { resolve: n, reject: b }, A.postMessage({ type: "decode", id: i, taskConfig: a, buffer: e }, [e]);
|
|
1720
1720
|
}))).then((c) => this._createGeometry(c.geometry));
|
|
1721
1721
|
return r.catch(() => !0).then(() => {
|
|
1722
1722
|
A && i && this._releaseTask(A, i);
|
|
@@ -1737,7 +1737,7 @@ class Rt extends Fa {
|
|
|
1737
1737
|
for (let A = 0, i = e.count; A < i; A++) t.fromBufferAttribute(e, A), xa.toWorkingColorSpace(t, re), e.setXYZ(A, t.r, t.g, t.b);
|
|
1738
1738
|
}
|
|
1739
1739
|
_loadLibrary(e, a) {
|
|
1740
|
-
const t = new
|
|
1740
|
+
const t = new Ce(this.manager);
|
|
1741
1741
|
return t.setPath(this.decoderPath), t.setResponseType(a), t.setWithCredentials(this.withCredentials), new Promise((A, i) => {
|
|
1742
1742
|
t.load(e, A, void 0, i);
|
|
1743
1743
|
});
|
|
@@ -1794,8 +1794,8 @@ class Rt extends Fa {
|
|
|
1794
1794
|
function vi() {
|
|
1795
1795
|
let o, e;
|
|
1796
1796
|
function a(t, A, i, s, r, c) {
|
|
1797
|
-
const n = c.num_components(),
|
|
1798
|
-
switch (
|
|
1797
|
+
const n = c.num_components(), b = i.num_points() * n, d = b * r.BYTES_PER_ELEMENT, l = function(f, u) {
|
|
1798
|
+
switch (u) {
|
|
1799
1799
|
case Float32Array:
|
|
1800
1800
|
return f.DT_FLOAT32;
|
|
1801
1801
|
case Int8Array:
|
|
@@ -1811,9 +1811,9 @@ function vi() {
|
|
|
1811
1811
|
case Uint32Array:
|
|
1812
1812
|
return f.DT_UINT32;
|
|
1813
1813
|
}
|
|
1814
|
-
}(t, r), g = t._malloc(
|
|
1815
|
-
A.GetAttributeDataArrayForAllPoints(i, c, l,
|
|
1816
|
-
const h = new r(t.HEAPF32.buffer, g,
|
|
1814
|
+
}(t, r), g = t._malloc(d);
|
|
1815
|
+
A.GetAttributeDataArrayForAllPoints(i, c, l, d, g);
|
|
1816
|
+
const h = new r(t.HEAPF32.buffer, g, b).slice();
|
|
1817
1817
|
return t._free(g), { name: s, array: h, itemSize: n };
|
|
1818
1818
|
}
|
|
1819
1819
|
onmessage = function(t) {
|
|
@@ -1831,38 +1831,38 @@ function vi() {
|
|
|
1831
1831
|
e.then((r) => {
|
|
1832
1832
|
const c = r.draco, n = new c.Decoder();
|
|
1833
1833
|
try {
|
|
1834
|
-
const
|
|
1835
|
-
const
|
|
1836
|
-
let
|
|
1837
|
-
const
|
|
1838
|
-
if (
|
|
1834
|
+
const b = function(l, g, h, f) {
|
|
1835
|
+
const u = f.attributeIDs, I = f.attributeTypes;
|
|
1836
|
+
let p, B;
|
|
1837
|
+
const C = g.GetEncodedGeometryType(h);
|
|
1838
|
+
if (C === l.TRIANGULAR_MESH) p = new l.Mesh(), B = g.DecodeArrayToMesh(h, h.byteLength, p);
|
|
1839
1839
|
else {
|
|
1840
|
-
if (
|
|
1841
|
-
|
|
1840
|
+
if (C !== l.POINT_CLOUD) throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
|
|
1841
|
+
p = new l.PointCloud(), B = g.DecodeArrayToPointCloud(h, h.byteLength, p);
|
|
1842
1842
|
}
|
|
1843
|
-
if (!
|
|
1844
|
-
const
|
|
1845
|
-
for (const x in
|
|
1846
|
-
const
|
|
1843
|
+
if (!B.ok() || p.ptr === 0) throw new Error("THREE.DRACOLoader: Decoding failed: " + B.error_msg());
|
|
1844
|
+
const w = { index: null, attributes: [] };
|
|
1845
|
+
for (const x in u) {
|
|
1846
|
+
const y = self[I[x]];
|
|
1847
1847
|
let E, Q;
|
|
1848
|
-
if (f.useUniqueIDs) Q =
|
|
1848
|
+
if (f.useUniqueIDs) Q = u[x], E = g.GetAttributeByUniqueId(p, Q);
|
|
1849
1849
|
else {
|
|
1850
|
-
if (Q = g.GetAttributeId(
|
|
1851
|
-
E = g.GetAttribute(
|
|
1850
|
+
if (Q = g.GetAttributeId(p, l[u[x]]), Q === -1) continue;
|
|
1851
|
+
E = g.GetAttribute(p, Q);
|
|
1852
1852
|
}
|
|
1853
|
-
const k = a(l, g,
|
|
1854
|
-
x === "color" && (k.vertexColorSpace = f.vertexColorSpace),
|
|
1853
|
+
const k = a(l, g, p, x, y, E);
|
|
1854
|
+
x === "color" && (k.vertexColorSpace = f.vertexColorSpace), w.attributes.push(k);
|
|
1855
1855
|
}
|
|
1856
|
-
return
|
|
1856
|
+
return C === l.TRIANGULAR_MESH && (w.index = function(x, y, E) {
|
|
1857
1857
|
const Q = E.num_faces(), k = 3 * Q, D = 4 * k, v = x._malloc(D);
|
|
1858
|
-
|
|
1858
|
+
y.GetTrianglesUInt32Array(E, D, v);
|
|
1859
1859
|
const _ = new Uint32Array(x.HEAPF32.buffer, v, k).slice();
|
|
1860
1860
|
return x._free(v), { array: _, itemSize: 1 };
|
|
1861
|
-
}(l, g,
|
|
1862
|
-
}(c, n, new Int8Array(i), s),
|
|
1863
|
-
|
|
1864
|
-
} catch (
|
|
1865
|
-
console.error(
|
|
1861
|
+
}(l, g, p)), l.destroy(p), w;
|
|
1862
|
+
}(c, n, new Int8Array(i), s), d = b.attributes.map((l) => l.array.buffer);
|
|
1863
|
+
b.index && d.push(b.index.array.buffer), self.postMessage({ type: "decode", id: A.id, geometry: b }, d);
|
|
1864
|
+
} catch (b) {
|
|
1865
|
+
console.error(b), self.postMessage({ type: "error", id: A.id, error: b.message });
|
|
1866
1866
|
} finally {
|
|
1867
1867
|
c.destroy(n);
|
|
1868
1868
|
}
|
|
@@ -1995,17 +1995,17 @@ class P extends Fa {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
init() {
|
|
1997
1997
|
if (!this.transcoderPending) {
|
|
1998
|
-
const e = new
|
|
1998
|
+
const e = new Ce(this.manager);
|
|
1999
1999
|
e.setPath(this.transcoderPath), e.setWithCredentials(this.withCredentials);
|
|
2000
|
-
const a = e.loadAsync("basis_transcoder.js"), t = new
|
|
2000
|
+
const a = e.loadAsync("basis_transcoder.js"), t = new Ce(this.manager);
|
|
2001
2001
|
t.setPath(this.transcoderPath), t.setResponseType("arraybuffer"), t.setWithCredentials(this.withCredentials);
|
|
2002
2002
|
const A = t.loadAsync("basis_transcoder.wasm");
|
|
2003
2003
|
this.transcoderPending = Promise.all([a, A]).then(([i, s]) => {
|
|
2004
2004
|
const r = P.BasisWorker.toString(), c = ["/* constants */", "let _EngineFormat = " + JSON.stringify(P.EngineFormat), "let _EngineType = " + JSON.stringify(P.EngineType), "let _TranscoderFormat = " + JSON.stringify(P.TranscoderFormat), "let _BasisFormat = " + JSON.stringify(P.BasisFormat), "/* basis_transcoder.js */", i, "/* worker */", r.substring(r.indexOf("{") + 1, r.lastIndexOf("}"))].join(`
|
|
2005
2005
|
`);
|
|
2006
2006
|
this.workerSourceURL = URL.createObjectURL(new Blob([c])), this.transcoderBinary = s, this.workerPool.setWorkerCreator(() => {
|
|
2007
|
-
const n = new Worker(this.workerSourceURL),
|
|
2008
|
-
return n.postMessage({ type: "init", config: this.workerConfig, transcoderBinary:
|
|
2007
|
+
const n = new Worker(this.workerSourceURL), b = this.transcoderBinary.slice(0);
|
|
2008
|
+
return n.postMessage({ type: "init", config: this.workerConfig, transcoderBinary: b }, [b]), n;
|
|
2009
2009
|
});
|
|
2010
2010
|
}), la > 0 && console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."), la++;
|
|
2011
2011
|
}
|
|
@@ -2013,7 +2013,7 @@ class P extends Fa {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
load(e, a, t, A) {
|
|
2015
2015
|
if (this.workerConfig === null) throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");
|
|
2016
|
-
const i = new
|
|
2016
|
+
const i = new Ce(this.manager);
|
|
2017
2017
|
i.setResponseType("arraybuffer"), i.setWithCredentials(this.withCredentials), i.load(e, (s) => {
|
|
2018
2018
|
this.parse(s, a, A);
|
|
2019
2019
|
}, t, A);
|
|
@@ -2025,46 +2025,46 @@ class P extends Fa {
|
|
|
2025
2025
|
this._createTexture(e).then((A) => a ? a(A) : null).catch(t);
|
|
2026
2026
|
}
|
|
2027
2027
|
_createTextureFrom(e, a) {
|
|
2028
|
-
const { type: t, error: A, data: { faces: i, width: s, height: r, format: c, type: n, dfdFlags:
|
|
2028
|
+
const { type: t, error: A, data: { faces: i, width: s, height: r, format: c, type: n, dfdFlags: b } } = e;
|
|
2029
2029
|
if (t === "error") return Promise.reject(A);
|
|
2030
|
-
let
|
|
2031
|
-
if (a.faceCount === 6)
|
|
2030
|
+
let d;
|
|
2031
|
+
if (a.faceCount === 6) d = new MA(i, c, n);
|
|
2032
2032
|
else {
|
|
2033
2033
|
const l = i[0].mipmaps;
|
|
2034
|
-
|
|
2034
|
+
d = a.layerCount > 1 ? new RA(l, s, r, a.layerCount, c, n) : new qa(l, s, r, c, n);
|
|
2035
2035
|
}
|
|
2036
|
-
return
|
|
2036
|
+
return d.minFilter = i[0].mipmaps.length === 1 ? He : va, d.magFilter = He, d.generateMipmaps = !1, d.needsUpdate = !0, d.colorSpace = it(a), d.premultiplyAlpha = !!(1 & b), d;
|
|
2037
2037
|
}
|
|
2038
2038
|
async _createTexture(e, a = {}) {
|
|
2039
2039
|
const t = function(r) {
|
|
2040
2040
|
const c = new Uint8Array(r.buffer, r.byteOffset, U.length);
|
|
2041
2041
|
if (c[0] !== U[0] || c[1] !== U[1] || c[2] !== U[2] || c[3] !== U[3] || c[4] !== U[4] || c[5] !== U[5] || c[6] !== U[6] || c[7] !== U[7] || c[8] !== U[8] || c[9] !== U[9] || c[10] !== U[10] || c[11] !== U[11]) throw new Error("Missing KTX 2.0 identifier.");
|
|
2042
|
-
const n = new Li(),
|
|
2043
|
-
n.vkFormat =
|
|
2044
|
-
const l =
|
|
2045
|
-
n.supercompressionScheme =
|
|
2046
|
-
const g =
|
|
2047
|
-
for (let R = 0; R < l; R++) n.levels.push({ levelData: new Uint8Array(r.buffer, r.byteOffset +
|
|
2048
|
-
const
|
|
2042
|
+
const n = new Li(), b = 17 * Uint32Array.BYTES_PER_ELEMENT, d = new Fe(r, U.length, b, !0);
|
|
2043
|
+
n.vkFormat = d._nextUint32(), n.typeSize = d._nextUint32(), n.pixelWidth = d._nextUint32(), n.pixelHeight = d._nextUint32(), n.pixelDepth = d._nextUint32(), n.layerCount = d._nextUint32(), n.faceCount = d._nextUint32();
|
|
2044
|
+
const l = d._nextUint32();
|
|
2045
|
+
n.supercompressionScheme = d._nextUint32();
|
|
2046
|
+
const g = d._nextUint32(), h = d._nextUint32(), f = d._nextUint32(), u = d._nextUint32(), I = d._nextUint64(), p = d._nextUint64(), B = new Fe(r, U.length + b, 3 * l * 8, !0);
|
|
2047
|
+
for (let R = 0; R < l; R++) n.levels.push({ levelData: new Uint8Array(r.buffer, r.byteOffset + B._nextUint64(), B._nextUint64()), uncompressedByteLength: B._nextUint64() });
|
|
2048
|
+
const C = new Fe(r, g, h, !0), w = { 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 = (w.descriptorBlockSize / 4 - 6) / 4;
|
|
2049
2049
|
for (let R = 0; R < x; R++) {
|
|
2050
|
-
const L = { bitOffset:
|
|
2051
|
-
64 & L.channelType ? (L.sampleLower =
|
|
2050
|
+
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 };
|
|
2051
|
+
64 & L.channelType ? (L.sampleLower = C._nextInt32(), L.sampleUpper = C._nextInt32()) : (L.sampleLower = C._nextUint32(), L.sampleUpper = C._nextUint32()), w.samples[R] = L;
|
|
2052
2052
|
}
|
|
2053
|
-
n.dataFormatDescriptor.length = 0, n.dataFormatDescriptor.push(
|
|
2054
|
-
const
|
|
2055
|
-
for (;
|
|
2056
|
-
const R =
|
|
2057
|
-
if (n.keyValue[q] =
|
|
2053
|
+
n.dataFormatDescriptor.length = 0, n.dataFormatDescriptor.push(w);
|
|
2054
|
+
const y = new Fe(r, f, u, !0);
|
|
2055
|
+
for (; y._offset < u; ) {
|
|
2056
|
+
const R = y._nextUint32(), L = y._scan(R), q = tt(L);
|
|
2057
|
+
if (n.keyValue[q] = y._nextUint8Array(R - L.byteLength - 1), q.match(/^ktx/i)) {
|
|
2058
2058
|
const V = tt(n.keyValue[q]);
|
|
2059
2059
|
n.keyValue[q] = V.substring(0, V.lastIndexOf("\0"));
|
|
2060
2060
|
}
|
|
2061
|
-
|
|
2061
|
+
y._skip(R % 4 ? 4 - R % 4 : 0);
|
|
2062
2062
|
}
|
|
2063
|
-
if (
|
|
2064
|
-
const E = new Fe(r,
|
|
2063
|
+
if (p <= 0) return n;
|
|
2064
|
+
const E = new Fe(r, I, p, !0), Q = E._nextUint16(), k = E._nextUint16(), D = E._nextUint32(), v = E._nextUint32(), _ = E._nextUint32(), $e = E._nextUint32(), je = [];
|
|
2065
2065
|
for (let R = 0; R < l; R++) je.push({ imageFlags: E._nextUint32(), rgbSliceByteOffset: E._nextUint32(), rgbSliceByteLength: E._nextUint32(), alphaSliceByteOffset: E._nextUint32(), alphaSliceByteLength: E._nextUint32() });
|
|
2066
|
-
const qe =
|
|
2067
|
-
return n.globalData = { endpointCount: Q, selectorCount: k, imageDescs: je, endpointsData: Oe, selectorsData: Je, tablesData: z, extendedData:
|
|
2066
|
+
const qe = I + E._offset, Me = qe + D, Re = Me + v, Se = Re + _, Oe = new Uint8Array(r.buffer, r.byteOffset + qe, D), Je = new Uint8Array(r.buffer, r.byteOffset + Me, v), z = new Uint8Array(r.buffer, r.byteOffset + Re, _), Be = new Uint8Array(r.buffer, r.byteOffset + Se, $e);
|
|
2067
|
+
return n.globalData = { endpointCount: Q, selectorCount: k, imageDescs: je, endpointsData: Oe, selectorsData: Je, tablesData: z, extendedData: Be }, n;
|
|
2068
2068
|
}(new Uint8Array(e)), A = t.vkFormat === Ta && t.dataFormatDescriptor[0].colorModel === 167;
|
|
2069
2069
|
if (!(t.vkFormat === 0 || A && !this.workerConfig.astcHDRSupported)) return async function(r) {
|
|
2070
2070
|
const { vkFormat: c } = r;
|
|
@@ -2074,24 +2074,24 @@ class P extends Fa {
|
|
|
2074
2074
|
const g = new Gi();
|
|
2075
2075
|
await g.init(), l(g);
|
|
2076
2076
|
})), n = await ba);
|
|
2077
|
-
const
|
|
2077
|
+
const b = [];
|
|
2078
2078
|
for (let l = 0; l < r.levels.length; l++) {
|
|
2079
|
-
const g = Math.max(1, r.pixelWidth >> l), h = Math.max(1, r.pixelHeight >> l), f = r.pixelDepth ? Math.max(1, r.pixelDepth >> l) : 0,
|
|
2080
|
-
let
|
|
2081
|
-
if (r.supercompressionScheme === 0)
|
|
2079
|
+
const g = Math.max(1, r.pixelWidth >> l), h = Math.max(1, r.pixelHeight >> l), f = r.pixelDepth ? Math.max(1, r.pixelDepth >> l) : 0, u = r.levels[l];
|
|
2080
|
+
let I, p;
|
|
2081
|
+
if (r.supercompressionScheme === 0) I = u.levelData;
|
|
2082
2082
|
else {
|
|
2083
2083
|
if (r.supercompressionScheme !== 2) throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");
|
|
2084
|
-
|
|
2084
|
+
I = n.decode(u.levelData, u.uncompressedByteLength);
|
|
2085
2085
|
}
|
|
2086
|
-
|
|
2086
|
+
p = ga[c] === F ? new Float32Array(I.buffer, I.byteOffset, I.byteLength / Float32Array.BYTES_PER_ELEMENT) : ga[c] === we ? new Uint16Array(I.buffer, I.byteOffset, I.byteLength / Uint16Array.BYTES_PER_ELEMENT) : I, b.push({ data: p, width: g, height: h, depth: f });
|
|
2087
2087
|
}
|
|
2088
|
-
let
|
|
2089
|
-
if (Ui.has(ha[c]))
|
|
2088
|
+
let d;
|
|
2089
|
+
if (Ui.has(ha[c])) d = r.pixelDepth === 0 ? new Le(b[0].data, r.pixelWidth, r.pixelHeight) : new _A(b[0].data, r.pixelWidth, r.pixelHeight, r.pixelDepth);
|
|
2090
2090
|
else {
|
|
2091
2091
|
if (r.pixelDepth > 0) throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");
|
|
2092
|
-
|
|
2092
|
+
d = new qa(b, r.pixelWidth, r.pixelHeight);
|
|
2093
2093
|
}
|
|
2094
|
-
return
|
|
2094
|
+
return d.mipmaps = b, d.type = ga[c], d.format = ha[c], d.colorSpace = it(r), d.needsUpdate = !0, Promise.resolve(d);
|
|
2095
2095
|
}(t);
|
|
2096
2096
|
const i = a, s = this.init().then(() => this.workerPool.postMessage({ type: "transcode", buffer: e, taskConfig: i }, [e])).then((r) => this._createTextureFrom(r.data, t));
|
|
2097
2097
|
return da.set(e, { promise: s }), s;
|
|
@@ -2103,8 +2103,8 @@ class P extends Fa {
|
|
|
2103
2103
|
P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC1: 0, ETC2: 1, BC1: 2, BC3: 3, BC4: 4, BC5: 5, BC7_M6_OPAQUE_ONLY: 6, BC7_M5: 7, PVRTC1_4_RGB: 8, PVRTC1_4_RGBA: 9, ASTC_4x4: 10, ATC_RGB: 11, ATC_RGBA_INTERPOLATED_ALPHA: 12, RGBA32: 13, RGB565: 14, BGR565: 15, RGBA4444: 16, BC6H: 22, RGB_HALF: 24, RGBA_HALF: 25 }, P.EngineFormat = { RGBAFormat: $, RGBA_ASTC_4x4_Format: Qt, RGB_BPTC_UNSIGNED_Format: SA, RGBA_BPTC_Format: FA, RGBA_ETC2_EAC_Format: vA, RGBA_PVRTC_4BPPV1_Format: TA, RGBA_S3TC_DXT5_Format: LA, RGB_ETC1_Format: GA, RGB_ETC2_Format: UA, RGB_PVRTC_4BPPV1_Format: NA, RGBA_S3TC_DXT1_Format: PA }, P.EngineType = { UnsignedByteType: X, HalfFloatType: we, FloatType: F }, P.BasisWorker = function() {
|
|
2104
2104
|
let o, e, a;
|
|
2105
2105
|
const t = _EngineFormat, A = _EngineType, i = _TranscoderFormat, s = _BasisFormat;
|
|
2106
|
-
self.addEventListener("message", function(
|
|
2107
|
-
const l =
|
|
2106
|
+
self.addEventListener("message", function(d) {
|
|
2107
|
+
const l = d.data;
|
|
2108
2108
|
switch (l.type) {
|
|
2109
2109
|
case "init":
|
|
2110
2110
|
o = l.config, g = l.transcoderBinary, e = new Promise((h) => {
|
|
@@ -2116,52 +2116,52 @@ P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC
|
|
|
2116
2116
|
case "transcode":
|
|
2117
2117
|
e.then(() => {
|
|
2118
2118
|
try {
|
|
2119
|
-
const { faces: h, buffers: f, width:
|
|
2120
|
-
const
|
|
2119
|
+
const { faces: h, buffers: f, width: u, height: I, hasAlpha: p, format: B, type: C, dfdFlags: w } = function(x) {
|
|
2120
|
+
const y = new a.KTX2File(new Uint8Array(x));
|
|
2121
2121
|
function E() {
|
|
2122
|
-
|
|
2122
|
+
y.close(), y.delete();
|
|
2123
2123
|
}
|
|
2124
|
-
if (!
|
|
2124
|
+
if (!y.isValid()) throw E(), new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");
|
|
2125
2125
|
let Q;
|
|
2126
|
-
if (
|
|
2127
|
-
else if (
|
|
2126
|
+
if (y.isUASTC()) Q = s.UASTC;
|
|
2127
|
+
else if (y.isETC1S()) Q = s.ETC1S;
|
|
2128
2128
|
else {
|
|
2129
|
-
if (!
|
|
2129
|
+
if (!y.isHDR()) throw new Error("THREE.KTX2Loader: Unknown Basis encoding");
|
|
2130
2130
|
Q = s.UASTC_HDR;
|
|
2131
2131
|
}
|
|
2132
|
-
const k =
|
|
2132
|
+
const k = y.getWidth(), D = y.getHeight(), v = y.getLayers() || 1, _ = y.getLevels(), $e = y.getFaces(), je = y.getHasAlpha(), qe = y.getDFDFlags(), { transcoderFormat: Me, engineFormat: Re, engineType: Se } = function(z, Be, R, L) {
|
|
2133
2133
|
const q = c[z];
|
|
2134
2134
|
for (let V = 0; V < q.length; V++) {
|
|
2135
2135
|
const O = q[V];
|
|
2136
|
-
if (!(O.if && !o[O.if]) && O.basisFormat.includes(z) && !(L && O.transcoderFormat.length < 2) && !(O.needsPowerOfTwo && (!n(
|
|
2136
|
+
if (!(O.if && !o[O.if]) && O.basisFormat.includes(z) && !(L && O.transcoderFormat.length < 2) && !(O.needsPowerOfTwo && (!n(Be) || !n(R))))
|
|
2137
2137
|
return { transcoderFormat: O.transcoderFormat[L ? 1 : 0], engineFormat: O.engineFormat[L ? 1 : 0], engineType: O.engineType[0] };
|
|
2138
2138
|
}
|
|
2139
2139
|
throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.");
|
|
2140
2140
|
}(Q, k, D, je);
|
|
2141
2141
|
if (!k || !D || !_) throw E(), new Error("THREE.KTX2Loader: Invalid texture");
|
|
2142
|
-
if (!
|
|
2142
|
+
if (!y.startTranscoding()) throw E(), new Error("THREE.KTX2Loader: .startTranscoding failed");
|
|
2143
2143
|
const Oe = [], Je = [];
|
|
2144
2144
|
for (let z = 0; z < $e; z++) {
|
|
2145
|
-
const
|
|
2145
|
+
const Be = [];
|
|
2146
2146
|
for (let R = 0; R < _; R++) {
|
|
2147
2147
|
const L = [];
|
|
2148
2148
|
let q, V;
|
|
2149
2149
|
for (let Ee = 0; Ee < v; Ee++) {
|
|
2150
|
-
const me =
|
|
2150
|
+
const me = y.getImageLevelInfo(R, Ee, z);
|
|
2151
2151
|
z !== 0 || R !== 0 || Ee !== 0 || me.origWidth % 4 == 0 && me.origHeight % 4 == 0 || console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), _ > 1 ? (q = me.origWidth, V = me.origHeight) : (q = me.width, V = me.height);
|
|
2152
|
-
let Qe = new Uint8Array(
|
|
2153
|
-
const Yt =
|
|
2152
|
+
let Qe = new Uint8Array(y.getImageTranscodedSizeInBytes(R, Ee, 0, Me));
|
|
2153
|
+
const Yt = y.transcodeImage(Qe, R, Ee, z, Me, 0, -1, -1);
|
|
2154
2154
|
if (Se === A.HalfFloatType && (Qe = new Uint16Array(Qe.buffer, Qe.byteOffset, Qe.byteLength / Uint16Array.BYTES_PER_ELEMENT)), !Yt) throw E(), new Error("THREE.KTX2Loader: .transcodeImage failed.");
|
|
2155
2155
|
L.push(Qe);
|
|
2156
2156
|
}
|
|
2157
|
-
const O =
|
|
2158
|
-
|
|
2157
|
+
const O = b(L);
|
|
2158
|
+
Be.push({ data: O, width: q, height: V }), Je.push(O.buffer);
|
|
2159
2159
|
}
|
|
2160
|
-
Oe.push({ mipmaps:
|
|
2160
|
+
Oe.push({ mipmaps: Be, width: k, height: D, format: Re, type: Se });
|
|
2161
2161
|
}
|
|
2162
2162
|
return E(), { faces: Oe, buffers: Je, width: k, height: D, hasAlpha: je, dfdFlags: qe, format: Re, type: Se };
|
|
2163
2163
|
}(l.buffer);
|
|
2164
|
-
self.postMessage({ type: "transcode", id: l.id, data: { faces: h, width:
|
|
2164
|
+
self.postMessage({ type: "transcode", id: l.id, data: { faces: h, width: u, height: I, hasAlpha: p, format: B, type: C, dfdFlags: w } }, f);
|
|
2165
2165
|
} catch (h) {
|
|
2166
2166
|
console.error(h), self.postMessage({ type: "error", id: l.id, error: h.message });
|
|
2167
2167
|
}
|
|
@@ -2169,20 +2169,20 @@ P.BasisFormat = { ETC1S: 0, UASTC: 1, UASTC_HDR: 2 }, P.TranscoderFormat = { ETC
|
|
|
2169
2169
|
}
|
|
2170
2170
|
var g;
|
|
2171
2171
|
});
|
|
2172
|
-
const r = [{ if: "astcSupported", basisFormat: [s.UASTC], transcoderFormat: [i.ASTC_4x4, i.ASTC_4x4], engineFormat: [t.RGBA_ASTC_4x4_Format, t.RGBA_ASTC_4x4_Format], engineType: [A.UnsignedByteType], priorityETC1S: 1 / 0, priorityUASTC: 1, needsPowerOfTwo: !1 }, { if: "bptcSupported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.BC7_M5, i.BC7_M5], engineFormat: [t.RGBA_BPTC_Format, t.RGBA_BPTC_Format], engineType: [A.UnsignedByteType], priorityETC1S: 3, priorityUASTC: 2, needsPowerOfTwo: !1 }, { if: "dxtSupported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.BC1, i.BC3], engineFormat: [t.RGBA_S3TC_DXT1_Format, t.RGBA_S3TC_DXT5_Format], engineType: [A.UnsignedByteType], priorityETC1S: 4, priorityUASTC: 5, needsPowerOfTwo: !1 }, { if: "etc2Supported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.ETC1, i.ETC2], engineFormat: [t.RGB_ETC2_Format, t.RGBA_ETC2_EAC_Format], engineType: [A.UnsignedByteType], priorityETC1S: 1, priorityUASTC: 3, needsPowerOfTwo: !1 }, { if: "etc1Supported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.ETC1], engineFormat: [t.RGB_ETC1_Format], engineType: [A.UnsignedByteType], priorityETC1S: 2, priorityUASTC: 4, needsPowerOfTwo: !1 }, { if: "pvrtcSupported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.PVRTC1_4_RGB, i.PVRTC1_4_RGBA], engineFormat: [t.RGB_PVRTC_4BPPV1_Format, t.RGBA_PVRTC_4BPPV1_Format], engineType: [A.UnsignedByteType], priorityETC1S: 5, priorityUASTC: 6, needsPowerOfTwo: !0 }, { if: "bptcSupported", basisFormat: [s.UASTC_HDR], transcoderFormat: [i.BC6H], engineFormat: [t.RGB_BPTC_UNSIGNED_Format], engineType: [A.HalfFloatType], priorityHDR: 1, needsPowerOfTwo: !1 }, { basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.RGBA32, i.RGBA32], engineFormat: [t.RGBAFormat, t.RGBAFormat], engineType: [A.UnsignedByteType, A.UnsignedByteType], priorityETC1S: 100, priorityUASTC: 100, needsPowerOfTwo: !1 }, { basisFormat: [s.UASTC_HDR], transcoderFormat: [i.RGBA_HALF], engineFormat: [t.RGBAFormat], engineType: [A.HalfFloatType], priorityHDR: 100, needsPowerOfTwo: !1 }], c = { [s.ETC1S]: r.filter((
|
|
2173
|
-
function n(
|
|
2174
|
-
return
|
|
2172
|
+
const r = [{ if: "astcSupported", basisFormat: [s.UASTC], transcoderFormat: [i.ASTC_4x4, i.ASTC_4x4], engineFormat: [t.RGBA_ASTC_4x4_Format, t.RGBA_ASTC_4x4_Format], engineType: [A.UnsignedByteType], priorityETC1S: 1 / 0, priorityUASTC: 1, needsPowerOfTwo: !1 }, { if: "bptcSupported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.BC7_M5, i.BC7_M5], engineFormat: [t.RGBA_BPTC_Format, t.RGBA_BPTC_Format], engineType: [A.UnsignedByteType], priorityETC1S: 3, priorityUASTC: 2, needsPowerOfTwo: !1 }, { if: "dxtSupported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.BC1, i.BC3], engineFormat: [t.RGBA_S3TC_DXT1_Format, t.RGBA_S3TC_DXT5_Format], engineType: [A.UnsignedByteType], priorityETC1S: 4, priorityUASTC: 5, needsPowerOfTwo: !1 }, { if: "etc2Supported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.ETC1, i.ETC2], engineFormat: [t.RGB_ETC2_Format, t.RGBA_ETC2_EAC_Format], engineType: [A.UnsignedByteType], priorityETC1S: 1, priorityUASTC: 3, needsPowerOfTwo: !1 }, { if: "etc1Supported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.ETC1], engineFormat: [t.RGB_ETC1_Format], engineType: [A.UnsignedByteType], priorityETC1S: 2, priorityUASTC: 4, needsPowerOfTwo: !1 }, { if: "pvrtcSupported", basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.PVRTC1_4_RGB, i.PVRTC1_4_RGBA], engineFormat: [t.RGB_PVRTC_4BPPV1_Format, t.RGBA_PVRTC_4BPPV1_Format], engineType: [A.UnsignedByteType], priorityETC1S: 5, priorityUASTC: 6, needsPowerOfTwo: !0 }, { if: "bptcSupported", basisFormat: [s.UASTC_HDR], transcoderFormat: [i.BC6H], engineFormat: [t.RGB_BPTC_UNSIGNED_Format], engineType: [A.HalfFloatType], priorityHDR: 1, needsPowerOfTwo: !1 }, { basisFormat: [s.ETC1S, s.UASTC], transcoderFormat: [i.RGBA32, i.RGBA32], engineFormat: [t.RGBAFormat, t.RGBAFormat], engineType: [A.UnsignedByteType, A.UnsignedByteType], priorityETC1S: 100, priorityUASTC: 100, needsPowerOfTwo: !1 }, { basisFormat: [s.UASTC_HDR], transcoderFormat: [i.RGBA_HALF], engineFormat: [t.RGBAFormat], engineType: [A.HalfFloatType], priorityHDR: 100, needsPowerOfTwo: !1 }], c = { [s.ETC1S]: r.filter((d) => d.basisFormat.includes(s.ETC1S)).sort((d, l) => d.priorityUASTC - l.priorityUASTC), [s.UASTC]: r.filter((d) => d.basisFormat.includes(s.UASTC)).sort((d, l) => d.priorityUASTC - l.priorityUASTC), [s.UASTC_HDR]: r.filter((d) => d.basisFormat.includes(s.UASTC_HDR)).sort((d, l) => d.priorityHDR - l.priorityHDR) };
|
|
2173
|
+
function n(d) {
|
|
2174
|
+
return d <= 2 || !(d & d - 1) && d !== 0;
|
|
2175
2175
|
}
|
|
2176
|
-
function d
|
|
2177
|
-
if (
|
|
2176
|
+
function b(d) {
|
|
2177
|
+
if (d.length === 1) return d[0];
|
|
2178
2178
|
let l = 0;
|
|
2179
|
-
for (let f = 0; f <
|
|
2180
|
-
l +=
|
|
2179
|
+
for (let f = 0; f < d.length; f++)
|
|
2180
|
+
l += d[f].byteLength;
|
|
2181
2181
|
const g = new Uint8Array(l);
|
|
2182
2182
|
let h = 0;
|
|
2183
|
-
for (let f = 0; f <
|
|
2184
|
-
const
|
|
2185
|
-
g.set(
|
|
2183
|
+
for (let f = 0; f < d.length; f++) {
|
|
2184
|
+
const u = d[f];
|
|
2185
|
+
g.set(u, h), h += u.byteLength;
|
|
2186
2186
|
}
|
|
2187
2187
|
return g;
|
|
2188
2188
|
}
|
|
@@ -2201,50 +2201,50 @@ async function st(o) {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
if (e === "subtree")
|
|
2203
2203
|
return async function(t, A) {
|
|
2204
|
-
const i = new DataView(t), s = i.getBigUint64(8, !0), r = i.getBigUint64(16, !0), c = 24, n = c + Number(s),
|
|
2204
|
+
const i = new DataView(t), s = i.getBigUint64(8, !0), r = i.getBigUint64(16, !0), c = 24, n = c + Number(s), b = n + (8 - n % 8) % 8, d = b + Number(r), l = t.slice(c, n), g = new TextDecoder().decode(l).trim(), h = JSON.parse(g);
|
|
2205
2205
|
if (!h.buffers) throw new Error("subtree has no buffers");
|
|
2206
|
-
const f = h.buffers.map(async (
|
|
2207
|
-
if (
|
|
2208
|
-
const
|
|
2209
|
-
if (!
|
|
2210
|
-
return new Uint8Array(await
|
|
2206
|
+
const f = h.buffers.map(async (I) => {
|
|
2207
|
+
if (I.uri) {
|
|
2208
|
+
const p = new URL(I.uri, A).href, B = await fetch(p);
|
|
2209
|
+
if (!B.ok) throw new Error(`Failed to fetch binary file ${p}: ${B.statusText}`);
|
|
2210
|
+
return new Uint8Array(await B.arrayBuffer());
|
|
2211
2211
|
}
|
|
2212
|
-
return new Uint8Array(t.slice(
|
|
2213
|
-
}),
|
|
2214
|
-
return /* @__PURE__ */ function(
|
|
2215
|
-
function
|
|
2212
|
+
return new Uint8Array(t.slice(b, d));
|
|
2213
|
+
}), u = await Promise.all(f);
|
|
2214
|
+
return /* @__PURE__ */ function(I, p) {
|
|
2215
|
+
function B(E, Q) {
|
|
2216
2216
|
if (!E) throw new Error("incomplete json subtree");
|
|
2217
2217
|
if (E.constant) {
|
|
2218
2218
|
if (E.constant == 0) return !1;
|
|
2219
2219
|
if (E.constant == 1) return !0;
|
|
2220
2220
|
}
|
|
2221
2221
|
if (E.bitstream == null) throw new Error('json subtree "tileAvailability" does not specify a bitstream');
|
|
2222
|
-
if (!
|
|
2223
|
-
const k =
|
|
2224
|
-
return
|
|
2222
|
+
if (!I.bufferViews || !I.bufferViews[E.bitstream]) throw new Error('json subtree "bufferViews" does not specify a bitstream');
|
|
2223
|
+
const k = I.bufferViews[E.bitstream];
|
|
2224
|
+
return C(p[k.buffer], k.byteOffset, Q);
|
|
2225
2225
|
}
|
|
2226
|
-
function
|
|
2226
|
+
function C(E, Q, k) {
|
|
2227
2227
|
const D = k % 8;
|
|
2228
2228
|
return E[Q + Math.floor(k / 8)] >> D & !0;
|
|
2229
2229
|
}
|
|
2230
|
-
function
|
|
2230
|
+
function w(E) {
|
|
2231
2231
|
let Q = 0;
|
|
2232
|
-
return Q = E.z == null ? fa(E.x, E.y, E.level) : ua(E.x, E.y, E.z, E.level),
|
|
2232
|
+
return Q = E.z == null ? fa(E.x, E.y, E.level) : ua(E.x, E.y, E.z, E.level), B(I.tileAvailability, Q);
|
|
2233
2233
|
}
|
|
2234
2234
|
function x(E) {
|
|
2235
2235
|
let Q = 0;
|
|
2236
2236
|
Q = E.z == null ? fa(E.x, E.y, E.level) : ua(E.x, E.y, E.z, E.level);
|
|
2237
2237
|
const k = [];
|
|
2238
|
-
return
|
|
2239
|
-
k.push(
|
|
2238
|
+
return I.contentAvailability.forEach((D) => {
|
|
2239
|
+
k.push(B(D, Q));
|
|
2240
2240
|
}), k;
|
|
2241
2241
|
}
|
|
2242
|
-
function
|
|
2242
|
+
function y(E) {
|
|
2243
2243
|
let Q = 0;
|
|
2244
|
-
return Q = E.z == null ? fa(E.x, E.y) : ua(E.x, E.y, E.z),
|
|
2244
|
+
return Q = E.z == null ? fa(E.x, E.y) : ua(E.x, E.y, E.z), B(I.childSubtreeAvailability, Q);
|
|
2245
2245
|
}
|
|
2246
|
-
return { isTileAvailable:
|
|
2247
|
-
}(h,
|
|
2246
|
+
return { isTileAvailable: w, isContentAvailable: x, isChildSubtreeAvailable: y };
|
|
2247
|
+
}(h, u);
|
|
2248
2248
|
}(await a.arrayBuffer(), rt(o));
|
|
2249
2249
|
throw new Error(`Unsupported file extension: ${e}`);
|
|
2250
2250
|
}
|
|
@@ -2286,45 +2286,45 @@ async function La(o, e) {
|
|
|
2286
2286
|
a && (s = t.replace("{level}", 0).replace("{x}", 0).replace("{y}", 0)), a || (s = t.replace("{level}", 0).replace("{x}", 0).replace("{y}", 0).replace("{z}", 0));
|
|
2287
2287
|
const r = { level: 0, x: 0, y: 0 }, c = { level: 0, x: 0, y: 0 };
|
|
2288
2288
|
a || (r.z = 0, c.z = 0), ve.set(s, await st(i + s));
|
|
2289
|
-
const n = ve.get(s),
|
|
2289
|
+
const n = ve.get(s), b = [];
|
|
2290
2290
|
n.isContentAvailable(c) && A.forEach((g) => {
|
|
2291
2291
|
let h;
|
|
2292
|
-
a && (h = g.replace("{level}", r.level).replace("{x}", r.x).replace("{y}", r.y)), a || (h = g.replace("{level}", r.level).replace("{x}", r.x).replace("{y}", r.y).replace("{z}", r.z)),
|
|
2292
|
+
a && (h = g.replace("{level}", r.level).replace("{x}", r.x).replace("{y}", r.y)), a || (h = g.replace("{level}", r.level).replace("{x}", r.x).replace("{y}", r.y).replace("{z}", r.z)), b.push({ uri: h });
|
|
2293
2293
|
});
|
|
2294
|
-
const
|
|
2295
|
-
return { root:
|
|
2294
|
+
const d = { geometricError: o.root.geometricError, boundingVolume: o.root.boundingVolume, refine: o.root.refine, globalAddress: r, localAddress: c, subtree: n, contents: b, getChildren: async () => l(d) };
|
|
2295
|
+
return { root: d };
|
|
2296
2296
|
async function l(g) {
|
|
2297
2297
|
const h = [];
|
|
2298
2298
|
if (g.localAddress.level == o.root.implicitTiling.availableLevels - 1) return h;
|
|
2299
2299
|
if ((g.localAddress.level + 1) % o.root.implicitTiling.subtreeLevels == 0) {
|
|
2300
|
-
const f = ze(g.localAddress),
|
|
2301
|
-
for (let
|
|
2302
|
-
const
|
|
2303
|
-
g.subtree.isChildSubtreeAvailable(
|
|
2304
|
-
const
|
|
2300
|
+
const f = ze(g.localAddress), u = ze(g.globalAddress), I = ot(a, o.root.boundingVolume, u);
|
|
2301
|
+
for (let p = 0; p < f.length; p++) {
|
|
2302
|
+
const B = f[p], C = u[p];
|
|
2303
|
+
g.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)), ve.has(s) || ve.set(s, await st(i + s));
|
|
2304
|
+
const w = ve.get(s), x = { level: 0, x: 0, y: 0 };
|
|
2305
2305
|
a || (x.z = 0);
|
|
2306
|
-
const
|
|
2307
|
-
|
|
2306
|
+
const y = [];
|
|
2307
|
+
w.isContentAvailable(x) && A.forEach((Q) => {
|
|
2308
2308
|
let k;
|
|
2309
|
-
a && (k = Q.replace("{level}",
|
|
2309
|
+
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 });
|
|
2310
2310
|
});
|
|
2311
|
-
const E = { geometricError: g.geometricError / 2, boundingVolume:
|
|
2311
|
+
const E = { geometricError: g.geometricError / 2, boundingVolume: I[p], refine: o.root.refine, globalAddress: C, localAddress: x, subtree: w, contents: y, getChildren: async () => l(E) };
|
|
2312
2312
|
h.push(E);
|
|
2313
2313
|
}
|
|
2314
2314
|
} else {
|
|
2315
|
-
const f = ze(g.localAddress),
|
|
2316
|
-
for (let
|
|
2317
|
-
const
|
|
2318
|
-
if (!g.subtree.isTileAvailable(
|
|
2319
|
-
const
|
|
2315
|
+
const f = ze(g.localAddress), u = ze(g.globalAddress), I = ot(a, o.root.boundingVolume, u);
|
|
2316
|
+
for (let p = 0; p < f.length; p++) {
|
|
2317
|
+
const B = f[p], C = u[p];
|
|
2318
|
+
if (!g.subtree.isTileAvailable(B)) continue;
|
|
2319
|
+
const w = [], x = g.subtree.isContentAvailable(B);
|
|
2320
2320
|
for (let E = 0; E < A.length; E++) {
|
|
2321
2321
|
if (!x[E]) continue;
|
|
2322
2322
|
const Q = A[E];
|
|
2323
2323
|
let k;
|
|
2324
|
-
a && (k = Q.replace("{level}",
|
|
2324
|
+
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 });
|
|
2325
2325
|
}
|
|
2326
|
-
const
|
|
2327
|
-
h.push(
|
|
2326
|
+
const y = { geometricError: g.geometricError / 2, boundingVolume: I[p], refine: o.root.refine, globalAddress: C, localAddress: B, subtree: g.subtree, contents: w, getChildren: async () => l(y) };
|
|
2327
|
+
h.push(y);
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
2330
|
return h.length > 0 ? h : void 0;
|
|
@@ -2342,12 +2342,12 @@ function ot(o, e, a) {
|
|
|
2342
2342
|
}
|
|
2343
2343
|
function Ni(o, e, a) {
|
|
2344
2344
|
if (e.region) return function(t, A, i) {
|
|
2345
|
-
const [s, r, c, n,
|
|
2346
|
-
return { region: [f,
|
|
2345
|
+
const [s, r, c, n, b, d] = A, l = (c - s) / 2 ** i.level, g = (n - r) / 2 ** i.level, h = t ? 0 : (d - b) / 2 ** i.level, f = s + l * i.x, u = r + g * i.y, I = f + l, p = u + g, B = t ? b : b + h * i.z, C = t ? d : B + h;
|
|
2346
|
+
return { region: [f, u, I, p, B, C] };
|
|
2347
2347
|
}(o, e.region, a);
|
|
2348
2348
|
if (e.box) return function(t, A, i) {
|
|
2349
|
-
const s = A.slice(0, 3), r = [A.slice(3, 6), A.slice(6, 9), A.slice(9, 12)], c = 1 / Math.pow(2, i.level), n = [c, c, t ? 1 : c],
|
|
2350
|
-
return { box: [
|
|
2349
|
+
const s = A.slice(0, 3), r = [A.slice(3, 6), A.slice(6, 9), A.slice(9, 12)], c = 1 / Math.pow(2, i.level), n = [c, c, t ? 1 : c], b = r.map((g, h) => g.map((f) => f * n[h])), d = [s[0] - r[0][0] - r[1][0] - r[2][0], s[1] - r[0][1] - r[1][1] - r[2][1], s[2] - r[0][2] - r[1][2] - r[2][2]];
|
|
2350
|
+
return { box: [d[0] + (2 * i.x + 1) * (b[0][0] + b[1][0] + b[2][0]), d[1] + (2 * i.y + 1) * (b[0][1] + b[1][1] + b[2][1]), t ? s[2] : d[2] + (2 * i.z + 1) * (b[0][2] + b[1][2] + b[2][2])].concat(...b) };
|
|
2351
2351
|
}(o, e.box, a);
|
|
2352
2352
|
throw new Error("Unsupported bounding volume type");
|
|
2353
2353
|
}
|
|
@@ -2355,13 +2355,13 @@ function Ni(o, e, a) {
|
|
|
2355
2355
|
var o, e = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
|
|
2356
2356
|
if (typeof WebAssembly != "object") return { supported: !1 };
|
|
2357
2357
|
var a = WebAssembly.instantiate(function(n) {
|
|
2358
|
-
for (var
|
|
2359
|
-
var l = n.charCodeAt(
|
|
2360
|
-
d
|
|
2358
|
+
for (var b = new Uint8Array(n.length), d = 0; d < n.length; ++d) {
|
|
2359
|
+
var l = n.charCodeAt(d);
|
|
2360
|
+
b[d] = l > 96 ? l - 97 : l > 64 ? l - 39 : l + 4;
|
|
2361
2361
|
}
|
|
2362
2362
|
var g = 0;
|
|
2363
|
-
for (
|
|
2364
|
-
return
|
|
2363
|
+
for (d = 0; d < n.length; ++d) b[g++] = b[d] < 60 ? e[b[d]] : 64 * (b[d] - 60) + b[++d];
|
|
2364
|
+
return b.buffer.slice(0, g);
|
|
2365
2365
|
}("b9H79TebbbeJq9Geueu9Geub9Gbb9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiKLdilevlevlooroowwvwbDDbelve9Weiiviebeoweuec:W;kekr;RiOo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbe8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbdE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UbiY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbl8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbv8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UboE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbra9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbwL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbDK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbqL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbkE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9Wbsa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbzK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbHl79IV9RbODwebcekdQXq:g9sLdbk;3keYu8Jjjjjbcjo9Rgv8Kjjjjbcbhodnalcefae0mbabcbRb:S:kjjbc:GeV86bbavcjdfcbcjdzNjjjb8AdnaiTmbavcjdfadalz:tjjjb8Akabaefhrabcefhwavalfcbcbcjdal9RalcFe0EzNjjjb8Aavavcjdfalz:tjjjbhDcj;abal9UhodndndndndnalTmbaoc;WFbGgecjdaecjd6Ehqcbhkdninakai9pmiaDcjlfcbcjdzNjjjb8Aaqaiak9Rakaqfai6Egxcsfgecl4cifcd4hmadakal2fhPdndndndndnaec9WGgsTmbcbhzcehHaPhOawhAxekdnaxTmbcbhAcehHaPhCinaDaAfRbbhXaDcjlfheaChoaxhQinaeaoRbbgLaX9RgXcetaX;acr4786bbaoalfhoaecefheaLhXaQcufgQmbkaraw9Ram6miawcbamzNjjjbgeTmiaCcefhCaeamfhwaAcefgAal6hHaAal9hmbxvkkaraw9Ram6mvawcbamzNjjjb8AceheinawgXamfhwalaegoSmldnaraw9Ram6mbaocefheawcbamzNjjjb8AaXmekkaoal6hHxekindnaxTmbaDazfRbbhXaDcjlfheaOhoaxhQinaeaoRbbgLaX9RgXcetaX;acr4786bbaoalfhoaecefheaLhXaQcufgQmbkkaraA9Ram6mearaAcbamzNjjjbgKamfgw9RcK6mdcbhYaDcjlfhAinaDcjlfaYfh8AcwhCczhLcehQindndnaQce9hmbcuhoa8ARbbmecbhodninaogecsSmeaecefhoaAaefcefRbbTmbkkcucbaecs6EhoxekaQcetc;:FFFeGhocuaQtcu7cFeGhXcbheinaoaXaAaefRbb9nfhoaecefgecz9hmbkkaoaLaoaL6geEhLaQaCaeEhCaQcetgQcw6mbkdndndndnaCcufPdiebkaKaYco4fgeaeRbbcdciaCclSEaYci4coGtV86bbaCcw9hmeawa8A8Pbb83bbawcwfa8Acwf8Pbb83bbawczfhwxdkaKaYco4fgeaeRbbceaYci4coGtV86bbkdncwaC9TgEmbinawcb86bbawcefhwxbkkcuaCtcu7h8Acbh3aAh5ina5heaEhQcbhoinaeRbbgLa8AcFeGgXaLaX6EaoaCtVhoaecefheaQcufgQmbkawao86bba5aEfh5awcefhwa3aEfg3cz6mbkcbheindnaAaefRbbgoaX6mbawao86bbawcefhwkaecefgecz9hmbkkdnaYczfgYas9pmbaAczfhAaraw9RcL0mekkaYas6meawTmeaOcefhOazcefgzal6hHawhAazalSmixbkkcbhwaHceGTmexikcbhwaHceGmdkaDaPaxcufal2falz:tjjjb8AaxakfhkawmbkcbhoxokcbhoxvkaiTmekcbhoaraw9Ralcaalca0E6mialc8F9nmexdkcbhoaecufca6mdkawcbcaal9RgezNjjjbaefhwkawaDcjdfalz:tjjjbalfab9Rhokavcjof8Kjjjjbaok9heeuaecaaeca0Eabcj;abae9Uc;WFbGgdcjdadcjd6Egdfcufad9Uae2adcl4cifcd4adV2fcefkmbcbabBd:S:kjjbk;rse3u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd:C:kjjbgrc;GeV86bbalc;abfcFecjezNjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgoydbhLaocwfydbhKaoclfydbhYcbh8Adndninalc;abfavcsGcitfgoydlhEdndndnaoydbgoaL9hmbaEaYSmekdnaoaY9hmbaEaK9hmba8Acefh8AxekaoaK9hmeaEaL9hmea8Acdfh8Aka8Ac870mdaXcufhvada8AciGcx2goc:y1jjbfydbaCfcdtfydbhEadaocN1jjbfydbaCfcdtfydbhKadaoc:q1jjbfydbaCfcdtfydbhLcbhodnindnalavcsGcdtfydbaE9hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaEaOSgvaYce9iaYaH9oVgoGh3dndndndndncbcsavEaYaoEgvcs9hmbarce9imbaEaEaAaEcefaASgvEgAcefSmecmcsavEhvkasava8Acdtc;WeGV86bbavcs9hmeaEaA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbkaEhAxdkcPhvasa8AcdtcPV86bbaEhAkavTmbavaH9imekalaXcdtfaEBdbaXcefcsGhXkaOa3fhOalc;abfaQcitfgvaKBdlavaEBdbalc;abfaQcefcsGgvcitfgoaEBdlaoaLBdbavcefhoxikavcufhva8Aclfg8Ac;ab9hmbkkdnadceaKaOScetaYaOSEcx2gvc:q1jjbfydbaCfcdtfydbgLTadavcN1jjbfydbaCfcdtfydbg8AceSGadavc:y1jjbfydbaCfcdtfydbgYcdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhKxdkcuhKaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydbaY9hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaLaOSg8Efh3dndnaKcm0mbaKcefhKxekcbcsa8Aa3SgvEhKa3avfh3kdndnaEcm0mbaEcefhExekcbcsaYa3SgvEhEa3avfh3kc9:cua8EEh8FaEaKcltVhocbhvdndndninavcj1jjbfRbbaocFeGSmeavcefgvcz9hmbxdkka5aLaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeao86bbaecefhekdna8EmbaLaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaLhAkdnaKcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmbaYaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaYhAkalaXcdtfaLBdbaXcefcsGhvdndnaKPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfaYBdbavcefcsGhvkalc;abfaQcitfgoaLBdlaoa8ABdbalc;abfaQcefcsGcitfgoa8ABdlaoaYBdbalc;abfaQcdfcsGcitfgoaYBdlaoaLBdbaQcifhoavhXa3hOkascefhsaocsGhQaCcifgCai6mbkkcbhvaeaP0mbcbhvinaeavfavcj1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd:C:kjjbk:ydewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb:C:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkcbhvaoar0mbaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:dvli99dui99ludnaeTmbcuadcetcuftcu7:Yhvdndncuaicuftcu7:YgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhralcxfIdbhqdndnakJbbbb9GTmbaxhkxekJbbjZar:l:tgkak:maxJbbbb9GEhkJbbjZax:l:tgxax:marJbbbb9GEhrkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEavNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohmxekcjjjj94hmkdndnakJbbj:;akJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;akJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;klld99eud99eudnaeTmbdndncuaicuftcu7:YgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicdfciGcdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk:Hvdxue998Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6mearcearce0EhwaohDinaDc:CuBdbaDclfhDawcufgwmbkaeTmiadcl6mdarcearce0EhqarcdthkalhxcbhminaohDaxhwaqhPinaDaDydbgsawydbgzcL4cFeGc:cufcbazEgzasaz9kEBdbawclfhwaDclfhDaPcufgPmbkaxakfhxamcefgmae9hmbkkaeTmdxekaeTmekavcb9hadcl6gqVhHarcearce0Ehkarcdthrceai9Rhmcbhdindndndnavce9hmbaqmdc:CuhwalhDakhPinawaDydbgscL4cFeGc:cufcbasEgsawas9kEhwaDclfhDaPcufgPmbxdkkc:CuhwaHmbaohDalhPakhsinaDaPydbgzcL4cFeGgxc8Aaxc8A9kEc:cufcbazEBdbaPclfhPaDclfhDascufgsmbkkaqmbcbhDakhsinawhPdnavceSmbaoaDfydbhPkdndnalaDfIdbgOcjjj;8iamaPfgPcLt9R::NJbbbZJbbb:;aOJbbbb9GEMgO:lJbbb9p9DTmbaO:Ohzxekcjjjj94hzkabaDfazcFFFrGaPcKtVBdbaDclfhDascufgsmbkkabarfhbalarfhladcefgdae9hmbkkaocjdf8KjjjjbkFkdCui998Jjjjjbc:Gd9Rgv8Kjjjjbavc:4efcbc;KbzNjjjb8AcbhodnadTmbcbhoaiTmbdnabae9hmbavcuadcdtgoadcFFFFi0Ecbyd:K:kjjbHjjjjbbgeBd:4eavceBd:ydaeabaoz:tjjjb8Akavc:OefcwfcbBdbav9cb83i:Oeavc:Oefaeadaiavc:4efz:njjjbcuaicdtgraicFFFFi0Egwcbyd:K:kjjbHjjjjbbhoavc:4efavyd:ydgDcdtfaoBdbavaDcefgqBd:ydaoavyd:Oegkarz:tjjjbhxavc:4efaqcdtfadci9Ugmcbyd:K:kjjbHjjjjbbgoBdbavaDcdfgrBd:ydaocbamzNjjjbhPavc:4efarcdtfawcbyd:K:kjjbHjjjjbbgsBdbavaDcifgqBd:ydaxhoashrinaralIdbalaoydbgwcwawcw6Ecdtfc;ebfIdbMUdbaoclfhoarclfhraicufgimbkavc:4efaqcdtfcuamcdtadcFFFF970Ecbyd:K:kjjbHjjjjbbgqBdbavaDclfBd:yddnadci6mbamceamce0EhiaehoaqhrinarasaoydbcdtfIdbasaoclfydbcdtfIdbMasaocwfydbcdtfIdbMUdbaocxfhoarclfhraicufgimbkkavc;qbfhzavhoavyd:SehHavyd:WehOcbhwcbhrcbhAcehCinaohXcihQaearci2gLcdtfgocwfydbhdaoydbhDabaAcx2fgiclfaoclfydbgKBdbaiaDBdbaicwfadBdbaParfce86bbazadBdwazaKBdlazaDBdbaqarcdtfcbBdbdnawTmbcihQaXhiinazaQcdtfaiydbgoBdbaQaoaD9haoaK9hGaoad9hGfhQaiclfhiawcufgwmbkkaAcefhAaxaDcdtfgoaoydbcufBdbaxaKcdtfgoaoydbcufBdbaxadcdtfgoaoydbcufBdbcbhwinaOaHaeawaLfcdtfydbcdtgifydbcdtfgKhoakaifgDydbgdhidnadTmbdninaoydbarSmeaoclfhoaicufgiTmdxbkkaoadcdtaKfc98fydbBdbaDaDydbcufBdbkawcefgwci9hmbkdndndnaQTmbcuhrJbbbbhYcbhDavyd:SehKavyd:WehLindndnakazaDcdtfydbcdtgofydbgimbaDcefhDxekaDcs0hwasaofgdIdbh8AadalcbaDcefgDawEcdtfIdbalaxaofydbgwcwawcw6Ecdtfc;ebfIdbMgEUdbaEa8A:thEaicdthiaLaKaofydbcdtfhoinaqaoydbgwcdtfgdaEadIdbMg8AUdba8AaYaYa8A9DgdEhYawaradEhraoclfhoaic98fgimbkkaDaQ9hmbkarcu9hmekaCam9pmeindnaPaCfRbbmbaChrxdkamaCcefgC9hmbxdkkaQczaQcz6EhwazhoaXhzarcu9hmekkavyd:ydhokaocdtavc:4effc98fhrdninaoTmearydbcbyd:G:kjjbH:bjjjbbarc98fhraocufhoxbkkavc:Gdf8Kjjjjbk;UlevucuaicdtgvaicFFFFi0Egocbyd:K:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd:K:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd:K:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavzNjjjb8Aadci9UhwdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbawceawce0EhDabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic:01jjbz:mjjjbkQbabaeadaic:C:jjjbz:mjjjbk9DeeuabcFeaicdtzNjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;:kivuo99lu8Jjjjjbcj;Hb9Rgl8Kjjjjbcbhvalc1;Gbfcbc;KbzNjjjb8AalcuadcdtadcFFFFi0Egocbyd:K:kjjbHjjjjbbgrBd19GalceBd;O9Galcwfcbyd:m:kjjbBdbalcb8Pd:e:kjjb83ibalc;W;Gbfcwfcbyd:y:kjjbBdbalcb8Pd:q:kjjb83i;W9Gaicd4hwdndnadmbJFFuFhDJFFuuhqJFFuuhkJFFuFhxJFFuuhmJFFuFhPxekawcdthsaehzincbhiinalaifgHazaifIdbgDaHIdbgxaxaD9EEUdbalc;W;GbfaifgHaDaHIdbgxaxaD9DEUdbaiclfgicx9hmbkazasfhzavcefgvad9hmbkalIdwhqalId;49GhDalIdlhkalId;09GhxalIdbhmalId;W9GhPkdndnadTmbJbbbbJbbjZaPam:tJbbbb:xgPaxak:tgxaxaP9DEgxaDaq:tgDaDax9DEgD:vaDJbbbb9BEhDawcdthsarhHadhzindndnaDaeIdbam:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcv2c;j:KM;jbGhvdndnaDaeclfIdbak:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcq2cM;j:KMeGavVhvdndnaDaecwfIdbaq:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaHavaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcC2c:KM;j:KdGVBdbaeasfheaHclfhHazcufgzmbkalcbcj;GbzNjjjbhiarhHadheinaiaHydbgzcFrGcx2fgvavydbcefBdbaiazcq4cFrGcx2fgvavydlcefBdlaiazcC4cFrGcx2fgzazydwcefBdwaHclfhHaecufgembxdkkalcbcj;GbzNjjjb8AkcbhHcbhzcbhecbhvinalaHfgiydbhsaiazBdbaicwfgwydbhOawavBdbaiclfgiydbhwaiaeBdbasazfhzaOavfhvawaefheaHcxfgHcj;Gb9hmbkcbhialaocbyd:K:kjjbHjjjjbbgzBd:m9GdnadTmbabhHinaHaiBdbaHclfhHadaicefgi9hmbkadTmbabhiadhHinalaraiydbgecdtfydbcFrGcx2fgvavydbgvcefBdbazavcdtfaeBdbaiclfhiaHcufgHmbkazhiadhHinalaraiydbgecdtfydbcq4cFrGcx2fgvavydlgvcefBdlabavcdtfaeBdbaiclfhiaHcufgHmbkabhiadhHinalaraiydbgecdtfydbcC4cFrGcx2fgvavydwgvcefBdwazavcdtfaeBdbaiclfhiaHcufgHmbkadTmbcbhiinabazydbcdtfaiBdbazclfhzadaicefgi9hmbkkclhidninaic98Smealc1;Gbfaifydbcbyd:G:kjjbH:bjjjbbaic98fhixbkkalcj;Hbf8Kjjjjbk9teiucbcbyd:O:kjjbgeabcifc98GfgbBd:O:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:O:kjjbgeabcrfc94GfgbBd:O:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:O:kjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:O:kjjbfgdBd:O:kjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk:6ddbcjwk:Cdb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:FFuuFFuuFFuuFFuFFFuFFFuFbc:Cqkzebbbebbbdbbb8WWbb"), {}).then(function(n) {
|
|
2366
2366
|
(o = n.instance).exports.__wasm_call_ctors(), o.exports.meshopt_encodeVertexVersion(0), o.exports.meshopt_encodeIndexVersion(1);
|
|
2367
2367
|
});
|
|
@@ -2371,27 +2371,27 @@ function Ni(o, e, a) {
|
|
|
2371
2371
|
function A(n) {
|
|
2372
2372
|
return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
|
|
2373
2373
|
}
|
|
2374
|
-
function i(n,
|
|
2375
|
-
var h = o.exports.sbrk, f = h(
|
|
2376
|
-
|
|
2377
|
-
var
|
|
2378
|
-
return
|
|
2374
|
+
function i(n, b, d, l, g) {
|
|
2375
|
+
var h = o.exports.sbrk, f = h(b), u = h(l * g), I = new Uint8Array(o.exports.memory.buffer);
|
|
2376
|
+
I.set(A(d), u);
|
|
2377
|
+
var p = n(f, b, u, l, g), B = new Uint8Array(p);
|
|
2378
|
+
return B.set(I.subarray(f, f + p)), h(f - h(0)), B;
|
|
2379
2379
|
}
|
|
2380
2380
|
function s(n) {
|
|
2381
|
-
for (var
|
|
2382
|
-
var l = n[
|
|
2383
|
-
return
|
|
2381
|
+
for (var b = 0, d = 0; d < n.length; ++d)
|
|
2382
|
+
var l = n[d];
|
|
2383
|
+
return b;
|
|
2384
2384
|
}
|
|
2385
|
-
function r(n,
|
|
2386
|
-
if (t(
|
|
2387
|
-
var
|
|
2388
|
-
return new Uint32Array(
|
|
2385
|
+
function r(n, b) {
|
|
2386
|
+
if (t(b == 2 || b == 4), b == 4) return new Uint32Array(n.buffer, n.byteOffset, n.byteLength / 4);
|
|
2387
|
+
var d = new Uint16Array(n.buffer, n.byteOffset, n.byteLength / 2);
|
|
2388
|
+
return new Uint32Array(d);
|
|
2389
2389
|
}
|
|
2390
|
-
function c(n,
|
|
2391
|
-
var
|
|
2392
|
-
|
|
2393
|
-
var
|
|
2394
|
-
return
|
|
2390
|
+
function c(n, b, d, l, g, h, f) {
|
|
2391
|
+
var u = o.exports.sbrk, I = u(d * l), p = u(d * h), B = new Uint8Array(o.exports.memory.buffer);
|
|
2392
|
+
B.set(A(b), p), n(I, d, l, g, p, f);
|
|
2393
|
+
var C = new Uint8Array(d * l);
|
|
2394
|
+
return C.set(B.subarray(I, I + d * l)), u(I - u(0)), C;
|
|
2395
2395
|
}
|
|
2396
2396
|
})();
|
|
2397
2397
|
var Kt = function() {
|
|
@@ -2402,25 +2402,25 @@ var Kt = function() {
|
|
|
2402
2402
|
});
|
|
2403
2403
|
function i(g) {
|
|
2404
2404
|
for (var h = new Uint8Array(g.length), f = 0; f < g.length; ++f) {
|
|
2405
|
-
var
|
|
2406
|
-
h[f] =
|
|
2405
|
+
var u = g.charCodeAt(f);
|
|
2406
|
+
h[f] = u > 96 ? u - 97 : u > 64 ? u - 39 : u + 4;
|
|
2407
2407
|
}
|
|
2408
|
-
var
|
|
2409
|
-
for (f = 0; f < g.length; ++f) h[
|
|
2410
|
-
return h.buffer.slice(0,
|
|
2411
|
-
}
|
|
2412
|
-
function s(g, h, f,
|
|
2413
|
-
var
|
|
2414
|
-
E.set(
|
|
2415
|
-
var Q = h(x,
|
|
2416
|
-
if (Q == 0 &&
|
|
2417
|
-
}
|
|
2418
|
-
var r = { NONE: "", OCTAHEDRAL: "meshopt_decodeFilterOct", QUATERNION: "meshopt_decodeFilterQuat", EXPONENTIAL: "meshopt_decodeFilterExp" }, c = { ATTRIBUTES: "meshopt_decodeVertexBuffer", TRIANGLES: "meshopt_decodeIndexBuffer", INDICES: "meshopt_decodeIndexSequence" }, n = [],
|
|
2419
|
-
function
|
|
2408
|
+
var I = 0;
|
|
2409
|
+
for (f = 0; f < g.length; ++f) h[I++] = h[f] < 60 ? e[h[f]] : 64 * (h[f] - 60) + h[++f];
|
|
2410
|
+
return h.buffer.slice(0, I);
|
|
2411
|
+
}
|
|
2412
|
+
function s(g, h, f, u, I, p, B) {
|
|
2413
|
+
var C = g.exports.sbrk, w = u + 3 & -4, x = C(w * I), y = C(p.length), E = new Uint8Array(g.exports.memory.buffer);
|
|
2414
|
+
E.set(p, y);
|
|
2415
|
+
var Q = h(x, u, I, y, p.length);
|
|
2416
|
+
if (Q == 0 && B && B(x, w, I), f.set(E.subarray(x, x + u * I)), C(x - C(0)), Q != 0) throw new Error("Malformed buffer data: " + Q);
|
|
2417
|
+
}
|
|
2418
|
+
var r = { NONE: "", OCTAHEDRAL: "meshopt_decodeFilterOct", QUATERNION: "meshopt_decodeFilterQuat", EXPONENTIAL: "meshopt_decodeFilterExp" }, c = { ATTRIBUTES: "meshopt_decodeVertexBuffer", TRIANGLES: "meshopt_decodeIndexBuffer", INDICES: "meshopt_decodeIndexSequence" }, n = [], b = 0;
|
|
2419
|
+
function d(g) {
|
|
2420
2420
|
var h = { object: new Worker(g), pending: 0, requests: {} };
|
|
2421
2421
|
return h.object.onmessage = function(f) {
|
|
2422
|
-
var
|
|
2423
|
-
h.pending -=
|
|
2422
|
+
var u = f.data;
|
|
2423
|
+
h.pending -= u.count, h.requests[u.id][u.action](u.value), delete h.requests[u.id];
|
|
2424
2424
|
}, h;
|
|
2425
2425
|
}
|
|
2426
2426
|
function l(g) {
|
|
@@ -2428,37 +2428,37 @@ var Kt = function() {
|
|
|
2428
2428
|
if (!h.id) return self.close();
|
|
2429
2429
|
self.ready.then(function(f) {
|
|
2430
2430
|
try {
|
|
2431
|
-
var
|
|
2432
|
-
s(f, f.exports[h.mode],
|
|
2433
|
-
} catch (
|
|
2434
|
-
self.postMessage({ id: h.id, count: h.count, action: "reject", value:
|
|
2431
|
+
var u = new Uint8Array(h.count * h.size);
|
|
2432
|
+
s(f, f.exports[h.mode], u, h.count, h.size, h.source, f.exports[h.filter]), self.postMessage({ id: h.id, count: h.count, action: "resolve", value: u }, [u.buffer]);
|
|
2433
|
+
} catch (I) {
|
|
2434
|
+
self.postMessage({ id: h.id, count: h.count, action: "reject", value: I });
|
|
2435
2435
|
}
|
|
2436
2436
|
});
|
|
2437
2437
|
}
|
|
2438
2438
|
return { ready: A, supported: !0, useWorkers: function(g) {
|
|
2439
2439
|
(function(h) {
|
|
2440
|
-
for (var f = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(i(t)) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + l.name + ";" + s.toString() + l.toString(),
|
|
2441
|
-
for (
|
|
2442
|
-
n.length = h, URL.revokeObjectURL(
|
|
2440
|
+
for (var f = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(i(t)) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + l.name + ";" + s.toString() + l.toString(), u = new Blob([f], { type: "text/javascript" }), I = URL.createObjectURL(u), p = n.length; p < h; ++p) n[p] = d(I);
|
|
2441
|
+
for (p = h; p < n.length; ++p) n[p].object.postMessage({});
|
|
2442
|
+
n.length = h, URL.revokeObjectURL(I);
|
|
2443
2443
|
})(g);
|
|
2444
|
-
}, decodeVertexBuffer: function(g, h, f,
|
|
2445
|
-
s(a, a.exports.meshopt_decodeVertexBuffer, g, h, f,
|
|
2446
|
-
}, decodeIndexBuffer: function(g, h, f,
|
|
2447
|
-
s(a, a.exports.meshopt_decodeIndexBuffer, g, h, f,
|
|
2448
|
-
}, decodeIndexSequence: function(g, h, f,
|
|
2449
|
-
s(a, a.exports.meshopt_decodeIndexSequence, g, h, f,
|
|
2450
|
-
}, decodeGltfBuffer: function(g, h, f,
|
|
2451
|
-
s(a, a.exports[c[
|
|
2452
|
-
}, decodeGltfBufferAsync: function(g, h, f,
|
|
2453
|
-
return n.length > 0 ? function(
|
|
2454
|
-
for (var
|
|
2444
|
+
}, decodeVertexBuffer: function(g, h, f, u, I) {
|
|
2445
|
+
s(a, a.exports.meshopt_decodeVertexBuffer, g, h, f, u, a.exports[r[I]]);
|
|
2446
|
+
}, decodeIndexBuffer: function(g, h, f, u) {
|
|
2447
|
+
s(a, a.exports.meshopt_decodeIndexBuffer, g, h, f, u);
|
|
2448
|
+
}, decodeIndexSequence: function(g, h, f, u) {
|
|
2449
|
+
s(a, a.exports.meshopt_decodeIndexSequence, g, h, f, u);
|
|
2450
|
+
}, decodeGltfBuffer: function(g, h, f, u, I, p) {
|
|
2451
|
+
s(a, a.exports[c[I]], g, h, f, u, a.exports[r[p]]);
|
|
2452
|
+
}, decodeGltfBufferAsync: function(g, h, f, u, I) {
|
|
2453
|
+
return n.length > 0 ? function(p, B, C, w, x) {
|
|
2454
|
+
for (var y = n[0], E = 1; E < n.length; ++E) n[E].pending < y.pending && (y = n[E]);
|
|
2455
2455
|
return new Promise(function(Q, k) {
|
|
2456
|
-
var D = new Uint8Array(
|
|
2457
|
-
|
|
2456
|
+
var D = new Uint8Array(C), v = ++b;
|
|
2457
|
+
y.pending += p, y.requests[v] = { resolve: Q, reject: k }, y.object.postMessage({ id: v, count: p, size: B, source: D, mode: w, filter: x }, [D.buffer]);
|
|
2458
2458
|
});
|
|
2459
|
-
}(g, h, f, c[
|
|
2460
|
-
var
|
|
2461
|
-
return s(a, a.exports[c[
|
|
2459
|
+
}(g, h, f, c[u], r[I]) : A.then(function() {
|
|
2460
|
+
var p = new Uint8Array(g * h);
|
|
2461
|
+
return s(a, a.exports[c[u]], p, g, h, f, a.exports[r[I]]), p;
|
|
2462
2462
|
});
|
|
2463
2463
|
} };
|
|
2464
2464
|
}();
|
|
@@ -2467,12 +2467,12 @@ var Kt = function() {
|
|
|
2467
2467
|
if (typeof WebAssembly != "object") return { supported: !1 };
|
|
2468
2468
|
var a = WebAssembly.instantiate(function(r) {
|
|
2469
2469
|
for (var c = new Uint8Array(r.length), n = 0; n < r.length; ++n) {
|
|
2470
|
-
var
|
|
2471
|
-
c[n] =
|
|
2470
|
+
var b = r.charCodeAt(n);
|
|
2471
|
+
c[n] = b > 96 ? b - 97 : b > 64 ? b - 39 : b + 4;
|
|
2472
2472
|
}
|
|
2473
|
-
var
|
|
2474
|
-
for (n = 0; n < r.length; ++n) c[
|
|
2475
|
-
return c.buffer.slice(0,
|
|
2473
|
+
var d = 0;
|
|
2474
|
+
for (n = 0; n < r.length; ++n) c[d++] = c[n] < 60 ? e[c[n]] : 64 * (c[n] - 60) + c[++n];
|
|
2475
|
+
return c.buffer.slice(0, d);
|
|
2476
2476
|
}("b9H79Tebbbe9Ek9Geueu9Geub9Gbb9GPuuuuuuuuuuu99uueu9Gvuuuuub9Gluuuub9Gquuuuuuu99uueu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9GiuuueuizsdilvoirwDbqqbeqlve9Weiiviebeoweuec:G;jekr:Tewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bl8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bvQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7boX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2Wbra9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbwl79IV9RbDDwebcekdxmq::9Usdbk;i6iKuY99Ou8Jjjjjbc;W;ab9RgP8KjjjjbaPcwfcbc;Kbz:ljjjb8AaPcualcefgscdtascFFFFi0Ecbyd1:jjjbHjjjjbbgzBdwaPceBd9OaPazBdbaPcuadcitadcFFFFe0Ecbyd1:jjjbHjjjjbbgHBdxaPcdBd9OaPaHBdlaPaeadalcbz:cjjjbaPcualcdtgOalcFFFFi0EgAcbyd1:jjjbHjjjjbbgCBdzaPciBd9OaPaAcbyd1:jjjbHjjjjbbgXBdCaPclBd9Oalcd4alfhQcehLinaLgscethLasaQ6mbkcbhKaPcuascdtgLascFFFFi0Ecbyd1:jjjbHjjjjbbgQBdKaPcvBd9OaQcFeaLz:ljjjbhYdnalTmbavcd4h8AascufhEinaiaKa8A2cdtfg3ydlgscH4as7c:F:b:DD2a3ydbgscH4as7c;D;O:B8J27a3ydwgscH4as7c:3F;N8N27hQcbhsdndninaYaQaEGgQcdtfg5ydbgLcuSmeaiaLa8A2cdtfa3cxz:ojjjbTmdascefgsaQfhQasaE9nmbxdkka5aKBdbaKhLkaCaKcdtfaLBdbaKcefgKal9hmbkcbhsaXhLinaLasBdbaLclfhLalascefgs9hmbkcbhsaChLaXhQindnasaLydbgESmbaQaXaEcdtfgEydbBdbaEasBdbkaLclfhLaQclfhQalascefgs9hmbkkcbh8EaYcbyd:m:jjjbH:bjjjbbaPclBd9OaPalcbyd1:jjjbHjjjjbbgEBdKaPcvBd9OaPaAcbyd1:jjjbHjjjjbbgsBd3aPcoBd9OaPaAcbyd1:jjjbHjjjjbbgLBdaaPcrBd9OascFeaOz:ljjjbh8FaLcFeaOz:ljjjbhadnalTmbaHcwfhhindnaza8EgQcefg8Ecdtfydbg3azaQcdtgsfydbgLSmba3aL9RhOaHaLcitfhgaaasfh8Ja8FasfhKcbh8Aindndnaga8Acitfydbg5aQ9hmbaKaQBdba8JaQBdbxekdnaza5cdtg8KfgsclfydbgLasydbgsSmbaHascitg3fydbaQSmeaLas9Rh8Lascu7aLfhYaha3fhLcbhsinaYasSmeascefhsaLydbh3aLcwfhLa3aQ9hmbkasa8L6mekaaa8KfgsaQa5asydbcuSEBdbaKa5aQaKydbcuSEBdbka8Acefg8AaO9hmbkka8Eal9hmbkaChLaXhQaah3a8Fh8AcbhsindndnasaLydbg59hmbdnasaQydbg59hmba8Aydbh5dna3ydbgYcu9hmba5cu9hmbaEasfcb86bbxikaEasfhKdnasaYSmbasa5SmbaKce86bbxikaKcl86bbxdkdnasaXa5cdtgYfydb9hmbdna3ydbgKcuSmbasaKSmba8AydbgOcuSmbasaOSmbaaaYfydbggcuSmbaga5Smba8FaYfydbgYcuSmbaYa5SmbdnaCaKcdtfydbaCaYcdtfydb9hmbaCaOcdtfydbaCagcdtfydb9hmbaEasfcd86bbxlkaEasfcl86bbxikaEasfcl86bbxdkaEasfcl86bbxekaEasfaEa5fRbb86bbkaLclfhLaQclfhQa3clfh3a8Aclfh8Aalascefgs9hmbkaxceGTmbaEhsalhLindnasRbbce9hmbascl86bbkascefhsaLcufgLmbkkcualcx2alc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbh8JaPcwfaPyd9Ogscdtfa8JBdbaPascefgOBd9Oa8Jaialavz:djjjbdndnaDmbcbhvxekcbh5aPcwfaOcdtfcuaDal2gLcdtaLcFFFFi0Ecbyd1:jjjbHjjjjbbgvBdbaPascdfgOBd9OalTmbarcd4cdthYaDcdthKavh8AinaohsawhLa8AhQaDh3inaQasIdbaLIdbNUdbasclfhsaLclfhLaQclfhQa3cufg3mbkaoaYfhoa8AaKfh8Aa5cefg5al9hmbkkaPcwfaOcdtfcualc8S2gsalc;D;O;f8U0EgQcbyd1:jjjbHjjjjbbgLBdbaPaOcefg3Bd9OaLcbasz:ljjjbh8EdndndnaDTmbaPcwfa3cdtfaQcbyd1:jjjbHjjjjbbgoBdbaPaOcdfgLBd9Oaocbasz:ljjjb8AaPcwfaLcdtfcuaDal2gscltgLascFFFFb0Ecbyd1:jjjbHjjjjbbgwBdbaPaOcifBd9OawcbaLz:ljjjb8AadmexdkcbhocbhwadTmekcbh8AaehLindna8JaLclfydbg5cx2fgsIdba8JaLydbgYcx2fgQIdbg8M:tg8Na8JaLcwfydbgKcx2fg3IdlaQIdlgy:tg8PNa3Idba8M:tgIasIdlay:tg8RN:tg8Sa8SNa8Ra3IdwaQIdwgR:tg8UNa8PasIdwaR:tg8RN:tg8Pa8PNa8RaINa8Ua8NN:tg8Na8NNMM:rgIJbbbb9ETmba8SaI:vh8Sa8NaI:vh8Na8PaI:vh8Pka8EaCaYcdtfydbc8S2fgsa8PaI:rgIa8PNNg8RasIdbMUdbasa8NaIa8NNg8VNg8UasIdlMUdlasa8SaIa8SNg8WNg8XasIdwMUdwasa8Va8PNg8VasIdxMUdxasa8Wa8PNg8YasIdzMUdzasa8Wa8NNg8WasIdCMUdCasa8PaIa8SaRNa8Pa8MNaya8NNMM:mgyNg8MNg8PasIdKMUdKasa8Na8MNg8NasId3MUd3asa8Sa8MNg8SasIdaMUdaasa8MayNg8MasId8KMUd8KasaIasIdyMUdya8EaCa5cdtfydbc8S2fgsa8RasIdbMUdbasa8UasIdlMUdlasa8XasIdwMUdwasa8VasIdxMUdxasa8YasIdzMUdzasa8WasIdCMUdCasa8PasIdKMUdKasa8NasId3MUd3asa8SasIdaMUdaasa8MasId8KMUd8KasaIasIdyMUdya8EaCaKcdtfydbc8S2fgsa8RasIdbMUdbasa8UasIdlMUdlasa8XasIdwMUdwasa8VasIdxMUdxasa8YasIdzMUdzasa8WasIdCMUdCasa8PasIdKMUdKasa8NasId3MUd3asa8SasIdaMUdaasa8MasId8KMUd8KasaIasIdyMUdyaLcxfhLa8Acifg8Aad6mbkcbh5aehYincbhLinaEaeaLc:G1jjbfydba5fcdtfydbgQfRbbhsdndnaEaYaLfydbg3fRbbg8Ac99fcFeGcpe0mbasceSmbascd9hmekdna8AcufcFeGce0mba8Fa3cdtfydbaQ9hmekdnascufcFeGce0mbaaaQcdtfydba39hmekdna8Acv2asfc:W1jjbfRbbTmbaCaQcdtfydbaCa3cdtfydb0mekJbbacJbbjZasceSEhIa8AceShOa8JaeaLc:K1jjbfydba5fcdtfydbcx2fhsdna8JaQcx2fg8AIdwa8Ja3cx2fgKIdwgy:tg8Pa8PNa8AIdbaKIdbgR:tg8Na8NNa8AIdlaKIdlg8R:tg8Sa8SNMM:rg8MJbbbb9ETmba8Pa8M:vh8Pa8Sa8M:vh8Sa8Na8M:vh8NkJbbacaIaOEh8WdnasIdway:tgIa8PaIa8PNasIdbaR:tg8Xa8NNa8SasIdla8R:tg8VNMMg8UN:tgIaINa8Xa8Na8UN:tg8Pa8PNa8Va8Sa8UN:tg8Na8NNMM:rg8SJbbbb9ETmbaIa8S:vhIa8Na8S:vh8Na8Pa8S:vh8Pka8EaCa3cdtfydbc8S2fgsa8Pa8Wa8MNg8Sa8PNNg8UasIdbMUdbasa8Na8Sa8NNg8WNg8XasIdlMUdlasaIa8SaINg8MNg8VasIdwMUdwasa8Wa8PNg8WasIdxMUdxasa8Ma8PNg8YasIdzMUdzasa8Ma8NNg8ZasIdCMUdCasa8Pa8SaIayNa8PaRNa8Ra8NNMM:mgyNg8MNg8PasIdKMUdKasa8Na8MNg8NasId3MUd3asaIa8MNgIasIdaMUdaasa8MayNg8MasId8KMUd8Kasa8SasIdyMUdya8EaCaQcdtfydbc8S2fgsa8UasIdbMUdbasa8XasIdlMUdlasa8VasIdwMUdwasa8WasIdxMUdxasa8YasIdzMUdzasa8ZasIdCMUdCasa8PasIdKMUdKasa8NasId3MUd3asaIasIdaMUdaasa8MasId8KMUd8Kasa8SasIdyMUdykaLclfgLcx9hmbkaYcxfhYa5cifg5ad6mbkaDTmbcbhYinJbbbbhRa8JaeaYcdtfgsclfydbgKcx2fgLIdwa8JasydbgOcx2fgQIdwg8V:tg8Na8NNaLIdbaQIdbg8Y:tgIaINaLIdlaQIdlg8Z:tg8Sa8SNMMg8Wa8Jascwfydbggcx2fgsIdwa8V:tg8MNa8Na8Na8MNaIasIdba8Y:tgyNa8SasIdla8Z:tg8RNMMg8PN:tJbbbbJbbjZa8Wa8Ma8MNayayNa8Ra8RNMMg8XNa8Pa8PN:tg8U:va8UJbbbb9BEg8UNh80a8Xa8NNa8Ma8PN:ta8UNh81a8Wa8RNa8Sa8PN:ta8UNhBa8Xa8SNa8Ra8PN:ta8UNh83a8WayNaIa8PN:ta8UNhUa8XaINaya8PN:ta8UNh85aIa8RNaya8SN:tg8Pa8PNa8Sa8MNa8Ra8NN:tg8Pa8PNa8NayNa8MaIN:tg8Pa8PNMM:r:rh8PavaOaD2cdtfhLavagaD2cdtfhQavaKaD2cdtfh3a8V:mh86a8Z:mh87a8Y:mh88cbh8AaDh5Jbbbbh8RJbbbbh8UJbbbbh8WJbbbbh8XJbbbbh8VJbbbbh8YJbbbbh8ZJbbbbh89Jbbbbh8:inaPc;Wbfa8Afgscwfa8Pa81a3IdbaLIdbg8M:tg8SNa80aQIdba8M:tgyNMg8NNUdbasclfa8Pa83a8SNaBayNMgINUdbasa8Pa85a8SNaUayNMg8SNUdbascxfa8Pa86a8NNa87aINa8Ma88a8SNMMMg8MNUdba8Pa8NaINNa8XMh8Xa8Pa8Na8SNNa8VMh8Va8PaIa8SNNa8YMh8Ya8Pa8Ma8MNNaRMhRa8Pa8Na8MNNa8RMh8Ra8PaIa8MNNa8UMh8Ua8Pa8Sa8MNNa8WMh8Wa8Pa8Na8NNNa8ZMh8Za8PaIaINNa89Mh89a8Pa8Sa8SNNa8:Mh8:aLclfhLa3clfh3aQclfhQa8Aczfh8Aa5cufg5mbkaoaCaOcdtfydbgLc8S2fgsa8:asIdbMUdbasa89asIdlMUdlasa8ZasIdwMUdwasa8YasIdxMUdxasa8VasIdzMUdzasa8XasIdCMUdCasa8WasIdKMUdKasa8UasId3MUd3asa8RasIdaMUdaasaRasId8KMUd8Kasa8PasIdyMUdyaoaCaKcdtfydbgKc8S2fgsa8:asIdbMUdbasa89asIdlMUdlasa8ZasIdwMUdwasa8YasIdxMUdxasa8VasIdzMUdzasa8XasIdCMUdCasa8WasIdKMUdKasa8UasId3MUd3asa8RasIdaMUdaasaRasId8KMUd8Kasa8PasIdyMUdyaoaCagcdtfydbgOc8S2fgsa8:asIdbMUdbasa89asIdlMUdlasa8ZasIdwMUdwasa8YasIdxMUdxasa8VasIdzMUdzasa8XasIdCMUdCasa8WasIdKMUdKasa8UasId3MUd3asa8RasIdaMUdaasaRasId8KMUd8Kasa8PasIdyMUdyawaLaD2cltfh5cbhLaDh3ina5aLfgsaPc;WbfaLfgQIdbasIdbMUdbasclfg8AaQclfIdba8AIdbMUdbascwfg8AaQcwfIdba8AIdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa3cufg3mbkawaKaD2cltfh5cbhLaDh3ina5aLfgsaPc;WbfaLfgQIdbasIdbMUdbasclfg8AaQclfIdba8AIdbMUdbascwfg8AaQcwfIdba8AIdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa3cufg3mbkawaOaD2cltfh5cbhLaDh3ina5aLfgsaPc;WbfaLfgQIdbasIdbMUdbasclfg8AaQclfIdba8AIdbMUdbascwfg8AaQcwfIdba8AIdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa3cufg3mbkaYcifgYad6mbkkdnabaeSmbabaeadcdtz:kjjjb8AkaPydbhZcbhsdnalTmbaZclfhsaZydbh3aEhLalh8AcbhQincbasydbg5a39RaLRbbcpeGEaQfhQaLcefhLasclfhsa5h3a8Acufg8AmbkaQce4hskcuadas9Rcifgrcx2arc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbh8LaPcwfaPyd9Ogscdtfa8LBdbaPascefgLBd9OaPcwfaLcdtfcuarcdtarcFFFFi0Ecbyd1:jjjbHjjjjbbgxBdbaPascdfgLBd9OaPcwfaLcdtfaAcbyd1:jjjbHjjjjbbgHBdbaPascifgLBd9OaPcwfaLcdtfalcbyd1:jjjbHjjjjbbgnBdbaPasclfBd9OJbbbbh8Ydnadaq9nmbdnarci6mbakakNh8VaDclthca8Lcwfh9cJbbbbh8YinaPabadghalaCz:cjjjbabhOcbhzcbhKincbhsindnaCaOasfydbgQcdtgYfydbg8AaCabasc;m1jjbfydbaKfcdtfydbgLcdtfydbg5SmbaEaLfRbbgecv2aEaQfRbbg3fc;G1jjbfRbbg8Ka3cv2aefggc;G1jjbfRbbgiVcFeGTmbdnagc:W1jjbfRbbTmba5a8A0mekdna3ae9hmba3cufcFeGce0mba8FaYfydbaL9hmeka8Lazcx2fg3aLaQaicFeGg8AEBdla3aQaLa8AEBdba3a8Aa8KGcb9hBdwazcefhzkasclfgscx9hmbkdnaKcifgKah9pmbaOcxfhOazcifar9nmekkdnazmbahhdxikcbheinJbbbbJbbjZa8EaCa8Laecx2fg3ydlg8Aa3ydbg5a3ydwgLEgKcdtfydbg8Kc8S2gifgsIdyg8P:va8PJbbbb9BEasIdwa8Ja5a8AaLEgYcx2fgLIdwg8SNasIdzaLIdbg8MNasIdaMg8Pa8PMMa8SNasIdlaLIdlgyNasIdCa8SNasId3Mg8Pa8PMMayNasIdba8MNasIdxayNasIdKMg8Pa8PMMa8MNasId8KMMM:lNh8WJbbbbJbbjZa8EaCa5cdtfydbgdc8S2gQfgsIdyg8P:va8PJbbbb9BEasIdwa8Ja8Acx2fgLIdwgINasIdzaLIdbgRNasIdaMg8Pa8PMMaINasIdlaLIdlg8RNasIdCaINasId3Mg8Pa8PMMa8RNasIdbaRNasIdxa8RNasIdKMg8Pa8PMMaRNasId8KMMM:lNh8Xa3cwfhOa3clfhgdnaDTmbaoaQfgQIdwaINaQIdzaRNaQIdaMg8Pa8PMMaINaQIdla8RNaQIdCaINaQId3Mg8Pa8PMMa8RNaQIdbaRNaQIdxa8RNaQIdKMg8Pa8PMMaRNaQId8KMMMh8Nava8AaD2cdtfhLawadaD2cltfhsaQIdyh8UaDhQinaLIdbg8PJbbb;aNascxfIdbaIascwfIdbNaRasIdbNa8RasclfIdbNMMMNa8Pa8PNa8UNa8NMMh8NaLclfhLasczfhsaQcufgQmbkaoaifgQIdwa8SNaQIdza8MNaQIdaMg8Pa8PMMa8SNaQIdlayNaQIdCa8SNaQId3Mg8Pa8PMMayNaQIdba8MNaQIdxayNaQIdKMg8Pa8PMMa8MNaQId8KMMMhIavaYaD2cdtfhLawa8KaD2cltfhsaQIdyhRaDhQinaLIdbg8PJbbb;aNascxfIdba8SascwfIdbNa8MasIdbNayasclfIdbNMMMNa8Pa8PNaRNaIMMhIaLclfhLasczfhsaQcufgQmbka8WaI:lMh8Wa8Xa8N:lMh8Xkaga8AaYa8Xa8W9FgsEBdba3a5aKasEBdbaOa8Xa8WasEUdbaecefgeaz9hmbkaPc;Wbfcbcj;abz:ljjjb8Aa9chsazhLinaPc;WbfasydbcO4c;8ZGfgQaQydbcefBdbascxfhsaLcufgLmbkcbhscbhLinaPc;WbfasfgQydbh3aQaLBdba3aLfhLasclfgscj;ab9hmbkcbhsa9chLinaPc;WbfaLydbcO4c;8ZGfgQaQydbgQcefBdbaxaQcdtfasBdbaLcxfhLazascefgs9hmbkahaq9RgQci9UhJdnalTmbcbhsaHhLinaLasBdbaLclfhLalascefgs9hmbkkcbh9eancbalz:ljjjbhTaQcO9UhSaJce4h9haPydlh9icbhicbhgdnina8Laxagcdtfydbcx2fgOIdwg8Na8V9EmeaiaJ9pmeJFFuuh8Pdna9haz9pmba8Laxa9hcdtfydbcx2fIdwJbb;aZNh8Pkdna8Na8P9ETmbaiaS0mdkdnaTaCaOydlg6cdtg9kfydbg3fg0RbbaTaCaOydbgKcdtg9mfydbg9nfg9oRbbVmbdnaZa9ncdtfgsclfydbgLasydbgsSmbaLas9Rh5a9iascitfhsa8Ja3cx2fgYcwfhdaYclfhAa8Ja9ncx2fg8Kcwfh9pa8Kclfh9qcbhLcehednindnaHasydbcdtfydbgQa3SmbaHasclfydbcdtfydbg8Aa3SmbaQa8ASmba8Ja8Acx2fg8AIdba8JaQcx2fgQIdbgI:tg8Pa9qIdbaQIdlg8S:tg8MNa8KIdbaI:tgya8AIdla8S:tg8NN:ta8PaAIdba8S:tgRNaYIdbaI:tg8Ra8NN:tNa8Na9pIdbaQIdwg8S:tg8UNa8Ma8AIdwa8S:tgIN:ta8NadIdba8S:tg8SNaRaIN:tNaIayNa8Ua8PN:taIa8RNa8Sa8PN:tNMMJbbbb9FmdkascwfhsaLcefgLa56hea5aL9hmbkkaeceGTmba9hcefh9hxeka8Ea3c8S2gQfgsa8Ea9nc8S2g8AfgLIdbasIdbMUdbasaLIdlasIdlMUdlasaLIdwasIdwMUdwasaLIdxasIdxMUdxasaLIdzasIdzMUdzasaLIdCasIdCMUdCasaLIdKasIdKMUdKasaLId3asId3MUd3asaLIdaasIdaMUdaasaLId8KasId8KMUd8KasaLIdyasIdyMUdydnaDTmbaoaQfgsaoa8AfgLIdbasIdbMUdbasaLIdlasIdlMUdlasaLIdwasIdwMUdwasaLIdxasIdxMUdxasaLIdzasIdzMUdzasaLIdCasIdCMUdCasaLIdKasIdKMUdKasaLId3asId3MUd3asaLIdaasIdaMUdaasaLId8KasId8KMUd8KasaLIdyasIdyMUdyaca9n2heaca32hYawhLaDh8AinaLaYfgsaLaefgQIdbasIdbMUdbasclfg5aQclfIdba5IdbMUdbascwfg5aQcwfIdba5IdbMUdbascxfgsaQcxfIdbasIdbMUdbaLczfhLa8Acufg8AmbkkaOcwfhLdndndndnaEaKfgQRbbc9:fPdebdkaKhsinaHascdtgsfa3BdbaXasfydbgsaK9hmbxikkaXa9kfydbhsaXa9mfydbhKaHa9mfa6Bdbash6kaHaKcdtfa6Bdbka9oce86bba0ce86bbaLIdbg8Pa8Ya8Ya8P9DEh8Ya9ecefh9ececdaQRbbceSEaifhikagcefggaz9hmbkkdna9embahhdxikdnalTmbcbhLa8FhsindnasydbgQcuSmbdnaLaHaQcdtg3fydbgQ9hmba8Fa3fydbhQkasaQBdbkasclfhsalaLcefgL9hmbkcbhLaahsindnasydbgQcuSmbdnaLaHaQcdtg3fydbgQ9hmbaaa3fydbhQkasaQBdbkasclfhsalaLcefgL9hmbkkcbhdabhscbh8AindnaHasydbcdtfydbgLaHasclfydbcdtfydbgQSmbaLaHascwfydbcdtfydbg3SmbaQa3Smbabadcdtfg5aLBdba5clfaQBdba5cwfa3Bdbadcifhdkascxfhsa8Acifg8Aah6mbkadaq9nmdxbkkaPabadalaCz:cjjjbkdnamTmbama8Y:rUdbkaPyd9OgscdtaPcwffc98fhCdninasTmeaCydbcbyd:m:jjjbH:bjjjbbaCc98fhCascufhsxbkkaPc;W;abf8Kjjjjbadk;:ieouabydlhvabydbclfcbaicdtz:ljjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbarcearce0EhdinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfheadcufgdmbkkabydbcbBdbk:Zldouv998Jjjjjbca9Rglczfcwfcbyd11jjbBdbalcb8Pdj1jjb83izalcwfcbydN1jjbBdbalcb8Pd:m1jjb83ibdnadTmbaicd4hvdnabTmbavcdthocbhraehwinabarcx2fgiaearav2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinalczfaifgDawaifIdbgqaDIdbgkakaq9EEUdbalaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkawaofhwarcefgrad9hmbxdkkavcdthrcbhwincbhiinalczfaifgDaeaifIdbgqaDIdbgkakaq9EEUdbalaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkaearfheawcefgwad9hmbkkdnabTmbadTmbJbbbbJbbjZalIdbalIdzgk:tJbbbb:xgqalIdlalIdCgx:tgmamaq9DEgqalIdwalIdKgm:tgPaPaq9DEgq:vaqJbbbb9BEhqinabaqabIdbak:tNUdbabclfgiaqaiIdbax:tNUdbabcwfgiaqaiIdbam:tNUdbabcxfhbadcufgdmbkkk8KbabaeadaialavcbcbcbcbaoarawaDz:bjjjbk8KbabaeadaialavaoarawaDaqakaxamz:bjjjbk;lOowud99wue99iul998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcwfcbc;Kbz:ljjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd1:jjjbHjjjjbbgqBdwawceBd9Oaqaeadaiz:djjjbawcuadcdtadcFFFFi0Egkcbyd1:jjjbHjjjjbbgxBdxawcdBd9Oadcd4adfhmceheinaegicetheaiam6mbkcbhmawcuaicdtgPaicFFFFi0Ecbyd1:jjjbHjjjjbbgsBdzawciBd9Odndnar:Zgz:rJbbbZMgH:lJbbb9p9DTmbaH:Ohexekcjjjj94hekaicufhOc:bwhAcbhCcbhXadhQinaChLaeaAgKcufaeaK9iEamgDcefaeaD9kEhYdndnadTmbaYcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbh3cbh5indnaEaxa5cdtfydbgAcm4aA7c:v;t;h;Ev2gics4ai7aOGgmcdtfgCydbgecuSmbaeaASmbcehiinaEamaifaOGgmcdtfgCydbgecuSmeaicefhiaeaA9hmbkkaCaABdba3aecuSfh3a5cefg5ad9hmbxdkkascFeaPz:ljjjb8Acbh3kaDaYa3ar0giEhmaLa3aiEhCdna3arSmbaYaKaiEgAam9Rcd9imbdndnaXcl0mbdnaQ:ZgHaL:Zg8A:taY:Yg8EaD:Y:tg8Fa8EaK:Y:tgaa3:Zghaz:tNNNaHaz:taaNa8Aah:tNa8Aaz:ta8FNahaH:tNM:va8EMJbbbZMgH:lJbbb9p9DTmbaH:Ohexdkcjjjj94hexekamaAfcd9Theka3aQaiEhQaXcefgXcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd1:jjjbHjjjjbbg5BdCawclBd9OdndnadTmbamcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbhDcbh3inaxa3cdtgYfydbgAcm4aA7c:v;t;h;Ev2gics4ai7hecbhidndninaEaeaOGgmcdtfgCydbgecuSmednaxaecdtgCfydbaASmbaicefgiamfheaiaO9nmekka5aCfydbhixekaCa3BdbaDhiaDcefhDka5aYfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekascFeaPz:ljjjb8AcbhDcbhekawaecbyd1:jjjbHjjjjbbgeBdKawcvBd9Oaecbaiz:ljjjbhOavcd4hxdnadTmbaxcdth3a5hmalhAaqheadhEinaOamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaAc;81jjbalEgCIdbaiIdxMUdxaiaCIdlaiIdzMUdzaiaCIdwaiIdCMUdCaiaiIdKJbbjZMUdKamclfhmaAa3fhAaecxfheaEcufgEmbkkdnaDTmbaOcxfhiaDheinaictfgmamIdbJbbbbJbbjZaicxfIdbgH:vaHJbbbb9BEgHNUdbaic94fgmaHamIdbNUdbaic98fgmaHamIdbNUdbaiaHaiIdbNUdbaiclfgmaHamIdbNUdbaicwfgmaHamIdbNUdbaic3fhiaecufgembkkcbhAawcuaDcdtgYaDcFFFFi0Egicbyd1:jjjbHjjjjbbgeBd3awcoBd9Oawaicbyd1:jjjbHjjjjbbgEBdaaecFeaYz:ljjjbh3dnadTmbaoaoNh8Aaxcdthxalheina8Aaec;81jjbalEgmIdwaOa5ydbgCc32fgiIdC:tgHaHNamIdbaiIdx:tgHaHNamIdlaiIdz:tgHaHNMMNaqcwfIdbaiIdw:tgHaHNaqIdbaiIdb:tgHaHNaqclfIdbaiIdl:tgHaHNMMMhHdndna3aCcdtgifgmydbcuSmbaEaifIdbaH9ETmekamaABdbaEaifaHUdbka5clfh5aeaxfheaqcxfhqadaAcefgA9hmbkkaba3aYz:kjjjb8AcrhikaicdthiinaiTmeaic98fgiawcwffydbcbyd:m:jjjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Qdidui99ducbhi8Jjjjjbca9Rglczfcwfcbyd11jjbBdbalcb8Pdj1jjb83izalcwfcbydN1jjbBdbalcb8Pd:m1jjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgoaDIdbgrarao9EEUdbaladfgDaoaDIdbgrarao9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkavJbbbb:xgvaoaoav9DEgoararao9DEk9DeeuabcFeaicdtz:ljjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcifc98GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcrfc94GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:q:jjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:q:jjjbfgdBd:q:jjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk6eiucbhidnadTmbdninabRbbglaeRbbgv9hmeaecefheabcefhbadcufgdmbxdkkalav9Rhikaikk:Iedbcjwk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbebbbdbbbbbbbebbbeeebeebebbeeebebbbbbebebbbbbebbbdbbbbbbbbbbbbbbbeeeeebebbbbbebbbbbeebbbbbbbbbbbbbbbbbbbbbc1Dkxebbbdbbb:G9Kbb"), {}).then(function(r) {
|
|
2477
2477
|
(o = r.instance).exports.__wasm_call_ctors();
|
|
2478
2478
|
});
|
|
@@ -2482,13 +2482,13 @@ var Kt = function() {
|
|
|
2482
2482
|
function A(r) {
|
|
2483
2483
|
return new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
|
|
2484
2484
|
}
|
|
2485
|
-
function i(r, c, n,
|
|
2486
|
-
var f = o.exports.sbrk,
|
|
2487
|
-
|
|
2488
|
-
var
|
|
2485
|
+
function i(r, c, n, b, d, l, g, h) {
|
|
2486
|
+
var f = o.exports.sbrk, u = f(4 * h), I = f(n * b), p = f(n * l), B = new Uint8Array(o.exports.memory.buffer);
|
|
2487
|
+
B.set(A(c), I), d && B.set(A(d), p);
|
|
2488
|
+
var C = r(u, I, n, b, p, l, g, h);
|
|
2489
2489
|
new Uint8Array(o.exports.memory.buffer);
|
|
2490
|
-
var
|
|
2491
|
-
return A(
|
|
2490
|
+
var w = new Uint32Array(C);
|
|
2491
|
+
return A(w).set(B.subarray(u, u + 4 * C)), f(u - f(0)), w;
|
|
2492
2492
|
}
|
|
2493
2493
|
var s = { LockBorder: 1 };
|
|
2494
2494
|
})();
|
|
@@ -2566,7 +2566,7 @@ class Pi {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
|
-
get(e, a, t, A, i, s, r, c, n,
|
|
2569
|
+
get(e, a, t, A, i, s, r, c, n, b, d) {
|
|
2570
2570
|
const l = this, g = ct(t), h = new AbortController();
|
|
2571
2571
|
if (e.signal.addEventListener("abort", () => {
|
|
2572
2572
|
l.register[g] && Object.keys(l.register[g]).length != 0 || h.abort("user abort");
|
|
@@ -2575,59 +2575,59 @@ class Pi {
|
|
|
2575
2575
|
else if (Object.keys(l.register[g]).length == 1) {
|
|
2576
2576
|
let f;
|
|
2577
2577
|
t.includes(".b3dm") ? f = () => {
|
|
2578
|
-
var
|
|
2579
|
-
|
|
2580
|
-
if (!
|
|
2581
|
-
return
|
|
2582
|
-
}).then((
|
|
2583
|
-
l.meshCallback(
|
|
2584
|
-
}, c, n)).then((
|
|
2585
|
-
l.cache.put(g,
|
|
2586
|
-
}).catch((
|
|
2578
|
+
var u;
|
|
2579
|
+
u = l.proxy ? () => fetch(l.proxy, { method: "POST", body: t, signal: h.signal }) : () => fetch(t, { signal: h.signal }), ae++, u().then((I) => {
|
|
2580
|
+
if (!I.ok) throw console.error("could not load tile with path : " + t), new Error(`couldn't load "${t}". Request failed with status ${I.status} : ${I.statusText}`);
|
|
2581
|
+
return I.arrayBuffer();
|
|
2582
|
+
}).then((I) => this.b3dmDecoder.parseB3DM(I, (p) => {
|
|
2583
|
+
l.meshCallback(p, b);
|
|
2584
|
+
}, c, n)).then((I) => {
|
|
2585
|
+
l.cache.put(g, I), l._checkSize(), this._meshReceived(l.cache, l.register, g, i, s, r, a);
|
|
2586
|
+
}).catch((I) => {
|
|
2587
2587
|
}).finally(() => {
|
|
2588
2588
|
ae--;
|
|
2589
2589
|
});
|
|
2590
|
-
} : t.includes(".glb") || t.includes(".gltf") ? f =
|
|
2591
|
-
var
|
|
2592
|
-
|
|
2593
|
-
if (!
|
|
2594
|
-
return
|
|
2595
|
-
}).then((
|
|
2596
|
-
l.cache.put(g,
|
|
2597
|
-
}).catch((
|
|
2590
|
+
} : t.includes(".glb") || t.includes(".gltf") ? f = d ? () => {
|
|
2591
|
+
var u;
|
|
2592
|
+
u = l.proxy ? () => fetch(l.proxy, { method: "POST", body: t, signal: h.signal }) : () => fetch(t, { signal: h.signal }), ae++, u().then((I) => {
|
|
2593
|
+
if (!I.ok) throw console.error("could not load tile with path : " + t), new Error(`couldn't load "${t}". Request failed with status ${I.status} : ${I.statusText}`);
|
|
2594
|
+
return I.arrayBuffer();
|
|
2595
|
+
}).then((I) => this.splatsDecoder.parseSplats(I, c, n, d)).then((I) => {
|
|
2596
|
+
l.cache.put(g, I), l._checkSize(), l._meshReceived(l.cache, l.register, g, i, s, r, a);
|
|
2597
|
+
}).catch((I) => {
|
|
2598
2598
|
}).finally(() => {
|
|
2599
2599
|
ae--;
|
|
2600
2600
|
});
|
|
2601
2601
|
} : () => {
|
|
2602
|
-
var
|
|
2603
|
-
|
|
2604
|
-
if (!
|
|
2605
|
-
return
|
|
2606
|
-
}).then(async (
|
|
2607
|
-
await async function(
|
|
2608
|
-
return new Promise((
|
|
2609
|
-
const
|
|
2610
|
-
|
|
2602
|
+
var u;
|
|
2603
|
+
u = l.proxy ? () => fetch(l.proxy, { method: "POST", body: t, signal: h.signal }) : () => fetch(t, { signal: h.signal }), ae++, u().then((I) => {
|
|
2604
|
+
if (!I.ok) throw console.error("could not load tile with path : " + t), new Error(`couldn't load "${t}". Request failed with status ${I.status} : ${I.statusText}`);
|
|
2605
|
+
return I.arrayBuffer();
|
|
2606
|
+
}).then(async (I) => {
|
|
2607
|
+
await async function(p) {
|
|
2608
|
+
return new Promise((B) => {
|
|
2609
|
+
const C = setInterval(() => {
|
|
2610
|
+
p.hasDracoLoader && !p.dracoLoader || p.hasKTX2Loader && !p.ktx2Loader || (clearInterval(C), B());
|
|
2611
2611
|
}, 10);
|
|
2612
2612
|
});
|
|
2613
|
-
}(this.gltfLoader), this.gltfLoader.parse(
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
}), l.cache.put(g,
|
|
2613
|
+
}(this.gltfLoader), this.gltfLoader.parse(I, null, (p) => {
|
|
2614
|
+
p.scene.asset = p.asset, c && p.scene.applyMatrix4(this.zUpToYUpMatrix), p.scene.traverse((B) => {
|
|
2615
|
+
B.isMesh && (n && B.applyMatrix4(this.zUpToYUpMatrix), l.meshCallback && l.meshCallback(B, b)), B.isPoints && l.pointsCallback && l.pointsCallback(B, b);
|
|
2616
|
+
}), l.cache.put(g, p.scene), l._checkSize(), l._meshReceived(l.cache, l.register, g, i, s, r, a);
|
|
2617
2617
|
});
|
|
2618
|
-
}).catch((
|
|
2619
|
-
|
|
2618
|
+
}).catch((I) => {
|
|
2619
|
+
I !== "user abort" && I.code;
|
|
2620
2620
|
}).finally(() => {
|
|
2621
2621
|
ae--;
|
|
2622
2622
|
});
|
|
2623
2623
|
} : t.includes(".json") && (f = () => {
|
|
2624
|
-
var
|
|
2625
|
-
|
|
2626
|
-
if (!
|
|
2627
|
-
return
|
|
2628
|
-
}).then((
|
|
2629
|
-
l.cache.put(g,
|
|
2630
|
-
}).catch((
|
|
2624
|
+
var u;
|
|
2625
|
+
u = l.proxy ? () => fetch(l.proxy, { method: "POST", body: t, signal: h.signal }) : () => fetch(t, { signal: h.signal }), ae++, u().then((I) => {
|
|
2626
|
+
if (!I.ok) throw console.error("could not load tile with path : " + t), new Error(`couldn't load "${t}". Request failed with status ${I.status} : ${I.statusText}`);
|
|
2627
|
+
return I.json();
|
|
2628
|
+
}).then((I) => La(I, t)).then((I) => {
|
|
2629
|
+
l.cache.put(g, I), l._checkSize(), l._meshReceived(l.cache, l.register, g);
|
|
2630
|
+
}).catch((I) => {
|
|
2631
2631
|
}).finally(() => {
|
|
2632
2632
|
ae--;
|
|
2633
2633
|
});
|
|
@@ -2728,13 +2728,13 @@ var ke = { resolve: function() {
|
|
|
2728
2728
|
} else A > r && (o.charCodeAt(a + n) === 47 ? c = n : n === 0 && (c = 0));
|
|
2729
2729
|
break;
|
|
2730
2730
|
}
|
|
2731
|
-
var
|
|
2732
|
-
if (
|
|
2733
|
-
|
|
2731
|
+
var b = o.charCodeAt(a + n);
|
|
2732
|
+
if (b !== e.charCodeAt(i + n)) break;
|
|
2733
|
+
b === 47 && (c = n);
|
|
2734
2734
|
}
|
|
2735
|
-
var
|
|
2736
|
-
for (n = a + c + 1; n <= t; ++n) n !== t && o.charCodeAt(n) !== 47 || (
|
|
2737
|
-
return
|
|
2735
|
+
var d = "";
|
|
2736
|
+
for (n = a + c + 1; n <= t; ++n) n !== t && o.charCodeAt(n) !== 47 || (d.length === 0 ? d += ".." : d += "/..");
|
|
2737
|
+
return d.length > 0 ? d + e.slice(i + c) : (i += c, e.charCodeAt(i) === 47 && ++i, e.slice(i));
|
|
2738
2738
|
}, _makeLong: function(o) {
|
|
2739
2739
|
return o;
|
|
2740
2740
|
}, dirname: function(o) {
|
|
@@ -2794,12 +2794,12 @@ var ke = { resolve: function() {
|
|
|
2794
2794
|
if (o.length === 0) return e;
|
|
2795
2795
|
var a, t = o.charCodeAt(0), A = t === 47;
|
|
2796
2796
|
A ? (e.root = "/", a = 1) : a = 0;
|
|
2797
|
-
for (var i = -1, s = 0, r = -1, c = !0, n = o.length - 1,
|
|
2797
|
+
for (var i = -1, s = 0, r = -1, c = !0, n = o.length - 1, b = 0; n >= a; --n) if ((t = o.charCodeAt(n)) !== 47) r === -1 && (c = !1, r = n + 1), t === 46 ? i === -1 ? i = n : b !== 1 && (b = 1) : i !== -1 && (b = -1);
|
|
2798
2798
|
else if (!c) {
|
|
2799
2799
|
s = n + 1;
|
|
2800
2800
|
break;
|
|
2801
2801
|
}
|
|
2802
|
-
return i === -1 || r === -1 ||
|
|
2802
|
+
return i === -1 || r === -1 || b === 0 || b === 1 && i === r - 1 && i === s + 1 ? r !== -1 && (e.base = e.name = s === 0 && A ? o.slice(1, r) : o.slice(s, r)) : (s === 0 && A ? (e.name = o.slice(1, i), e.base = o.slice(1, r)) : (e.name = o.slice(s, i), e.base = o.slice(s, r)), e.ext = o.slice(i, r)), s > 0 ? e.dir = o.slice(0, s - 1) : A && (e.dir = "/"), e;
|
|
2803
2803
|
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
2804
2804
|
ke.posix = ke;
|
|
2805
2805
|
var bt, be = ke;
|
|
@@ -2861,7 +2861,7 @@ class _i {
|
|
|
2861
2861
|
* @copyright Copyright (c) 2022 Kirk Qi <qilinaus@gmail.com>
|
|
2862
2862
|
* @license MIT License
|
|
2863
2863
|
*/
|
|
2864
|
-
class
|
|
2864
|
+
class pe extends _i {
|
|
2865
2865
|
constructor(a = [], t) {
|
|
2866
2866
|
super(t);
|
|
2867
2867
|
ge(this, "_elements", []);
|
|
@@ -2886,7 +2886,7 @@ class Ce extends _i {
|
|
|
2886
2886
|
return this.elements[this.size - 1] ?? void 0;
|
|
2887
2887
|
}
|
|
2888
2888
|
static heapify(a, t) {
|
|
2889
|
-
return new
|
|
2889
|
+
return new pe(a, t);
|
|
2890
2890
|
}
|
|
2891
2891
|
add(a) {
|
|
2892
2892
|
return this._elements.push(a), this._bubbleUp(this.elements.length - 1);
|
|
@@ -2926,10 +2926,10 @@ class Ce extends _i {
|
|
|
2926
2926
|
return [...this.elements];
|
|
2927
2927
|
}
|
|
2928
2928
|
clone() {
|
|
2929
|
-
return new
|
|
2929
|
+
return new pe(this, { comparator: this.comparator, toElementFn: this.toElementFn });
|
|
2930
2930
|
}
|
|
2931
2931
|
sort() {
|
|
2932
|
-
const a = [], t = new
|
|
2932
|
+
const a = [], t = new pe(this, { comparator: this.comparator });
|
|
2933
2933
|
for (; t.size !== 0; ) {
|
|
2934
2934
|
const A = t.poll();
|
|
2935
2935
|
A !== void 0 && a.push(A);
|
|
@@ -2942,13 +2942,13 @@ class Ce extends _i {
|
|
|
2942
2942
|
return a;
|
|
2943
2943
|
}
|
|
2944
2944
|
filter(a, t) {
|
|
2945
|
-
const A = new
|
|
2945
|
+
const A = new pe([], { toElementFn: this.toElementFn, comparator: this.comparator });
|
|
2946
2946
|
let i = 0;
|
|
2947
2947
|
for (const s of this) a.call(t, s, i, this) && A.add(s), i++;
|
|
2948
2948
|
return A;
|
|
2949
2949
|
}
|
|
2950
2950
|
map(a, t, A, i) {
|
|
2951
|
-
const s = new
|
|
2951
|
+
const s = new pe([], { comparator: t, toElementFn: A });
|
|
2952
2952
|
let r = 0;
|
|
2953
2953
|
for (const c of this) s.add(a.call(i, c, r, this)), r++;
|
|
2954
2954
|
return s;
|
|
@@ -2983,7 +2983,7 @@ class Ce extends _i {
|
|
|
2983
2983
|
(function(o) {
|
|
2984
2984
|
o[o.VISIT = 0] = "VISIT", o[o.PROCESS = 1] = "PROCESS";
|
|
2985
2985
|
})(bt || (bt = {}));
|
|
2986
|
-
class Pe extends
|
|
2986
|
+
class Pe extends pe {
|
|
2987
2987
|
constructor(e = [], a) {
|
|
2988
2988
|
super(e, a);
|
|
2989
2989
|
}
|
|
@@ -3027,35 +3027,39 @@ new Ra(), new S(), new S(), new S(), new S();
|
|
|
3027
3027
|
const Ve = new S(), Hi = new S(), zt = new Ma();
|
|
3028
3028
|
zt.set(1, 0, 0, 0, 0, 1, 0, -1, 0);
|
|
3029
3029
|
class qi extends wa {
|
|
3030
|
-
constructor(e) {
|
|
3031
|
-
const
|
|
3032
|
-
let
|
|
3033
|
-
|
|
3034
|
-
const
|
|
3035
|
-
e.initRenderTarget(
|
|
3036
|
-
const s = new ne(512, 512, 1, { magFilter: M, minFilter: M, anisotropy: 0, type: F, depthBuffer: !1, resolveDepthBuffer: !1 });
|
|
3037
|
-
s.texture.type = F, e.initRenderTarget(s);
|
|
3030
|
+
constructor(e, a) {
|
|
3031
|
+
const A = Math.min(Math.ceil(8) * 512, Math.pow(512, 2));
|
|
3032
|
+
let i = 1 * Math.pow(512, 2);
|
|
3033
|
+
i = Math.floor(i / A) * A;
|
|
3034
|
+
const s = new ne(512, 512, 1, { magFilter: M, minFilter: M, anisotropy: 0, depthBuffer: !1, resolveDepthBuffer: !1 });
|
|
3035
|
+
e.initRenderTarget(s);
|
|
3038
3036
|
const r = new ne(512, 512, 1, { magFilter: M, minFilter: M, anisotropy: 0, type: F, depthBuffer: !1, resolveDepthBuffer: !1 });
|
|
3039
3037
|
r.texture.type = F, e.initRenderTarget(r);
|
|
3040
3038
|
const c = new ne(512, 512, 1, { magFilter: M, minFilter: M, anisotropy: 0, type: F, depthBuffer: !1, resolveDepthBuffer: !1 });
|
|
3041
3039
|
c.texture.type = F, e.initRenderTarget(c);
|
|
3042
|
-
const n = new
|
|
3040
|
+
const n = new ne(512, 512, 1, { magFilter: M, minFilter: M, anisotropy: 0, type: F, depthBuffer: !1, resolveDepthBuffer: !1 });
|
|
3041
|
+
n.texture.type = F, e.initRenderTarget(n);
|
|
3042
|
+
const b = new ta({ uniforms: { textureSize: { value: 512 }, numSlices: { value: 1 }, cov1Texture: { value: c.texture }, cov2Texture: { value: n.texture }, colorTexture: { value: s.texture }, positionTexture: { value: r.texture }, zUpToYUpMatrix3x3: { value: zt }, sizeMultiplier: { value: 1 }, cropRadius: { value: Number.MAX_VALUE } }, vertexShader: `
|
|
3043
3043
|
precision highp float;
|
|
3044
3044
|
precision highp int;
|
|
3045
3045
|
|
|
3046
|
+
#include <common>
|
|
3047
|
+
|
|
3046
3048
|
uniform float textureSize;
|
|
3047
3049
|
uniform float numSlices;
|
|
3048
3050
|
uniform float sizeMultiplier;
|
|
3049
3051
|
in uint order;
|
|
3050
3052
|
out vec4 color;
|
|
3051
3053
|
out vec2 vUv;
|
|
3052
|
-
out vec3
|
|
3054
|
+
out vec3 splatPositionWorld;
|
|
3055
|
+
out float splatDepth;
|
|
3053
3056
|
out float splatCrop;
|
|
3054
3057
|
uniform sampler3D colorTexture;
|
|
3055
3058
|
uniform sampler3D positionTexture;
|
|
3056
3059
|
uniform sampler3D cov1Texture;
|
|
3057
3060
|
uniform sampler3D cov2Texture;
|
|
3058
3061
|
uniform mat3 zUpToYUpMatrix3x3;
|
|
3062
|
+
uniform float logDepthBufFC;
|
|
3059
3063
|
|
|
3060
3064
|
|
|
3061
3065
|
void getVertexData(out vec3 position, out mat3 covariance) {
|
|
@@ -3113,7 +3117,7 @@ void modelTransform(in vec3 splatPosition, in mat3 covariance, inout vec3 vertex
|
|
|
3113
3117
|
right = normalize(cross(upReference, look));
|
|
3114
3118
|
}
|
|
3115
3119
|
|
|
3116
|
-
vec3 up = cross(look, right);
|
|
3120
|
+
vec3 up = cross(look, right);
|
|
3117
3121
|
|
|
3118
3122
|
// Construct the billboard rotation matrix
|
|
3119
3123
|
mat3 billboardRot = mat3(
|
|
@@ -3157,63 +3161,73 @@ vec3 up = cross(look, right);
|
|
|
3157
3161
|
vertexPosition = billboardRot * vertexPosition + splatPosition;
|
|
3158
3162
|
}
|
|
3159
3163
|
|
|
3164
|
+
|
|
3160
3165
|
void main() {
|
|
3161
3166
|
vUv = vec2(position);
|
|
3162
3167
|
|
|
3163
|
-
|
|
3168
|
+
splatPositionWorld = vec3(0.0);
|
|
3164
3169
|
mat3 covariance = mat3(0.0);
|
|
3165
|
-
getVertexData(
|
|
3166
|
-
splatCrop = sqrt(color.w); // discard more pixels when opacity is low
|
|
3167
|
-
|
|
3170
|
+
getVertexData(splatPositionWorld, covariance);
|
|
3171
|
+
splatCrop = 0.5*sqrt(color.w); // discard more pixels when opacity is low
|
|
3172
|
+
splatPositionWorld = (modelMatrix * vec4(splatPositionWorld, 1.0)).xyz;
|
|
3168
3173
|
|
|
3169
3174
|
|
|
3170
3175
|
vec3 outPosition = vec3(position)*sizeMultiplier;
|
|
3171
|
-
modelTransform(
|
|
3176
|
+
modelTransform(splatPositionWorld, covariance, outPosition);
|
|
3177
|
+
|
|
3172
3178
|
|
|
3173
3179
|
gl_Position = projectionMatrix * viewMatrix * vec4(outPosition, 1.0);
|
|
3174
3180
|
|
|
3181
|
+
#ifdef USE_LOGDEPTHBUF
|
|
3182
|
+
float d = 1.0 + gl_Position.w;
|
|
3183
|
+
float isPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
|
|
3184
|
+
splatDepth = isPerspective == 0.0 ? gl_Position.z : log2( 1.0 + gl_Position.w ) * logDepthBufFC * 0.5;
|
|
3185
|
+
#else
|
|
3186
|
+
splatDepth = (gl_Position.z / gl_Position.w)* 0.5 + 0.5;
|
|
3187
|
+
#endif
|
|
3188
|
+
|
|
3175
3189
|
}
|
|
3176
|
-
`, fragmentShader: `
|
|
3190
|
+
`, fragmentShader: a || `
|
|
3177
3191
|
precision highp float;
|
|
3178
3192
|
|
|
3179
3193
|
in vec4 color;
|
|
3180
3194
|
in vec2 vUv;
|
|
3181
|
-
in vec3
|
|
3195
|
+
in vec3 splatPositionWorld;
|
|
3196
|
+
in float splatDepth;
|
|
3182
3197
|
in float splatCrop;
|
|
3183
3198
|
uniform float textureSize;
|
|
3184
3199
|
uniform float cropRadius;
|
|
3185
3200
|
|
|
3186
3201
|
void main() {
|
|
3187
|
-
if(length(
|
|
3202
|
+
if(length(splatPositionWorld)>cropRadius) discard;
|
|
3188
3203
|
float l = length(vUv);
|
|
3189
3204
|
|
|
3190
3205
|
// Early discard for pixels outside the radius
|
|
3191
3206
|
if (l > splatCrop) {
|
|
3192
|
-
//gl_FragColor = vec4(color.xyz,1.0);
|
|
3193
|
-
//return;
|
|
3194
3207
|
discard;
|
|
3195
3208
|
};
|
|
3196
3209
|
vec2 p = vUv * 4.0;
|
|
3197
3210
|
float alpha = exp(-dot(p, p));
|
|
3198
3211
|
|
|
3199
3212
|
gl_FragColor = vec4(pow(color.xyz,vec3(1.0/2.2)), color.w * pow(alpha, 1.8));
|
|
3213
|
+
gl_FragColor = vec4(splatDepth, splatDepth,splatDepth,1.0);
|
|
3200
3214
|
|
|
3201
|
-
}`, transparent: !
|
|
3202
|
-
d.setIndex([0, 2, 1, 2, 3, 1]), d.setAttribute("position", new le(
|
|
3203
|
-
const
|
|
3204
|
-
|
|
3205
|
-
for (let I = 0; I < this.maxSplats; I +=
|
|
3206
|
-
this.worker = new Worker(new URL("
|
|
3207
|
-
const
|
|
3208
|
-
if (
|
|
3209
|
-
const
|
|
3210
|
-
|
|
3211
|
-
const
|
|
3212
|
-
|
|
3215
|
+
}`, transparent: !1, side: Ze, depthTest: !0, depthWrite: !0, depthFunc: qA }), d = new Ja(), l = new Float32Array([-0.5, 0.5, 0, 0.5, 0.5, 0, -0.5, -0.5, 0, 0.5, -0.5, 0]);
|
|
3216
|
+
d.setIndex([0, 2, 1, 2, 3, 1]), d.setAttribute("position", new le(l, 3));
|
|
3217
|
+
const g = new Uint32Array(i), h = new Qa(g, 1, !1);
|
|
3218
|
+
h.needsUpdate = !0, h.setUsage(Ka), d.setAttribute("order", h), d.instanceCount = 0, super(d, b), this.orderAttribute = h, this.textureSize = 512, this.numTextures = 1, this.batchSize = A, this.maxSplats = i, this.colorRenderTarget = s, this.positionRenderTarget = r, this.cov1RenderTarget = c, this.cov2RenderTarget = n, this.renderer = e, this.sortID = 0, this.freeAddresses = new _e();
|
|
3219
|
+
for (let I = 0; I < this.maxSplats; I += A) this.freeAddresses.add(I);
|
|
3220
|
+
this.worker = new Worker(new URL("" + new URL("assets/PointsManager.worker-5fpGpVvf.js", import.meta.url).href, import.meta.url), { type: "module" }), this.sortListeners = [], this.worker.onmessage = (I) => {
|
|
3221
|
+
const p = new Uint32Array(I.data.order);
|
|
3222
|
+
if (p.length > this.orderAttribute.count) {
|
|
3223
|
+
const B = new Ja(), C = new Float32Array([-0.5, 0.5, 0, 0.5, 0.5, 0, -0.5, -0.5, 0, 0.5, -0.5, 0]), w = [0, 2, 1, 2, 3, 1];
|
|
3224
|
+
B.setIndex(w), B.setAttribute("position", new le(C, 3));
|
|
3225
|
+
const x = new Uint32Array(this.maxSplats), y = new Qa(x, 1, !1);
|
|
3226
|
+
y.needsUpdate = !0, y.setUsage(Ka), B.setAttribute("order", y), B.instanceCount = 0, this.geometry.dispose(), this.geometry = B, this.orderAttribute = y;
|
|
3213
3227
|
}
|
|
3214
|
-
this.orderAttribute.clearUpdateRanges(), this.orderAttribute.set(
|
|
3215
|
-
for (let
|
|
3216
|
-
this.sortListeners[
|
|
3228
|
+
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;
|
|
3229
|
+
for (let B = this.sortListeners.length - 1; B >= 0; B--)
|
|
3230
|
+
this.sortListeners[B](I.data.id) && this.sortListeners.splice(B, 1);
|
|
3217
3231
|
}, this.cameraPosition = new S(0, 0, 0), this.rotateOnAxis(new S(1, 0, 0), 0.5 * Math.PI), this.frustumCulled = !1, this.copyMaterial2D = new ta({ uniforms: { sourceTexture: {} }, vertexShader: lt(), fragmentShader: `
|
|
3218
3232
|
precision highp float;
|
|
3219
3233
|
|
|
@@ -3234,11 +3248,11 @@ in vec2 vUv;
|
|
|
3234
3248
|
void main() {
|
|
3235
3249
|
gl_FragColor = texture( sourceTexture, vec3(vUv, w) );
|
|
3236
3250
|
}`, transparent: !1, side: Ze, depthTest: !1, depthWrite: !1 }), this.copyCamera = new Et(-0.5, 0.5, 0.5, -0.5, 0.1, 10), this.copyCamera.position.z = 1, this.copyScene = new OA();
|
|
3237
|
-
const
|
|
3238
|
-
this.copyQuad = new wa(
|
|
3239
|
-
const
|
|
3251
|
+
const f = new JA(1, 1);
|
|
3252
|
+
this.copyQuad = new wa(f, this.copyMaterial2D), this.copyScene.add(this.copyQuad), this.copyScene.matrixAutoUpdate = !1, this.copyQuad.matrixAutoUpdate = !1;
|
|
3253
|
+
const u = this;
|
|
3240
3254
|
document.addEventListener("keyup", function(I) {
|
|
3241
|
-
I.key === "a" && (
|
|
3255
|
+
I.key === "a" && (u.growTextures(), console.log(u.positionRenderTarget.depth));
|
|
3242
3256
|
});
|
|
3243
3257
|
}
|
|
3244
3258
|
dispose() {
|
|
@@ -3272,54 +3286,54 @@ void main() {
|
|
|
3272
3286
|
addSplatsTile(e, a, t, A) {
|
|
3273
3287
|
const i = this;
|
|
3274
3288
|
e.count;
|
|
3275
|
-
const s = e.data ? e.data.array : e.array, r = e.data && e.data.isInterleavedBuffer ? e.data.stride : 3, c = e.data && e.data.isInterleavedBuffer ? e.offset : 0, n = Math.ceil(s.length / (this.batchSize * r)),
|
|
3289
|
+
const s = e.data ? e.data.array : e.array, r = e.data && e.data.isInterleavedBuffer ? e.data.stride : 3, c = e.data && e.data.isInterleavedBuffer ? e.offset : 0, n = Math.ceil(s.length / (this.batchSize * r)), b = [], d = [];
|
|
3276
3290
|
let l = () => {
|
|
3277
3291
|
};
|
|
3278
3292
|
const g = new Float32Array(s.length / r * 3);
|
|
3279
3293
|
for (let f = 0; f < s.length / 3; f++) g[3 * f] = s[f * r + c], g[3 * f + 1] = s[f * r + c + 1], g[3 * f + 2] = s[f * r + c + 2];
|
|
3280
|
-
l = (f,
|
|
3281
|
-
const
|
|
3282
|
-
for (let
|
|
3283
|
-
Ve.set(g[
|
|
3284
|
-
const
|
|
3285
|
-
|
|
3294
|
+
l = (f, u, I) => {
|
|
3295
|
+
const p = I * I;
|
|
3296
|
+
for (let B = 0; B < g.length; B += 3) {
|
|
3297
|
+
Ve.set(g[B], -g[B + 2], g[B + 1]);
|
|
3298
|
+
const C = Hi.copy(Ve).sub(f.origin).dot(f.direction);
|
|
3299
|
+
C > 0 && f.distanceSqToPoint(Ve) < p && u.push({ distance: C, point: Ve.clone(), type: "splat" });
|
|
3286
3300
|
}
|
|
3287
3301
|
}, n > this.freeAddresses.size && this.growTextures();
|
|
3288
3302
|
for (let f = 0; f < n; f++) {
|
|
3289
|
-
const
|
|
3290
|
-
isNaN(
|
|
3291
|
-
const
|
|
3292
|
-
this.addSplatsBatch(
|
|
3303
|
+
const u = this.freeAddresses.poll();
|
|
3304
|
+
isNaN(u) && console.log("insuficient texture size to store splats info"), b.push(u), d.push(3 * u);
|
|
3305
|
+
const I = f * this.batchSize;
|
|
3306
|
+
this.addSplatsBatch(I, u, e, a, t, A);
|
|
3293
3307
|
}
|
|
3294
|
-
i.worker.postMessage({ method: "addBatches", insertionIndexes:
|
|
3308
|
+
i.worker.postMessage({ method: "addBatches", insertionIndexes: d, positions: s.buffer, offset: c, stride: r, batchSize: i.batchSize }, [s.buffer]);
|
|
3295
3309
|
let h = !1;
|
|
3296
3310
|
return { hide: () => {
|
|
3297
|
-
h == 1 && (h = !1, i.worker.postMessage({ method: "hideBatches", insertionIndexes:
|
|
3311
|
+
h == 1 && (h = !1, i.worker.postMessage({ method: "hideBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ }));
|
|
3298
3312
|
}, show: (f) => {
|
|
3299
3313
|
h == 0 && (h = !0);
|
|
3300
|
-
const
|
|
3301
|
-
i.sortListeners.push((
|
|
3314
|
+
const u = i.sortID;
|
|
3315
|
+
i.sortListeners.push((I) => I >= u && (f(), !0)), i.worker.postMessage({ method: "showBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ });
|
|
3302
3316
|
}, remove: () => {
|
|
3303
|
-
l = void 0, i.worker.postMessage({ method: "removeBatches", insertionIndexes:
|
|
3317
|
+
l = void 0, i.worker.postMessage({ method: "removeBatches", insertionIndexes: d, xyz: [i.cameraPosition.x, i.cameraPosition.z, -i.cameraPosition.y], id: i.sortID++ }), b.forEach((f) => i.freeAddresses.add(f));
|
|
3304
3318
|
}, sort: this.sort, raycast: l, isSplatsBatch: !0 };
|
|
3305
3319
|
}
|
|
3306
3320
|
addSplatsBatch(e, a, t, A, i, s) {
|
|
3307
|
-
const r = new Float32Array(4 * this.batchSize), c = new Uint8Array(4 * this.batchSize), n = new Float32Array(4 * this.batchSize),
|
|
3308
|
-
for (let
|
|
3309
|
-
const
|
|
3310
|
-
if (
|
|
3311
|
-
r[
|
|
3321
|
+
const r = new Float32Array(4 * this.batchSize), c = new Uint8Array(4 * this.batchSize), n = new Float32Array(4 * this.batchSize), b = new Float32Array(4 * this.batchSize);
|
|
3322
|
+
for (let p = a; p < a + this.batchSize; p++) {
|
|
3323
|
+
const B = p - a, C = 4 * B, w = e + B;
|
|
3324
|
+
if (w >= t.count) break;
|
|
3325
|
+
r[C] = t.getX(w), r[C + 1] = t.getY(w), r[C + 2] = t.getZ(w), Math.floor(255 * A.getX(w)), Math.floor(255 * A.getY(w)), Math.floor(255 * A.getZ(w)), Math.floor(255 * A.getW(w)), c[C] = Math.floor(255 * A.getX(w)), c[C + 1] = Math.floor(255 * A.getY(w)), c[C + 2] = Math.floor(255 * A.getZ(w)), c[C + 3] = Math.floor(255 * A.getW(w)), n[C] = i.getX(w), n[C + 1] = i.getY(w), n[C + 2] = i.getZ(w), b[C] = s.getX(w), b[C + 1] = s.getY(w), b[C + 2] = s.getZ(w);
|
|
3312
3326
|
}
|
|
3313
|
-
const
|
|
3327
|
+
const d = Math.floor(a / Math.pow(this.textureSize, 2)), l = Math.ceil(this.batchSize / this.textureSize), g = [0, a / this.textureSize - d * this.textureSize, this.textureSize];
|
|
3314
3328
|
g.push(g[1] + l);
|
|
3315
3329
|
const h = new Le(r, this.textureSize, l, $, F);
|
|
3316
|
-
h.generateMipmaps = !1, h.magFilter = M, h.minFilter = M, h.anisotropy = 0, h.needsUpdate = !0, this.renderer.initTexture(h), this.renderer.initRenderTarget(this.positionRenderTarget), this.copyTex2D(h, this.positionRenderTarget, g,
|
|
3330
|
+
h.generateMipmaps = !1, h.magFilter = M, h.minFilter = M, h.anisotropy = 0, h.needsUpdate = !0, this.renderer.initTexture(h), this.renderer.initRenderTarget(this.positionRenderTarget), this.copyTex2D(h, this.positionRenderTarget, g, d), h.dispose();
|
|
3317
3331
|
const f = new Le(c, this.textureSize, l, $, X);
|
|
3318
|
-
f.generateMipmaps = !1, f.magFilter = M, f.minFilter = M, f.anisotropy = 0, f.needsUpdate = !0, this.renderer.initTexture(f), this.copyTex2D(f, this.colorRenderTarget, g,
|
|
3319
|
-
const
|
|
3320
|
-
|
|
3321
|
-
const
|
|
3322
|
-
|
|
3332
|
+
f.generateMipmaps = !1, f.magFilter = M, f.minFilter = M, f.anisotropy = 0, f.needsUpdate = !0, this.renderer.initTexture(f), this.copyTex2D(f, this.colorRenderTarget, g, d), f.dispose();
|
|
3333
|
+
const u = new Le(n, this.textureSize, l, $, F);
|
|
3334
|
+
u.generateMipmaps = !1, u.magFilter = M, u.minFilter = M, u.anisotropy = 0, u.needsUpdate = !0, this.renderer.initTexture(u), this.copyTex2D(u, this.cov1RenderTarget, g, d), u.dispose();
|
|
3335
|
+
const I = new Le(b, this.textureSize, l, $, F);
|
|
3336
|
+
I.generateMipmaps = !1, I.magFilter = M, I.minFilter = M, I.anisotropy = 0, I.needsUpdate = !0, this.renderer.initTexture(I), this.copyTex2D(I, this.cov2RenderTarget, g, d), I.dispose();
|
|
3323
3337
|
}
|
|
3324
3338
|
growTextures() {
|
|
3325
3339
|
for (let s = this.maxSplats; s < this.maxSplats + this.textureSize * this.textureSize; s += this.batchSize) this.freeAddresses.add(s);
|
|
@@ -3349,7 +3363,7 @@ const te = new m.Sphere(new m.Vector3(0, 0, 0), 1), Ie = new se([0, 0, 0, 1, 0,
|
|
|
3349
3363
|
new m.Box3();
|
|
3350
3364
|
const ce = new m.Vector3(0, 0, 0), ye = new m.Vector3(0, 0, 0), Oi = new m.Vector3(0, 1, 0), Ye = new m.Ray(), We = new m.Matrix4();
|
|
3351
3365
|
new m.Matrix4(), new m.Frustum();
|
|
3352
|
-
const
|
|
3366
|
+
const pa = new m.Vector3(), Xe = [], ht = new m.Quaternion(), Z = {};
|
|
3353
3367
|
function Ji() {
|
|
3354
3368
|
var o = [];
|
|
3355
3369
|
for (let e in Z) Z.hasOwnProperty(e) && Z[e] > 0 && o.push(e);
|
|
@@ -3456,11 +3470,11 @@ class Vt extends m.Object3D {
|
|
|
3456
3470
|
async function A(i, s, r, c) {
|
|
3457
3471
|
let n;
|
|
3458
3472
|
i.uri ? n = i.uri : i.url && (n = i.url);
|
|
3459
|
-
const
|
|
3460
|
-
if (
|
|
3461
|
-
var
|
|
3462
|
-
for (let l in t.queryParams) t.queryParams.hasOwnProperty(l) && (
|
|
3463
|
-
n.includes("?") ? n +=
|
|
3473
|
+
const b = /^(?:http|https|ftp|tcp|udp):\/\/\S+/;
|
|
3474
|
+
if (b.test(t.rootPath) ? b.test(n) || (n = t._assembleURL(t.rootPath, n)) : be.isAbsolute(t.rootPath) && (n = t.rootPath + be.sep + n), n = t._extractQueryParams(n, t.queryParams), t.queryParams) {
|
|
3475
|
+
var d = "";
|
|
3476
|
+
for (let l in t.queryParams) t.queryParams.hasOwnProperty(l) && (d += "&" + l + "=" + t.queryParams[l]);
|
|
3477
|
+
n.includes("?") ? n += d : n += "?" + d.substring(1);
|
|
3464
3478
|
}
|
|
3465
3479
|
if (n) if (c && (n.includes(".b3dm") || n.includes(".glb") || n.includes(".gltf"))) {
|
|
3466
3480
|
t.contentURL.push(n);
|
|
@@ -3468,10 +3482,10 @@ class Vt extends m.Object3D {
|
|
|
3468
3482
|
t.tileLoader.get(t.abortController, t.uuid, n, (l) => {
|
|
3469
3483
|
t.deleted || (l.asset && l.asset.copyright && (l.asset.copyright.split(";").forEach((g) => {
|
|
3470
3484
|
Z[g] ? Z[g]++ : Z[g] = 1;
|
|
3471
|
-
}), t.displayCopyright &&
|
|
3485
|
+
}), t.displayCopyright && Ca()), t.meshContent.push(l), t.splatsMesh || (l.traverse((g) => {
|
|
3472
3486
|
if ((g.isMesh || g.isPoints) && g.layers.disable(0), g.isMesh && t.occlusionCullingService) {
|
|
3473
3487
|
const h = g.geometry.attributes.position, f = [];
|
|
3474
|
-
for (let
|
|
3488
|
+
for (let u = 0; u < h.count; u++) f.push(t.color.r, t.color.g, t.color.b);
|
|
3475
3489
|
g.geometry.setAttribute("color", new m.Float32BufferAttribute(f, 3));
|
|
3476
3490
|
}
|
|
3477
3491
|
}), t.add(l), t.updateMatrices()));
|
|
@@ -3492,7 +3506,7 @@ class Vt extends m.Object3D {
|
|
|
3492
3506
|
e.meshContent.forEach((a) => {
|
|
3493
3507
|
a && a.asset && a.asset.copyright && (a.asset.copyright.split(";").forEach((t) => {
|
|
3494
3508
|
Z[t] && Z[t]--;
|
|
3495
|
-
}), e.displayCopyright &&
|
|
3509
|
+
}), e.displayCopyright && Ca());
|
|
3496
3510
|
}), e.meshContent = [], e.bbox && e.bbox.dispose(), 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) => {
|
|
3497
3511
|
e.tileLoader.invalidate(a, e.uuid);
|
|
3498
3512
|
}), e.contentURL = []), e.abortController && e.abortController.abort("tile not needed"), this.parent = null, this.dispatchEvent({ type: "removed" });
|
|
@@ -3505,7 +3519,7 @@ class Vt extends m.Object3D {
|
|
|
3505
3519
|
const t = e.meshContent[a];
|
|
3506
3520
|
t && t.asset && t.asset.copyright && (t.asset.copyright.split(";").forEach((A) => {
|
|
3507
3521
|
Z[A] && Z[A]--;
|
|
3508
|
-
}), e.displayCopyright &&
|
|
3522
|
+
}), e.displayCopyright && Ca()), e.remove(t);
|
|
3509
3523
|
}
|
|
3510
3524
|
e.splatsMesh && e.meshContent.forEach((a) => a.hide()), e.meshContent = [], e.contentURL.forEach((a) => {
|
|
3511
3525
|
e.tileLoader.invalidate(a, e.uuid);
|
|
@@ -3539,7 +3553,7 @@ class Vt extends m.Object3D {
|
|
|
3539
3553
|
const a = new m.Frustum();
|
|
3540
3554
|
a.setFromProjectionMatrix(new m.Matrix4().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse));
|
|
3541
3555
|
let t = [0], A = [0], i = [0], s = [0];
|
|
3542
|
-
return this.refine == "REPLACE" ? this.loadingStrategy === "IMMEDIATE" ? (this._updateImmediate(e, a), this._statsImmediate(i, t, s, A)) : (this._update(e, a), this._stats(i, t, s, A)) : (this._update(e, a), this._stats(i, t, s, A)), t > 0 && (s[0] /= t[0]), this.splatsMesh && (
|
|
3556
|
+
return this.refine == "REPLACE" ? this.loadingStrategy === "IMMEDIATE" ? (this._updateImmediate(e, a), this._statsImmediate(i, t, s, A)) : (this._update(e, a), this._stats(i, t, s, A)) : (this._update(e, a), this._stats(i, t, s, A)), t > 0 && (s[0] /= t[0]), this.splatsMesh && (pa.copy(e.position), We.copy(this.matrixWorld).invert(), pa.applyMatrix4(We), this.splatsMesh.sort(pa)), { numTilesLoaded: t[0], numTilesRendered: A[0], maxLOD: i[0], percentageLoaded: s[0] };
|
|
3543
3557
|
}
|
|
3544
3558
|
_updateImmediate(e, a) {
|
|
3545
3559
|
this._computeMetricRecursive(e, a), this._updateNodeVisibilityImmediate(), this._expandTreeImmediate(e), this.shouldBeVisible = this.metric > 0 || !!this.loadOutsideView, this._shouldBeVisibleUpdateImmediate(), this._trimTreeImmediate(), this._loadMeshImmediate();
|
|
@@ -3750,8 +3764,8 @@ class Vt extends m.Object3D {
|
|
|
3750
3764
|
this.distanceBias = e, this.childrenTiles.forEach((a) => a.setDistanceBias(e));
|
|
3751
3765
|
}
|
|
3752
3766
|
_transformWGS84ToCartesian(e, a, t, A) {
|
|
3753
|
-
const i = 6378137 / Math.sqrt(1 - 0.006694384442042 * Math.pow(Math.sin(a), 2)), s = Math.cos(a), r = Math.cos(e), c = Math.sin(a), n = i + t,
|
|
3754
|
-
A.set(
|
|
3767
|
+
const i = 6378137 / Math.sqrt(1 - 0.006694384442042 * Math.pow(Math.sin(a), 2)), s = Math.cos(a), r = Math.cos(e), c = Math.sin(a), n = i + t, b = n * s * r, d = n * s * Math.sin(e), l = (0.993305615557957 * i + t) * c;
|
|
3768
|
+
A.set(b, d, l);
|
|
3755
3769
|
}
|
|
3756
3770
|
}
|
|
3757
3771
|
function gt(o) {
|
|
@@ -3760,7 +3774,7 @@ function gt(o) {
|
|
|
3760
3774
|
e.remove();
|
|
3761
3775
|
}, 8e3);
|
|
3762
3776
|
}
|
|
3763
|
-
function
|
|
3777
|
+
function Ca() {
|
|
3764
3778
|
W || ((W = document.createElement("div")).style.position = "fixed", W.style.bottom = "20px", W.style.left = "20px", W.style.color = "white", W.style.textShadow = "2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000", W.style.padding = "10px", W.style.backgroundColor = "rgba(0, 0, 0, 0.1)", document.body.appendChild(W));
|
|
3765
3779
|
const o = Ji();
|
|
3766
3780
|
let e = "";
|
|
@@ -3768,7 +3782,7 @@ function Ba() {
|
|
|
3768
3782
|
e += a + ", ";
|
|
3769
3783
|
}), e = e.slice(0, -2), W.textContent = e;
|
|
3770
3784
|
}
|
|
3771
|
-
const N = new m.Sphere(new m.Vector3(0, 0, 0), 1), de = new m.Vector3(0, 0, 0),
|
|
3785
|
+
const N = new m.Sphere(new m.Vector3(0, 0, 0), 1), de = new m.Vector3(0, 0, 0), Ba = new m.Vector3(0, 0, 0), Ki = new m.Vector3(0, 1, 0), Ea = new m.Vector2(), ft = new m.Quaternion(), It = new m.Matrix4();
|
|
3772
3786
|
class Ga extends m.Object3D {
|
|
3773
3787
|
constructor(e) {
|
|
3774
3788
|
super();
|
|
@@ -3795,7 +3809,7 @@ class Ga extends m.Object3D {
|
|
|
3795
3809
|
if (a.json.transform && !a.centerModel && (t.elements = a.json.transform), a.applyMatrix4(t), a.parentTile && a.parentTile.matrix && (a.matrix.premultiply(a.parentTile.matrix), a.matrix.decompose(a.position, a.quaternion, a.scale)), a.matrixWorldNeedsUpdate = !0, a.updateWorldMatrix(!0, !0), a.json.boundingVolume) if (a.json.boundingVolume.box) a.boundingVolume = new se(a.json.boundingVolume.box);
|
|
3796
3810
|
else if (a.json.boundingVolume.region) {
|
|
3797
3811
|
const i = a.json.boundingVolume.region;
|
|
3798
|
-
a.transformWGS84ToCartesian(i[0], i[1], i[4], de), a.transformWGS84ToCartesian(i[2], i[3], i[5],
|
|
3812
|
+
a.transformWGS84ToCartesian(i[0], i[1], i[4], de), a.transformWGS84ToCartesian(i[2], i[3], i[5], Ba), de.lerp(Ba, 0.5), a.boundingVolume = new m.Sphere(new m.Vector3(de.x, de.y, de.z), de.distanceTo(Ba));
|
|
3799
3813
|
} else if (a.json.boundingVolume.sphere) {
|
|
3800
3814
|
const i = a.json.boundingVolume.sphere;
|
|
3801
3815
|
a.boundingVolume = new m.Sphere(new m.Vector3(i[0], i[1], i[2]), i[3]);
|
|
@@ -3947,8 +3961,8 @@ class Ga extends m.Object3D {
|
|
|
3947
3961
|
return this.matrixWorld;
|
|
3948
3962
|
}
|
|
3949
3963
|
transformWGS84ToCartesian(e, a, t, A) {
|
|
3950
|
-
const i = 6378137 / Math.sqrt(1 - 0.006694384442042 * Math.pow(Math.sin(a), 2)), s = Math.cos(a), r = Math.cos(e), c = Math.sin(a), n = i + t,
|
|
3951
|
-
A.set(
|
|
3964
|
+
const i = 6378137 / Math.sqrt(1 - 0.006694384442042 * Math.pow(Math.sin(a), 2)), s = Math.cos(a), r = Math.cos(e), c = Math.sin(a), n = i + t, b = n * s * r, d = n * s * Math.sin(e), l = (0.993305615557957 * i + t) * c;
|
|
3965
|
+
A.set(b, d, l);
|
|
3952
3966
|
}
|
|
3953
3967
|
}
|
|
3954
3968
|
class $i extends m.Object3D {
|
|
@@ -4124,30 +4138,30 @@ class es {
|
|
|
4124
4138
|
}
|
|
4125
4139
|
}
|
|
4126
4140
|
}
|
|
4127
|
-
get(e, a, t, A, i, s, r, c, n,
|
|
4128
|
-
const
|
|
4129
|
-
for (var f = h.split("/"),
|
|
4130
|
-
var
|
|
4131
|
-
|
|
4141
|
+
get(e, a, t, A, i, s, r, c, n, b) {
|
|
4142
|
+
const d = this, l = function(h) {
|
|
4143
|
+
for (var f = h.split("/"), u = [], I = 0, p = 0; p < f.length; p++) {
|
|
4144
|
+
var B = f[p];
|
|
4145
|
+
B !== "." && B !== "" && B !== ".." ? u[I++] = B : B === ".." && I > 0 && I--;
|
|
4132
4146
|
}
|
|
4133
|
-
if (
|
|
4134
|
-
var
|
|
4135
|
-
for (
|
|
4136
|
-
return
|
|
4147
|
+
if (I === 0) return "/";
|
|
4148
|
+
var C = "";
|
|
4149
|
+
for (p = 0; p < I; p++) C += "/" + u[p];
|
|
4150
|
+
return C;
|
|
4137
4151
|
}(a);
|
|
4138
4152
|
if (!(a.includes(".b3dm") || a.includes(".json") || a.includes(".glb") || a.includes(".gltf"))) return void console.error("the 3DTiles cache can only be used to load B3DM, gltf and json data");
|
|
4139
|
-
const g =
|
|
4153
|
+
const g = d.cache.get(l);
|
|
4140
4154
|
if (g) g.addInstance(A);
|
|
4141
4155
|
else if (a.includes(".b3dm") || a.includes(".glb") || a.includes(".gltf")) {
|
|
4142
|
-
const h = new zi(
|
|
4143
|
-
h.addInstance(A),
|
|
4156
|
+
const h = new zi(d.scene);
|
|
4157
|
+
h.addInstance(A), d.cache.put(l, h);
|
|
4144
4158
|
const f = new AbortController();
|
|
4145
4159
|
e.signal.addEventListener("abort", () => {
|
|
4146
4160
|
h.getCount() == 0 && f.abort();
|
|
4147
|
-
}), this.downloads.push({ abortController: f, tile: h, key: l, path: a, distanceFunction: i, getSiblings: s, level: r, uuid: t, sceneZupToYup: c, meshZupToYup: n, geometricError:
|
|
4161
|
+
}), this.downloads.push({ abortController: f, tile: h, key: l, path: a, distanceFunction: i, getSiblings: s, level: r, uuid: t, sceneZupToYup: c, meshZupToYup: n, geometricError: b, shouldDoDownload: () => !0 });
|
|
4148
4162
|
} else if (a.includes(".json")) {
|
|
4149
4163
|
const h = new Vi();
|
|
4150
|
-
h.addInstance(A),
|
|
4164
|
+
h.addInstance(A), d.cache.put(l, h);
|
|
4151
4165
|
const f = new AbortController();
|
|
4152
4166
|
e.signal.addEventListener("abort", () => {
|
|
4153
4167
|
h.getCount() == 0 && f.abort();
|