vis-core 0.21.60 → 0.21.62
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/SetGeometry.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -16
- package/dist/index.module.js +188 -172
- package/dist/version.d.ts +1 -1
- package/dist/vis/map/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -4,7 +4,7 @@ var Nn = Object.getOwnPropertyDescriptors;
|
|
|
4
4
|
var Ln = Object.getOwnPropertySymbols, Fn = Object.getPrototypeOf, Hn = Object.prototype.hasOwnProperty, kn = Object.prototype.propertyIsEnumerable, Jn = Reflect.get;
|
|
5
5
|
var Gn = (c, e) => (e = Symbol[c]) ? e : Symbol.for("Symbol." + c), wn = (c) => {
|
|
6
6
|
throw TypeError(c);
|
|
7
|
-
}, on = Math.pow, Sn = (c, e, s) => e in c ? Tn(c, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : c[e] = s,
|
|
7
|
+
}, on = Math.pow, Sn = (c, e, s) => e in c ? Tn(c, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : c[e] = s, di = (c, e) => {
|
|
8
8
|
for (var s in e || (e = {}))
|
|
9
9
|
Hn.call(e, s) && Sn(c, s, e[s]);
|
|
10
10
|
if (Ln)
|
|
@@ -89,7 +89,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
89
89
|
).toString(CryptoJS.enc.Utf8), Jt = JSON.parse(Tt), $t = Date.now();
|
|
90
90
|
return !Jt.s || Jt.s > $t ? (this.token = void 0, "") : Jt.e && Jt.e < $t ? (this.token = void 0, "") : (Jt.isValid = Yt, Jt);
|
|
91
91
|
}
|
|
92
|
-
}, version = "0.21.
|
|
92
|
+
}, version = "0.21.62";
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2010-2024 Three.js Authors
|
|
@@ -5662,10 +5662,10 @@ class BatchedMesh extends Mesh {
|
|
|
5662
5662
|
_mesh.material = null, _mesh.geometry.index = null, _mesh.geometry.attributes = {}, _mesh.geometry.setDrawRange(0, 1 / 0);
|
|
5663
5663
|
}
|
|
5664
5664
|
copy(e) {
|
|
5665
|
-
return super.copy(e), this.geometry = e.geometry.clone(), this.perObjectFrustumCulled = e.perObjectFrustumCulled, this.sortObjects = e.sortObjects, this.boundingBox = e.boundingBox !== null ? e.boundingBox.clone() : null, this.boundingSphere = e.boundingSphere !== null ? e.boundingSphere.clone() : null, this._geometryInfo = e._geometryInfo.map((s) => Ui(
|
|
5665
|
+
return super.copy(e), this.geometry = e.geometry.clone(), this.perObjectFrustumCulled = e.perObjectFrustumCulled, this.sortObjects = e.sortObjects, this.boundingBox = e.boundingBox !== null ? e.boundingBox.clone() : null, this.boundingSphere = e.boundingSphere !== null ? e.boundingSphere.clone() : null, this._geometryInfo = e._geometryInfo.map((s) => Ui(di({}, s), {
|
|
5666
5666
|
boundingBox: s.boundingBox !== null ? s.boundingBox.clone() : null,
|
|
5667
5667
|
boundingSphere: s.boundingSphere !== null ? s.boundingSphere.clone() : null
|
|
5668
|
-
})), this._instanceInfo = e._instanceInfo.map((s) =>
|
|
5668
|
+
})), this._instanceInfo = e._instanceInfo.map((s) => di({}, s)), this._maxInstanceCount = e._maxInstanceCount, this._maxVertexCount = e._maxVertexCount, this._maxIndexCount = e._maxIndexCount, this._geometryInitialized = e._geometryInitialized, this._geometryCount = e._geometryCount, this._multiDrawCounts = e._multiDrawCounts.slice(), this._multiDrawStarts = e._multiDrawStarts.slice(), this._matricesTexture = e._matricesTexture.clone(), this._matricesTexture.image.data = this._matricesTexture.image.data.slice(), this._colorsTexture !== null && (this._colorsTexture = e._colorsTexture.clone(), this._colorsTexture.image.data = this._colorsTexture.image.data.slice()), this;
|
|
5669
5669
|
}
|
|
5670
5670
|
dispose() {
|
|
5671
5671
|
return this.geometry.dispose(), this._matricesTexture.dispose(), this._matricesTexture = null, this._indirectTexture.dispose(), this._indirectTexture = null, this._colorsTexture !== null && (this._colorsTexture.dispose(), this._colorsTexture = null), this;
|
|
@@ -7424,10 +7424,10 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
7424
7424
|
if (Math.abs(N0) > Number.EPSILON) {
|
|
7425
7425
|
const B0 = Math.sqrt(G0), q0 = Math.sqrt(ei * ei + f0 * f0), j0 = U0.x - ii / B0, fi = U0.y + P0 / B0, Gi = C0.x - f0 / q0, bi = C0.y + ei / q0, Ji = ((Gi - j0) * f0 - (bi - fi) * ei) / (P0 * f0 - ii * ei);
|
|
7426
7426
|
Xi = j0 + P0 * Ji - O0.x, li = fi + ii * Ji - O0.y;
|
|
7427
|
-
const
|
|
7428
|
-
if (
|
|
7427
|
+
const hi = Xi * Xi + li * li;
|
|
7428
|
+
if (hi <= 2)
|
|
7429
7429
|
return new Vector2(Xi, li);
|
|
7430
|
-
A0 = Math.sqrt(
|
|
7430
|
+
A0 = Math.sqrt(hi / 2);
|
|
7431
7431
|
} else {
|
|
7432
7432
|
let B0 = !1;
|
|
7433
7433
|
P0 > Number.EPSILON ? ei > Number.EPSILON && (B0 = !0) : P0 < -Number.EPSILON ? ei < -Number.EPSILON && (B0 = !0) : Math.sign(ii) === Math.sign(f0) && (B0 = !0), B0 ? (Xi = -ii, li = P0, A0 = Math.sqrt(G0)) : (Xi = P0, li = ii, A0 = Math.sqrt(G0 / 2));
|
|
@@ -12495,7 +12495,7 @@ const TextureUtils = {
|
|
|
12495
12495
|
class WebGLMultipleRenderTargets extends WebGLRenderTarget {
|
|
12496
12496
|
// @deprecated, r162
|
|
12497
12497
|
constructor(e = 1, s = 1, r = 1, f = {}) {
|
|
12498
|
-
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'), super(e, s, Ui(
|
|
12498
|
+
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'), super(e, s, Ui(di({}, f), { count: r })), this.isWebGLMultipleRenderTargets = !0;
|
|
12499
12499
|
}
|
|
12500
12500
|
get texture() {
|
|
12501
12501
|
return this.textures;
|
|
@@ -19003,7 +19003,7 @@ function WebGLPrograms(c, e, s, r, f, st, ct) {
|
|
|
19003
19003
|
ci = Pi.vertexShader, M0 = Pi.fragmentShader;
|
|
19004
19004
|
} else
|
|
19005
19005
|
ci = n0.vertexShader, M0 = n0.fragmentShader, Wt.update(n0), Q0 = Wt.getVertexShaderID(n0), D0 = Wt.getFragmentShaderID(n0);
|
|
19006
|
-
const ni = c.getRenderTarget(), mi = c.state.buffers.depth.getReversed(), Vi = m0.isInstancedMesh === !0, Zi = m0.isBatchedMesh === !0, Li = !!n0.map, O0 = !!n0.matcap, U0 = !!d0, C0 = !!n0.aoMap, Xi = !!n0.lightMap, li = !!n0.bumpMap, A0 = !!n0.normalMap, P0 = !!n0.displacementMap, ii = !!n0.emissiveMap, ei = !!n0.metalnessMap, f0 = !!n0.roughnessMap, G0 = n0.anisotropy > 0, N0 = n0.clearcoat > 0, B0 = n0.dispersion > 0, q0 = n0.iridescence > 0, j0 = n0.sheen > 0, fi = n0.transmission > 0, Gi = G0 && !!n0.anisotropyMap, bi = N0 && !!n0.clearcoatMap, Ji = N0 && !!n0.clearcoatNormalMap,
|
|
19006
|
+
const ni = c.getRenderTarget(), mi = c.state.buffers.depth.getReversed(), Vi = m0.isInstancedMesh === !0, Zi = m0.isBatchedMesh === !0, Li = !!n0.map, O0 = !!n0.matcap, U0 = !!d0, C0 = !!n0.aoMap, Xi = !!n0.lightMap, li = !!n0.bumpMap, A0 = !!n0.normalMap, P0 = !!n0.displacementMap, ii = !!n0.emissiveMap, ei = !!n0.metalnessMap, f0 = !!n0.roughnessMap, G0 = n0.anisotropy > 0, N0 = n0.clearcoat > 0, B0 = n0.dispersion > 0, q0 = n0.iridescence > 0, j0 = n0.sheen > 0, fi = n0.transmission > 0, Gi = G0 && !!n0.anisotropyMap, bi = N0 && !!n0.clearcoatMap, Ji = N0 && !!n0.clearcoatNormalMap, hi = N0 && !!n0.clearcoatRoughnessMap, Ci = q0 && !!n0.iridescenceMap, Yi = q0 && !!n0.iridescenceThicknessMap, vi = j0 && !!n0.sheenColorMap, Ri = j0 && !!n0.sheenRoughnessMap, ki = !!n0.specularMap, Mi = !!n0.specularColorMap, Hi = !!n0.specularIntensityMap, F0 = fi && !!n0.transmissionMap, _0 = fi && !!n0.thicknessMap, $0 = !!n0.gradientMap, ri = !!n0.alphaMap, Si = n0.alphaTest > 0, xi = !!n0.alphaHash, Ki = !!n0.extensions;
|
|
19007
19007
|
let ji = NoToneMapping;
|
|
19008
19008
|
n0.toneMapped && (ni === null || ni.isXRRenderTarget === !0) && (ji = c.toneMapping);
|
|
19009
19009
|
const $i = {
|
|
@@ -19046,7 +19046,7 @@ function WebGLPrograms(c, e, s, r, f, st, ct) {
|
|
|
19046
19046
|
clearcoat: N0,
|
|
19047
19047
|
clearcoatMap: bi,
|
|
19048
19048
|
clearcoatNormalMap: Ji,
|
|
19049
|
-
clearcoatRoughnessMap:
|
|
19049
|
+
clearcoatRoughnessMap: hi,
|
|
19050
19050
|
dispersion: B0,
|
|
19051
19051
|
iridescence: q0,
|
|
19052
19052
|
iridescenceMap: Ci,
|
|
@@ -19079,7 +19079,7 @@ function WebGLPrograms(c, e, s, r, f, st, ct) {
|
|
|
19079
19079
|
anisotropyMapUv: Gi && Qe(n0.anisotropyMap.channel),
|
|
19080
19080
|
clearcoatMapUv: bi && Qe(n0.clearcoatMap.channel),
|
|
19081
19081
|
clearcoatNormalMapUv: Ji && Qe(n0.clearcoatNormalMap.channel),
|
|
19082
|
-
clearcoatRoughnessMapUv:
|
|
19082
|
+
clearcoatRoughnessMapUv: hi && Qe(n0.clearcoatRoughnessMap.channel),
|
|
19083
19083
|
iridescenceMapUv: Ci && Qe(n0.iridescenceMap.channel),
|
|
19084
19084
|
iridescenceThicknessMapUv: Yi && Qe(n0.iridescenceThicknessMap.channel),
|
|
19085
19085
|
sheenColorMapUv: vi && Qe(n0.sheenColorMap.channel),
|
|
@@ -20018,7 +20018,7 @@ function WebGLState(c, e) {
|
|
|
20018
20018
|
console.error("THREE.WebGLState:", F0);
|
|
20019
20019
|
}
|
|
20020
20020
|
}
|
|
20021
|
-
function
|
|
20021
|
+
function hi() {
|
|
20022
20022
|
try {
|
|
20023
20023
|
c.texStorage3D.apply(c, arguments);
|
|
20024
20024
|
} catch (F0) {
|
|
@@ -20086,7 +20086,7 @@ function WebGLState(c, e) {
|
|
|
20086
20086
|
updateUBOMapping: ki,
|
|
20087
20087
|
uniformBlockBinding: Mi,
|
|
20088
20088
|
texStorage2D: Ji,
|
|
20089
|
-
texStorage3D:
|
|
20089
|
+
texStorage3D: hi,
|
|
20090
20090
|
texSubImage2D: j0,
|
|
20091
20091
|
texSubImage3D: fi,
|
|
20092
20092
|
compressedTexSubImage2D: Gi,
|
|
@@ -20311,15 +20311,15 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20311
20311
|
s.activeTexture(c.TEXTURE0 + N0);
|
|
20312
20312
|
const Gi = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), bi = G0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(G0.colorSpace), Ji = G0.colorSpace === NoColorSpace || Gi === bi ? c.NONE : c.BROWSER_DEFAULT_WEBGL;
|
|
20313
20313
|
c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, G0.flipY), c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, G0.premultiplyAlpha), c.pixelStorei(c.UNPACK_ALIGNMENT, G0.unpackAlignment), c.pixelStorei(c.UNPACK_COLORSPACE_CONVERSION_WEBGL, Ji);
|
|
20314
|
-
let
|
|
20315
|
-
|
|
20314
|
+
let hi = Qe(G0.image, !1, f.maxTextureSize);
|
|
20315
|
+
hi = ii(G0, hi);
|
|
20316
20316
|
const Ci = st.convert(G0.format, G0.colorSpace), Yi = st.convert(G0.type);
|
|
20317
20317
|
let vi = _e(G0.internalFormat, Ci, Yi, G0.colorSpace, G0.isVideoTexture);
|
|
20318
20318
|
E0(B0, G0);
|
|
20319
20319
|
let Ri;
|
|
20320
|
-
const ki = G0.mipmaps, Mi = G0.isVideoTexture !== !0, Hi = fi.__version === void 0 || q0 === !0, F0 = j0.dataReady, _0 = qe(G0,
|
|
20320
|
+
const ki = G0.mipmaps, Mi = G0.isVideoTexture !== !0, Hi = fi.__version === void 0 || q0 === !0, F0 = j0.dataReady, _0 = qe(G0, hi);
|
|
20321
20321
|
if (G0.isDepthTexture)
|
|
20322
|
-
vi = $e(G0.format === DepthStencilFormat, G0.type), Hi && (Mi ? s.texStorage2D(c.TEXTURE_2D, 1, vi,
|
|
20322
|
+
vi = $e(G0.format === DepthStencilFormat, G0.type), Hi && (Mi ? s.texStorage2D(c.TEXTURE_2D, 1, vi, hi.width, hi.height) : s.texImage2D(c.TEXTURE_2D, 0, vi, hi.width, hi.height, 0, Ci, Yi, null));
|
|
20323
20323
|
else if (G0.isDataTexture)
|
|
20324
20324
|
if (ki.length > 0) {
|
|
20325
20325
|
Mi && Hi && s.texStorage2D(c.TEXTURE_2D, _0, vi, ki[0].width, ki[0].height);
|
|
@@ -20327,10 +20327,10 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20327
20327
|
Ri = ki[$0], Mi ? F0 && s.texSubImage2D(c.TEXTURE_2D, $0, 0, 0, Ri.width, Ri.height, Ci, Yi, Ri.data) : s.texImage2D(c.TEXTURE_2D, $0, vi, Ri.width, Ri.height, 0, Ci, Yi, Ri.data);
|
|
20328
20328
|
G0.generateMipmaps = !1;
|
|
20329
20329
|
} else
|
|
20330
|
-
Mi ? (Hi && s.texStorage2D(c.TEXTURE_2D, _0, vi,
|
|
20330
|
+
Mi ? (Hi && s.texStorage2D(c.TEXTURE_2D, _0, vi, hi.width, hi.height), F0 && s.texSubImage2D(c.TEXTURE_2D, 0, 0, 0, hi.width, hi.height, Ci, Yi, hi.data)) : s.texImage2D(c.TEXTURE_2D, 0, vi, hi.width, hi.height, 0, Ci, Yi, hi.data);
|
|
20331
20331
|
else if (G0.isCompressedTexture)
|
|
20332
20332
|
if (G0.isCompressedArrayTexture) {
|
|
20333
|
-
Mi && Hi && s.texStorage3D(c.TEXTURE_2D_ARRAY, _0, vi, ki[0].width, ki[0].height,
|
|
20333
|
+
Mi && Hi && s.texStorage3D(c.TEXTURE_2D_ARRAY, _0, vi, ki[0].width, ki[0].height, hi.depth);
|
|
20334
20334
|
for (let $0 = 0, ri = ki.length; $0 < ri; $0++)
|
|
20335
20335
|
if (Ri = ki[$0], G0.format !== RGBAFormat)
|
|
20336
20336
|
if (Ci !== null)
|
|
@@ -20347,13 +20347,13 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20347
20347
|
}
|
|
20348
20348
|
G0.clearLayerUpdates();
|
|
20349
20349
|
} else
|
|
20350
|
-
s.compressedTexSubImage3D(c.TEXTURE_2D_ARRAY, $0, 0, 0, 0, Ri.width, Ri.height,
|
|
20350
|
+
s.compressedTexSubImage3D(c.TEXTURE_2D_ARRAY, $0, 0, 0, 0, Ri.width, Ri.height, hi.depth, Ci, Ri.data);
|
|
20351
20351
|
} else
|
|
20352
|
-
s.compressedTexImage3D(c.TEXTURE_2D_ARRAY, $0, vi, Ri.width, Ri.height,
|
|
20352
|
+
s.compressedTexImage3D(c.TEXTURE_2D_ARRAY, $0, vi, Ri.width, Ri.height, hi.depth, 0, Ri.data, 0, 0);
|
|
20353
20353
|
else
|
|
20354
20354
|
console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
|
|
20355
20355
|
else
|
|
20356
|
-
Mi ? F0 && s.texSubImage3D(c.TEXTURE_2D_ARRAY, $0, 0, 0, 0, Ri.width, Ri.height,
|
|
20356
|
+
Mi ? F0 && s.texSubImage3D(c.TEXTURE_2D_ARRAY, $0, 0, 0, 0, Ri.width, Ri.height, hi.depth, Ci, Yi, Ri.data) : s.texImage3D(c.TEXTURE_2D_ARRAY, $0, vi, Ri.width, Ri.height, hi.depth, 0, Ci, Yi, Ri.data);
|
|
20357
20357
|
} else {
|
|
20358
20358
|
Mi && Hi && s.texStorage2D(c.TEXTURE_2D, _0, vi, ki[0].width, ki[0].height);
|
|
20359
20359
|
for (let $0 = 0, ri = ki.length; $0 < ri; $0++)
|
|
@@ -20361,29 +20361,29 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20361
20361
|
}
|
|
20362
20362
|
else if (G0.isDataArrayTexture)
|
|
20363
20363
|
if (Mi) {
|
|
20364
|
-
if (Hi && s.texStorage3D(c.TEXTURE_2D_ARRAY, _0, vi,
|
|
20364
|
+
if (Hi && s.texStorage3D(c.TEXTURE_2D_ARRAY, _0, vi, hi.width, hi.height, hi.depth), F0)
|
|
20365
20365
|
if (G0.layerUpdates.size > 0) {
|
|
20366
|
-
const $0 = getByteLength(
|
|
20366
|
+
const $0 = getByteLength(hi.width, hi.height, G0.format, G0.type);
|
|
20367
20367
|
for (const ri of G0.layerUpdates) {
|
|
20368
|
-
const Si =
|
|
20369
|
-
ri * $0 /
|
|
20370
|
-
(ri + 1) * $0 /
|
|
20368
|
+
const Si = hi.data.subarray(
|
|
20369
|
+
ri * $0 / hi.data.BYTES_PER_ELEMENT,
|
|
20370
|
+
(ri + 1) * $0 / hi.data.BYTES_PER_ELEMENT
|
|
20371
20371
|
);
|
|
20372
|
-
s.texSubImage3D(c.TEXTURE_2D_ARRAY, 0, 0, 0, ri,
|
|
20372
|
+
s.texSubImage3D(c.TEXTURE_2D_ARRAY, 0, 0, 0, ri, hi.width, hi.height, 1, Ci, Yi, Si);
|
|
20373
20373
|
}
|
|
20374
20374
|
G0.clearLayerUpdates();
|
|
20375
20375
|
} else
|
|
20376
|
-
s.texSubImage3D(c.TEXTURE_2D_ARRAY, 0, 0, 0, 0,
|
|
20376
|
+
s.texSubImage3D(c.TEXTURE_2D_ARRAY, 0, 0, 0, 0, hi.width, hi.height, hi.depth, Ci, Yi, hi.data);
|
|
20377
20377
|
} else
|
|
20378
|
-
s.texImage3D(c.TEXTURE_2D_ARRAY, 0, vi,
|
|
20378
|
+
s.texImage3D(c.TEXTURE_2D_ARRAY, 0, vi, hi.width, hi.height, hi.depth, 0, Ci, Yi, hi.data);
|
|
20379
20379
|
else if (G0.isData3DTexture)
|
|
20380
|
-
Mi ? (Hi && s.texStorage3D(c.TEXTURE_3D, _0, vi,
|
|
20380
|
+
Mi ? (Hi && s.texStorage3D(c.TEXTURE_3D, _0, vi, hi.width, hi.height, hi.depth), F0 && s.texSubImage3D(c.TEXTURE_3D, 0, 0, 0, 0, hi.width, hi.height, hi.depth, Ci, Yi, hi.data)) : s.texImage3D(c.TEXTURE_3D, 0, vi, hi.width, hi.height, hi.depth, 0, Ci, Yi, hi.data);
|
|
20381
20381
|
else if (G0.isFramebufferTexture) {
|
|
20382
20382
|
if (Hi)
|
|
20383
20383
|
if (Mi)
|
|
20384
|
-
s.texStorage2D(c.TEXTURE_2D, _0, vi,
|
|
20384
|
+
s.texStorage2D(c.TEXTURE_2D, _0, vi, hi.width, hi.height);
|
|
20385
20385
|
else {
|
|
20386
|
-
let $0 =
|
|
20386
|
+
let $0 = hi.width, ri = hi.height;
|
|
20387
20387
|
for (let Si = 0; Si < _0; Si++)
|
|
20388
20388
|
s.texImage2D(c.TEXTURE_2D, Si, vi, $0, ri, 0, Ci, Yi, null), $0 >>= 1, ri >>= 1;
|
|
20389
20389
|
}
|
|
@@ -20397,12 +20397,12 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20397
20397
|
G0.generateMipmaps = !1;
|
|
20398
20398
|
} else if (Mi) {
|
|
20399
20399
|
if (Hi) {
|
|
20400
|
-
const $0 = ei(
|
|
20400
|
+
const $0 = ei(hi);
|
|
20401
20401
|
s.texStorage2D(c.TEXTURE_2D, _0, vi, $0.width, $0.height);
|
|
20402
20402
|
}
|
|
20403
|
-
F0 && s.texSubImage2D(c.TEXTURE_2D, 0, 0, 0, Ci, Yi,
|
|
20403
|
+
F0 && s.texSubImage2D(c.TEXTURE_2D, 0, 0, 0, Ci, Yi, hi);
|
|
20404
20404
|
} else
|
|
20405
|
-
s.texImage2D(c.TEXTURE_2D, 0, vi, Ci, Yi,
|
|
20405
|
+
s.texImage2D(c.TEXTURE_2D, 0, vi, Ci, Yi, hi);
|
|
20406
20406
|
Je(G0) && de(B0), fi.__version = j0.version, G0.onUpdate && G0.onUpdate(G0);
|
|
20407
20407
|
}
|
|
20408
20408
|
f0.__version = G0.version;
|
|
@@ -20416,9 +20416,9 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20416
20416
|
s.activeTexture(c.TEXTURE0 + N0);
|
|
20417
20417
|
const fi = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), Gi = G0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(G0.colorSpace), bi = G0.colorSpace === NoColorSpace || fi === Gi ? c.NONE : c.BROWSER_DEFAULT_WEBGL;
|
|
20418
20418
|
c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, G0.flipY), c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, G0.premultiplyAlpha), c.pixelStorei(c.UNPACK_ALIGNMENT, G0.unpackAlignment), c.pixelStorei(c.UNPACK_COLORSPACE_CONVERSION_WEBGL, bi);
|
|
20419
|
-
const Ji = G0.isCompressedTexture || G0.image[0].isCompressedTexture,
|
|
20419
|
+
const Ji = G0.isCompressedTexture || G0.image[0].isCompressedTexture, hi = G0.image[0] && G0.image[0].isDataTexture, Ci = [];
|
|
20420
20420
|
for (let ri = 0; ri < 6; ri++)
|
|
20421
|
-
!Ji && !
|
|
20421
|
+
!Ji && !hi ? Ci[ri] = Qe(G0.image[ri], !0, f.maxCubemapSize) : Ci[ri] = hi ? G0.image[ri].image : G0.image[ri], Ci[ri] = ii(G0, Ci[ri]);
|
|
20422
20422
|
const Yi = Ci[0], vi = st.convert(G0.format, G0.colorSpace), Ri = st.convert(G0.type), ki = _e(G0.internalFormat, vi, Ri, G0.colorSpace), Mi = G0.isVideoTexture !== !0, Hi = j0.__version === void 0 || B0 === !0, F0 = q0.dataReady;
|
|
20423
20423
|
let _0 = qe(G0, Yi);
|
|
20424
20424
|
E0(c.TEXTURE_CUBE_MAP, G0);
|
|
@@ -20439,7 +20439,7 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20439
20439
|
s.texStorage2D(c.TEXTURE_CUBE_MAP, _0, ki, ri.width, ri.height);
|
|
20440
20440
|
}
|
|
20441
20441
|
for (let ri = 0; ri < 6; ri++)
|
|
20442
|
-
if (
|
|
20442
|
+
if (hi) {
|
|
20443
20443
|
Mi ? F0 && s.texSubImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X + ri, 0, 0, 0, Ci[ri].width, Ci[ri].height, vi, Ri, Ci[ri].data) : s.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X + ri, 0, ki, Ci[ri].width, Ci[ri].height, 0, vi, Ri, Ci[ri].data);
|
|
20444
20444
|
for (let Si = 0; Si < $0.length; Si++) {
|
|
20445
20445
|
const Ki = $0[Si].image[ri].image;
|
|
@@ -20458,12 +20458,12 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20458
20458
|
f0.__version = G0.version;
|
|
20459
20459
|
}
|
|
20460
20460
|
function D0(f0, G0, N0, B0, q0, j0) {
|
|
20461
|
-
const fi = st.convert(N0.format, N0.colorSpace), Gi = st.convert(N0.type), bi = _e(N0.internalFormat, fi, Gi, N0.colorSpace), Ji = r.get(G0),
|
|
20462
|
-
if (
|
|
20461
|
+
const fi = st.convert(N0.format, N0.colorSpace), Gi = st.convert(N0.type), bi = _e(N0.internalFormat, fi, Gi, N0.colorSpace), Ji = r.get(G0), hi = r.get(N0);
|
|
20462
|
+
if (hi.__renderTarget = G0, !Ji.__hasExternalTextures) {
|
|
20463
20463
|
const Ci = Math.max(1, G0.width >> j0), Yi = Math.max(1, G0.height >> j0);
|
|
20464
20464
|
q0 === c.TEXTURE_3D || q0 === c.TEXTURE_2D_ARRAY ? s.texImage3D(q0, j0, bi, Ci, Yi, G0.depth, 0, fi, Gi, null) : s.texImage2D(q0, j0, bi, Ci, Yi, 0, fi, Gi, null);
|
|
20465
20465
|
}
|
|
20466
|
-
s.bindFramebuffer(c.FRAMEBUFFER, f0), A0(G0) ? Zt.framebufferTexture2DMultisampleEXT(c.FRAMEBUFFER, B0, q0,
|
|
20466
|
+
s.bindFramebuffer(c.FRAMEBUFFER, f0), A0(G0) ? Zt.framebufferTexture2DMultisampleEXT(c.FRAMEBUFFER, B0, q0, hi.__webglTexture, 0, li(G0)) : (q0 === c.TEXTURE_2D || q0 >= c.TEXTURE_CUBE_MAP_POSITIVE_X && q0 <= c.TEXTURE_CUBE_MAP_NEGATIVE_Z) && c.framebufferTexture2D(c.FRAMEBUFFER, B0, q0, hi.__webglTexture, j0), s.bindFramebuffer(c.FRAMEBUFFER, null);
|
|
20467
20467
|
}
|
|
20468
20468
|
function ni(f0, G0, N0) {
|
|
20469
20469
|
if (c.bindRenderbuffer(c.RENDERBUFFER, f0), G0.depthBuffer) {
|
|
@@ -20558,7 +20558,7 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20558
20558
|
for (let Gi = 0; Gi < q0.length; Gi++) {
|
|
20559
20559
|
const bi = q0[Gi];
|
|
20560
20560
|
N0.__webglColorRenderbuffer[Gi] = c.createRenderbuffer(), c.bindRenderbuffer(c.RENDERBUFFER, N0.__webglColorRenderbuffer[Gi]);
|
|
20561
|
-
const Ji = st.convert(bi.format, bi.colorSpace),
|
|
20561
|
+
const Ji = st.convert(bi.format, bi.colorSpace), hi = st.convert(bi.type), Ci = _e(bi.internalFormat, Ji, hi, bi.colorSpace, f0.isXRRenderTarget === !0), Yi = li(f0);
|
|
20562
20562
|
c.renderbufferStorageMultisample(c.RENDERBUFFER, Yi, Ci, f0.width, f0.height), c.framebufferRenderbuffer(c.FRAMEBUFFER, c.COLOR_ATTACHMENT0 + Gi, c.RENDERBUFFER, N0.__webglColorRenderbuffer[Gi]);
|
|
20563
20563
|
}
|
|
20564
20564
|
c.bindRenderbuffer(c.RENDERBUFFER, null), f0.depthBuffer && (N0.__webglDepthRenderbuffer = c.createRenderbuffer(), ni(N0.__webglDepthRenderbuffer, f0, !0)), s.bindFramebuffer(c.FRAMEBUFFER, null);
|
|
@@ -20575,8 +20575,8 @@ function WebGLTextures(c, e, s, r, f, st, ct) {
|
|
|
20575
20575
|
Je(G0) && de(c.TEXTURE_CUBE_MAP), s.unbindTexture();
|
|
20576
20576
|
} else if (fi) {
|
|
20577
20577
|
for (let Gi = 0, bi = q0.length; Gi < bi; Gi++) {
|
|
20578
|
-
const Ji = q0[Gi],
|
|
20579
|
-
s.bindTexture(c.TEXTURE_2D,
|
|
20578
|
+
const Ji = q0[Gi], hi = r.get(Ji);
|
|
20579
|
+
s.bindTexture(c.TEXTURE_2D, hi.__webglTexture), E0(c.TEXTURE_2D, Ji), D0(N0.__webglFramebuffer, f0, Ji, c.COLOR_ATTACHMENT0 + Gi, c.TEXTURE_2D, 0), Je(Ji) && de(c.TEXTURE_2D);
|
|
20580
20580
|
}
|
|
20581
20581
|
s.unbindTexture();
|
|
20582
20582
|
} else {
|
|
@@ -21314,9 +21314,9 @@ class WebGLRenderer {
|
|
|
21314
21314
|
} catch (l0) {
|
|
21315
21315
|
throw console.error("THREE.WebGLRenderer: " + l0.message), l0;
|
|
21316
21316
|
}
|
|
21317
|
-
let li, A0, P0, ii, ei, f0, G0, N0, B0, q0, j0, fi, Gi, bi, Ji,
|
|
21317
|
+
let li, A0, P0, ii, ei, f0, G0, N0, B0, q0, j0, fi, Gi, bi, Ji, hi, Ci, Yi, vi, Ri, ki, Mi, Hi, F0;
|
|
21318
21318
|
function _0() {
|
|
21319
|
-
li = new WebGLExtensions(C0), li.init(), Mi = new WebGLUtils(C0, li), A0 = new WebGLCapabilities(C0, li, e, Mi), P0 = new WebGLState(C0, li), A0.reverseDepthBuffer && Jt && P0.buffers.depth.setReversed(!0), ii = new WebGLInfo(C0), ei = new WebGLProperties(), f0 = new WebGLTextures(C0, li, P0, ei, A0, Mi, ii), G0 = new WebGLCubeMaps($e), N0 = new WebGLCubeUVMaps($e), B0 = new WebGLAttributes(C0), Hi = new WebGLBindingStates(C0, B0), q0 = new WebGLGeometries(C0, B0, ii, Hi), j0 = new WebGLObjects(C0, q0, B0, ii), vi = new WebGLMorphtargets(C0, A0, f0),
|
|
21319
|
+
li = new WebGLExtensions(C0), li.init(), Mi = new WebGLUtils(C0, li), A0 = new WebGLCapabilities(C0, li, e, Mi), P0 = new WebGLState(C0, li), A0.reverseDepthBuffer && Jt && P0.buffers.depth.setReversed(!0), ii = new WebGLInfo(C0), ei = new WebGLProperties(), f0 = new WebGLTextures(C0, li, P0, ei, A0, Mi, ii), G0 = new WebGLCubeMaps($e), N0 = new WebGLCubeUVMaps($e), B0 = new WebGLAttributes(C0), Hi = new WebGLBindingStates(C0, B0), q0 = new WebGLGeometries(C0, B0, ii, Hi), j0 = new WebGLObjects(C0, q0, B0, ii), vi = new WebGLMorphtargets(C0, A0, f0), hi = new WebGLClipping(ei), fi = new WebGLPrograms($e, G0, N0, li, A0, Hi, hi), Gi = new WebGLMaterials($e, ei), bi = new WebGLRenderLists(), Ji = new WebGLRenderStates(li), Yi = new WebGLBackground($e, G0, N0, P0, j0, $t, Wt), Ci = new WebGLShadowMap($e, j0, A0), F0 = new WebGLUniformsGroups(C0, ii, A0, P0), Ri = new WebGLBufferRenderer(C0, li, ii), ki = new WebGLIndexedBufferRenderer(C0, li, ii), ii.programs = fi.programs, $e.capabilities = A0, $e.extensions = li, $e.properties = ei, $e.renderLists = bi, $e.shadowMap = Ci, $e.state = P0, $e.info = ii;
|
|
21320
21320
|
}
|
|
21321
21321
|
_0();
|
|
21322
21322
|
const $0 = new WebXRManager($e, C0);
|
|
@@ -21517,13 +21517,13 @@ class WebGLRenderer {
|
|
|
21517
21517
|
return;
|
|
21518
21518
|
}
|
|
21519
21519
|
if (qe === !0) return;
|
|
21520
|
-
if (l0.matrixWorldAutoUpdate === !0 && l0.updateMatrixWorld(), g0.parent === null && g0.matrixWorldAutoUpdate === !0 && g0.updateMatrixWorld(), $0.enabled === !0 && $0.isPresenting === !0 && ($0.cameraAutoUpdate === !0 && $0.updateCamera(g0), g0 = $0.getCamera()), l0.isScene === !0 && l0.onBeforeRender($e, l0, g0, i0), de = Ji.get(l0, _e.length), de.init(g0), _e.push(de), mi.multiplyMatrices(g0.projectionMatrix, g0.matrixWorldInverse), M0.setFromProjectionMatrix(mi), D0 = this.localClippingEnabled, Q0 =
|
|
21520
|
+
if (l0.matrixWorldAutoUpdate === !0 && l0.updateMatrixWorld(), g0.parent === null && g0.matrixWorldAutoUpdate === !0 && g0.updateMatrixWorld(), $0.enabled === !0 && $0.isPresenting === !0 && ($0.cameraAutoUpdate === !0 && $0.updateCamera(g0), g0 = $0.getCamera()), l0.isScene === !0 && l0.onBeforeRender($e, l0, g0, i0), de = Ji.get(l0, _e.length), de.init(g0), _e.push(de), mi.multiplyMatrices(g0.projectionMatrix, g0.matrixWorldInverse), M0.setFromProjectionMatrix(mi), D0 = this.localClippingEnabled, Q0 = hi.init(this.clippingPlanes, D0), Je = bi.get(l0, Ke.length), Je.init(), Ke.push(Je), $0.enabled === !0 && $0.isPresenting === !0) {
|
|
21521
21521
|
const J0 = $e.xr.getDepthSensingMesh();
|
|
21522
21522
|
J0 !== null && mn(J0, g0, -1 / 0, $e.sortObjects);
|
|
21523
21523
|
}
|
|
21524
|
-
mn(l0, g0, 0, $e.sortObjects), Je.finish(), $e.sortObjects === !0 && Je.sort(b0, T0), O0 = $0.enabled === !1 || $0.isPresenting === !1 || $0.hasDepthSensing() === !1, O0 && Yi.addToRenderList(Je, l0), this.info.render.frame++, Q0 === !0 &&
|
|
21524
|
+
mn(l0, g0, 0, $e.sortObjects), Je.finish(), $e.sortObjects === !0 && Je.sort(b0, T0), O0 = $0.enabled === !1 || $0.isPresenting === !1 || $0.hasDepthSensing() === !1, O0 && Yi.addToRenderList(Je, l0), this.info.render.frame++, Q0 === !0 && hi.beginShadows();
|
|
21525
21525
|
const I0 = de.state.shadowsArray;
|
|
21526
|
-
Ci.render(I0, l0, g0), Q0 === !0 &&
|
|
21526
|
+
Ci.render(I0, l0, g0), Q0 === !0 && hi.endShadows(), this.info.autoReset === !0 && this.info.reset();
|
|
21527
21527
|
const S0 = Je.opaque, L0 = Je.transmissive;
|
|
21528
21528
|
if (de.setupLights(), g0.isArrayCamera) {
|
|
21529
21529
|
const J0 = g0.cameras;
|
|
@@ -21539,7 +21539,7 @@ class WebGLRenderer {
|
|
|
21539
21539
|
}
|
|
21540
21540
|
} else
|
|
21541
21541
|
L0.length > 0 && Vn(S0, L0, l0, g0), O0 && Yi.render(l0), pn(Je, l0, g0);
|
|
21542
|
-
i0 !== null && (f0.updateMultisampleRenderTarget(i0), f0.updateRenderTargetMipmap(i0)), l0.isScene === !0 && l0.onAfterRender($e, l0, g0), Hi.resetDefaultState(), n0 = -1, s0 = null, _e.pop(), _e.length > 0 ? (de = _e[_e.length - 1], Q0 === !0 &&
|
|
21542
|
+
i0 !== null && (f0.updateMultisampleRenderTarget(i0), f0.updateRenderTargetMipmap(i0)), l0.isScene === !0 && l0.onAfterRender($e, l0, g0), Hi.resetDefaultState(), n0 = -1, s0 = null, _e.pop(), _e.length > 0 ? (de = _e[_e.length - 1], Q0 === !0 && hi.setGlobalState($e.clippingPlanes, de.state.camera)) : de = null, Ke.pop(), Ke.length > 0 ? Je = Ke[Ke.length - 1] : Je = null;
|
|
21543
21543
|
};
|
|
21544
21544
|
function mn(l0, g0, I0, S0) {
|
|
21545
21545
|
if (l0.visible === !1) return;
|
|
@@ -21573,7 +21573,7 @@ class WebGLRenderer {
|
|
|
21573
21573
|
}
|
|
21574
21574
|
function pn(l0, g0, I0, S0) {
|
|
21575
21575
|
const L0 = l0.opaque, J0 = l0.transmissive, k0 = l0.transparent;
|
|
21576
|
-
de.setupLightsView(I0), Q0 === !0 &&
|
|
21576
|
+
de.setupLightsView(I0), Q0 === !0 && hi.setGlobalState($e.clippingPlanes, I0), S0 && P0.viewport(a0.copy(S0)), L0.length > 0 && cn(L0, g0, I0), J0.length > 0 && cn(J0, g0, I0), k0.length > 0 && cn(k0, g0, I0), P0.buffers.depth.setTest(!0), P0.buffers.depth.setMask(!0), P0.buffers.color.setMask(!0), P0.setPolygonOffset(!1);
|
|
21577
21577
|
}
|
|
21578
21578
|
function Vn(l0, g0, I0, S0) {
|
|
21579
21579
|
if ((I0.isScene === !0 ? I0.overrideMaterial : null) !== null)
|
|
@@ -21595,7 +21595,7 @@ class WebGLRenderer {
|
|
|
21595
21595
|
const K0 = $e.toneMapping;
|
|
21596
21596
|
$e.toneMapping = NoToneMapping;
|
|
21597
21597
|
const ai = S0.viewport;
|
|
21598
|
-
if (S0.viewport !== void 0 && (S0.viewport = void 0), de.setupLightsView(S0), Q0 === !0 &&
|
|
21598
|
+
if (S0.viewport !== void 0 && (S0.viewport = void 0), de.setupLightsView(S0), Q0 === !0 && hi.setGlobalState($e.clippingPlanes, S0), cn(l0, I0, S0), f0.updateMultisampleRenderTarget(J0), f0.updateRenderTargetMipmap(J0), li.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
21599
21599
|
let oi = !1;
|
|
21600
21600
|
for (let si = 0, yi = g0.length; si < yi; si++) {
|
|
21601
21601
|
const ui = g0[si], Wi = ui.object, Ii = ui.geometry, Ti = ui.material, gi = ui.group;
|
|
@@ -21630,7 +21630,7 @@ class WebGLRenderer {
|
|
|
21630
21630
|
} else
|
|
21631
21631
|
w0.uniforms = fi.getUniforms(l0), l0.onBeforeCompile(w0, $e), oi = fi.acquireProgram(w0, K0), ai.set(K0, oi), S0.uniforms = w0.uniforms;
|
|
21632
21632
|
const si = S0.uniforms;
|
|
21633
|
-
return (!l0.isShaderMaterial && !l0.isRawShaderMaterial || l0.clipping === !0) && (si.clippingPlanes =
|
|
21633
|
+
return (!l0.isShaderMaterial && !l0.isRawShaderMaterial || l0.clipping === !0) && (si.clippingPlanes = hi.uniform), Zn(l0, w0), S0.needsLights = sn(l0), S0.lightsStateVersion = k0, S0.needsLights && (si.ambientLightColor.value = L0.state.ambient, si.lightProbe.value = L0.state.probe, si.directionalLights.value = L0.state.directional, si.directionalLightShadows.value = L0.state.directionalShadow, si.spotLights.value = L0.state.spot, si.spotLightShadows.value = L0.state.spotShadow, si.rectAreaLights.value = L0.state.rectArea, si.ltc_1.value = L0.state.rectAreaLTC1, si.ltc_2.value = L0.state.rectAreaLTC2, si.pointLights.value = L0.state.point, si.pointLightShadows.value = L0.state.pointShadow, si.hemisphereLights.value = L0.state.hemi, si.directionalShadowMap.value = L0.state.directionalShadowMap, si.directionalShadowMatrix.value = L0.state.directionalShadowMatrix, si.spotShadowMap.value = L0.state.spotShadowMap, si.spotLightMatrix.value = L0.state.spotLightMatrix, si.spotLightMap.value = L0.state.spotLightMap, si.pointShadowMap.value = L0.state.pointShadowMap, si.pointShadowMatrix.value = L0.state.pointShadowMatrix), S0.currentProgram = oi, S0.uniformsList = null, oi;
|
|
21634
21634
|
}
|
|
21635
21635
|
function bn(l0) {
|
|
21636
21636
|
if (l0.uniformsList === null) {
|
|
@@ -21651,10 +21651,10 @@ class WebGLRenderer {
|
|
|
21651
21651
|
const Ii = I0.morphAttributes.position || I0.morphAttributes.normal || I0.morphAttributes.color, Ti = Ii !== void 0 ? Ii.length : 0, gi = ei.get(S0), Bi = de.state.lights;
|
|
21652
21652
|
if (Q0 === !0 && (D0 === !0 || l0 !== s0)) {
|
|
21653
21653
|
const Oi = l0 === s0 && S0.id === n0;
|
|
21654
|
-
|
|
21654
|
+
hi.setState(S0, l0, Oi);
|
|
21655
21655
|
}
|
|
21656
21656
|
let Ni = !1;
|
|
21657
|
-
S0.version === gi.__version ? (gi.needsLights && gi.lightsStateVersion !== Bi.state.version || gi.outputColorSpace !== w0 || L0.isBatchedMesh && gi.batching === !1 || !L0.isBatchedMesh && gi.batching === !0 || L0.isBatchedMesh && gi.batchingColor === !0 && L0.colorTexture === null || L0.isBatchedMesh && gi.batchingColor === !1 && L0.colorTexture !== null || L0.isInstancedMesh && gi.instancing === !1 || !L0.isInstancedMesh && gi.instancing === !0 || L0.isSkinnedMesh && gi.skinning === !1 || !L0.isSkinnedMesh && gi.skinning === !0 || L0.isInstancedMesh && gi.instancingColor === !0 && L0.instanceColor === null || L0.isInstancedMesh && gi.instancingColor === !1 && L0.instanceColor !== null || L0.isInstancedMesh && gi.instancingMorph === !0 && L0.morphTexture === null || L0.isInstancedMesh && gi.instancingMorph === !1 && L0.morphTexture !== null || gi.envMap !== K0 || S0.fog === !0 && gi.fog !== J0 || gi.numClippingPlanes !== void 0 && (gi.numClippingPlanes !==
|
|
21657
|
+
S0.version === gi.__version ? (gi.needsLights && gi.lightsStateVersion !== Bi.state.version || gi.outputColorSpace !== w0 || L0.isBatchedMesh && gi.batching === !1 || !L0.isBatchedMesh && gi.batching === !0 || L0.isBatchedMesh && gi.batchingColor === !0 && L0.colorTexture === null || L0.isBatchedMesh && gi.batchingColor === !1 && L0.colorTexture !== null || L0.isInstancedMesh && gi.instancing === !1 || !L0.isInstancedMesh && gi.instancing === !0 || L0.isSkinnedMesh && gi.skinning === !1 || !L0.isSkinnedMesh && gi.skinning === !0 || L0.isInstancedMesh && gi.instancingColor === !0 && L0.instanceColor === null || L0.isInstancedMesh && gi.instancingColor === !1 && L0.instanceColor !== null || L0.isInstancedMesh && gi.instancingMorph === !0 && L0.morphTexture === null || L0.isInstancedMesh && gi.instancingMorph === !1 && L0.morphTexture !== null || gi.envMap !== K0 || S0.fog === !0 && gi.fog !== J0 || gi.numClippingPlanes !== void 0 && (gi.numClippingPlanes !== hi.numPlanes || gi.numIntersection !== hi.numIntersection) || gi.vertexAlphas !== ai || gi.vertexTangents !== oi || gi.morphTargets !== si || gi.morphNormals !== yi || gi.morphColors !== ui || gi.toneMapping !== Wi || gi.morphTargetsCount !== Ti) && (Ni = !0) : (Ni = !0, gi.__version = S0.version);
|
|
21658
21658
|
let wi = gi.currentProgram;
|
|
21659
21659
|
Ni === !0 && (wi = dn(S0, g0, L0));
|
|
21660
21660
|
let Ei = !1, Qi = !1, _i = !1;
|
|
@@ -26642,7 +26642,7 @@ class SimplexNoise {
|
|
|
26642
26642
|
noise4d(e, s, r, f) {
|
|
26643
26643
|
const st = this.grad4, ct = this.simplex, Zt = this.perm, Wt = (Math.sqrt(5) - 1) / 4, Yt = (5 - Math.sqrt(5)) / 20;
|
|
26644
26644
|
let vt, Tt, Jt, $t, Xe;
|
|
26645
|
-
const Qe = (e + s + r + f) * Wt, Je = Math.floor(e + Qe), de = Math.floor(s + Qe), Ke = Math.floor(r + Qe), _e = Math.floor(f + Qe), $e = (Je + de + Ke + _e) * Yt, qe = Je - $e, t0 = de - $e, e0 = Ke - $e, i0 = _e - $e, n0 = e - qe, s0 = s - t0, a0 = r - e0, h0 = f - i0, m0 = n0 > s0 ? 32 : 0, V0 = n0 > a0 ? 16 : 0, u0 = s0 > a0 ? 8 : 0, r0 = n0 > h0 ? 4 : 0, d0 = s0 > h0 ? 2 : 0, o0 = a0 > h0 ? 1 : 0, b0 = m0 + V0 + u0 + r0 + d0 + o0, T0 = ct[b0][0] >= 3 ? 1 : 0, v0 = ct[b0][1] >= 3 ? 1 : 0, E0 = ct[b0][2] >= 3 ? 1 : 0, ci = ct[b0][3] >= 3 ? 1 : 0, M0 = ct[b0][0] >= 2 ? 1 : 0, Q0 = ct[b0][1] >= 2 ? 1 : 0, D0 = ct[b0][2] >= 2 ? 1 : 0, ni = ct[b0][3] >= 2 ? 1 : 0, mi = ct[b0][0] >= 1 ? 1 : 0, Vi = ct[b0][1] >= 1 ? 1 : 0, Zi = ct[b0][2] >= 1 ? 1 : 0, Li = ct[b0][3] >= 1 ? 1 : 0, O0 = n0 - T0 + Yt, U0 = s0 - v0 + Yt, C0 = a0 - E0 + Yt, Xi = h0 - ci + Yt, li = n0 - M0 + 2 * Yt, A0 = s0 - Q0 + 2 * Yt, P0 = a0 - D0 + 2 * Yt, ii = h0 - ni + 2 * Yt, ei = n0 - mi + 3 * Yt, f0 = s0 - Vi + 3 * Yt, G0 = a0 - Zi + 3 * Yt, N0 = h0 - Li + 3 * Yt, B0 = n0 - 1 + 4 * Yt, q0 = s0 - 1 + 4 * Yt, j0 = a0 - 1 + 4 * Yt, fi = h0 - 1 + 4 * Yt, Gi = Je & 255, bi = de & 255, Ji = Ke & 255,
|
|
26645
|
+
const Qe = (e + s + r + f) * Wt, Je = Math.floor(e + Qe), de = Math.floor(s + Qe), Ke = Math.floor(r + Qe), _e = Math.floor(f + Qe), $e = (Je + de + Ke + _e) * Yt, qe = Je - $e, t0 = de - $e, e0 = Ke - $e, i0 = _e - $e, n0 = e - qe, s0 = s - t0, a0 = r - e0, h0 = f - i0, m0 = n0 > s0 ? 32 : 0, V0 = n0 > a0 ? 16 : 0, u0 = s0 > a0 ? 8 : 0, r0 = n0 > h0 ? 4 : 0, d0 = s0 > h0 ? 2 : 0, o0 = a0 > h0 ? 1 : 0, b0 = m0 + V0 + u0 + r0 + d0 + o0, T0 = ct[b0][0] >= 3 ? 1 : 0, v0 = ct[b0][1] >= 3 ? 1 : 0, E0 = ct[b0][2] >= 3 ? 1 : 0, ci = ct[b0][3] >= 3 ? 1 : 0, M0 = ct[b0][0] >= 2 ? 1 : 0, Q0 = ct[b0][1] >= 2 ? 1 : 0, D0 = ct[b0][2] >= 2 ? 1 : 0, ni = ct[b0][3] >= 2 ? 1 : 0, mi = ct[b0][0] >= 1 ? 1 : 0, Vi = ct[b0][1] >= 1 ? 1 : 0, Zi = ct[b0][2] >= 1 ? 1 : 0, Li = ct[b0][3] >= 1 ? 1 : 0, O0 = n0 - T0 + Yt, U0 = s0 - v0 + Yt, C0 = a0 - E0 + Yt, Xi = h0 - ci + Yt, li = n0 - M0 + 2 * Yt, A0 = s0 - Q0 + 2 * Yt, P0 = a0 - D0 + 2 * Yt, ii = h0 - ni + 2 * Yt, ei = n0 - mi + 3 * Yt, f0 = s0 - Vi + 3 * Yt, G0 = a0 - Zi + 3 * Yt, N0 = h0 - Li + 3 * Yt, B0 = n0 - 1 + 4 * Yt, q0 = s0 - 1 + 4 * Yt, j0 = a0 - 1 + 4 * Yt, fi = h0 - 1 + 4 * Yt, Gi = Je & 255, bi = de & 255, Ji = Ke & 255, hi = _e & 255, Ci = Zt[Gi + Zt[bi + Zt[Ji + Zt[hi]]]] % 32, Yi = Zt[Gi + T0 + Zt[bi + v0 + Zt[Ji + E0 + Zt[hi + ci]]]] % 32, vi = Zt[Gi + M0 + Zt[bi + Q0 + Zt[Ji + D0 + Zt[hi + ni]]]] % 32, Ri = Zt[Gi + mi + Zt[bi + Vi + Zt[Ji + Zi + Zt[hi + Li]]]] % 32, ki = Zt[Gi + 1 + Zt[bi + 1 + Zt[Ji + 1 + Zt[hi + 1]]]] % 32;
|
|
26646
26646
|
let Mi = 0.6 - n0 * n0 - s0 * s0 - a0 * a0 - h0 * h0;
|
|
26647
26647
|
Mi < 0 ? vt = 0 : (Mi *= Mi, vt = Mi * Mi * this.dot4(st[Ci], n0, s0, a0, h0));
|
|
26648
26648
|
let Hi = 0.6 - O0 * O0 - U0 * U0 - C0 * C0 - Xi * Xi;
|
|
@@ -32441,7 +32441,7 @@ const obb = /* @__PURE__ */ new OrientedBox(), tempBox = /* @__PURE__ */ new Box
|
|
|
32441
32441
|
};
|
|
32442
32442
|
class MeshBVH {
|
|
32443
32443
|
static serialize(e, s = {}) {
|
|
32444
|
-
s =
|
|
32444
|
+
s = di({
|
|
32445
32445
|
cloneBuffers: !0
|
|
32446
32446
|
}, s);
|
|
32447
32447
|
const r = e.geometry, f = e._roots, st = e._indirectBuffer, ct = r.getIndex();
|
|
@@ -32457,11 +32457,11 @@ class MeshBVH {
|
|
|
32457
32457
|
}, Zt;
|
|
32458
32458
|
}
|
|
32459
32459
|
static deserialize(e, s, r = {}) {
|
|
32460
|
-
r =
|
|
32460
|
+
r = di({
|
|
32461
32461
|
setIndex: !0,
|
|
32462
32462
|
indirect: !!e.indirectBuffer
|
|
32463
32463
|
}, r);
|
|
32464
|
-
const { index: f, roots: st, indirectBuffer: ct } = e, Zt = new MeshBVH(s, Ui(
|
|
32464
|
+
const { index: f, roots: st, indirectBuffer: ct } = e, Zt = new MeshBVH(s, Ui(di({}, r), { [SKIP_GENERATION]: !0 }));
|
|
32465
32465
|
if (Zt._roots = st, Zt._indirectBuffer = ct || null, r.setIndex) {
|
|
32466
32466
|
const Wt = s.getIndex();
|
|
32467
32467
|
if (Wt === null) {
|
|
@@ -32479,7 +32479,7 @@ class MeshBVH {
|
|
|
32479
32479
|
if (e.index && e.index.isInterleavedBufferAttribute)
|
|
32480
32480
|
throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");
|
|
32481
32481
|
} else throw new Error("MeshBVH: Only BufferGeometries are supported.");
|
|
32482
|
-
if (s = Object.assign(Ui(
|
|
32482
|
+
if (s = Object.assign(Ui(di({}, DEFAULT_OPTIONS), {
|
|
32483
32483
|
// undocumented options
|
|
32484
32484
|
// Whether to skip generating the tree. Used for deserialization.
|
|
32485
32485
|
[SKIP_GENERATION]: !1
|
|
@@ -33499,7 +33499,7 @@ class Evaluator {
|
|
|
33499
33499
|
this.triangleSplitter = new TriangleSplitter(), this.attributeData = [], this.attributes = ["position", "uv", "normal"], this.useGroups = !0, this.consolidateGroups = !0, this.debug = new OperationDebugData();
|
|
33500
33500
|
}
|
|
33501
33501
|
getGroupRanges(e) {
|
|
33502
|
-
return !this.useGroups || e.groups.length === 0 ? [{ start: 0, count: 1 / 0, materialIndex: 0 }] : e.groups.map((s) =>
|
|
33502
|
+
return !this.useGroups || e.groups.length === 0 ? [{ start: 0, count: 1 / 0, materialIndex: 0 }] : e.groups.map((s) => di({}, s));
|
|
33503
33503
|
}
|
|
33504
33504
|
evaluate(e, s, r, f = new Brush()) {
|
|
33505
33505
|
let st = !0;
|
|
@@ -33521,7 +33521,7 @@ class Evaluator {
|
|
|
33521
33521
|
}), Tt.init(), performOperation(e, s, r, ct, Zt, { useGroups: Yt }), Tt.complete();
|
|
33522
33522
|
const Jt = this.getGroupRanges(e.geometry), $t = getMaterialList(Jt, e.material), Xe = this.getGroupRanges(s.geometry), Qe = getMaterialList(Xe, s.material);
|
|
33523
33523
|
Xe.forEach((de) => de.materialIndex += $t.length);
|
|
33524
|
-
let Je = [...Jt, ...Xe].map((de, Ke) => Ui(
|
|
33524
|
+
let Je = [...Jt, ...Xe].map((de, Ke) => Ui(di({}, de), { index: Ke }));
|
|
33525
33525
|
if (Yt) {
|
|
33526
33526
|
const de = [...$t, ...Qe];
|
|
33527
33527
|
vt && (Je = Je.map((_e) => {
|
|
@@ -37482,8 +37482,8 @@ let K$1 = class vn extends BufferGeometry {
|
|
|
37482
37482
|
if (Math.abs(Gi) > Number.EPSILON) {
|
|
37483
37483
|
const bi = Math.sqrt(fi), Ji = Math.sqrt(
|
|
37484
37484
|
q0 * q0 + j0 * j0
|
|
37485
|
-
),
|
|
37486
|
-
ei =
|
|
37485
|
+
), hi = P0.x - B0 / bi, Ci = P0.y + N0 / bi, Yi = ii.x - j0 / Ji, vi = ii.y + q0 / Ji, Ri = ((Yi - hi) * j0 - (vi - Ci) * q0) / (N0 * j0 - B0 * q0);
|
|
37486
|
+
ei = hi + N0 * Ri - A0.x, f0 = Ci + B0 * Ri - A0.y;
|
|
37487
37487
|
const ki = ei * ei + f0 * f0;
|
|
37488
37488
|
if (ki <= 2)
|
|
37489
37489
|
return new Vector2(ei, f0);
|
|
@@ -37880,7 +37880,7 @@ class Point extends C$1 {
|
|
|
37880
37880
|
super();
|
|
37881
37881
|
H0(this, "options");
|
|
37882
37882
|
H0(this, "scaleValue", 1);
|
|
37883
|
-
this.options =
|
|
37883
|
+
this.options = di({
|
|
37884
37884
|
sprite: !0
|
|
37885
37885
|
}, s);
|
|
37886
37886
|
}
|
|
@@ -37961,7 +37961,7 @@ class Arc extends C$1 {
|
|
|
37961
37961
|
H0(this, "helperMesh");
|
|
37962
37962
|
H0(this, "helperMeshPosition");
|
|
37963
37963
|
H0(this, "pickTube", null);
|
|
37964
|
-
this.options =
|
|
37964
|
+
this.options = di({
|
|
37965
37965
|
color: "#ffffff",
|
|
37966
37966
|
lineWidth: 6,
|
|
37967
37967
|
globe: !1,
|
|
@@ -38117,7 +38117,7 @@ class CrossPlane extends C$1 {
|
|
|
38117
38117
|
constructor(s) {
|
|
38118
38118
|
super();
|
|
38119
38119
|
H0(this, "options");
|
|
38120
|
-
this.options =
|
|
38120
|
+
this.options = di({}, s);
|
|
38121
38121
|
}
|
|
38122
38122
|
create() {
|
|
38123
38123
|
return ti(this, null, function* () {
|
|
@@ -38145,7 +38145,7 @@ class Model extends C$1 {
|
|
|
38145
38145
|
constructor(s) {
|
|
38146
38146
|
super();
|
|
38147
38147
|
H0(this, "options");
|
|
38148
|
-
this.options =
|
|
38148
|
+
this.options = di({}, s);
|
|
38149
38149
|
}
|
|
38150
38150
|
create() {
|
|
38151
38151
|
return ti(this, null, function* () {
|
|
@@ -38333,9 +38333,9 @@ const baseObjs = {
|
|
|
38333
38333
|
Icosahedron,
|
|
38334
38334
|
Lathe,
|
|
38335
38335
|
Octahedron
|
|
38336
|
-
}, prefabType = Object.keys(Ui(
|
|
38336
|
+
}, prefabType = Object.keys(Ui(di({}, expObjs), { Arc, Model })).map(
|
|
38337
38337
|
(c) => c
|
|
38338
|
-
), objs$5 =
|
|
38338
|
+
), objs$5 = di(di({}, baseObjs), expObjs);
|
|
38339
38339
|
class MaterialList {
|
|
38340
38340
|
constructor() {
|
|
38341
38341
|
H0(this, "pluginName", "materialList");
|
|
@@ -38348,7 +38348,7 @@ class MaterialList {
|
|
|
38348
38348
|
this.pencil = e;
|
|
38349
38349
|
}
|
|
38350
38350
|
setMaterial(e, s, r) {
|
|
38351
|
-
this.materialList.has(e) && console.warn(`MaterialList: ${e} already exists`), this.materialList.set(e, s), this.setShowMaterialList(e, e,
|
|
38351
|
+
this.materialList.has(e) && console.warn(`MaterialList: ${e} already exists`), this.materialList.set(e, s), this.setShowMaterialList(e, e, di({
|
|
38352
38352
|
name: s.name,
|
|
38353
38353
|
disableCheckHide: !0
|
|
38354
38354
|
}, r));
|
|
@@ -38386,7 +38386,7 @@ class MaterialList {
|
|
|
38386
38386
|
}
|
|
38387
38387
|
setObject3dMeta(e, s) {
|
|
38388
38388
|
this.objectList.forEach((r, f) => {
|
|
38389
|
-
r.key === e && this.objectList.set(f,
|
|
38389
|
+
r.key === e && this.objectList.set(f, di(di({}, r), s));
|
|
38390
38390
|
});
|
|
38391
38391
|
}
|
|
38392
38392
|
setObject3d(e, s, r) {
|
|
@@ -38403,7 +38403,7 @@ class MaterialList {
|
|
|
38403
38403
|
});
|
|
38404
38404
|
}
|
|
38405
38405
|
}
|
|
38406
|
-
this.objectList.set(e,
|
|
38406
|
+
this.objectList.set(e, di({
|
|
38407
38407
|
key: s,
|
|
38408
38408
|
object3d: e
|
|
38409
38409
|
}, r)), this.emitObject3dChange();
|
|
@@ -38422,7 +38422,7 @@ class MaterialList {
|
|
|
38422
38422
|
const { parent: st, key: ct } = r;
|
|
38423
38423
|
if (f === e || st === e) {
|
|
38424
38424
|
let Zt = s;
|
|
38425
|
-
Zt.includes("$1") && (Zt = Zt.replace("$1", ct)), this.objectList.set(f, Ui(
|
|
38425
|
+
Zt.includes("$1") && (Zt = Zt.replace("$1", ct)), this.objectList.set(f, Ui(di({}, r), {
|
|
38426
38426
|
key: Zt
|
|
38427
38427
|
}));
|
|
38428
38428
|
}
|
|
@@ -41087,7 +41087,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
41087
41087
|
);
|
|
41088
41088
|
return R0.value = R0.value + l0, g0;
|
|
41089
41089
|
}
|
|
41090
|
-
function
|
|
41090
|
+
function hi(c0, R0) {
|
|
41091
41091
|
const l0 = Yi(c0, R0), g0 = vi(c0, R0);
|
|
41092
41092
|
return [l0, g0];
|
|
41093
41093
|
}
|
|
@@ -41237,7 +41237,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
41237
41237
|
if (g0 === "int")
|
|
41238
41238
|
return Yi(c0, l0);
|
|
41239
41239
|
if (g0 === "rational")
|
|
41240
|
-
return
|
|
41240
|
+
return hi(c0, l0);
|
|
41241
41241
|
if (g0 === "timecode")
|
|
41242
41242
|
return Ci(c0, l0);
|
|
41243
41243
|
if (g0 === "preview")
|
|
@@ -48905,7 +48905,7 @@ class AddObject extends Command {
|
|
|
48905
48905
|
var f, st, ct;
|
|
48906
48906
|
this.obj = yield this.editor.viewport.vis.drawController.draw(
|
|
48907
48907
|
this.objectType,
|
|
48908
|
-
Ui(
|
|
48908
|
+
Ui(di({}, this.objectOptions), {
|
|
48909
48909
|
key: `${this.id}`
|
|
48910
48910
|
})
|
|
48911
48911
|
);
|
|
@@ -49112,15 +49112,27 @@ class SetGeometry extends Command {
|
|
|
49112
49112
|
this.newGeometry = e.newGeometry;
|
|
49113
49113
|
}
|
|
49114
49114
|
toJSON() {
|
|
49115
|
-
var s;
|
|
49116
49115
|
const e = super.toJSON(this);
|
|
49117
|
-
return e.objectUuid = this.editor.uuidByObject(this.object), e.oldGeometry = (
|
|
49116
|
+
return e.objectUuid = this.editor.uuidByObject(this.object), e.oldGeometry = this.geometryToJSON(this.oldGeometry), e.newGeometry = this.geometryToJSON(this.newGeometry), e;
|
|
49118
49117
|
}
|
|
49119
|
-
|
|
49120
|
-
|
|
49121
|
-
|
|
49122
|
-
|
|
49118
|
+
geometryToJSON(e) {
|
|
49119
|
+
return e ? e.type === "MeshLine" ? {
|
|
49120
|
+
type: "MeshLine",
|
|
49121
|
+
points: e.points,
|
|
49122
|
+
variableWidth: !!e.widthCallback
|
|
49123
|
+
} : e.toJSON() : void 0;
|
|
49124
|
+
}
|
|
49125
|
+
parseGeometry(e) {
|
|
49126
|
+
if (!e)
|
|
49127
|
+
return;
|
|
49128
|
+
if (e.type === "MeshLine") {
|
|
49129
|
+
const f = new he();
|
|
49130
|
+
return f.setPoints(e.points, e.variableWidth ? (st) => st : void 0), f;
|
|
49123
49131
|
}
|
|
49132
|
+
return new ObjectLoader().parseGeometries([e])[e.uuid];
|
|
49133
|
+
}
|
|
49134
|
+
fromJSON(e) {
|
|
49135
|
+
super.fromJSON(e), this.object = this.editor.objectByUuid(e.objectUuid), this.oldGeometry = this.parseGeometry(e.oldGeometry), this.newGeometry = this.parseGeometry(e.newGeometry);
|
|
49124
49136
|
}
|
|
49125
49137
|
}
|
|
49126
49138
|
const Commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -49289,7 +49301,7 @@ class Viewport {
|
|
|
49289
49301
|
}
|
|
49290
49302
|
if (this.vis = this.options.visFactories, this.vis.visName !== e)
|
|
49291
49303
|
throw new Error(`visName is not match, import {${e}}`);
|
|
49292
|
-
this.vis.setOptions(
|
|
49304
|
+
this.vis.setOptions(di(di({}, s), this.extendsOptions)), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing, this.vis.on("loaderProgress", (ct, Zt) => {
|
|
49293
49305
|
this.editor.emit("progress", {
|
|
49294
49306
|
type: "下载资源",
|
|
49295
49307
|
value: ct / Zt * 100 | 0
|
|
@@ -49431,7 +49443,7 @@ const compareVersion = (c, e) => {
|
|
|
49431
49443
|
}), c.h.u[0] && c.h.u[0].visType === "city" && (c.h.u[0].visOptions.jsonName || (c.h.u = [])), c.h.u[0] && c.h.u[0].visType === "map") {
|
|
49432
49444
|
if (c.h.u[0].visOptions.geojson) {
|
|
49433
49445
|
const { geojson: st, adcode: ct, geojsonLite: Zt } = c.h.u[0].visOptions;
|
|
49434
|
-
c.h.u[0].visOptions = Ui(
|
|
49446
|
+
c.h.u[0].visOptions = Ui(di({}, c.h.u[0].visOptions), {
|
|
49435
49447
|
geojsonMap: {
|
|
49436
49448
|
[ct]: st
|
|
49437
49449
|
},
|
|
@@ -49442,7 +49454,7 @@ const compareVersion = (c, e) => {
|
|
|
49442
49454
|
}
|
|
49443
49455
|
if (c.h.u[0].visOptions.bbox) {
|
|
49444
49456
|
const { bbox: st, bboxMap: ct, adcode: Zt } = c.h.u[0].visOptions;
|
|
49445
|
-
c.h.u[0].visOptions = Ui(
|
|
49457
|
+
c.h.u[0].visOptions = Ui(di({}, c.h.u[0].visOptions), {
|
|
49446
49458
|
bboxMap: ct || {
|
|
49447
49459
|
[Zt]: st
|
|
49448
49460
|
}
|
|
@@ -49450,7 +49462,7 @@ const compareVersion = (c, e) => {
|
|
|
49450
49462
|
}
|
|
49451
49463
|
if (c.h.u[0].visOptions.worldBg) {
|
|
49452
49464
|
const { worldBg: st } = c.h.u[0].visOptions;
|
|
49453
|
-
c.h.u[0].visOptions = Ui(
|
|
49465
|
+
c.h.u[0].visOptions = Ui(di({}, c.h.u[0].visOptions), {
|
|
49454
49466
|
parentBg: st
|
|
49455
49467
|
}), delete c.h.u[0].visOptions.worldBg;
|
|
49456
49468
|
}
|
|
@@ -49523,7 +49535,7 @@ class Editor {
|
|
|
49523
49535
|
{ leading: !1 }
|
|
49524
49536
|
));
|
|
49525
49537
|
H0(this, "_dispose", !1);
|
|
49526
|
-
this.options =
|
|
49538
|
+
this.options = di({
|
|
49527
49539
|
assetsPrefix: "",
|
|
49528
49540
|
processUndosMaxFrameTime: Number.MAX_VALUE
|
|
49529
49541
|
}, e), this.events.setMaxListeners(9999999), this.viewport = new Viewport(this, {
|
|
@@ -50150,7 +50162,7 @@ const queryBenchmarks$1 = (c) => queryBenchmarks(c), detect = () => {
|
|
|
50150
50162
|
const s = document.createElement("canvas"), r = s.toDataURL("image/webp").indexOf("data:image/webp") == 0, f = s.getContext("webgl"), st = f == null ? void 0 : f.getExtension("WEBGL_debug_renderer_info"), ct = document.createElement("canvas").getContext("webgl2"), Zt = typeof window.WebGL2RenderingContext != "undefined";
|
|
50151
50163
|
let Wt = "";
|
|
50152
50164
|
f && st && (Wt = f.getParameter(st.UNMASKED_RENDERER_WEBGL));
|
|
50153
|
-
const Yt = !/SwiftShader/gi.test(Wt), vt = Wt.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1"), Tt = queryBenchmarks$1(vt), Jt =
|
|
50165
|
+
const Yt = !/SwiftShader/gi.test(Wt), vt = Wt.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1"), Tt = queryBenchmarks$1(vt), Jt = di({
|
|
50154
50166
|
WebP: r,
|
|
50155
50167
|
WebGL: !!f,
|
|
50156
50168
|
WebGL2: !!ct,
|
|
@@ -50188,7 +50200,7 @@ class Base extends Event {
|
|
|
50188
50200
|
H0(this, "tier0", !1);
|
|
50189
50201
|
H0(this, "initSettingsObj");
|
|
50190
50202
|
H0(this, "mouseButtonsActiveStore", null);
|
|
50191
|
-
if (this.container = s.container, this.options =
|
|
50203
|
+
if (this.container = s.container, this.options = di({
|
|
50192
50204
|
assetsPrefix: "",
|
|
50193
50205
|
editor: !0
|
|
50194
50206
|
}, s), !this.options.assetsPrefix) {
|
|
@@ -50209,7 +50221,7 @@ class Base extends Event {
|
|
|
50209
50221
|
this.visName = this.constructor.VisName;
|
|
50210
50222
|
}
|
|
50211
50223
|
setOptions(s) {
|
|
50212
|
-
this.options =
|
|
50224
|
+
this.options = di(di({}, this.options), s);
|
|
50213
50225
|
}
|
|
50214
50226
|
get fromJSON() {
|
|
50215
50227
|
return this.editor.fromJSON.bind(this.editor);
|
|
@@ -50241,10 +50253,10 @@ class Base extends Event {
|
|
|
50241
50253
|
initPencil() {
|
|
50242
50254
|
return ti(this, null, function* () {
|
|
50243
50255
|
if (this.pencil) return;
|
|
50244
|
-
this.pencilConfig =
|
|
50256
|
+
this.pencilConfig = di({}, this.pencilConfig), this.options.css2DContainer && (this.pencilConfig.css2DRendererParams = {
|
|
50245
50257
|
container: this.options.css2DContainer
|
|
50246
50258
|
}), this.initPencilPlugin();
|
|
50247
|
-
const s = new kt$1(
|
|
50259
|
+
const s = new kt$1(di(di(Ui(di({
|
|
50248
50260
|
container: this.container,
|
|
50249
50261
|
isdev: !this.playing && IS_DEV,
|
|
50250
50262
|
stats: !this.playing && IS_DEV,
|
|
@@ -50328,7 +50340,7 @@ class Base extends Event {
|
|
|
50328
50340
|
}));
|
|
50329
50341
|
}
|
|
50330
50342
|
initPencilPlugin() {
|
|
50331
|
-
this.mList = new MaterialList(), this.loader = new Jl(
|
|
50343
|
+
this.mList = new MaterialList(), this.loader = new Jl(di({
|
|
50332
50344
|
prefix: this.options.assetsPrefix,
|
|
50333
50345
|
simpleTexture4deleted: !0
|
|
50334
50346
|
}, this.tier0 ? {
|
|
@@ -50360,7 +50372,7 @@ class Base extends Event {
|
|
|
50360
50372
|
mouseWheel: Ts.DOLLY
|
|
50361
50373
|
};
|
|
50362
50374
|
this.settings = new Proxy(
|
|
50363
|
-
Ui(
|
|
50375
|
+
Ui(di(di({}, this.initSettingsObj), s), {
|
|
50364
50376
|
mouseNone: !1,
|
|
50365
50377
|
viewportPadding: [0, 0, 0, 0]
|
|
50366
50378
|
}),
|
|
@@ -50500,7 +50512,7 @@ class Base extends Event {
|
|
|
50500
50512
|
}
|
|
50501
50513
|
}
|
|
50502
50514
|
H0(Base, "VisName", "base");
|
|
50503
|
-
const bbox100000 = [73.502355, 18.143579, 135.09567, 53.563269], bboxworld = [-180, -55.643164, 180, 83.564844], countriesJson = Ui(
|
|
50515
|
+
const bbox100000 = [73.502355, 18.143579, 135.09567, 53.563269], bboxworld = [-180, -55.643164, 180, 83.564844], countriesJson = Ui(di({}, countries), {
|
|
50504
50516
|
features: countries.features.map((c) => {
|
|
50505
50517
|
if (c.properties.ISO_A2 === "CN") {
|
|
50506
50518
|
const e = c.geometry.coordinates, s = [...json100000.features[0].geometry.coordinates];
|
|
@@ -50512,15 +50524,15 @@ const bbox100000 = [73.502355, 18.143579, 135.09567, 53.563269], bboxworld = [-1
|
|
|
50512
50524
|
//start 广西
|
|
50513
50525
|
e[0][0][73]
|
|
50514
50526
|
]
|
|
50515
|
-
], Ui(
|
|
50516
|
-
geometry: Ui(
|
|
50527
|
+
], Ui(di({}, c), {
|
|
50528
|
+
geometry: Ui(di({}, c.geometry), {
|
|
50517
50529
|
coordinates: s
|
|
50518
50530
|
})
|
|
50519
50531
|
});
|
|
50520
50532
|
} else
|
|
50521
50533
|
return c;
|
|
50522
50534
|
})
|
|
50523
|
-
}), countriesJsonExclATA = Ui(
|
|
50535
|
+
}), countriesJsonExclATA = Ui(di({}, countriesJson), {
|
|
50524
50536
|
features: countriesJson.features.filter(
|
|
50525
50537
|
(c) => c.properties.ISO_A3 !== "ATA"
|
|
50526
50538
|
)
|
|
@@ -50551,7 +50563,7 @@ let PlaneMap$1 = class extends C$1 {
|
|
|
50551
50563
|
H0(this, "lineArr");
|
|
50552
50564
|
H0(this, "mergeSideArea", null);
|
|
50553
50565
|
H0(this, "extrudelineArr");
|
|
50554
|
-
this.options =
|
|
50566
|
+
this.options = di({
|
|
50555
50567
|
areaGroup: !0,
|
|
50556
50568
|
hasSide: !0,
|
|
50557
50569
|
lineOffset: 0,
|
|
@@ -50582,7 +50594,7 @@ let PlaneMap$1 = class extends C$1 {
|
|
|
50582
50594
|
target: this,
|
|
50583
50595
|
key: n0
|
|
50584
50596
|
});
|
|
50585
|
-
return s0.userData =
|
|
50597
|
+
return s0.userData = di({}, i0), s0;
|
|
50586
50598
|
}))
|
|
50587
50599
|
);
|
|
50588
50600
|
this.groupArr = t0;
|
|
@@ -50709,14 +50721,14 @@ let PlaneMap$1 = class extends C$1 {
|
|
|
50709
50721
|
},
|
|
50710
50722
|
Xe
|
|
50711
50723
|
);
|
|
50712
|
-
return r != null && r.castShadow && (Je.object3d.castShadow = !0), Je.userData =
|
|
50724
|
+
return r != null && r.castShadow && (Je.object3d.castShadow = !0), Je.userData = di({}, $t), Je;
|
|
50713
50725
|
}))
|
|
50714
50726
|
);
|
|
50715
50727
|
{
|
|
50716
50728
|
const Tt = yield Wt.geoGeometry("extrudePolygon", {
|
|
50717
50729
|
mesaage: {
|
|
50718
50730
|
coordinatesArr: Zt.map(({ coords: $t }) => $t).flat(),
|
|
50719
|
-
projection:
|
|
50731
|
+
projection: di({}, this.options.projection),
|
|
50720
50732
|
topSegments: this.options.topSegments,
|
|
50721
50733
|
bbox: f,
|
|
50722
50734
|
depth: [this.options.depth],
|
|
@@ -50752,7 +50764,7 @@ let PlaneMap$1 = class extends C$1 {
|
|
|
50752
50764
|
const { coords: Wt, properties: Yt } = st[0], vt = this.findGroup(this.getPropertiesKey(Yt)), Tt = yield Zt.draw("Group", {
|
|
50753
50765
|
target: vt
|
|
50754
50766
|
});
|
|
50755
|
-
Tt.userData =
|
|
50767
|
+
Tt.userData = di({}, Yt);
|
|
50756
50768
|
const [Jt, $t] = yield Promise.all([
|
|
50757
50769
|
ct.geoGeometry("extrudePolygon", {
|
|
50758
50770
|
mesaage: {
|
|
@@ -50821,7 +50833,7 @@ let PlaneMap$1 = class extends C$1 {
|
|
|
50821
50833
|
},
|
|
50822
50834
|
$t
|
|
50823
50835
|
);
|
|
50824
|
-
return Qe.userData =
|
|
50836
|
+
return Qe.userData = di({}, Jt), Qe;
|
|
50825
50837
|
}))
|
|
50826
50838
|
);
|
|
50827
50839
|
{
|
|
@@ -51001,7 +51013,7 @@ class ContinentsBg extends C$1 {
|
|
|
51001
51013
|
areaGroup: !1,
|
|
51002
51014
|
// bbox: bboxworld,
|
|
51003
51015
|
depth: s,
|
|
51004
|
-
materialOptions:
|
|
51016
|
+
materialOptions: di({}, st)
|
|
51005
51017
|
},
|
|
51006
51018
|
this
|
|
51007
51019
|
);
|
|
@@ -51064,7 +51076,7 @@ class PlaneMap extends C$1 {
|
|
|
51064
51076
|
H0(this, "areaArr", []);
|
|
51065
51077
|
H0(this, "lineArr");
|
|
51066
51078
|
H0(this, "extrudelineArr");
|
|
51067
|
-
this.options =
|
|
51079
|
+
this.options = di({
|
|
51068
51080
|
depth: 2
|
|
51069
51081
|
}, s);
|
|
51070
51082
|
}
|
|
@@ -51083,7 +51095,7 @@ class PlaneMap extends C$1 {
|
|
|
51083
51095
|
const { geojson: s, bbox: r } = this.options, f = this.geojson2Meta(s), st = this.pencil.getPlugin("worker"), ct = this.pencil.getPlugin("draw"), Wt = yield this.pencil.getPlugin("loader").load("/1.png"), Yt = yield st.geoGeometry("extrudePolygon", {
|
|
51084
51096
|
mesaage: {
|
|
51085
51097
|
coordinatesArr: f.map(({ coords: Ke }) => Ke).flat(),
|
|
51086
|
-
projection:
|
|
51098
|
+
projection: di({}, this.options.projection),
|
|
51087
51099
|
topSegments: 100,
|
|
51088
51100
|
bbox: r,
|
|
51089
51101
|
depth: [this.options.depth],
|
|
@@ -51139,7 +51151,7 @@ class PlaneMap extends C$1 {
|
|
|
51139
51151
|
}
|
|
51140
51152
|
}
|
|
51141
51153
|
}
|
|
51142
|
-
const objs$4 = Ui(
|
|
51154
|
+
const objs$4 = Ui(di({}, objs$5), {
|
|
51143
51155
|
PlaneMap: PlaneMap$1,
|
|
51144
51156
|
ContinentsBg,
|
|
51145
51157
|
Mountain: PlaneMap
|
|
@@ -51189,7 +51201,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51189
51201
|
});
|
|
51190
51202
|
};
|
|
51191
51203
|
}, world = (c) => {
|
|
51192
|
-
if (c.initSettingsObj =
|
|
51204
|
+
if (c.initSettingsObj = di({
|
|
51193
51205
|
"测试板块颜色.color:::caId": "ffffff",
|
|
51194
51206
|
"测试边框颜色.color:::caId": "ffffff",
|
|
51195
51207
|
"测试边框宽度:::caId": 0,
|
|
@@ -51235,7 +51247,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51235
51247
|
});
|
|
51236
51248
|
};
|
|
51237
51249
|
}, china = (c) => {
|
|
51238
|
-
c.initSettingsObj =
|
|
51250
|
+
c.initSettingsObj = di({
|
|
51239
51251
|
"测试板块颜色.color:::caId": "ffffff",
|
|
51240
51252
|
"测试边框颜色.color:::caId": "ffffff",
|
|
51241
51253
|
"测试边框宽度:::caId": 0
|
|
@@ -51401,14 +51413,14 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51401
51413
|
return this.mapHistory.map((s) => s.mapInfo.adcode);
|
|
51402
51414
|
}
|
|
51403
51415
|
setOptions(s) {
|
|
51404
|
-
const r =
|
|
51416
|
+
const r = di({
|
|
51405
51417
|
0: countriesJsonExclATA,
|
|
51406
51418
|
1e5: chinaJson
|
|
51407
51419
|
}, s == null ? void 0 : s.geojsonMap);
|
|
51408
51420
|
let f = {
|
|
51409
51421
|
1e5: json100000
|
|
51410
51422
|
};
|
|
51411
|
-
const st =
|
|
51423
|
+
const st = di({
|
|
51412
51424
|
0: bboxworld,
|
|
51413
51425
|
1e5: bbox100000
|
|
51414
51426
|
}, s == null ? void 0 : s.bboxMap);
|
|
@@ -51420,7 +51432,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51420
51432
|
features: [Wt]
|
|
51421
51433
|
};
|
|
51422
51434
|
});
|
|
51423
|
-
}), f =
|
|
51435
|
+
}), f = di(di({}, f), s == null ? void 0 : s.extrudeLineGeojsonMap), super.setOptions(Ui(di({
|
|
51424
51436
|
parentBg: !1,
|
|
51425
51437
|
continentsBg: !1,
|
|
51426
51438
|
continentsBgDepth: 0,
|
|
@@ -51521,7 +51533,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51521
51533
|
bbox: Yt,
|
|
51522
51534
|
depth: this.options.parentBgDepth,
|
|
51523
51535
|
topSegments: this.options.parentBgTopSegments,
|
|
51524
|
-
materialOptions:
|
|
51536
|
+
materialOptions: di({}, vt)
|
|
51525
51537
|
}), Jt = Zt === 0 ? "world" : `${Zt}`;
|
|
51526
51538
|
Tt.lineArr.forEach(($t) => {
|
|
51527
51539
|
$t.object3d.name = "背景线", this.mList.setObject3d($t.object3d, Jt + "line", {
|
|
@@ -51734,39 +51746,43 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51734
51746
|
}
|
|
51735
51747
|
addAreaPlaneByProperty(st, ct) {
|
|
51736
51748
|
return ti(this, arguments, function* (s, r, f = {}) {
|
|
51737
|
-
var Yt, vt
|
|
51749
|
+
var Yt, vt;
|
|
51738
51750
|
if (!this.map) return;
|
|
51739
51751
|
const Wt = this.map.options.geojson.features.find(
|
|
51740
|
-
(
|
|
51752
|
+
(Tt) => Tt.properties && Tt.properties[s] === r
|
|
51741
51753
|
);
|
|
51742
51754
|
if (Wt) {
|
|
51743
|
-
const
|
|
51744
|
-
let
|
|
51755
|
+
const Tt = (Yt = f.uid) != null ? Yt : "";
|
|
51756
|
+
let Jt = !1;
|
|
51745
51757
|
if (this.mList.objectList.forEach((Je, de) => {
|
|
51746
|
-
if (Je.key === "planeCopyExtrudePolygon" +
|
|
51747
|
-
console.warn("已经存在复制面"),
|
|
51758
|
+
if (Je.key === "planeCopyExtrudePolygon" + Tt) {
|
|
51759
|
+
console.warn("已经存在复制面"), Jt = !0;
|
|
51748
51760
|
return;
|
|
51749
51761
|
}
|
|
51750
|
-
}),
|
|
51762
|
+
}), Jt) return;
|
|
51763
|
+
let $t;
|
|
51764
|
+
f.material ? n$1(f.material) ? $t = new MeshBasicMaterial(di({}, f.material)) : $t = f.material : $t = new MeshBasicMaterial({
|
|
51765
|
+
color: "red"
|
|
51766
|
+
});
|
|
51767
|
+
let Xe;
|
|
51768
|
+
f.lineMaterial ? n$1(f.lineMaterial) ? Xe = new it$1(di({}, f.lineMaterial)) : Xe = f.lineMaterial : Xe = new it$1({
|
|
51769
|
+
color: new Color$1("blue"),
|
|
51770
|
+
sizeAttenuation: 0,
|
|
51771
|
+
lineWidth: this.options.lineWidth
|
|
51772
|
+
});
|
|
51751
51773
|
const Qe = yield this.map.addPlane(Wt, {
|
|
51752
|
-
material:
|
|
51753
|
-
|
|
51754
|
-
|
|
51755
|
-
lineMaterial: (Tt = f.lineMaterial) != null ? Tt : new it$1({
|
|
51756
|
-
color: new Color$1("blue"),
|
|
51757
|
-
sizeAttenuation: 0,
|
|
51758
|
-
lineWidth: this.options.lineWidth
|
|
51759
|
-
}),
|
|
51760
|
-
topSegments: (Jt = f.topSegments) != null ? Jt : 0
|
|
51774
|
+
material: $t,
|
|
51775
|
+
lineMaterial: Xe,
|
|
51776
|
+
topSegments: (vt = f.topSegments) != null ? vt : 0
|
|
51761
51777
|
});
|
|
51762
51778
|
return Qe.children.forEach((Je) => {
|
|
51763
|
-
Je instanceof je ? (Je.object3d.name = "复制面" +
|
|
51779
|
+
Je instanceof je ? (Je.object3d.name = "复制面" + Tt, this.mList.setObject3d(
|
|
51764
51780
|
Je.object3d,
|
|
51765
|
-
"planeCopyExtrudePolygon" +
|
|
51781
|
+
"planeCopyExtrudePolygon" + Tt,
|
|
51766
51782
|
{
|
|
51767
51783
|
baseObject: Je
|
|
51768
51784
|
}
|
|
51769
|
-
)) : Je instanceof Ge && (Je.object3d.name = "复制线" +
|
|
51785
|
+
)) : Je instanceof Ge && (Je.object3d.name = "复制线" + Tt, this.mList.setObject3d(Je.object3d, "planeCopyLine" + Tt, {
|
|
51770
51786
|
baseObject: Je
|
|
51771
51787
|
}));
|
|
51772
51788
|
}), Qe;
|
|
@@ -51975,7 +51991,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51975
51991
|
if (!this.options.showDistrict && this.getAdcodeShowLevel(s) === "city" && (Je = de, de = void 0), [Je, de].filter(Boolean).forEach((_e) => {
|
|
51976
51992
|
if (!_e.features[0].properties.adcode && s !== 0) {
|
|
51977
51993
|
const $e = adcodeMap[s];
|
|
51978
|
-
_e.features[0].properties = Ui(
|
|
51994
|
+
_e.features[0].properties = Ui(di(di({}, _e.features[0].properties), $e), {
|
|
51979
51995
|
center: [$e.lng, $e.lat]
|
|
51980
51996
|
});
|
|
51981
51997
|
}
|
|
@@ -52113,7 +52129,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
52113
52129
|
depth: st,
|
|
52114
52130
|
adcode: ct
|
|
52115
52131
|
}) {
|
|
52116
|
-
const Wt = this.mList.getMaterialObj("plane"), Yt =
|
|
52132
|
+
const Wt = this.mList.getMaterialObj("plane"), Yt = di({}, Wt), vt = yield this.drawController.draw(
|
|
52117
52133
|
"PlaneMap",
|
|
52118
52134
|
{
|
|
52119
52135
|
geojson: s,
|
|
@@ -52743,7 +52759,7 @@ class CityPlane extends C$1 {
|
|
|
52743
52759
|
H0(this, "options");
|
|
52744
52760
|
H0(this, "plane");
|
|
52745
52761
|
H0(this, "water");
|
|
52746
|
-
this.options =
|
|
52762
|
+
this.options = di({
|
|
52747
52763
|
color: "#0C4557",
|
|
52748
52764
|
map: null
|
|
52749
52765
|
}, s);
|
|
@@ -52818,7 +52834,7 @@ class Building extends C$1 {
|
|
|
52818
52834
|
H0(this, "worldPositionZ", {
|
|
52819
52835
|
value: 0
|
|
52820
52836
|
});
|
|
52821
|
-
this.options =
|
|
52837
|
+
this.options = di({}, s);
|
|
52822
52838
|
}
|
|
52823
52839
|
create() {
|
|
52824
52840
|
return ti(this, null, function* () {
|
|
@@ -52960,7 +52976,7 @@ class Area extends C$1 {
|
|
|
52960
52976
|
H0(this, "options");
|
|
52961
52977
|
H0(this, "area", []);
|
|
52962
52978
|
H0(this, "outJson", /* @__PURE__ */ new Map());
|
|
52963
|
-
this.options =
|
|
52979
|
+
this.options = di({}, s);
|
|
52964
52980
|
}
|
|
52965
52981
|
create() {
|
|
52966
52982
|
return ti(this, null, function* () {
|
|
@@ -52984,8 +53000,8 @@ class Area extends C$1 {
|
|
|
52984
53000
|
const qe = lineString(Qe.geometry.coordinates[0]);
|
|
52985
53001
|
if (booleanCrosses(Ke, qe)) {
|
|
52986
53002
|
const e0 = clipGeojson(Ke, Qe);
|
|
52987
|
-
e0.features[0] && Jt[Je].push(Ui(
|
|
52988
|
-
geometry: Ui(
|
|
53003
|
+
e0.features[0] && Jt[Je].push(Ui(di({}, Qe), {
|
|
53004
|
+
geometry: Ui(di({}, Qe.geometry), {
|
|
52989
53005
|
coordinates: e0.features[0].geometry.coordinates
|
|
52990
53006
|
})
|
|
52991
53007
|
}));
|
|
@@ -53049,7 +53065,7 @@ class Road extends C$1 {
|
|
|
53049
53065
|
H0(this, "outJson", /* @__PURE__ */ new Map());
|
|
53050
53066
|
H0(this, "linePrimary", []);
|
|
53051
53067
|
H0(this, "lineSecondary", []);
|
|
53052
|
-
this.options =
|
|
53068
|
+
this.options = di({}, s);
|
|
53053
53069
|
}
|
|
53054
53070
|
create() {
|
|
53055
53071
|
return ti(this, null, function* () {
|
|
@@ -53075,8 +53091,8 @@ class Road extends C$1 {
|
|
|
53075
53091
|
const t0 = [
|
|
53076
53092
|
Je.geometry.coordinates[0].filter((e0) => booleanPointInPolygon$1(e0, _e))
|
|
53077
53093
|
];
|
|
53078
|
-
return t0[0].length && $t[de].push(Ui(
|
|
53079
|
-
geometry: Ui(
|
|
53094
|
+
return t0[0].length && $t[de].push(Ui(di({}, Je), {
|
|
53095
|
+
geometry: Ui(di({}, Je.geometry), {
|
|
53080
53096
|
coordinates: t0
|
|
53081
53097
|
})
|
|
53082
53098
|
})), !0;
|
|
@@ -53264,7 +53280,7 @@ class Target extends C$1 {
|
|
|
53264
53280
|
this.time.value += 0.01, this.offset.y -= 0.02;
|
|
53265
53281
|
}
|
|
53266
53282
|
}
|
|
53267
|
-
const objs$3 = Ui(
|
|
53283
|
+
const objs$3 = Ui(di({}, objs$5), {
|
|
53268
53284
|
PlaneMap: PlaneMap$1,
|
|
53269
53285
|
ContinentsBg,
|
|
53270
53286
|
Mountain: PlaneMap,
|
|
@@ -53524,7 +53540,7 @@ const objs$3 = Ui(hi({}, objs$5), {
|
|
|
53524
53540
|
const st = adcodeMap[e].parent || 0, ct = c.options.geojsonMap[st], Zt = c.options.bboxMap[st], Wt = c.mList.getMaterialObj("parentPlane"), Yt = yield c.drawController.draw(
|
|
53525
53541
|
"PlaneMap",
|
|
53526
53542
|
{
|
|
53527
|
-
geojson: Ui(
|
|
53543
|
+
geojson: Ui(di({}, ct), {
|
|
53528
53544
|
features: ct.features.filter((Jt) => Jt.properties.adcode !== e)
|
|
53529
53545
|
}),
|
|
53530
53546
|
projection: {
|
|
@@ -53536,7 +53552,7 @@ const objs$3 = Ui(hi({}, objs$5), {
|
|
|
53536
53552
|
areaGroup: !1,
|
|
53537
53553
|
bbox: Zt,
|
|
53538
53554
|
depth: 0.1,
|
|
53539
|
-
materialOptions:
|
|
53555
|
+
materialOptions: di({}, Wt)
|
|
53540
53556
|
},
|
|
53541
53557
|
c.group
|
|
53542
53558
|
), { min: vt, max: Tt } = Yt.getSize();
|
|
@@ -53658,7 +53674,7 @@ class Map$1 extends Map$2 {
|
|
|
53658
53674
|
});
|
|
53659
53675
|
}
|
|
53660
53676
|
setOptions(s) {
|
|
53661
|
-
super.setOptions(
|
|
53677
|
+
super.setOptions(di({
|
|
53662
53678
|
polarAngle: 0.6690037180091797,
|
|
53663
53679
|
mapDepth: [1, 0.3, 0.12],
|
|
53664
53680
|
clickOusideBack: !0,
|
|
@@ -53668,7 +53684,7 @@ class Map$1 extends Map$2 {
|
|
|
53668
53684
|
parentBg: !0,
|
|
53669
53685
|
cityOnMap: !1,
|
|
53670
53686
|
style: "map2"
|
|
53671
|
-
}, s)), this.extendsOptions = Ui(
|
|
53687
|
+
}, s)), this.extendsOptions = Ui(di({}, this.extendsOptions), {
|
|
53672
53688
|
mapDepth: () => this.options.mapDepth,
|
|
53673
53689
|
clickOusideBack: this.options.clickOusideBack,
|
|
53674
53690
|
clickHandleDrillDown: this.options.clickHandleDrillDown,
|
|
@@ -53790,13 +53806,13 @@ class Map$1 extends Map$2 {
|
|
|
53790
53806
|
if (this.options.adcode !== 1e5) {
|
|
53791
53807
|
const Qe = this.mList.getMaterialObj("parentPlane"), Je = yield this.drawController.draw(
|
|
53792
53808
|
"PlaneMap",
|
|
53793
|
-
|
|
53794
|
-
geojson: Ui(
|
|
53809
|
+
di({
|
|
53810
|
+
geojson: Ui(di({}, Wt), {
|
|
53795
53811
|
features: [
|
|
53796
53812
|
...Wt.features.filter((de) => de.properties.adcode !== s)
|
|
53797
53813
|
]
|
|
53798
53814
|
}),
|
|
53799
|
-
materialOptions:
|
|
53815
|
+
materialOptions: di({}, Qe)
|
|
53800
53816
|
}, vt),
|
|
53801
53817
|
this.group
|
|
53802
53818
|
);
|
|
@@ -53804,13 +53820,13 @@ class Map$1 extends Map$2 {
|
|
|
53804
53820
|
}
|
|
53805
53821
|
const Tt = this.mList.getMaterialObj("worldPlane"), Jt = yield this.drawController.draw(
|
|
53806
53822
|
"PlaneMap",
|
|
53807
|
-
|
|
53808
|
-
geojson: Ui(
|
|
53823
|
+
di({
|
|
53824
|
+
geojson: Ui(di({}, Wt), {
|
|
53809
53825
|
features: [
|
|
53810
53826
|
...this.options.geojsonMap[0].features.filter((Qe) => Qe.properties.ISO_A3 !== "CHN")
|
|
53811
53827
|
]
|
|
53812
53828
|
}),
|
|
53813
|
-
materialOptions:
|
|
53829
|
+
materialOptions: di({}, Tt)
|
|
53814
53830
|
}, vt),
|
|
53815
53831
|
this.group
|
|
53816
53832
|
), { min: $t, max: Xe } = Jt.getSize();
|
|
@@ -53854,7 +53870,7 @@ class Map$1 extends Map$2 {
|
|
|
53854
53870
|
depth: st,
|
|
53855
53871
|
adcode: ct
|
|
53856
53872
|
}) {
|
|
53857
|
-
const Wt = this.mapHistory.length === 0, Yt = this.mList.getMaterialObj("plane"), vt =
|
|
53873
|
+
const Wt = this.mapHistory.length === 0, Yt = this.mList.getMaterialObj("plane"), vt = di({}, Yt);
|
|
53858
53874
|
Wt || !vt.topMatTwo ? (vt.topMat = vt.topMatOne, vt.bgTopMat = vt.bgTopMatOne) : vt.topMat = vt.topMatTwo;
|
|
53859
53875
|
let Tt = s, Jt = r;
|
|
53860
53876
|
return this.options.cityOnMap && r && (Tt = r, this.options.showCityOnMapInnerLine ? Jt = s : Jt = void 0), yield this.drawController.draw(
|
|
@@ -53878,7 +53894,7 @@ class Map$1 extends Map$2 {
|
|
|
53878
53894
|
});
|
|
53879
53895
|
}
|
|
53880
53896
|
}
|
|
53881
|
-
const objs$2 = Ui(
|
|
53897
|
+
const objs$2 = Ui(di({}, objs$5), {
|
|
53882
53898
|
Building,
|
|
53883
53899
|
Road,
|
|
53884
53900
|
Area,
|
|
@@ -54068,7 +54084,7 @@ class City$1 extends Base {
|
|
|
54068
54084
|
H0(this, "multiplyScalar", 1);
|
|
54069
54085
|
}
|
|
54070
54086
|
setOptions(s) {
|
|
54071
|
-
super.setOptions(
|
|
54087
|
+
super.setOptions(di({
|
|
54072
54088
|
fitTo: !0,
|
|
54073
54089
|
plane: !0,
|
|
54074
54090
|
grey: !1,
|
|
@@ -54523,7 +54539,7 @@ const fn = class fn extends Map$1 {
|
|
|
54523
54539
|
});
|
|
54524
54540
|
}
|
|
54525
54541
|
setOptions(s) {
|
|
54526
|
-
super.setOptions(
|
|
54542
|
+
super.setOptions(di({
|
|
54527
54543
|
initCity: !1,
|
|
54528
54544
|
clipOutShow: !0,
|
|
54529
54545
|
allCity: !1,
|
|
@@ -54696,7 +54712,7 @@ class Earth$1 extends Sphere {
|
|
|
54696
54712
|
constructor(s) {
|
|
54697
54713
|
super();
|
|
54698
54714
|
H0(this, "options");
|
|
54699
|
-
this.options =
|
|
54715
|
+
this.options = di({
|
|
54700
54716
|
radius: 30
|
|
54701
54717
|
}, s);
|
|
54702
54718
|
}
|
|
@@ -54711,7 +54727,7 @@ class Countries extends C$1 {
|
|
|
54711
54727
|
H0(this, "options");
|
|
54712
54728
|
H0(this, "areaArr", []);
|
|
54713
54729
|
H0(this, "lineArr", []);
|
|
54714
|
-
this.options =
|
|
54730
|
+
this.options = di({
|
|
54715
54731
|
start: 30,
|
|
54716
54732
|
depth: 1.4,
|
|
54717
54733
|
lineOffset: 0.01,
|
|
@@ -54767,7 +54783,7 @@ class Countries extends C$1 {
|
|
|
54767
54783
|
},
|
|
54768
54784
|
this
|
|
54769
54785
|
);
|
|
54770
|
-
de.userData =
|
|
54786
|
+
de.userData = di({}, Qe.properties), this.areaArr.push(de);
|
|
54771
54787
|
})
|
|
54772
54788
|
}),
|
|
54773
54789
|
Xe && Zt.geoGeometry("conicLine", {
|
|
@@ -54786,7 +54802,7 @@ class Countries extends C$1 {
|
|
|
54786
54802
|
},
|
|
54787
54803
|
this
|
|
54788
54804
|
);
|
|
54789
|
-
de.userData =
|
|
54805
|
+
de.userData = di({}, Qe.properties), this.lineArr.push(de);
|
|
54790
54806
|
})
|
|
54791
54807
|
})
|
|
54792
54808
|
].filter(Boolean)).flat()
|
|
@@ -54830,7 +54846,7 @@ class SphereShadow extends C$1 {
|
|
|
54830
54846
|
constructor(s) {
|
|
54831
54847
|
super();
|
|
54832
54848
|
H0(this, "options");
|
|
54833
|
-
this.options =
|
|
54849
|
+
this.options = di({
|
|
54834
54850
|
radius: 30
|
|
54835
54851
|
}, s);
|
|
54836
54852
|
}
|
|
@@ -54843,7 +54859,7 @@ class SphereShadow extends C$1 {
|
|
|
54843
54859
|
});
|
|
54844
54860
|
}
|
|
54845
54861
|
}
|
|
54846
|
-
const objs$1 = Ui(
|
|
54862
|
+
const objs$1 = Ui(di({}, objs$5), {
|
|
54847
54863
|
Earth: Earth$1,
|
|
54848
54864
|
Countries,
|
|
54849
54865
|
SphereShadow
|
|
@@ -54853,7 +54869,7 @@ const objs$1 = Ui(hi({}, objs$5), {
|
|
|
54853
54869
|
far: 1e3
|
|
54854
54870
|
}
|
|
54855
54871
|
}, chinaPlate = (c) => {
|
|
54856
|
-
c.extendsOptions = Ui(
|
|
54872
|
+
c.extendsOptions = Ui(di({}, c.extendsOptions), {
|
|
54857
54873
|
copyChinaPlane: c.options.copyChinaPlane
|
|
54858
54874
|
}), c.loaderAdd = function() {
|
|
54859
54875
|
const { loader: e } = this;
|
|
@@ -55061,7 +55077,7 @@ const objs$1 = Ui(hi({}, objs$5), {
|
|
|
55061
55077
|
return this.map.areaArr;
|
|
55062
55078
|
}
|
|
55063
55079
|
setOptions(s) {
|
|
55064
|
-
super.setOptions(
|
|
55080
|
+
super.setOptions(di({
|
|
55065
55081
|
mapDepth: 1.4,
|
|
55066
55082
|
radius: 30,
|
|
55067
55083
|
style: "chinaPlate",
|
|
@@ -55282,7 +55298,7 @@ class Earth extends Sphere {
|
|
|
55282
55298
|
this.material = f, super.create(), this.pencil.installPlugins.get("materialList").setObject3d(this.object3d, "earth");
|
|
55283
55299
|
}
|
|
55284
55300
|
}
|
|
55285
|
-
const objs = Ui(
|
|
55301
|
+
const objs = Ui(di({}, objs$5), {
|
|
55286
55302
|
Earth
|
|
55287
55303
|
}), PENCIL_CONFIG = {
|
|
55288
55304
|
camera: {
|
|
@@ -55302,7 +55318,7 @@ const objs = Ui(hi({}, objs$5), {
|
|
|
55302
55318
|
});
|
|
55303
55319
|
}
|
|
55304
55320
|
setOptions(s) {
|
|
55305
|
-
super.setOptions(
|
|
55321
|
+
super.setOptions(di({}, s)), this.pencilConfig = PENCIL_CONFIG;
|
|
55306
55322
|
}
|
|
55307
55323
|
loaderAdd() {
|
|
55308
55324
|
this.loader.add([
|
|
@@ -55436,7 +55452,7 @@ const getMapConfig = (r, ...f) => ti(void 0, [r, ...f], function* (c, e = b, s)
|
|
|
55436
55452
|
);
|
|
55437
55453
|
const { res: Jt } = yield jsonFetch(
|
|
55438
55454
|
s + `/geojson/${vt || "json-lite"}/${e.adcode}.json`
|
|
55439
|
-
), $t = bbox(Jt), Xe = e.adcode, Qe = Ui(
|
|
55455
|
+
), $t = bbox(Jt), Xe = e.adcode, Qe = Ui(di({}, e), {
|
|
55440
55456
|
geojsonMap: {
|
|
55441
55457
|
[Xe]: Tt
|
|
55442
55458
|
},
|
|
@@ -55480,7 +55496,7 @@ const getMapConfig = (r, ...f) => ti(void 0, [r, ...f], function* (c, e = b, s)
|
|
|
55480
55496
|
}
|
|
55481
55497
|
return r && (Qe.depthReference = r.depthReference || r.bboxMap[r.adcode]), Qe;
|
|
55482
55498
|
}
|
|
55483
|
-
return
|
|
55499
|
+
return di({}, e);
|
|
55484
55500
|
}), getCityConfig = (s, ...r) => ti(void 0, [s, ...r], function* (c, e = b) {
|
|
55485
55501
|
const f = adcodeMap[c], st = yield window.fetch(e + `/geojson/json-lite/${c}.json`).then((Wt) => Wt.json()), ct = bbox(st), { name: Zt } = adcodeMap[c];
|
|
55486
55502
|
return {
|