vis-core 0.28.38 → 0.28.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/command/SetValue.d.ts +2 -2
- package/dist/getVisConfig.d.ts +17 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/index.module.js +412 -361
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -14,7 +14,7 @@ var vn = (v, e) => (e = Symbol[v]) ? e : Symbol.for("Symbol." + v), Bn = (v) =>
|
|
|
14
14
|
}, Yi = (v, e) => Fn(v, An(e));
|
|
15
15
|
var m0 = (v, e, n) => Vn(v, typeof e != "symbol" ? e + "" : e, n);
|
|
16
16
|
var yn = (v, e, n) => Un(kn(v), n, e);
|
|
17
|
-
var
|
|
17
|
+
var V0 = (v, e, n) => new Promise((r, C) => {
|
|
18
18
|
var _ = (Se) => {
|
|
19
19
|
try {
|
|
20
20
|
O(n.next(Se));
|
|
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
|
|
|
63
63
|
Array.prototype.at || (Array.prototype.at = function(v) {
|
|
64
64
|
return v < 0 && (v = this.length + v), this[v];
|
|
65
65
|
});
|
|
66
|
-
const version = "0.28.
|
|
66
|
+
const version = "0.28.40", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
|
|
67
67
|
token: void 0,
|
|
68
68
|
getInfo() {
|
|
69
69
|
if (!this.token)
|
|
@@ -14528,7 +14528,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14528
14528
|
const Vt = Xt.holes;
|
|
14529
14529
|
if (!ShapeUtils.isClockWise(Zt)) {
|
|
14530
14530
|
Zt = Zt.reverse();
|
|
14531
|
-
for (let w0 = 0,
|
|
14531
|
+
for (let w0 = 0, P0 = Vt.length; w0 < P0; w0++) {
|
|
14532
14532
|
const U0 = Vt[w0];
|
|
14533
14533
|
ShapeUtils.isClockWise(U0) && (Vt[w0] = U0.reverse());
|
|
14534
14534
|
}
|
|
@@ -14553,18 +14553,18 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14553
14553
|
$t(Zt), Vt.forEach($t);
|
|
14554
14554
|
const i0 = Vt.length, Yt = Zt;
|
|
14555
14555
|
for (let w0 = 0; w0 < i0; w0++) {
|
|
14556
|
-
const
|
|
14557
|
-
Zt = Zt.concat(
|
|
14556
|
+
const P0 = Vt[w0];
|
|
14557
|
+
Zt = Zt.concat(P0);
|
|
14558
14558
|
}
|
|
14559
|
-
function Kt(w0,
|
|
14560
|
-
return
|
|
14559
|
+
function Kt(w0, P0, U0) {
|
|
14560
|
+
return P0 || console.error("THREE.ExtrudeGeometry: vec does not exist"), w0.clone().addScaledVector(P0, U0);
|
|
14561
14561
|
}
|
|
14562
14562
|
const Ft = Zt.length;
|
|
14563
|
-
function Wt(w0,
|
|
14563
|
+
function Wt(w0, P0, U0) {
|
|
14564
14564
|
let N0, J0, b0;
|
|
14565
|
-
const L0 = w0.x -
|
|
14565
|
+
const L0 = w0.x - P0.x, K0 = w0.y - P0.y, H0 = U0.x - w0.x, n0 = U0.y - w0.y, qt = L0 * L0 + K0 * K0, d0 = L0 * n0 - K0 * H0;
|
|
14566
14566
|
if (Math.abs(d0) > Number.EPSILON) {
|
|
14567
|
-
const g0 = Math.sqrt(qt), I0 = Math.sqrt(H0 * H0 + n0 * n0), C0 =
|
|
14567
|
+
const g0 = Math.sqrt(qt), I0 = Math.sqrt(H0 * H0 + n0 * n0), C0 = P0.x - K0 / g0, Ti = P0.y + L0 / g0, Q0 = U0.x - n0 / I0, Ri = U0.y + H0 / I0, Wi = ((Q0 - C0) * n0 - (Ri - Ti) * H0) / (L0 * n0 - K0 * H0);
|
|
14568
14568
|
N0 = C0 + L0 * Wi - w0.x, J0 = Ti + K0 * Wi - w0.y;
|
|
14569
14569
|
const bi = N0 * N0 + J0 * J0;
|
|
14570
14570
|
if (bi <= 2)
|
|
@@ -14577,11 +14577,11 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14577
14577
|
return new Vector2(N0 / b0, J0 / b0);
|
|
14578
14578
|
}
|
|
14579
14579
|
const e0 = [];
|
|
14580
|
-
for (let w0 = 0,
|
|
14581
|
-
U0 ===
|
|
14580
|
+
for (let w0 = 0, P0 = Yt.length, U0 = P0 - 1, N0 = w0 + 1; w0 < P0; w0++, U0++, N0++)
|
|
14581
|
+
U0 === P0 && (U0 = 0), N0 === P0 && (N0 = 0), e0[w0] = Wt(Yt[w0], Yt[U0], Yt[N0]);
|
|
14582
14582
|
const c0 = [];
|
|
14583
14583
|
let h0, G0 = e0.concat();
|
|
14584
|
-
for (let w0 = 0,
|
|
14584
|
+
for (let w0 = 0, P0 = i0; w0 < P0; w0++) {
|
|
14585
14585
|
const U0 = Vt[w0];
|
|
14586
14586
|
h0 = [];
|
|
14587
14587
|
for (let N0 = 0, J0 = U0.length, b0 = J0 - 1, L0 = N0 + 1; N0 < J0; N0++, b0++, L0++)
|
|
@@ -14592,7 +14592,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14592
14592
|
if (Ue === 0)
|
|
14593
14593
|
D0 = ShapeUtils.triangulateShape(Yt, Vt);
|
|
14594
14594
|
else {
|
|
14595
|
-
const w0 = [],
|
|
14595
|
+
const w0 = [], P0 = [];
|
|
14596
14596
|
for (let U0 = 0; U0 < Ue; U0++) {
|
|
14597
14597
|
const N0 = U0 / Ue, J0 = Fe * Math.cos(N0 * Math.PI / 2), b0 = ke * Math.sin(N0 * Math.PI / 2) + ct;
|
|
14598
14598
|
for (let L0 = 0, K0 = Yt.length; L0 < K0; L0++) {
|
|
@@ -14607,23 +14607,23 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14607
14607
|
const g0 = Kt(H0[qt], h0[qt], b0);
|
|
14608
14608
|
q0(g0.x, g0.y, -J0), N0 === 0 && n0.push(g0);
|
|
14609
14609
|
}
|
|
14610
|
-
N0 === 0 &&
|
|
14610
|
+
N0 === 0 && P0.push(n0);
|
|
14611
14611
|
}
|
|
14612
14612
|
}
|
|
14613
|
-
D0 = ShapeUtils.triangulateShape(w0,
|
|
14613
|
+
D0 = ShapeUtils.triangulateShape(w0, P0);
|
|
14614
14614
|
}
|
|
14615
14615
|
const A0 = D0.length, f0 = ke + ct;
|
|
14616
14616
|
for (let w0 = 0; w0 < Ft; w0++) {
|
|
14617
|
-
const
|
|
14618
|
-
ht ? (xt.copy(dt.normals[0]).multiplyScalar(
|
|
14617
|
+
const P0 = Pe ? Kt(Zt[w0], G0[w0], f0) : Zt[w0];
|
|
14618
|
+
ht ? (xt.copy(dt.normals[0]).multiplyScalar(P0.x), ut.copy(dt.binormals[0]).multiplyScalar(P0.y), Lt.copy(at[0]).add(xt).add(ut), q0(Lt.x, Lt.y, Lt.z)) : q0(P0.x, P0.y, 0);
|
|
14619
14619
|
}
|
|
14620
14620
|
for (let w0 = 1; w0 <= Ce; w0++)
|
|
14621
|
-
for (let
|
|
14622
|
-
const U0 = Pe ? Kt(Zt[
|
|
14621
|
+
for (let P0 = 0; P0 < Ft; P0++) {
|
|
14622
|
+
const U0 = Pe ? Kt(Zt[P0], G0[P0], f0) : Zt[P0];
|
|
14623
14623
|
ht ? (xt.copy(dt.normals[w0]).multiplyScalar(U0.x), ut.copy(dt.binormals[w0]).multiplyScalar(U0.y), Lt.copy(at[w0]).add(xt).add(ut), q0(Lt.x, Lt.y, Lt.z)) : q0(U0.x, U0.y, Re / Ce * w0);
|
|
14624
14624
|
}
|
|
14625
14625
|
for (let w0 = Ue - 1; w0 >= 0; w0--) {
|
|
14626
|
-
const
|
|
14626
|
+
const P0 = w0 / Ue, U0 = Fe * Math.cos(P0 * Math.PI / 2), N0 = ke * Math.sin(P0 * Math.PI / 2) + ct;
|
|
14627
14627
|
for (let J0 = 0, b0 = Yt.length; J0 < b0; J0++) {
|
|
14628
14628
|
const L0 = Kt(Yt[J0], e0[J0], N0);
|
|
14629
14629
|
q0(L0.x, L0.y, Re + U0);
|
|
@@ -14641,23 +14641,23 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14641
14641
|
function T0() {
|
|
14642
14642
|
const w0 = C.length / 3;
|
|
14643
14643
|
if (Pe) {
|
|
14644
|
-
let
|
|
14644
|
+
let P0 = 0, U0 = Ft * P0;
|
|
14645
14645
|
for (let N0 = 0; N0 < A0; N0++) {
|
|
14646
14646
|
const J0 = D0[N0];
|
|
14647
14647
|
Si(J0[2] + U0, J0[1] + U0, J0[0] + U0);
|
|
14648
14648
|
}
|
|
14649
|
-
|
|
14649
|
+
P0 = Ce + Ue * 2, U0 = Ft * P0;
|
|
14650
14650
|
for (let N0 = 0; N0 < A0; N0++) {
|
|
14651
14651
|
const J0 = D0[N0];
|
|
14652
14652
|
Si(J0[0] + U0, J0[1] + U0, J0[2] + U0);
|
|
14653
14653
|
}
|
|
14654
14654
|
} else {
|
|
14655
|
-
for (let
|
|
14656
|
-
const U0 = D0[
|
|
14655
|
+
for (let P0 = 0; P0 < A0; P0++) {
|
|
14656
|
+
const U0 = D0[P0];
|
|
14657
14657
|
Si(U0[2], U0[1], U0[0]);
|
|
14658
14658
|
}
|
|
14659
|
-
for (let
|
|
14660
|
-
const U0 = D0[
|
|
14659
|
+
for (let P0 = 0; P0 < A0; P0++) {
|
|
14660
|
+
const U0 = D0[P0];
|
|
14661
14661
|
Si(U0[0] + Ft * Ce, U0[1] + Ft * Ce, U0[2] + Ft * Ce);
|
|
14662
14662
|
}
|
|
14663
14663
|
}
|
|
@@ -14665,36 +14665,36 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14665
14665
|
}
|
|
14666
14666
|
function F0() {
|
|
14667
14667
|
const w0 = C.length / 3;
|
|
14668
|
-
let
|
|
14669
|
-
$0(Yt,
|
|
14668
|
+
let P0 = 0;
|
|
14669
|
+
$0(Yt, P0), P0 += Yt.length;
|
|
14670
14670
|
for (let U0 = 0, N0 = Vt.length; U0 < N0; U0++) {
|
|
14671
14671
|
const J0 = Vt[U0];
|
|
14672
|
-
$0(J0,
|
|
14672
|
+
$0(J0, P0), P0 += J0.length;
|
|
14673
14673
|
}
|
|
14674
14674
|
r.addGroup(w0, C.length / 3 - w0, 1);
|
|
14675
14675
|
}
|
|
14676
|
-
function $0(w0,
|
|
14676
|
+
function $0(w0, P0) {
|
|
14677
14677
|
let U0 = w0.length;
|
|
14678
14678
|
for (; --U0 >= 0; ) {
|
|
14679
14679
|
const N0 = U0;
|
|
14680
14680
|
let J0 = U0 - 1;
|
|
14681
14681
|
J0 < 0 && (J0 = w0.length - 1);
|
|
14682
14682
|
for (let b0 = 0, L0 = Ce + Ue * 2; b0 < L0; b0++) {
|
|
14683
|
-
const K0 = Ft * b0, H0 = Ft * (b0 + 1), n0 =
|
|
14683
|
+
const K0 = Ft * b0, H0 = Ft * (b0 + 1), n0 = P0 + N0 + K0, qt = P0 + J0 + K0, d0 = P0 + J0 + H0, g0 = P0 + N0 + H0;
|
|
14684
14684
|
zi(n0, qt, d0, g0);
|
|
14685
14685
|
}
|
|
14686
14686
|
}
|
|
14687
14687
|
}
|
|
14688
|
-
function q0(w0,
|
|
14689
|
-
Se.push(w0), Se.push(
|
|
14688
|
+
function q0(w0, P0, U0) {
|
|
14689
|
+
Se.push(w0), Se.push(P0), Se.push(U0);
|
|
14690
14690
|
}
|
|
14691
|
-
function Si(w0,
|
|
14692
|
-
wi(w0), wi(
|
|
14691
|
+
function Si(w0, P0, U0) {
|
|
14692
|
+
wi(w0), wi(P0), wi(U0);
|
|
14693
14693
|
const N0 = C.length / 3, J0 = lt.generateTopUV(r, C, N0 - 3, N0 - 2, N0 - 1);
|
|
14694
14694
|
r0(J0[0]), r0(J0[1]), r0(J0[2]);
|
|
14695
14695
|
}
|
|
14696
|
-
function zi(w0,
|
|
14697
|
-
wi(w0), wi(
|
|
14696
|
+
function zi(w0, P0, U0, N0) {
|
|
14697
|
+
wi(w0), wi(P0), wi(N0), wi(P0), wi(U0), wi(N0);
|
|
14698
14698
|
const J0 = C.length / 3, b0 = lt.generateSideWallUV(r, C, J0 - 6, J0 - 3, J0 - 2, J0 - 1);
|
|
14699
14699
|
r0(b0[0]), r0(b0[1]), r0(b0[3]), r0(b0[1]), r0(b0[2]), r0(b0[3]);
|
|
14700
14700
|
}
|
|
@@ -18468,7 +18468,7 @@ class ObjectLoader extends Loader {
|
|
|
18468
18468
|
* @return {Promise<Object3D>} A Promise that resolves with the loaded 3D object.
|
|
18469
18469
|
*/
|
|
18470
18470
|
loadAsync(e, n) {
|
|
18471
|
-
return
|
|
18471
|
+
return V0(this, null, function* () {
|
|
18472
18472
|
const r = this, C = this.path === "" ? LoaderUtils.extractUrlBase(e) : this.path;
|
|
18473
18473
|
this.resourcePath = this.resourcePath || C;
|
|
18474
18474
|
const _ = new FileLoader(this.manager);
|
|
@@ -18509,7 +18509,7 @@ class ObjectLoader extends Loader {
|
|
|
18509
18509
|
* @return {Promise<Object3D>} A Promise that resolves with the parsed 3D object.
|
|
18510
18510
|
*/
|
|
18511
18511
|
parseAsync(e) {
|
|
18512
|
-
return
|
|
18512
|
+
return V0(this, null, function* () {
|
|
18513
18513
|
const n = this.parseAnimations(e.animations), r = this.parseShapes(e.shapes), C = this.parseGeometries(e.geometries, r), _ = yield this.parseImagesAsync(e.images), I = this.parseTextures(e.textures, _), O = this.parseMaterials(e.materials, I), Se = this.parseObject(e.object, C, O, I, n), ve = this.parseSkeletons(e.skeletons, Se);
|
|
18514
18514
|
return this.bindSkeletons(Se, ve), this.bindLightTargets(Se), Se;
|
|
18515
18515
|
});
|
|
@@ -18618,11 +18618,11 @@ class ObjectLoader extends Loader {
|
|
|
18618
18618
|
return C;
|
|
18619
18619
|
}
|
|
18620
18620
|
parseImagesAsync(e) {
|
|
18621
|
-
return
|
|
18621
|
+
return V0(this, null, function* () {
|
|
18622
18622
|
const n = this, r = {};
|
|
18623
18623
|
let C;
|
|
18624
18624
|
function _(I) {
|
|
18625
|
-
return
|
|
18625
|
+
return V0(this, null, function* () {
|
|
18626
18626
|
if (typeof I == "string") {
|
|
18627
18627
|
const O = I, Se = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(O) ? O : n.resourcePath + O;
|
|
18628
18628
|
return yield C.loadAsync(Se);
|
|
@@ -29329,7 +29329,7 @@ function WebGLPrograms(v, e, n, r, C, _, I) {
|
|
|
29329
29329
|
D0 = Ji.vertexShader, A0 = Ji.fragmentShader;
|
|
29330
29330
|
} else
|
|
29331
29331
|
D0 = Xt.vertexShader, A0 = Xt.fragmentShader, Se.update(Xt), f0 = Se.getVertexShaderID(Xt), T0 = Se.getFragmentShaderID(Xt);
|
|
29332
|
-
const F0 = v.getRenderTarget(), $0 = v.state.buffers.depth.getReversed(), q0 = $t.isInstancedMesh === !0, Si = $t.isBatchedMesh === !0, zi = !!Xt.map, wi = !!Xt.matcap, r0 = !!Ft, w0 = !!Xt.aoMap,
|
|
29332
|
+
const F0 = v.getRenderTarget(), $0 = v.state.buffers.depth.getReversed(), q0 = $t.isInstancedMesh === !0, Si = $t.isBatchedMesh === !0, zi = !!Xt.map, wi = !!Xt.matcap, r0 = !!Ft, w0 = !!Xt.aoMap, P0 = !!Xt.lightMap, U0 = !!Xt.bumpMap, N0 = !!Xt.normalMap, J0 = !!Xt.displacementMap, b0 = !!Xt.emissiveMap, L0 = !!Xt.metalnessMap, K0 = !!Xt.roughnessMap, H0 = Xt.anisotropy > 0, n0 = Xt.clearcoat > 0, qt = Xt.dispersion > 0, d0 = Xt.iridescence > 0, g0 = Xt.sheen > 0, I0 = Xt.transmission > 0, C0 = H0 && !!Xt.anisotropyMap, Ti = n0 && !!Xt.clearcoatMap, Q0 = n0 && !!Xt.clearcoatNormalMap, Ri = n0 && !!Xt.clearcoatRoughnessMap, Wi = d0 && !!Xt.iridescenceMap, bi = d0 && !!Xt.iridescenceThicknessMap, Li = g0 && !!Xt.sheenColorMap, Pi = g0 && !!Xt.sheenRoughnessMap, Ei = !!Xt.specularMap, Mi = !!Xt.specularColorMap, Ii = !!Xt.specularIntensityMap, u0 = I0 && !!Xt.transmissionMap, yi = I0 && !!Xt.thicknessMap, _0 = !!Xt.gradientMap, Vi = !!Xt.alphaMap, vi = Xt.alphaTest > 0, O0 = !!Xt.alphaHash, Ni = !!Xt.extensions;
|
|
29333
29333
|
let Ui = NoToneMapping;
|
|
29334
29334
|
Xt.toneMapped && (F0 === null || F0.isXRRenderTarget === !0) && (Ui = v.toneMapping);
|
|
29335
29335
|
const ji = {
|
|
@@ -29358,7 +29358,7 @@ function WebGLPrograms(v, e, n, r, C, _, I) {
|
|
|
29358
29358
|
envMapMode: r0 && Ft.mapping,
|
|
29359
29359
|
envMapCubeUVHeight: Wt,
|
|
29360
29360
|
aoMap: w0,
|
|
29361
|
-
lightMap:
|
|
29361
|
+
lightMap: P0,
|
|
29362
29362
|
bumpMap: U0,
|
|
29363
29363
|
normalMap: N0,
|
|
29364
29364
|
displacementMap: Pe && J0,
|
|
@@ -29395,7 +29395,7 @@ function WebGLPrograms(v, e, n, r, C, _, I) {
|
|
|
29395
29395
|
//
|
|
29396
29396
|
mapUv: zi && ct(Xt.map.channel),
|
|
29397
29397
|
aoMapUv: w0 && ct(Xt.aoMap.channel),
|
|
29398
|
-
lightMapUv:
|
|
29398
|
+
lightMapUv: P0 && ct(Xt.lightMap.channel),
|
|
29399
29399
|
bumpMapUv: U0 && ct(Xt.bumpMap.channel),
|
|
29400
29400
|
normalMapUv: N0 && ct(Xt.normalMap.channel),
|
|
29401
29401
|
displacementMapUv: J0 && ct(Xt.displacementMap.channel),
|
|
@@ -30260,7 +30260,7 @@ function WebGLState(v, e) {
|
|
|
30260
30260
|
}
|
|
30261
30261
|
vi = vi || yi, O0 = O0 || _0, Ni = Ni || Vi, (yi !== Ne || vi !== ht) && (v.blendEquationSeparate(wi[yi], wi[vi]), Ne = yi, ht = vi), (_0 !== lt || Vi !== at || O0 !== dt || Ni !== ut) && (v.blendFuncSeparate(r0[_0], r0[Vi], r0[O0], r0[Ni]), lt = _0, at = Vi, dt = O0, ut = Ni), (Ui.equals(xt) === !1 || ji !== Lt) && (v.blendColor(Ui.r, Ui.g, Ui.b, ji), xt.copy(Ui), Lt = ji), Ue = u0, Xt = !1;
|
|
30262
30262
|
}
|
|
30263
|
-
function
|
|
30263
|
+
function P0(u0, yi) {
|
|
30264
30264
|
u0.side === DoubleSide ? $0(v.CULL_FACE) : F0(v.CULL_FACE);
|
|
30265
30265
|
let _0 = u0.side === BackSide;
|
|
30266
30266
|
yi && (_0 = !_0), U0(_0), u0.blending === NormalBlending && u0.transparent === !1 ? w0(NoBlending) : w0(u0.blending, u0.blendEquation, u0.blendSrc, u0.blendDst, u0.blendEquationAlpha, u0.blendSrcAlpha, u0.blendDstAlpha, u0.blendColor, u0.blendAlpha, u0.premultipliedAlpha), I.setFunc(u0.depthFunc), I.setTest(u0.depthTest), I.setMask(u0.depthWrite), _.setMask(u0.colorWrite);
|
|
@@ -30395,7 +30395,7 @@ function WebGLState(v, e) {
|
|
|
30395
30395
|
drawBuffers: Si,
|
|
30396
30396
|
useProgram: zi,
|
|
30397
30397
|
setBlending: w0,
|
|
30398
|
-
setMaterial:
|
|
30398
|
+
setMaterial: P0,
|
|
30399
30399
|
setFlipSided: U0,
|
|
30400
30400
|
setCullFace: N0,
|
|
30401
30401
|
setLineWidth: J0,
|
|
@@ -30957,7 +30957,7 @@ function WebGLTextures(v, e, n, r, C, _, I) {
|
|
|
30957
30957
|
}
|
|
30958
30958
|
}
|
|
30959
30959
|
}
|
|
30960
|
-
const
|
|
30960
|
+
const P0 = [], U0 = [];
|
|
30961
30961
|
function N0(n0) {
|
|
30962
30962
|
if (n0.samples > 0) {
|
|
30963
30963
|
if (b0(n0) === !1) {
|
|
@@ -30976,7 +30976,7 @@ function WebGLTextures(v, e, n, r, C, _, I) {
|
|
|
30976
30976
|
const bi = r.get(qt[Wi]).__webglTexture;
|
|
30977
30977
|
v.framebufferTexture2D(v.DRAW_FRAMEBUFFER, v.COLOR_ATTACHMENT0, v.TEXTURE_2D, bi, 0);
|
|
30978
30978
|
}
|
|
30979
|
-
v.blitFramebuffer(0, 0, d0, g0, 0, 0, d0, g0, I0, v.NEAREST), Se === !0 && (
|
|
30979
|
+
v.blitFramebuffer(0, 0, d0, g0, 0, 0, d0, g0, I0, v.NEAREST), Se === !0 && (P0.length = 0, U0.length = 0, P0.push(v.COLOR_ATTACHMENT0 + Wi), n0.depthBuffer && n0.resolveDepthBuffer === !1 && (P0.push(C0), U0.push(C0), v.invalidateFramebuffer(v.DRAW_FRAMEBUFFER, U0)), v.invalidateFramebuffer(v.READ_FRAMEBUFFER, P0));
|
|
30980
30980
|
}
|
|
30981
30981
|
if (n.bindFramebuffer(v.READ_FRAMEBUFFER, null), n.bindFramebuffer(v.DRAW_FRAMEBUFFER, null), Q0)
|
|
30982
30982
|
for (let Wi = 0; Wi < qt.length; Wi++) {
|
|
@@ -31259,7 +31259,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
31259
31259
|
}, this.getSession = function() {
|
|
31260
31260
|
return C;
|
|
31261
31261
|
}, this.setSession = function(f0) {
|
|
31262
|
-
return
|
|
31262
|
+
return V0(this, null, function* () {
|
|
31263
31263
|
if (C = f0, C !== null) {
|
|
31264
31264
|
if (lt = e.getRenderTarget(), C.addEventListener("select", i0), C.addEventListener("selectstart", i0), C.addEventListener("selectend", i0), C.addEventListener("squeeze", i0), C.addEventListener("squeezestart", i0), C.addEventListener("squeezeend", i0), C.addEventListener("end", Yt), C.addEventListener("inputsourceschange", Kt), Ne.xrCompatible !== !0 && (yield n.makeXRCompatible()), xt = e.getPixelRatio(), e.getSize(ut), typeof XRWebGLBinding != "undefined" && (Re = new XRWebGLBinding(C, n)), Re !== null && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
31265
31265
|
let F0 = null, $0 = null, q0 = null;
|
|
@@ -31339,7 +31339,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
31339
31339
|
const Ft = new Vector3(), Wt = new Vector3();
|
|
31340
31340
|
function e0(f0, T0, F0) {
|
|
31341
31341
|
Ft.setFromMatrixPosition(T0.matrixWorld), Wt.setFromMatrixPosition(F0.matrixWorld);
|
|
31342
|
-
const $0 = Ft.distanceTo(Wt), q0 = T0.projectionMatrix.elements, Si = F0.projectionMatrix.elements, zi = q0[14] / (q0[10] - 1), wi = q0[14] / (q0[10] + 1), r0 = (q0[9] + 1) / q0[5], w0 = (q0[9] - 1) / q0[5],
|
|
31342
|
+
const $0 = Ft.distanceTo(Wt), q0 = T0.projectionMatrix.elements, Si = F0.projectionMatrix.elements, zi = q0[14] / (q0[10] - 1), wi = q0[14] / (q0[10] + 1), r0 = (q0[9] + 1) / q0[5], w0 = (q0[9] - 1) / q0[5], P0 = (q0[8] - 1) / q0[0], U0 = (Si[8] + 1) / Si[0], N0 = zi * P0, J0 = zi * U0, b0 = $0 / (-P0 + U0), L0 = b0 * -P0;
|
|
31343
31343
|
if (T0.matrixWorld.decompose(f0.position, f0.quaternion, f0.scale), f0.translateX(L0), f0.translateZ(b0), f0.matrixWorld.compose(f0.position, f0.quaternion, f0.scale), f0.matrixWorldInverse.copy(f0.matrixWorld).invert(), q0[10] === -1)
|
|
31344
31344
|
f0.projectionMatrix.copy(T0.projectionMatrix), f0.projectionMatrixInverse.copy(T0.projectionMatrixInverse);
|
|
31345
31345
|
else {
|
|
@@ -31400,8 +31400,8 @@ class WebXRManager extends EventDispatcher {
|
|
|
31400
31400
|
U0.depthStencilTexture
|
|
31401
31401
|
), e.setRenderTarget(at));
|
|
31402
31402
|
}
|
|
31403
|
-
let
|
|
31404
|
-
|
|
31403
|
+
let P0 = Zt[wi];
|
|
31404
|
+
P0 === void 0 && (P0 = new PerspectiveCamera(), P0.layers.enable(wi), P0.viewport = new Vector4(), Zt[wi] = P0), P0.matrix.fromArray(r0.transform.matrix), P0.matrix.decompose(P0.position, P0.quaternion, P0.scale), P0.projectionMatrix.fromArray(r0.projectionMatrix), P0.projectionMatrixInverse.copy(P0.projectionMatrix).invert(), P0.viewport.set(w0.x, w0.y, w0.width, w0.height), wi === 0 && (Vt.matrix.copy(P0.matrix), Vt.matrix.decompose(Vt.position, Vt.quaternion, Vt.scale)), $0 === !0 && Vt.cameras.push(P0);
|
|
31405
31405
|
}
|
|
31406
31406
|
const q0 = C.enabledFeatures;
|
|
31407
31407
|
if (q0 && q0.includes("depth-sensing") && C.depthUsage == "gpu-optimized" && Re) {
|
|
@@ -31414,8 +31414,8 @@ class WebXRManager extends EventDispatcher {
|
|
|
31414
31414
|
if (r0) {
|
|
31415
31415
|
let w0 = Ue[r0];
|
|
31416
31416
|
w0 || (w0 = new ExternalTexture(), Ue[r0] = w0);
|
|
31417
|
-
const
|
|
31418
|
-
w0.sourceTexture =
|
|
31417
|
+
const P0 = Re.getCameraImage(r0);
|
|
31418
|
+
w0.sourceTexture = P0;
|
|
31419
31419
|
}
|
|
31420
31420
|
}
|
|
31421
31421
|
}
|
|
@@ -31671,9 +31671,9 @@ class WebGLRenderer {
|
|
|
31671
31671
|
} catch (wt) {
|
|
31672
31672
|
throw console.error("THREE.WebGLRenderer: " + wt.message), wt;
|
|
31673
31673
|
}
|
|
31674
|
-
let
|
|
31674
|
+
let P0, U0, N0, J0, b0, L0, K0, H0, n0, qt, d0, g0, I0, C0, Ti, Q0, Ri, Wi, bi, Li, Pi, Ei, Mi, Ii;
|
|
31675
31675
|
function u0() {
|
|
31676
|
-
|
|
31676
|
+
P0 = new WebGLExtensions(r0), P0.init(), Ei = new WebGLUtils(r0, P0), U0 = new WebGLCapabilities(r0, P0, e, Ei), N0 = new WebGLState(r0, P0), U0.reversedDepthBuffer && Pe && N0.buffers.depth.setReversed(!0), J0 = new WebGLInfo(r0), b0 = new WebGLProperties(), L0 = new WebGLTextures(r0, P0, N0, b0, U0, Ei, J0), K0 = new WebGLCubeMaps(ht), H0 = new WebGLCubeUVMaps(ht), n0 = new WebGLAttributes(r0), Mi = new WebGLBindingStates(r0, n0), qt = new WebGLGeometries(r0, n0, J0, Mi), d0 = new WebGLObjects(r0, qt, n0, J0), bi = new WebGLMorphtargets(r0, U0, L0), Q0 = new WebGLClipping(b0), g0 = new WebGLPrograms(ht, K0, H0, P0, U0, Mi, Q0), I0 = new WebGLMaterials(ht, b0), C0 = new WebGLRenderLists(), Ti = new WebGLRenderStates(P0), Wi = new WebGLBackground(ht, K0, H0, N0, d0, Fe, Se), Ri = new WebGLShadowMap(ht, d0, U0), Ii = new WebGLUniformsGroups(r0, J0, U0, N0), Li = new WebGLBufferRenderer(r0, P0, J0), Pi = new WebGLIndexedBufferRenderer(r0, P0, J0), J0.programs = g0.programs, ht.capabilities = U0, ht.extensions = P0, ht.properties = b0, ht.renderLists = C0, ht.shadowMap = Ri, ht.state = N0, ht.info = J0;
|
|
31677
31677
|
}
|
|
31678
31678
|
u0();
|
|
31679
31679
|
const yi = new WebXRManager(ht, r0);
|
|
@@ -31682,10 +31682,10 @@ class WebGLRenderer {
|
|
|
31682
31682
|
}, this.getContextAttributes = function() {
|
|
31683
31683
|
return r0.getContextAttributes();
|
|
31684
31684
|
}, this.forceContextLoss = function() {
|
|
31685
|
-
const wt =
|
|
31685
|
+
const wt = P0.get("WEBGL_lose_context");
|
|
31686
31686
|
wt && wt.loseContext();
|
|
31687
31687
|
}, this.forceContextRestore = function() {
|
|
31688
|
-
const wt =
|
|
31688
|
+
const wt = P0.get("WEBGL_lose_context");
|
|
31689
31689
|
wt && wt.restoreContext();
|
|
31690
31690
|
}, this.getPixelRatio = function() {
|
|
31691
31691
|
return Wt;
|
|
@@ -31738,8 +31738,8 @@ class WebGLRenderer {
|
|
|
31738
31738
|
l0 = o0 === RGBAIntegerFormat || o0 === RGIntegerFormat || o0 === RedIntegerFormat;
|
|
31739
31739
|
}
|
|
31740
31740
|
if (l0) {
|
|
31741
|
-
const o0 = Lt.texture.type, M0 = o0 === UnsignedByteType || o0 === UnsignedIntType || o0 === UnsignedShortType || o0 === UnsignedInt248Type || o0 === UnsignedShort4444Type || o0 === UnsignedShort5551Type, v0 = Wi.getClearColor(), S0 = Wi.getClearAlpha(), R0 = v0.r, k0 = v0.g,
|
|
31742
|
-
M0 ? (ke[0] = R0, ke[1] = k0, ke[2] =
|
|
31741
|
+
const o0 = Lt.texture.type, M0 = o0 === UnsignedByteType || o0 === UnsignedIntType || o0 === UnsignedShortType || o0 === UnsignedInt248Type || o0 === UnsignedShort4444Type || o0 === UnsignedShort5551Type, v0 = Wi.getClearColor(), S0 = Wi.getClearAlpha(), R0 = v0.r, k0 = v0.g, E0 = v0.b;
|
|
31742
|
+
M0 ? (ke[0] = R0, ke[1] = k0, ke[2] = E0, ke[3] = S0, r0.clearBufferuiv(r0.COLOR, 0, ke)) : (ct[0] = R0, ct[1] = k0, ct[2] = E0, ct[3] = S0, r0.clearBufferiv(r0.COLOR, 0, ct));
|
|
31743
31743
|
} else
|
|
31744
31744
|
a0 |= r0.COLOR_BUFFER_BIT;
|
|
31745
31745
|
}
|
|
@@ -31786,9 +31786,9 @@ class WebGLRenderer {
|
|
|
31786
31786
|
if (S0 = qt.getWireframeAttribute(s0), S0 === void 0) return;
|
|
31787
31787
|
R0 = 2;
|
|
31788
31788
|
}
|
|
31789
|
-
const k0 = s0.drawRange,
|
|
31789
|
+
const k0 = s0.drawRange, E0 = s0.attributes.position;
|
|
31790
31790
|
let j0 = k0.start * R0, Ci = (k0.start + k0.count) * R0;
|
|
31791
|
-
o0 !== null && (j0 = Math.max(j0, o0.start * R0), Ci = Math.min(Ci, (o0.start + o0.count) * R0)), S0 !== null ? (j0 = Math.max(j0, 0), Ci = Math.min(Ci, S0.count)) :
|
|
31791
|
+
o0 !== null && (j0 = Math.max(j0, o0.start * R0), Ci = Math.min(Ci, (o0.start + o0.count) * R0)), S0 !== null ? (j0 = Math.max(j0, 0), Ci = Math.min(Ci, S0.count)) : E0 != null && (j0 = Math.max(j0, 0), Ci = Math.min(Ci, E0.count));
|
|
31792
31792
|
const xi = Ci - j0;
|
|
31793
31793
|
if (xi < 0 || xi === 1 / 0) return;
|
|
31794
31794
|
Mi.setup(l0, a0, v0, s0, S0);
|
|
@@ -31802,7 +31802,7 @@ class WebGLRenderer {
|
|
|
31802
31802
|
if (l0.isBatchedMesh)
|
|
31803
31803
|
if (l0._multiDrawInstances !== null)
|
|
31804
31804
|
warnOnce("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), Zi.renderMultiDrawInstances(l0._multiDrawStarts, l0._multiDrawCounts, l0._multiDrawCount, l0._multiDrawInstances);
|
|
31805
|
-
else if (
|
|
31805
|
+
else if (P0.get("WEBGL_multi_draw"))
|
|
31806
31806
|
Zi.renderMultiDraw(l0._multiDrawStarts, l0._multiDrawCounts, l0._multiDrawCount);
|
|
31807
31807
|
else {
|
|
31808
31808
|
const Xi = l0._multiDrawStarts, Fi = l0._multiDrawCounts, Ki = l0._multiDrawCount, Bi = S0 ? n0.get(S0).bytesPerElement : 1, Ai = b0.get(a0).currentProgram.getUniforms();
|
|
@@ -31852,7 +31852,7 @@ class WebGLRenderer {
|
|
|
31852
31852
|
}
|
|
31853
31853
|
setTimeout(o0, 10);
|
|
31854
31854
|
}
|
|
31855
|
-
|
|
31855
|
+
P0.get("KHR_parallel_shader_compile") !== null ? o0() : setTimeout(o0, 10);
|
|
31856
31856
|
});
|
|
31857
31857
|
};
|
|
31858
31858
|
let Ji = null;
|
|
@@ -31918,8 +31918,8 @@ class WebGLRenderer {
|
|
|
31918
31918
|
if (a0 && (wt.boundingSphere !== void 0 ? (wt.boundingSphere === null && wt.computeBoundingSphere(), q0.copy(wt.boundingSphere.center)) : (M0.boundingSphere === null && M0.computeBoundingSphere(), q0.copy(M0.boundingSphere.center)), q0.applyMatrix4(wt.matrixWorld).applyMatrix4(F0)), Array.isArray(v0)) {
|
|
31919
31919
|
const S0 = M0.groups;
|
|
31920
31920
|
for (let R0 = 0, k0 = S0.length; R0 < k0; R0++) {
|
|
31921
|
-
const
|
|
31922
|
-
j0 && j0.visible && Ue.push(wt, M0, j0, s0, q0.z,
|
|
31921
|
+
const E0 = S0[R0], j0 = v0[E0.materialIndex];
|
|
31922
|
+
j0 && j0.visible && Ue.push(wt, M0, j0, s0, q0.z, E0);
|
|
31923
31923
|
}
|
|
31924
31924
|
} else v0.visible && Ue.push(wt, M0, v0, s0, q0.z, null);
|
|
31925
31925
|
}
|
|
@@ -31937,7 +31937,7 @@ class WebGLRenderer {
|
|
|
31937
31937
|
return;
|
|
31938
31938
|
Ne.state.transmissionRenderTarget[a0.id] === void 0 && (Ne.state.transmissionRenderTarget[a0.id] = new WebGLRenderTarget(1, 1, {
|
|
31939
31939
|
generateMipmaps: !0,
|
|
31940
|
-
type:
|
|
31940
|
+
type: P0.has("EXT_color_buffer_half_float") || P0.has("EXT_color_buffer_float") ? HalfFloatType : UnsignedByteType,
|
|
31941
31941
|
minFilter: LinearMipmapLinearFilter,
|
|
31942
31942
|
samples: 4,
|
|
31943
31943
|
stencilBuffer: _,
|
|
@@ -31951,8 +31951,8 @@ class WebGLRenderer {
|
|
|
31951
31951
|
ht.setRenderTarget(o0), ht.getClearColor(i0), Yt = ht.getClearAlpha(), Yt < 1 && ht.setClearColor(16777215, 0.5), ht.clear(), zi && Wi.render(s0);
|
|
31952
31952
|
const k0 = ht.toneMapping;
|
|
31953
31953
|
ht.toneMapping = NoToneMapping;
|
|
31954
|
-
const
|
|
31955
|
-
if (a0.viewport !== void 0 && (a0.viewport = void 0), Ne.setupLightsView(a0), f0 === !0 && Q0.setGlobalState(ht.clippingPlanes, a0), mn(wt, s0, a0), L0.updateMultisampleRenderTarget(o0), L0.updateRenderTargetMipmap(o0),
|
|
31954
|
+
const E0 = a0.viewport;
|
|
31955
|
+
if (a0.viewport !== void 0 && (a0.viewport = void 0), Ne.setupLightsView(a0), f0 === !0 && Q0.setGlobalState(ht.clippingPlanes, a0), mn(wt, s0, a0), L0.updateMultisampleRenderTarget(o0), L0.updateRenderTargetMipmap(o0), P0.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
31956
31956
|
let j0 = !1;
|
|
31957
31957
|
for (let Ci = 0, xi = t0.length; Ci < xi; Ci++) {
|
|
31958
31958
|
const Gi = t0[Ci], Zi = Gi.object, Xi = Gi.geometry, Fi = Gi.material, Ki = Gi.group;
|
|
@@ -31963,7 +31963,7 @@ class WebGLRenderer {
|
|
|
31963
31963
|
}
|
|
31964
31964
|
j0 === !0 && (L0.updateMultisampleRenderTarget(o0), L0.updateRenderTargetMipmap(o0));
|
|
31965
31965
|
}
|
|
31966
|
-
ht.setRenderTarget(v0, S0, R0), ht.setClearColor(i0, Yt),
|
|
31966
|
+
ht.setRenderTarget(v0, S0, R0), ht.setClearColor(i0, Yt), E0 !== void 0 && (a0.viewport = E0), ht.toneMapping = k0;
|
|
31967
31967
|
}
|
|
31968
31968
|
function mn(wt, t0, s0) {
|
|
31969
31969
|
const a0 = t0.isScene === !0 ? t0.overrideMaterial : null;
|
|
@@ -31987,8 +31987,8 @@ class WebGLRenderer {
|
|
|
31987
31987
|
return Xn(wt, v0), k0;
|
|
31988
31988
|
} else
|
|
31989
31989
|
v0.uniforms = g0.getUniforms(wt), wt.onBeforeCompile(v0, ht), k0 = g0.acquireProgram(v0, S0), R0.set(S0, k0), a0.uniforms = v0.uniforms;
|
|
31990
|
-
const
|
|
31991
|
-
return (!wt.isShaderMaterial && !wt.isRawShaderMaterial || wt.clipping === !0) && (
|
|
31990
|
+
const E0 = a0.uniforms;
|
|
31991
|
+
return (!wt.isShaderMaterial && !wt.isRawShaderMaterial || wt.clipping === !0) && (E0.clippingPlanes = Q0.uniform), Xn(wt, v0), a0.needsLights = wn(wt), a0.lightsStateVersion = M0, a0.needsLights && (E0.ambientLightColor.value = l0.state.ambient, E0.lightProbe.value = l0.state.probe, E0.directionalLights.value = l0.state.directional, E0.directionalLightShadows.value = l0.state.directionalShadow, E0.spotLights.value = l0.state.spot, E0.spotLightShadows.value = l0.state.spotShadow, E0.rectAreaLights.value = l0.state.rectArea, E0.ltc_1.value = l0.state.rectAreaLTC1, E0.ltc_2.value = l0.state.rectAreaLTC2, E0.pointLights.value = l0.state.point, E0.pointLightShadows.value = l0.state.pointShadow, E0.hemisphereLights.value = l0.state.hemi, E0.directionalShadowMap.value = l0.state.directionalShadowMap, E0.directionalShadowMatrix.value = l0.state.directionalShadowMatrix, E0.spotShadowMap.value = l0.state.spotShadowMap, E0.spotLightMatrix.value = l0.state.spotLightMatrix, E0.spotLightMap.value = l0.state.spotLightMap, E0.pointShadowMap.value = l0.state.pointShadowMap, E0.pointShadowMatrix.value = l0.state.pointShadowMatrix), a0.currentProgram = k0, a0.uniformsList = null, k0;
|
|
31992
31992
|
}
|
|
31993
31993
|
function Cn(wt) {
|
|
31994
31994
|
if (wt.uniformsList === null) {
|
|
@@ -32003,7 +32003,7 @@ class WebGLRenderer {
|
|
|
32003
32003
|
}
|
|
32004
32004
|
function _n(wt, t0, s0, a0, l0) {
|
|
32005
32005
|
t0.isScene !== !0 && (t0 = Si), L0.resetTextureUnits();
|
|
32006
|
-
const o0 = t0.fog, M0 = a0.isMeshStandardMaterial ? t0.environment : null, v0 = Lt === null ? ht.outputColorSpace : Lt.isXRRenderTarget === !0 ? Lt.texture.colorSpace : LinearSRGBColorSpace, S0 = (a0.isMeshStandardMaterial ? H0 : K0).get(a0.envMap || M0), R0 = a0.vertexColors === !0 && !!s0.attributes.color && s0.attributes.color.itemSize === 4, k0 = !!s0.attributes.tangent && (!!a0.normalMap || a0.anisotropy > 0),
|
|
32006
|
+
const o0 = t0.fog, M0 = a0.isMeshStandardMaterial ? t0.environment : null, v0 = Lt === null ? ht.outputColorSpace : Lt.isXRRenderTarget === !0 ? Lt.texture.colorSpace : LinearSRGBColorSpace, S0 = (a0.isMeshStandardMaterial ? H0 : K0).get(a0.envMap || M0), R0 = a0.vertexColors === !0 && !!s0.attributes.color && s0.attributes.color.itemSize === 4, k0 = !!s0.attributes.tangent && (!!a0.normalMap || a0.anisotropy > 0), E0 = !!s0.morphAttributes.position, j0 = !!s0.morphAttributes.normal, Ci = !!s0.morphAttributes.color;
|
|
32007
32007
|
let xi = NoToneMapping;
|
|
32008
32008
|
a0.toneMapped && (Lt === null || Lt.isXRRenderTarget === !0) && (xi = ht.toneMapping);
|
|
32009
32009
|
const Gi = s0.morphAttributes.position || s0.morphAttributes.normal || s0.morphAttributes.color, Zi = Gi !== void 0 ? Gi.length : 0, Xi = b0.get(a0), Fi = Ne.state.lights;
|
|
@@ -32012,7 +32012,7 @@ class WebGLRenderer {
|
|
|
32012
32012
|
Q0.setState(a0, wt, Qi);
|
|
32013
32013
|
}
|
|
32014
32014
|
let Ki = !1;
|
|
32015
|
-
a0.version === Xi.__version ? (Xi.needsLights && Xi.lightsStateVersion !== Fi.state.version || Xi.outputColorSpace !== v0 || l0.isBatchedMesh && Xi.batching === !1 || !l0.isBatchedMesh && Xi.batching === !0 || l0.isBatchedMesh && Xi.batchingColor === !0 && l0.colorTexture === null || l0.isBatchedMesh && Xi.batchingColor === !1 && l0.colorTexture !== null || l0.isInstancedMesh && Xi.instancing === !1 || !l0.isInstancedMesh && Xi.instancing === !0 || l0.isSkinnedMesh && Xi.skinning === !1 || !l0.isSkinnedMesh && Xi.skinning === !0 || l0.isInstancedMesh && Xi.instancingColor === !0 && l0.instanceColor === null || l0.isInstancedMesh && Xi.instancingColor === !1 && l0.instanceColor !== null || l0.isInstancedMesh && Xi.instancingMorph === !0 && l0.morphTexture === null || l0.isInstancedMesh && Xi.instancingMorph === !1 && l0.morphTexture !== null || Xi.envMap !== S0 || a0.fog === !0 && Xi.fog !== o0 || Xi.numClippingPlanes !== void 0 && (Xi.numClippingPlanes !== Q0.numPlanes || Xi.numIntersection !== Q0.numIntersection) || Xi.vertexAlphas !== R0 || Xi.vertexTangents !== k0 || Xi.morphTargets !==
|
|
32015
|
+
a0.version === Xi.__version ? (Xi.needsLights && Xi.lightsStateVersion !== Fi.state.version || Xi.outputColorSpace !== v0 || l0.isBatchedMesh && Xi.batching === !1 || !l0.isBatchedMesh && Xi.batching === !0 || l0.isBatchedMesh && Xi.batchingColor === !0 && l0.colorTexture === null || l0.isBatchedMesh && Xi.batchingColor === !1 && l0.colorTexture !== null || l0.isInstancedMesh && Xi.instancing === !1 || !l0.isInstancedMesh && Xi.instancing === !0 || l0.isSkinnedMesh && Xi.skinning === !1 || !l0.isSkinnedMesh && Xi.skinning === !0 || l0.isInstancedMesh && Xi.instancingColor === !0 && l0.instanceColor === null || l0.isInstancedMesh && Xi.instancingColor === !1 && l0.instanceColor !== null || l0.isInstancedMesh && Xi.instancingMorph === !0 && l0.morphTexture === null || l0.isInstancedMesh && Xi.instancingMorph === !1 && l0.morphTexture !== null || Xi.envMap !== S0 || a0.fog === !0 && Xi.fog !== o0 || Xi.numClippingPlanes !== void 0 && (Xi.numClippingPlanes !== Q0.numPlanes || Xi.numIntersection !== Q0.numIntersection) || Xi.vertexAlphas !== R0 || Xi.vertexTangents !== k0 || Xi.morphTargets !== E0 || Xi.morphNormals !== j0 || Xi.morphColors !== Ci || Xi.toneMapping !== xi || Xi.morphTargetsCount !== Zi) && (Ki = !0) : (Ki = !0, Xi.__version = a0.version);
|
|
32016
32016
|
let Bi = Xi.currentProgram;
|
|
32017
32017
|
Ki === !0 && (Bi = bn(a0, t0, l0));
|
|
32018
32018
|
let Ai = !1, Di = !1, $i = !1;
|
|
@@ -32074,9 +32074,9 @@ class WebGLRenderer {
|
|
|
32074
32074
|
else if (S0.__hasExternalTextures)
|
|
32075
32075
|
L0.rebindTextures(wt, b0.get(wt.texture).__webglTexture, b0.get(wt.depthTexture).__webglTexture);
|
|
32076
32076
|
else if (wt.depthBuffer) {
|
|
32077
|
-
const
|
|
32078
|
-
if (S0.__boundDepthTexture !==
|
|
32079
|
-
if (
|
|
32077
|
+
const E0 = wt.depthTexture;
|
|
32078
|
+
if (S0.__boundDepthTexture !== E0) {
|
|
32079
|
+
if (E0 !== null && b0.has(E0) && (wt.width !== E0.image.width || wt.height !== E0.image.height))
|
|
32080
32080
|
throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");
|
|
32081
32081
|
L0.setupDepthRenderbuffer(wt);
|
|
32082
32082
|
}
|
|
@@ -32110,36 +32110,36 @@ class WebGLRenderer {
|
|
|
32110
32110
|
if (wt.isWebGLCubeRenderTarget && M0 !== void 0 && (S0 = S0[M0]), S0) {
|
|
32111
32111
|
N0.bindFramebuffer(r0.FRAMEBUFFER, S0);
|
|
32112
32112
|
try {
|
|
32113
|
-
const R0 = wt.textures[v0], k0 = R0.format,
|
|
32113
|
+
const R0 = wt.textures[v0], k0 = R0.format, E0 = R0.type;
|
|
32114
32114
|
if (!U0.textureFormatReadable(k0)) {
|
|
32115
32115
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
|
|
32116
32116
|
return;
|
|
32117
32117
|
}
|
|
32118
|
-
if (!U0.textureTypeReadable(
|
|
32118
|
+
if (!U0.textureTypeReadable(E0)) {
|
|
32119
32119
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
32120
32120
|
return;
|
|
32121
32121
|
}
|
|
32122
|
-
t0 >= 0 && t0 <= wt.width - a0 && s0 >= 0 && s0 <= wt.height - l0 && (wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(
|
|
32122
|
+
t0 >= 0 && t0 <= wt.width - a0 && s0 >= 0 && s0 <= wt.height - l0 && (wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(E0), o0));
|
|
32123
32123
|
} finally {
|
|
32124
32124
|
const R0 = Lt !== null ? b0.get(Lt).__webglFramebuffer : null;
|
|
32125
32125
|
N0.bindFramebuffer(r0.FRAMEBUFFER, R0);
|
|
32126
32126
|
}
|
|
32127
32127
|
}
|
|
32128
32128
|
}, this.readRenderTargetPixelsAsync = function(wt, t0, s0, a0, l0, o0, M0, v0 = 0) {
|
|
32129
|
-
return
|
|
32129
|
+
return V0(this, null, function* () {
|
|
32130
32130
|
if (!(wt && wt.isWebGLRenderTarget))
|
|
32131
32131
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
32132
32132
|
let S0 = b0.get(wt).__webglFramebuffer;
|
|
32133
32133
|
if (wt.isWebGLCubeRenderTarget && M0 !== void 0 && (S0 = S0[M0]), S0)
|
|
32134
32134
|
if (t0 >= 0 && t0 <= wt.width - a0 && s0 >= 0 && s0 <= wt.height - l0) {
|
|
32135
32135
|
N0.bindFramebuffer(r0.FRAMEBUFFER, S0);
|
|
32136
|
-
const R0 = wt.textures[v0], k0 = R0.format,
|
|
32136
|
+
const R0 = wt.textures[v0], k0 = R0.format, E0 = R0.type;
|
|
32137
32137
|
if (!U0.textureFormatReadable(k0))
|
|
32138
32138
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
|
|
32139
|
-
if (!U0.textureTypeReadable(
|
|
32139
|
+
if (!U0.textureTypeReadable(E0))
|
|
32140
32140
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
32141
32141
|
const j0 = r0.createBuffer();
|
|
32142
|
-
r0.bindBuffer(r0.PIXEL_PACK_BUFFER, j0), r0.bufferData(r0.PIXEL_PACK_BUFFER, o0.byteLength, r0.STREAM_READ), wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(
|
|
32142
|
+
r0.bindBuffer(r0.PIXEL_PACK_BUFFER, j0), r0.bufferData(r0.PIXEL_PACK_BUFFER, o0.byteLength, r0.STREAM_READ), wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(E0), 0);
|
|
32143
32143
|
const Ci = Lt !== null ? b0.get(Lt).__webglFramebuffer : null;
|
|
32144
32144
|
N0.bindFramebuffer(r0.FRAMEBUFFER, Ci);
|
|
32145
32145
|
const xi = r0.fenceSync(r0.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
@@ -32154,32 +32154,32 @@ class WebGLRenderer {
|
|
|
32154
32154
|
const dn = r0.createFramebuffer(), zt = r0.createFramebuffer();
|
|
32155
32155
|
this.copyTextureToTexture = function(wt, t0, s0 = null, a0 = null, l0 = 0, o0 = null) {
|
|
32156
32156
|
o0 === null && (l0 !== 0 ? (warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), o0 = l0, l0 = 0) : o0 = 0);
|
|
32157
|
-
let M0, v0, S0, R0, k0,
|
|
32157
|
+
let M0, v0, S0, R0, k0, E0, j0, Ci, xi;
|
|
32158
32158
|
const Gi = wt.isCompressedTexture ? wt.mipmaps[o0] : wt.image;
|
|
32159
32159
|
if (s0 !== null)
|
|
32160
|
-
M0 = s0.max.x - s0.min.x, v0 = s0.max.y - s0.min.y, S0 = s0.isBox3 ? s0.max.z - s0.min.z : 1, R0 = s0.min.x, k0 = s0.min.y,
|
|
32160
|
+
M0 = s0.max.x - s0.min.x, v0 = s0.max.y - s0.min.y, S0 = s0.isBox3 ? s0.max.z - s0.min.z : 1, R0 = s0.min.x, k0 = s0.min.y, E0 = s0.isBox3 ? s0.min.z : 0;
|
|
32161
32161
|
else {
|
|
32162
32162
|
const Oi = Math.pow(2, -l0);
|
|
32163
|
-
M0 = Math.floor(Gi.width * Oi), v0 = Math.floor(Gi.height * Oi), wt.isDataArrayTexture ? S0 = Gi.depth : wt.isData3DTexture ? S0 = Math.floor(Gi.depth * Oi) : S0 = 1, R0 = 0, k0 = 0,
|
|
32163
|
+
M0 = Math.floor(Gi.width * Oi), v0 = Math.floor(Gi.height * Oi), wt.isDataArrayTexture ? S0 = Gi.depth : wt.isData3DTexture ? S0 = Math.floor(Gi.depth * Oi) : S0 = 1, R0 = 0, k0 = 0, E0 = 0;
|
|
32164
32164
|
}
|
|
32165
32165
|
a0 !== null ? (j0 = a0.x, Ci = a0.y, xi = a0.z) : (j0 = 0, Ci = 0, xi = 0);
|
|
32166
32166
|
const Zi = Ei.convert(t0.format), Xi = Ei.convert(t0.type);
|
|
32167
32167
|
let Fi;
|
|
32168
32168
|
t0.isData3DTexture ? (L0.setTexture3D(t0, 0), Fi = r0.TEXTURE_3D) : t0.isDataArrayTexture || t0.isCompressedArrayTexture ? (L0.setTexture2DArray(t0, 0), Fi = r0.TEXTURE_2D_ARRAY) : (L0.setTexture2D(t0, 0), Fi = r0.TEXTURE_2D), r0.pixelStorei(r0.UNPACK_FLIP_Y_WEBGL, t0.flipY), r0.pixelStorei(r0.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t0.premultiplyAlpha), r0.pixelStorei(r0.UNPACK_ALIGNMENT, t0.unpackAlignment);
|
|
32169
32169
|
const Ki = r0.getParameter(r0.UNPACK_ROW_LENGTH), Bi = r0.getParameter(r0.UNPACK_IMAGE_HEIGHT), Ai = r0.getParameter(r0.UNPACK_SKIP_PIXELS), Di = r0.getParameter(r0.UNPACK_SKIP_ROWS), $i = r0.getParameter(r0.UNPACK_SKIP_IMAGES);
|
|
32170
|
-
r0.pixelStorei(r0.UNPACK_ROW_LENGTH, Gi.width), r0.pixelStorei(r0.UNPACK_IMAGE_HEIGHT, Gi.height), r0.pixelStorei(r0.UNPACK_SKIP_PIXELS, R0), r0.pixelStorei(r0.UNPACK_SKIP_ROWS, k0), r0.pixelStorei(r0.UNPACK_SKIP_IMAGES,
|
|
32170
|
+
r0.pixelStorei(r0.UNPACK_ROW_LENGTH, Gi.width), r0.pixelStorei(r0.UNPACK_IMAGE_HEIGHT, Gi.height), r0.pixelStorei(r0.UNPACK_SKIP_PIXELS, R0), r0.pixelStorei(r0.UNPACK_SKIP_ROWS, k0), r0.pixelStorei(r0.UNPACK_SKIP_IMAGES, E0);
|
|
32171
32171
|
const ki = wt.isDataArrayTexture || wt.isData3DTexture, Hi = t0.isDataArrayTexture || t0.isData3DTexture;
|
|
32172
32172
|
if (wt.isDepthTexture) {
|
|
32173
32173
|
const Oi = b0.get(wt), Qi = b0.get(t0), nn = b0.get(Oi.__renderTarget), on = b0.get(Qi.__renderTarget);
|
|
32174
32174
|
N0.bindFramebuffer(r0.READ_FRAMEBUFFER, nn.__webglFramebuffer), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, on.__webglFramebuffer);
|
|
32175
32175
|
for (let cn = 0; cn < S0; cn++)
|
|
32176
|
-
ki && (r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(wt).__webglTexture, l0,
|
|
32176
|
+
ki && (r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(wt).__webglTexture, l0, E0 + cn), r0.framebufferTextureLayer(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(t0).__webglTexture, o0, xi + cn)), r0.blitFramebuffer(R0, k0, M0, v0, j0, Ci, M0, v0, r0.DEPTH_BUFFER_BIT, r0.NEAREST);
|
|
32177
32177
|
N0.bindFramebuffer(r0.READ_FRAMEBUFFER, null), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, null);
|
|
32178
32178
|
} else if (l0 !== 0 || wt.isRenderTargetTexture || b0.has(wt)) {
|
|
32179
32179
|
const Oi = b0.get(wt), Qi = b0.get(t0);
|
|
32180
32180
|
N0.bindFramebuffer(r0.READ_FRAMEBUFFER, dn), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, zt);
|
|
32181
32181
|
for (let nn = 0; nn < S0; nn++)
|
|
32182
|
-
ki ? r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Oi.__webglTexture, l0,
|
|
32182
|
+
ki ? r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Oi.__webglTexture, l0, E0 + nn) : r0.framebufferTexture2D(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, r0.TEXTURE_2D, Oi.__webglTexture, l0), Hi ? r0.framebufferTextureLayer(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Qi.__webglTexture, o0, xi + nn) : r0.framebufferTexture2D(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, r0.TEXTURE_2D, Qi.__webglTexture, o0), l0 !== 0 ? r0.blitFramebuffer(R0, k0, M0, v0, j0, Ci, M0, v0, r0.COLOR_BUFFER_BIT, r0.NEAREST) : Hi ? r0.copyTexSubImage3D(Fi, o0, j0, Ci, xi + nn, R0, k0, M0, v0) : r0.copyTexSubImage2D(Fi, o0, j0, Ci, R0, k0, M0, v0);
|
|
32183
32183
|
N0.bindFramebuffer(r0.READ_FRAMEBUFFER, null), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, null);
|
|
32184
32184
|
} else
|
|
32185
32185
|
Hi ? wt.isDataTexture || wt.isData3DTexture ? r0.texSubImage3D(Fi, o0, j0, Ci, xi, M0, v0, S0, Zi, Xi, Gi.data) : t0.isCompressedArrayTexture ? r0.compressedTexSubImage3D(Fi, o0, j0, Ci, xi, M0, v0, S0, Zi, Gi.data) : r0.texSubImage3D(Fi, o0, j0, Ci, xi, M0, v0, S0, Zi, Xi, Gi) : wt.isDataTexture ? r0.texSubImage2D(r0.TEXTURE_2D, o0, j0, Ci, M0, v0, Zi, Xi, Gi.data) : wt.isCompressedTexture ? r0.compressedTexSubImage2D(r0.TEXTURE_2D, o0, j0, Ci, Gi.width, Gi.height, Zi, Gi.data) : r0.texSubImage2D(r0.TEXTURE_2D, o0, j0, Ci, M0, v0, Zi, Xi, Gi);
|
|
@@ -37554,7 +37554,7 @@ let _e$1 = class extends ShaderMaterial {
|
|
|
37554
37554
|
this.uniforms.sizeAttenuation.value = e ? 1 : 0;
|
|
37555
37555
|
}
|
|
37556
37556
|
};
|
|
37557
|
-
const K$2 = new Vector4(), yt$1 = new Vector3(), gt$1 = new Vector3(), g = new Vector4(), b$
|
|
37557
|
+
const K$2 = new Vector4(), yt$1 = new Vector3(), gt$1 = new Vector3(), g = new Vector4(), b$1 = new Vector4(), B = new Vector4(), Q$2 = new Vector3(), X$1 = new Matrix4(), M$2 = new Line3(), bt$1 = new Vector3(), W$1 = new Box3(), U$1 = new Sphere$1(), T$2 = new Vector4();
|
|
37558
37558
|
let z$2, E;
|
|
37559
37559
|
function Mt$1(v, e, n) {
|
|
37560
37560
|
return T$2.set(0, 0, -e, 1).applyMatrix4(v.projectionMatrix), T$2.multiplyScalar(1 / T$2.w), T$2.x = E / n.width, T$2.y = E / n.height, T$2.applyMatrix4(v.projectionMatrixInverse), T$2.multiplyScalar(1 / T$2.w), Math.abs(Math.max(T$2.x, T$2.y));
|
|
@@ -37580,19 +37580,19 @@ function pe$1(v, e, n) {
|
|
|
37580
37580
|
const r = e.projectionMatrix, C = v.material.resolution, _ = v.matrixWorld, I = v.geometry, O = I.attributes.instanceStart, Se = I.attributes.instanceEnd, ve = Math.min(I.instanceCount, O.count), Ce = -e.near;
|
|
37581
37581
|
z$2.at(1, B), B.w = 1, B.applyMatrix4(e.matrixWorldInverse), B.applyMatrix4(r), B.multiplyScalar(1 / B.w), B.x *= C.x / 2, B.y *= C.y / 2, B.z = 0, Q$2.copy(B), X$1.multiplyMatrices(e.matrixWorldInverse, _);
|
|
37582
37582
|
for (let Re = 0, Pe = ve; Re < Pe; Re++) {
|
|
37583
|
-
if (g.fromBufferAttribute(O, Re), b$
|
|
37583
|
+
if (g.fromBufferAttribute(O, Re), b$1.fromBufferAttribute(Se, Re), g.w = 1, b$1.w = 1, g.applyMatrix4(X$1), b$1.applyMatrix4(X$1), g.z > Ce && b$1.z > Ce)
|
|
37584
37584
|
continue;
|
|
37585
37585
|
if (g.z > Ce) {
|
|
37586
|
-
const Ne = g.z - b$
|
|
37587
|
-
g.lerp(b$
|
|
37588
|
-
} else if (b$
|
|
37589
|
-
const Ne = b$
|
|
37590
|
-
b$
|
|
37586
|
+
const Ne = g.z - b$1.z, lt = (g.z - Ce) / Ne;
|
|
37587
|
+
g.lerp(b$1, lt);
|
|
37588
|
+
} else if (b$1.z > Ce) {
|
|
37589
|
+
const Ne = b$1.z - g.z, lt = (b$1.z - Ce) / Ne;
|
|
37590
|
+
b$1.lerp(g, lt);
|
|
37591
37591
|
}
|
|
37592
|
-
g.applyMatrix4(r), b$
|
|
37592
|
+
g.applyMatrix4(r), b$1.applyMatrix4(r), g.multiplyScalar(1 / g.w), b$1.multiplyScalar(1 / b$1.w), g.x *= C.x / 2, g.y *= C.y / 2, b$1.x *= C.x / 2, b$1.y *= C.y / 2, M$2.start.copy(g), M$2.start.z = 0, M$2.end.copy(b$1), M$2.end.z = 0;
|
|
37593
37593
|
const Fe = M$2.closestPointToPointParameter(Q$2, !0);
|
|
37594
37594
|
M$2.at(Fe, bt$1);
|
|
37595
|
-
const ke = MathUtils.lerp(g.z, b$
|
|
37595
|
+
const ke = MathUtils.lerp(g.z, b$1.z, Fe), ct = ke >= -1 && ke <= 1, Ue = Q$2.distanceTo(bt$1) < E * 0.5;
|
|
37596
37596
|
if (ct && Ue) {
|
|
37597
37597
|
M$2.start.fromBufferAttribute(O, Re), M$2.end.fromBufferAttribute(Se, Re), M$2.start.applyMatrix4(_), M$2.end.applyMatrix4(_);
|
|
37598
37598
|
const Ne = new Vector3(), lt = new Vector3();
|
|
@@ -37766,12 +37766,12 @@ function mergeGroups(v) {
|
|
|
37766
37766
|
}
|
|
37767
37767
|
return v;
|
|
37768
37768
|
}
|
|
37769
|
-
const b
|
|
37769
|
+
const b = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
|
|
37770
37770
|
generateTopUV(e, n, r, C, _) {
|
|
37771
37771
|
const I = n[r * 3], O = n[r * 3 + 1], Se = n[C * 3], ve = n[C * 3 + 1], Ce = n[_ * 3], Re = n[_ * 3 + 1];
|
|
37772
37772
|
let Pe;
|
|
37773
|
-
if (b
|
|
37774
|
-
Pe = b
|
|
37773
|
+
if (b.has(e))
|
|
37774
|
+
Pe = b.get(e);
|
|
37775
37775
|
else {
|
|
37776
37776
|
let Ue = v.box3;
|
|
37777
37777
|
if (!Ue) {
|
|
@@ -37783,7 +37783,7 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
|
|
|
37783
37783
|
v.split && (Ne.y /= v.split), Pe = {
|
|
37784
37784
|
box: Ue,
|
|
37785
37785
|
size: Ne
|
|
37786
|
-
}, b
|
|
37786
|
+
}, b.set(e, Pe);
|
|
37787
37787
|
}
|
|
37788
37788
|
const { box: Fe, size: ke } = Pe, ct = v.split ? 1 - v.split : 0;
|
|
37789
37789
|
return [
|
|
@@ -37795,8 +37795,8 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
|
|
|
37795
37795
|
generateSideWallUV(e, n, r, C, _, I) {
|
|
37796
37796
|
const O = n[r * 3], Se = n[r * 3 + 1], ve = n[r * 3 + 2], Ce = n[C * 3], Re = n[C * 3 + 1], Pe = n[C * 3 + 2], Fe = n[_ * 3], ke = n[_ * 3 + 1], ct = n[_ * 3 + 2], Ue = n[I * 3], Ne = n[I * 3 + 1], lt = n[I * 3 + 2];
|
|
37797
37797
|
let at;
|
|
37798
|
-
if (b
|
|
37799
|
-
at = b
|
|
37798
|
+
if (b.has(n))
|
|
37799
|
+
at = b.get(n);
|
|
37800
37800
|
else {
|
|
37801
37801
|
const ut = new Box3();
|
|
37802
37802
|
ut.setFromArray(n);
|
|
@@ -37804,7 +37804,7 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
|
|
|
37804
37804
|
v.split && (xt.z /= 1 - v.split), v.sideRepeat && (xt.z /= v.sideRepeat), at = {
|
|
37805
37805
|
box: ut,
|
|
37806
37806
|
size: xt
|
|
37807
|
-
}, b
|
|
37807
|
+
}, b.set(n, at);
|
|
37808
37808
|
}
|
|
37809
37809
|
const { box: ht, size: dt } = at;
|
|
37810
37810
|
return Math.abs(Se - Re) < Math.abs(O - Ce) ? [
|
|
@@ -37820,7 +37820,7 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
|
|
|
37820
37820
|
];
|
|
37821
37821
|
}
|
|
37822
37822
|
}), P$1 = () => {
|
|
37823
|
-
b
|
|
37823
|
+
b.clear();
|
|
37824
37824
|
}, CENTER = 0, AVERAGE = 1, SAH = 2, CONTAINED = 2, TRIANGLE_INTERSECT_COST = 1.25, TRAVERSAL_COST = 1, BYTES_PER_NODE = 6 * 4 + 4 + 4, IS_LEAFNODE_FLAG = 65535, FLOAT32_EPSILON = Math.pow(2, -24), SKIP_GENERATION = Symbol("SKIP_GENERATION");
|
|
37825
37825
|
function getVertexCount$1(v) {
|
|
37826
37826
|
return v.index ? v.index.count : v.attributes.position.count;
|
|
@@ -40941,23 +40941,23 @@ let K$1 = class Nn extends BufferGeometry {
|
|
|
40941
40941
|
if (xt)
|
|
40942
40942
|
for (let H0 = 0; H0 < q0; H0++) {
|
|
40943
40943
|
const n0 = $0[H0];
|
|
40944
|
-
|
|
40944
|
+
P0(n0[2] + K0, n0[1] + K0, n0[0] + K0);
|
|
40945
40945
|
}
|
|
40946
40946
|
if (L0 = Fe + at * 2, K0 = G0 * L0, ut)
|
|
40947
40947
|
for (let H0 = 0; H0 < q0; H0++) {
|
|
40948
40948
|
const n0 = $0[H0];
|
|
40949
|
-
|
|
40949
|
+
P0(n0[0] + K0, n0[1] + K0, n0[2] + K0);
|
|
40950
40950
|
}
|
|
40951
40951
|
} else {
|
|
40952
40952
|
if (xt)
|
|
40953
40953
|
for (let L0 = 0; L0 < q0; L0++) {
|
|
40954
40954
|
const K0 = $0[L0];
|
|
40955
|
-
|
|
40955
|
+
P0(K0[2], K0[1], K0[0]);
|
|
40956
40956
|
}
|
|
40957
40957
|
if (ut)
|
|
40958
40958
|
for (let L0 = 0; L0 < q0; L0++) {
|
|
40959
40959
|
const K0 = $0[L0];
|
|
40960
|
-
|
|
40960
|
+
P0(
|
|
40961
40961
|
K0[0] + G0 * Fe,
|
|
40962
40962
|
K0[1] + G0 * Fe,
|
|
40963
40963
|
K0[2] + G0 * Fe
|
|
@@ -40991,7 +40991,7 @@ let K$1 = class Nn extends BufferGeometry {
|
|
|
40991
40991
|
function w0(b0, L0, K0) {
|
|
40992
40992
|
Re.push(b0), Re.push(L0), Re.push(K0);
|
|
40993
40993
|
}
|
|
40994
|
-
function
|
|
40994
|
+
function P0(b0, L0, K0) {
|
|
40995
40995
|
N0(b0), N0(L0), N0(K0);
|
|
40996
40996
|
const H0 = C.length / 3, n0 = dt.generateTopUV(
|
|
40997
40997
|
r,
|
|
@@ -41849,7 +41849,7 @@ const _Stats = class gn {
|
|
|
41849
41849
|
this.minimal ? (this.dom.addEventListener("click", this.handleClick), this.showPanel(this.mode)) : window.addEventListener("resize", this.handleResize);
|
|
41850
41850
|
}
|
|
41851
41851
|
init(e) {
|
|
41852
|
-
return
|
|
41852
|
+
return V0(this, null, function* () {
|
|
41853
41853
|
if (!e) {
|
|
41854
41854
|
console.error('Stats: The "canvas" parameter is undefined.');
|
|
41855
41855
|
return;
|
|
@@ -41866,7 +41866,7 @@ const _Stats = class gn {
|
|
|
41866
41866
|
return e.isWebGLRenderer && !this.threeRendererPatched ? (this.patchThreeRenderer(e), this.gl = e.getContext(), this.trackGPU && this.initializeGPUTracking(), !0) : !1;
|
|
41867
41867
|
}
|
|
41868
41868
|
handleWebGPURenderer(e) {
|
|
41869
|
-
return
|
|
41869
|
+
return V0(this, null, function* () {
|
|
41870
41870
|
return e.isWebGPURenderer ? ((this.trackGPU || this.trackCPT) && (e.backend.trackTimestamp = !0, (yield e.hasFeatureAsync("timestamp-query")) && this.initializeWebGPUPanels()), this.info = e.info, this.patchThreeWebGPU(e), !0) : !1;
|
|
41871
41871
|
});
|
|
41872
41872
|
}
|
|
@@ -42598,11 +42598,11 @@ class SimplexNoise {
|
|
|
42598
42598
|
noise4d(e, n, r, C) {
|
|
42599
42599
|
const _ = this.grad4, I = this.simplex, O = this.perm, Se = (Math.sqrt(5) - 1) / 4, ve = (5 - Math.sqrt(5)) / 20;
|
|
42600
42600
|
let Ce, Re, Pe, Fe, ke;
|
|
42601
|
-
const ct = (e + n + r + C) * Se, Ue = Math.floor(e + ct), Ne = Math.floor(n + ct), lt = Math.floor(r + ct), at = Math.floor(C + ct), ht = (Ue + Ne + lt + at) * ve, dt = Ue - ht, ut = Ne - ht, xt = lt - ht, Lt = at - ht, Xt = e - dt, Zt = n - ut, Vt = r - xt, kt = C - Lt, $t = Xt > Zt ? 32 : 0, i0 = Xt > Vt ? 16 : 0, Yt = Zt > Vt ? 8 : 0, Kt = Xt > kt ? 4 : 0, Ft = Zt > kt ? 2 : 0, Wt = Vt > kt ? 1 : 0, e0 = $t + i0 + Yt + Kt + Ft + Wt, c0 = I[e0][0] >= 3 ? 1 : 0, h0 = I[e0][1] >= 3 ? 1 : 0, G0 = I[e0][2] >= 3 ? 1 : 0, D0 = I[e0][3] >= 3 ? 1 : 0, A0 = I[e0][0] >= 2 ? 1 : 0, f0 = I[e0][1] >= 2 ? 1 : 0, T0 = I[e0][2] >= 2 ? 1 : 0, F0 = I[e0][3] >= 2 ? 1 : 0, $0 = I[e0][0] >= 1 ? 1 : 0, q0 = I[e0][1] >= 1 ? 1 : 0, Si = I[e0][2] >= 1 ? 1 : 0, zi = I[e0][3] >= 1 ? 1 : 0, wi = Xt - c0 + ve, r0 = Zt - h0 + ve, w0 = Vt - G0 + ve,
|
|
42601
|
+
const ct = (e + n + r + C) * Se, Ue = Math.floor(e + ct), Ne = Math.floor(n + ct), lt = Math.floor(r + ct), at = Math.floor(C + ct), ht = (Ue + Ne + lt + at) * ve, dt = Ue - ht, ut = Ne - ht, xt = lt - ht, Lt = at - ht, Xt = e - dt, Zt = n - ut, Vt = r - xt, kt = C - Lt, $t = Xt > Zt ? 32 : 0, i0 = Xt > Vt ? 16 : 0, Yt = Zt > Vt ? 8 : 0, Kt = Xt > kt ? 4 : 0, Ft = Zt > kt ? 2 : 0, Wt = Vt > kt ? 1 : 0, e0 = $t + i0 + Yt + Kt + Ft + Wt, c0 = I[e0][0] >= 3 ? 1 : 0, h0 = I[e0][1] >= 3 ? 1 : 0, G0 = I[e0][2] >= 3 ? 1 : 0, D0 = I[e0][3] >= 3 ? 1 : 0, A0 = I[e0][0] >= 2 ? 1 : 0, f0 = I[e0][1] >= 2 ? 1 : 0, T0 = I[e0][2] >= 2 ? 1 : 0, F0 = I[e0][3] >= 2 ? 1 : 0, $0 = I[e0][0] >= 1 ? 1 : 0, q0 = I[e0][1] >= 1 ? 1 : 0, Si = I[e0][2] >= 1 ? 1 : 0, zi = I[e0][3] >= 1 ? 1 : 0, wi = Xt - c0 + ve, r0 = Zt - h0 + ve, w0 = Vt - G0 + ve, P0 = kt - D0 + ve, U0 = Xt - A0 + 2 * ve, N0 = Zt - f0 + 2 * ve, J0 = Vt - T0 + 2 * ve, b0 = kt - F0 + 2 * ve, L0 = Xt - $0 + 3 * ve, K0 = Zt - q0 + 3 * ve, H0 = Vt - Si + 3 * ve, n0 = kt - zi + 3 * ve, qt = Xt - 1 + 4 * ve, d0 = Zt - 1 + 4 * ve, g0 = Vt - 1 + 4 * ve, I0 = kt - 1 + 4 * ve, C0 = Ue & 255, Ti = Ne & 255, Q0 = lt & 255, Ri = at & 255, Wi = O[C0 + O[Ti + O[Q0 + O[Ri]]]] % 32, bi = O[C0 + c0 + O[Ti + h0 + O[Q0 + G0 + O[Ri + D0]]]] % 32, Li = O[C0 + A0 + O[Ti + f0 + O[Q0 + T0 + O[Ri + F0]]]] % 32, Pi = O[C0 + $0 + O[Ti + q0 + O[Q0 + Si + O[Ri + zi]]]] % 32, Ei = O[C0 + 1 + O[Ti + 1 + O[Q0 + 1 + O[Ri + 1]]]] % 32;
|
|
42602
42602
|
let Mi = 0.6 - Xt * Xt - Zt * Zt - Vt * Vt - kt * kt;
|
|
42603
42603
|
Mi < 0 ? Ce = 0 : (Mi *= Mi, Ce = Mi * Mi * this._dot4(_[Wi], Xt, Zt, Vt, kt));
|
|
42604
|
-
let Ii = 0.6 - wi * wi - r0 * r0 - w0 * w0 -
|
|
42605
|
-
Ii < 0 ? Re = 0 : (Ii *= Ii, Re = Ii * Ii * this._dot4(_[bi], wi, r0, w0,
|
|
42604
|
+
let Ii = 0.6 - wi * wi - r0 * r0 - w0 * w0 - P0 * P0;
|
|
42605
|
+
Ii < 0 ? Re = 0 : (Ii *= Ii, Re = Ii * Ii * this._dot4(_[bi], wi, r0, w0, P0));
|
|
42606
42606
|
let u0 = 0.6 - U0 * U0 - N0 * N0 - J0 * J0 - b0 * b0;
|
|
42607
42607
|
u0 < 0 ? Pe = 0 : (u0 *= u0, Pe = u0 * u0 * this._dot4(_[Li], U0, N0, J0, b0));
|
|
42608
42608
|
let yi = 0.6 - L0 * L0 - K0 * K0 - H0 * H0 - n0 * n0;
|
|
@@ -44184,9 +44184,9 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44184
44184
|
for (; S0 <= v0; ) S0 <<= 1;
|
|
44185
44185
|
for (S0 >>= 1, R0 = S0, S0 >>= 1; S0 >= 1; ) {
|
|
44186
44186
|
k0 = 0;
|
|
44187
|
-
const
|
|
44187
|
+
const E0 = k0 + l0 * (a0 - R0), j0 = l0 * S0, Ci = l0 * R0, xi = s0 * S0, Gi = s0 * R0;
|
|
44188
44188
|
let Zi, Xi, Fi, Ki;
|
|
44189
|
-
for (; k0 <=
|
|
44189
|
+
for (; k0 <= E0; k0 += Ci) {
|
|
44190
44190
|
let Bi = k0;
|
|
44191
44191
|
const Ai = k0 + s0 * (t0 - R0);
|
|
44192
44192
|
for (; Bi <= Ai; Bi += Gi) {
|
|
@@ -44212,8 +44212,8 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44212
44212
|
}
|
|
44213
44213
|
function Si(zt, wt, t0, s0, a0, l0, o0, M0, v0) {
|
|
44214
44214
|
let S0 = 0, R0 = 0;
|
|
44215
|
-
const k0 = o0,
|
|
44216
|
-
for (; s0.value <
|
|
44215
|
+
const k0 = o0, E0 = Math.trunc(s0.value + (a0 + 7) / 8);
|
|
44216
|
+
for (; s0.value < E0; )
|
|
44217
44217
|
for (h0(S0, R0, t0, s0), S0 = c0.c, R0 = c0.lc; R0 >= 14; ) {
|
|
44218
44218
|
const Ci = S0 >> R0 - 14 & 16383, xi = wt[Ci];
|
|
44219
44219
|
if (xi.len)
|
|
@@ -44224,7 +44224,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44224
44224
|
let Gi;
|
|
44225
44225
|
for (Gi = 0; Gi < xi.lit; Gi++) {
|
|
44226
44226
|
const Zi = Ft(zt[xi.p[Gi]]);
|
|
44227
|
-
for (; R0 < Zi && s0.value <
|
|
44227
|
+
for (; R0 < Zi && s0.value < E0; )
|
|
44228
44228
|
h0(S0, R0, t0, s0), S0 = c0.c, R0 = c0.lc;
|
|
44229
44229
|
if (R0 >= Zi && Wt(zt[xi.p[Gi]]) == (S0 >> R0 - Zi & (1 << Zi) - 1)) {
|
|
44230
44230
|
R0 -= Zi, D0(xi.p[Gi], l0, S0, R0, t0, s0, M0, v0, k0), S0 = G0.c, R0 = G0.lc;
|
|
@@ -44251,12 +44251,12 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44251
44251
|
const R0 = Pi(wt, t0);
|
|
44252
44252
|
if (t0.value += 4, v0 < 0 || v0 >= 65537 || S0 < 0 || S0 >= 65537)
|
|
44253
44253
|
throw new Error("Something wrong with HUF_ENCSIZE");
|
|
44254
|
-
const k0 = new Array(65537),
|
|
44255
|
-
Vt(
|
|
44254
|
+
const k0 = new Array(65537), E0 = new Array(16384);
|
|
44255
|
+
Vt(E0);
|
|
44256
44256
|
const j0 = s0 - (t0.value - M0);
|
|
44257
44257
|
if (Kt(zt, t0, j0, v0, S0, k0), R0 > 8 * (s0 - (t0.value - M0)))
|
|
44258
44258
|
throw new Error("Something wrong with hufUncompress");
|
|
44259
|
-
e0(k0, v0, S0,
|
|
44259
|
+
e0(k0, v0, S0, E0), Si(k0, E0, zt, t0, R0, S0, l0, a0, o0);
|
|
44260
44260
|
}
|
|
44261
44261
|
function wi(zt, wt, t0) {
|
|
44262
44262
|
for (let s0 = 0; s0 < t0; ++s0)
|
|
@@ -44274,7 +44274,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44274
44274
|
for (; !(a0 > l0 || (wt[a0++] = zt[t0++], a0 > l0)); )
|
|
44275
44275
|
wt[a0++] = zt[s0++];
|
|
44276
44276
|
}
|
|
44277
|
-
function
|
|
44277
|
+
function P0(zt) {
|
|
44278
44278
|
let wt = zt.byteLength;
|
|
44279
44279
|
const t0 = new Array();
|
|
44280
44280
|
let s0 = 0;
|
|
@@ -44298,12 +44298,12 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44298
44298
|
}
|
|
44299
44299
|
function U0(zt, wt, t0, s0, a0, l0) {
|
|
44300
44300
|
let o0 = new DataView(l0.buffer);
|
|
44301
|
-
const M0 = t0[zt.idx[0]].width, v0 = t0[zt.idx[0]].height, S0 = 3, R0 = Math.floor(M0 / 8), k0 = Math.ceil(M0 / 8),
|
|
44301
|
+
const M0 = t0[zt.idx[0]].width, v0 = t0[zt.idx[0]].height, S0 = 3, R0 = Math.floor(M0 / 8), k0 = Math.ceil(M0 / 8), E0 = Math.ceil(v0 / 8), j0 = M0 - (k0 - 1) * 8, Ci = v0 - (E0 - 1) * 8, xi = { value: 0 }, Gi = new Array(S0), Zi = new Array(S0), Xi = new Array(S0), Fi = new Array(S0), Ki = new Array(S0);
|
|
44302
44302
|
for (let Ai = 0; Ai < S0; ++Ai)
|
|
44303
|
-
Ki[Ai] = wt[zt.idx[Ai]], Gi[Ai] = Ai < 1 ? 0 : Gi[Ai - 1] + k0 *
|
|
44304
|
-
for (let Ai = 0; Ai <
|
|
44303
|
+
Ki[Ai] = wt[zt.idx[Ai]], Gi[Ai] = Ai < 1 ? 0 : Gi[Ai - 1] + k0 * E0, Zi[Ai] = new Float32Array(64), Xi[Ai] = new Uint16Array(64), Fi[Ai] = new Uint16Array(k0 * 64);
|
|
44304
|
+
for (let Ai = 0; Ai < E0; ++Ai) {
|
|
44305
44305
|
let Di = 8;
|
|
44306
|
-
Ai ==
|
|
44306
|
+
Ai == E0 - 1 && (Di = Ci);
|
|
44307
44307
|
let $i = 8;
|
|
44308
44308
|
for (let Hi = 0; Hi < k0; ++Hi) {
|
|
44309
44309
|
Hi == k0 - 1 && ($i = j0);
|
|
@@ -44347,7 +44347,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44347
44347
|
}
|
|
44348
44348
|
}
|
|
44349
44349
|
function N0(zt, wt, t0, s0, a0, l0) {
|
|
44350
|
-
const o0 = new DataView(l0.buffer), M0 = t0[zt], v0 = M0.width, S0 = M0.height, R0 = Math.ceil(v0 / 8), k0 = Math.ceil(S0 / 8),
|
|
44350
|
+
const o0 = new DataView(l0.buffer), M0 = t0[zt], v0 = M0.width, S0 = M0.height, R0 = Math.ceil(v0 / 8), k0 = Math.ceil(S0 / 8), E0 = Math.floor(v0 / 8), j0 = v0 - (R0 - 1) * 8, Ci = S0 - (k0 - 1) * 8, xi = { value: 0 };
|
|
44351
44351
|
let Gi = 0;
|
|
44352
44352
|
const Zi = new Float32Array(64), Xi = new Uint16Array(64), Fi = new Uint16Array(R0 * 64);
|
|
44353
44353
|
for (let Ki = 0; Ki < k0; ++Ki) {
|
|
@@ -44357,14 +44357,14 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44357
44357
|
Xi.fill(0), Xi[0] = a0[Gi++], J0(xi, s0, Xi), b0(Xi, Zi), L0(Zi), H0(Zi, Fi, Ai * 64);
|
|
44358
44358
|
for (let Ai = 8 * Ki; Ai < 8 * Ki + Bi; ++Ai) {
|
|
44359
44359
|
let Di = wt[zt][Ai];
|
|
44360
|
-
for (let $i = 0; $i <
|
|
44360
|
+
for (let $i = 0; $i < E0; ++$i) {
|
|
44361
44361
|
const ki = $i * 64 + (Ai & 7) * 8;
|
|
44362
44362
|
for (let Hi = 0; Hi < 8; ++Hi)
|
|
44363
44363
|
o0.setUint16(Di + Hi * 2 * M0.type, Fi[ki + Hi], !0);
|
|
44364
44364
|
Di += 8 * 2 * M0.type;
|
|
44365
44365
|
}
|
|
44366
|
-
if (R0 !=
|
|
44367
|
-
const $i =
|
|
44366
|
+
if (R0 != E0) {
|
|
44367
|
+
const $i = E0 * 64 + (Ai & 7) * 8;
|
|
44368
44368
|
for (let ki = 0; ki < j0; ++ki)
|
|
44369
44369
|
o0.setUint16(Di + ki * 2 * M0.type, Fi[$i + ki], !0);
|
|
44370
44370
|
}
|
|
@@ -44382,12 +44382,12 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44382
44382
|
}
|
|
44383
44383
|
function L0(zt) {
|
|
44384
44384
|
const wt = 0.5 * Math.cos(0.7853975), t0 = 0.5 * Math.cos(3.14159 / 16), s0 = 0.5 * Math.cos(3.14159 / 8), a0 = 0.5 * Math.cos(3 * 3.14159 / 16), l0 = 0.5 * Math.cos(5 * 3.14159 / 16), o0 = 0.5 * Math.cos(3 * 3.14159 / 8), M0 = 0.5 * Math.cos(7 * 3.14159 / 16), v0 = new Array(4), S0 = new Array(4), R0 = new Array(4), k0 = new Array(4);
|
|
44385
|
-
for (let
|
|
44386
|
-
const j0 =
|
|
44385
|
+
for (let E0 = 0; E0 < 8; ++E0) {
|
|
44386
|
+
const j0 = E0 * 8;
|
|
44387
44387
|
v0[0] = s0 * zt[j0 + 2], v0[1] = o0 * zt[j0 + 2], v0[2] = s0 * zt[j0 + 6], v0[3] = o0 * zt[j0 + 6], S0[0] = t0 * zt[j0 + 1] + a0 * zt[j0 + 3] + l0 * zt[j0 + 5] + M0 * zt[j0 + 7], S0[1] = a0 * zt[j0 + 1] - M0 * zt[j0 + 3] - t0 * zt[j0 + 5] - l0 * zt[j0 + 7], S0[2] = l0 * zt[j0 + 1] - t0 * zt[j0 + 3] + M0 * zt[j0 + 5] + a0 * zt[j0 + 7], S0[3] = M0 * zt[j0 + 1] - l0 * zt[j0 + 3] + a0 * zt[j0 + 5] - t0 * zt[j0 + 7], R0[0] = wt * (zt[j0 + 0] + zt[j0 + 4]), R0[3] = wt * (zt[j0 + 0] - zt[j0 + 4]), R0[1] = v0[0] + v0[3], R0[2] = v0[1] - v0[2], k0[0] = R0[0] + R0[1], k0[1] = R0[3] + R0[2], k0[2] = R0[3] - R0[2], k0[3] = R0[0] - R0[1], zt[j0 + 0] = k0[0] + S0[0], zt[j0 + 1] = k0[1] + S0[1], zt[j0 + 2] = k0[2] + S0[2], zt[j0 + 3] = k0[3] + S0[3], zt[j0 + 4] = k0[3] - S0[3], zt[j0 + 5] = k0[2] - S0[2], zt[j0 + 6] = k0[1] - S0[1], zt[j0 + 7] = k0[0] - S0[0];
|
|
44388
44388
|
}
|
|
44389
|
-
for (let
|
|
44390
|
-
v0[0] = s0 * zt[16 +
|
|
44389
|
+
for (let E0 = 0; E0 < 8; ++E0)
|
|
44390
|
+
v0[0] = s0 * zt[16 + E0], v0[1] = o0 * zt[16 + E0], v0[2] = s0 * zt[48 + E0], v0[3] = o0 * zt[48 + E0], S0[0] = t0 * zt[8 + E0] + a0 * zt[24 + E0] + l0 * zt[40 + E0] + M0 * zt[56 + E0], S0[1] = a0 * zt[8 + E0] - M0 * zt[24 + E0] - t0 * zt[40 + E0] - l0 * zt[56 + E0], S0[2] = l0 * zt[8 + E0] - t0 * zt[24 + E0] + M0 * zt[40 + E0] + a0 * zt[56 + E0], S0[3] = M0 * zt[8 + E0] - l0 * zt[24 + E0] + a0 * zt[40 + E0] - t0 * zt[56 + E0], R0[0] = wt * (zt[E0] + zt[32 + E0]), R0[3] = wt * (zt[E0] - zt[32 + E0]), R0[1] = v0[0] + v0[3], R0[2] = v0[1] - v0[2], k0[0] = R0[0] + R0[1], k0[1] = R0[3] + R0[2], k0[2] = R0[3] - R0[2], k0[3] = R0[0] - R0[1], zt[0 + E0] = k0[0] + S0[0], zt[8 + E0] = k0[1] + S0[1], zt[16 + E0] = k0[2] + S0[2], zt[24 + E0] = k0[3] + S0[3], zt[32 + E0] = k0[3] - S0[3], zt[40 + E0] = k0[2] - S0[2], zt[48 + E0] = k0[1] - S0[1], zt[56 + E0] = k0[0] - S0[0];
|
|
44391
44391
|
}
|
|
44392
44392
|
function K0(zt) {
|
|
44393
44393
|
for (let wt = 0; wt < 64; ++wt) {
|
|
@@ -44406,7 +44406,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44406
44406
|
return new DataView(zt.array.buffer, zt.offset.value, zt.size);
|
|
44407
44407
|
}
|
|
44408
44408
|
function d0(zt) {
|
|
44409
|
-
const wt = zt.viewer.buffer.slice(zt.offset.value, zt.offset.value + zt.size), t0 = new Uint8Array(
|
|
44409
|
+
const wt = zt.viewer.buffer.slice(zt.offset.value, zt.offset.value + zt.size), t0 = new Uint8Array(P0(wt)), s0 = new Uint8Array(t0.length);
|
|
44410
44410
|
return r0(t0), w0(t0, s0), new DataView(s0.buffer);
|
|
44411
44411
|
}
|
|
44412
44412
|
function g0(zt) {
|
|
@@ -44441,12 +44441,12 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44441
44441
|
);
|
|
44442
44442
|
}
|
|
44443
44443
|
wi(S0, s0, l0);
|
|
44444
|
-
let
|
|
44444
|
+
let E0 = 0;
|
|
44445
44445
|
const j0 = new Uint8Array(s0.buffer.byteLength);
|
|
44446
44446
|
for (let Ci = 0; Ci < zt.lines; Ci++)
|
|
44447
44447
|
for (let xi = 0; xi < zt.inputChannels.length; xi++) {
|
|
44448
44448
|
const Gi = o0[xi], Zi = Gi.nx * Gi.size, Xi = new Uint8Array(s0.buffer, Gi.end * 2, Zi * 2);
|
|
44449
|
-
j0.set(Xi,
|
|
44449
|
+
j0.set(Xi, E0), E0 += Zi * 2, Gi.end += Zi;
|
|
44450
44450
|
}
|
|
44451
44451
|
return new DataView(j0.buffer);
|
|
44452
44452
|
}
|
|
@@ -44518,7 +44518,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44518
44518
|
Gi.name == Xi.name && (Gi.compression = Xi.compression, Xi.index >= 0 && (S0.idx[Xi.index] = xi), Gi.offset = xi);
|
|
44519
44519
|
}
|
|
44520
44520
|
}
|
|
44521
|
-
let R0, k0,
|
|
44521
|
+
let R0, k0, E0;
|
|
44522
44522
|
if (a0.acCompressedSize > 0)
|
|
44523
44523
|
switch (a0.acCompression) {
|
|
44524
44524
|
case 0:
|
|
@@ -44539,7 +44539,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44539
44539
|
}
|
|
44540
44540
|
if (a0.rleRawSize > 0) {
|
|
44541
44541
|
const xi = zt.array.slice(t0.value, t0.value + a0.rleCompressedSize), Gi = unzlibSync(xi);
|
|
44542
|
-
|
|
44542
|
+
E0 = P0(Gi.buffer), t0.value += a0.rleCompressedSize;
|
|
44543
44543
|
}
|
|
44544
44544
|
let j0 = 0;
|
|
44545
44545
|
const Ci = new Array(v0.length);
|
|
@@ -44559,7 +44559,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44559
44559
|
let Ki = Ci[xi][Zi];
|
|
44560
44560
|
for (let Bi = 0; Bi < Gi.width; ++Bi) {
|
|
44561
44561
|
for (let Ai = 0; Ai < 2 * Gi.type; ++Ai)
|
|
44562
|
-
s0[Ki++] =
|
|
44562
|
+
s0[Ki++] = E0[Xi + Ai * Gi.width * Gi.height];
|
|
44563
44563
|
Xi++;
|
|
44564
44564
|
}
|
|
44565
44565
|
Zi++;
|
|
@@ -44786,11 +44786,11 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44786
44786
|
const v0 = zt.columns * zt.totalBytes, R0 = zt.size < zt.lines * v0 ? zt.uncompress(zt) : qt(zt);
|
|
44787
44787
|
wt.value += zt.size;
|
|
44788
44788
|
for (let k0 = 0; k0 < zt.lines; k0++) {
|
|
44789
|
-
const
|
|
44789
|
+
const E0 = k0 * zt.columns * zt.totalBytes;
|
|
44790
44790
|
for (let j0 = 0; j0 < zt.inputChannels.length; j0++) {
|
|
44791
44791
|
const Ci = pn.channels[j0].name, xi = zt.channelByteOffsets[Ci] * zt.columns, Gi = zt.decodeChannels[Ci];
|
|
44792
44792
|
if (Gi === void 0) continue;
|
|
44793
|
-
t0.value =
|
|
44793
|
+
t0.value = E0 + xi;
|
|
44794
44794
|
const Zi = (zt.height - (1 + M0 + k0)) * zt.outLineWidth;
|
|
44795
44795
|
for (let Xi = 0; Xi < zt.columns; Xi++) {
|
|
44796
44796
|
const Fi = Zi + (Xi + o0) * zt.outputChannels + Gi;
|
|
@@ -44810,13 +44810,13 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44810
44810
|
for (let v0 = 0; v0 < zt.blockHeight; v0++) {
|
|
44811
44811
|
const S0 = s0 * zt.blockHeight, R0 = v0 + zt.scanOrder(S0);
|
|
44812
44812
|
if (R0 >= zt.height) continue;
|
|
44813
|
-
const k0 = v0 * l0,
|
|
44813
|
+
const k0 = v0 * l0, E0 = (zt.height - 1 - R0) * zt.outLineWidth;
|
|
44814
44814
|
for (let j0 = 0; j0 < zt.inputChannels.length; j0++) {
|
|
44815
44815
|
const Ci = pn.channels[j0].name, xi = zt.channelByteOffsets[Ci] * zt.columns, Gi = zt.decodeChannels[Ci];
|
|
44816
44816
|
if (Gi !== void 0) {
|
|
44817
44817
|
t0.value = k0 + xi;
|
|
44818
44818
|
for (let Zi = 0; Zi < zt.columns; Zi++) {
|
|
44819
|
-
const Xi =
|
|
44819
|
+
const Xi = E0 + Zi * zt.outputChannels + Gi;
|
|
44820
44820
|
zt.byteArray[Xi] = zt.getter(M0, t0);
|
|
44821
44821
|
}
|
|
44822
44822
|
}
|
|
@@ -44900,14 +44900,14 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44900
44900
|
throw new Error("EXRLoader.parse: " + zt.compression + " is unsupported");
|
|
44901
44901
|
}
|
|
44902
44902
|
const M0 = {};
|
|
44903
|
-
for (const
|
|
44904
|
-
switch (
|
|
44903
|
+
for (const E0 of zt.channels)
|
|
44904
|
+
switch (E0.name) {
|
|
44905
44905
|
case "Y":
|
|
44906
44906
|
case "R":
|
|
44907
44907
|
case "G":
|
|
44908
44908
|
case "B":
|
|
44909
44909
|
case "A":
|
|
44910
|
-
M0[
|
|
44910
|
+
M0[E0.name] = !0, o0.type = E0.pixelType;
|
|
44911
44911
|
}
|
|
44912
44912
|
let v0 = !1, S0 = !1;
|
|
44913
44913
|
if (M0.R && M0.G && M0.B)
|
|
@@ -44960,21 +44960,21 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44960
44960
|
break;
|
|
44961
44961
|
}
|
|
44962
44962
|
let k0 = 0;
|
|
44963
|
-
for (const
|
|
44964
|
-
o0.decodeChannels[
|
|
44965
|
-
if (o0.totalBytes = k0, o0.outLineWidth = o0.width * o0.outputChannels, zt.lineOrder === "INCREASING_Y" ? o0.scanOrder = (
|
|
44963
|
+
for (const E0 of zt.channels)
|
|
44964
|
+
o0.decodeChannels[E0.name] !== void 0 && (o0.channelByteOffsets[E0.name] = k0), k0 += E0.pixelType * 2;
|
|
44965
|
+
if (o0.totalBytes = k0, o0.outLineWidth = o0.width * o0.outputChannels, zt.lineOrder === "INCREASING_Y" ? o0.scanOrder = (E0) => E0 : o0.scanOrder = (E0) => o0.height - 1 - E0, zt.spec.singleTile) {
|
|
44966
44966
|
o0.blockHeight = zt.tiles.ySize, o0.blockWidth = zt.tiles.xSize;
|
|
44967
|
-
const
|
|
44967
|
+
const E0 = Ln(zt.tiles, o0.width, o0.height), j0 = mn(E0, o0.width, zt.tiles.xSize, zt.tiles.roundingMode), Ci = mn(E0, o0.height, zt.tiles.ySize, zt.tiles.roundingMode);
|
|
44968
44968
|
o0.tileCount = j0[0] * Ci[0];
|
|
44969
|
-
for (let xi = 0; xi <
|
|
44969
|
+
for (let xi = 0; xi < E0; xi++)
|
|
44970
44970
|
for (let Gi = 0; Gi < Ci[xi]; Gi++)
|
|
44971
44971
|
for (let Zi = 0; Zi < j0[xi]; Zi++)
|
|
44972
44972
|
Ii(wt, s0);
|
|
44973
44973
|
o0.decode = Tn.bind(o0);
|
|
44974
44974
|
} else {
|
|
44975
44975
|
o0.blockWidth = o0.width;
|
|
44976
|
-
const
|
|
44977
|
-
for (let j0 = 0; j0 <
|
|
44976
|
+
const E0 = Math.ceil(o0.height / o0.blockHeight);
|
|
44977
|
+
for (let j0 = 0; j0 < E0; j0++)
|
|
44978
44978
|
Ii(wt, s0);
|
|
44979
44979
|
o0.decode = bn.bind(o0);
|
|
44980
44980
|
}
|
|
@@ -49382,8 +49382,8 @@ if (typeof document != "undefined") {
|
|
|
49382
49382
|
var r0 = this.props;
|
|
49383
49383
|
if (Ft === 1 && Wt === 0 && e0 === 0 && c0 === 0 && h0 === 0 && G0 === 1 && D0 === 0 && A0 === 0 && f0 === 0 && T0 === 0 && F0 === 1 && $0 === 0)
|
|
49384
49384
|
return r0[12] = r0[12] * Ft + r0[15] * q0, r0[13] = r0[13] * G0 + r0[15] * Si, r0[14] = r0[14] * F0 + r0[15] * zi, r0[15] *= wi, this._identityCalculated = !1, this;
|
|
49385
|
-
var w0 = r0[0],
|
|
49386
|
-
return r0[0] = w0 * Ft +
|
|
49385
|
+
var w0 = r0[0], P0 = r0[1], U0 = r0[2], N0 = r0[3], J0 = r0[4], b0 = r0[5], L0 = r0[6], K0 = r0[7], H0 = r0[8], n0 = r0[9], qt = r0[10], d0 = r0[11], g0 = r0[12], I0 = r0[13], C0 = r0[14], Ti = r0[15];
|
|
49386
|
+
return r0[0] = w0 * Ft + P0 * h0 + U0 * f0 + N0 * q0, r0[1] = w0 * Wt + P0 * G0 + U0 * T0 + N0 * Si, r0[2] = w0 * e0 + P0 * D0 + U0 * F0 + N0 * zi, r0[3] = w0 * c0 + P0 * A0 + U0 * $0 + N0 * wi, r0[4] = J0 * Ft + b0 * h0 + L0 * f0 + K0 * q0, r0[5] = J0 * Wt + b0 * G0 + L0 * T0 + K0 * Si, r0[6] = J0 * e0 + b0 * D0 + L0 * F0 + K0 * zi, r0[7] = J0 * c0 + b0 * A0 + L0 * $0 + K0 * wi, r0[8] = H0 * Ft + n0 * h0 + qt * f0 + d0 * q0, r0[9] = H0 * Wt + n0 * G0 + qt * T0 + d0 * Si, r0[10] = H0 * e0 + n0 * D0 + qt * F0 + d0 * zi, r0[11] = H0 * c0 + n0 * A0 + qt * $0 + d0 * wi, r0[12] = g0 * Ft + I0 * h0 + C0 * f0 + Ti * q0, r0[13] = g0 * Wt + I0 * G0 + C0 * T0 + Ti * Si, r0[14] = g0 * e0 + I0 * D0 + C0 * F0 + Ti * zi, r0[15] = g0 * c0 + I0 * A0 + C0 * $0 + Ti * wi, this._identityCalculated = !1, this;
|
|
49387
49387
|
}
|
|
49388
49388
|
function Ue() {
|
|
49389
49389
|
return this._identityCalculated || (this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1), this._identityCalculated = !0), this._identity;
|
|
@@ -51763,7 +51763,7 @@ if (typeof document != "undefined") {
|
|
|
51763
51763
|
Re = Pe.length, Se = 0, ve = 0;
|
|
51764
51764
|
var i0 = v.finalSize * 1.2 * 0.714, Yt = !0, Kt, Ft, Wt, e0, c0;
|
|
51765
51765
|
e0 = r.length;
|
|
51766
|
-
var h0, G0 = -1, D0, A0, f0, T0 = ke, F0 = at, $0 = lt, q0 = -1, Si, zi, wi, r0, w0,
|
|
51766
|
+
var h0, G0 = -1, D0, A0, f0, T0 = ke, F0 = at, $0 = lt, q0 = -1, Si, zi, wi, r0, w0, P0, U0, N0, J0 = "", b0 = this.defaultPropsArray, L0;
|
|
51767
51767
|
if (v.j === 2 || v.j === 1) {
|
|
51768
51768
|
var K0 = 0, H0 = 0, n0 = v.j === 2 ? -0.5 : -1, qt = 0, d0 = !0;
|
|
51769
51769
|
for (Ce = 0; Ce < Re; Ce += 1)
|
|
@@ -51781,7 +51781,7 @@ if (typeof document != "undefined") {
|
|
|
51781
51781
|
}
|
|
51782
51782
|
for (Ce = 0; Ce < Re; Ce += 1) {
|
|
51783
51783
|
if (_.reset(), Si = 1, Pe[Ce].n)
|
|
51784
|
-
Se = 0, ve += v.yOffset, ve += Yt ? 1 : 0, ke = T0, Yt = !1, this._hasMaskedPath && (at = F0, lt = $0, dt = ut[at].points, ht = dt[lt - 1], ct = dt[lt], xt = ct.partialLength, Ue = 0), J0 = "", N0 = "",
|
|
51784
|
+
Se = 0, ve += v.yOffset, ve += Yt ? 1 : 0, ke = T0, Yt = !1, this._hasMaskedPath && (at = F0, lt = $0, dt = ut[at].points, ht = dt[lt - 1], ct = dt[lt], xt = ct.partialLength, Ue = 0), J0 = "", N0 = "", P0 = "", L0 = "", b0 = this.defaultPropsArray;
|
|
51785
51785
|
else {
|
|
51786
51786
|
if (this._hasMaskedPath) {
|
|
51787
51787
|
if (q0 !== Pe[Ce].line) {
|
|
@@ -51823,7 +51823,7 @@ if (typeof document != "undefined") {
|
|
|
51823
51823
|
}
|
|
51824
51824
|
for (Wt = 0; Wt < e0; Wt += 1)
|
|
51825
51825
|
Kt = r[Wt].a, Kt.p.propType && (Ft = r[Wt].s, h0 = Ft.getMult(Pe[Ce].anIndexes[Wt], C.a[Wt].s.totalChars), this._hasMaskedPath ? h0.length ? _.translate(0, Kt.p.v[1] * h0[0], -Kt.p.v[2] * h0[1]) : _.translate(0, Kt.p.v[1] * h0, -Kt.p.v[2] * h0) : h0.length ? _.translate(Kt.p.v[0] * h0[0], Kt.p.v[1] * h0[1], -Kt.p.v[2] * h0[2]) : _.translate(Kt.p.v[0] * h0, Kt.p.v[1] * h0, -Kt.p.v[2] * h0));
|
|
51826
|
-
if (v.strokeWidthAnim && (
|
|
51826
|
+
if (v.strokeWidthAnim && (P0 = wi < 0 ? 0 : wi), v.strokeColorAnim && (U0 = "rgb(" + Math.round(zi[0] * 255) + "," + Math.round(zi[1] * 255) + "," + Math.round(zi[2] * 255) + ")"), v.fillColorAnim && v.fc && (N0 = "rgb(" + Math.round(r0[0] * 255) + "," + Math.round(r0[1] * 255) + "," + Math.round(r0[2] * 255) + ")"), this._hasMaskedPath) {
|
|
51827
51827
|
if (_.translate(0, -v.ls), _.translate(0, n[1] * i0 * 0.01 + ve, 0), this._pathData.p.v) {
|
|
51828
51828
|
Zt = (ct.point[1] - ht.point[1]) / (ct.point[0] - ht.point[0]);
|
|
51829
51829
|
var I0 = Math.atan(Zt) * 180 / Math.PI;
|
|
@@ -51843,7 +51843,7 @@ if (typeof document != "undefined") {
|
|
|
51843
51843
|
}
|
|
51844
51844
|
I === "html" ? J0 = _.toCSS() : I === "svg" ? J0 = _.to2dCSS() : b0 = [_.props[0], _.props[1], _.props[2], _.props[3], _.props[4], _.props[5], _.props[6], _.props[7], _.props[8], _.props[9], _.props[10], _.props[11], _.props[12], _.props[13], _.props[14], _.props[15]], L0 = Si;
|
|
51845
51845
|
}
|
|
51846
|
-
O <= Ce ? (c0 = new LetterProps(L0,
|
|
51846
|
+
O <= Ce ? (c0 = new LetterProps(L0, P0, U0, N0, J0, b0), this.renderedLetters.push(c0), O += 1, this.lettersChangedFlag = !0) : (c0 = this.renderedLetters[Ce], this.lettersChangedFlag = c0.update(L0, P0, U0, N0, J0, b0) || this.lettersChangedFlag);
|
|
51847
51847
|
}
|
|
51848
51848
|
}
|
|
51849
51849
|
}, TextAnimatorProperty.prototype.getValue = function() {
|
|
@@ -57794,7 +57794,7 @@ class Point extends pt {
|
|
|
57794
57794
|
});
|
|
57795
57795
|
}
|
|
57796
57796
|
create() {
|
|
57797
|
-
return
|
|
57797
|
+
return V0(this, null, function* () {
|
|
57798
57798
|
const { sprite: n } = this.options, r = this.getMaterial();
|
|
57799
57799
|
n ? this.createSprite(r) : this.createMesh(new PlaneGeometry(1, 1), r), this.setScale(1), this.object3d.scale.multiplyScalar(0.1);
|
|
57800
57800
|
});
|
|
@@ -57870,7 +57870,7 @@ class Arc extends pt {
|
|
|
57870
57870
|
};
|
|
57871
57871
|
}
|
|
57872
57872
|
create() {
|
|
57873
|
-
return
|
|
57873
|
+
return V0(this, null, function* () {
|
|
57874
57874
|
map || (map = getLineTexture(0.5));
|
|
57875
57875
|
const { color: n, lineWidth: r, globe: C } = this.options;
|
|
57876
57876
|
let { radius: _ } = this.options;
|
|
@@ -57898,7 +57898,7 @@ class Arc extends pt {
|
|
|
57898
57898
|
{ key: "Arc_第一控制点", position: Se.v1 },
|
|
57899
57899
|
{ key: "Arc_第二控制点", position: Se.v2 },
|
|
57900
57900
|
{ key: "Arc_终点", position: Se.v3 }
|
|
57901
|
-
].map((lt) =>
|
|
57901
|
+
].map((lt) => V0(this, [lt], function* ({ key: Ue, position: Ne }) {
|
|
57902
57902
|
const at = yield Ce.draw("Group", {}, this);
|
|
57903
57903
|
return at.position.copy(Ne), at.userData.disabledC = !0, at.userData.disabledR = !0, at.userData.disabledProcessedChildren = !0, Ce.updateBaseObjectKey(at, `${Ue}_${this.options.key}`), at;
|
|
57904
57904
|
}))
|
|
@@ -57912,7 +57912,7 @@ class Arc extends pt {
|
|
|
57912
57912
|
});
|
|
57913
57913
|
}
|
|
57914
57914
|
instantiate() {
|
|
57915
|
-
return
|
|
57915
|
+
return V0(this, null, function* () {
|
|
57916
57916
|
this.update();
|
|
57917
57917
|
const n = yield this.line.instantiate({
|
|
57918
57918
|
recursive: !1
|
|
@@ -57931,7 +57931,7 @@ class Arc extends pt {
|
|
|
57931
57931
|
this.line.options.nodes = Se, this.line.setGeometry(Se, _), this.pickTube && this.addPickTarget(this.pickTube.options.radius);
|
|
57932
57932
|
}
|
|
57933
57933
|
addPickTarget(n = 1, r = !1) {
|
|
57934
|
-
return
|
|
57934
|
+
return V0(this, null, function* () {
|
|
57935
57935
|
const C = this.pickTube, _ = this.pencil.lead, I = this.line.options.nodes, O = new CurvePath();
|
|
57936
57936
|
for (let Ce = 0; Ce < I.length - 1; Ce++)
|
|
57937
57937
|
O.add(new LineCurve3(I[Ce], I[Ce + 1]));
|
|
@@ -58009,7 +58009,7 @@ class CrossPlane extends pt {
|
|
|
58009
58009
|
this.options = B0({}, n);
|
|
58010
58010
|
}
|
|
58011
58011
|
create() {
|
|
58012
|
-
return
|
|
58012
|
+
return V0(this, null, function* () {
|
|
58013
58013
|
this.createGroup();
|
|
58014
58014
|
const n = this.options.material || new MeshBasicMaterial({
|
|
58015
58015
|
color: "#ffffff",
|
|
@@ -58039,7 +58039,7 @@ class CrossPlane extends pt {
|
|
|
58039
58039
|
}
|
|
58040
58040
|
class PlaneShadow extends pt {
|
|
58041
58041
|
create() {
|
|
58042
|
-
return
|
|
58042
|
+
return V0(this, null, function* () {
|
|
58043
58043
|
const e = new PlaneGeometry(100, 100, 2, 2), n = new ShadowMaterial();
|
|
58044
58044
|
n.opacity = 0.5, n.depthWrite = !1, this.createMesh(e, n), this.object3d.receiveShadow = !0, this.position.z = 0.1, this.object3d.name = "阴影接受";
|
|
58045
58045
|
});
|
|
@@ -58059,7 +58059,7 @@ class Model extends pt {
|
|
|
58059
58059
|
}, n);
|
|
58060
58060
|
}
|
|
58061
58061
|
create() {
|
|
58062
|
-
return
|
|
58062
|
+
return V0(this, null, function* () {
|
|
58063
58063
|
const n = this.pencil.loader, r = this.options.src, C = yield n.load(r, {
|
|
58064
58064
|
type: "gltf",
|
|
58065
58065
|
cache: !1
|
|
@@ -59865,8 +59865,17 @@ class SetValue extends Command {
|
|
|
59865
59865
|
this.oldValue = I !== void 0 ? I[r] : void 0, this.newValue = C;
|
|
59866
59866
|
}
|
|
59867
59867
|
execute() {
|
|
59868
|
-
|
|
59869
|
-
|
|
59868
|
+
return V0(this, null, function* () {
|
|
59869
|
+
const e = this.properties ? this.object[this.properties] : this.object;
|
|
59870
|
+
if (e && !((e instanceof RectAreaLight || e instanceof AmbientLight) && this.attributeName === "castShadow")) {
|
|
59871
|
+
if (this.attributeName === "keepCamera" && Array.isArray(this.newValue)) {
|
|
59872
|
+
const [n, ...r] = this.newValue;
|
|
59873
|
+
yield this.editor.viewport.vis.lookAt(...r, !1), e[this.attributeName] = n;
|
|
59874
|
+
} else
|
|
59875
|
+
e[this.attributeName] = this.newValue;
|
|
59876
|
+
this.fixObj(), this.editor.emit("objectChanged", this.object);
|
|
59877
|
+
}
|
|
59878
|
+
});
|
|
59870
59879
|
}
|
|
59871
59880
|
fixObj() {
|
|
59872
59881
|
const e = this.properties ? this.object[this.properties] : this.object;
|
|
@@ -59879,8 +59888,15 @@ class SetValue extends Command {
|
|
|
59879
59888
|
(this.attributeName === "name" || this.attributeName === "prefab" || this.attributeName === "visible" || this.attributeName === "keepCamera" || this.attributeName === "castShadow" && this.object instanceof DirectionalLight) && this.editor.emit("baseObjectListChange"), this.attributeName === "keepCamera" && (this.editor.select(null), this.editor.emit("baseObjectListChange"));
|
|
59880
59889
|
}
|
|
59881
59890
|
undo() {
|
|
59882
|
-
|
|
59883
|
-
|
|
59891
|
+
return V0(this, null, function* () {
|
|
59892
|
+
const e = this.properties ? this.object[this.properties] : this.object;
|
|
59893
|
+
if (this.attributeName === "keepCamera" && Array.isArray(this.oldValue)) {
|
|
59894
|
+
const [n, ...r] = this.oldValue;
|
|
59895
|
+
yield this.editor.viewport.vis.lookAt(...r, !1), e[this.attributeName] = n;
|
|
59896
|
+
} else
|
|
59897
|
+
e[this.attributeName] = this.oldValue;
|
|
59898
|
+
this.fixObj(), this.editor.emit("objectChanged", this.object);
|
|
59899
|
+
});
|
|
59884
59900
|
}
|
|
59885
59901
|
update(e) {
|
|
59886
59902
|
this.newValue = e.newValue;
|
|
@@ -59928,7 +59944,7 @@ class AddVis extends Command {
|
|
|
59928
59944
|
this.type = "AddVis", this.visType = r, this.visOptions = C, r !== void 0 && (this.name = `Add Vis: ${r}`);
|
|
59929
59945
|
}
|
|
59930
59946
|
execute() {
|
|
59931
|
-
return
|
|
59947
|
+
return V0(this, null, function* () {
|
|
59932
59948
|
yield this.editor.viewport.setVis(this.visType, this.visOptions), this.editor.select(null);
|
|
59933
59949
|
});
|
|
59934
59950
|
}
|
|
@@ -59954,7 +59970,7 @@ class AddObject extends Command {
|
|
|
59954
59970
|
this.type = "AddObject", this.objectType = r, this.objectOptions = C, r !== void 0 && (this.name = `Add Object: ${r}`);
|
|
59955
59971
|
}
|
|
59956
59972
|
execute() {
|
|
59957
|
-
return
|
|
59973
|
+
return V0(this, null, function* () {
|
|
59958
59974
|
var r;
|
|
59959
59975
|
const n = this.editor.viewport.vis;
|
|
59960
59976
|
this.obj = yield n.lead.draw(this.objectType, Yi(B0({}, this.objectOptions), {
|
|
@@ -59990,7 +60006,7 @@ class RemoveObject extends Command {
|
|
|
59990
60006
|
}), this.object.objectType === "BaseObject#Model" && this.object.stopAllClips()), this.editor.emit("baseObjectListChange"), this.editor.select(null);
|
|
59991
60007
|
}
|
|
59992
60008
|
undo() {
|
|
59993
|
-
return
|
|
60009
|
+
return V0(this, null, function* () {
|
|
59994
60010
|
this.object.show(), this.object.mList.addBaseObjectMap(this.object), delete this.object.userData.selectHide, this.object.objectType === "BaseObject#Model" && this.object.playAllClips(), this.editor.emit("baseObjectListChange");
|
|
59995
60011
|
});
|
|
59996
60012
|
}
|
|
@@ -60012,7 +60028,7 @@ class CopyObject extends Command {
|
|
|
60012
60028
|
this.type = "CopyObject", this.name = "Copy Object", this.object = r;
|
|
60013
60029
|
}
|
|
60014
60030
|
execute() {
|
|
60015
|
-
return
|
|
60031
|
+
return V0(this, null, function* () {
|
|
60016
60032
|
var _;
|
|
60017
60033
|
const n = this.editor.viewport.vis, r = this.object.key, C = yield this.object.instantiate({
|
|
60018
60034
|
key: `${this.id}`
|
|
@@ -60021,7 +60037,7 @@ class CopyObject extends Command {
|
|
|
60021
60037
|
});
|
|
60022
60038
|
}
|
|
60023
60039
|
undo() {
|
|
60024
|
-
return
|
|
60040
|
+
return V0(this, null, function* () {
|
|
60025
60041
|
var n;
|
|
60026
60042
|
(n = this.copyObject) == null || n.erase(), this.editor.select(null);
|
|
60027
60043
|
});
|
|
@@ -60057,13 +60073,13 @@ class SetObjectMaterial extends Command {
|
|
|
60057
60073
|
), this.newValue = _;
|
|
60058
60074
|
}
|
|
60059
60075
|
execute() {
|
|
60060
|
-
return
|
|
60076
|
+
return V0(this, null, function* () {
|
|
60061
60077
|
const r = this.editor.pencil.mList.get(this.newValue);
|
|
60062
60078
|
r && (this.editor.setObjectMaterial(this.object, this.materialSlot, r), this.playVideo(r), this.editor.emit("materialChanged", this.object));
|
|
60063
60079
|
});
|
|
60064
60080
|
}
|
|
60065
60081
|
undo() {
|
|
60066
|
-
return
|
|
60082
|
+
return V0(this, null, function* () {
|
|
60067
60083
|
const n = this.oldMaterial;
|
|
60068
60084
|
this.editor.setObjectMaterial(this.object, this.materialSlot, n), this.playVideo(n), this.editor.emit("materialChanged", this.object);
|
|
60069
60085
|
});
|
|
@@ -60122,7 +60138,7 @@ class AddMaterial extends Command {
|
|
|
60122
60138
|
this.type = "AddMaterial", this.name = "Add Material", this.materialType = r, this.object = C, this.materialSlot = _;
|
|
60123
60139
|
}
|
|
60124
60140
|
execute() {
|
|
60125
|
-
return
|
|
60141
|
+
return V0(this, null, function* () {
|
|
60126
60142
|
this.addObjectUuid = `material_${this.id}`;
|
|
60127
60143
|
const n = this.editor.pencil.mList;
|
|
60128
60144
|
let r;
|
|
@@ -60157,7 +60173,7 @@ class AddMaterial extends Command {
|
|
|
60157
60173
|
});
|
|
60158
60174
|
}
|
|
60159
60175
|
undo() {
|
|
60160
|
-
return
|
|
60176
|
+
return V0(this, null, function* () {
|
|
60161
60177
|
this.setMaterialCommand && (yield this.setMaterialCommand.undo()), this.editor.pencil.mList.remove(this.addObjectUuid), this.flag && this.editor.emit("materialChanged");
|
|
60162
60178
|
});
|
|
60163
60179
|
}
|
|
@@ -60181,14 +60197,14 @@ class CopyMaterial extends Command {
|
|
|
60181
60197
|
this.type = "CopyMaterial", this.name = "Copy Material", this.objectUuid = r;
|
|
60182
60198
|
}
|
|
60183
60199
|
execute() {
|
|
60184
|
-
return
|
|
60200
|
+
return V0(this, null, function* () {
|
|
60185
60201
|
this.copyObjectUuid = `material_${this.id}`, this.editor.pencil.mList.copy(this.objectUuid, this.copyObjectUuid, {
|
|
60186
60202
|
name: `材质_${this.id}`
|
|
60187
60203
|
});
|
|
60188
60204
|
});
|
|
60189
60205
|
}
|
|
60190
60206
|
undo() {
|
|
60191
|
-
return
|
|
60207
|
+
return V0(this, null, function* () {
|
|
60192
60208
|
this.editor.pencil.mList.remove(this.copyObjectUuid);
|
|
60193
60209
|
});
|
|
60194
60210
|
}
|
|
@@ -60212,13 +60228,13 @@ class RemoveMaterial extends Command {
|
|
|
60212
60228
|
this.type = "RemoveMaterial", this.name = "Remove Material", this.objectUuid = r;
|
|
60213
60229
|
}
|
|
60214
60230
|
execute() {
|
|
60215
|
-
return
|
|
60231
|
+
return V0(this, null, function* () {
|
|
60216
60232
|
const n = this.editor.pencil.mList;
|
|
60217
60233
|
this.material = n.get(this.objectUuid), n.remove(this.objectUuid);
|
|
60218
60234
|
});
|
|
60219
60235
|
}
|
|
60220
60236
|
undo() {
|
|
60221
|
-
return
|
|
60237
|
+
return V0(this, null, function* () {
|
|
60222
60238
|
const n = this.editor.pencil.mList;
|
|
60223
60239
|
this.material && n.add(this.objectUuid, this.material);
|
|
60224
60240
|
});
|
|
@@ -60244,13 +60260,13 @@ class SetSetting extends Command {
|
|
|
60244
60260
|
this.type = "SetSetting", this.updatable = !0, this.name = `Set Setting.${r}`, this.attributeName = r, this.newValue = C, n.viewport.vis && (this.oldValue = n.viewport.vis.settings[r]);
|
|
60245
60261
|
}
|
|
60246
60262
|
execute() {
|
|
60247
|
-
return
|
|
60263
|
+
return V0(this, null, function* () {
|
|
60248
60264
|
const n = this.editor.viewport.vis;
|
|
60249
60265
|
n.settings[this.attributeName] = this.newValue, yield n.settings[this.attributeName], this.editor.emit("settingsChanged");
|
|
60250
60266
|
});
|
|
60251
60267
|
}
|
|
60252
60268
|
undo() {
|
|
60253
|
-
return
|
|
60269
|
+
return V0(this, null, function* () {
|
|
60254
60270
|
const n = this.editor.viewport.vis;
|
|
60255
60271
|
n.settings[this.attributeName] = this.oldValue, yield n.settings[this.attributeName], this.editor.emit("settingsChanged");
|
|
60256
60272
|
});
|
|
@@ -60393,7 +60409,7 @@ class History {
|
|
|
60393
60409
|
return !(e != null && e.updatable) || !(n != null && n.updatable) || r >= COMMAND_UPDATE_THRESHOLD ? !1 : e.object === n.object && e.objectUuid === n.objectUuid && e.type === n.type && e.attributeName === n.attributeName && e.attributeName2 === n.attributeName2 && e.name === n.name && e.materialSlot === n.materialSlot;
|
|
60394
60410
|
}
|
|
60395
60411
|
execute(e, n) {
|
|
60396
|
-
return
|
|
60412
|
+
return V0(this, null, function* () {
|
|
60397
60413
|
const r = this.undos[this.undos.length - 1], C = Date.now() - this.lastCmdTime;
|
|
60398
60414
|
this.canMergeCommands(r, e, C) ? (r.update(e), e = r) : (this.undos.push(e), e.id = ++this.idCounter), e.name = n !== void 0 ? n : e.name;
|
|
60399
60415
|
try {
|
|
@@ -60542,7 +60558,7 @@ class History {
|
|
|
60542
60558
|
return new Promise((n, r) => {
|
|
60543
60559
|
const C = [...this.undos], _ = C.length;
|
|
60544
60560
|
let I = 0;
|
|
60545
|
-
const O = () =>
|
|
60561
|
+
const O = () => V0(this, null, function* () {
|
|
60546
60562
|
const Se = performance.now();
|
|
60547
60563
|
for (; C.length > 0 && performance.now() - Se < e; ) {
|
|
60548
60564
|
if (this.editor._dispose) {
|
|
@@ -60572,7 +60588,7 @@ class History {
|
|
|
60572
60588
|
* 执行单个撤销命令
|
|
60573
60589
|
*/
|
|
60574
60590
|
executeUndo(e) {
|
|
60575
|
-
return
|
|
60591
|
+
return V0(this, null, function* () {
|
|
60576
60592
|
if (!(e != null && e.json)) {
|
|
60577
60593
|
console.warn("Invalid undo command:", e);
|
|
60578
60594
|
return;
|
|
@@ -60698,7 +60714,7 @@ class Viewport {
|
|
|
60698
60714
|
this.vis.setSaveCamera(e), (n = this.vis.pencil.controls) == null || n.saveState(), this.cameraState = B0({}, (r = this.vis) == null ? void 0 : r.cameraState), this.editor.emit("cameraStateChanged");
|
|
60699
60715
|
}
|
|
60700
60716
|
addVis(r) {
|
|
60701
|
-
return
|
|
60717
|
+
return V0(this, arguments, function* (e, n = {}) {
|
|
60702
60718
|
this.replaceVis() && (yield this.editor.execute(new AddVis(this.editor, e, n)));
|
|
60703
60719
|
});
|
|
60704
60720
|
}
|
|
@@ -60710,7 +60726,7 @@ class Viewport {
|
|
|
60710
60726
|
return !0;
|
|
60711
60727
|
}
|
|
60712
60728
|
setVis(r) {
|
|
60713
|
-
return
|
|
60729
|
+
return V0(this, arguments, function* (e, n = {}) {
|
|
60714
60730
|
if (!this.options.visFactories && (this.editor.setViewportVis(e), !this.options.visFactories)) {
|
|
60715
60731
|
console.error("visFactories is not defined");
|
|
60716
60732
|
return;
|
|
@@ -60771,13 +60787,13 @@ class Viewport {
|
|
|
60771
60787
|
});
|
|
60772
60788
|
}
|
|
60773
60789
|
addObj(r) {
|
|
60774
|
-
return
|
|
60790
|
+
return V0(this, arguments, function* (e, n = {}) {
|
|
60775
60791
|
const C = objs$3[e].getInitOptions;
|
|
60776
60792
|
C && Object.assign(n, C(this.vis.pencil, n)), yield this.editor.execute(new AddObject(this.editor, e, n));
|
|
60777
60793
|
});
|
|
60778
60794
|
}
|
|
60779
60795
|
removeObj(e) {
|
|
60780
|
-
return
|
|
60796
|
+
return V0(this, null, function* () {
|
|
60781
60797
|
const { vis: n } = this;
|
|
60782
60798
|
if (!n || !e)
|
|
60783
60799
|
return;
|
|
@@ -60799,7 +60815,7 @@ class Viewport {
|
|
|
60799
60815
|
this.copyObjKey = void 0;
|
|
60800
60816
|
}
|
|
60801
60817
|
pasteObj() {
|
|
60802
|
-
return
|
|
60818
|
+
return V0(this, null, function* () {
|
|
60803
60819
|
const { vis: e } = this;
|
|
60804
60820
|
if (!e || !this.copyObjKey)
|
|
60805
60821
|
return;
|
|
@@ -60808,7 +60824,7 @@ class Viewport {
|
|
|
60808
60824
|
});
|
|
60809
60825
|
}
|
|
60810
60826
|
copyMListMaterial(e) {
|
|
60811
|
-
return
|
|
60827
|
+
return V0(this, null, function* () {
|
|
60812
60828
|
const { vis: n } = this;
|
|
60813
60829
|
if (!n)
|
|
60814
60830
|
return;
|
|
@@ -60821,12 +60837,12 @@ class Viewport {
|
|
|
60821
60837
|
});
|
|
60822
60838
|
}
|
|
60823
60839
|
clearCopyMListMaterial() {
|
|
60824
|
-
return
|
|
60840
|
+
return V0(this, null, function* () {
|
|
60825
60841
|
yield del("copyMaterial");
|
|
60826
60842
|
});
|
|
60827
60843
|
}
|
|
60828
60844
|
pasteMListMaterial() {
|
|
60829
|
-
return
|
|
60845
|
+
return V0(this, null, function* () {
|
|
60830
60846
|
const { vis: e } = this;
|
|
60831
60847
|
if (!e)
|
|
60832
60848
|
return;
|
|
@@ -60835,7 +60851,7 @@ class Viewport {
|
|
|
60835
60851
|
});
|
|
60836
60852
|
}
|
|
60837
60853
|
pasteMListMaterial2Replace(e) {
|
|
60838
|
-
return
|
|
60854
|
+
return V0(this, null, function* () {
|
|
60839
60855
|
const { vis: n } = this;
|
|
60840
60856
|
if (!n)
|
|
60841
60857
|
return;
|
|
@@ -60858,7 +60874,7 @@ class Viewport {
|
|
|
60858
60874
|
C && this.editor.execute(new AddMaterial(this.editor, e, n, r));
|
|
60859
60875
|
}
|
|
60860
60876
|
removeMListMaterial(e) {
|
|
60861
|
-
return
|
|
60877
|
+
return V0(this, null, function* () {
|
|
60862
60878
|
const { vis: n } = this;
|
|
60863
60879
|
n && this.editor.execute(new RemoveMaterial(this.editor, e));
|
|
60864
60880
|
});
|
|
@@ -61002,7 +61018,7 @@ class Editor {
|
|
|
61002
61018
|
});
|
|
61003
61019
|
}
|
|
61004
61020
|
const Ce = O.object3d;
|
|
61005
|
-
if (Ce.isDirectionalLight
|
|
61021
|
+
if (Ce.isDirectionalLight) {
|
|
61006
61022
|
const dt = O.options.type;
|
|
61007
61023
|
Se.unshift({
|
|
61008
61024
|
key: O.key.replace(dt, dt + "Shadow"),
|
|
@@ -61073,12 +61089,12 @@ class Editor {
|
|
|
61073
61089
|
this.emit("mListGraphChanged");
|
|
61074
61090
|
}
|
|
61075
61091
|
execute(e, n) {
|
|
61076
|
-
return
|
|
61092
|
+
return V0(this, null, function* () {
|
|
61077
61093
|
yield this.history.execute(e, n);
|
|
61078
61094
|
});
|
|
61079
61095
|
}
|
|
61080
61096
|
fromJSON(e, n) {
|
|
61081
|
-
return
|
|
61097
|
+
return V0(this, null, function* () {
|
|
61082
61098
|
var r, C, _, I;
|
|
61083
61099
|
try {
|
|
61084
61100
|
n && !y$1(n) ? console.warn(
|
|
@@ -61115,7 +61131,7 @@ class Editor {
|
|
|
61115
61131
|
});
|
|
61116
61132
|
}
|
|
61117
61133
|
appendJSON(e) {
|
|
61118
|
-
return
|
|
61134
|
+
return V0(this, null, function* () {
|
|
61119
61135
|
let n;
|
|
61120
61136
|
if (typeof e == "string") {
|
|
61121
61137
|
const r = this.options.assetsPrefix + e;
|
|
@@ -61234,7 +61250,7 @@ class Camera extends Event {
|
|
|
61234
61250
|
this.cameraState[n] = [C.x, C.y, C.z, _.x, _.y, _.z];
|
|
61235
61251
|
}
|
|
61236
61252
|
useSaveCamera(n, r = !1) {
|
|
61237
|
-
return
|
|
61253
|
+
return V0(this, null, function* () {
|
|
61238
61254
|
const C = this.cameraState[n];
|
|
61239
61255
|
return C ? (yield this.lookAt(
|
|
61240
61256
|
C[0],
|
|
@@ -61248,7 +61264,7 @@ class Camera extends Event {
|
|
|
61248
61264
|
});
|
|
61249
61265
|
}
|
|
61250
61266
|
lookAt(n, r, C, _, I, O, Se = !1, ve = 250) {
|
|
61251
|
-
return
|
|
61267
|
+
return V0(this, null, function* () {
|
|
61252
61268
|
this.pencil.controls.smoothTime = ve / 1e3, yield this.pencil.controls.setLookAt(
|
|
61253
61269
|
n,
|
|
61254
61270
|
r,
|
|
@@ -61261,12 +61277,12 @@ class Camera extends Event {
|
|
|
61261
61277
|
});
|
|
61262
61278
|
}
|
|
61263
61279
|
truck(n, r, C = !1, _ = 250) {
|
|
61264
|
-
return
|
|
61280
|
+
return V0(this, null, function* () {
|
|
61265
61281
|
this.pencil.controls.smoothTime = _ / 1e3, this.pencil.controls.restThreshold = 0, yield this.pencil.controls.truck(n, r, C), this.pencil.controls.restThreshold = 25e-4, this.pencil.controls.smoothTime = 250 / 1e3;
|
|
61266
61282
|
});
|
|
61267
61283
|
}
|
|
61268
61284
|
dollyTo(n, r = !1, C = 250) {
|
|
61269
|
-
return
|
|
61285
|
+
return V0(this, null, function* () {
|
|
61270
61286
|
let _ = n;
|
|
61271
61287
|
if (typeof _ == "string") {
|
|
61272
61288
|
const [I, O] = _.split("=");
|
|
@@ -61280,7 +61296,7 @@ class Camera extends Event {
|
|
|
61280
61296
|
return MathUtils.euclideanModulo(_ + Math.PI, C) - Math.PI;
|
|
61281
61297
|
}
|
|
61282
61298
|
lookAtTarget(n, r = !1, C = 250) {
|
|
61283
|
-
return
|
|
61299
|
+
return V0(this, null, function* () {
|
|
61284
61300
|
this.pencil.controls.smoothTime = C / 1e3;
|
|
61285
61301
|
const _ = this.pencil.controls.azimuthAngle, I = this.pencil.controls.polarAngle, O = this.pencil.controls.distance, Se = this.pencil.cameraTarget.clone(), ve = n.azimuthAngle || _, Ce = n.polarAngle || I, Re = n.distance || O, Pe = n.target || Se;
|
|
61286
61302
|
yield Promise.all([
|
|
@@ -61317,7 +61333,7 @@ class Camera extends Event {
|
|
|
61317
61333
|
});
|
|
61318
61334
|
}
|
|
61319
61335
|
resetCamera(n = !1, r = 250) {
|
|
61320
|
-
return
|
|
61336
|
+
return V0(this, null, function* () {
|
|
61321
61337
|
this.pencil.controls.smoothTime = r / 1e3, yield this.pencil.controls.reset(n), this.pencil.controls.smoothTime = 250 / 1e3;
|
|
61322
61338
|
});
|
|
61323
61339
|
}
|
|
@@ -61432,20 +61448,20 @@ class Base extends Camera {
|
|
|
61432
61448
|
loaderAdd(...n) {
|
|
61433
61449
|
}
|
|
61434
61450
|
initMaterial(...n) {
|
|
61435
|
-
return
|
|
61451
|
+
return V0(this, null, function* () {
|
|
61436
61452
|
});
|
|
61437
61453
|
}
|
|
61438
61454
|
initVis(...n) {
|
|
61439
|
-
return
|
|
61455
|
+
return V0(this, null, function* () {
|
|
61440
61456
|
});
|
|
61441
61457
|
}
|
|
61442
61458
|
init(...n) {
|
|
61443
|
-
return
|
|
61459
|
+
return V0(this, null, function* () {
|
|
61444
61460
|
yield this.initPencil(), this.loaderAdd(), console.time(`vis-core:time.${this.visName}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}-loader`), yield this.initMaterial(), yield this.initVis(), yield Promise.all(this.lead.objectsPromise);
|
|
61445
61461
|
});
|
|
61446
61462
|
}
|
|
61447
61463
|
initPencil() {
|
|
61448
|
-
return
|
|
61464
|
+
return V0(this, null, function* () {
|
|
61449
61465
|
var C, _, I, O, Se, ve, Ce, Re;
|
|
61450
61466
|
if (this.pencil) return;
|
|
61451
61467
|
const n = B0({}, this.options.pencilConfig);
|
|
@@ -61667,7 +61683,7 @@ class Base extends Camera {
|
|
|
61667
61683
|
);
|
|
61668
61684
|
}
|
|
61669
61685
|
handleSetting(n, r) {
|
|
61670
|
-
return
|
|
61686
|
+
return V0(this, null, function* () {
|
|
61671
61687
|
const { pencil: C } = this;
|
|
61672
61688
|
if (n === "mouseWheel" || n === "mouseLeft" || n === "mouseRight") {
|
|
61673
61689
|
const _ = n.replace("mouse", "").toLowerCase();
|
|
@@ -61690,7 +61706,7 @@ class Base extends Camera {
|
|
|
61690
61706
|
this.showState && (this.lead.group.hide(), this.lead.prefabGroup.hide(), this.showState = !1, this.emit("hide"));
|
|
61691
61707
|
}
|
|
61692
61708
|
addCSS2D(C) {
|
|
61693
|
-
return
|
|
61709
|
+
return V0(this, arguments, function* (n, r = {}) {
|
|
61694
61710
|
typeof r == "string" && (r = { display: r }), r.display && (n.style.display = r.display);
|
|
61695
61711
|
let _ = 0;
|
|
61696
61712
|
typeof r.onTop != "undefined" && (_ = r.onTop);
|
|
@@ -61701,7 +61717,7 @@ class Base extends Camera {
|
|
|
61701
61717
|
});
|
|
61702
61718
|
}
|
|
61703
61719
|
addCSS3D(C) {
|
|
61704
|
-
return
|
|
61720
|
+
return V0(this, arguments, function* (n, r = {}) {
|
|
61705
61721
|
r.display && (n.style.display = r.display);
|
|
61706
61722
|
let _ = 0;
|
|
61707
61723
|
typeof r.onTop != "undefined" && (_ = r.onTop);
|
|
@@ -139861,7 +139877,7 @@ class Building extends pt {
|
|
|
139861
139877
|
this.options = B0({}, n);
|
|
139862
139878
|
}
|
|
139863
139879
|
create() {
|
|
139864
|
-
return
|
|
139880
|
+
return V0(this, null, function* () {
|
|
139865
139881
|
const { json: n, projection: r, cacheKey: C, meters: _, grey: I, clip: O } = this.options, Se = this.pencil.mList, ve = this.pencil.getPlugin("worker"), Ce = this.pencil.lead, Re = I ? "-grey" : "";
|
|
139866
139882
|
this.createGroup();
|
|
139867
139883
|
const Pe = Se.getMultiple("building" + Re);
|
|
@@ -139917,7 +139933,7 @@ class Building extends pt {
|
|
|
139917
139933
|
);
|
|
139918
139934
|
}
|
|
139919
139935
|
yield Promise.all(
|
|
139920
|
-
Fe.map((ke) =>
|
|
139936
|
+
Fe.map((ke) => V0(this, null, function* () {
|
|
139921
139937
|
const { h: ct, z: Ue } = ke.userData, Ne = ct + Ue, lt = Ne <= 20 ? "20" : Ne <= 60 ? "60" : "max";
|
|
139922
139938
|
let at = this.options.material;
|
|
139923
139939
|
at || (at = [Pe[lt + "Top"], Pe[lt + "Side"]]);
|
|
@@ -140004,7 +140020,7 @@ class Road extends pt {
|
|
|
140004
140020
|
this.options = B0({}, n);
|
|
140005
140021
|
}
|
|
140006
140022
|
create() {
|
|
140007
|
-
return
|
|
140023
|
+
return V0(this, null, function* () {
|
|
140008
140024
|
const { clip: n, grey: r } = this.options;
|
|
140009
140025
|
this.createGroup();
|
|
140010
140026
|
const C = this.pencil.getPlugin("worker"), _ = this.pencil.lead, I = this.pencil.mList, O = r ? "-grey" : "", { json: Se, projection: ve, cacheKey: Ce, meters: Re } = this.options;
|
|
@@ -140056,7 +140072,7 @@ class Road extends pt {
|
|
|
140056
140072
|
);
|
|
140057
140073
|
}
|
|
140058
140074
|
yield Promise.all(
|
|
140059
|
-
Pe.map((Fe, ke) =>
|
|
140075
|
+
Pe.map((Fe, ke) => V0(this, null, function* () {
|
|
140060
140076
|
const ct = yield _.draw(
|
|
140061
140077
|
"Line",
|
|
140062
140078
|
{
|
|
@@ -140084,7 +140100,7 @@ class Area extends pt {
|
|
|
140084
140100
|
this.options = B0({}, n);
|
|
140085
140101
|
}
|
|
140086
140102
|
create() {
|
|
140087
|
-
return
|
|
140103
|
+
return V0(this, null, function* () {
|
|
140088
140104
|
this.createGroup();
|
|
140089
140105
|
const { json: n, projection: r, type: C, cacheKey: _, material: I, oArr: O, clip: Se } = this.options, ve = this.pencil.getPlugin("worker"), Ce = this.pencil.lead;
|
|
140090
140106
|
let Re = _ ? yield ve.getCachedGeometry({
|
|
@@ -140144,7 +140160,7 @@ class Area extends pt {
|
|
|
140144
140160
|
);
|
|
140145
140161
|
}
|
|
140146
140162
|
yield Promise.all(
|
|
140147
|
-
Re.map((Pe, Fe) =>
|
|
140163
|
+
Re.map((Pe, Fe) => V0(this, null, function* () {
|
|
140148
140164
|
const { z: ke } = Pe.userData, ct = yield Ce.draw(
|
|
140149
140165
|
"ExtrudePolygon",
|
|
140150
140166
|
{
|
|
@@ -140636,7 +140652,7 @@ class CityPlane extends pt {
|
|
|
140636
140652
|
}, n);
|
|
140637
140653
|
}
|
|
140638
140654
|
create() {
|
|
140639
|
-
return
|
|
140655
|
+
return V0(this, null, function* () {
|
|
140640
140656
|
const { width: n, height: r, color: C, map: _, material: I } = this.options, O = new PlaneGeometry(n, r, 2, 2);
|
|
140641
140657
|
this.plane = O;
|
|
140642
140658
|
const Se = I || new MeshBasicMaterial({
|
|
@@ -140764,7 +140780,7 @@ class Target extends pt {
|
|
|
140764
140780
|
return _.translateZ(1), _;
|
|
140765
140781
|
}
|
|
140766
140782
|
create() {
|
|
140767
|
-
return
|
|
140783
|
+
return V0(this, null, function* () {
|
|
140768
140784
|
const { scale: n = 0.03 } = this.options;
|
|
140769
140785
|
this.createGroup();
|
|
140770
140786
|
const r = this.pencil.loader, C = "241, 241, 86", _ = r.getAsset("/image/city/cylinder.webp"), I = getCanvasTexture(C), O = this.createRipple(I);
|
|
@@ -141003,7 +141019,7 @@ class City$1 extends Base {
|
|
|
141003
141019
|
);
|
|
141004
141020
|
}
|
|
141005
141021
|
initMaterial() {
|
|
141006
|
-
return
|
|
141022
|
+
return V0(this, null, function* () {
|
|
141007
141023
|
if (this.options.showBuilding) {
|
|
141008
141024
|
const n = ["20", "60", "max"].reduce(
|
|
141009
141025
|
(C, _) => {
|
|
@@ -141119,7 +141135,7 @@ class City$1 extends Base {
|
|
|
141119
141135
|
n && !n.enabled && (n.enabled = !0, console.log("enabledSSAO"));
|
|
141120
141136
|
}
|
|
141121
141137
|
init() {
|
|
141122
|
-
return
|
|
141138
|
+
return V0(this, null, function* () {
|
|
141123
141139
|
const { jsonName: n, adcode: r } = this.options;
|
|
141124
141140
|
yield this.initPencil(), this.loaderAdd(), this.loaderAddJson(n), console.time(`vis-core:time.${this.visName}${r}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}${r}-loader`), this.settings.mouseLeft = qi.SCREEN_PAN, yield this.settings.mouseLeft, this.pencil.camera.userData.up = "0,0,1", this.adcode = this.options.adcode, this.options.center && (this.pcenter = this.options.center), this.projection = f({
|
|
141125
141141
|
center: this.pcenter,
|
|
@@ -141146,7 +141162,7 @@ class City$1 extends Base {
|
|
|
141146
141162
|
return (C = (r = this.projection).invert) == null ? void 0 : C.call(r, [n.x, -n.z]);
|
|
141147
141163
|
}
|
|
141148
141164
|
fitTo(n, r = !0) {
|
|
141149
|
-
return
|
|
141165
|
+
return V0(this, null, function* () {
|
|
141150
141166
|
this.pencil.controls.fitToBox(n.object3d, r), this.pencil.controls.rotatePolarTo(
|
|
141151
141167
|
this.pencil.camera.up.z === 1 ? Math.PI / 180 * 70 : Math.PI / 180 * 160,
|
|
141152
141168
|
r
|
|
@@ -141154,7 +141170,7 @@ class City$1 extends Base {
|
|
|
141154
141170
|
});
|
|
141155
141171
|
}
|
|
141156
141172
|
initVis() {
|
|
141157
|
-
return
|
|
141173
|
+
return V0(this, null, function* () {
|
|
141158
141174
|
const { fitTo: n, jsonName: r, planeOut: C } = this.options, _ = this.adcode, I = this.loader, O = this.options.showBuilding && I.getAsset(`/cityGzip/Building${r}.json.gzip`), Se = this.options.showRoad && I.getAsset(`/cityGzip/Road${r}.json.gzip`), ve = this.options.showRiver && I.getAsset(`/cityGzip/River${r}.json.gzip`), Ce = this.options.showGrassland && I.getAsset(`/cityGzip/Grassland${r}.json.gzip`), Re = {};
|
|
141159
141175
|
[
|
|
141160
141176
|
...(ve == null ? void 0 : ve.features) || [],
|
|
@@ -141218,7 +141234,7 @@ class City$1 extends Base {
|
|
|
141218
141234
|
});
|
|
141219
141235
|
}
|
|
141220
141236
|
fitToTarget(n, r) {
|
|
141221
|
-
return
|
|
141237
|
+
return V0(this, null, function* () {
|
|
141222
141238
|
const C = this.lead.getObject("Target", {
|
|
141223
141239
|
key: "cityTarget" + n
|
|
141224
141240
|
});
|
|
@@ -141252,7 +141268,7 @@ class City$1 extends Base {
|
|
|
141252
141268
|
});
|
|
141253
141269
|
}
|
|
141254
141270
|
drawBuilding() {
|
|
141255
|
-
return
|
|
141271
|
+
return V0(this, arguments, function* (n = {}) {
|
|
141256
141272
|
var _;
|
|
141257
141273
|
if (!n.json) {
|
|
141258
141274
|
console.warn(" json:Building");
|
|
@@ -141290,7 +141306,7 @@ class City$1 extends Base {
|
|
|
141290
141306
|
});
|
|
141291
141307
|
}
|
|
141292
141308
|
drawArea() {
|
|
141293
|
-
return
|
|
141309
|
+
return V0(this, arguments, function* (n = {}) {
|
|
141294
141310
|
var O;
|
|
141295
141311
|
if (!n.json) {
|
|
141296
141312
|
console.warn(" json:drawGeography");
|
|
@@ -141331,7 +141347,7 @@ class City$1 extends Base {
|
|
|
141331
141347
|
});
|
|
141332
141348
|
}
|
|
141333
141349
|
drawRoad() {
|
|
141334
|
-
return
|
|
141350
|
+
return V0(this, arguments, function* (n = {}) {
|
|
141335
141351
|
var I;
|
|
141336
141352
|
if (!n.json) {
|
|
141337
141353
|
console.warn(" json:Road");
|
|
@@ -141412,7 +141428,7 @@ class Countries extends pt {
|
|
|
141412
141428
|
}, n);
|
|
141413
141429
|
}
|
|
141414
141430
|
create() {
|
|
141415
|
-
return
|
|
141431
|
+
return V0(this, null, function* () {
|
|
141416
141432
|
const {
|
|
141417
141433
|
geojson: n,
|
|
141418
141434
|
mats: r,
|
|
@@ -141446,7 +141462,7 @@ class Countries extends pt {
|
|
|
141446
141462
|
bbox: this.options.bbox,
|
|
141447
141463
|
hasSide: C
|
|
141448
141464
|
},
|
|
141449
|
-
cb: (Ue) =>
|
|
141465
|
+
cb: (Ue) => V0(this, null, function* () {
|
|
141450
141466
|
var lt, at;
|
|
141451
141467
|
const Ne = yield Se.draw(
|
|
141452
141468
|
"ConicPolygon",
|
|
@@ -141467,7 +141483,7 @@ class Countries extends pt {
|
|
|
141467
141483
|
lineWidth: [1],
|
|
141468
141484
|
coordinatesArr: ct.coords
|
|
141469
141485
|
},
|
|
141470
|
-
cb: (Ue) =>
|
|
141486
|
+
cb: (Ue) => V0(this, null, function* () {
|
|
141471
141487
|
var lt;
|
|
141472
141488
|
const Ne = yield Se.draw(
|
|
141473
141489
|
"Line",
|
|
@@ -141496,7 +141512,7 @@ class SphereShadow extends pt {
|
|
|
141496
141512
|
}, n);
|
|
141497
141513
|
}
|
|
141498
141514
|
create() {
|
|
141499
|
-
return
|
|
141515
|
+
return V0(this, null, function* () {
|
|
141500
141516
|
const n = new SphereGeometry(this.options.radius, 128, 90), r = new MeshBasicMaterial();
|
|
141501
141517
|
this.createMesh(n, r), this.scale.multiplyScalar(1.001), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "阴影面", this.hide();
|
|
141502
141518
|
});
|
|
@@ -141511,7 +141527,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141511
141527
|
const { loader: e } = this;
|
|
141512
141528
|
e.add(["/image/earth2/basic.jpg", "/image/earth2/NormalMap.jpg"]);
|
|
141513
141529
|
}, v.initMaterial = function() {
|
|
141514
|
-
return
|
|
141530
|
+
return V0(this, null, function* () {
|
|
141515
141531
|
const e = this.loader, n = e.getAsset("/image/earth2/basic.jpg"), r = e.getAsset("/image/earth2/NormalMap.jpg"), C = new MeshStandardMaterial({
|
|
141516
141532
|
name: "地球材质",
|
|
141517
141533
|
map: n,
|
|
@@ -141523,7 +141539,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141523
141539
|
this.mList.add("earthMaterial", C);
|
|
141524
141540
|
});
|
|
141525
141541
|
}, v.initVis = function() {
|
|
141526
|
-
return
|
|
141542
|
+
return V0(this, null, function* () {
|
|
141527
141543
|
v.pencil.camera.near = 1, v.pencil.camera.far = 3e3, v.pencil.camera.fov = 12, v.pencil.camera.updateProjectionMatrix();
|
|
141528
141544
|
const [e, n] = yield Promise.all([
|
|
141529
141545
|
this.lead.draw("Light", {
|
|
@@ -141554,7 +141570,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141554
141570
|
"/image/earth/chinaNormal.webp"
|
|
141555
141571
|
]);
|
|
141556
141572
|
}, v.initVis = function() {
|
|
141557
|
-
return
|
|
141573
|
+
return V0(this, null, function* () {
|
|
141558
141574
|
yield this.initLight();
|
|
141559
141575
|
const [, e, n, r] = yield Promise.all([
|
|
141560
141576
|
this.lead.draw("Earth", {
|
|
@@ -141629,7 +141645,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141629
141645
|
), yield this.pencil.controls.dollyTo(99.11560932366835, !1);
|
|
141630
141646
|
});
|
|
141631
141647
|
}, v.initMaterial = function() {
|
|
141632
|
-
return
|
|
141648
|
+
return V0(this, null, function* () {
|
|
141633
141649
|
const e = this.loader, n = new MeshStandardMaterial({
|
|
141634
141650
|
side: DoubleSide,
|
|
141635
141651
|
name: "顶面",
|
|
@@ -141687,7 +141703,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141687
141703
|
};
|
|
141688
141704
|
}, countryPlate = (v) => {
|
|
141689
141705
|
v.initVis = function() {
|
|
141690
|
-
return
|
|
141706
|
+
return V0(this, null, function* () {
|
|
141691
141707
|
yield this.initLight();
|
|
141692
141708
|
const [, e] = yield Promise.all([
|
|
141693
141709
|
this.lead.draw("Earth", {
|
|
@@ -141710,7 +141726,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141710
141726
|
this.map = e, yield this.pencil.controls.rotateTo(1.8041576242193995, 1.2232045720480524, !1), yield this.pencil.controls.dollyTo(99.11560932366835, !1), this.playing && (this.pencil.controls.minPolarAngle = this.pencil.controls.polarAngle, this.pencil.controls.maxPolarAngle = this.pencil.controls.polarAngle);
|
|
141711
141727
|
});
|
|
141712
141728
|
}, v.initMaterial = function() {
|
|
141713
|
-
return
|
|
141729
|
+
return V0(this, null, function* () {
|
|
141714
141730
|
const e = new MeshStandardMaterial({
|
|
141715
141731
|
side: DoubleSide,
|
|
141716
141732
|
name: "侧面",
|
|
@@ -141769,7 +141785,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141769
141785
|
}, styles[this.options.style](this);
|
|
141770
141786
|
}
|
|
141771
141787
|
handleSetting(n, r) {
|
|
141772
|
-
return
|
|
141788
|
+
return V0(this, null, function* () {
|
|
141773
141789
|
return yield yn(Zn.prototype, this, "handleSetting").call(this, n, r), n === "autoRotateSpeed" ? this.pencil.autoRotate(r) : n === "autoRotate" && (r ? this.settings.autoRotateSpeed = -20 : this.settings.autoRotateSpeed = 0), r;
|
|
141774
141790
|
});
|
|
141775
141791
|
}
|
|
@@ -141785,7 +141801,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141785
141801
|
});
|
|
141786
141802
|
}
|
|
141787
141803
|
initLight() {
|
|
141788
|
-
return
|
|
141804
|
+
return V0(this, null, function* () {
|
|
141789
141805
|
const [n, r] = yield Promise.all([
|
|
141790
141806
|
this.lead.draw("Light", {
|
|
141791
141807
|
type: "RectAreaLight",
|
|
@@ -141828,7 +141844,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141828
141844
|
}
|
|
141829
141845
|
}
|
|
141830
141846
|
addAreaPlaneByProperty(n, r, C) {
|
|
141831
|
-
return
|
|
141847
|
+
return V0(this, null, function* () {
|
|
141832
141848
|
if (!this.map) return;
|
|
141833
141849
|
const I = this.map.options.geojson.features.find(
|
|
141834
141850
|
(O) => O.properties && O.properties[n] === r
|
|
@@ -141869,7 +141885,7 @@ const objs$1 = Yi(B0({}, objs$3), {
|
|
|
141869
141885
|
};
|
|
141870
141886
|
m0(Zn, "VisName", "earth");
|
|
141871
141887
|
let index$1 = Zn;
|
|
141872
|
-
const timeOut = (v) =>
|
|
141888
|
+
const timeOut = (v) => V0(void 0, null, function* () {
|
|
141873
141889
|
const e = makePromiseCreator();
|
|
141874
141890
|
return setTimeout(() => {
|
|
141875
141891
|
e.resolve();
|
|
@@ -142008,7 +142024,7 @@ let PlaneMap$1 = class extends pt {
|
|
|
142008
142024
|
}, n), ((r = this.options.projection.rotate) == null ? void 0 : r[0]) === -160 && (this.options.projection.projectionType === "winkel3" ? this.splitPolygons = 100 : this.splitPolygons = 300);
|
|
142009
142025
|
}
|
|
142010
142026
|
create() {
|
|
142011
|
-
return
|
|
142027
|
+
return V0(this, null, function* () {
|
|
142012
142028
|
const {
|
|
142013
142029
|
geojson: n,
|
|
142014
142030
|
extrudeLineGeojson: r,
|
|
@@ -142022,7 +142038,7 @@ let PlaneMap$1 = class extends pt {
|
|
|
142022
142038
|
const ve = this.pencil.lead;
|
|
142023
142039
|
if (_) {
|
|
142024
142040
|
const ut = yield Promise.all(
|
|
142025
|
-
n.features.map((xt) =>
|
|
142041
|
+
n.features.map((xt) => V0(this, null, function* () {
|
|
142026
142042
|
const { properties: Lt } = xt, Xt = `${this.getPropertiesKey(Lt)}`, Zt = yield ve.draw("Group", {
|
|
142027
142043
|
target: this,
|
|
142028
142044
|
key: Xt
|
|
@@ -142083,11 +142099,11 @@ let PlaneMap$1 = class extends pt {
|
|
|
142083
142099
|
});
|
|
142084
142100
|
}
|
|
142085
142101
|
addArea(n, r) {
|
|
142086
|
-
return
|
|
142102
|
+
return V0(this, null, function* () {
|
|
142087
142103
|
const { bbox: C, material: _, onTop: I } = r, O = this.geojson2Meta(n), Se = this.pencil.getPlugin("worker"), ve = this.pencil.lead;
|
|
142088
142104
|
if (this.pencil.mList, r.areaGroup)
|
|
142089
142105
|
return yield Promise.all(
|
|
142090
|
-
O.map((Ce) =>
|
|
142106
|
+
O.map((Ce) => V0(this, null, function* () {
|
|
142091
142107
|
const { coords: Re, properties: Pe } = Ce, Fe = this.findGroup(this.getPropertiesKey(Pe)), ke = yield Se.geoGeometry(
|
|
142092
142108
|
"extrudePolygon",
|
|
142093
142109
|
{
|
|
@@ -142147,11 +142163,11 @@ let PlaneMap$1 = class extends pt {
|
|
|
142147
142163
|
});
|
|
142148
142164
|
}
|
|
142149
142165
|
addLine(n, r) {
|
|
142150
|
-
return
|
|
142166
|
+
return V0(this, null, function* () {
|
|
142151
142167
|
const { material: C, onTop: _ } = r, I = this.geojson2Meta(n), O = this.pencil.getPlugin("worker"), Se = this.pencil.lead;
|
|
142152
142168
|
if (r.areaGroup)
|
|
142153
142169
|
return yield Promise.all(
|
|
142154
|
-
I.map((ve) =>
|
|
142170
|
+
I.map((ve) => V0(this, null, function* () {
|
|
142155
142171
|
const { coords: Ce, properties: Re } = ve, Pe = this.findGroup(this.getPropertiesKey(Re)), Fe = yield O.geoGeometry("line", {
|
|
142156
142172
|
mesaage: {
|
|
142157
142173
|
coordinatesArr: Ce,
|
|
@@ -142330,10 +142346,10 @@ class ContinentsBg extends pt {
|
|
|
142330
142346
|
this.options = n;
|
|
142331
142347
|
}
|
|
142332
142348
|
create() {
|
|
142333
|
-
return
|
|
142349
|
+
return V0(this, null, function* () {
|
|
142334
142350
|
const { depth: n } = this.options, r = this.pencil.mList, C = this.pencil.lead, _ = r.getMultiple("continents");
|
|
142335
142351
|
this.createGroup(), this.object3d.name = "大洲", yield Promise.all(
|
|
142336
|
-
Object.values(continentsLiteJson).map((I) =>
|
|
142352
|
+
Object.values(continentsLiteJson).map((I) => V0(this, null, function* () {
|
|
142337
142353
|
const O = I.features[0], Se = O.properties.adcode;
|
|
142338
142354
|
if (Se === 10) return;
|
|
142339
142355
|
const ve = centroid(O).geometry.coordinates;
|
|
@@ -142417,7 +142433,7 @@ class PlaneMap extends pt {
|
|
|
142417
142433
|
});
|
|
142418
142434
|
}
|
|
142419
142435
|
create() {
|
|
142420
|
-
return
|
|
142436
|
+
return V0(this, null, function* () {
|
|
142421
142437
|
const { geojson: n, bbox: r } = this.options, C = this.geojson2Meta(n), _ = this.pencil.getPlugin("worker"), I = this.pencil.lead, Se = yield this.pencil.loader.load("/1.png"), ve = yield _.geoGeometry("extrudePolygon", {
|
|
142422
142438
|
mesaage: {
|
|
142423
142439
|
coordinatesArr: C.map(({ coords: lt }) => lt).flat(),
|
|
@@ -142520,7 +142536,7 @@ const getLabelElement = (v) => {
|
|
|
142520
142536
|
const e = this.loader;
|
|
142521
142537
|
e.add(["/image/map/jianbian.webp"]), e.add(["/image/map/hp2.webp", "/image/map/fx2.webp"]);
|
|
142522
142538
|
}, v.initMaterial = function() {
|
|
142523
|
-
return
|
|
142539
|
+
return V0(this, null, function* () {
|
|
142524
142540
|
const e = this.loader, n = this.mList, r = (() => {
|
|
142525
142541
|
const C = e.getAsset("/image/map/hp2.webp");
|
|
142526
142542
|
C.center.set(0.5, 0.5), C.repeat.set(0.97, 1.01);
|
|
@@ -142564,7 +142580,7 @@ const getLabelElement = (v) => {
|
|
|
142564
142580
|
return;
|
|
142565
142581
|
}
|
|
142566
142582
|
v.initMaterial = function() {
|
|
142567
|
-
return
|
|
142583
|
+
return V0(this, null, function* () {
|
|
142568
142584
|
const e = this.mList, n = (() => {
|
|
142569
142585
|
const r = new MeshBasicMaterial({
|
|
142570
142586
|
name: "顶面",
|
|
@@ -142599,7 +142615,7 @@ const getLabelElement = (v) => {
|
|
|
142599
142615
|
};
|
|
142600
142616
|
}, china = (v) => {
|
|
142601
142617
|
v.options.lineOffset = 5e-3, v.loaderAdd = function() {
|
|
142602
|
-
return
|
|
142618
|
+
return V0(this, null, function* () {
|
|
142603
142619
|
this.loader.add([
|
|
142604
142620
|
"/image/map/jianbian.webp",
|
|
142605
142621
|
"/image/map/hp.webp",
|
|
@@ -142607,7 +142623,7 @@ const getLabelElement = (v) => {
|
|
|
142607
142623
|
]), this.loaderAddBg();
|
|
142608
142624
|
});
|
|
142609
142625
|
}, v.initMaterial = function() {
|
|
142610
|
-
return
|
|
142626
|
+
return V0(this, null, function* () {
|
|
142611
142627
|
const e = this.loader, n = (() => {
|
|
142612
142628
|
const r = new MeshStandardMaterial({
|
|
142613
142629
|
name: "顶面",
|
|
@@ -142643,11 +142659,11 @@ const getLabelElement = (v) => {
|
|
|
142643
142659
|
};
|
|
142644
142660
|
}, base$1 = (v) => {
|
|
142645
142661
|
v.loaderAdd = function() {
|
|
142646
|
-
return
|
|
142662
|
+
return V0(this, null, function* () {
|
|
142647
142663
|
this.loader.add(["/image/map/jianbian.webp"]), this.loaderAddBg();
|
|
142648
142664
|
});
|
|
142649
142665
|
}, v.initMaterial = function() {
|
|
142650
|
-
return
|
|
142666
|
+
return V0(this, null, function* () {
|
|
142651
142667
|
const e = this.loader, n = (() => {
|
|
142652
142668
|
const r = new MeshBasicMaterial({
|
|
142653
142669
|
name: "顶面",
|
|
@@ -142703,7 +142719,7 @@ const getLabelElement = (v) => {
|
|
|
142703
142719
|
}, v.options.parentBg && (v.extendsOptions.parentBgDepth = () => v.options.parentBgDepth), v.loaderAdd = function() {
|
|
142704
142720
|
this.loader.add(["/image/map2/side.png"]);
|
|
142705
142721
|
}, v.initMaterial = function() {
|
|
142706
|
-
return
|
|
142722
|
+
return V0(this, null, function* () {
|
|
142707
142723
|
const n = this.loader, r = (() => {
|
|
142708
142724
|
const C = new MeshBasicMaterial({
|
|
142709
142725
|
name: "板块顶面",
|
|
@@ -142739,13 +142755,13 @@ const getLabelElement = (v) => {
|
|
|
142739
142755
|
};
|
|
142740
142756
|
const e = v.init.bind(v);
|
|
142741
142757
|
v.init = function() {
|
|
142742
|
-
return
|
|
142758
|
+
return V0(this, null, function* () {
|
|
142743
142759
|
yield e(), yield this.initCityOnMap(this.mapInfo.adcode);
|
|
142744
142760
|
});
|
|
142745
142761
|
};
|
|
142746
142762
|
}, base = (v) => {
|
|
142747
142763
|
if (v.initMaterialBg = function() {
|
|
142748
|
-
return
|
|
142764
|
+
return V0(this, null, function* () {
|
|
142749
142765
|
const e = this.getRoomEnvMap();
|
|
142750
142766
|
if (this.options.parentBg) {
|
|
142751
142767
|
if (this.options.adcode !== 1e5) {
|
|
@@ -142829,11 +142845,11 @@ const getLabelElement = (v) => {
|
|
|
142829
142845
|
return;
|
|
142830
142846
|
}
|
|
142831
142847
|
v.loaderAdd = function() {
|
|
142832
|
-
return
|
|
142848
|
+
return V0(this, null, function* () {
|
|
142833
142849
|
this.loaderAddBg();
|
|
142834
142850
|
});
|
|
142835
142851
|
}, v.initMaterial = function() {
|
|
142836
|
-
return
|
|
142852
|
+
return V0(this, null, function* () {
|
|
142837
142853
|
const e = (() => {
|
|
142838
142854
|
const n = new MeshBasicMaterial({
|
|
142839
142855
|
name: "板块顶面",
|
|
@@ -142989,12 +143005,12 @@ const getLabelElement = (v) => {
|
|
|
142989
143005
|
})), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.winkel3 && (this.options.projectionType = "winkel3"), this.options.adcode === 0 ? this.extendsOptions.winkel3 = () => this.options.winkel3 : (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.workerOnce = !1, this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), this.extendsOptions.drillDownFirstLevelUseBgMats = () => this.options.drillDownFirstLevelUseBgMats, this.extendsOptions.drillDownSecondLevelMats = () => this.options.drillDownSecondLevelMats, this.extendsOptions.drillDownThirdLevelMats = () => this.options.drillDownThirdLevelMats, this.extendsOptions.drillDownPlateInCenter = () => this.options.drillDownPlateInCenter, this.extendsOptions.clickOusideBack = () => this.options.clickOusideBack, this.extendsOptions.handleBackKeepCamvasState = () => this.options.handleBackKeepCamvasState, this.extendsOptions.showOneLevel = () => this.options.showOneLevel, this.extendsOptions.showDistrict = () => this.options.showDistrict, this.options.parentBg && (this.extendsOptions.drillDownHideParent = () => this.options.drillDownHideParent)), this.extendsOptions.parentBg = () => this.options.parentBg, this.options.parentBg && (this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth), this.extendsOptions.continentsBg = () => this.options.continentsBg, this.options.continentsBg && (this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth)), this.options.adcode === 0 ? world(this) : this.options.style === "map2Base" || this.options.style === "map2CityOnMap" ? base(this) : this.options.adcode === 1e5 ? china(this) : base$1(this);
|
|
142990
143006
|
}
|
|
142991
143007
|
handleSetting(n, r) {
|
|
142992
|
-
return
|
|
143008
|
+
return V0(this, null, function* () {
|
|
142993
143009
|
return yield yn(xn.prototype, this, "handleSetting").call(this, n, r), n === "label" ? r === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels()) : n === "labelLite" ? r === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.label = !1, yield this.settings.label, this.options.showLabel = "lite", yield this.drawLabels()) : n === "shadowMap" && (r === !1 ? this.shadowMapDisabled() : yield this.shadowMapEnabled()), r;
|
|
142994
143010
|
});
|
|
142995
143011
|
}
|
|
142996
143012
|
init() {
|
|
142997
|
-
return
|
|
143013
|
+
return V0(this, null, function* () {
|
|
142998
143014
|
const { adcode: n } = this.options;
|
|
142999
143015
|
this.options.center && (this.pcenter = this.options.center), this.projection = f({
|
|
143000
143016
|
center: this.pcenter,
|
|
@@ -143019,7 +143035,7 @@ const getLabelElement = (v) => {
|
|
|
143019
143035
|
});
|
|
143020
143036
|
}
|
|
143021
143037
|
initCityVis(C) {
|
|
143022
|
-
return
|
|
143038
|
+
return V0(this, arguments, function* (n, r = { clip: !1, grey: !1 }) {
|
|
143023
143039
|
var Se;
|
|
143024
143040
|
(Se = this.options.fixCity) != null && Se[n] && (n = this.options.fixCity[n]);
|
|
143025
143041
|
const _ = this.options.center, I = this.options.jsonNameObj[n], O = new City({
|
|
@@ -143051,7 +143067,7 @@ const getLabelElement = (v) => {
|
|
|
143051
143067
|
});
|
|
143052
143068
|
}
|
|
143053
143069
|
initCityOnMap(n) {
|
|
143054
|
-
return
|
|
143070
|
+
return V0(this, null, function* () {
|
|
143055
143071
|
if (this.getAdcodeShowLevel(n) !== "city") {
|
|
143056
143072
|
const _ = findAdcodeInfo(n).parent;
|
|
143057
143073
|
this.getAdcodeShowLevel(_) === "city" && (yield this.initCityOnMap(_));
|
|
@@ -143070,7 +143086,7 @@ const getLabelElement = (v) => {
|
|
|
143070
143086
|
});
|
|
143071
143087
|
}
|
|
143072
143088
|
initVisBg() {
|
|
143073
|
-
return
|
|
143089
|
+
return V0(this, null, function* () {
|
|
143074
143090
|
let n = 1e3, r = 1e3;
|
|
143075
143091
|
const C = new Vector3(0, 0, 0);
|
|
143076
143092
|
if (this.options.parentBg) {
|
|
@@ -143152,7 +143168,7 @@ const getLabelElement = (v) => {
|
|
|
143152
143168
|
});
|
|
143153
143169
|
}
|
|
143154
143170
|
initVis(n) {
|
|
143155
|
-
return
|
|
143171
|
+
return V0(this, null, function* () {
|
|
143156
143172
|
var r;
|
|
143157
143173
|
if (yield this.setAdcode({
|
|
143158
143174
|
adcodes: [n],
|
|
@@ -143183,7 +143199,7 @@ const getLabelElement = (v) => {
|
|
|
143183
143199
|
);
|
|
143184
143200
|
}
|
|
143185
143201
|
initMaterialBg() {
|
|
143186
|
-
return
|
|
143202
|
+
return V0(this, null, function* () {
|
|
143187
143203
|
if (this.options.parentBg) {
|
|
143188
143204
|
const n = (() => {
|
|
143189
143205
|
const r = new MeshStandardMaterial({
|
|
@@ -143266,7 +143282,7 @@ const getLabelElement = (v) => {
|
|
|
143266
143282
|
}
|
|
143267
143283
|
}
|
|
143268
143284
|
addAreaPlaneByProperty(n, r, C) {
|
|
143269
|
-
return
|
|
143285
|
+
return V0(this, null, function* () {
|
|
143270
143286
|
if (!this.map) return;
|
|
143271
143287
|
const I = this.map.options.geojson.features.find(
|
|
143272
143288
|
(O) => O.properties && O.properties[n] === r
|
|
@@ -143325,7 +143341,7 @@ const getLabelElement = (v) => {
|
|
|
143325
143341
|
});
|
|
143326
143342
|
}
|
|
143327
143343
|
showAction() {
|
|
143328
|
-
return
|
|
143344
|
+
return V0(this, null, function* () {
|
|
143329
143345
|
yn(xn.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
|
|
143330
143346
|
const n = this.lead.group;
|
|
143331
143347
|
if (this.mapHistory[0]) {
|
|
@@ -143352,7 +143368,7 @@ const getLabelElement = (v) => {
|
|
|
143352
143368
|
});
|
|
143353
143369
|
}
|
|
143354
143370
|
hide() {
|
|
143355
|
-
return
|
|
143371
|
+
return V0(this, null, function* () {
|
|
143356
143372
|
if (!this.showState) return;
|
|
143357
143373
|
const n = this.lead.group;
|
|
143358
143374
|
yield sinusoidalInOut({
|
|
@@ -143365,7 +143381,7 @@ const getLabelElement = (v) => {
|
|
|
143365
143381
|
});
|
|
143366
143382
|
}
|
|
143367
143383
|
shadowMapEnabled() {
|
|
143368
|
-
return
|
|
143384
|
+
return V0(this, null, function* () {
|
|
143369
143385
|
if (this.pencil.scene.userData.shadowMapEnabled) return;
|
|
143370
143386
|
this.pencil.scene.userData.shadowMapEnabled = !0;
|
|
143371
143387
|
const n = yield this.lead.draw("Light", {
|
|
@@ -143439,7 +143455,7 @@ const getLabelElement = (v) => {
|
|
|
143439
143455
|
return r;
|
|
143440
143456
|
}
|
|
143441
143457
|
showMap(_) {
|
|
143442
|
-
return
|
|
143458
|
+
return V0(this, arguments, function* ({
|
|
143443
143459
|
adcode: n,
|
|
143444
143460
|
adcodes: r,
|
|
143445
143461
|
duration: C = 1e3
|
|
@@ -143452,7 +143468,7 @@ const getLabelElement = (v) => {
|
|
|
143452
143468
|
});
|
|
143453
143469
|
}
|
|
143454
143470
|
drawLabels() {
|
|
143455
|
-
return
|
|
143471
|
+
return V0(this, null, function* () {
|
|
143456
143472
|
var C;
|
|
143457
143473
|
const n = this.options.showLabel;
|
|
143458
143474
|
if (!((C = this.mapArea) != null && C.length) || !n) return;
|
|
@@ -143464,7 +143480,7 @@ const getLabelElement = (v) => {
|
|
|
143464
143480
|
},
|
|
143465
143481
|
this.group
|
|
143466
143482
|
), r.object3d.name = "地图标签组", yield Promise.all(
|
|
143467
|
-
this.mapArea.map((_) =>
|
|
143483
|
+
this.mapArea.map((_) => V0(this, null, function* () {
|
|
143468
143484
|
let { name: I, adcode: O, centroid: Se } = _.userData;
|
|
143469
143485
|
const { DistrictID: ve, DistName: Ce, iso_a2: Re, center: Pe } = _.userData;
|
|
143470
143486
|
if (O = O || Re || ve, Se = Se || Pe, I = I || Ce, !Se)
|
|
@@ -143527,7 +143543,7 @@ const getLabelElement = (v) => {
|
|
|
143527
143543
|
return chinaLiteJson.features[0].geometry.coordinates.some((r) => booleanPointInPolygon$1(point(n), polygon(r)));
|
|
143528
143544
|
}
|
|
143529
143545
|
getGeojson(n, r = !1) {
|
|
143530
|
-
return
|
|
143546
|
+
return V0(this, null, function* () {
|
|
143531
143547
|
var C, _, I, O;
|
|
143532
143548
|
return r ? this.options.extrudeLine ? (I = this.options.extrudeLineGeojsonMap) != null && I[n] ? { res: (O = this.options.extrudeLineGeojsonMap) == null ? void 0 : O[n] } : yield jsonFetch(
|
|
143533
143549
|
`${this.options.assetsPrefix}/geojson/json-lite/${n}.json`
|
|
@@ -143539,7 +143555,7 @@ const getLabelElement = (v) => {
|
|
|
143539
143555
|
});
|
|
143540
143556
|
}
|
|
143541
143557
|
handleDrillDown(O) {
|
|
143542
|
-
return
|
|
143558
|
+
return V0(this, arguments, function* ({
|
|
143543
143559
|
adcode: n,
|
|
143544
143560
|
duration: r,
|
|
143545
143561
|
handleLook: C,
|
|
@@ -143583,7 +143599,7 @@ const getLabelElement = (v) => {
|
|
|
143583
143599
|
extrudelineBloom: I
|
|
143584
143600
|
});
|
|
143585
143601
|
Fe == null || Fe.hide(), Yt.position.setZ(Vt);
|
|
143586
|
-
const Kt = Yt.position.z, Ft = () =>
|
|
143602
|
+
const Kt = Yt.position.z, Ft = () => V0(this, null, function* () {
|
|
143587
143603
|
yield sinusoidalInOut({
|
|
143588
143604
|
onUpdate: (Wt) => {
|
|
143589
143605
|
Zt !== Kt && (Yt.position.z = Kt + (Zt - Kt) * Wt);
|
|
@@ -143601,7 +143617,7 @@ const getLabelElement = (v) => {
|
|
|
143601
143617
|
enableTransition: r !== 0,
|
|
143602
143618
|
polarAngle: Wt == null ? void 0 : Wt.polarAngle,
|
|
143603
143619
|
azimuthAngle: Wt == null ? void 0 : Wt.azimuthAngle,
|
|
143604
|
-
handleStart: () =>
|
|
143620
|
+
handleStart: () => V0(this, null, function* () {
|
|
143605
143621
|
Yt.position.z = Kt, yield Ft();
|
|
143606
143622
|
})
|
|
143607
143623
|
});
|
|
@@ -143643,7 +143659,7 @@ const getLabelElement = (v) => {
|
|
|
143643
143659
|
n === 0 ? (this.pencil.camera.near = 1, this.pencil.camera.far = 1e3, this.pencil.camera.updateProjectionMatrix()) : (r === "country" || r === "province") && this.pencil.camera.near !== C.camera.near * 10 ? (this.pencil.camera.near = C.camera.near * 10, this.pencil.camera.updateProjectionMatrix()) : (r === "city" || r === "district") && this.pencil.camera.near !== C.camera.near && (this.pencil.camera.near = C.camera.near, this.pencil.camera.updateProjectionMatrix());
|
|
143644
143660
|
}
|
|
143645
143661
|
fitTo(ve) {
|
|
143646
|
-
return
|
|
143662
|
+
return V0(this, arguments, function* (n, {
|
|
143647
143663
|
polarAngle: r,
|
|
143648
143664
|
azimuthAngle: C,
|
|
143649
143665
|
z: _,
|
|
@@ -143684,7 +143700,7 @@ const getLabelElement = (v) => {
|
|
|
143684
143700
|
});
|
|
143685
143701
|
}
|
|
143686
143702
|
drawPlaneMap(Se) {
|
|
143687
|
-
return
|
|
143703
|
+
return V0(this, arguments, function* ({
|
|
143688
143704
|
geojson: n,
|
|
143689
143705
|
extrudeLineGeojson: r,
|
|
143690
143706
|
bbox: C,
|
|
@@ -143740,7 +143756,7 @@ const getLabelElement = (v) => {
|
|
|
143740
143756
|
});
|
|
143741
143757
|
}
|
|
143742
143758
|
handleBack() {
|
|
143743
|
-
return
|
|
143759
|
+
return V0(this, arguments, function* ({
|
|
143744
143760
|
duration: n = 1e3,
|
|
143745
143761
|
handleLookBack: r = !0,
|
|
143746
143762
|
keepOne: C = !0
|
|
@@ -143771,7 +143787,7 @@ const getLabelElement = (v) => {
|
|
|
143771
143787
|
});
|
|
143772
143788
|
}
|
|
143773
143789
|
handleLookBack(n) {
|
|
143774
|
-
return
|
|
143790
|
+
return V0(this, null, function* () {
|
|
143775
143791
|
const { userControls: r, controls: C } = this.mapObj;
|
|
143776
143792
|
yield this.pencil.controls.setLookAt(
|
|
143777
143793
|
...r ? r.lookAt : C.lookAt,
|
|
@@ -143791,7 +143807,7 @@ const getLabelElement = (v) => {
|
|
|
143791
143807
|
return I;
|
|
143792
143808
|
}
|
|
143793
143809
|
setAdcode(C) {
|
|
143794
|
-
return
|
|
143810
|
+
return V0(this, arguments, function* ({
|
|
143795
143811
|
adcodes: n,
|
|
143796
143812
|
duration: r
|
|
143797
143813
|
}) {
|
|
@@ -143914,9 +143930,60 @@ function stringToUtf8ByteArray(v) {
|
|
|
143914
143930
|
}
|
|
143915
143931
|
return e;
|
|
143916
143932
|
}
|
|
143917
|
-
|
|
143918
|
-
|
|
143919
|
-
|
|
143933
|
+
const TEMPLATE_CONFIGS = {
|
|
143934
|
+
"7s93q0lma4n9887": {
|
|
143935
|
+
id: "7s93q0lma4n9887",
|
|
143936
|
+
mapIndex: 4,
|
|
143937
|
+
emissiveMapIndex: 5
|
|
143938
|
+
},
|
|
143939
|
+
l7ojr7nqc06u24f: {
|
|
143940
|
+
id: "l7ojr7nqc06u24f",
|
|
143941
|
+
mapIndex: 7,
|
|
143942
|
+
emissiveMapIndex: 6,
|
|
143943
|
+
cityOnly: !0
|
|
143944
|
+
},
|
|
143945
|
+
"2xli7429f48857f": {
|
|
143946
|
+
id: "2xli7429f48857f",
|
|
143947
|
+
emissiveMapIndex: 14
|
|
143948
|
+
}
|
|
143949
|
+
}, getBaseUrl = () => {
|
|
143950
|
+
const v = "/";
|
|
143951
|
+
return v === "/" ? "" : v;
|
|
143952
|
+
}, getAdcodeInfo = (v) => {
|
|
143953
|
+
const e = findAdcodeInfo(v);
|
|
143954
|
+
if (!e)
|
|
143955
|
+
throw new Error(`Adcode ${v} not found`);
|
|
143956
|
+
return e;
|
|
143957
|
+
}, getProvinceAdcode = (v) => {
|
|
143958
|
+
let e = v, n = getAdcodeInfo(e);
|
|
143959
|
+
for (; n.level !== "province"; )
|
|
143960
|
+
e = n.parent, n = getAdcodeInfo(e);
|
|
143961
|
+
return e;
|
|
143962
|
+
}, fetchGeojsonData = (v, e, n, r) => V0(void 0, null, function* () {
|
|
143963
|
+
const C = r || e, { res: _ } = yield jsonFetch(`${v}/geojson/${C}/${n}.json`);
|
|
143964
|
+
return _;
|
|
143965
|
+
}), processTemplateImages = (v, e, n, r, C) => V0(void 0, null, function* () {
|
|
143966
|
+
const _ = TEMPLATE_CONFIGS[v];
|
|
143967
|
+
if (!(!_ || _.cityOnly && !C))
|
|
143968
|
+
try {
|
|
143969
|
+
if (_.mapIndex !== void 0) {
|
|
143970
|
+
const I = yield png2webp(
|
|
143971
|
+
`${n}/template/${v}/${e}.jpg`
|
|
143972
|
+
);
|
|
143973
|
+
r[_.mapIndex] = I.src, console.log(`已替换模板 ${v} 的 map 资源, ${_.mapIndex}`);
|
|
143974
|
+
}
|
|
143975
|
+
if (_.emissiveMapIndex !== void 0) {
|
|
143976
|
+
const I = yield png2webp(
|
|
143977
|
+
`${n}/template/${v}/${e}-自发光.jpg`
|
|
143978
|
+
);
|
|
143979
|
+
r[_.emissiveMapIndex] = I.src, console.log(
|
|
143980
|
+
`已替换模板 ${v} 的 emissiveMap 资源, ${_.emissiveMapIndex}`
|
|
143981
|
+
);
|
|
143982
|
+
}
|
|
143983
|
+
} catch (I) {
|
|
143984
|
+
console.warn(`模板 ${v} 图像资源加载失败:`, I);
|
|
143985
|
+
}
|
|
143986
|
+
}), getMapConfig = (C, ..._) => V0(void 0, [C, ..._], function* (v, e = getBaseUrl(), n, r) {
|
|
143920
143987
|
if ((n == null ? void 0 : n.style) === "map2CityOnMap")
|
|
143921
143988
|
return getMapWithCityConfig(v, e, n, r);
|
|
143922
143989
|
if (v === 0)
|
|
@@ -143928,7 +143995,7 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
|
|
|
143928
143995
|
center: [0, 0]
|
|
143929
143996
|
};
|
|
143930
143997
|
{
|
|
143931
|
-
const I =
|
|
143998
|
+
const I = getAdcodeInfo(v);
|
|
143932
143999
|
return extendMapConfig(
|
|
143933
144000
|
{
|
|
143934
144001
|
center: [I.lng, I.lat],
|
|
@@ -143939,8 +144006,8 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
|
|
|
143939
144006
|
r
|
|
143940
144007
|
);
|
|
143941
144008
|
}
|
|
143942
|
-
}), getMapWithCityConfig = (C, ..._) =>
|
|
143943
|
-
const I =
|
|
144009
|
+
}), getMapWithCityConfig = (C, ..._) => V0(void 0, [C, ..._], function* (v, e = getBaseUrl(), n, r) {
|
|
144010
|
+
const I = getAdcodeInfo(v);
|
|
143944
144011
|
return extendMapConfig(
|
|
143945
144012
|
{
|
|
143946
144013
|
center: [I.lng, I.lat],
|
|
@@ -143953,22 +144020,23 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
|
|
|
143953
144020
|
n,
|
|
143954
144021
|
r
|
|
143955
144022
|
);
|
|
143956
|
-
}), extendMapConfig = (C, ..._) =>
|
|
143957
|
-
var
|
|
143958
|
-
if (v.adcode === 0
|
|
144023
|
+
}), extendMapConfig = (C, ..._) => V0(void 0, [C, ..._], function* (v, e = getBaseUrl(), n, r) {
|
|
144024
|
+
var ct, Ue;
|
|
144025
|
+
if (v.adcode === 0 || v.adcode === 1e5)
|
|
143959
144026
|
return B0({}, v);
|
|
143960
|
-
const I = v.adcode, O =
|
|
143961
|
-
let
|
|
143962
|
-
|
|
143963
|
-
|
|
143964
|
-
|
|
143965
|
-
|
|
143966
|
-
|
|
144027
|
+
const I = v.adcode, O = getAdcodeInfo(I), Se = O.level === "province", ve = O.level === "city" || O.level === "district" && getAdcodeInfo(O.parent).level === "province", Ce = (ct = v.fixGeojson) == null ? void 0 : ct[I], Re = (Ue = v.fixGeojson) == null ? void 0 : Ue[I + "-lite"];
|
|
144028
|
+
let Pe = yield fetchGeojsonData(e, "json", I, Ce);
|
|
144029
|
+
const Fe = yield fetchGeojsonData(
|
|
144030
|
+
e,
|
|
144031
|
+
"json-lite",
|
|
144032
|
+
I,
|
|
144033
|
+
Re
|
|
144034
|
+
), ke = Yi(B0({}, v), {
|
|
143967
144035
|
geojsonMap: {
|
|
143968
|
-
[I]:
|
|
144036
|
+
[I]: Pe
|
|
143969
144037
|
},
|
|
143970
144038
|
extrudeLineGeojsonMap: {
|
|
143971
|
-
[I]:
|
|
144039
|
+
[I]: Fe
|
|
143972
144040
|
},
|
|
143973
144041
|
cityBboxMap: {},
|
|
143974
144042
|
jsonNameObj: {},
|
|
@@ -143976,63 +144044,46 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
|
|
|
143976
144044
|
__template: n == null ? void 0 : n.__template
|
|
143977
144045
|
});
|
|
143978
144046
|
if (v.style === "map2CityOnMap") {
|
|
143979
|
-
if (!
|
|
143980
|
-
|
|
143981
|
-
|
|
143982
|
-
|
|
143983
|
-
|
|
143984
|
-
|
|
144047
|
+
if (!Se) {
|
|
144048
|
+
const Ne = getProvinceAdcode(I);
|
|
144049
|
+
Pe = yield fetchGeojsonData(
|
|
144050
|
+
e,
|
|
144051
|
+
"json",
|
|
144052
|
+
Ne,
|
|
144053
|
+
Ce
|
|
143985
144054
|
);
|
|
143986
|
-
Re = Ne;
|
|
143987
144055
|
}
|
|
143988
|
-
|
|
143989
|
-
|
|
143990
|
-
|
|
143991
|
-
`${
|
|
144056
|
+
Pe.features.forEach((Ne) => {
|
|
144057
|
+
ke.jsonNameObj[Ne.properties.adcode] = ec(
|
|
144058
|
+
Ne.properties.name,
|
|
144059
|
+
`${Ne.properties.adcode}`
|
|
143992
144060
|
);
|
|
143993
144061
|
});
|
|
143994
144062
|
}
|
|
143995
|
-
if (
|
|
143996
|
-
|
|
143997
|
-
|
|
143998
|
-
|
|
143999
|
-
|
|
144000
|
-
|
|
144001
|
-
|
|
144002
|
-
|
|
144003
|
-
|
|
144004
|
-
|
|
144005
|
-
|
|
144006
|
-
|
|
144007
|
-
|
|
144008
|
-
`${e}/template/l7ojr7nqc06u24f/${I}-自发光.jpg`
|
|
144009
|
-
);
|
|
144010
|
-
r[7] = Ue.src, r[6] = Ne.src, console.log("替换 map emissiveMap");
|
|
144011
|
-
}
|
|
144012
|
-
if ((n == null ? void 0 : n.__template) === "2xli7429f48857f" && r) {
|
|
144013
|
-
const Ue = yield png2webp(
|
|
144014
|
-
`${e}/template/2xli7429f48857f/${I}.jpg`
|
|
144015
|
-
);
|
|
144016
|
-
r[14] = Ue.src, console.log("替换 emissiveMap");
|
|
144017
|
-
}
|
|
144018
|
-
if (v.parentBg) {
|
|
144019
|
-
const Ue = findAdcodeInfo(I).parent;
|
|
144020
|
-
if (Ue !== 1e5) {
|
|
144021
|
-
const { res: Ne } = yield jsonFetch(
|
|
144022
|
-
`${e}/geojson/json/${Ue}.json`
|
|
144023
|
-
), { res: lt } = yield jsonFetch(
|
|
144024
|
-
`${e}/geojson/json-lite/${Ue}.json`
|
|
144063
|
+
if (n != null && n.__template && r && (yield processTemplateImages(
|
|
144064
|
+
n.__template,
|
|
144065
|
+
I,
|
|
144066
|
+
e,
|
|
144067
|
+
r,
|
|
144068
|
+
ve
|
|
144069
|
+
)), v.parentBg) {
|
|
144070
|
+
const Ne = O.parent;
|
|
144071
|
+
if (Ne !== 1e5) {
|
|
144072
|
+
const lt = yield fetchGeojsonData(e, "json", Ne), at = yield fetchGeojsonData(
|
|
144073
|
+
e,
|
|
144074
|
+
"json-lite",
|
|
144075
|
+
Ne
|
|
144025
144076
|
);
|
|
144026
|
-
|
|
144077
|
+
ke.geojsonMap[Ne] = lt, ke.extrudeLineGeojsonMap[Ne] = at;
|
|
144027
144078
|
}
|
|
144028
144079
|
}
|
|
144029
|
-
return n && (
|
|
144030
|
-
}), getCityConfig = (
|
|
144031
|
-
const
|
|
144080
|
+
return n && (ke.depthReference = n.depthReference || getAdcodeInfo(n.adcode).b), ke;
|
|
144081
|
+
}), getCityConfig = (v) => V0(void 0, null, function* () {
|
|
144082
|
+
const e = getAdcodeInfo(v), { name: n } = e;
|
|
144032
144083
|
return {
|
|
144033
|
-
center: [
|
|
144034
|
-
adcode:
|
|
144035
|
-
jsonName: ec(
|
|
144084
|
+
center: [e.lng, e.lat],
|
|
144085
|
+
adcode: e.adcode,
|
|
144086
|
+
jsonName: ec(n, `${v}`)
|
|
144036
144087
|
};
|
|
144037
144088
|
}), removeCameraHistory = (v) => v.filter((e) => !(e.objectUuid === "camera" && ["SetPosition", "SetTarget"].includes(e.type))), access = {
|
|
144038
144089
|
set token(v) {
|