schematic-renderer 1.5.1 → 1.5.2
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.
|
@@ -1184,17 +1184,17 @@ let __tla = (async () => {
|
|
|
1184
1184
|
N * 1,
|
|
1185
1185
|
N * 1.5
|
|
1186
1186
|
];
|
|
1187
|
-
let
|
|
1187
|
+
let n = L, W = N * l, z = Z;
|
|
1188
1188
|
for (const T of d) {
|
|
1189
1189
|
const e = this.calculateMinimumRadius(A, C, T, V, i, j);
|
|
1190
|
-
e <= Z && e < z && (z = e,
|
|
1190
|
+
e <= Z && e < z && (z = e, n = Math.max(e, w), W = T);
|
|
1191
1191
|
}
|
|
1192
|
-
z > Z && (
|
|
1192
|
+
z > Z && (n = Z, W = this.calculateOptimalHeight(A, C, n, V, i));
|
|
1193
1193
|
const P = A.clone();
|
|
1194
1194
|
return {
|
|
1195
1195
|
center: new Q.Vector3(A.x, A.y, A.z),
|
|
1196
|
-
radius:
|
|
1197
|
-
height:
|
|
1196
|
+
radius: n,
|
|
1197
|
+
height: W,
|
|
1198
1198
|
target: P
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
@@ -1218,9 +1218,9 @@ let __tla = (async () => {
|
|
|
1218
1218
|
new Q.Vector3(I.max.x, I.max.y, I.max.z)
|
|
1219
1219
|
];
|
|
1220
1220
|
let V = 0, J = 0;
|
|
1221
|
-
const N = 50, L = A.clone().add(new Q.Vector3(D.x * N, C, D.z * N)), d = A.clone().sub(L).normalize(),
|
|
1221
|
+
const N = 50, L = A.clone().add(new Q.Vector3(D.x * N, C, D.z * N)), d = A.clone().sub(L).normalize(), n = new Q.Vector3(0, 1, 0), W = d.clone().cross(n).normalize(), z = W.clone().cross(d).normalize();
|
|
1222
1222
|
for (const a of g) {
|
|
1223
|
-
const o = a.clone().sub(L), E = o.dot(
|
|
1223
|
+
const o = a.clone().sub(L), E = o.dot(W), u = o.dot(z);
|
|
1224
1224
|
o.dot(d) > 0 && (V = Math.max(V, Math.abs(E)), J = Math.max(J, Math.abs(u)));
|
|
1225
1225
|
}
|
|
1226
1226
|
V *= 1 + Z, J *= 1 + Z;
|
|
@@ -1519,7 +1519,7 @@ let __tla = (async () => {
|
|
|
1519
1519
|
if (g.composer ? g.composer.render() : l.render(), Z) {
|
|
1520
1520
|
const V = l.renderer, J = w === "image/jpeg" ? "image/png" : w;
|
|
1521
1521
|
return await new Promise((L, d) => {
|
|
1522
|
-
V.domElement.toBlob((
|
|
1522
|
+
V.domElement.toBlob((n) => n ? L(n) : d(new Error("toBlob failed")), J, J === "image/png" ? void 0 : i);
|
|
1523
1523
|
});
|
|
1524
1524
|
} else {
|
|
1525
1525
|
const V = await this.captureFramePNG(i), J = new Blob([
|
|
@@ -1602,12 +1602,12 @@ let __tla = (async () => {
|
|
|
1602
1602
|
if (this.isRecording)
|
|
1603
1603
|
throw new Error("Recording already in progress");
|
|
1604
1604
|
console.log("Starting recording...");
|
|
1605
|
-
const { width: C = 1920, height: i = 1080, frameRate: w = 60, jpegQuality: Z = 0.92, batchSize: l = 30, encodingPreset: j = "veryfast", crf: D = 20, onStart: g, onProgress: V, onFfmpegProgress: J, onComplete: N, onFrame: L } = I, d = _D(I),
|
|
1605
|
+
const { width: C = 1920, height: i = 1080, frameRate: w = 60, jpegQuality: Z = 0.92, batchSize: l = 30, encodingPreset: j = "veryfast", crf: D = 20, onStart: g, onProgress: V, onFfmpegProgress: J, onComplete: N, onFrame: L } = I, d = _D(I), n = tl(d), W = n ? false : I.useJpegFrames ?? true, z = I.bitrateMbps;
|
|
1606
1606
|
if (L)
|
|
1607
1607
|
return this.startRecordingWithFrameCallback(A, I);
|
|
1608
|
-
this.useJpegFrames =
|
|
1609
|
-
const P = this.schematicRenderer.renderManager, F =
|
|
1610
|
-
if (
|
|
1608
|
+
this.useJpegFrames = W, this.jpegQuality = Z, this.frameBuffer = [], this.pendingWrites = [], this.rawFrames = [], this.useFastCapture = true;
|
|
1609
|
+
const P = this.schematicRenderer.renderManager, F = n && P ? P.isAlphaMode() : false;
|
|
1610
|
+
if (n && P && !F && (await P.setAlphaMode(true), this.alphaModeToRestore = false), n) {
|
|
1611
1611
|
this.ctx2d = this.recordingCanvas.getContext("2d", {
|
|
1612
1612
|
alpha: true,
|
|
1613
1613
|
desynchronized: true,
|
|
@@ -1622,8 +1622,8 @@ let __tla = (async () => {
|
|
|
1622
1622
|
console.warn(`Transparent export: PNG frames + alpha channel. Codec: ${T[d]}.`);
|
|
1623
1623
|
}
|
|
1624
1624
|
try {
|
|
1625
|
-
console.log("Setting up recording..."), console.log(` Resolution: ${C}x${i}`), console.log(` Frame rate: ${w} FPS`), console.log(` Frame format: ${
|
|
1626
|
-
const T = A * w, e =
|
|
1625
|
+
console.log("Setting up recording..."), console.log(` Resolution: ${C}x${i}`), console.log(` Frame rate: ${w} FPS`), console.log(` Frame format: ${W ? "JPEG" : "PNG"}`), console.log(` Encoding preset: ${j}`), console.log(` Fast capture mode: ${this.useFastCapture ? "enabled" : "disabled"}`), await this.setupRecording(C, i), console.log("Recording setup complete"), this.frameCount = 0, this.isRecording = true, g && g();
|
|
1626
|
+
const T = A * w, e = W ? "jpg" : "png";
|
|
1627
1627
|
console.log(`Recording ${T} frames at ${w} FPS...`);
|
|
1628
1628
|
const a = performance.now();
|
|
1629
1629
|
this.schematicRenderer.cameraManager.animateCameraAlongPath({
|
|
@@ -1832,15 +1832,15 @@ ${C || "(no log captured)"}`);
|
|
|
1832
1832
|
}
|
|
1833
1833
|
async startRecordingWithFrameCallback(A, I) {
|
|
1834
1834
|
var _a2, _b3;
|
|
1835
|
-
const { width: C = 1920, height: i = 1080, frameRate: w = 60, jpegQuality: Z = 0.92, encodingPreset: l = "veryfast", crf: j = 20, onStart: D, onProgress: g, onFfmpegProgress: V, onComplete: J, onFrame: N } = I, L = _D(I), d = tl(L),
|
|
1835
|
+
const { width: C = 1920, height: i = 1080, frameRate: w = 60, jpegQuality: Z = 0.92, encodingPreset: l = "veryfast", crf: j = 20, onStart: D, onProgress: g, onFfmpegProgress: V, onComplete: J, onFrame: N } = I, L = _D(I), d = tl(L), n = I.bitrateMbps, W = d ? false : I.useJpegFrames ?? true;
|
|
1836
1836
|
if (!(!this.ffmpeg || !N)) {
|
|
1837
|
-
this.useJpegFrames =
|
|
1837
|
+
this.useJpegFrames = W, this.jpegQuality = Z;
|
|
1838
1838
|
try {
|
|
1839
1839
|
const z = this.schematicRenderer.renderManager;
|
|
1840
1840
|
d && z && !z.isAlphaMode() && (await z.setAlphaMode(true), this.alphaModeToRestore = false), await this.setupRecording(C, i);
|
|
1841
1841
|
const P = this.schematicRenderer.renderManager;
|
|
1842
1842
|
(P == null ? void 0 : P.composer) && P.composer.setSize(C, i), this.frameCount = 0, this.isRecording = true, D && D();
|
|
1843
|
-
const F = A * w, T =
|
|
1843
|
+
const F = A * w, T = W ? "jpg" : "png", e = document.createElement("canvas");
|
|
1844
1844
|
e.width = C, e.height = i;
|
|
1845
1845
|
const a = e.getContext("2d", {
|
|
1846
1846
|
alpha: d,
|
|
@@ -1852,7 +1852,7 @@ ${C || "(no log captured)"}`);
|
|
|
1852
1852
|
const q = (_b3 = this.schematicRenderer.renderManager) == null ? void 0 : _b3.renderer.domElement;
|
|
1853
1853
|
q && (a.globalCompositeOperation = "copy", a.drawImage(q, 0, 0), a.globalCompositeOperation = "source-over");
|
|
1854
1854
|
const AA = await (await new Promise((JA) => {
|
|
1855
|
-
e.toBlob((r) => JA(r),
|
|
1855
|
+
e.toBlob((r) => JA(r), W ? "image/jpeg" : "image/png", W ? Z : 1);
|
|
1856
1856
|
})).arrayBuffer();
|
|
1857
1857
|
o.push({
|
|
1858
1858
|
data: new Uint8Array(AA),
|
|
@@ -1880,7 +1880,7 @@ ${C || "(no log captured)"}`);
|
|
|
1880
1880
|
ext: T,
|
|
1881
1881
|
encodingPreset: l,
|
|
1882
1882
|
crf: j,
|
|
1883
|
-
bitrateMbps:
|
|
1883
|
+
bitrateMbps: n
|
|
1884
1884
|
});
|
|
1885
1885
|
this.attachFfmpegLogCapture();
|
|
1886
1886
|
try {
|
|
@@ -2178,13 +2178,13 @@ ${C || "(no log captured)"}`);
|
|
|
2178
2178
|
try {
|
|
2179
2179
|
return new Promise((N, L) => {
|
|
2180
2180
|
this.isAnimating = true;
|
|
2181
|
-
let d = 0,
|
|
2181
|
+
let d = 0, n = performance.now();
|
|
2182
2182
|
if (this.animationStartPosition.copy(this.activeCamera.position), this.animationStartRotation.copy(this.activeCamera.rotation), j) {
|
|
2183
2183
|
const T = this.controls.get(this.activeControlKey);
|
|
2184
2184
|
T && T.enabled && (T.enabled = false);
|
|
2185
2185
|
}
|
|
2186
|
-
const { position:
|
|
2187
|
-
this.activeCamera.position.copy(
|
|
2186
|
+
const { position: W, rotation: z, target: P } = I.getPoint(0);
|
|
2187
|
+
this.activeCamera.position.copy(W), this.activeCamera.rotation.copy(z), l && this.activeCamera.lookAt(P);
|
|
2188
2188
|
const F = async () => {
|
|
2189
2189
|
let T = d / i;
|
|
2190
2190
|
T = Z(T);
|
|
@@ -2194,8 +2194,8 @@ ${C || "(no log captured)"}`);
|
|
|
2194
2194
|
rotation: this.activeCamera.rotation.clone(),
|
|
2195
2195
|
progress: T
|
|
2196
2196
|
}), g && await g(T), d++, d <= i) {
|
|
2197
|
-
const E = performance.now(), u = E -
|
|
2198
|
-
|
|
2197
|
+
const E = performance.now(), u = E - n, K = Math.max(0, J - u);
|
|
2198
|
+
n = E, setTimeout(() => {
|
|
2199
2199
|
this.animationRequestId = requestAnimationFrame(F);
|
|
2200
2200
|
}, K);
|
|
2201
2201
|
} else {
|
|
@@ -2381,25 +2381,25 @@ ${C || "(no log captured)"}`);
|
|
|
2381
2381
|
return;
|
|
2382
2382
|
}
|
|
2383
2383
|
const { center: D, size: g } = j, V = this.schematicRenderer.canvas, J = V.width / V.height, N = new Q.Vector3().copy(this.activeCamera.position), L = new Q.Euler().copy(this.activeCamera.rotation);
|
|
2384
|
-
let d,
|
|
2384
|
+
let d, n = null, W = D.clone();
|
|
2385
2385
|
if (this.activeCamera.camera.type === "OrthographicCamera") {
|
|
2386
2386
|
const P = this.calculateIsometricFraming(D, g, J, C);
|
|
2387
|
-
d = P.position,
|
|
2387
|
+
d = P.position, n = P.rotation;
|
|
2388
2388
|
const F = this.activeCamera.camera, T = this.calculateOrthographicSize(g, J, C);
|
|
2389
2389
|
F.left = -T * J / 2, F.right = T * J / 2, F.top = T / 2, F.bottom = -T / 2, F.updateProjectionMatrix();
|
|
2390
2390
|
} else {
|
|
2391
2391
|
const P = this.calculatePerspectiveFraming(D, g, J, C);
|
|
2392
|
-
d = P.position,
|
|
2392
|
+
d = P.position, W = P.target;
|
|
2393
2393
|
}
|
|
2394
|
-
if (i > 0 ? await this.animateToPosition(N, L, d,
|
|
2394
|
+
if (i > 0 ? await this.animateToPosition(N, L, d, n, W, i, w) : (this.activeCamera.setPosition([
|
|
2395
2395
|
d.x,
|
|
2396
2396
|
d.y,
|
|
2397
2397
|
d.z
|
|
2398
|
-
]),
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
] : this.activeCamera.lookAt(
|
|
2398
|
+
]), n ? this.activeCamera.rotation = [
|
|
2399
|
+
n.x,
|
|
2400
|
+
n.y,
|
|
2401
|
+
n.z
|
|
2402
|
+
] : this.activeCamera.lookAt(W)), l && "target" in l && (l.target.copy(W), l.update()), l && (l.enabled = true), !Z) {
|
|
2403
2403
|
const P = Math.max(g.x, g.y, g.z);
|
|
2404
2404
|
this.cameraPathManager.fitCircularPathToSchematics("circularPath", {
|
|
2405
2405
|
padding: C,
|
|
@@ -2429,9 +2429,9 @@ ${C || "(no log captured)"}`);
|
|
|
2429
2429
|
new Q.Vector3(g.x + D.x, g.y + D.y, g.z + D.z)
|
|
2430
2430
|
];
|
|
2431
2431
|
let J = 1 / 0, N = -1 / 0, L = 1 / 0, d = -1 / 0;
|
|
2432
|
-
for (const
|
|
2433
|
-
const
|
|
2434
|
-
J = Math.min(J,
|
|
2432
|
+
for (const n of V) {
|
|
2433
|
+
const W = n.clone().applyMatrix4(j);
|
|
2434
|
+
J = Math.min(J, W.x), N = Math.max(N, W.x), L = Math.min(L, W.y), d = Math.max(d, W.y);
|
|
2435
2435
|
}
|
|
2436
2436
|
w = (N - J) * i, Z = (d - L) * i;
|
|
2437
2437
|
} else
|
|
@@ -2552,16 +2552,16 @@ ${C || "(no log captured)"}`);
|
|
|
2552
2552
|
const P = this.calculatePerspectiveFraming(D, g, J, I);
|
|
2553
2553
|
N = P.position, d = P.target;
|
|
2554
2554
|
}
|
|
2555
|
-
let
|
|
2556
|
-
const
|
|
2555
|
+
let n;
|
|
2556
|
+
const W = this.activeCamera.rotation ? this.activeCamera.rotation.clone() : new Q.Euler();
|
|
2557
2557
|
if (Z)
|
|
2558
|
-
|
|
2558
|
+
n = this.activeCamera.position.clone();
|
|
2559
2559
|
else {
|
|
2560
2560
|
const P = N.clone().sub(D).normalize();
|
|
2561
|
-
P.lengthSq() === 0 && P.set(0, 0, 1),
|
|
2561
|
+
P.lengthSq() === 0 && P.set(0, 0, 1), n = D.clone().add(P.multiplyScalar(N.distanceTo(D) * w));
|
|
2562
2562
|
}
|
|
2563
2563
|
const z = this.controls.get(this.activeControlKey);
|
|
2564
|
-
if (z && (z.enabled = false), await this.animateToPosition(
|
|
2564
|
+
if (z && (z.enabled = false), await this.animateToPosition(n, W, N, L, d, C, i), this.activeCamera.camera.type === "OrthographicCamera" && this.activeCamera.camera.updateProjectionMatrix(), z && "target" in z && (z.target.copy(d), z.update && z.update()), z && (z.enabled = true), !l) {
|
|
2565
2565
|
const P = Math.max(g.x, g.y, g.z);
|
|
2566
2566
|
this.cameraPathManager.fitCircularPathToSchematics("circularPath", {
|
|
2567
2567
|
padding: I,
|
|
@@ -2607,13 +2607,13 @@ ${C || "(no log captured)"}`);
|
|
|
2607
2607
|
d.y,
|
|
2608
2608
|
d.z
|
|
2609
2609
|
]), this.activeCamera.camera.type === "OrthographicCamera" && V) {
|
|
2610
|
-
const
|
|
2611
|
-
|
|
2612
|
-
const
|
|
2610
|
+
const n = new Q.Quaternion();
|
|
2611
|
+
n.slerpQuaternions(g, V, L);
|
|
2612
|
+
const W = new Q.Euler().setFromQuaternion(n, this.activeCamera.camera.rotation.order);
|
|
2613
2613
|
this.activeCamera.rotation = [
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2614
|
+
W.x,
|
|
2615
|
+
W.y,
|
|
2616
|
+
W.z
|
|
2617
2617
|
];
|
|
2618
2618
|
} else
|
|
2619
2619
|
this.activeCamera.lookAt(w);
|
|
@@ -2651,9 +2651,9 @@ ${C || "(no log captured)"}`);
|
|
|
2651
2651
|
};
|
|
2652
2652
|
}
|
|
2653
2653
|
calculatePerspectiveFraming(A, I, C, i) {
|
|
2654
|
-
const w = this.activeCamera.camera, Z = Q.MathUtils.degToRad(w.fov), l = Math.tan(Z / 2), j = 1 + i * 2, { yaw: D, pitch: g } = this.calculateOptimalViewingAngles(I, C), V = Math.cos(D), J = Math.sin(D), N = Math.cos(g), L = Math.sin(g), d = new Q.Vector3(N * J, L, N * V).normalize(),
|
|
2655
|
-
|
|
2656
|
-
const z = new Q.Vector3().crossVectors(d,
|
|
2654
|
+
const w = this.activeCamera.camera, Z = Q.MathUtils.degToRad(w.fov), l = Math.tan(Z / 2), j = 1 + i * 2, { yaw: D, pitch: g } = this.calculateOptimalViewingAngles(I, C), V = Math.cos(D), J = Math.sin(D), N = Math.cos(g), L = Math.sin(g), d = new Q.Vector3(N * J, L, N * V).normalize(), n = new Q.Vector3(0, 1, 0), W = new Q.Vector3().crossVectors(n, d).normalize();
|
|
2655
|
+
W.lengthSq() < 1e-3 && W.set(1, 0, 0);
|
|
2656
|
+
const z = new Q.Vector3().crossVectors(d, W).normalize(), P = I.clone().multiplyScalar(0.5), T = [
|
|
2657
2657
|
new Q.Vector3(P.x, P.y, P.z),
|
|
2658
2658
|
new Q.Vector3(P.x, P.y, -P.z),
|
|
2659
2659
|
new Q.Vector3(P.x, -P.y, P.z),
|
|
@@ -2662,7 +2662,7 @@ ${C || "(no log captured)"}`);
|
|
|
2662
2662
|
new Q.Vector3(-P.x, P.y, -P.z),
|
|
2663
2663
|
new Q.Vector3(-P.x, -P.y, P.z),
|
|
2664
2664
|
new Q.Vector3(-P.x, -P.y, -P.z)
|
|
2665
|
-
].map((y) => new Q.Vector3(y.dot(
|
|
2665
|
+
].map((y) => new Q.Vector3(y.dot(W), y.dot(z), y.dot(d)));
|
|
2666
2666
|
let e = 0, a = 0, o = 0;
|
|
2667
2667
|
for (let y = 0; y < 3; y++) {
|
|
2668
2668
|
let v = 0;
|
|
@@ -2684,7 +2684,7 @@ ${C || "(no log captured)"}`);
|
|
|
2684
2684
|
if (e += AA * o, a += JA * o, Math.abs(AA) < 1e-3 && Math.abs(JA) < 1e-3)
|
|
2685
2685
|
break;
|
|
2686
2686
|
}
|
|
2687
|
-
const E =
|
|
2687
|
+
const E = W.clone().multiplyScalar(e).add(z.clone().multiplyScalar(a)), u = A.clone().add(E);
|
|
2688
2688
|
return {
|
|
2689
2689
|
position: u.clone().add(d.multiplyScalar(o)),
|
|
2690
2690
|
target: u
|
|
@@ -2859,12 +2859,12 @@ ${C || "(no log captured)"}`);
|
|
|
2859
2859
|
new Q.Vector3(-g.x, -g.y, g.z),
|
|
2860
2860
|
new Q.Vector3(-g.x, -g.y, -g.z)
|
|
2861
2861
|
];
|
|
2862
|
-
let d = 0,
|
|
2862
|
+
let d = 0, n = 0;
|
|
2863
2863
|
for (const P of L)
|
|
2864
|
-
d = Math.max(d, Math.abs(P.dot(J))),
|
|
2865
|
-
d *= j,
|
|
2866
|
-
const
|
|
2867
|
-
return Math.max(
|
|
2864
|
+
d = Math.max(d, Math.abs(P.dot(J))), n = Math.max(n, Math.abs(P.dot(N)));
|
|
2865
|
+
d *= j, n *= j;
|
|
2866
|
+
const W = d / (l * Z), z = n / l;
|
|
2867
|
+
return Math.max(W, z);
|
|
2868
2868
|
}
|
|
2869
2869
|
};
|
|
2870
2870
|
__publicField(_oI, "CAMERA_PRESETS", {
|
|
@@ -3709,8 +3709,8 @@ ${C || "(no log captured)"}`);
|
|
|
3709
3709
|
zI.applyMatrix4(C), PI.applyMatrix4(C), zI.multiplyScalar(1 / zI.w), PI.multiplyScalar(1 / PI.w), zI.x *= w.x / 2, zI.y *= w.y / 2, PI.x *= w.x / 2, PI.y *= w.y / 2, bI.start.copy(zI), bI.start.z = 0, bI.end.copy(PI), bI.end.z = 0;
|
|
3710
3710
|
const d = bI.closestPointToPointParameter(Ul, true);
|
|
3711
3711
|
bI.at(d, lg);
|
|
3712
|
-
const
|
|
3713
|
-
if (
|
|
3712
|
+
const n = _i.lerp(zI.z, PI.z, d), W = n >= -1 && n <= 1, z = Ul.distanceTo(lg) < Pi * 0.5;
|
|
3713
|
+
if (W && z) {
|
|
3714
3714
|
bI.start.fromBufferAttribute(j, J), bI.end.fromBufferAttribute(D, J), bI.start.applyMatrix4(Z), bI.end.applyMatrix4(Z);
|
|
3715
3715
|
const P = new UA(), F = new UA();
|
|
3716
3716
|
bC.distanceSqToSegment(bI.start, bI.end, F, P), I.push({
|
|
@@ -4230,9 +4230,9 @@ ${C || "(no log captured)"}`);
|
|
|
4230
4230
|
}, d = function(o, E, u, K) {
|
|
4231
4231
|
const y = o[E + 3], v = Math.pow(2, y - 128) / 255;
|
|
4232
4232
|
u[K + 0] = PZ.toHalfFloat(Math.min(o[E + 0] * v, 65504)), u[K + 1] = PZ.toHalfFloat(Math.min(o[E + 1] * v, 65504)), u[K + 2] = PZ.toHalfFloat(Math.min(o[E + 2] * v, 65504)), u[K + 3] = PZ.toHalfFloat(1);
|
|
4233
|
-
},
|
|
4234
|
-
|
|
4235
|
-
const
|
|
4233
|
+
}, n = new Uint8Array(A);
|
|
4234
|
+
n.pos = 0;
|
|
4235
|
+
const W = J(n), z = W.width, P = W.height, F = N(n.subarray(n.pos), z, P);
|
|
4236
4236
|
let T, e, a;
|
|
4237
4237
|
switch (this.type) {
|
|
4238
4238
|
case sl:
|
|
@@ -4256,9 +4256,9 @@ ${C || "(no log captured)"}`);
|
|
|
4256
4256
|
width: z,
|
|
4257
4257
|
height: P,
|
|
4258
4258
|
data: T,
|
|
4259
|
-
header:
|
|
4260
|
-
gamma:
|
|
4261
|
-
exposure:
|
|
4259
|
+
header: W.string,
|
|
4260
|
+
gamma: W.gamma,
|
|
4261
|
+
exposure: W.exposure,
|
|
4262
4262
|
type: e
|
|
4263
4263
|
};
|
|
4264
4264
|
}
|
|
@@ -5624,15 +5624,15 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
5624
5624
|
J.readAsArrayBuffer(D), J.onloadend = function() {
|
|
5625
5625
|
const N = zl(J.result), L = new DataView(new ArrayBuffer(Qg));
|
|
5626
5626
|
L.setUint32(0, N.byteLength, true), L.setUint32(4, jn, true);
|
|
5627
|
-
const d = zl(Dn(JSON.stringify(Z)), 32),
|
|
5628
|
-
|
|
5629
|
-
const
|
|
5627
|
+
const d = zl(Dn(JSON.stringify(Z)), 32), n = new DataView(new ArrayBuffer(Qg));
|
|
5628
|
+
n.setUint32(0, d.byteLength, true), n.setUint32(4, mn, true);
|
|
5629
|
+
const W = new ArrayBuffer(Lg), z = new DataView(W);
|
|
5630
5630
|
z.setUint32(0, Mn, true), z.setUint32(4, ln, true);
|
|
5631
|
-
const P = Lg +
|
|
5631
|
+
const P = Lg + n.byteLength + d.byteLength + L.byteLength + N.byteLength;
|
|
5632
5632
|
z.setUint32(8, P, true);
|
|
5633
5633
|
const F = new Blob([
|
|
5634
|
-
n,
|
|
5635
5634
|
W,
|
|
5635
|
+
n,
|
|
5636
5636
|
d,
|
|
5637
5637
|
L,
|
|
5638
5638
|
N
|
|
@@ -5768,8 +5768,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
5768
5768
|
let V = 0;
|
|
5769
5769
|
for (let L = C; L < C + i; L++) {
|
|
5770
5770
|
for (let d = 0; d < A.itemSize; d++) {
|
|
5771
|
-
let
|
|
5772
|
-
A.itemSize > 4 ?
|
|
5771
|
+
let n;
|
|
5772
|
+
A.itemSize > 4 ? n = A.array[L * A.itemSize + d] : (d === 0 ? n = A.getX(L) : d === 1 ? n = A.getY(L) : d === 2 ? n = A.getZ(L) : d === 3 && (n = A.getW(L)), A.normalized === true && (n = _i.normalize(n, A.array))), I === pA.FLOAT ? g.setFloat32(V, n, true) : I === pA.INT ? g.setInt32(V, n, true) : I === pA.UNSIGNED_INT ? g.setUint32(V, n, true) : I === pA.SHORT ? g.setInt16(V, n, true) : I === pA.UNSIGNED_SHORT ? g.setUint16(V, n, true) : I === pA.BYTE ? g.setInt8(V, n) : I === pA.UNSIGNED_BYTE && g.setUint8(V, n), V += l;
|
|
5773
5773
|
}
|
|
5774
5774
|
V % j !== 0 && (V += j - V % j);
|
|
5775
5775
|
}
|
|
@@ -5856,16 +5856,16 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
5856
5856
|
});
|
|
5857
5857
|
if (C === true && (L.translate(0, N.height), L.scale(1, -1)), A.data !== void 0) {
|
|
5858
5858
|
I !== YU && console.error("GLTFExporter: Only RGBAFormat is supported.", I), (A.width > j.maxTextureSize || A.height > j.maxTextureSize) && console.warn("GLTFExporter: Image size is bigger than maxTextureSize", A);
|
|
5859
|
-
const
|
|
5860
|
-
for (let
|
|
5861
|
-
W
|
|
5862
|
-
L.putImageData(new ImageData(
|
|
5859
|
+
const n = new Uint8ClampedArray(A.height * A.width * 4);
|
|
5860
|
+
for (let W = 0; W < n.length; W += 4)
|
|
5861
|
+
n[W + 0] = A.data[W + 0], n[W + 1] = A.data[W + 1], n[W + 2] = A.data[W + 2], n[W + 3] = A.data[W + 3];
|
|
5862
|
+
L.putImageData(new ImageData(n, A.width, A.height), 0, 0);
|
|
5863
5863
|
} else if (typeof HTMLImageElement < "u" && A instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && A instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && A instanceof ImageBitmap || typeof OffscreenCanvas < "u" && A instanceof OffscreenCanvas)
|
|
5864
5864
|
L.drawImage(A, 0, 0, N.width, N.height);
|
|
5865
5865
|
else
|
|
5866
5866
|
throw new Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");
|
|
5867
|
-
j.binary === true ? D.push(sn(N, i).then((
|
|
5868
|
-
J.bufferView =
|
|
5867
|
+
j.binary === true ? D.push(sn(N, i).then((n) => w.processBufferViewImage(n)).then((n) => {
|
|
5868
|
+
J.bufferView = n;
|
|
5869
5869
|
})) : J.uri = yU.getDataURL(N, i);
|
|
5870
5870
|
const d = l.images.push(J) - 1;
|
|
5871
5871
|
return g[V] = d, d;
|
|
@@ -6036,14 +6036,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
6036
6036
|
const d = Array.isArray(A.material);
|
|
6037
6037
|
if (d && Z.groups.length === 0)
|
|
6038
6038
|
return null;
|
|
6039
|
-
let
|
|
6039
|
+
let n = false;
|
|
6040
6040
|
if (d && Z.index === null) {
|
|
6041
6041
|
const F = [];
|
|
6042
6042
|
for (let T = 0, e = Z.attributes.position.count; T < e; T++)
|
|
6043
6043
|
F[T] = T;
|
|
6044
|
-
Z.setIndex(F),
|
|
6044
|
+
Z.setIndex(F), n = true;
|
|
6045
6045
|
}
|
|
6046
|
-
const
|
|
6046
|
+
const W = d ? A.material : [
|
|
6047
6047
|
A.material
|
|
6048
6048
|
], z = d ? Z.groups : [
|
|
6049
6049
|
{
|
|
@@ -6061,10 +6061,10 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
6061
6061
|
let o = this.getUID(Z.index);
|
|
6062
6062
|
(z[F].start !== void 0 || z[F].count !== void 0) && (o += ":" + z[F].start + ":" + z[F].count), I.attributes.has(o) ? e.indices = I.attributes.get(o) : (e.indices = this.processAccessor(Z.index, Z, z[F].start, z[F].count), I.attributes.set(o, e.indices)), e.indices === null && delete e.indices;
|
|
6063
6063
|
}
|
|
6064
|
-
const a = await this.processMaterialAsync(
|
|
6064
|
+
const a = await this.processMaterialAsync(W[z[F].materialIndex]);
|
|
6065
6065
|
a !== null && (e.material = a), g.push(e);
|
|
6066
6066
|
}
|
|
6067
|
-
|
|
6067
|
+
n === true && Z.setIndex(null), j.primitives = g, C.meshes || (C.meshes = []), await this._invokeAllAsync(function(F) {
|
|
6068
6068
|
F.writeMesh && F.writeMesh(A, j);
|
|
6069
6069
|
});
|
|
6070
6070
|
const P = C.meshes.push(j) - 1;
|
|
@@ -6127,11 +6127,11 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
6127
6127
|
const L = 1;
|
|
6128
6128
|
let d = g.values.length / g.times.length;
|
|
6129
6129
|
N === dg.morphTargetInfluences && (d /= J.morphTargetInfluences.length);
|
|
6130
|
-
let
|
|
6131
|
-
g.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === true ? (
|
|
6130
|
+
let n;
|
|
6131
|
+
g.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === true ? (n = "CUBICSPLINE", d /= 3) : g.getInterpolation() === wV ? n = "STEP" : n = "LINEAR", l.push({
|
|
6132
6132
|
input: this.processAccessor(new FC(g.times, L)),
|
|
6133
6133
|
output: this.processAccessor(new FC(g.values, d)),
|
|
6134
|
-
interpolation:
|
|
6134
|
+
interpolation: n
|
|
6135
6135
|
}), Z.push({
|
|
6136
6136
|
sampler: l.length - 1,
|
|
6137
6137
|
target: {
|
|
@@ -6252,8 +6252,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
6252
6252
|
];
|
|
6253
6253
|
if (A.children.length > 0) {
|
|
6254
6254
|
const d = [];
|
|
6255
|
-
for (let
|
|
6256
|
-
const z = A.children[
|
|
6255
|
+
for (let n = 0, W = A.children.length; n < W; n++) {
|
|
6256
|
+
const z = A.children[n];
|
|
6257
6257
|
if (z.visible || C.onlyVisible === false) {
|
|
6258
6258
|
const P = await this.processNodeAsync(z);
|
|
6259
6259
|
P !== null && d.push(P);
|
|
@@ -7488,14 +7488,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7488
7488
|
L.push(T);
|
|
7489
7489
|
}
|
|
7490
7490
|
await Promise.all(L), GA.endOperation("Process All Chunks"), this.reportBuildProgress("Finalizing scene...", 0.95, l, g), this.group.updateMatrixWorld(true);
|
|
7491
|
-
const
|
|
7491
|
+
const n = performance.now() - C, W = Array.from(this.group.children);
|
|
7492
7492
|
typeof window < "u" && window.dispatchEvent(new CustomEvent("schematicRenderComplete", {
|
|
7493
7493
|
detail: {
|
|
7494
7494
|
schematicId: this.id,
|
|
7495
7495
|
schematicName: this.name,
|
|
7496
7496
|
totalChunks: l,
|
|
7497
7497
|
processedChunks: g,
|
|
7498
|
-
buildTimeMs:
|
|
7498
|
+
buildTimeMs: n,
|
|
7499
7499
|
meshCount: V,
|
|
7500
7500
|
optimized: true,
|
|
7501
7501
|
immediate: true,
|
|
@@ -7508,7 +7508,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7508
7508
|
return console.log(`Palette Cache - ${P.paletteSize} block types, ${(P.memoryEstimate / 1024 / 1024).toFixed(1)}MB`), this.reportBuildProgress("TRUE lazy build complete", 1, l, g), setTimeout(() => {
|
|
7509
7509
|
this.schematicRenderer.uiManager && this.schematicRenderer.uiManager.hideProgressBar();
|
|
7510
7510
|
}, 500), {
|
|
7511
|
-
meshes:
|
|
7511
|
+
meshes: W,
|
|
7512
7512
|
chunkMap: j
|
|
7513
7513
|
};
|
|
7514
7514
|
}
|
|
@@ -7522,7 +7522,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7522
7522
|
V(J[0], J[1], J[2], J[3]);
|
|
7523
7523
|
}, j = /* @__PURE__ */ new Map();
|
|
7524
7524
|
for (const g of A) {
|
|
7525
|
-
const V = g.chunk_x * C, J = g.chunk_x * C + C - 1, N = g.chunk_y * i, L = g.chunk_y * i + i - 1, d = g.chunk_z * w,
|
|
7525
|
+
const V = g.chunk_x * C, J = g.chunk_x * C + C - 1, N = g.chunk_y * i, L = g.chunk_y * i + i - 1, d = g.chunk_z * w, n = g.chunk_z * w + w - 1, W = {
|
|
7526
7526
|
negX: [],
|
|
7527
7527
|
posX: [],
|
|
7528
7528
|
negY: [],
|
|
@@ -7531,8 +7531,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7531
7531
|
posZ: []
|
|
7532
7532
|
};
|
|
7533
7533
|
l(g.blocks, (z, P, F, T) => {
|
|
7534
|
-
z === V &&
|
|
7535
|
-
}), j.set(Z(g.chunk_x, g.chunk_y, g.chunk_z),
|
|
7534
|
+
z === V && W.negX.push(z, P, F, T), z === J && W.posX.push(z, P, F, T), P === N && W.negY.push(z, P, F, T), P === L && W.posY.push(z, P, F, T), F === d && W.negZ.push(z, P, F, T), F === n && W.posZ.push(z, P, F, T);
|
|
7535
|
+
}), j.set(Z(g.chunk_x, g.chunk_y, g.chunk_z), W);
|
|
7536
7536
|
}
|
|
7537
7537
|
const D = /* @__PURE__ */ new Map();
|
|
7538
7538
|
for (const g of A) {
|
|
@@ -7541,16 +7541,16 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7541
7541
|
T && L.push(F(T));
|
|
7542
7542
|
};
|
|
7543
7543
|
d(Z(V + 1, J, N), (P) => P.negX), d(Z(V - 1, J, N), (P) => P.posX), d(Z(V, J + 1, N), (P) => P.negY), d(Z(V, J - 1, N), (P) => P.posY), d(Z(V, J, N + 1), (P) => P.negZ), d(Z(V, J, N - 1), (P) => P.posZ);
|
|
7544
|
-
let
|
|
7544
|
+
let n = 0;
|
|
7545
7545
|
for (const P of L)
|
|
7546
|
-
|
|
7547
|
-
if (
|
|
7546
|
+
n += P.length;
|
|
7547
|
+
if (n === 0)
|
|
7548
7548
|
continue;
|
|
7549
|
-
const
|
|
7549
|
+
const W = new Int32Array(n);
|
|
7550
7550
|
let z = 0;
|
|
7551
7551
|
for (const P of L)
|
|
7552
|
-
|
|
7553
|
-
D.set(Z(V, J, N),
|
|
7552
|
+
W.set(P, z), z += P.length;
|
|
7553
|
+
D.set(Z(V, J, N), W);
|
|
7554
7554
|
}
|
|
7555
7555
|
return D;
|
|
7556
7556
|
}
|
|
@@ -7593,14 +7593,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7593
7593
|
blocks: o
|
|
7594
7594
|
});
|
|
7595
7595
|
}
|
|
7596
|
-
const
|
|
7597
|
-
for (let F = 0; F < z; F +=
|
|
7598
|
-
const T = Math.min(F +
|
|
7596
|
+
const n = this.computeChunkAprons(d, I), W = 8, z = d.length;
|
|
7597
|
+
for (let F = 0; F < z; F += W) {
|
|
7598
|
+
const T = Math.min(F + W, z), a = d.slice(F, T).map(({ chunk_x: E, chunk_y: u, chunk_z: K, blocks: y }) => this.worldMeshBuilder.getChunkMesh({
|
|
7599
7599
|
blocks: y,
|
|
7600
7600
|
chunk_x: E,
|
|
7601
7601
|
chunk_y: u,
|
|
7602
7602
|
chunk_z: K,
|
|
7603
|
-
apronBlocks:
|
|
7603
|
+
apronBlocks: n.get(`${E},${u},${K}`)
|
|
7604
7604
|
}, A, V).then((v) => ({
|
|
7605
7605
|
chunk_x: E,
|
|
7606
7606
|
chunk_y: u,
|
|
@@ -7612,7 +7612,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7612
7612
|
const v = `${E},${u},${K}`;
|
|
7613
7613
|
D.set(v, y), this.applyPropertiesToObjects(y), y.forEach((O) => this.group.add(O)), g += y.length, this.schematicRenderer.invalidate();
|
|
7614
7614
|
}
|
|
7615
|
-
console.log(`[SceneAdd] batch=${Math.floor(F /
|
|
7615
|
+
console.log(`[SceneAdd] batch=${Math.floor(F / W) + 1} processed=${J}/${z} children=${this.group.children.length}`), this.reportBuildProgress("Processing chunks...", J / z, z, J);
|
|
7616
7616
|
}
|
|
7617
7617
|
if (this.schematicRenderer.renderManager && i) {
|
|
7618
7618
|
const F = performance.now();
|
|
@@ -7648,10 +7648,10 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7648
7648
|
applyBoundsToChunks(A, I, C) {
|
|
7649
7649
|
const i = [], w = I.min.x, Z = I.min.y, l = I.min.z, j = I.max.x, D = I.max.y, g = I.max.z;
|
|
7650
7650
|
for (const V of A) {
|
|
7651
|
-
const J = V.chunk_x * C.chunkWidth, N = V.chunk_y * C.chunkHeight, L = V.chunk_z * C.chunkLength, d = J + C.chunkWidth,
|
|
7652
|
-
if (d <= w || J >= j ||
|
|
7651
|
+
const J = V.chunk_x * C.chunkWidth, N = V.chunk_y * C.chunkHeight, L = V.chunk_z * C.chunkLength, d = J + C.chunkWidth, n = N + C.chunkHeight, W = L + C.chunkLength;
|
|
7652
|
+
if (d <= w || J >= j || n <= Z || N >= D || W <= l || L >= g)
|
|
7653
7653
|
continue;
|
|
7654
|
-
if (J >= w && d <= j && N >= Z &&
|
|
7654
|
+
if (J >= w && d <= j && N >= Z && n <= D && L >= l && W <= g) {
|
|
7655
7655
|
i.push(V);
|
|
7656
7656
|
continue;
|
|
7657
7657
|
}
|
|
@@ -7690,44 +7690,44 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
7690
7690
|
this.reportBuildProgress("Collecting chunk data...", 0.15, l, 0);
|
|
7691
7691
|
const j = [];
|
|
7692
7692
|
for (; Z.has_next(); ) {
|
|
7693
|
-
const
|
|
7694
|
-
if (!
|
|
7693
|
+
const n = Z.next();
|
|
7694
|
+
if (!n || n.blocks.length === 0)
|
|
7695
7695
|
continue;
|
|
7696
|
-
const
|
|
7696
|
+
const W = n.blocks;
|
|
7697
7697
|
let z;
|
|
7698
|
-
if (
|
|
7699
|
-
z =
|
|
7698
|
+
if (W instanceof Int32Array)
|
|
7699
|
+
z = W;
|
|
7700
7700
|
else {
|
|
7701
|
-
z = new Int32Array(
|
|
7702
|
-
for (let P = 0; P <
|
|
7703
|
-
const F =
|
|
7701
|
+
z = new Int32Array(W.length * 4);
|
|
7702
|
+
for (let P = 0; P < W.length; P++) {
|
|
7703
|
+
const F = W[P];
|
|
7704
7704
|
z[P * 4] = F[0], z[P * 4 + 1] = F[1], z[P * 4 + 2] = F[2], z[P * 4 + 3] = F[3];
|
|
7705
7705
|
}
|
|
7706
7706
|
}
|
|
7707
7707
|
j.push({
|
|
7708
7708
|
blocks: z,
|
|
7709
|
-
chunk_x:
|
|
7710
|
-
chunk_y:
|
|
7711
|
-
chunk_z:
|
|
7709
|
+
chunk_x: n.chunk_x,
|
|
7710
|
+
chunk_y: n.chunk_y,
|
|
7711
|
+
chunk_z: n.chunk_z
|
|
7712
7712
|
});
|
|
7713
7713
|
}
|
|
7714
7714
|
const D = ((_a2 = A.renderingBounds) == null ? void 0 : _a2.enabled) ? A.renderingBounds : void 0, g = D ? this.applyBoundsToChunks(j, D, I) : j, V = this.computeChunkAprons(g, I);
|
|
7715
|
-
for (const
|
|
7716
|
-
|
|
7715
|
+
for (const n of g)
|
|
7716
|
+
n.apronBlocks = V.get(`${n.chunk_x},${n.chunk_y},${n.chunk_z}`);
|
|
7717
7717
|
this.reportBuildProgress("Processing chunks in BATCH mode...", 0.2, l, 0), GA.startOperation("Process All Chunks");
|
|
7718
7718
|
let J = 0;
|
|
7719
|
-
const N = await this.worldMeshBuilder.processChunksBatched(g, (
|
|
7720
|
-
J =
|
|
7721
|
-
const z = 0.2 +
|
|
7722
|
-
this.reportBuildProgress("Batch processing chunks...", z,
|
|
7719
|
+
const N = await this.worldMeshBuilder.processChunksBatched(g, (n, W) => {
|
|
7720
|
+
J = n;
|
|
7721
|
+
const z = 0.2 + n / W * 0.7;
|
|
7722
|
+
this.reportBuildProgress("Batch processing chunks...", z, W, n);
|
|
7723
7723
|
});
|
|
7724
7724
|
GA.endOperation("Process All Chunks"), this.reportBuildProgress("Adding batched meshes to scene...", 0.95, l, J);
|
|
7725
7725
|
const L = 2;
|
|
7726
|
-
for (let
|
|
7727
|
-
const
|
|
7728
|
-
for (const z of
|
|
7726
|
+
for (let n = 0; n < N.length; n += L) {
|
|
7727
|
+
const W = N.slice(n, n + L);
|
|
7728
|
+
for (const z of W)
|
|
7729
7729
|
this.group.add(z);
|
|
7730
|
-
this.schematicRenderer.renderManager && this.schematicRenderer.renderManager.render(),
|
|
7730
|
+
this.schematicRenderer.renderManager && this.schematicRenderer.renderManager.render(), n + L < N.length && await new Promise((z) => requestAnimationFrame(() => z()));
|
|
7731
7731
|
}
|
|
7732
7732
|
this.group.updateMatrixWorld(true);
|
|
7733
7733
|
const d = performance.now() - C;
|
|
@@ -8588,15 +8588,15 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
8588
8588
|
}
|
|
8589
8589
|
const N = new Q.Vector3(J.x + 1, J.y + 1, J.z + 1), d = new Q.Vector3(J.x + 0.5 + 0.5, J.y + 0.5 + 0.5, J.z + 0.5 + 0.5).clone();
|
|
8590
8590
|
j.group.localToWorld(d);
|
|
8591
|
-
const
|
|
8591
|
+
const n = new Q.Mesh(new Q.BoxGeometry(1.01, 1.01, 1.01), new Q.MeshBasicMaterial({
|
|
8592
8592
|
color: 16777215,
|
|
8593
8593
|
opacity: 0.3,
|
|
8594
8594
|
transparent: true,
|
|
8595
8595
|
depthWrite: false,
|
|
8596
8596
|
side: Q.BackSide
|
|
8597
8597
|
}));
|
|
8598
|
-
|
|
8599
|
-
const
|
|
8598
|
+
n.position.copy(d), this.schematicRenderer.sceneManager.scene.add(n), this.debugHelpers.push(n);
|
|
8599
|
+
const W = new Q.BoxGeometry(1.02, 1.02, 1.02), z = new Q.EdgesGeometry(W), P = new Q.LineSegments(z, new Q.LineBasicMaterial({
|
|
8600
8600
|
color: 16777215,
|
|
8601
8601
|
linewidth: 2,
|
|
8602
8602
|
transparent: true,
|
|
@@ -8687,12 +8687,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
8687
8687
|
N.add(D), N.add(J), N.position.copy(w), N.visible = this.visible;
|
|
8688
8688
|
const L = document.createElement("canvas"), d = L.getContext("2d");
|
|
8689
8689
|
L.width = 128, L.height = 64, d && (d.fillStyle = "rgba(0, 0, 0, 0.85)", d.fillRect(0, 0, L.width, L.height), d.strokeStyle = "rgb(0, 255, 136)", d.lineWidth = 3, d.strokeRect(2, 2, L.width - 4, L.height - 4), d.textAlign = "center", d.textBaseline = "middle", d.fillStyle = "rgb(0, 255, 136)", d.font = "bold 28px 'Courier New', monospace", d.fillText("I/O", L.width / 2, L.height / 2));
|
|
8690
|
-
const
|
|
8691
|
-
map:
|
|
8690
|
+
const n = new Q.CanvasTexture(L), W = new Q.SpriteMaterial({
|
|
8691
|
+
map: n,
|
|
8692
8692
|
transparent: true,
|
|
8693
8693
|
depthTest: false,
|
|
8694
8694
|
depthWrite: false
|
|
8695
|
-
}), z = new Q.Sprite(
|
|
8695
|
+
}), z = new Q.Sprite(W);
|
|
8696
8696
|
z.scale.set(1, 0.5, 1), z.position.set(w.x, w.y + 1, w.z), z.visible = this.visible, this.schematicRenderer.sceneManager.scene.add(N), this.schematicRenderer.sceneManager.scene.add(z), this.markers[I] = {
|
|
8697
8697
|
mesh: N,
|
|
8698
8698
|
label: z
|
|
@@ -9387,7 +9387,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
9387
9387
|
return;
|
|
9388
9388
|
const i = (A == null ? void 0 : A.spacing) ?? 2, w = (A == null ? void 0 : A.columns) ?? Math.ceil(Math.sqrt(C)), Z = Math.ceil(C / w), l = this.getMaxSchematicTightDimensions(), j = l.x + i, D = l.z + i, g = w * j, V = Z * D;
|
|
9389
9389
|
I.forEach((J, N) => {
|
|
9390
|
-
const L = N % w, d = Math.floor(N / w),
|
|
9390
|
+
const L = N % w, d = Math.floor(N / w), n = J.getTightDimensions(), W = n[0] > 0 ? n : J.getDimensions(), z = L * j - g / 2 + j / 2 - W[0] / 2 + 0.5, P = d * D - V / 2 + D / 2 - W[2] / 2 + 0.5;
|
|
9391
9391
|
J.setPosition([
|
|
9392
9392
|
z,
|
|
9393
9393
|
0.5,
|
|
@@ -9441,8 +9441,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
9441
9441
|
let V = 0, J = 0, N = 0;
|
|
9442
9442
|
I.forEach((d) => {
|
|
9443
9443
|
var _a2, _b3, _c3;
|
|
9444
|
-
const
|
|
9445
|
-
l.set(
|
|
9444
|
+
const n = d.attributes.position.array, W = (_a2 = d.attributes.normal) == null ? void 0 : _a2.array, z = (_b3 = d.attributes.uv) == null ? void 0 : _b3.array, P = (_c3 = d.index) == null ? void 0 : _c3.array;
|
|
9445
|
+
l.set(n, V), W && j && j.set(W, V), z && D && D.set(z, V / 3 * 2);
|
|
9446
9446
|
const F = d.attributes.position.count;
|
|
9447
9447
|
let T = 0;
|
|
9448
9448
|
if (P) {
|
|
@@ -9454,7 +9454,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
9454
9454
|
g[J + e] = N + e;
|
|
9455
9455
|
T = F;
|
|
9456
9456
|
}
|
|
9457
|
-
V +=
|
|
9457
|
+
V += n.length, J += T, N += F;
|
|
9458
9458
|
});
|
|
9459
9459
|
const L = new Q.BufferGeometry();
|
|
9460
9460
|
return L.setAttribute("position", new Q.BufferAttribute(l, 3)), j && L.setAttribute("normal", new Q.BufferAttribute(j, 3)), D && L.setAttribute("uv", new Q.BufferAttribute(D, 2)), L.setIndex(new Q.BufferAttribute(g, 1)), L;
|
|
@@ -10128,17 +10128,17 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10128
10128
|
for (let g = 0; g < I.length; g++) {
|
|
10129
10129
|
const V = I[g];
|
|
10130
10130
|
if (!V) {
|
|
10131
|
-
for (let
|
|
10132
|
-
l[g * 8 +
|
|
10131
|
+
for (let n = 0; n < 8; n++)
|
|
10132
|
+
l[g * 8 + n] = 0;
|
|
10133
10133
|
continue;
|
|
10134
10134
|
}
|
|
10135
10135
|
const J = j, N = D;
|
|
10136
10136
|
let L = 0, d = 0;
|
|
10137
|
-
for (const
|
|
10138
|
-
const
|
|
10139
|
-
if (!
|
|
10137
|
+
for (const n of V.materialGroups) {
|
|
10138
|
+
const W = n.baseGeometry;
|
|
10139
|
+
if (!W || !W.attributes.position)
|
|
10140
10140
|
continue;
|
|
10141
|
-
const z =
|
|
10141
|
+
const z = W.attributes.position, P = W.attributes.normal, F = W.attributes.uv, T = W.index, e = z.count, a = T ? T.count : e;
|
|
10142
10142
|
for (let o = 0; o < e; o++) {
|
|
10143
10143
|
const E = (j + o) * 8;
|
|
10144
10144
|
w[E + 0] = z.array[o * 3 + 0], w[E + 1] = z.array[o * 3 + 1], w[E + 2] = z.array[o * 3 + 2], P ? (w[E + 3] = P.array[o * 3 + 0], w[E + 4] = P.array[o * 3 + 1], w[E + 5] = P.array[o * 3 + 2]) : (w[E + 3] = 0, w[E + 4] = 1, w[E + 5] = 0), F ? (w[E + 6] = F.array[o * 2 + 0], w[E + 7] = F.array[o * 2 + 1]) : (w[E + 6] = 0, w[E + 7] = 0);
|
|
@@ -10204,9 +10204,9 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10204
10204
|
const sA = w[jA], VA = w[jA + 1], eA = w[jA + 2];
|
|
10205
10205
|
l = Math.min(l, sA), j = Math.min(j, VA), D = Math.min(D, eA), g = Math.max(g, sA), V = Math.max(V, VA), J = Math.max(J, eA);
|
|
10206
10206
|
}
|
|
10207
|
-
const N = g - l + 1, L = V - j + 1, d = J - D + 1,
|
|
10207
|
+
const N = g - l + 1, L = V - j + 1, d = J - D + 1, n = 1, W = (N + 2 * n) * (L + 2 * n) * (d + 2 * n), z = new Int32Array(W), P = N + 2 * n, F = P * (L + 2 * n);
|
|
10208
10208
|
for (let jA = 0; jA < w.length; jA += 4) {
|
|
10209
|
-
const sA = w[jA] - l +
|
|
10209
|
+
const sA = w[jA] - l + n, VA = w[jA + 1] - j + n, eA = w[jA + 2] - D + n, fA = w[jA + 3];
|
|
10210
10210
|
z[sA + VA * P + eA * F] = fA + 1;
|
|
10211
10211
|
}
|
|
10212
10212
|
const T = Z * 500, e = T, a = this.gpuManager.createStorageBuffer(w, "block-data"), o = this.gpuManager.createStorageBuffer(z, "voxel-map"), E = i.createBuffer({
|
|
@@ -10620,7 +10620,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10620
10620
|
var _a3, _b4, _c3;
|
|
10621
10621
|
const V = A[g], J = this.createBlockStringFromPaletteEntry(V), N = "plains";
|
|
10622
10622
|
try {
|
|
10623
|
-
const L = await this.cubane.getBlockMesh(J, N, true), d = L ? this.extractAllMeshData(L) : this.extractAllMeshData(this.createFallbackObject3D(J)),
|
|
10623
|
+
const L = await this.cubane.getBlockMesh(J, N, true), d = L ? this.extractAllMeshData(L) : this.extractAllMeshData(this.createFallbackObject3D(J)), n = [], W = [];
|
|
10624
10624
|
for (const { geometry: P, material: F } of d) {
|
|
10625
10625
|
if (P.attributes.position.count === 0)
|
|
10626
10626
|
continue;
|
|
@@ -10628,12 +10628,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10628
10628
|
let a = C.get(e);
|
|
10629
10629
|
a || (a = T, C.set(e, a), i.push(a));
|
|
10630
10630
|
const o = i.indexOf(a);
|
|
10631
|
-
|
|
10631
|
+
n.push({
|
|
10632
10632
|
material: a,
|
|
10633
10633
|
baseGeometry: P,
|
|
10634
10634
|
positions: [],
|
|
10635
10635
|
materialIndex: o
|
|
10636
|
-
}),
|
|
10636
|
+
}), W.push({
|
|
10637
10637
|
positions: P.attributes.position.array,
|
|
10638
10638
|
normals: (_a3 = P.attributes.normal) == null ? void 0 : _a3.array,
|
|
10639
10639
|
uvs: (_b4 = P.attributes.uv) == null ? void 0 : _b4.array,
|
|
@@ -10644,16 +10644,16 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10644
10644
|
const z = this.getBlockCategory(V.name, V.properties);
|
|
10645
10645
|
if (I[g] = {
|
|
10646
10646
|
blockName: V.name,
|
|
10647
|
-
materialGroups:
|
|
10647
|
+
materialGroups: n,
|
|
10648
10648
|
category: z
|
|
10649
|
-
},
|
|
10649
|
+
}, W.length > 0) {
|
|
10650
10650
|
const P = await this.computeOcclusionFlags(J, z);
|
|
10651
10651
|
w.push({
|
|
10652
10652
|
index: g,
|
|
10653
10653
|
category: z,
|
|
10654
10654
|
occlusionFlags: P,
|
|
10655
10655
|
isCubic: P === 63,
|
|
10656
|
-
geometries:
|
|
10656
|
+
geometries: W
|
|
10657
10657
|
});
|
|
10658
10658
|
}
|
|
10659
10659
|
} catch (L) {
|
|
@@ -10709,30 +10709,30 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10709
10709
|
meshContextId: this.meshContextId
|
|
10710
10710
|
});
|
|
10711
10711
|
for (const d of J) {
|
|
10712
|
-
const
|
|
10713
|
-
let
|
|
10712
|
+
const n = `batch_${d.chunk_x}_${d.chunk_y}_${d.chunk_z}`;
|
|
10713
|
+
let W;
|
|
10714
10714
|
if (d.blocks instanceof Int32Array)
|
|
10715
|
-
|
|
10715
|
+
W = d.blocks;
|
|
10716
10716
|
else {
|
|
10717
|
-
|
|
10717
|
+
W = new Int32Array(d.blocks.length * 4);
|
|
10718
10718
|
for (let o = 0; o < d.blocks.length; o++) {
|
|
10719
10719
|
const E = d.blocks[o];
|
|
10720
|
-
|
|
10720
|
+
W[o * 4] = E[0], W[o * 4 + 1] = E[1], W[o * 4 + 2] = E[2], W[o * 4 + 3] = E[3];
|
|
10721
10721
|
}
|
|
10722
10722
|
}
|
|
10723
10723
|
let z = 1 / 0, P = 1 / 0, F = 1 / 0;
|
|
10724
|
-
for (let o = 0; o <
|
|
10725
|
-
z = Math.min(z,
|
|
10724
|
+
for (let o = 0; o < W.length; o += 4)
|
|
10725
|
+
z = Math.min(z, W[o]), P = Math.min(P, W[o + 1]), F = Math.min(F, W[o + 2]);
|
|
10726
10726
|
const T = isFinite(z) ? z : 0, e = isFinite(P) ? P : 0, a = isFinite(F) ? F : 0;
|
|
10727
10727
|
await new Promise((o, E) => {
|
|
10728
|
-
if (this.batchPendingChunks.set(
|
|
10728
|
+
if (this.batchPendingChunks.set(n, {
|
|
10729
10729
|
resolve: o,
|
|
10730
10730
|
reject: E
|
|
10731
10731
|
}), this.useSharedMemory && this.sharedMemoryPool) {
|
|
10732
|
-
const u = this.sharedMemoryPool.writeChunkInput(
|
|
10732
|
+
const u = this.sharedMemoryPool.writeChunkInput(n, W, T, e, a);
|
|
10733
10733
|
j.postMessage({
|
|
10734
10734
|
type: "buildChunkBatched",
|
|
10735
|
-
chunkId:
|
|
10735
|
+
chunkId: n,
|
|
10736
10736
|
sharedInputBuffer: u,
|
|
10737
10737
|
chunkOrigin: [
|
|
10738
10738
|
T,
|
|
@@ -10745,8 +10745,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10745
10745
|
} else
|
|
10746
10746
|
j.postMessage({
|
|
10747
10747
|
type: "buildChunkBatched",
|
|
10748
|
-
chunkId:
|
|
10749
|
-
blocks:
|
|
10748
|
+
chunkId: n,
|
|
10749
|
+
blocks: W,
|
|
10750
10750
|
chunkOrigin: [
|
|
10751
10751
|
T,
|
|
10752
10752
|
e,
|
|
@@ -10755,12 +10755,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10755
10755
|
apronBlocks: d.apronBlocks,
|
|
10756
10756
|
meshContextId: this.meshContextId
|
|
10757
10757
|
}, [
|
|
10758
|
-
|
|
10758
|
+
W.buffer
|
|
10759
10759
|
]);
|
|
10760
10760
|
}), i++, I && I(i, C);
|
|
10761
10761
|
}
|
|
10762
|
-
const N = await new Promise((d,
|
|
10763
|
-
this.batchFinishResolve = d, this._batchFinishReject =
|
|
10762
|
+
const N = await new Promise((d, n) => {
|
|
10763
|
+
this.batchFinishResolve = d, this._batchFinishReject = n, j.postMessage({
|
|
10764
10764
|
type: "finishBatch",
|
|
10765
10765
|
meshContextId: this.meshContextId
|
|
10766
10766
|
});
|
|
@@ -10813,16 +10813,16 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10813
10813
|
let V = 0;
|
|
10814
10814
|
const J = 0;
|
|
10815
10815
|
for (const [L, d] of l.entries()) {
|
|
10816
|
-
const
|
|
10817
|
-
let
|
|
10816
|
+
const n = D ? V : J;
|
|
10817
|
+
let W = 0;
|
|
10818
10818
|
for (const z of d)
|
|
10819
10819
|
if (D && Z) {
|
|
10820
10820
|
const P = z.start, F = z.count, T = Z.subarray(P, P + F);
|
|
10821
|
-
D.set(T, V), V += F,
|
|
10821
|
+
D.set(T, V), V += F, W += F;
|
|
10822
10822
|
}
|
|
10823
10823
|
g.push({
|
|
10824
|
-
start:
|
|
10825
|
-
count:
|
|
10824
|
+
start: n,
|
|
10825
|
+
count: W,
|
|
10826
10826
|
materialIndex: L
|
|
10827
10827
|
});
|
|
10828
10828
|
}
|
|
@@ -10855,8 +10855,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
10855
10855
|
if (A.blocks instanceof Int32Array) {
|
|
10856
10856
|
const V = [], J = A.blocks;
|
|
10857
10857
|
for (let N = 0; N < J.length; N += 4) {
|
|
10858
|
-
const L = J[N], d = J[N + 1],
|
|
10859
|
-
L >= I.min.x && L < I.max.x && d >= I.min.y && d < I.max.y &&
|
|
10858
|
+
const L = J[N], d = J[N + 1], n = J[N + 2];
|
|
10859
|
+
L >= I.min.x && L < I.max.x && d >= I.min.y && d < I.max.y && n >= I.min.z && n < I.max.z && V.push(L, d, n, J[N + 3]);
|
|
10860
10860
|
}
|
|
10861
10861
|
i = new Int32Array(V);
|
|
10862
10862
|
} else
|
|
@@ -11007,23 +11007,23 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11007
11007
|
let Z = A.blocks;
|
|
11008
11008
|
if (!!(C == null ? void 0 : C.enabled))
|
|
11009
11009
|
if (A.blocks instanceof Int32Array) {
|
|
11010
|
-
const
|
|
11010
|
+
const W = [], z = A.blocks;
|
|
11011
11011
|
for (let P = 0; P < z.length; P += 4) {
|
|
11012
11012
|
const F = z[P], T = z[P + 1], e = z[P + 2];
|
|
11013
|
-
F >= C.min.x && F < C.max.x && T >= C.min.y && T < C.max.y && e >= C.min.z && e < C.max.z &&
|
|
11013
|
+
F >= C.min.x && F < C.max.x && T >= C.min.y && T < C.max.y && e >= C.min.z && e < C.max.z && W.push(F, T, e, z[P + 3]);
|
|
11014
11014
|
}
|
|
11015
|
-
Z = new Int32Array(
|
|
11015
|
+
Z = new Int32Array(W);
|
|
11016
11016
|
} else
|
|
11017
|
-
Z = A.blocks.filter((
|
|
11018
|
-
const [z, P, F] =
|
|
11017
|
+
Z = A.blocks.filter((W) => {
|
|
11018
|
+
const [z, P, F] = W;
|
|
11019
11019
|
return z >= C.min.x && z < C.max.x && P >= C.min.y && P < C.max.y && F >= C.min.z && F < C.max.z;
|
|
11020
11020
|
});
|
|
11021
11021
|
if (Z.length === 0)
|
|
11022
11022
|
return [];
|
|
11023
11023
|
const j = [], D = Z;
|
|
11024
11024
|
if (i)
|
|
11025
|
-
for (const
|
|
11026
|
-
const z =
|
|
11025
|
+
for (const W of i) {
|
|
11026
|
+
const z = W.position;
|
|
11027
11027
|
if ((C == null ? void 0 : C.enabled) && (z[0] < C.min.x || z[0] >= C.max.x || z[1] < C.min.y || z[1] >= C.max.y || z[2] < C.min.z || z[2] >= C.max.z))
|
|
11028
11028
|
continue;
|
|
11029
11029
|
const P = I.schematicWrapper.get_block(z[0], z[1], z[2]);
|
|
@@ -11033,16 +11033,16 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11033
11033
|
z: z[2],
|
|
11034
11034
|
paletteIndex: -1,
|
|
11035
11035
|
blockName: P,
|
|
11036
|
-
nbtData:
|
|
11036
|
+
nbtData: W
|
|
11037
11037
|
});
|
|
11038
11038
|
}
|
|
11039
11039
|
else {
|
|
11040
|
-
const
|
|
11041
|
-
if (
|
|
11040
|
+
const W = I.getBlockEntitiesMap();
|
|
11041
|
+
if (W.size > 0 && W.size < 1e4) {
|
|
11042
11042
|
let z = I._entitySpatialCache;
|
|
11043
11043
|
if (!z) {
|
|
11044
11044
|
z = /* @__PURE__ */ new Map();
|
|
11045
|
-
for (const [, T] of
|
|
11045
|
+
for (const [, T] of W) {
|
|
11046
11046
|
const e = T.position, a = `${Math.floor(e[0] / this.chunkSize)},${Math.floor(e[1] / this.chunkSize)},${Math.floor(e[2] / this.chunkSize)}`;
|
|
11047
11047
|
z.has(a) || z.set(a, []), z.get(a).push(T);
|
|
11048
11048
|
}
|
|
@@ -11068,22 +11068,22 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11068
11068
|
bufferGeometry: 0,
|
|
11069
11069
|
tileEntities: 0
|
|
11070
11070
|
};
|
|
11071
|
-
let d = performance.now(),
|
|
11071
|
+
let d = performance.now(), n = null;
|
|
11072
11072
|
if (this.useGPUCompute && ((_b3 = this.computeMeshBuilder) == null ? void 0 : _b3.isReady))
|
|
11073
11073
|
try {
|
|
11074
|
-
const
|
|
11074
|
+
const W = await this.computeMeshBuilder.buildChunk(D, [
|
|
11075
11075
|
g,
|
|
11076
11076
|
V,
|
|
11077
11077
|
J
|
|
11078
11078
|
], w);
|
|
11079
|
-
|
|
11080
|
-
meshes:
|
|
11081
|
-
origin:
|
|
11079
|
+
W && (n = {
|
|
11080
|
+
meshes: W.geometries,
|
|
11081
|
+
origin: W.origin
|
|
11082
11082
|
});
|
|
11083
|
-
} catch (
|
|
11084
|
-
console.warn("[WorldMeshBuilder] GPU compute failed, falling back to workers:",
|
|
11083
|
+
} catch (W) {
|
|
11084
|
+
console.warn("[WorldMeshBuilder] GPU compute failed, falling back to workers:", W);
|
|
11085
11085
|
}
|
|
11086
|
-
|
|
11086
|
+
n || (n = await new Promise(async (z, P) => {
|
|
11087
11087
|
if (D.length === 0) {
|
|
11088
11088
|
z({
|
|
11089
11089
|
meshes: []
|
|
@@ -11141,11 +11141,11 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11141
11141
|
}
|
|
11142
11142
|
})), L.workerDispatch = performance.now() - d, d = performance.now();
|
|
11143
11143
|
try {
|
|
11144
|
-
const
|
|
11145
|
-
if (!
|
|
11144
|
+
const W = n;
|
|
11145
|
+
if (!W)
|
|
11146
11146
|
return console.warn("[WorldMeshBuilder] No build result available"), N;
|
|
11147
|
-
if (
|
|
11148
|
-
for (const z of
|
|
11147
|
+
if (W.meshes)
|
|
11148
|
+
for (const z of W.meshes) {
|
|
11149
11149
|
const P = new Q.BufferGeometry();
|
|
11150
11150
|
if (z.positions) {
|
|
11151
11151
|
const e = new Q.BufferAttribute(z.positions, 3, false);
|
|
@@ -11165,7 +11165,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11165
11165
|
const F = new Q.Mesh(P, this.paletteCache.globalMaterials);
|
|
11166
11166
|
F.name = `${z.category}_chunk`;
|
|
11167
11167
|
const T = 1 / Cc;
|
|
11168
|
-
F.scale.setScalar(T),
|
|
11168
|
+
F.scale.setScalar(T), W.origin && F.position.set(W.origin[0], W.origin[1], W.origin[2]), this.configureMeshForCategory(F, z.category), N.push(F);
|
|
11169
11169
|
}
|
|
11170
11170
|
if (L.bufferGeometry = performance.now() - d, d = performance.now(), j.length > 0)
|
|
11171
11171
|
for (const z of j) {
|
|
@@ -11189,8 +11189,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11189
11189
|
}
|
|
11190
11190
|
}
|
|
11191
11191
|
L.tileEntities = performance.now() - d;
|
|
11192
|
-
} catch (
|
|
11193
|
-
console.error("Error building chunk mesh:",
|
|
11192
|
+
} catch (W) {
|
|
11193
|
+
console.error("Error building chunk mesh:", W);
|
|
11194
11194
|
}
|
|
11195
11195
|
if (this._timingStats || (this._timingStats = {
|
|
11196
11196
|
count: 0,
|
|
@@ -11201,8 +11201,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11201
11201
|
maxBuffer: 0,
|
|
11202
11202
|
maxTile: 0
|
|
11203
11203
|
}), this._timingStats.count++, this._timingStats.worker += L.workerDispatch, this._timingStats.buffer += L.bufferGeometry, this._timingStats.tile += L.tileEntities, this._timingStats.maxWorker = Math.max(this._timingStats.maxWorker, L.workerDispatch), this._timingStats.maxBuffer = Math.max(this._timingStats.maxBuffer, L.bufferGeometry), this._timingStats.maxTile = Math.max(this._timingStats.maxTile, L.tileEntities), this._timingStats.count % 10 === 0) {
|
|
11204
|
-
const
|
|
11205
|
-
console.log(`[ChunkTiming n=${
|
|
11204
|
+
const W = this._timingStats.count;
|
|
11205
|
+
console.log(`[ChunkTiming n=${W}] avg: worker=${(this._timingStats.worker / W).toFixed(1)}ms, buffer=${(this._timingStats.buffer / W).toFixed(1)}ms, tile=${(this._timingStats.tile / W).toFixed(1)}ms | max: w=${this._timingStats.maxWorker.toFixed(0)}, b=${this._timingStats.maxBuffer.toFixed(0)}, t=${this._timingStats.maxTile.toFixed(0)}`);
|
|
11206
11206
|
}
|
|
11207
11207
|
return N;
|
|
11208
11208
|
}
|
|
@@ -11357,18 +11357,18 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11357
11357
|
function(I, C, i) {
|
|
11358
11358
|
var w = I("./utils"), Z = I("./support"), l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
11359
11359
|
i.encode = function(j) {
|
|
11360
|
-
for (var D, g, V, J, N, L, d,
|
|
11361
|
-
P = z -
|
|
11362
|
-
return
|
|
11360
|
+
for (var D, g, V, J, N, L, d, n = [], W = 0, z = j.length, P = z, F = w.getTypeOf(j) !== "string"; W < j.length; )
|
|
11361
|
+
P = z - W, V = F ? (D = j[W++], g = W < z ? j[W++] : 0, W < z ? j[W++] : 0) : (D = j.charCodeAt(W++), g = W < z ? j.charCodeAt(W++) : 0, W < z ? j.charCodeAt(W++) : 0), J = D >> 2, N = (3 & D) << 4 | g >> 4, L = 1 < P ? (15 & g) << 2 | V >> 6 : 64, d = 2 < P ? 63 & V : 64, n.push(l.charAt(J) + l.charAt(N) + l.charAt(L) + l.charAt(d));
|
|
11362
|
+
return n.join("");
|
|
11363
11363
|
}, i.decode = function(j) {
|
|
11364
|
-
var D, g, V, J, N, L, d = 0,
|
|
11365
|
-
if (j.substr(0,
|
|
11364
|
+
var D, g, V, J, N, L, d = 0, n = 0, W = "data:";
|
|
11365
|
+
if (j.substr(0, W.length) === W)
|
|
11366
11366
|
throw new Error("Invalid base64 input, it looks like a data url.");
|
|
11367
11367
|
var z, P = 3 * (j = j.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
11368
11368
|
if (j.charAt(j.length - 1) === l.charAt(64) && P--, j.charAt(j.length - 2) === l.charAt(64) && P--, P % 1 != 0)
|
|
11369
11369
|
throw new Error("Invalid base64 input, bad content length.");
|
|
11370
11370
|
for (z = Z.uint8array ? new Uint8Array(0 | P) : new Array(0 | P); d < j.length; )
|
|
11371
|
-
D = l.indexOf(j.charAt(d++)) << 2 | (J = l.indexOf(j.charAt(d++))) >> 4, g = (15 & J) << 4 | (N = l.indexOf(j.charAt(d++))) >> 2, V = (3 & N) << 6 | (L = l.indexOf(j.charAt(d++))), z[
|
|
11371
|
+
D = l.indexOf(j.charAt(d++)) << 2 | (J = l.indexOf(j.charAt(d++))) >> 4, g = (15 & J) << 4 | (N = l.indexOf(j.charAt(d++))) >> 2, V = (3 & N) << 6 | (L = l.indexOf(j.charAt(d++))), z[n++] = D, N !== 64 && (z[n++] = g), L !== 64 && (z[n++] = V);
|
|
11372
11372
|
return z;
|
|
11373
11373
|
};
|
|
11374
11374
|
},
|
|
@@ -11510,12 +11510,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11510
11510
|
8: [
|
|
11511
11511
|
function(I, C, i) {
|
|
11512
11512
|
function w(N, L) {
|
|
11513
|
-
var d,
|
|
11513
|
+
var d, n = "";
|
|
11514
11514
|
for (d = 0; d < L; d++)
|
|
11515
|
-
|
|
11516
|
-
return
|
|
11515
|
+
n += String.fromCharCode(255 & N), N >>>= 8;
|
|
11516
|
+
return n;
|
|
11517
11517
|
}
|
|
11518
|
-
function Z(N, L, d,
|
|
11518
|
+
function Z(N, L, d, n, W, z) {
|
|
11519
11519
|
var P, F, T = N.file, e = N.compression, a = z !== D.utf8encode, o = l.transformTo("string", z(T.name)), E = l.transformTo("string", D.utf8encode(T.name)), u = T.comment, K = l.transformTo("string", z(u)), y = l.transformTo("string", D.utf8encode(u)), v = E.length !== T.name.length, O = y.length !== u.length, p = "", DA = "", q = "", QA = T.dir, AA = T.date, JA = {
|
|
11520
11520
|
crc32: 0,
|
|
11521
11521
|
compressedSize: 0,
|
|
@@ -11525,7 +11525,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11525
11525
|
var r = 0;
|
|
11526
11526
|
L && (r |= 8), a || !v && !O || (r |= 2048);
|
|
11527
11527
|
var x = 0, jA = 0;
|
|
11528
|
-
QA && (x |= 16),
|
|
11528
|
+
QA && (x |= 16), W === "UNIX" ? (jA = 798, x |= function(VA, eA) {
|
|
11529
11529
|
var fA = VA;
|
|
11530
11530
|
return VA || (fA = eA ? 16893 : 33204), (65535 & fA) << 16;
|
|
11531
11531
|
}(T.unixPermissions, QA)) : (jA = 20, x |= function(VA) {
|
|
@@ -11535,20 +11535,20 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11535
11535
|
return sA += `
|
|
11536
11536
|
\0`, sA += w(r, 2), sA += e.magic, sA += w(P, 2), sA += w(F, 2), sA += w(JA.crc32, 4), sA += w(JA.compressedSize, 4), sA += w(JA.uncompressedSize, 4), sA += w(o.length, 2), sA += w(p.length, 2), {
|
|
11537
11537
|
fileRecord: V.LOCAL_FILE_HEADER + sA + o + p,
|
|
11538
|
-
dirRecord: V.CENTRAL_FILE_HEADER + w(jA, 2) + sA + w(K.length, 2) + "\0\0\0\0" + w(x, 4) + w(
|
|
11538
|
+
dirRecord: V.CENTRAL_FILE_HEADER + w(jA, 2) + sA + w(K.length, 2) + "\0\0\0\0" + w(x, 4) + w(n, 4) + o + p + K
|
|
11539
11539
|
};
|
|
11540
11540
|
}
|
|
11541
11541
|
var l = I("../utils"), j = I("../stream/GenericWorker"), D = I("../utf8"), g = I("../crc32"), V = I("../signature");
|
|
11542
|
-
function J(N, L, d,
|
|
11543
|
-
j.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = L, this.zipPlatform = d, this.encodeFileName =
|
|
11542
|
+
function J(N, L, d, n) {
|
|
11543
|
+
j.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = L, this.zipPlatform = d, this.encodeFileName = n, this.streamFiles = N, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
11544
11544
|
}
|
|
11545
11545
|
l.inherits(J, j), J.prototype.push = function(N) {
|
|
11546
|
-
var L = N.meta.percent || 0, d = this.entriesCount,
|
|
11546
|
+
var L = N.meta.percent || 0, d = this.entriesCount, n = this._sources.length;
|
|
11547
11547
|
this.accumulate ? this.contentBuffer.push(N) : (this.bytesWritten += N.data.length, j.prototype.push.call(this, {
|
|
11548
11548
|
data: N.data,
|
|
11549
11549
|
meta: {
|
|
11550
11550
|
currentFile: this.currentFile,
|
|
11551
|
-
percent: d ? (L + 100 * (d -
|
|
11551
|
+
percent: d ? (L + 100 * (d - n - 1)) / d : 100
|
|
11552
11552
|
}
|
|
11553
11553
|
}));
|
|
11554
11554
|
}, J.prototype.openedSource = function(N) {
|
|
@@ -11569,8 +11569,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11569
11569
|
var L = this.streamFiles && !N.file.dir, d = Z(N, L, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
11570
11570
|
if (this.dirRecords.push(d.dirRecord), L)
|
|
11571
11571
|
this.push({
|
|
11572
|
-
data: function(
|
|
11573
|
-
return V.DATA_DESCRIPTOR + w(
|
|
11572
|
+
data: function(n) {
|
|
11573
|
+
return V.DATA_DESCRIPTOR + w(n.crc32, 4) + w(n.compressedSize, 4) + w(n.uncompressedSize, 4);
|
|
11574
11574
|
}(N),
|
|
11575
11575
|
meta: {
|
|
11576
11576
|
percent: 100
|
|
@@ -11593,12 +11593,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11593
11593
|
percent: 100
|
|
11594
11594
|
}
|
|
11595
11595
|
});
|
|
11596
|
-
var d = this.bytesWritten - N,
|
|
11596
|
+
var d = this.bytesWritten - N, n = function(W, z, P, F, T) {
|
|
11597
11597
|
var e = l.transformTo("string", T(F));
|
|
11598
|
-
return V.CENTRAL_DIRECTORY_END + "\0\0\0\0" + w(
|
|
11598
|
+
return V.CENTRAL_DIRECTORY_END + "\0\0\0\0" + w(W, 2) + w(W, 2) + w(z, 4) + w(P, 4) + w(e.length, 2) + e;
|
|
11599
11599
|
}(this.dirRecords.length, d, N, this.zipComment, this.encodeFileName);
|
|
11600
11600
|
this.push({
|
|
11601
|
-
data:
|
|
11601
|
+
data: n,
|
|
11602
11602
|
meta: {
|
|
11603
11603
|
percent: 100
|
|
11604
11604
|
}
|
|
@@ -11654,11 +11654,11 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11654
11654
|
if (!T)
|
|
11655
11655
|
throw new Error(F + " is not a valid compression method !");
|
|
11656
11656
|
return T;
|
|
11657
|
-
}(N.options.compression, j.compression), d = N.options.compressionOptions || j.compressionOptions || {},
|
|
11657
|
+
}(N.options.compression, j.compression), d = N.options.compressionOptions || j.compressionOptions || {}, n = N.dir, W = N.date;
|
|
11658
11658
|
N._compressWorker(L, d).withStreamInfo("file", {
|
|
11659
11659
|
name: J,
|
|
11660
|
-
dir:
|
|
11661
|
-
date:
|
|
11660
|
+
dir: n,
|
|
11661
|
+
date: W,
|
|
11662
11662
|
comment: N.comment || "",
|
|
11663
11663
|
unixPermissions: N.unixPermissions,
|
|
11664
11664
|
dosPermissions: N.dosPermissions
|
|
@@ -11707,8 +11707,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11707
11707
|
function V(J) {
|
|
11708
11708
|
return new Z.Promise(function(N, L) {
|
|
11709
11709
|
var d = J.decompressed.getContentWorker().pipe(new D());
|
|
11710
|
-
d.on("error", function(
|
|
11711
|
-
L(
|
|
11710
|
+
d.on("error", function(n) {
|
|
11711
|
+
L(n);
|
|
11712
11712
|
}).on("end", function() {
|
|
11713
11713
|
d.streamInfo.crc32 !== J.decompressed.crc32 ? L(new Error("Corrupted zip : CRC32 mismatch")) : N();
|
|
11714
11714
|
}).resume();
|
|
@@ -11723,19 +11723,19 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11723
11723
|
createFolders: false,
|
|
11724
11724
|
decodeFileName: l.utf8decode
|
|
11725
11725
|
}), g.isNode && g.isStream(J) ? Z.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : w.prepareContent("the loaded zip file", J, true, N.optimizedBinaryString, N.base64).then(function(d) {
|
|
11726
|
-
var
|
|
11727
|
-
return
|
|
11726
|
+
var n = new j(N);
|
|
11727
|
+
return n.load(d), n;
|
|
11728
11728
|
}).then(function(d) {
|
|
11729
|
-
var
|
|
11729
|
+
var n = [
|
|
11730
11730
|
Z.Promise.resolve(d)
|
|
11731
|
-
],
|
|
11731
|
+
], W = d.files;
|
|
11732
11732
|
if (N.checkCRC32)
|
|
11733
|
-
for (var z = 0; z <
|
|
11734
|
-
|
|
11735
|
-
return Z.Promise.all(
|
|
11733
|
+
for (var z = 0; z < W.length; z++)
|
|
11734
|
+
n.push(V(W[z]));
|
|
11735
|
+
return Z.Promise.all(n);
|
|
11736
11736
|
}).then(function(d) {
|
|
11737
|
-
for (var
|
|
11738
|
-
var P =
|
|
11737
|
+
for (var n = d.shift(), W = n.files, z = 0; z < W.length; z++) {
|
|
11738
|
+
var P = W[z], F = P.fileNameStr, T = w.resolve(P.fileNameStr);
|
|
11739
11739
|
L.file(T, P.decompressed, {
|
|
11740
11740
|
binary: true,
|
|
11741
11741
|
optimizedBinaryString: true,
|
|
@@ -11747,7 +11747,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11747
11747
|
createFolders: N.createFolders
|
|
11748
11748
|
}), P.dir || (L.file(T).unsafeOriginalName = F);
|
|
11749
11749
|
}
|
|
11750
|
-
return
|
|
11750
|
+
return n.zipComment.length && (L.comment = n.zipComment), L;
|
|
11751
11751
|
});
|
|
11752
11752
|
};
|
|
11753
11753
|
},
|
|
@@ -11845,7 +11845,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11845
11845
|
function(I, C, i) {
|
|
11846
11846
|
function w(T, e, a) {
|
|
11847
11847
|
var o, E = l.getTypeOf(e), u = l.extend(a || {}, g);
|
|
11848
|
-
u.date = u.date || /* @__PURE__ */ new Date(), u.compression !== null && (u.compression = u.compression.toUpperCase()), typeof u.unixPermissions == "string" && (u.unixPermissions = parseInt(u.unixPermissions, 8)), u.unixPermissions && 16384 & u.unixPermissions && (u.dir = true), u.dosPermissions && 16 & u.dosPermissions && (u.dir = true), u.dir && (T =
|
|
11848
|
+
u.date = u.date || /* @__PURE__ */ new Date(), u.compression !== null && (u.compression = u.compression.toUpperCase()), typeof u.unixPermissions == "string" && (u.unixPermissions = parseInt(u.unixPermissions, 8)), u.unixPermissions && 16384 & u.unixPermissions && (u.dir = true), u.dosPermissions && 16 & u.dosPermissions && (u.dir = true), u.dir && (T = W(T)), u.createFolders && (o = n(T)) && z.call(this, o, true);
|
|
11849
11849
|
var K = E === "string" && u.binary === false && u.base64 === false;
|
|
11850
11850
|
a && a.binary !== void 0 || (u.binary = !K), (e instanceof V && e.uncompressedSize === 0 || u.dir || !e || e.length === 0) && (u.base64 = false, u.binary = true, e = "", u.compression = "STORE", E = "string");
|
|
11851
11851
|
var y = null;
|
|
@@ -11853,14 +11853,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
11853
11853
|
var v = new J(T, y, u);
|
|
11854
11854
|
this.files[T] = v;
|
|
11855
11855
|
}
|
|
11856
|
-
var Z = I("./utf8"), l = I("./utils"), j = I("./stream/GenericWorker"), D = I("./stream/StreamHelper"), g = I("./defaults"), V = I("./compressedObject"), J = I("./zipObject"), N = I("./generate"), L = I("./nodejsUtils"), d = I("./nodejs/NodejsStreamInputAdapter"),
|
|
11856
|
+
var Z = I("./utf8"), l = I("./utils"), j = I("./stream/GenericWorker"), D = I("./stream/StreamHelper"), g = I("./defaults"), V = I("./compressedObject"), J = I("./zipObject"), N = I("./generate"), L = I("./nodejsUtils"), d = I("./nodejs/NodejsStreamInputAdapter"), n = function(T) {
|
|
11857
11857
|
T.slice(-1) === "/" && (T = T.substring(0, T.length - 1));
|
|
11858
11858
|
var e = T.lastIndexOf("/");
|
|
11859
11859
|
return 0 < e ? T.substring(0, e) : "";
|
|
11860
|
-
},
|
|
11860
|
+
}, W = function(T) {
|
|
11861
11861
|
return T.slice(-1) !== "/" && (T += "/"), T;
|
|
11862
11862
|
}, z = function(T, e) {
|
|
11863
|
-
return e = e !== void 0 ? e : g.createFolders, T =
|
|
11863
|
+
return e = e !== void 0 ? e : g.createFolders, T = W(T), this.files[T] || w.call(this, T, null, {
|
|
11864
11864
|
dir: true,
|
|
11865
11865
|
createFolders: e
|
|
11866
11866
|
}), this.files[T];
|
|
@@ -12328,12 +12328,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12328
12328
|
} catch {
|
|
12329
12329
|
}
|
|
12330
12330
|
function J(L, d) {
|
|
12331
|
-
return new g.Promise(function(
|
|
12331
|
+
return new g.Promise(function(n, W) {
|
|
12332
12332
|
var z = [], P = L._internalType, F = L._outputType, T = L._mimeType;
|
|
12333
12333
|
L.on("data", function(e, a) {
|
|
12334
12334
|
z.push(e), d && d(a);
|
|
12335
12335
|
}).on("error", function(e) {
|
|
12336
|
-
z = [],
|
|
12336
|
+
z = [], W(e);
|
|
12337
12337
|
}).on("end", function() {
|
|
12338
12338
|
try {
|
|
12339
12339
|
var e = function(a, o, E) {
|
|
@@ -12364,26 +12364,26 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12364
12364
|
throw new Error("concat : unsupported type '" + a + "'");
|
|
12365
12365
|
}
|
|
12366
12366
|
}(P, z), T);
|
|
12367
|
-
|
|
12367
|
+
n(e);
|
|
12368
12368
|
} catch (a) {
|
|
12369
|
-
|
|
12369
|
+
W(a);
|
|
12370
12370
|
}
|
|
12371
12371
|
z = [];
|
|
12372
12372
|
}).resume();
|
|
12373
12373
|
});
|
|
12374
12374
|
}
|
|
12375
|
-
function N(L, d,
|
|
12376
|
-
var
|
|
12375
|
+
function N(L, d, n) {
|
|
12376
|
+
var W = d;
|
|
12377
12377
|
switch (d) {
|
|
12378
12378
|
case "blob":
|
|
12379
12379
|
case "arraybuffer":
|
|
12380
|
-
|
|
12380
|
+
W = "uint8array";
|
|
12381
12381
|
break;
|
|
12382
12382
|
case "base64":
|
|
12383
|
-
|
|
12383
|
+
W = "string";
|
|
12384
12384
|
}
|
|
12385
12385
|
try {
|
|
12386
|
-
this._internalType =
|
|
12386
|
+
this._internalType = W, this._outputType = d, this._mimeType = n, w.checkSupport(W), this._worker = L.pipe(new Z(W)), L.lock();
|
|
12387
12387
|
} catch (z) {
|
|
12388
12388
|
this._worker = new l("error"), this._worker.error(z);
|
|
12389
12389
|
}
|
|
@@ -12393,11 +12393,11 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12393
12393
|
return J(this, L);
|
|
12394
12394
|
},
|
|
12395
12395
|
on: function(L, d) {
|
|
12396
|
-
var
|
|
12397
|
-
return L === "data" ? this._worker.on(L, function(
|
|
12398
|
-
d.call(
|
|
12396
|
+
var n = this;
|
|
12397
|
+
return L === "data" ? this._worker.on(L, function(W) {
|
|
12398
|
+
d.call(n, W.data, W.meta);
|
|
12399
12399
|
}) : this._worker.on(L, function() {
|
|
12400
|
-
w.delay(d, arguments,
|
|
12400
|
+
w.delay(d, arguments, n);
|
|
12401
12401
|
}), this;
|
|
12402
12402
|
},
|
|
12403
12403
|
resume: function() {
|
|
@@ -12469,27 +12469,27 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12469
12469
|
}
|
|
12470
12470
|
i.utf8encode = function(N) {
|
|
12471
12471
|
return Z.nodebuffer ? l.newBufferFrom(N, "utf-8") : function(L) {
|
|
12472
|
-
var d,
|
|
12472
|
+
var d, n, W, z, P, F = L.length, T = 0;
|
|
12473
12473
|
for (z = 0; z < F; z++)
|
|
12474
|
-
(64512 & (
|
|
12474
|
+
(64512 & (n = L.charCodeAt(z))) == 55296 && z + 1 < F && (64512 & (W = L.charCodeAt(z + 1))) == 56320 && (n = 65536 + (n - 55296 << 10) + (W - 56320), z++), T += n < 128 ? 1 : n < 2048 ? 2 : n < 65536 ? 3 : 4;
|
|
12475
12475
|
for (d = Z.uint8array ? new Uint8Array(T) : new Array(T), z = P = 0; P < T; z++)
|
|
12476
|
-
(64512 & (
|
|
12476
|
+
(64512 & (n = L.charCodeAt(z))) == 55296 && z + 1 < F && (64512 & (W = L.charCodeAt(z + 1))) == 56320 && (n = 65536 + (n - 55296 << 10) + (W - 56320), z++), n < 128 ? d[P++] = n : (n < 2048 ? d[P++] = 192 | n >>> 6 : (n < 65536 ? d[P++] = 224 | n >>> 12 : (d[P++] = 240 | n >>> 18, d[P++] = 128 | n >>> 12 & 63), d[P++] = 128 | n >>> 6 & 63), d[P++] = 128 | 63 & n);
|
|
12477
12477
|
return d;
|
|
12478
12478
|
}(N);
|
|
12479
12479
|
}, i.utf8decode = function(N) {
|
|
12480
12480
|
return Z.nodebuffer ? w.transformTo("nodebuffer", N).toString("utf-8") : function(L) {
|
|
12481
|
-
var d,
|
|
12482
|
-
for (d =
|
|
12483
|
-
if ((
|
|
12484
|
-
F[
|
|
12485
|
-
else if (4 < (z = D[
|
|
12486
|
-
F[
|
|
12481
|
+
var d, n, W, z, P = L.length, F = new Array(2 * P);
|
|
12482
|
+
for (d = n = 0; d < P; )
|
|
12483
|
+
if ((W = L[d++]) < 128)
|
|
12484
|
+
F[n++] = W;
|
|
12485
|
+
else if (4 < (z = D[W]))
|
|
12486
|
+
F[n++] = 65533, d += z - 1;
|
|
12487
12487
|
else {
|
|
12488
|
-
for (
|
|
12489
|
-
|
|
12490
|
-
1 < z ? F[
|
|
12488
|
+
for (W &= z === 2 ? 31 : z === 3 ? 15 : 7; 1 < z && d < P; )
|
|
12489
|
+
W = W << 6 | 63 & L[d++], z--;
|
|
12490
|
+
1 < z ? F[n++] = 65533 : W < 65536 ? F[n++] = W : (W -= 65536, F[n++] = 55296 | W >> 10 & 1023, F[n++] = 56320 | 1023 & W);
|
|
12491
12491
|
}
|
|
12492
|
-
return F.length !==
|
|
12492
|
+
return F.length !== n && (F.subarray ? F = F.subarray(0, n) : F.length = n), w.applyFromCharCode(F);
|
|
12493
12493
|
}(N = w.transformTo(Z.uint8array ? "uint8array" : "array", N));
|
|
12494
12494
|
}, w.inherits(V, j), V.prototype.processChunk = function(N) {
|
|
12495
12495
|
var L = w.transformTo(Z.uint8array ? "uint8array" : "array", N.data);
|
|
@@ -12501,14 +12501,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12501
12501
|
L = this.leftOver.concat(L);
|
|
12502
12502
|
this.leftOver = null;
|
|
12503
12503
|
}
|
|
12504
|
-
var
|
|
12504
|
+
var n = function(z, P) {
|
|
12505
12505
|
var F;
|
|
12506
12506
|
for ((P = P || z.length) > z.length && (P = z.length), F = P - 1; 0 <= F && (192 & z[F]) == 128; )
|
|
12507
12507
|
F--;
|
|
12508
12508
|
return F < 0 || F === 0 ? P : F + D[z[F]] > P ? F : P;
|
|
12509
|
-
}(L),
|
|
12510
|
-
|
|
12511
|
-
data: i.utf8decode(
|
|
12509
|
+
}(L), W = L;
|
|
12510
|
+
n !== L.length && (Z.uint8array ? (W = L.subarray(0, n), this.leftOver = L.subarray(n, L.length)) : (W = L.slice(0, n), this.leftOver = L.slice(n, L.length))), this.push({
|
|
12511
|
+
data: i.utf8decode(W),
|
|
12512
12512
|
meta: N.meta
|
|
12513
12513
|
});
|
|
12514
12514
|
}, V.prototype.flush = function() {
|
|
@@ -12536,41 +12536,41 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12536
12536
|
function D(d) {
|
|
12537
12537
|
return d;
|
|
12538
12538
|
}
|
|
12539
|
-
function g(d,
|
|
12540
|
-
for (var
|
|
12541
|
-
W
|
|
12542
|
-
return
|
|
12539
|
+
function g(d, n) {
|
|
12540
|
+
for (var W = 0; W < d.length; ++W)
|
|
12541
|
+
n[W] = 255 & d.charCodeAt(W);
|
|
12542
|
+
return n;
|
|
12543
12543
|
}
|
|
12544
|
-
I("setimmediate"), i.newBlob = function(d,
|
|
12544
|
+
I("setimmediate"), i.newBlob = function(d, n) {
|
|
12545
12545
|
i.checkSupport("blob");
|
|
12546
12546
|
try {
|
|
12547
12547
|
return new Blob([
|
|
12548
12548
|
d
|
|
12549
12549
|
], {
|
|
12550
|
-
type:
|
|
12550
|
+
type: n
|
|
12551
12551
|
});
|
|
12552
12552
|
} catch {
|
|
12553
12553
|
try {
|
|
12554
|
-
var
|
|
12555
|
-
return
|
|
12554
|
+
var W = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
12555
|
+
return W.append(d), W.getBlob(n);
|
|
12556
12556
|
} catch {
|
|
12557
12557
|
throw new Error("Bug : can't construct the Blob.");
|
|
12558
12558
|
}
|
|
12559
12559
|
}
|
|
12560
12560
|
};
|
|
12561
12561
|
var V = {
|
|
12562
|
-
stringifyByChunk: function(d,
|
|
12562
|
+
stringifyByChunk: function(d, n, W) {
|
|
12563
12563
|
var z = [], P = 0, F = d.length;
|
|
12564
|
-
if (F <=
|
|
12564
|
+
if (F <= W)
|
|
12565
12565
|
return String.fromCharCode.apply(null, d);
|
|
12566
12566
|
for (; P < F; )
|
|
12567
|
-
|
|
12567
|
+
n === "array" || n === "nodebuffer" ? z.push(String.fromCharCode.apply(null, d.slice(P, Math.min(P + W, F)))) : z.push(String.fromCharCode.apply(null, d.subarray(P, Math.min(P + W, F)))), P += W;
|
|
12568
12568
|
return z.join("");
|
|
12569
12569
|
},
|
|
12570
12570
|
stringifyByChar: function(d) {
|
|
12571
|
-
for (var
|
|
12572
|
-
|
|
12573
|
-
return
|
|
12571
|
+
for (var n = "", W = 0; W < d.length; W++)
|
|
12572
|
+
n += String.fromCharCode(d[W]);
|
|
12573
|
+
return n;
|
|
12574
12574
|
},
|
|
12575
12575
|
applyCanBeUsed: {
|
|
12576
12576
|
uint8array: function() {
|
|
@@ -12590,20 +12590,20 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12590
12590
|
}
|
|
12591
12591
|
};
|
|
12592
12592
|
function J(d) {
|
|
12593
|
-
var
|
|
12594
|
-
if (
|
|
12595
|
-
for (; 1 <
|
|
12593
|
+
var n = 65536, W = i.getTypeOf(d), z = true;
|
|
12594
|
+
if (W === "uint8array" ? z = V.applyCanBeUsed.uint8array : W === "nodebuffer" && (z = V.applyCanBeUsed.nodebuffer), z)
|
|
12595
|
+
for (; 1 < n; )
|
|
12596
12596
|
try {
|
|
12597
|
-
return V.stringifyByChunk(d,
|
|
12597
|
+
return V.stringifyByChunk(d, W, n);
|
|
12598
12598
|
} catch {
|
|
12599
|
-
|
|
12599
|
+
n = Math.floor(n / 2);
|
|
12600
12600
|
}
|
|
12601
12601
|
return V.stringifyByChar(d);
|
|
12602
12602
|
}
|
|
12603
|
-
function N(d,
|
|
12604
|
-
for (var
|
|
12605
|
-
W
|
|
12606
|
-
return
|
|
12603
|
+
function N(d, n) {
|
|
12604
|
+
for (var W = 0; W < d.length; W++)
|
|
12605
|
+
n[W] = d[W];
|
|
12606
|
+
return n;
|
|
12607
12607
|
}
|
|
12608
12608
|
i.applyFromCharCode = J;
|
|
12609
12609
|
var L = {};
|
|
@@ -12671,44 +12671,44 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12671
12671
|
return N(d, new Uint8Array(d.length));
|
|
12672
12672
|
},
|
|
12673
12673
|
nodebuffer: D
|
|
12674
|
-
}, i.transformTo = function(d,
|
|
12675
|
-
if (
|
|
12676
|
-
return
|
|
12674
|
+
}, i.transformTo = function(d, n) {
|
|
12675
|
+
if (n = n || "", !d)
|
|
12676
|
+
return n;
|
|
12677
12677
|
i.checkSupport(d);
|
|
12678
|
-
var
|
|
12679
|
-
return L[
|
|
12678
|
+
var W = i.getTypeOf(n);
|
|
12679
|
+
return L[W][d](n);
|
|
12680
12680
|
}, i.resolve = function(d) {
|
|
12681
|
-
for (var
|
|
12682
|
-
var P =
|
|
12683
|
-
P === "." || P === "" && z !== 0 && z !==
|
|
12681
|
+
for (var n = d.split("/"), W = [], z = 0; z < n.length; z++) {
|
|
12682
|
+
var P = n[z];
|
|
12683
|
+
P === "." || P === "" && z !== 0 && z !== n.length - 1 || (P === ".." ? W.pop() : W.push(P));
|
|
12684
12684
|
}
|
|
12685
|
-
return
|
|
12685
|
+
return W.join("/");
|
|
12686
12686
|
}, i.getTypeOf = function(d) {
|
|
12687
12687
|
return typeof d == "string" ? "string" : Object.prototype.toString.call(d) === "[object Array]" ? "array" : w.nodebuffer && l.isBuffer(d) ? "nodebuffer" : w.uint8array && d instanceof Uint8Array ? "uint8array" : w.arraybuffer && d instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
12688
12688
|
}, i.checkSupport = function(d) {
|
|
12689
12689
|
if (!w[d.toLowerCase()])
|
|
12690
12690
|
throw new Error(d + " is not supported by this platform");
|
|
12691
12691
|
}, i.MAX_VALUE_16BITS = 65535, i.MAX_VALUE_32BITS = -1, i.pretty = function(d) {
|
|
12692
|
-
var
|
|
12693
|
-
for (
|
|
12694
|
-
z += "\\x" + ((
|
|
12692
|
+
var n, W, z = "";
|
|
12693
|
+
for (W = 0; W < (d || "").length; W++)
|
|
12694
|
+
z += "\\x" + ((n = d.charCodeAt(W)) < 16 ? "0" : "") + n.toString(16).toUpperCase();
|
|
12695
12695
|
return z;
|
|
12696
|
-
}, i.delay = function(d,
|
|
12696
|
+
}, i.delay = function(d, n, W) {
|
|
12697
12697
|
setImmediate(function() {
|
|
12698
|
-
d.apply(
|
|
12698
|
+
d.apply(W || null, n || []);
|
|
12699
12699
|
});
|
|
12700
|
-
}, i.inherits = function(d,
|
|
12701
|
-
function
|
|
12700
|
+
}, i.inherits = function(d, n) {
|
|
12701
|
+
function W() {
|
|
12702
12702
|
}
|
|
12703
|
-
|
|
12703
|
+
W.prototype = n.prototype, d.prototype = new W();
|
|
12704
12704
|
}, i.extend = function() {
|
|
12705
|
-
var d,
|
|
12705
|
+
var d, n, W = {};
|
|
12706
12706
|
for (d = 0; d < arguments.length; d++)
|
|
12707
|
-
for (
|
|
12708
|
-
Object.prototype.hasOwnProperty.call(arguments[d],
|
|
12709
|
-
return
|
|
12710
|
-
}, i.prepareContent = function(d,
|
|
12711
|
-
return j.Promise.resolve(
|
|
12707
|
+
for (n in arguments[d])
|
|
12708
|
+
Object.prototype.hasOwnProperty.call(arguments[d], n) && W[n] === void 0 && (W[n] = arguments[d][n]);
|
|
12709
|
+
return W;
|
|
12710
|
+
}, i.prepareContent = function(d, n, W, z, P) {
|
|
12711
|
+
return j.Promise.resolve(n).then(function(F) {
|
|
12712
12712
|
return w.blob && (F instanceof Blob || [
|
|
12713
12713
|
"[object File]",
|
|
12714
12714
|
"[object Blob]"
|
|
@@ -12722,7 +12722,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12722
12722
|
}) : F;
|
|
12723
12723
|
}).then(function(F) {
|
|
12724
12724
|
var T = i.getTypeOf(F);
|
|
12725
|
-
return T ? (T === "arraybuffer" ? F = i.transformTo("uint8array", F) : T === "string" && (P ? F = Z.decode(F) :
|
|
12725
|
+
return T ? (T === "arraybuffer" ? F = i.transformTo("uint8array", F) : T === "string" && (P ? F = Z.decode(F) : W && z !== true && (F = function(e) {
|
|
12726
12726
|
return g(e, w.uint8array ? new Uint8Array(e.length) : new Array(e.length));
|
|
12727
12727
|
}(F))), F) : j.Promise.reject(new Error("Can't read the data of '" + d + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
12728
12728
|
});
|
|
@@ -12842,10 +12842,10 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12842
12842
|
var L, d;
|
|
12843
12843
|
if (N.skip(22), this.fileNameLength = N.readInt(2), d = N.readInt(2), this.fileName = N.readData(this.fileNameLength), N.skip(d), this.compressedSize === -1 || this.uncompressedSize === -1)
|
|
12844
12844
|
throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
12845
|
-
if ((L = function(
|
|
12846
|
-
for (var
|
|
12847
|
-
if (Object.prototype.hasOwnProperty.call(g,
|
|
12848
|
-
return g[
|
|
12845
|
+
if ((L = function(n) {
|
|
12846
|
+
for (var W in g)
|
|
12847
|
+
if (Object.prototype.hasOwnProperty.call(g, W) && g[W].magic === n)
|
|
12848
|
+
return g[W];
|
|
12849
12849
|
return null;
|
|
12850
12850
|
}(this.compressionMethod)) === null)
|
|
12851
12851
|
throw new Error("Corrupted zip : compression " + Z.pretty(this.compressionMethod) + " unknown (inner file : " + Z.transformTo("string", this.fileName) + ")");
|
|
@@ -12870,14 +12870,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12870
12870
|
}
|
|
12871
12871
|
},
|
|
12872
12872
|
readExtraFields: function(N) {
|
|
12873
|
-
var L, d,
|
|
12874
|
-
for (this.extraFields || (this.extraFields = {}); N.index + 4 <
|
|
12875
|
-
L = N.readInt(2), d = N.readInt(2),
|
|
12873
|
+
var L, d, n, W = N.index + this.extraFieldsLength;
|
|
12874
|
+
for (this.extraFields || (this.extraFields = {}); N.index + 4 < W; )
|
|
12875
|
+
L = N.readInt(2), d = N.readInt(2), n = N.readData(d), this.extraFields[L] = {
|
|
12876
12876
|
id: L,
|
|
12877
12877
|
length: d,
|
|
12878
|
-
value:
|
|
12878
|
+
value: n
|
|
12879
12879
|
};
|
|
12880
|
-
N.setIndex(
|
|
12880
|
+
N.setIndex(W);
|
|
12881
12881
|
},
|
|
12882
12882
|
handleUTF8: function() {
|
|
12883
12883
|
var N = V.uint8array ? "uint8array" : "array";
|
|
@@ -12891,12 +12891,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12891
12891
|
var d = Z.transformTo(N, this.fileName);
|
|
12892
12892
|
this.fileNameStr = this.loadOptions.decodeFileName(d);
|
|
12893
12893
|
}
|
|
12894
|
-
var
|
|
12895
|
-
if (
|
|
12896
|
-
this.fileCommentStr =
|
|
12894
|
+
var n = this.findExtraFieldUnicodeComment();
|
|
12895
|
+
if (n !== null)
|
|
12896
|
+
this.fileCommentStr = n;
|
|
12897
12897
|
else {
|
|
12898
|
-
var
|
|
12899
|
-
this.fileCommentStr = this.loadOptions.decodeFileName(
|
|
12898
|
+
var W = Z.transformTo(N, this.fileComment);
|
|
12899
|
+
this.fileCommentStr = this.loadOptions.decodeFileName(W);
|
|
12900
12900
|
}
|
|
12901
12901
|
}
|
|
12902
12902
|
},
|
|
@@ -12930,27 +12930,27 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12930
12930
|
],
|
|
12931
12931
|
35: [
|
|
12932
12932
|
function(I, C, i) {
|
|
12933
|
-
function w(L, d,
|
|
12934
|
-
this.name = L, this.dir =
|
|
12935
|
-
compression:
|
|
12936
|
-
compressionOptions:
|
|
12933
|
+
function w(L, d, n) {
|
|
12934
|
+
this.name = L, this.dir = n.dir, this.date = n.date, this.comment = n.comment, this.unixPermissions = n.unixPermissions, this.dosPermissions = n.dosPermissions, this._data = d, this._dataBinary = n.binary, this.options = {
|
|
12935
|
+
compression: n.compression,
|
|
12936
|
+
compressionOptions: n.compressionOptions
|
|
12937
12937
|
};
|
|
12938
12938
|
}
|
|
12939
12939
|
var Z = I("./stream/StreamHelper"), l = I("./stream/DataWorker"), j = I("./utf8"), D = I("./compressedObject"), g = I("./stream/GenericWorker");
|
|
12940
12940
|
w.prototype = {
|
|
12941
12941
|
internalStream: function(L) {
|
|
12942
|
-
var d = null,
|
|
12942
|
+
var d = null, n = "string";
|
|
12943
12943
|
try {
|
|
12944
12944
|
if (!L)
|
|
12945
12945
|
throw new Error("No output type specified.");
|
|
12946
|
-
var
|
|
12947
|
-
|
|
12946
|
+
var W = (n = L.toLowerCase()) === "string" || n === "text";
|
|
12947
|
+
n !== "binarystring" && n !== "text" || (n = "string"), d = this._decompressWorker();
|
|
12948
12948
|
var z = !this._dataBinary;
|
|
12949
|
-
z && !
|
|
12949
|
+
z && !W && (d = d.pipe(new j.Utf8EncodeWorker())), !z && W && (d = d.pipe(new j.Utf8DecodeWorker()));
|
|
12950
12950
|
} catch (P) {
|
|
12951
12951
|
(d = new g("error")).error(P);
|
|
12952
12952
|
}
|
|
12953
|
-
return new Z(d,
|
|
12953
|
+
return new Z(d, n, "");
|
|
12954
12954
|
},
|
|
12955
12955
|
async: function(L, d) {
|
|
12956
12956
|
return this.internalStream(L).accumulate(d);
|
|
@@ -12961,8 +12961,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
12961
12961
|
_compressWorker: function(L, d) {
|
|
12962
12962
|
if (this._data instanceof D && this._data.compression.magic === L.magic)
|
|
12963
12963
|
return this._data.getCompressedWorker();
|
|
12964
|
-
var
|
|
12965
|
-
return this._dataBinary || (
|
|
12964
|
+
var n = this._decompressWorker();
|
|
12965
|
+
return this._dataBinary || (n = n.pipe(new j.Utf8EncodeWorker())), D.createWorkerFrom(n, L, d);
|
|
12966
12966
|
},
|
|
12967
12967
|
_decompressWorker: function() {
|
|
12968
12968
|
return this._data instanceof D ? this._data.getContentWorker() : this._data instanceof g ? this._data : new l(this._data);
|
|
@@ -13016,12 +13016,12 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13016
13016
|
}
|
|
13017
13017
|
var N = [];
|
|
13018
13018
|
function L() {
|
|
13019
|
-
var d,
|
|
13019
|
+
var d, n;
|
|
13020
13020
|
l = true;
|
|
13021
|
-
for (var
|
|
13022
|
-
for (
|
|
13023
|
-
|
|
13024
|
-
|
|
13021
|
+
for (var W = N.length; W; ) {
|
|
13022
|
+
for (n = N, N = [], d = -1; ++d < W; )
|
|
13023
|
+
n[d]();
|
|
13024
|
+
W = N.length;
|
|
13025
13025
|
}
|
|
13026
13026
|
l = false;
|
|
13027
13027
|
}
|
|
@@ -13044,114 +13044,114 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13044
13044
|
], g = [
|
|
13045
13045
|
"PENDING"
|
|
13046
13046
|
];
|
|
13047
|
-
function V(
|
|
13048
|
-
if (typeof
|
|
13047
|
+
function V(W) {
|
|
13048
|
+
if (typeof W != "function")
|
|
13049
13049
|
throw new TypeError("resolver must be a function");
|
|
13050
|
-
this.state = g, this.queue = [], this.outcome = void 0,
|
|
13050
|
+
this.state = g, this.queue = [], this.outcome = void 0, W !== Z && d(this, W);
|
|
13051
13051
|
}
|
|
13052
|
-
function J(
|
|
13053
|
-
this.promise =
|
|
13052
|
+
function J(W, z, P) {
|
|
13053
|
+
this.promise = W, typeof z == "function" && (this.onFulfilled = z, this.callFulfilled = this.otherCallFulfilled), typeof P == "function" && (this.onRejected = P, this.callRejected = this.otherCallRejected);
|
|
13054
13054
|
}
|
|
13055
|
-
function N(
|
|
13055
|
+
function N(W, z, P) {
|
|
13056
13056
|
w(function() {
|
|
13057
13057
|
var F;
|
|
13058
13058
|
try {
|
|
13059
13059
|
F = z(P);
|
|
13060
13060
|
} catch (T) {
|
|
13061
|
-
return l.reject(
|
|
13061
|
+
return l.reject(W, T);
|
|
13062
13062
|
}
|
|
13063
|
-
F ===
|
|
13063
|
+
F === W ? l.reject(W, new TypeError("Cannot resolve promise with itself")) : l.resolve(W, F);
|
|
13064
13064
|
});
|
|
13065
13065
|
}
|
|
13066
|
-
function L(
|
|
13067
|
-
var z =
|
|
13068
|
-
if (
|
|
13066
|
+
function L(W) {
|
|
13067
|
+
var z = W && W.then;
|
|
13068
|
+
if (W && (typeof W == "object" || typeof W == "function") && typeof z == "function")
|
|
13069
13069
|
return function() {
|
|
13070
|
-
z.apply(
|
|
13070
|
+
z.apply(W, arguments);
|
|
13071
13071
|
};
|
|
13072
13072
|
}
|
|
13073
|
-
function d(
|
|
13073
|
+
function d(W, z) {
|
|
13074
13074
|
var P = false;
|
|
13075
13075
|
function F(a) {
|
|
13076
|
-
P || (P = true, l.reject(
|
|
13076
|
+
P || (P = true, l.reject(W, a));
|
|
13077
13077
|
}
|
|
13078
13078
|
function T(a) {
|
|
13079
|
-
P || (P = true, l.resolve(
|
|
13079
|
+
P || (P = true, l.resolve(W, a));
|
|
13080
13080
|
}
|
|
13081
|
-
var e =
|
|
13081
|
+
var e = n(function() {
|
|
13082
13082
|
z(T, F);
|
|
13083
13083
|
});
|
|
13084
13084
|
e.status === "error" && F(e.value);
|
|
13085
13085
|
}
|
|
13086
|
-
function W
|
|
13086
|
+
function n(W, z) {
|
|
13087
13087
|
var P = {};
|
|
13088
13088
|
try {
|
|
13089
|
-
P.value =
|
|
13089
|
+
P.value = W(z), P.status = "success";
|
|
13090
13090
|
} catch (F) {
|
|
13091
13091
|
P.status = "error", P.value = F;
|
|
13092
13092
|
}
|
|
13093
13093
|
return P;
|
|
13094
13094
|
}
|
|
13095
|
-
(C.exports = V).prototype.finally = function(
|
|
13096
|
-
if (typeof
|
|
13095
|
+
(C.exports = V).prototype.finally = function(W) {
|
|
13096
|
+
if (typeof W != "function")
|
|
13097
13097
|
return this;
|
|
13098
13098
|
var z = this.constructor;
|
|
13099
13099
|
return this.then(function(P) {
|
|
13100
|
-
return z.resolve(
|
|
13100
|
+
return z.resolve(W()).then(function() {
|
|
13101
13101
|
return P;
|
|
13102
13102
|
});
|
|
13103
13103
|
}, function(P) {
|
|
13104
|
-
return z.resolve(
|
|
13104
|
+
return z.resolve(W()).then(function() {
|
|
13105
13105
|
throw P;
|
|
13106
13106
|
});
|
|
13107
13107
|
});
|
|
13108
|
-
}, V.prototype.catch = function(
|
|
13109
|
-
return this.then(null,
|
|
13110
|
-
}, V.prototype.then = function(
|
|
13111
|
-
if (typeof
|
|
13108
|
+
}, V.prototype.catch = function(W) {
|
|
13109
|
+
return this.then(null, W);
|
|
13110
|
+
}, V.prototype.then = function(W, z) {
|
|
13111
|
+
if (typeof W != "function" && this.state === D || typeof z != "function" && this.state === j)
|
|
13112
13112
|
return this;
|
|
13113
13113
|
var P = new this.constructor(Z);
|
|
13114
|
-
return this.state !== g ? N(P, this.state === D ?
|
|
13115
|
-
}, J.prototype.callFulfilled = function(
|
|
13116
|
-
l.resolve(this.promise,
|
|
13117
|
-
}, J.prototype.otherCallFulfilled = function(
|
|
13118
|
-
N(this.promise, this.onFulfilled,
|
|
13119
|
-
}, J.prototype.callRejected = function(
|
|
13120
|
-
l.reject(this.promise,
|
|
13121
|
-
}, J.prototype.otherCallRejected = function(
|
|
13122
|
-
N(this.promise, this.onRejected,
|
|
13123
|
-
}, l.resolve = function(
|
|
13124
|
-
var P =
|
|
13114
|
+
return this.state !== g ? N(P, this.state === D ? W : z, this.outcome) : this.queue.push(new J(P, W, z)), P;
|
|
13115
|
+
}, J.prototype.callFulfilled = function(W) {
|
|
13116
|
+
l.resolve(this.promise, W);
|
|
13117
|
+
}, J.prototype.otherCallFulfilled = function(W) {
|
|
13118
|
+
N(this.promise, this.onFulfilled, W);
|
|
13119
|
+
}, J.prototype.callRejected = function(W) {
|
|
13120
|
+
l.reject(this.promise, W);
|
|
13121
|
+
}, J.prototype.otherCallRejected = function(W) {
|
|
13122
|
+
N(this.promise, this.onRejected, W);
|
|
13123
|
+
}, l.resolve = function(W, z) {
|
|
13124
|
+
var P = n(L, z);
|
|
13125
13125
|
if (P.status === "error")
|
|
13126
|
-
return l.reject(
|
|
13126
|
+
return l.reject(W, P.value);
|
|
13127
13127
|
var F = P.value;
|
|
13128
13128
|
if (F)
|
|
13129
|
-
d(
|
|
13129
|
+
d(W, F);
|
|
13130
13130
|
else {
|
|
13131
|
-
|
|
13132
|
-
for (var T = -1, e =
|
|
13133
|
-
|
|
13131
|
+
W.state = D, W.outcome = z;
|
|
13132
|
+
for (var T = -1, e = W.queue.length; ++T < e; )
|
|
13133
|
+
W.queue[T].callFulfilled(z);
|
|
13134
13134
|
}
|
|
13135
|
-
return
|
|
13136
|
-
}, l.reject = function(
|
|
13137
|
-
|
|
13138
|
-
for (var P = -1, F =
|
|
13139
|
-
|
|
13140
|
-
return
|
|
13141
|
-
}, V.resolve = function(
|
|
13142
|
-
return
|
|
13143
|
-
}, V.reject = function(
|
|
13135
|
+
return W;
|
|
13136
|
+
}, l.reject = function(W, z) {
|
|
13137
|
+
W.state = j, W.outcome = z;
|
|
13138
|
+
for (var P = -1, F = W.queue.length; ++P < F; )
|
|
13139
|
+
W.queue[P].callRejected(z);
|
|
13140
|
+
return W;
|
|
13141
|
+
}, V.resolve = function(W) {
|
|
13142
|
+
return W instanceof this ? W : l.resolve(new this(Z), W);
|
|
13143
|
+
}, V.reject = function(W) {
|
|
13144
13144
|
var z = new this(Z);
|
|
13145
|
-
return l.reject(z,
|
|
13146
|
-
}, V.all = function(
|
|
13145
|
+
return l.reject(z, W);
|
|
13146
|
+
}, V.all = function(W) {
|
|
13147
13147
|
var z = this;
|
|
13148
|
-
if (Object.prototype.toString.call(
|
|
13148
|
+
if (Object.prototype.toString.call(W) !== "[object Array]")
|
|
13149
13149
|
return this.reject(new TypeError("must be an array"));
|
|
13150
|
-
var P =
|
|
13150
|
+
var P = W.length, F = false;
|
|
13151
13151
|
if (!P)
|
|
13152
13152
|
return this.resolve([]);
|
|
13153
13153
|
for (var T = new Array(P), e = 0, a = -1, o = new this(Z); ++a < P; )
|
|
13154
|
-
E(
|
|
13154
|
+
E(W[a], a);
|
|
13155
13155
|
return o;
|
|
13156
13156
|
function E(u, K) {
|
|
13157
13157
|
z.resolve(u).then(function(y) {
|
|
@@ -13160,15 +13160,15 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13160
13160
|
F || (F = true, l.reject(o, y));
|
|
13161
13161
|
});
|
|
13162
13162
|
}
|
|
13163
|
-
}, V.race = function(
|
|
13163
|
+
}, V.race = function(W) {
|
|
13164
13164
|
var z = this;
|
|
13165
|
-
if (Object.prototype.toString.call(
|
|
13165
|
+
if (Object.prototype.toString.call(W) !== "[object Array]")
|
|
13166
13166
|
return this.reject(new TypeError("must be an array"));
|
|
13167
|
-
var P =
|
|
13167
|
+
var P = W.length, F = false;
|
|
13168
13168
|
if (!P)
|
|
13169
13169
|
return this.resolve([]);
|
|
13170
13170
|
for (var T = -1, e = new this(Z); ++T < P; )
|
|
13171
|
-
a =
|
|
13171
|
+
a = W[T], z.resolve(a).then(function(o) {
|
|
13172
13172
|
F || (F = true, l.resolve(e, o));
|
|
13173
13173
|
}, function(o) {
|
|
13174
13174
|
F || (F = true, l.reject(e, o));
|
|
@@ -13196,9 +13196,9 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13196
13196
|
39: [
|
|
13197
13197
|
function(I, C, i) {
|
|
13198
13198
|
var w = I("./zlib/deflate"), Z = I("./utils/common"), l = I("./utils/strings"), j = I("./zlib/messages"), D = I("./zlib/zstream"), g = Object.prototype.toString, V = 0, J = -1, N = 0, L = 8;
|
|
13199
|
-
function d(
|
|
13199
|
+
function d(W) {
|
|
13200
13200
|
if (!(this instanceof d))
|
|
13201
|
-
return new d(
|
|
13201
|
+
return new d(W);
|
|
13202
13202
|
this.options = Z.assign({
|
|
13203
13203
|
level: J,
|
|
13204
13204
|
method: L,
|
|
@@ -13207,7 +13207,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13207
13207
|
memLevel: 8,
|
|
13208
13208
|
strategy: N,
|
|
13209
13209
|
to: ""
|
|
13210
|
-
},
|
|
13210
|
+
}, W || {});
|
|
13211
13211
|
var z = this.options;
|
|
13212
13212
|
z.raw && 0 < z.windowBits ? z.windowBits = -z.windowBits : z.gzip && 0 < z.windowBits && z.windowBits < 16 && (z.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new D(), this.strm.avail_out = 0;
|
|
13213
13213
|
var P = w.deflateInit2(this.strm, z.level, z.method, z.windowBits, z.memLevel, z.strategy);
|
|
@@ -13220,31 +13220,31 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13220
13220
|
this._dict_set = true;
|
|
13221
13221
|
}
|
|
13222
13222
|
}
|
|
13223
|
-
function W
|
|
13223
|
+
function n(W, z) {
|
|
13224
13224
|
var P = new d(z);
|
|
13225
|
-
if (P.push(
|
|
13225
|
+
if (P.push(W, true), P.err)
|
|
13226
13226
|
throw P.msg || j[P.err];
|
|
13227
13227
|
return P.result;
|
|
13228
13228
|
}
|
|
13229
|
-
d.prototype.push = function(
|
|
13229
|
+
d.prototype.push = function(W, z) {
|
|
13230
13230
|
var P, F, T = this.strm, e = this.options.chunkSize;
|
|
13231
13231
|
if (this.ended)
|
|
13232
13232
|
return false;
|
|
13233
|
-
F = z === ~~z ? z : z === true ? 4 : 0, typeof
|
|
13233
|
+
F = z === ~~z ? z : z === true ? 4 : 0, typeof W == "string" ? T.input = l.string2buf(W) : g.call(W) === "[object ArrayBuffer]" ? T.input = new Uint8Array(W) : T.input = W, T.next_in = 0, T.avail_in = T.input.length;
|
|
13234
13234
|
do {
|
|
13235
13235
|
if (T.avail_out === 0 && (T.output = new Z.Buf8(e), T.next_out = 0, T.avail_out = e), (P = w.deflate(T, F)) !== 1 && P !== V)
|
|
13236
13236
|
return this.onEnd(P), !(this.ended = true);
|
|
13237
13237
|
T.avail_out !== 0 && (T.avail_in !== 0 || F !== 4 && F !== 2) || (this.options.to === "string" ? this.onData(l.buf2binstring(Z.shrinkBuf(T.output, T.next_out))) : this.onData(Z.shrinkBuf(T.output, T.next_out)));
|
|
13238
13238
|
} while ((0 < T.avail_in || T.avail_out === 0) && P !== 1);
|
|
13239
13239
|
return F === 4 ? (P = w.deflateEnd(this.strm), this.onEnd(P), this.ended = true, P === V) : F !== 2 || (this.onEnd(V), !(T.avail_out = 0));
|
|
13240
|
-
}, d.prototype.onData = function(
|
|
13241
|
-
this.chunks.push(
|
|
13242
|
-
}, d.prototype.onEnd = function(
|
|
13243
|
-
|
|
13244
|
-
}, i.Deflate = d, i.deflate =
|
|
13245
|
-
return (z = z || {}).raw = true, W
|
|
13246
|
-
}, i.gzip = function(
|
|
13247
|
-
return (z = z || {}).gzip = true, W
|
|
13240
|
+
}, d.prototype.onData = function(W) {
|
|
13241
|
+
this.chunks.push(W);
|
|
13242
|
+
}, d.prototype.onEnd = function(W) {
|
|
13243
|
+
W === V && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = Z.flattenChunks(this.chunks)), this.chunks = [], this.err = W, this.msg = this.strm.msg;
|
|
13244
|
+
}, i.Deflate = d, i.deflate = n, i.deflateRaw = function(W, z) {
|
|
13245
|
+
return (z = z || {}).raw = true, n(W, z);
|
|
13246
|
+
}, i.gzip = function(W, z) {
|
|
13247
|
+
return (z = z || {}).gzip = true, n(W, z);
|
|
13248
13248
|
};
|
|
13249
13249
|
},
|
|
13250
13250
|
{
|
|
@@ -13266,36 +13266,36 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13266
13266
|
windowBits: 0,
|
|
13267
13267
|
to: ""
|
|
13268
13268
|
}, d || {});
|
|
13269
|
-
var
|
|
13270
|
-
|
|
13271
|
-
var
|
|
13272
|
-
if (
|
|
13273
|
-
throw new Error(D[
|
|
13269
|
+
var n = this.options;
|
|
13270
|
+
n.raw && 0 <= n.windowBits && n.windowBits < 16 && (n.windowBits = -n.windowBits, n.windowBits === 0 && (n.windowBits = -15)), !(0 <= n.windowBits && n.windowBits < 16) || d && d.windowBits || (n.windowBits += 32), 15 < n.windowBits && n.windowBits < 48 && !(15 & n.windowBits) && (n.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new g(), this.strm.avail_out = 0;
|
|
13271
|
+
var W = w.inflateInit2(this.strm, n.windowBits);
|
|
13272
|
+
if (W !== j.Z_OK)
|
|
13273
|
+
throw new Error(D[W]);
|
|
13274
13274
|
this.header = new V(), w.inflateGetHeader(this.strm, this.header);
|
|
13275
13275
|
}
|
|
13276
|
-
function L(d,
|
|
13277
|
-
var
|
|
13278
|
-
if (
|
|
13279
|
-
throw
|
|
13280
|
-
return
|
|
13276
|
+
function L(d, n) {
|
|
13277
|
+
var W = new N(n);
|
|
13278
|
+
if (W.push(d, true), W.err)
|
|
13279
|
+
throw W.msg || D[W.err];
|
|
13280
|
+
return W.result;
|
|
13281
13281
|
}
|
|
13282
|
-
N.prototype.push = function(d,
|
|
13283
|
-
var
|
|
13282
|
+
N.prototype.push = function(d, n) {
|
|
13283
|
+
var W, z, P, F, T, e, a = this.strm, o = this.options.chunkSize, E = this.options.dictionary, u = false;
|
|
13284
13284
|
if (this.ended)
|
|
13285
13285
|
return false;
|
|
13286
|
-
z =
|
|
13286
|
+
z = n === ~~n ? n : n === true ? j.Z_FINISH : j.Z_NO_FLUSH, typeof d == "string" ? a.input = l.binstring2buf(d) : J.call(d) === "[object ArrayBuffer]" ? a.input = new Uint8Array(d) : a.input = d, a.next_in = 0, a.avail_in = a.input.length;
|
|
13287
13287
|
do {
|
|
13288
|
-
if (a.avail_out === 0 && (a.output = new Z.Buf8(o), a.next_out = 0, a.avail_out = o), (
|
|
13289
|
-
return this.onEnd(
|
|
13290
|
-
a.next_out && (a.avail_out !== 0 &&
|
|
13291
|
-
} while ((0 < a.avail_in || a.avail_out === 0) &&
|
|
13292
|
-
return
|
|
13288
|
+
if (a.avail_out === 0 && (a.output = new Z.Buf8(o), a.next_out = 0, a.avail_out = o), (W = w.inflate(a, j.Z_NO_FLUSH)) === j.Z_NEED_DICT && E && (e = typeof E == "string" ? l.string2buf(E) : J.call(E) === "[object ArrayBuffer]" ? new Uint8Array(E) : E, W = w.inflateSetDictionary(this.strm, e)), W === j.Z_BUF_ERROR && u === true && (W = j.Z_OK, u = false), W !== j.Z_STREAM_END && W !== j.Z_OK)
|
|
13289
|
+
return this.onEnd(W), !(this.ended = true);
|
|
13290
|
+
a.next_out && (a.avail_out !== 0 && W !== j.Z_STREAM_END && (a.avail_in !== 0 || z !== j.Z_FINISH && z !== j.Z_SYNC_FLUSH) || (this.options.to === "string" ? (P = l.utf8border(a.output, a.next_out), F = a.next_out - P, T = l.buf2string(a.output, P), a.next_out = F, a.avail_out = o - F, F && Z.arraySet(a.output, a.output, P, F, 0), this.onData(T)) : this.onData(Z.shrinkBuf(a.output, a.next_out)))), a.avail_in === 0 && a.avail_out === 0 && (u = true);
|
|
13291
|
+
} while ((0 < a.avail_in || a.avail_out === 0) && W !== j.Z_STREAM_END);
|
|
13292
|
+
return W === j.Z_STREAM_END && (z = j.Z_FINISH), z === j.Z_FINISH ? (W = w.inflateEnd(this.strm), this.onEnd(W), this.ended = true, W === j.Z_OK) : z !== j.Z_SYNC_FLUSH || (this.onEnd(j.Z_OK), !(a.avail_out = 0));
|
|
13293
13293
|
}, N.prototype.onData = function(d) {
|
|
13294
13294
|
this.chunks.push(d);
|
|
13295
13295
|
}, N.prototype.onEnd = function(d) {
|
|
13296
13296
|
d === j.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = Z.flattenChunks(this.chunks)), this.chunks = [], this.err = d, this.msg = this.strm.msg;
|
|
13297
|
-
}, i.Inflate = N, i.inflate = L, i.inflateRaw = function(d,
|
|
13298
|
-
return (
|
|
13297
|
+
}, i.Inflate = N, i.inflate = L, i.inflateRaw = function(d, n) {
|
|
13298
|
+
return (n = n || {}).raw = true, L(d, n);
|
|
13299
13299
|
}, i.ungzip = L;
|
|
13300
13300
|
},
|
|
13301
13301
|
{
|
|
@@ -13381,11 +13381,11 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13381
13381
|
return N;
|
|
13382
13382
|
}
|
|
13383
13383
|
j[254] = j[254] = 1, i.string2buf = function(V) {
|
|
13384
|
-
var J, N, L, d,
|
|
13385
|
-
for (d = 0; d <
|
|
13386
|
-
(64512 & (N = V.charCodeAt(d))) == 55296 && d + 1 <
|
|
13387
|
-
for (J = new w.Buf8(z), d =
|
|
13388
|
-
(64512 & (N = V.charCodeAt(d))) == 55296 && d + 1 <
|
|
13384
|
+
var J, N, L, d, n, W = V.length, z = 0;
|
|
13385
|
+
for (d = 0; d < W; d++)
|
|
13386
|
+
(64512 & (N = V.charCodeAt(d))) == 55296 && d + 1 < W && (64512 & (L = V.charCodeAt(d + 1))) == 56320 && (N = 65536 + (N - 55296 << 10) + (L - 56320), d++), z += N < 128 ? 1 : N < 2048 ? 2 : N < 65536 ? 3 : 4;
|
|
13387
|
+
for (J = new w.Buf8(z), d = n = 0; n < z; d++)
|
|
13388
|
+
(64512 & (N = V.charCodeAt(d))) == 55296 && d + 1 < W && (64512 & (L = V.charCodeAt(d + 1))) == 56320 && (N = 65536 + (N - 55296 << 10) + (L - 56320), d++), N < 128 ? J[n++] = N : (N < 2048 ? J[n++] = 192 | N >>> 6 : (N < 65536 ? J[n++] = 224 | N >>> 12 : (J[n++] = 240 | N >>> 18, J[n++] = 128 | N >>> 12 & 63), J[n++] = 128 | N >>> 6 & 63), J[n++] = 128 | 63 & N);
|
|
13389
13389
|
return J;
|
|
13390
13390
|
}, i.buf2binstring = function(V) {
|
|
13391
13391
|
return g(V, V.length);
|
|
@@ -13394,16 +13394,16 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13394
13394
|
J[N] = V.charCodeAt(N);
|
|
13395
13395
|
return J;
|
|
13396
13396
|
}, i.buf2string = function(V, J) {
|
|
13397
|
-
var N, L, d,
|
|
13398
|
-
for (N = L = 0; N <
|
|
13397
|
+
var N, L, d, n, W = J || V.length, z = new Array(2 * W);
|
|
13398
|
+
for (N = L = 0; N < W; )
|
|
13399
13399
|
if ((d = V[N++]) < 128)
|
|
13400
13400
|
z[L++] = d;
|
|
13401
|
-
else if (4 < (
|
|
13402
|
-
z[L++] = 65533, N +=
|
|
13401
|
+
else if (4 < (n = j[d]))
|
|
13402
|
+
z[L++] = 65533, N += n - 1;
|
|
13403
13403
|
else {
|
|
13404
|
-
for (d &=
|
|
13405
|
-
d = d << 6 | 63 & V[N++],
|
|
13406
|
-
1 <
|
|
13404
|
+
for (d &= n === 2 ? 31 : n === 3 ? 15 : 7; 1 < n && N < W; )
|
|
13405
|
+
d = d << 6 | 63 & V[N++], n--;
|
|
13406
|
+
1 < n ? z[L++] = 65533 : d < 65536 ? z[L++] = d : (d -= 65536, z[L++] = 55296 | d >> 10 & 1023, z[L++] = 56320 | 1023 & d);
|
|
13407
13407
|
}
|
|
13408
13408
|
return g(z, L);
|
|
13409
13409
|
}, i.utf8border = function(V, J) {
|
|
@@ -13487,7 +13487,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13487
13487
|
],
|
|
13488
13488
|
46: [
|
|
13489
13489
|
function(I, C, i) {
|
|
13490
|
-
var w, Z = I("../utils/common"), l = I("./trees"), j = I("./adler32"), D = I("./crc32"), g = I("./messages"), V = 0, J = 4, N = 0, L = -2, d = -1,
|
|
13490
|
+
var w, Z = I("../utils/common"), l = I("./trees"), j = I("./adler32"), D = I("./crc32"), g = I("./messages"), V = 0, J = 4, N = 0, L = -2, d = -1, n = 4, W = 2, z = 8, P = 9, F = 286, T = 30, e = 19, a = 2 * F + 1, o = 15, E = 3, u = 258, K = u + E + 1, y = 42, v = 113, O = 1, p = 2, DA = 3, q = 4;
|
|
13491
13491
|
function QA(b, IA) {
|
|
13492
13492
|
return b.msg = g[IA], IA;
|
|
13493
13493
|
}
|
|
@@ -13597,7 +13597,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13597
13597
|
}
|
|
13598
13598
|
function rA(b) {
|
|
13599
13599
|
var IA;
|
|
13600
|
-
return b && b.state ? (b.total_in = b.total_out = 0, b.data_type =
|
|
13600
|
+
return b && b.state ? (b.total_in = b.total_out = 0, b.data_type = W, (IA = b.state).pending = 0, IA.pending_out = 0, IA.wrap < 0 && (IA.wrap = -IA.wrap), IA.status = IA.wrap ? y : v, b.adler = IA.wrap === 2 ? 0 : 1, IA.last_flush = V, l._tr_init(IA), N) : QA(b, L);
|
|
13601
13601
|
}
|
|
13602
13602
|
function JI(b) {
|
|
13603
13603
|
var IA = rA(b);
|
|
@@ -13609,7 +13609,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13609
13609
|
if (!b)
|
|
13610
13610
|
return L;
|
|
13611
13611
|
var ZA = 1;
|
|
13612
|
-
if (IA === d && (IA = 6), t < 0 ? (ZA = 0, t = -t) : 15 < t && (ZA = 2, t -= 16), Y < 1 || P < Y || $ !== z || t < 8 || 15 < t || IA < 0 || 9 < IA || k < 0 ||
|
|
13612
|
+
if (IA === d && (IA = 6), t < 0 ? (ZA = 0, t = -t) : 15 < t && (ZA = 2, t -= 16), Y < 1 || P < Y || $ !== z || t < 8 || 15 < t || IA < 0 || 9 < IA || k < 0 || n < k)
|
|
13613
13613
|
return QA(b, L);
|
|
13614
13614
|
t === 8 && (t = 9);
|
|
13615
13615
|
var MA = new uA();
|
|
@@ -13770,8 +13770,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13770
13770
|
48: [
|
|
13771
13771
|
function(I, C, i) {
|
|
13772
13772
|
C.exports = function(w, Z) {
|
|
13773
|
-
var l, j, D, g, V, J, N, L, d,
|
|
13774
|
-
l = w.state, j = w.next_in, O = w.input, D = j + (w.avail_in - 5), g = w.next_out, p = w.output, V = g - (Z - w.avail_out), J = g + (w.avail_out - 257), N = l.dmax, L = l.wsize, d = l.whave,
|
|
13773
|
+
var l, j, D, g, V, J, N, L, d, n, W, z, P, F, T, e, a, o, E, u, K, y, v, O, p;
|
|
13774
|
+
l = w.state, j = w.next_in, O = w.input, D = j + (w.avail_in - 5), g = w.next_out, p = w.output, V = g - (Z - w.avail_out), J = g + (w.avail_out - 257), N = l.dmax, L = l.wsize, d = l.whave, n = l.wnext, W = l.window, z = l.hold, P = l.bits, F = l.lencode, T = l.distcode, e = (1 << l.lenbits) - 1, a = (1 << l.distbits) - 1;
|
|
13775
13775
|
A:
|
|
13776
13776
|
do {
|
|
13777
13777
|
P < 15 && (z += O[j++] << P, P += 8, z += O[j++] << P, P += 8), o = F[z & e];
|
|
@@ -13812,24 +13812,24 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13812
13812
|
w.msg = "invalid distance too far back", l.mode = 30;
|
|
13813
13813
|
break A;
|
|
13814
13814
|
}
|
|
13815
|
-
if (v =
|
|
13815
|
+
if (v = W, (y = 0) === n) {
|
|
13816
13816
|
if (y += L - E, E < u) {
|
|
13817
|
-
for (u -= E; p[g++] =
|
|
13817
|
+
for (u -= E; p[g++] = W[y++], --E; )
|
|
13818
13818
|
;
|
|
13819
13819
|
y = g - K, v = p;
|
|
13820
13820
|
}
|
|
13821
|
-
} else if (
|
|
13822
|
-
if (y += L +
|
|
13823
|
-
for (u -= E; p[g++] =
|
|
13821
|
+
} else if (n < E) {
|
|
13822
|
+
if (y += L + n - E, (E -= n) < u) {
|
|
13823
|
+
for (u -= E; p[g++] = W[y++], --E; )
|
|
13824
13824
|
;
|
|
13825
|
-
if (y = 0,
|
|
13826
|
-
for (u -= E =
|
|
13825
|
+
if (y = 0, n < u) {
|
|
13826
|
+
for (u -= E = n; p[g++] = W[y++], --E; )
|
|
13827
13827
|
;
|
|
13828
13828
|
y = g - K, v = p;
|
|
13829
13829
|
}
|
|
13830
13830
|
}
|
|
13831
|
-
} else if (y +=
|
|
13832
|
-
for (u -= E; p[g++] =
|
|
13831
|
+
} else if (y += n - E, E < u) {
|
|
13832
|
+
for (u -= E; p[g++] = W[y++], --E; )
|
|
13833
13833
|
;
|
|
13834
13834
|
y = g - K, v = p;
|
|
13835
13835
|
}
|
|
@@ -13854,8 +13854,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13854
13854
|
],
|
|
13855
13855
|
49: [
|
|
13856
13856
|
function(I, C, i) {
|
|
13857
|
-
var w = I("../utils/common"), Z = I("./adler32"), l = I("./crc32"), j = I("./inffast"), D = I("./inftrees"), g = 1, V = 2, J = 0, N = -2, L = 1, d = 852,
|
|
13858
|
-
function
|
|
13857
|
+
var w = I("../utils/common"), Z = I("./adler32"), l = I("./crc32"), j = I("./inffast"), D = I("./inftrees"), g = 1, V = 2, J = 0, N = -2, L = 1, d = 852, n = 592;
|
|
13858
|
+
function W(y) {
|
|
13859
13859
|
return (y >>> 24 & 255) + (y >>> 8 & 65280) + ((65280 & y) << 8) + ((255 & y) << 24);
|
|
13860
13860
|
}
|
|
13861
13861
|
function z() {
|
|
@@ -13863,7 +13863,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
13863
13863
|
}
|
|
13864
13864
|
function P(y) {
|
|
13865
13865
|
var v;
|
|
13866
|
-
return y && y.state ? (v = y.state, y.total_in = y.total_out = v.total = 0, y.msg = "", v.wrap && (y.adler = 1 & v.wrap), v.mode = L, v.last = 0, v.havedict = 0, v.dmax = 32768, v.head = null, v.hold = 0, v.bits = 0, v.lencode = v.lendyn = new w.Buf32(d), v.distcode = v.distdyn = new w.Buf32(
|
|
13866
|
+
return y && y.state ? (v = y.state, y.total_in = y.total_out = v.total = 0, y.msg = "", v.wrap && (y.adler = 1 & v.wrap), v.mode = L, v.last = 0, v.havedict = 0, v.dmax = 32768, v.head = null, v.hold = 0, v.bits = 0, v.lencode = v.lendyn = new w.Buf32(d), v.distcode = v.distdyn = new w.Buf32(n), v.sane = 1, v.back = -1, J) : N;
|
|
13867
13867
|
}
|
|
13868
13868
|
function F(y) {
|
|
13869
13869
|
var v;
|
|
@@ -14050,7 +14050,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14050
14050
|
break A;
|
|
14051
14051
|
AA--, r += p[q++] << x, x += 8;
|
|
14052
14052
|
}
|
|
14053
|
-
y.adler = O.check =
|
|
14053
|
+
y.adler = O.check = W(r), x = r = 0, O.mode = 11;
|
|
14054
14054
|
case 11:
|
|
14055
14055
|
if (O.havedict === 0)
|
|
14056
14056
|
return y.next_out = QA, y.avail_out = JA, y.next_in = q, y.avail_in = AA, O.hold = r, O.bits = x, 2;
|
|
@@ -14304,7 +14304,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14304
14304
|
break A;
|
|
14305
14305
|
AA--, r |= p[q++] << x, x += 8;
|
|
14306
14306
|
}
|
|
14307
|
-
if (sA -= JA, y.total_out += sA, O.total += sA, sA && (y.adler = O.check = O.flags ? l(O.check, DA, sA, QA - sA) : Z(O.check, DA, sA, QA - sA)), sA = JA, (O.flags ? r :
|
|
14307
|
+
if (sA -= JA, y.total_out += sA, O.total += sA, sA && (y.adler = O.check = O.flags ? l(O.check, DA, sA, QA - sA) : Z(O.check, DA, sA, QA - sA)), sA = JA, (O.flags ? r : W(r)) !== O.check) {
|
|
14308
14308
|
y.msg = "incorrect data check", O.mode = 30;
|
|
14309
14309
|
break;
|
|
14310
14310
|
}
|
|
@@ -14492,8 +14492,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14492
14492
|
64,
|
|
14493
14493
|
64
|
|
14494
14494
|
];
|
|
14495
|
-
C.exports = function(g, V, J, N, L, d,
|
|
14496
|
-
var z, P, F, T, e, a, o, E, u, K =
|
|
14495
|
+
C.exports = function(g, V, J, N, L, d, n, W) {
|
|
14496
|
+
var z, P, F, T, e, a, o, E, u, K = W.bits, y = 0, v = 0, O = 0, p = 0, DA = 0, q = 0, QA = 0, AA = 0, JA = 0, r = 0, x = null, jA = 0, sA = new w.Buf16(16), VA = new w.Buf16(16), eA = null, fA = 0;
|
|
14497
14497
|
for (y = 0; y <= 15; y++)
|
|
14498
14498
|
sA[y] = 0;
|
|
14499
14499
|
for (v = 0; v < N; v++)
|
|
@@ -14501,7 +14501,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14501
14501
|
for (DA = K, p = 15; 1 <= p && sA[p] === 0; p--)
|
|
14502
14502
|
;
|
|
14503
14503
|
if (p < DA && (DA = p), p === 0)
|
|
14504
|
-
return L[d++] = 20971520, L[d++] = 20971520,
|
|
14504
|
+
return L[d++] = 20971520, L[d++] = 20971520, W.bits = 1, 0;
|
|
14505
14505
|
for (O = 1; O < p && sA[O] === 0; O++)
|
|
14506
14506
|
;
|
|
14507
14507
|
for (DA < O && (DA = O), y = AA = 1; y <= 15; y++)
|
|
@@ -14512,18 +14512,18 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14512
14512
|
for (VA[1] = 0, y = 1; y < 15; y++)
|
|
14513
14513
|
VA[y + 1] = VA[y] + sA[y];
|
|
14514
14514
|
for (v = 0; v < N; v++)
|
|
14515
|
-
V[J + v] !== 0 && (
|
|
14516
|
-
if (a = g === 0 ? (x = eA =
|
|
14515
|
+
V[J + v] !== 0 && (n[VA[V[J + v]]++] = v);
|
|
14516
|
+
if (a = g === 0 ? (x = eA = n, 19) : g === 1 ? (x = Z, jA -= 257, eA = l, fA -= 257, 256) : (x = j, eA = D, -1), y = O, e = d, QA = v = r = 0, F = -1, T = (JA = 1 << (q = DA)) - 1, g === 1 && 852 < JA || g === 2 && 592 < JA)
|
|
14517
14517
|
return 1;
|
|
14518
14518
|
for (; ; ) {
|
|
14519
|
-
for (o = y - QA, u =
|
|
14519
|
+
for (o = y - QA, u = n[v] < a ? (E = 0, n[v]) : n[v] > a ? (E = eA[fA + n[v]], x[jA + n[v]]) : (E = 96, 0), z = 1 << y - QA, O = P = 1 << q; L[e + (r >> QA) + (P -= z)] = o << 24 | E << 16 | u | 0, P !== 0; )
|
|
14520
14520
|
;
|
|
14521
14521
|
for (z = 1 << y - 1; r & z; )
|
|
14522
14522
|
z >>= 1;
|
|
14523
14523
|
if (z !== 0 ? (r &= z - 1, r += z) : r = 0, v++, --sA[y] == 0) {
|
|
14524
14524
|
if (y === p)
|
|
14525
14525
|
break;
|
|
14526
|
-
y = V[J +
|
|
14526
|
+
y = V[J + n[v]];
|
|
14527
14527
|
}
|
|
14528
14528
|
if (DA < y && (r & T) !== F) {
|
|
14529
14529
|
for (QA === 0 && (QA = DA), e += O, AA = 1 << (q = y - QA); q + QA < p && !((AA -= sA[q + QA]) <= 0); )
|
|
@@ -14533,7 +14533,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14533
14533
|
L[F = r & T] = DA << 24 | q << 16 | e - d | 0;
|
|
14534
14534
|
}
|
|
14535
14535
|
}
|
|
14536
|
-
return r !== 0 && (L[e + r] = y - QA << 24 | 64 << 16 | 0),
|
|
14536
|
+
return r !== 0 && (L[e + r] = y - QA << 24 | 64 << 16 | 0), W.bits = DA, 0;
|
|
14537
14537
|
};
|
|
14538
14538
|
},
|
|
14539
14539
|
{
|
|
@@ -14563,7 +14563,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14563
14563
|
for (var k = Y.length; 0 <= --k; )
|
|
14564
14564
|
Y[k] = 0;
|
|
14565
14565
|
}
|
|
14566
|
-
var D = 0, g = 29, V = 256, J = V + 1 + g, N = 30, L = 19, d = 2 * J + 1,
|
|
14566
|
+
var D = 0, g = 29, V = 256, J = V + 1 + g, N = 30, L = 19, d = 2 * J + 1, n = 15, W = 16, z = 7, P = 256, F = 16, T = 17, e = 18, a = [
|
|
14567
14567
|
0,
|
|
14568
14568
|
0,
|
|
14569
14569
|
0,
|
|
@@ -14688,7 +14688,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14688
14688
|
Y.pending_buf[Y.pending++] = 255 & k, Y.pending_buf[Y.pending++] = k >>> 8 & 255;
|
|
14689
14689
|
}
|
|
14690
14690
|
function sA(Y, k, ZA) {
|
|
14691
|
-
Y.bi_valid >
|
|
14691
|
+
Y.bi_valid > W - ZA ? (Y.bi_buf |= k << Y.bi_valid & 65535, jA(Y, Y.bi_buf), Y.bi_buf = k >> W - Y.bi_valid, Y.bi_valid += ZA - W) : (Y.bi_buf |= k << Y.bi_valid & 65535, Y.bi_valid += ZA);
|
|
14692
14692
|
}
|
|
14693
14693
|
function VA(Y, k, ZA) {
|
|
14694
14694
|
sA(Y, ZA[2 * k], ZA[2 * k + 1]);
|
|
@@ -14699,8 +14699,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14699
14699
|
return ZA >>> 1;
|
|
14700
14700
|
}
|
|
14701
14701
|
function fA(Y, k, ZA) {
|
|
14702
|
-
var MA, f, gA = new Array(
|
|
14703
|
-
for (MA = 1; MA <=
|
|
14702
|
+
var MA, f, gA = new Array(n + 1), LA = 0;
|
|
14703
|
+
for (MA = 1; MA <= n; MA++)
|
|
14704
14704
|
gA[MA] = LA = LA + ZA[MA - 1] << 1;
|
|
14705
14705
|
for (f = 0; f <= k; f++) {
|
|
14706
14706
|
var NA = Y[2 * f + 1];
|
|
@@ -14748,7 +14748,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14748
14748
|
;
|
|
14749
14749
|
Y.heap[--Y.heap_max] = Y.heap[1], function(yA, dI) {
|
|
14750
14750
|
var eC, aI, YC, iI, kC, li, kI = dI.dyn_tree, Oi = dI.max_code, ww = dI.stat_desc.static_tree, _Z = dI.stat_desc.has_stree, $Z = dI.stat_desc.extra_bits, yw = dI.stat_desc.extra_base, HC = dI.stat_desc.max_length, mi = 0;
|
|
14751
|
-
for (iI = 0; iI <=
|
|
14751
|
+
for (iI = 0; iI <= n; iI++)
|
|
14752
14752
|
yA.bl_count[iI] = 0;
|
|
14753
14753
|
for (kI[2 * yA.heap[yA.heap_max] + 1] = 0, eC = yA.heap_max + 1; eC < d; eC++)
|
|
14754
14754
|
HC < (iI = kI[2 * kI[2 * (aI = yA.heap[eC]) + 1] + 1] + 1) && (iI = HC, mi++), kI[2 * aI + 1] = iI, Oi < aI || (yA.bl_count[iI]++, kC = 0, yw <= aI && (kC = $Z[aI - yw]), li = kI[2 * aI], yA.opt_len += li * (iI + kC), _Z && (yA.static_len += li * (ww[2 * aI + 1] + kC)));
|
|
@@ -14790,7 +14790,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14790
14790
|
}
|
|
14791
14791
|
i._tr_init = function(Y) {
|
|
14792
14792
|
$ || (function() {
|
|
14793
|
-
var k, ZA, MA, f, gA, LA = new Array(
|
|
14793
|
+
var k, ZA, MA, f, gA, LA = new Array(n + 1);
|
|
14794
14794
|
for (f = MA = 0; f < g - 1; f++)
|
|
14795
14795
|
for (p[f] = MA, k = 0; k < 1 << a[f]; k++)
|
|
14796
14796
|
O[MA++] = f;
|
|
@@ -14800,7 +14800,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14800
14800
|
for (gA >>= 7; f < N; f++)
|
|
14801
14801
|
for (AA[f] = gA << 7, k = 0; k < 1 << o[f] - 7; k++)
|
|
14802
14802
|
v[256 + gA++] = f;
|
|
14803
|
-
for (ZA = 0; ZA <=
|
|
14803
|
+
for (ZA = 0; ZA <= n; ZA++)
|
|
14804
14804
|
LA[ZA] = 0;
|
|
14805
14805
|
for (k = 0; k <= 143; )
|
|
14806
14806
|
K[2 * k + 1] = 8, k++, LA[8]++;
|
|
@@ -14812,7 +14812,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14812
14812
|
K[2 * k + 1] = 8, k++, LA[8]++;
|
|
14813
14813
|
for (fA(K, J + 1, LA), k = 0; k < N; k++)
|
|
14814
14814
|
y[2 * k + 1] = 5, y[2 * k] = eA(k, 5);
|
|
14815
|
-
DA = new JA(K, a, V + 1, J,
|
|
14815
|
+
DA = new JA(K, a, V + 1, J, n), q = new JA(y, o, 0, N, n), QA = new JA(new Array(0), E, 0, L, z);
|
|
14816
14816
|
}(), $ = true), Y.l_desc = new r(Y.dyn_ltree, DA), Y.d_desc = new r(Y.dyn_dtree, q), Y.bl_desc = new r(Y.bl_tree, QA), Y.bi_buf = 0, Y.bi_valid = 0, YA(Y);
|
|
14817
14817
|
}, i._tr_stored_block = t, i._tr_flush_block = function(Y, k, ZA, MA) {
|
|
14818
14818
|
var f, gA, LA = 0;
|
|
@@ -14863,8 +14863,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14863
14863
|
(function(w) {
|
|
14864
14864
|
(function(Z, l) {
|
|
14865
14865
|
if (!Z.setImmediate) {
|
|
14866
|
-
var j, D, g, V, J = 1, N = {}, L = false, d = Z.document,
|
|
14867
|
-
|
|
14866
|
+
var j, D, g, V, J = 1, N = {}, L = false, d = Z.document, n = Object.getPrototypeOf && Object.getPrototypeOf(Z);
|
|
14867
|
+
n = n && n.setTimeout ? n : Z, j = {}.toString.call(Z.process) === "[object process]" ? function(F) {
|
|
14868
14868
|
process.nextTick(function() {
|
|
14869
14869
|
z(F);
|
|
14870
14870
|
});
|
|
@@ -14888,7 +14888,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14888
14888
|
}, D.appendChild(T);
|
|
14889
14889
|
}) : function(F) {
|
|
14890
14890
|
setTimeout(z, 0, F);
|
|
14891
|
-
},
|
|
14891
|
+
}, n.setImmediate = function(F) {
|
|
14892
14892
|
typeof F != "function" && (F = new Function("" + F));
|
|
14893
14893
|
for (var T = new Array(arguments.length - 1), e = 0; e < T.length; e++)
|
|
14894
14894
|
T[e] = arguments[e + 1];
|
|
@@ -14897,9 +14897,9 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14897
14897
|
args: T
|
|
14898
14898
|
};
|
|
14899
14899
|
return N[J] = a, j(J), J++;
|
|
14900
|
-
},
|
|
14900
|
+
}, n.clearImmediate = W;
|
|
14901
14901
|
}
|
|
14902
|
-
function
|
|
14902
|
+
function W(F) {
|
|
14903
14903
|
delete N[F];
|
|
14904
14904
|
}
|
|
14905
14905
|
function z(F) {
|
|
@@ -14930,7 +14930,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
14930
14930
|
}
|
|
14931
14931
|
})(T);
|
|
14932
14932
|
} finally {
|
|
14933
|
-
|
|
14933
|
+
W(F), L = false;
|
|
14934
14934
|
}
|
|
14935
14935
|
}
|
|
14936
14936
|
}
|
|
@@ -19386,8 +19386,8 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
19386
19386
|
}), Z[P] = F, w[P] = F, i[P] = F;
|
|
19387
19387
|
}
|
|
19388
19388
|
l("camera", A), l("object", void 0), l("enabled", true), l("axis", null), l("mode", "translate"), l("translationSnap", null), l("rotationSnap", null), l("scaleSnap", null), l("space", "world"), l("size", 1), l("dragging", false), l("showX", true), l("showY", true), l("showZ", true), l("showXY", true), l("showYZ", true), l("showXZ", true), l("minX", -1 / 0), l("maxX", 1 / 0), l("minY", -1 / 0), l("maxY", 1 / 0), l("minZ", -1 / 0), l("maxZ", 1 / 0);
|
|
19389
|
-
const j = new UA(), D = new UA(), g = new SI(), V = new SI(), J = new UA(), N = new SI(), L = new UA(), d = new UA(),
|
|
19390
|
-
l("worldPosition", j), l("worldPositionStart", D), l("worldQuaternion", g), l("worldQuaternionStart", V), l("cameraPosition", J), l("cameraQuaternion", N), l("pointStart", L), l("pointEnd", d), l("rotationAxis",
|
|
19389
|
+
const j = new UA(), D = new UA(), g = new SI(), V = new SI(), J = new UA(), N = new SI(), L = new UA(), d = new UA(), n = new UA(), W = 0, z = new UA();
|
|
19390
|
+
l("worldPosition", j), l("worldPositionStart", D), l("worldQuaternion", g), l("worldQuaternionStart", V), l("cameraPosition", J), l("cameraQuaternion", N), l("pointStart", L), l("pointEnd", d), l("rotationAxis", n), l("rotationAngle", W), l("eye", z), this._offset = new UA(), this._startNorm = new UA(), this._endNorm = new UA(), this._cameraScale = new UA(), this._parentPosition = new UA(), this._parentQuaternion = new SI(), this._parentQuaternionInv = new SI(), this._parentScale = new UA(), this._worldScaleStart = new UA(), this._worldQuaternionInv = new SI(), this._worldScale = new UA(), this._positionStart = new UA(), this._quaternionStart = new SI(), this._scaleStart = new UA(), this._getPointer = Pc.bind(this), this._onPointerDown = bc.bind(this), this._onPointerHover = Oc.bind(this), this._onPointerMove = Rc.bind(this), this._onPointerUp = Fc.bind(this), I !== null && this.connect(I);
|
|
19391
19391
|
}
|
|
19392
19392
|
connect(A) {
|
|
19393
19393
|
super.connect(A), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
|
@@ -19588,10 +19588,10 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
19588
19588
|
};
|
|
19589
19589
|
const d = new hI(0, 0.04, 0.1, 12);
|
|
19590
19590
|
d.translate(0, 0.05, 0);
|
|
19591
|
-
const
|
|
19592
|
-
|
|
19593
|
-
const
|
|
19594
|
-
|
|
19591
|
+
const n = new yI(0.08, 0.08, 0.08);
|
|
19592
|
+
n.translate(0, 0.04, 0);
|
|
19593
|
+
const W = new ol();
|
|
19594
|
+
W.setAttribute("position", new hZ([
|
|
19595
19595
|
0,
|
|
19596
19596
|
0,
|
|
19597
19597
|
0,
|
|
@@ -19926,7 +19926,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
19926
19926
|
],
|
|
19927
19927
|
X: [
|
|
19928
19928
|
[
|
|
19929
|
-
new xC(
|
|
19929
|
+
new xC(W, i),
|
|
19930
19930
|
[
|
|
19931
19931
|
-1e3,
|
|
19932
19932
|
0,
|
|
@@ -19943,7 +19943,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
19943
19943
|
],
|
|
19944
19944
|
Y: [
|
|
19945
19945
|
[
|
|
19946
|
-
new xC(
|
|
19946
|
+
new xC(W, i),
|
|
19947
19947
|
[
|
|
19948
19948
|
0,
|
|
19949
19949
|
-1e3,
|
|
@@ -19964,7 +19964,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
19964
19964
|
],
|
|
19965
19965
|
Z: [
|
|
19966
19966
|
[
|
|
19967
|
-
new xC(
|
|
19967
|
+
new xC(W, i),
|
|
19968
19968
|
[
|
|
19969
19969
|
0,
|
|
19970
19970
|
0,
|
|
@@ -20036,7 +20036,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20036
20036
|
}, E = {
|
|
20037
20037
|
AXIS: [
|
|
20038
20038
|
[
|
|
20039
|
-
new xC(
|
|
20039
|
+
new xC(W, i),
|
|
20040
20040
|
[
|
|
20041
20041
|
-1e3,
|
|
20042
20042
|
0,
|
|
@@ -20110,7 +20110,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20110
20110
|
}, K = {
|
|
20111
20111
|
X: [
|
|
20112
20112
|
[
|
|
20113
|
-
new nA(
|
|
20113
|
+
new nA(n, w),
|
|
20114
20114
|
[
|
|
20115
20115
|
0.5,
|
|
20116
20116
|
0,
|
|
@@ -20136,7 +20136,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20136
20136
|
]
|
|
20137
20137
|
],
|
|
20138
20138
|
[
|
|
20139
|
-
new nA(
|
|
20139
|
+
new nA(n, w),
|
|
20140
20140
|
[
|
|
20141
20141
|
-0.5,
|
|
20142
20142
|
0,
|
|
@@ -20151,7 +20151,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20151
20151
|
],
|
|
20152
20152
|
Y: [
|
|
20153
20153
|
[
|
|
20154
|
-
new nA(
|
|
20154
|
+
new nA(n, Z),
|
|
20155
20155
|
[
|
|
20156
20156
|
0,
|
|
20157
20157
|
0.5,
|
|
@@ -20162,7 +20162,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20162
20162
|
new nA(z, Z)
|
|
20163
20163
|
],
|
|
20164
20164
|
[
|
|
20165
|
-
new nA(
|
|
20165
|
+
new nA(n, Z),
|
|
20166
20166
|
[
|
|
20167
20167
|
0,
|
|
20168
20168
|
-0.5,
|
|
@@ -20177,7 +20177,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20177
20177
|
],
|
|
20178
20178
|
Z: [
|
|
20179
20179
|
[
|
|
20180
|
-
new nA(
|
|
20180
|
+
new nA(n, l),
|
|
20181
20181
|
[
|
|
20182
20182
|
0,
|
|
20183
20183
|
0,
|
|
@@ -20203,7 +20203,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20203
20203
|
]
|
|
20204
20204
|
],
|
|
20205
20205
|
[
|
|
20206
|
-
new nA(
|
|
20206
|
+
new nA(n, l),
|
|
20207
20207
|
[
|
|
20208
20208
|
0,
|
|
20209
20209
|
0,
|
|
@@ -20394,7 +20394,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20394
20394
|
}, v = {
|
|
20395
20395
|
X: [
|
|
20396
20396
|
[
|
|
20397
|
-
new xC(
|
|
20397
|
+
new xC(W, i),
|
|
20398
20398
|
[
|
|
20399
20399
|
-1e3,
|
|
20400
20400
|
0,
|
|
@@ -20411,7 +20411,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20411
20411
|
],
|
|
20412
20412
|
Y: [
|
|
20413
20413
|
[
|
|
20414
|
-
new xC(
|
|
20414
|
+
new xC(W, i),
|
|
20415
20415
|
[
|
|
20416
20416
|
0,
|
|
20417
20417
|
-1e3,
|
|
@@ -20432,7 +20432,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20432
20432
|
],
|
|
20433
20433
|
Z: [
|
|
20434
20434
|
[
|
|
20435
|
-
new xC(
|
|
20435
|
+
new xC(W, i),
|
|
20436
20436
|
[
|
|
20437
20437
|
0,
|
|
20438
20438
|
0,
|
|
@@ -20741,14 +20741,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
20741
20741
|
fZ.exports;
|
|
20742
20742
|
(function(U, A) {
|
|
20743
20743
|
(function() {
|
|
20744
|
-
var I, C = "4.18.1", i = 200, w = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", Z = "Expected a function", l = "Invalid `variable` option passed into `_.template`", j = "Invalid `imports` option passed into `_.template`", D = "__lodash_hash_undefined__", g = 500, V = "__lodash_placeholder__", J = 1, N = 2, L = 4, d = 1,
|
|
20744
|
+
var I, C = "4.18.1", i = 200, w = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", Z = "Expected a function", l = "Invalid `variable` option passed into `_.template`", j = "Invalid `imports` option passed into `_.template`", D = "__lodash_hash_undefined__", g = 500, V = "__lodash_placeholder__", J = 1, N = 2, L = 4, d = 1, n = 2, W = 1, z = 2, P = 4, F = 8, T = 16, e = 32, a = 64, o = 128, E = 256, u = 512, K = 30, y = "...", v = 800, O = 16, p = 1, DA = 2, q = 3, QA = 1 / 0, AA = 9007199254740991, JA = 17976931348623157e292, r = 0 / 0, x = 4294967295, jA = x - 1, sA = x >>> 1, VA = [
|
|
20745
20745
|
[
|
|
20746
20746
|
"ary",
|
|
20747
20747
|
o
|
|
20748
20748
|
],
|
|
20749
20749
|
[
|
|
20750
20750
|
"bind",
|
|
20751
|
-
|
|
20751
|
+
W
|
|
20752
20752
|
],
|
|
20753
20753
|
[
|
|
20754
20754
|
"bindKey",
|
|
@@ -21852,7 +21852,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
21852
21852
|
var mA = new VC();
|
|
21853
21853
|
if (c)
|
|
21854
21854
|
var dA = c(iA, wA, H, M, m, mA);
|
|
21855
|
-
if (!(dA === I ? Jw(wA, iA, d |
|
|
21855
|
+
if (!(dA === I ? Jw(wA, iA, d | n, c, mA) : dA))
|
|
21856
21856
|
return false;
|
|
21857
21857
|
}
|
|
21858
21858
|
}
|
|
@@ -21910,7 +21910,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
21910
21910
|
function sj(M, m) {
|
|
21911
21911
|
return HM(M) && vj(m) ? kj(sC(M), m) : function(s) {
|
|
21912
21912
|
var c = wl(s, M);
|
|
21913
|
-
return c === I && c === m ? Zl(s, M) : Jw(m, c, d |
|
|
21913
|
+
return c === I && c === m ? Zl(s, M) : Jw(m, c, d | n);
|
|
21914
21914
|
};
|
|
21915
21915
|
}
|
|
21916
21916
|
function wZ(M, m, s, c, R) {
|
|
@@ -22329,7 +22329,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22329
22329
|
};
|
|
22330
22330
|
}
|
|
22331
22331
|
function pJ(M, m, s) {
|
|
22332
|
-
var c = m &
|
|
22332
|
+
var c = m & W, R = dw(M);
|
|
22333
22333
|
function X() {
|
|
22334
22334
|
var S = this && this !== nI && this instanceof X ? R : M;
|
|
22335
22335
|
return S.apply(c ? s : this, arguments);
|
|
@@ -22425,7 +22425,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22425
22425
|
});
|
|
22426
22426
|
}
|
|
22427
22427
|
function mZ(M, m, s, c, R, X, S, G, H, iA) {
|
|
22428
|
-
var wA = m & o, mA = m &
|
|
22428
|
+
var wA = m & o, mA = m & W, dA = m & z, cA = m & (F | T), RA = m & u, oA = dA ? I : dw(M);
|
|
22429
22429
|
function OA() {
|
|
22430
22430
|
for (var aA = arguments.length, hA = _(aA), _I = aA; _I--; )
|
|
22431
22431
|
hA[_I] = arguments[_I];
|
|
@@ -22477,7 +22477,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22477
22477
|
return Fi(m) ? Ii(gC(c), 0, M).join("") : c.slice(0, M);
|
|
22478
22478
|
}
|
|
22479
22479
|
function xJ(M, m, s, c) {
|
|
22480
|
-
var R = m &
|
|
22480
|
+
var R = m & W, X = dw(M);
|
|
22481
22481
|
function S() {
|
|
22482
22482
|
for (var G = -1, H = arguments.length, iA = -1, wA = c.length, mA = _(wA + H), dA = this && this !== nI && this instanceof S ? X : M; ++iA < wA; )
|
|
22483
22483
|
mA[iA] = c[iA];
|
|
@@ -22499,7 +22499,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22499
22499
|
}
|
|
22500
22500
|
function tj(M, m, s, c, R, X, S, G, H, iA) {
|
|
22501
22501
|
var wA = m & F, mA = wA ? S : I, dA = wA ? I : S, cA = wA ? X : I, RA = wA ? I : X;
|
|
22502
|
-
m |= wA ? e : a, m &= ~(wA ? a : e), m & P || (m &= ~(
|
|
22502
|
+
m |= wA ? e : a, m &= ~(wA ? a : e), m & P || (m &= ~(W | z));
|
|
22503
22503
|
var oA = [
|
|
22504
22504
|
M,
|
|
22505
22505
|
m,
|
|
@@ -22557,10 +22557,10 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22557
22557
|
S,
|
|
22558
22558
|
G
|
|
22559
22559
|
];
|
|
22560
|
-
if (dA && ZN(cA, dA), M = cA[0], m = cA[1], s = cA[2], c = cA[3], R = cA[4], G = cA[9] = cA[9] === I ? H ? 0 : M.length : QI(cA[9] - iA, 0), !G && m & (F | T) && (m &= ~(F | T)), !m || m ==
|
|
22560
|
+
if (dA && ZN(cA, dA), M = cA[0], m = cA[1], s = cA[2], c = cA[3], R = cA[4], G = cA[9] = cA[9] === I ? H ? 0 : M.length : QI(cA[9] - iA, 0), !G && m & (F | T) && (m &= ~(F | T)), !m || m == W)
|
|
22561
22561
|
var RA = pJ(M, m, s);
|
|
22562
22562
|
else
|
|
22563
|
-
m == F || m == T ? RA = uJ(M, m, G) : (m == e || m == (
|
|
22563
|
+
m == F || m == T ? RA = uJ(M, m, G) : (m == e || m == (W | e)) && !R.length ? RA = xJ(M, m, s, c) : RA = mZ.apply(I, cA);
|
|
22564
22564
|
var oA = dA ? Qj : fj;
|
|
22565
22565
|
return Kj(oA(RA, cA), M, m);
|
|
22566
22566
|
}
|
|
@@ -22580,7 +22580,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22580
22580
|
var iA = X.get(M), wA = X.get(m);
|
|
22581
22581
|
if (iA && wA)
|
|
22582
22582
|
return iA == m && wA == M;
|
|
22583
|
-
var mA = -1, dA = true, cA = s &
|
|
22583
|
+
var mA = -1, dA = true, cA = s & n ? new Vi() : I;
|
|
22584
22584
|
for (X.set(M, m), X.set(m, M); ++mA < G; ) {
|
|
22585
22585
|
var RA = M[mA], oA = m[mA];
|
|
22586
22586
|
if (c)
|
|
@@ -22632,7 +22632,7 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22632
22632
|
var iA = S.get(M);
|
|
22633
22633
|
if (iA)
|
|
22634
22634
|
return iA == m;
|
|
22635
|
-
c |=
|
|
22635
|
+
c |= n, S.set(M, m);
|
|
22636
22636
|
var wA = pj(G(M), G(m), c, R, X, S);
|
|
22637
22637
|
return S.delete(M), wA;
|
|
22638
22638
|
case LA:
|
|
@@ -22896,10 +22896,10 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
22896
22896
|
return m;
|
|
22897
22897
|
}
|
|
22898
22898
|
function ZN(M, m) {
|
|
22899
|
-
var s = M[1], c = m[1], R = s | c, X = R < (
|
|
22899
|
+
var s = M[1], c = m[1], R = s | c, X = R < (W | z | o), S = c == o && s == F || c == o && s == E && M[7].length <= m[8] || c == (o | E) && m[7].length <= m[8] && s == F;
|
|
22900
22900
|
if (!(X || S))
|
|
22901
22901
|
return M;
|
|
22902
|
-
c &
|
|
22902
|
+
c & W && (M[2] = m[2], R |= s & W ? 0 : P);
|
|
22903
22903
|
var G = m[3];
|
|
22904
22904
|
if (G) {
|
|
22905
22905
|
var H = M[3];
|
|
@@ -23477,14 +23477,14 @@ Supported formats: ${j}`), await ((_e = (_d = this.options.callbacks) == null ?
|
|
|
23477
23477
|
};
|
|
23478
23478
|
}
|
|
23479
23479
|
var $M = EA(function(M, m, s) {
|
|
23480
|
-
var c =
|
|
23480
|
+
var c = W;
|
|
23481
23481
|
if (s.length) {
|
|
23482
23482
|
var R = KC(s, ti($M));
|
|
23483
23483
|
c |= e;
|
|
23484
23484
|
}
|
|
23485
23485
|
return EC(M, c, m, s, R);
|
|
23486
23486
|
}), gD = EA(function(M, m, s) {
|
|
23487
|
-
var c =
|
|
23487
|
+
var c = W | z;
|
|
23488
23488
|
if (s.length) {
|
|
23489
23489
|
var R = KC(s, ti(gD));
|
|
23490
23490
|
c |= e;
|
|
@@ -25140,9 +25140,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
25140
25140
|
opacity: Math.min(1, this.style.opacity + 0.5),
|
|
25141
25141
|
depthTest: true,
|
|
25142
25142
|
depthWrite: false
|
|
25143
|
-
}), g = (L, d,
|
|
25144
|
-
const
|
|
25145
|
-
return z.position.copy(d), z.rotation.copy(
|
|
25143
|
+
}), g = (L, d, n) => {
|
|
25144
|
+
const W = new Q.CylinderGeometry(w, w, L, 8), z = new Q.Mesh(W, D.clone());
|
|
25145
|
+
return z.position.copy(d), z.rotation.copy(n), z.renderOrder = 1e3, z;
|
|
25146
25146
|
}, V = A / 2, J = I / 2, N = C / 2;
|
|
25147
25147
|
return i.add(g(I, new Q.Vector3(-V, 0, -N), new Q.Euler(0, 0, 0))), i.add(g(I, new Q.Vector3(V, 0, -N), new Q.Euler(0, 0, 0))), i.add(g(I, new Q.Vector3(-V, 0, N), new Q.Euler(0, 0, 0))), i.add(g(I, new Q.Vector3(V, 0, N), new Q.Euler(0, 0, 0))), i.add(g(A, new Q.Vector3(0, -J, -N), new Q.Euler(0, 0, Math.PI / 2))), i.add(g(A, new Q.Vector3(0, -J, N), new Q.Euler(0, 0, Math.PI / 2))), i.add(g(A, new Q.Vector3(0, J, -N), new Q.Euler(0, 0, Math.PI / 2))), i.add(g(A, new Q.Vector3(0, J, N), new Q.Euler(0, 0, Math.PI / 2))), i.add(g(C, new Q.Vector3(-V, -J, 0), new Q.Euler(Math.PI / 2, 0, 0))), i.add(g(C, new Q.Vector3(V, -J, 0), new Q.Euler(Math.PI / 2, 0, 0))), i.add(g(C, new Q.Vector3(-V, J, 0), new Q.Euler(Math.PI / 2, 0, 0))), i.add(g(C, new Q.Vector3(V, J, 0), new Q.Euler(Math.PI / 2, 0, 0))), i;
|
|
25148
25148
|
}
|
|
@@ -25153,7 +25153,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
25153
25153
|
const F = V[0];
|
|
25154
25154
|
J.copy(F.position);
|
|
25155
25155
|
}
|
|
25156
|
-
const N = (I + w) / 2 + J.x, L = (C + Z) / 2 + J.y, d = (i + l) / 2 + J.z,
|
|
25156
|
+
const N = (I + w) / 2 + J.x, L = (C + Z) / 2 + J.y, d = (i + l) / 2 + J.z, n = new Q.BoxGeometry(j, D, g), W = new Q.MeshBasicMaterial({
|
|
25157
25157
|
color: this.style.color,
|
|
25158
25158
|
opacity: this.style.opacity,
|
|
25159
25159
|
transparent: true,
|
|
@@ -25163,7 +25163,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
25163
25163
|
polygonOffset: true,
|
|
25164
25164
|
polygonOffsetFactor: 1,
|
|
25165
25165
|
polygonOffsetUnits: 1
|
|
25166
|
-
}), z = new Q.Mesh(
|
|
25166
|
+
}), z = new Q.Mesh(n, W);
|
|
25167
25167
|
z.renderOrder = 999;
|
|
25168
25168
|
const P = new Q.Group();
|
|
25169
25169
|
if (this.style.filled && P.add(z), this.style.showEdges) {
|
|
@@ -26884,9 +26884,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
26884
26884
|
transparentPixelCount: D,
|
|
26885
26885
|
semiTransparentPixelCount: V
|
|
26886
26886
|
};
|
|
26887
|
-
const
|
|
26887
|
+
const W = V / N, z = D / N;
|
|
26888
26888
|
let P;
|
|
26889
|
-
return
|
|
26889
|
+
return W < 0.1 && (z > 0.1 || g > N * 0.5) ? P = "cutout" : P = "blend", console.log(`Texture transparency analysis: ${P}`), console.log(` - Total pixels: ${N}`), console.log(` - Transparent: ${D} (${(z * 100).toFixed(1)}%)`), console.log(` - Semi-transparent: ${V} (${(W * 100).toFixed(1)}%)`), console.log(` - Opaque: ${g} (${(g / N * 100).toFixed(1)}%)`), console.log(` - Average alpha: ${L.toFixed(3)}`), console.log(` - Visible alpha: ${d.toFixed(3)}`), {
|
|
26890
26890
|
hasTransparency: true,
|
|
26891
26891
|
transparencyType: P,
|
|
26892
26892
|
averageAlpha: L,
|
|
@@ -26964,13 +26964,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
26964
26964
|
if (await this.loadColormaps(), this.textureAtlas)
|
|
26965
26965
|
return this.textureAtlas;
|
|
26966
26966
|
if (this.cacheEnabled && this.resourcePackHash) {
|
|
26967
|
-
const
|
|
26967
|
+
const n = new SZ(2048, 1);
|
|
26968
26968
|
try {
|
|
26969
|
-
const
|
|
26970
|
-
if (
|
|
26971
|
-
console.log(`\u{1F3AF} Atlas loaded from cache with ${
|
|
26972
|
-
const z = new Q.CanvasTexture(
|
|
26973
|
-
return z.minFilter = Q.NearestFilter, z.magFilter = Q.NearestFilter, z.wrapS = Q.RepeatWrapping, z.wrapT = Q.RepeatWrapping, z.needsUpdate = true, this.textureAtlas = z, this.textureUVMap =
|
|
26969
|
+
const W = await n.buildAtlas([], this.resourcePackHash);
|
|
26970
|
+
if (W.fromCache) {
|
|
26971
|
+
console.log(`\u{1F3AF} Atlas loaded from cache with ${W.packingEfficiency.toFixed(1)}% efficiency`);
|
|
26972
|
+
const z = new Q.CanvasTexture(W.atlas);
|
|
26973
|
+
return z.minFilter = Q.NearestFilter, z.magFilter = Q.NearestFilter, z.wrapS = Q.RepeatWrapping, z.wrapT = Q.RepeatWrapping, z.needsUpdate = true, this.textureAtlas = z, this.textureUVMap = W.uvMap, console.log(`\u{1F4CA} Loaded ${W.uvMap.size} textures from cache`), z;
|
|
26974
26974
|
}
|
|
26975
26975
|
} catch {
|
|
26976
26976
|
console.log("\u{1F4E6} No cache found, building atlas...");
|
|
@@ -26981,9 +26981,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
26981
26981
|
"block/"
|
|
26982
26982
|
], C = /* @__PURE__ */ new Set();
|
|
26983
26983
|
let i = 0;
|
|
26984
|
-
for (const { zip:
|
|
26985
|
-
const
|
|
26986
|
-
for (const z of
|
|
26984
|
+
for (const { zip: n } of this.getOrderedPacks()) {
|
|
26985
|
+
const W = Object.keys(n.files).filter((z) => z.includes("assets/minecraft/textures/") && z.endsWith(".png") && !n.files[z].dir);
|
|
26986
|
+
for (const z of W) {
|
|
26987
26987
|
const F = z.replace("assets/minecraft/textures/", "").replace(".png", "");
|
|
26988
26988
|
i++, I.some((T) => F.startsWith(T)) && C.add(F);
|
|
26989
26989
|
}
|
|
@@ -26992,8 +26992,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
26992
26992
|
console.log(`\u{1F5BC}\uFE0F Found ${i} total textures, using ${w.length} whitelisted`);
|
|
26993
26993
|
const Z = [], l = 50;
|
|
26994
26994
|
let j = 0;
|
|
26995
|
-
for (let
|
|
26996
|
-
const
|
|
26995
|
+
for (let n = 0; n < w.length; n += l) {
|
|
26996
|
+
const W = w.slice(n, n + l), z = await Promise.all(W.map(async (P) => {
|
|
26997
26997
|
try {
|
|
26998
26998
|
const F = await this.getResourceBlob(`textures/${P}.png`);
|
|
26999
26999
|
if (!F)
|
|
@@ -27009,7 +27009,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
27009
27009
|
}));
|
|
27010
27010
|
for (const P of z)
|
|
27011
27011
|
P && (Z.push(P), j++);
|
|
27012
|
-
j > 0 && (
|
|
27012
|
+
j > 0 && (n + l) % 200 === 0 && console.log(`\u{1F4C8} Loaded ${j}/${w.length} textures`);
|
|
27013
27013
|
}
|
|
27014
27014
|
const D = performance.now() - A;
|
|
27015
27015
|
console.log(`\u26A1 Loaded ${Z.length} textures in ${D.toFixed(0)}ms`);
|
|
@@ -27683,9 +27683,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
27683
27683
|
g
|
|
27684
27684
|
], J = D[0].count, N = [];
|
|
27685
27685
|
for (const L of V) {
|
|
27686
|
-
const d = new QC(),
|
|
27686
|
+
const d = new QC(), n = new UA(), W = new SI(), z = new UA(1, 1, 1), P = new xU(L.geometry, L.material, J);
|
|
27687
27687
|
for (let F = 0; F < J; F++)
|
|
27688
|
-
j.TRANSLATION &&
|
|
27688
|
+
j.TRANSLATION && n.fromBufferAttribute(j.TRANSLATION, F), j.ROTATION && W.fromBufferAttribute(j.ROTATION, F), j.SCALE && z.fromBufferAttribute(j.SCALE, F), P.setMatrixAt(F, d.compose(n, W, z));
|
|
27689
27689
|
for (const F in j)
|
|
27690
27690
|
if (F === "_COLOR_0") {
|
|
27691
27691
|
const T = j[F];
|
|
@@ -27756,8 +27756,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
27756
27756
|
return new Promise(function(V, J) {
|
|
27757
27757
|
i.decodeDracoFile(g, function(N) {
|
|
27758
27758
|
for (const L in N.attributes) {
|
|
27759
|
-
const d = N.attributes[L],
|
|
27760
|
-
|
|
27759
|
+
const d = N.attributes[L], n = j[L];
|
|
27760
|
+
n !== void 0 && (d.normalized = n);
|
|
27761
27761
|
}
|
|
27762
27762
|
V(N);
|
|
27763
27763
|
}, l, D, TC, J);
|
|
@@ -27789,10 +27789,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
27789
27789
|
return I;
|
|
27790
27790
|
}
|
|
27791
27791
|
interpolate_(A, I, C, i) {
|
|
27792
|
-
const w = this.resultBuffer, Z = this.sampleValues, l = this.valueSize, j = l * 2, D = l * 3, g = i - I, V = (C - I) / g, J = V * V, N = J * V, L = A * D, d = L - D,
|
|
27792
|
+
const w = this.resultBuffer, Z = this.sampleValues, l = this.valueSize, j = l * 2, D = l * 3, g = i - I, V = (C - I) / g, J = V * V, N = J * V, L = A * D, d = L - D, n = -2 * N + 3 * J, W = N - J, z = 1 - n, P = W - J + V;
|
|
27793
27793
|
for (let F = 0; F !== l; F++) {
|
|
27794
27794
|
const T = Z[d + F + l], e = Z[d + F + j] * g, a = Z[L + F + l], o = Z[L + F] * g;
|
|
27795
|
-
w[F] = z * T + P * e +
|
|
27795
|
+
w[F] = z * T + P * e + n * a + W * o;
|
|
27796
27796
|
}
|
|
27797
27797
|
return w;
|
|
27798
27798
|
}
|
|
@@ -28177,24 +28177,24 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
28177
28177
|
const w = [];
|
|
28178
28178
|
return i.bufferView !== void 0 ? w.push(this.getDependency("bufferView", i.bufferView)) : w.push(null), i.sparse !== void 0 && (w.push(this.getDependency("bufferView", i.sparse.indices.bufferView)), w.push(this.getDependency("bufferView", i.sparse.values.bufferView))), Promise.all(w).then(function(Z) {
|
|
28179
28179
|
const l = Z[0], j = Tl[i.type], D = qi[i.componentType], g = D.BYTES_PER_ELEMENT, V = g * j, J = i.byteOffset || 0, N = i.bufferView !== void 0 ? C.bufferViews[i.bufferView].byteStride : void 0, L = i.normalized === true;
|
|
28180
|
-
let d,
|
|
28180
|
+
let d, n;
|
|
28181
28181
|
if (N && N !== V) {
|
|
28182
|
-
const
|
|
28182
|
+
const W = Math.floor(J / N), z = "InterleavedBuffer:" + i.bufferView + ":" + i.componentType + ":" + W + ":" + i.count;
|
|
28183
28183
|
let P = I.cache.get(z);
|
|
28184
|
-
P || (d = new D(l,
|
|
28184
|
+
P || (d = new D(l, W * N, i.count * N / g), P = new HU(d, N / g), I.cache.add(z, P)), n = new ni(P, j, J % N / g, L);
|
|
28185
28185
|
} else
|
|
28186
|
-
l === null ? d = new D(i.count * j) : d = new D(l, J, i.count * j),
|
|
28186
|
+
l === null ? d = new D(i.count * j) : d = new D(l, J, i.count * j), n = new FC(d, j, L);
|
|
28187
28187
|
if (i.sparse !== void 0) {
|
|
28188
|
-
const
|
|
28189
|
-
l !== null && (
|
|
28188
|
+
const W = Tl.SCALAR, z = qi[i.sparse.indices.componentType], P = i.sparse.indices.byteOffset || 0, F = i.sparse.values.byteOffset || 0, T = new z(Z[1], P, i.sparse.count * W), e = new D(Z[2], F, i.sparse.count * j);
|
|
28189
|
+
l !== null && (n = new FC(n.array.slice(), n.itemSize, n.normalized)), n.normalized = false;
|
|
28190
28190
|
for (let a = 0, o = T.length; a < o; a++) {
|
|
28191
28191
|
const E = T[a];
|
|
28192
|
-
if (
|
|
28192
|
+
if (n.setX(E, e[a * j]), j >= 2 && n.setY(E, e[a * j + 1]), j >= 3 && n.setZ(E, e[a * j + 2]), j >= 4 && n.setW(E, e[a * j + 3]), j >= 5)
|
|
28193
28193
|
throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
28194
28194
|
}
|
|
28195
|
-
|
|
28195
|
+
n.normalized = L;
|
|
28196
28196
|
}
|
|
28197
|
-
return
|
|
28197
|
+
return n;
|
|
28198
28198
|
});
|
|
28199
28199
|
}
|
|
28200
28200
|
loadTexture(A) {
|
|
@@ -28243,8 +28243,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
28243
28243
|
return new Promise(function(J, N) {
|
|
28244
28244
|
let L = J;
|
|
28245
28245
|
I.isImageBitmapLoader === true && (L = function(d) {
|
|
28246
|
-
const
|
|
28247
|
-
|
|
28246
|
+
const n = new pD(d);
|
|
28247
|
+
n.needsUpdate = true, J(n);
|
|
28248
28248
|
}), I.load(Tw.resolveURL(V, w.path), L, void 0, N);
|
|
28249
28249
|
});
|
|
28250
28250
|
}).then(function(V) {
|
|
@@ -28364,22 +28364,22 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
28364
28364
|
return l.push(I.loadGeometries(Z)), Promise.all(l).then(function(j) {
|
|
28365
28365
|
const D = j.slice(0, j.length - 1), g = j[j.length - 1], V = [];
|
|
28366
28366
|
for (let N = 0, L = g.length; N < L; N++) {
|
|
28367
|
-
const d = g[N],
|
|
28368
|
-
let
|
|
28367
|
+
const d = g[N], n = Z[N];
|
|
28368
|
+
let W;
|
|
28369
28369
|
const z = D[N];
|
|
28370
|
-
if (
|
|
28371
|
-
|
|
28372
|
-
else if (
|
|
28373
|
-
|
|
28374
|
-
else if (
|
|
28375
|
-
|
|
28376
|
-
else if (
|
|
28377
|
-
|
|
28378
|
-
else if (
|
|
28379
|
-
|
|
28370
|
+
if (n.mode === DC.TRIANGLES || n.mode === DC.TRIANGLE_STRIP || n.mode === DC.TRIANGLE_FAN || n.mode === void 0)
|
|
28371
|
+
W = w.isSkinnedMesh === true ? new fU(d, z) : new nA(d, z), W.isSkinnedMesh === true && W.normalizeSkinWeights(), n.mode === DC.TRIANGLE_STRIP ? W.geometry = vg(W.geometry, gV) : n.mode === DC.TRIANGLE_FAN && (W.geometry = vg(W.geometry, El));
|
|
28372
|
+
else if (n.mode === DC.LINES)
|
|
28373
|
+
W = new KU(d, z);
|
|
28374
|
+
else if (n.mode === DC.LINE_STRIP)
|
|
28375
|
+
W = new xC(d, z);
|
|
28376
|
+
else if (n.mode === DC.LINE_LOOP)
|
|
28377
|
+
W = new qU(d, z);
|
|
28378
|
+
else if (n.mode === DC.POINTS)
|
|
28379
|
+
W = new _U(d, z);
|
|
28380
28380
|
else
|
|
28381
|
-
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " +
|
|
28382
|
-
Object.keys(
|
|
28381
|
+
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + n.mode);
|
|
28382
|
+
Object.keys(W.geometry.morphAttributes).length > 0 && Fz(W, w), W.name = I.createUniqueName(w.name || "mesh_" + A), OC(W, w), n.extensions && Ui(i, W, n), I.assignFinalMaterial(W), V.push(W);
|
|
28383
28383
|
}
|
|
28384
28384
|
for (let N = 0, L = V.length; N < L; N++)
|
|
28385
28385
|
I.associations.set(V[N], {
|
|
@@ -28427,8 +28427,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
28427
28427
|
loadAnimation(A) {
|
|
28428
28428
|
const I = this.json, C = this, i = I.animations[A], w = i.name ? i.name : "animation_" + A, Z = [], l = [], j = [], D = [], g = [];
|
|
28429
28429
|
for (let V = 0, J = i.channels.length; V < J; V++) {
|
|
28430
|
-
const N = i.channels[V], L = i.samplers[N.sampler], d = N.target,
|
|
28431
|
-
d.node !== void 0 && (Z.push(this.getDependency("node",
|
|
28430
|
+
const N = i.channels[V], L = i.samplers[N.sampler], d = N.target, n = d.node, W = i.parameters !== void 0 ? i.parameters[L.input] : L.input, z = i.parameters !== void 0 ? i.parameters[L.output] : L.output;
|
|
28431
|
+
d.node !== void 0 && (Z.push(this.getDependency("node", n)), l.push(this.getDependency("accessor", W)), j.push(this.getDependency("accessor", z)), D.push(L), g.push(d));
|
|
28432
28432
|
}
|
|
28433
28433
|
return Promise.all([
|
|
28434
28434
|
Promise.all(Z),
|
|
@@ -28437,18 +28437,18 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
28437
28437
|
Promise.all(D),
|
|
28438
28438
|
Promise.all(g)
|
|
28439
28439
|
]).then(function(V) {
|
|
28440
|
-
const J = V[0], N = V[1], L = V[2], d = V[3],
|
|
28440
|
+
const J = V[0], N = V[1], L = V[2], d = V[3], n = V[4], W = [];
|
|
28441
28441
|
for (let P = 0, F = J.length; P < F; P++) {
|
|
28442
|
-
const T = J[P], e = N[P], a = L[P], o = d[P], E =
|
|
28442
|
+
const T = J[P], e = N[P], a = L[P], o = d[P], E = n[P];
|
|
28443
28443
|
if (T === void 0)
|
|
28444
28444
|
continue;
|
|
28445
28445
|
T.updateMatrix && T.updateMatrix();
|
|
28446
28446
|
const u = C._createAnimationTracks(T, e, a, o, E);
|
|
28447
28447
|
if (u)
|
|
28448
28448
|
for (let K = 0; K < u.length; K++)
|
|
28449
|
-
|
|
28449
|
+
W.push(u[K]);
|
|
28450
28450
|
}
|
|
28451
|
-
const z = new CW(w, void 0,
|
|
28451
|
+
const z = new CW(w, void 0, W);
|
|
28452
28452
|
return OC(z, i), z;
|
|
28453
28453
|
});
|
|
28454
28454
|
}
|
|
@@ -29419,26 +29419,26 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29419
29419
|
return D.setAttribute("position", new Q.Float32BufferAttribute(w, 3)), D.setAttribute("normal", new Q.Float32BufferAttribute(Z, 3)), D.setAttribute("uv", new Q.Float32BufferAttribute(l, 2)), D.setIndex(j), D;
|
|
29420
29420
|
}
|
|
29421
29421
|
emitCube(A, I, C, i, w, Z, l) {
|
|
29422
|
-
const [j, D, g] = A.origin, [V, J, N] = A.dimensions, L = j / 16, d = D / 16,
|
|
29422
|
+
const [j, D, g] = A.origin, [V, J, N] = A.dimensions, L = j / 16, d = D / 16, n = g / 16, W = (j + V) / 16, z = (D + J) / 16, P = (g + N) / 16, T = [
|
|
29423
29423
|
[
|
|
29424
29424
|
L,
|
|
29425
29425
|
d,
|
|
29426
|
-
|
|
29426
|
+
n
|
|
29427
29427
|
],
|
|
29428
29428
|
[
|
|
29429
|
-
|
|
29429
|
+
W,
|
|
29430
29430
|
d,
|
|
29431
|
-
|
|
29431
|
+
n
|
|
29432
29432
|
],
|
|
29433
29433
|
[
|
|
29434
|
-
|
|
29434
|
+
W,
|
|
29435
29435
|
z,
|
|
29436
|
-
|
|
29436
|
+
n
|
|
29437
29437
|
],
|
|
29438
29438
|
[
|
|
29439
29439
|
L,
|
|
29440
29440
|
z,
|
|
29441
|
-
|
|
29441
|
+
n
|
|
29442
29442
|
],
|
|
29443
29443
|
[
|
|
29444
29444
|
L,
|
|
@@ -29446,12 +29446,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29446
29446
|
P
|
|
29447
29447
|
],
|
|
29448
29448
|
[
|
|
29449
|
-
|
|
29449
|
+
W,
|
|
29450
29450
|
d,
|
|
29451
29451
|
P
|
|
29452
29452
|
],
|
|
29453
29453
|
[
|
|
29454
|
-
|
|
29454
|
+
W,
|
|
29455
29455
|
z,
|
|
29456
29456
|
P
|
|
29457
29457
|
],
|
|
@@ -29530,27 +29530,27 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29530
29530
|
];
|
|
29531
29531
|
break;
|
|
29532
29532
|
}
|
|
29533
|
-
const
|
|
29533
|
+
const n = J / g, W = N / V, z = L / g, P = d / V;
|
|
29534
29534
|
return C === "up" ? i ? [
|
|
29535
29535
|
[
|
|
29536
29536
|
z,
|
|
29537
29537
|
P
|
|
29538
29538
|
],
|
|
29539
29539
|
[
|
|
29540
|
-
|
|
29540
|
+
n,
|
|
29541
29541
|
P
|
|
29542
29542
|
],
|
|
29543
29543
|
[
|
|
29544
|
-
|
|
29545
|
-
|
|
29544
|
+
n,
|
|
29545
|
+
W
|
|
29546
29546
|
],
|
|
29547
29547
|
[
|
|
29548
29548
|
z,
|
|
29549
|
-
|
|
29549
|
+
W
|
|
29550
29550
|
]
|
|
29551
29551
|
] : [
|
|
29552
29552
|
[
|
|
29553
|
-
|
|
29553
|
+
n,
|
|
29554
29554
|
P
|
|
29555
29555
|
],
|
|
29556
29556
|
[
|
|
@@ -29559,40 +29559,40 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29559
29559
|
],
|
|
29560
29560
|
[
|
|
29561
29561
|
z,
|
|
29562
|
-
|
|
29562
|
+
W
|
|
29563
29563
|
],
|
|
29564
29564
|
[
|
|
29565
|
-
|
|
29566
|
-
|
|
29565
|
+
n,
|
|
29566
|
+
W
|
|
29567
29567
|
]
|
|
29568
29568
|
] : i ? [
|
|
29569
29569
|
[
|
|
29570
|
-
|
|
29571
|
-
|
|
29570
|
+
n,
|
|
29571
|
+
W
|
|
29572
29572
|
],
|
|
29573
29573
|
[
|
|
29574
29574
|
z,
|
|
29575
|
-
|
|
29575
|
+
W
|
|
29576
29576
|
],
|
|
29577
29577
|
[
|
|
29578
29578
|
z,
|
|
29579
29579
|
P
|
|
29580
29580
|
],
|
|
29581
29581
|
[
|
|
29582
|
-
|
|
29582
|
+
n,
|
|
29583
29583
|
P
|
|
29584
29584
|
]
|
|
29585
29585
|
] : [
|
|
29586
29586
|
[
|
|
29587
29587
|
z,
|
|
29588
|
-
|
|
29588
|
+
W
|
|
29589
29589
|
],
|
|
29590
29590
|
[
|
|
29591
|
-
|
|
29592
|
-
|
|
29591
|
+
n,
|
|
29592
|
+
W
|
|
29593
29593
|
],
|
|
29594
29594
|
[
|
|
29595
|
-
|
|
29595
|
+
n,
|
|
29596
29596
|
P
|
|
29597
29597
|
],
|
|
29598
29598
|
[
|
|
@@ -29674,9 +29674,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29674
29674
|
const D = j % 16, g = Math.floor(j / 16), V = D * i, J = g * w;
|
|
29675
29675
|
let N = 0, L = false;
|
|
29676
29676
|
for (let d = 0; d < w; d++)
|
|
29677
|
-
for (let
|
|
29678
|
-
const
|
|
29679
|
-
|
|
29677
|
+
for (let n = 0; n < i; n++) {
|
|
29678
|
+
const W = ((J + d) * I + (V + n)) * 4;
|
|
29679
|
+
W + 3 < Z.length && Z[W + 3] > 0 && (N = Math.max(N, n + 1), L = true);
|
|
29680
29680
|
}
|
|
29681
29681
|
l[j] = L ? Math.min(N + 1, i) : Math.floor(i / 2);
|
|
29682
29682
|
}
|
|
@@ -29696,8 +29696,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29696
29696
|
for (let N = 0; N < j; N++) {
|
|
29697
29697
|
const L = Math.floor(N / Z);
|
|
29698
29698
|
for (let d = 0; d < l; d++) {
|
|
29699
|
-
const
|
|
29700
|
-
D[z] = A.data[
|
|
29699
|
+
const n = Math.floor(d / Z), W = (L * A.width + n) * 4, z = (N * l + d) * 4;
|
|
29700
|
+
D[z] = A.data[W], D[z + 1] = A.data[W + 1], D[z + 2] = A.data[W + 2], D[z + 3] = A.data[W + 3];
|
|
29701
29701
|
}
|
|
29702
29702
|
}
|
|
29703
29703
|
const g = this.fontData;
|
|
@@ -29735,9 +29735,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29735
29735
|
24,
|
|
29736
29736
|
12
|
|
29737
29737
|
]
|
|
29738
|
-
], L = Math.max(1, C.slice(0, 4).filter((
|
|
29739
|
-
for (const [
|
|
29740
|
-
const F = Math.round(
|
|
29738
|
+
], L = Math.max(1, C.slice(0, 4).filter((n) => n !== "" && n.trim() !== "").length), d = A.width / _g[0];
|
|
29739
|
+
for (const [n, W, z, P] of N) {
|
|
29740
|
+
const F = Math.round(n * d * Z), T = Math.round(W * d * Z), e = Math.round(z * d * Z), a = Math.round(P * d * Z), o = Math.floor(a / 4), E = Math.max(1, Math.floor(Math.min(o, Math.floor(g.cellH * Z / 2)) / g.cellH)), u = Math.floor(Math.max(0, 4 - L) * o / 2);
|
|
29741
29741
|
let K = 0;
|
|
29742
29742
|
for (const y of C.slice(0, 4)) {
|
|
29743
29743
|
if (y === "" || y.trim() === "")
|
|
@@ -29798,16 +29798,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29798
29798
|
1
|
|
29799
29799
|
]
|
|
29800
29800
|
];
|
|
29801
|
-
let
|
|
29802
|
-
for (const
|
|
29803
|
-
const z = C.glyphWidths[
|
|
29804
|
-
if (
|
|
29801
|
+
let n = g;
|
|
29802
|
+
for (const W of N) {
|
|
29803
|
+
const z = C.glyphWidths[W] * i;
|
|
29804
|
+
if (n + z > j)
|
|
29805
29805
|
break;
|
|
29806
29806
|
for (const [P, F] of d) {
|
|
29807
|
-
const T =
|
|
29808
|
-
T >= 0 && e >= 0 && this.blitGlyph(A, I, C, i,
|
|
29807
|
+
const T = n + P, e = l + F;
|
|
29808
|
+
T >= 0 && e >= 0 && this.blitGlyph(A, I, C, i, W, L, T, e, j);
|
|
29809
29809
|
}
|
|
29810
|
-
|
|
29810
|
+
n += z;
|
|
29811
29811
|
}
|
|
29812
29812
|
}
|
|
29813
29813
|
for (const L of N) {
|
|
@@ -29820,16 +29820,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29820
29820
|
}
|
|
29821
29821
|
blitGlyph(A, I, C, i, w, Z, l, j, D) {
|
|
29822
29822
|
const g = C.cellH * i, V = C.glyphWidths[w] * i, J = w % 16, N = Math.floor(w / 16), L = J * C.cellW, d = N * C.cellH;
|
|
29823
|
-
for (let
|
|
29824
|
-
const
|
|
29823
|
+
for (let n = 0; n < g; n++) {
|
|
29824
|
+
const W = Math.floor(n / i);
|
|
29825
29825
|
for (let z = 0; z < V; z++) {
|
|
29826
|
-
const P = Math.floor(z / i), F = ((d +
|
|
29826
|
+
const P = Math.floor(z / i), F = ((d + W) * C.width + (L + P)) * 4;
|
|
29827
29827
|
if (F + 3 >= C.pixels.length)
|
|
29828
29828
|
continue;
|
|
29829
29829
|
const T = C.pixels[F + 3];
|
|
29830
29830
|
if (T === 0)
|
|
29831
29831
|
continue;
|
|
29832
|
-
const e = l + z, a = j +
|
|
29832
|
+
const e = l + z, a = j + n;
|
|
29833
29833
|
if (e >= D)
|
|
29834
29834
|
break;
|
|
29835
29835
|
const o = (a * I + e) * 4;
|
|
@@ -30041,17 +30041,17 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30041
30041
|
for (const J of Object.keys(C.variants)) {
|
|
30042
30042
|
if (J === "")
|
|
30043
30043
|
continue;
|
|
30044
|
-
const N = J.split(",").map((
|
|
30045
|
-
const [
|
|
30044
|
+
const N = J.split(",").map((n) => {
|
|
30045
|
+
const [W, z] = n.split("=");
|
|
30046
30046
|
return {
|
|
30047
|
-
name:
|
|
30047
|
+
name: W,
|
|
30048
30048
|
value: z
|
|
30049
30049
|
};
|
|
30050
30050
|
});
|
|
30051
30051
|
let L = 0, d = true;
|
|
30052
|
-
for (const [
|
|
30053
|
-
const z = N.find((P) => P.name ===
|
|
30054
|
-
if (z && z.value ===
|
|
30052
|
+
for (const [n, W] of D) {
|
|
30053
|
+
const z = N.find((P) => P.name === n);
|
|
30054
|
+
if (z && z.value === W)
|
|
30055
30055
|
L++;
|
|
30056
30056
|
else if (z) {
|
|
30057
30057
|
d = false;
|
|
@@ -30128,28 +30128,28 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30128
30128
|
}
|
|
30129
30129
|
}
|
|
30130
30130
|
function qF(U) {
|
|
30131
|
-
const A = U.filter((
|
|
30131
|
+
const A = U.filter((n) => n.attributes.position && n.attributes.position.count > 0 && n.index && n.index.count > 0);
|
|
30132
30132
|
if (A.length === 0)
|
|
30133
30133
|
return new Q.BufferGeometry();
|
|
30134
30134
|
if (A.length === 1)
|
|
30135
30135
|
return A[0].clone();
|
|
30136
30136
|
let I = 0, C = 0, i = true, w = true;
|
|
30137
|
-
for (const
|
|
30138
|
-
I +=
|
|
30137
|
+
for (const n of A)
|
|
30138
|
+
I += n.attributes.position.count, C += n.index ? n.index.count : n.attributes.position.count, n.attributes.normal || (i = false), n.attributes.uv || (w = false);
|
|
30139
30139
|
const Z = A[0].attributes.position.itemSize, l = i ? A[0].attributes.normal.itemSize : 3, j = w ? A[0].attributes.uv.itemSize : 2, D = new Float32Array(I * Z), g = i ? new Float32Array(I * l) : null, V = w ? new Float32Array(I * j) : null, J = I > 65535 ? new Uint32Array(C) : new Uint16Array(C);
|
|
30140
30140
|
let N = 0, L = 0;
|
|
30141
|
-
for (const
|
|
30142
|
-
const
|
|
30143
|
-
D.set(
|
|
30144
|
-
const z =
|
|
30141
|
+
for (const n of A) {
|
|
30142
|
+
const W = n.attributes.position.count;
|
|
30143
|
+
D.set(n.attributes.position.array, N * Z), g && g.set(n.attributes.normal.array, N * l), V && V.set(n.attributes.uv.array, N * j);
|
|
30144
|
+
const z = n.index;
|
|
30145
30145
|
if (z) {
|
|
30146
30146
|
const P = z.array;
|
|
30147
30147
|
for (let F = 0; F < P.length; F++)
|
|
30148
30148
|
J[L++] = P[F] + N;
|
|
30149
30149
|
} else
|
|
30150
|
-
for (let P = 0; P <
|
|
30150
|
+
for (let P = 0; P < W; P++)
|
|
30151
30151
|
J[L++] = N + P;
|
|
30152
|
-
N +=
|
|
30152
|
+
N += W;
|
|
30153
30153
|
}
|
|
30154
30154
|
const d = new Q.BufferGeometry();
|
|
30155
30155
|
return d.setAttribute("position", new Q.BufferAttribute(D, Z)), g && d.setAttribute("normal", new Q.BufferAttribute(g, l)), V && d.setAttribute("uv", new Q.BufferAttribute(V, j)), d.setIndex(new Q.BufferAttribute(J, 1)), i || d.computeVertexNormals(), d;
|
|
@@ -30172,13 +30172,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30172
30172
|
for (const g of A.elements)
|
|
30173
30173
|
try {
|
|
30174
30174
|
const V = await this.createElementGeometries(g, A, I, w, i);
|
|
30175
|
-
for (const { geometry: J, material: N, materialKey: L, isLiquid: d, isWater:
|
|
30175
|
+
for (const { geometry: J, material: N, materialKey: L, isLiquid: d, isWater: n, isLava: W } of V) {
|
|
30176
30176
|
j.has(L) || j.set(L, {
|
|
30177
30177
|
geometry: new Q.BufferGeometry(),
|
|
30178
30178
|
material: N,
|
|
30179
30179
|
isLiquid: d,
|
|
30180
|
-
isWater:
|
|
30181
|
-
isLava:
|
|
30180
|
+
isWater: n,
|
|
30181
|
+
isLava: W
|
|
30182
30182
|
});
|
|
30183
30183
|
const z = j.get(L);
|
|
30184
30184
|
z.geometry.attributes.position && z.geometry.attributes.position.count > 0 ? z.geometry = this.mergeGeometries([
|
|
@@ -30334,16 +30334,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30334
30334
|
continue;
|
|
30335
30335
|
const N = await this.createTempFaceGeometry(V, j, J, w);
|
|
30336
30336
|
let L = this.assetLoader.resolveTexture(J.texture, i);
|
|
30337
|
-
const d = this.isWaterBlock(Z),
|
|
30338
|
-
d ? L = V === "up" ? "block/water_still" : "block/water_flow" :
|
|
30339
|
-
const z = await this.createFaceMaterial(L, V, J, i, Z, l, j,
|
|
30337
|
+
const d = this.isWaterBlock(Z), n = this.isLavaBlock(Z), W = d || n;
|
|
30338
|
+
d ? L = V === "up" ? "block/water_still" : "block/water_flow" : n && (L = V === "up" ? "block/lava_still" : "block/lava_flow");
|
|
30339
|
+
const z = await this.createFaceMaterial(L, V, J, i, Z, l, j, W, d, n), P = this.getMaterialKey(L, V, J, Z, l);
|
|
30340
30340
|
D.has(P) || D.set(P, {
|
|
30341
30341
|
faces: [],
|
|
30342
30342
|
material: z,
|
|
30343
30343
|
materialKey: P,
|
|
30344
|
-
isLiquid:
|
|
30344
|
+
isLiquid: W,
|
|
30345
30345
|
isWater: d,
|
|
30346
|
-
isLava:
|
|
30346
|
+
isLava: n,
|
|
30347
30347
|
texturePath: L
|
|
30348
30348
|
}), D.get(P).faces.push({
|
|
30349
30349
|
direction: V,
|
|
@@ -30450,9 +30450,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30450
30450
|
const N = D.vertices[J], L = g, d = [
|
|
30451
30451
|
D.uvs[J * 2],
|
|
30452
30452
|
D.uvs[J * 2 + 1]
|
|
30453
|
-
],
|
|
30454
|
-
let
|
|
30455
|
-
Z.has(
|
|
30453
|
+
], n = `${N[0].toFixed(6)},${N[1].toFixed(6)},${N[2].toFixed(6)},${L[0]},${L[1]},${L[2]},${d[0].toFixed(6)},${d[1].toFixed(6)}`;
|
|
30454
|
+
let W;
|
|
30455
|
+
Z.has(n) ? W = Z.get(n) : (W = l++, Z.set(n, W), I.push(...N), C.push(...L), i.push(...d)), V.push(W);
|
|
30456
30456
|
}
|
|
30457
30457
|
for (let J = 0; J < D.indices.length; J += 3)
|
|
30458
30458
|
w.push(V[D.indices[J]], V[D.indices[J + 1]], V[D.indices[J + 2]]);
|
|
@@ -30567,31 +30567,31 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30567
30567
|
]);
|
|
30568
30568
|
let d = C.rotation || 0;
|
|
30569
30569
|
if (i.uvlock !== true) {
|
|
30570
|
-
const
|
|
30570
|
+
const n = i.y || 0;
|
|
30571
30571
|
switch (I) {
|
|
30572
30572
|
case "up":
|
|
30573
|
-
d +=
|
|
30573
|
+
d += n;
|
|
30574
30574
|
break;
|
|
30575
30575
|
case "down":
|
|
30576
|
-
d -=
|
|
30576
|
+
d -= n;
|
|
30577
30577
|
break;
|
|
30578
30578
|
case "north":
|
|
30579
|
-
d +=
|
|
30579
|
+
d += n;
|
|
30580
30580
|
break;
|
|
30581
30581
|
case "south":
|
|
30582
|
-
d -=
|
|
30582
|
+
d -= n;
|
|
30583
30583
|
break;
|
|
30584
30584
|
case "east":
|
|
30585
|
-
d +=
|
|
30585
|
+
d += n;
|
|
30586
30586
|
break;
|
|
30587
30587
|
case "west":
|
|
30588
|
-
d -=
|
|
30588
|
+
d -= n;
|
|
30589
30589
|
break;
|
|
30590
30590
|
}
|
|
30591
30591
|
}
|
|
30592
30592
|
if (d = (d % 360 + 360) % 360, d !== 0) {
|
|
30593
|
-
const
|
|
30594
|
-
this.applyUVRotation(L,
|
|
30593
|
+
const n = Math.round(d / 90) * 90;
|
|
30594
|
+
this.applyUVRotation(L, n);
|
|
30595
30595
|
}
|
|
30596
30596
|
w.array.set(L), w.needsUpdate = true;
|
|
30597
30597
|
}
|
|
@@ -30652,12 +30652,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30652
30652
|
const d = A.faces[L];
|
|
30653
30653
|
if (!d)
|
|
30654
30654
|
continue;
|
|
30655
|
-
const { geometry:
|
|
30656
|
-
this.applyElementTransforms(
|
|
30655
|
+
const { geometry: n, material: W } = await this.createFaceGeometry(L, V, d, I, C, i, w);
|
|
30656
|
+
this.applyElementTransforms(n, A, J);
|
|
30657
30657
|
const z = this.canFaceBeBatched(A, d, L);
|
|
30658
30658
|
Z.push({
|
|
30659
|
-
geometry:
|
|
30660
|
-
material:
|
|
30659
|
+
geometry: n,
|
|
30660
|
+
material: W,
|
|
30661
30661
|
direction: L,
|
|
30662
30662
|
cullface: d.cullface,
|
|
30663
30663
|
elementBounds: [
|
|
@@ -30685,16 +30685,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30685
30685
|
if (A.translate(-Z, -l, -j), I.rotation.rescale) {
|
|
30686
30686
|
const g = I.rotation.angle * Math.PI / 180, V = 1 / Math.cos(g), J = A.attributes.position, N = J.array;
|
|
30687
30687
|
for (let L = 0; L < N.length; L += 3) {
|
|
30688
|
-
const d = N[L],
|
|
30688
|
+
const d = N[L], n = N[L + 1], W = N[L + 2];
|
|
30689
30689
|
switch (I.rotation.axis) {
|
|
30690
30690
|
case "x":
|
|
30691
|
-
N[L + 1] =
|
|
30691
|
+
N[L + 1] = n * V, N[L + 2] = W * V;
|
|
30692
30692
|
break;
|
|
30693
30693
|
case "y":
|
|
30694
|
-
N[L] = d * V, N[L + 2] =
|
|
30694
|
+
N[L] = d * V, N[L + 2] = W * V;
|
|
30695
30695
|
break;
|
|
30696
30696
|
case "z":
|
|
30697
|
-
N[L] = d * V, N[L + 1] =
|
|
30697
|
+
N[L] = d * V, N[L + 1] = n * V;
|
|
30698
30698
|
break;
|
|
30699
30699
|
}
|
|
30700
30700
|
}
|
|
@@ -30739,14 +30739,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30739
30739
|
forceAnimation: j,
|
|
30740
30740
|
biome: Z,
|
|
30741
30741
|
useAtlas: J
|
|
30742
|
-
},
|
|
30743
|
-
return !(A.includes("redstone_torch") || A.includes("lit")) && (z || P || C.cullface === void 0 && !j) ?
|
|
30744
|
-
...
|
|
30745
|
-
}, D && (
|
|
30742
|
+
}, n = await this.assetLoader.getMaterial(A, d), W = n.clone(), z = l && (l[0] < 0.01 || l[1] < 0.01 || l[2] < 0.01), P = A.includes("pane") || A.includes("fence") || A.includes("rail") || A.includes("ladder") || A.includes("chain") || A.includes("bars");
|
|
30743
|
+
return !(A.includes("redstone_torch") || A.includes("lit")) && (z || P || C.cullface === void 0 && !j) ? W.side = Q.DoubleSide : W.side = Q.FrontSide, W.transparent = n.transparent, W.alphaTest = n.alphaTest, W.depthWrite = n.depthWrite, W.opacity = n.opacity, W.userData = {
|
|
30744
|
+
...n.userData
|
|
30745
|
+
}, D && (W.userData.isWater = true, W.userData.faceDirection = I, W.userData.renderToWaterPass = true), g && (W.userData.isLava = true, W.userData.faceDirection = I, W.userData.renderToLavaPass = true, W.userData.lavaAnimationParams = {
|
|
30746
30746
|
pulseSpeed: 0.4,
|
|
30747
30747
|
pulseMin: 0.4,
|
|
30748
30748
|
pulseMax: 0.6
|
|
30749
|
-
}), j && (
|
|
30749
|
+
}), j && (W.userData.isLiquid = true), W;
|
|
30750
30750
|
} catch (V) {
|
|
30751
30751
|
console.warn(`Failed to create material for ${A}:`, V);
|
|
30752
30752
|
const J = new Q.MeshStandardMaterial({
|
|
@@ -32733,14 +32733,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32733
32733
|
this.group.rotation.set(0, 0, 0), this.group.scale.set(1, 1, 1);
|
|
32734
32734
|
const w = this.activeRegion.getBoxes(), Z = 5e-3;
|
|
32735
32735
|
for (const l of w) {
|
|
32736
|
-
const j = new Q.Vector3(l.min[0], l.min[1], l.min[2]), D = new Q.Vector3(l.max[0], l.max[1], l.max[2]), g = D.x - j.x + 1, V = D.y - j.y + 1, J = D.z - j.z + 1, L = new Q.Vector3(j.x + g / 2 - 0.5, j.y + V / 2 - 0.5, j.z + J / 2 - 0.5).clone().sub(i), d = new Q.BoxGeometry(g + Z, V + Z, J + Z),
|
|
32736
|
+
const j = new Q.Vector3(l.min[0], l.min[1], l.min[2]), D = new Q.Vector3(l.max[0], l.max[1], l.max[2]), g = D.x - j.x + 1, V = D.y - j.y + 1, J = D.z - j.z + 1, L = new Q.Vector3(j.x + g / 2 - 0.5, j.y + V / 2 - 0.5, j.z + J / 2 - 0.5).clone().sub(i), d = new Q.BoxGeometry(g + Z, V + Z, J + Z), n = new Q.MeshBasicMaterial({
|
|
32737
32737
|
color: this.color,
|
|
32738
32738
|
opacity: this.opacity,
|
|
32739
32739
|
transparent: true,
|
|
32740
32740
|
depthWrite: false,
|
|
32741
32741
|
side: Q.DoubleSide
|
|
32742
|
-
}),
|
|
32743
|
-
|
|
32742
|
+
}), W = new Q.Mesh(d, n);
|
|
32743
|
+
W.position.copy(L), this.group.add(W), this.meshes.push(W);
|
|
32744
32744
|
const z = new Q.EdgesGeometry(d), P = new Q.LineBasicMaterial({
|
|
32745
32745
|
color: this.color,
|
|
32746
32746
|
linewidth: 2
|
|
@@ -32982,7 +32982,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32982
32982
|
const P = N.color;
|
|
32983
32983
|
P.startsWith("#") && (L = parseInt(P.slice(1), 16));
|
|
32984
32984
|
}
|
|
32985
|
-
const
|
|
32985
|
+
const n = `${A}_defRegion_${g}`, W = this.createRegion(n, {
|
|
32986
32986
|
x: J.min[0],
|
|
32987
32987
|
y: J.min[1],
|
|
32988
32988
|
z: J.min[2]
|
|
@@ -32994,9 +32994,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32994
32994
|
color: L,
|
|
32995
32995
|
opacity: d
|
|
32996
32996
|
});
|
|
32997
|
-
|
|
32997
|
+
W.setBaseRegion(V);
|
|
32998
32998
|
const z = V.getBoxes();
|
|
32999
|
-
z.length > 1 && console.log(`[RegionManager] Region '${g}' has ${z.length} boxes.`),
|
|
32999
|
+
z.length > 1 && console.log(`[RegionManager] Region '${g}' has ${z.length} boxes.`), W.definitionMetadata = N, W.originalRegionName = g, D.add(n), j.push(n), l && W.activate(), V.free();
|
|
33000
33000
|
} catch (V) {
|
|
33001
33001
|
console.error(`[RegionManager] Error loading definition region '${g}':`, V);
|
|
33002
33002
|
}
|
|
@@ -34011,42 +34011,44 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
34011
34011
|
swapped: [],
|
|
34012
34012
|
unchanged: []
|
|
34013
34013
|
}, J = w.get_palette();
|
|
34014
|
-
for (const
|
|
34015
|
-
const
|
|
34016
|
-
if (
|
|
34014
|
+
for (const d of w.blocks_indices()) {
|
|
34015
|
+
const n = d[0], W = d[1], z = d[2], P = this.paletteName(J, d[3]);
|
|
34016
|
+
if (P === null || el.has(P))
|
|
34017
34017
|
continue;
|
|
34018
|
-
const
|
|
34019
|
-
l.has(
|
|
34020
|
-
x:
|
|
34021
|
-
y:
|
|
34022
|
-
z
|
|
34023
|
-
}) : j.has(
|
|
34024
|
-
x:
|
|
34025
|
-
y:
|
|
34026
|
-
z
|
|
34027
|
-
}) : D.has(
|
|
34028
|
-
x:
|
|
34029
|
-
y:
|
|
34030
|
-
z
|
|
34018
|
+
const F = n + "," + W + "," + z;
|
|
34019
|
+
l.has(F) ? V.added.push({
|
|
34020
|
+
x: n,
|
|
34021
|
+
y: W,
|
|
34022
|
+
z
|
|
34023
|
+
}) : j.has(F) ? V.changed.push({
|
|
34024
|
+
x: n,
|
|
34025
|
+
y: W,
|
|
34026
|
+
z
|
|
34027
|
+
}) : D.has(F) ? V.swapped.push({
|
|
34028
|
+
x: n,
|
|
34029
|
+
y: W,
|
|
34030
|
+
z
|
|
34031
34031
|
}) : V.unchanged.push({
|
|
34032
|
-
x:
|
|
34033
|
-
y:
|
|
34034
|
-
z
|
|
34032
|
+
x: n,
|
|
34033
|
+
y: W,
|
|
34034
|
+
z
|
|
34035
34035
|
});
|
|
34036
34036
|
}
|
|
34037
|
-
|
|
34037
|
+
this.buildMeshes(V), this.frameCamera();
|
|
34038
|
+
const N = Number(Z.distance ?? 0), L = Number(Z.support ?? 0);
|
|
34039
|
+
return [
|
|
34038
34040
|
i,
|
|
34039
34041
|
w,
|
|
34040
34042
|
Z
|
|
34041
|
-
].forEach((
|
|
34043
|
+
].forEach((d) => {
|
|
34042
34044
|
var _a3;
|
|
34043
34045
|
try {
|
|
34044
|
-
(_a3 =
|
|
34046
|
+
(_a3 = d.free) == null ? void 0 : _a3.call(d);
|
|
34045
34047
|
} catch {
|
|
34046
34048
|
}
|
|
34047
34049
|
}), this.stats = {
|
|
34048
|
-
distance:
|
|
34049
|
-
support:
|
|
34050
|
+
distance: N,
|
|
34051
|
+
support: L,
|
|
34050
34052
|
added: V.added.length,
|
|
34051
34053
|
removed: V.removed.length,
|
|
34052
34054
|
changed: V.changed.length,
|