vis-core 0.28.33 → 0.28.35
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/detect/WebGL.d.ts +2 -0
- package/dist/editor/viewport.d.ts +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/index.module.js +371 -294
- package/dist/version.d.ts +1 -1
- package/dist/vis/earth/index.d.ts +3 -3
- package/dist/vis/earth/objects/countries/index.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.module.js
CHANGED
|
@@ -14,7 +14,7 @@ var vn = (v, t) => (t = Symbol[v]) ? t : Symbol.for("Symbol." + v), Un = (v) =>
|
|
|
14
14
|
}, Ui = (v, t) => Kn(v, Fn(t));
|
|
15
15
|
var b0 = (v, t, r) => Vn(v, typeof t != "symbol" ? t + "" : t, r);
|
|
16
16
|
var yn = (v, t, r) => Yn(An(v), r, t);
|
|
17
|
-
var
|
|
17
|
+
var N0 = (v, t, r) => new Promise((m, C) => {
|
|
18
18
|
var _ = (ve) => {
|
|
19
19
|
try {
|
|
20
20
|
O(r.next(ve));
|
|
@@ -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.35", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
|
|
67
67
|
token: void 0,
|
|
68
68
|
getInfo() {
|
|
69
69
|
if (!this.token)
|
|
@@ -14564,7 +14564,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14564
14564
|
let F0, Q0, S0;
|
|
14565
14565
|
const C0 = P0.x - E0.x, A0 = P0.y - E0.y, B0 = O0.x - P0.x, r0 = O0.y - P0.y, t0 = C0 * C0 + A0 * A0, m0 = C0 * r0 - A0 * B0;
|
|
14566
14566
|
if (Math.abs(m0) > Number.EPSILON) {
|
|
14567
|
-
const v0 = Math.sqrt(t0),
|
|
14567
|
+
const v0 = Math.sqrt(t0), K0 = Math.sqrt(B0 * B0 + r0 * r0), R0 = E0.x - A0 / v0, Xi = E0.y + C0 / v0, q0 = O0.x - r0 / K0, Zi = O0.y + B0 / K0, Pi = ((q0 - R0) * r0 - (Zi - Xi) * B0) / (C0 * r0 - A0 * B0);
|
|
14568
14568
|
F0 = R0 + C0 * Pi - P0.x, Q0 = Xi + A0 * Pi - P0.y;
|
|
14569
14569
|
const gi = F0 * F0 + Q0 * Q0;
|
|
14570
14570
|
if (gi <= 2)
|
|
@@ -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(t, r) {
|
|
18471
|
-
return
|
|
18471
|
+
return N0(this, null, function* () {
|
|
18472
18472
|
const m = this, C = this.path === "" ? LoaderUtils.extractUrlBase(t) : 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(t) {
|
|
18512
|
-
return
|
|
18512
|
+
return N0(this, null, function* () {
|
|
18513
18513
|
const r = this.parseAnimations(t.animations), m = this.parseShapes(t.shapes), C = this.parseGeometries(t.geometries, m), _ = yield this.parseImagesAsync(t.images), I = this.parseTextures(t.textures, _), O = this.parseMaterials(t.materials, I), ve = this.parseObject(t.object, C, O, I, r), Ce = this.parseSkeletons(t.skeletons, ve);
|
|
18514
18514
|
return this.bindSkeletons(ve, Ce), this.bindLightTargets(ve), ve;
|
|
18515
18515
|
});
|
|
@@ -18618,11 +18618,11 @@ class ObjectLoader extends Loader {
|
|
|
18618
18618
|
return C;
|
|
18619
18619
|
}
|
|
18620
18620
|
parseImagesAsync(t) {
|
|
18621
|
-
return
|
|
18621
|
+
return N0(this, null, function* () {
|
|
18622
18622
|
const r = this, m = {};
|
|
18623
18623
|
let C;
|
|
18624
18624
|
function _(I) {
|
|
18625
|
-
return
|
|
18625
|
+
return N0(this, null, function* () {
|
|
18626
18626
|
if (typeof I == "string") {
|
|
18627
18627
|
const O = I, ve = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(O) ? O : r.resourcePath + O;
|
|
18628
18628
|
return yield C.loadAsync(ve);
|
|
@@ -29329,7 +29329,7 @@ function WebGLPrograms(v, t, r, m, C, _, I) {
|
|
|
29329
29329
|
j0 = ji.vertexShader, H0 = ji.fragmentShader;
|
|
29330
29330
|
} else
|
|
29331
29331
|
j0 = wt.vertexShader, H0 = wt.fragmentShader, ve.update(wt), g0 = ve.getVertexShaderID(wt), _0 = ve.getFragmentShaderID(wt);
|
|
29332
|
-
const k0 = v.getRenderTarget(), bi = v.state.buffers.depth.getReversed(), yi = e0.isInstancedMesh === !0, vi = e0.isBatchedMesh === !0, Ki = !!wt.map, Vi = !!wt.matcap, a0 = !!Yt, P0 = !!wt.aoMap, E0 = !!wt.lightMap, O0 = !!wt.bumpMap, F0 = !!wt.normalMap, Q0 = !!wt.displacementMap, S0 = !!wt.emissiveMap, C0 = !!wt.metalnessMap, A0 = !!wt.roughnessMap, B0 = wt.anisotropy > 0, r0 = wt.clearcoat > 0, t0 = wt.dispersion > 0, m0 = wt.iridescence > 0, v0 = wt.sheen > 0,
|
|
29332
|
+
const k0 = v.getRenderTarget(), bi = v.state.buffers.depth.getReversed(), yi = e0.isInstancedMesh === !0, vi = e0.isBatchedMesh === !0, Ki = !!wt.map, Vi = !!wt.matcap, a0 = !!Yt, P0 = !!wt.aoMap, E0 = !!wt.lightMap, O0 = !!wt.bumpMap, F0 = !!wt.normalMap, Q0 = !!wt.displacementMap, S0 = !!wt.emissiveMap, C0 = !!wt.metalnessMap, A0 = !!wt.roughnessMap, B0 = wt.anisotropy > 0, r0 = wt.clearcoat > 0, t0 = wt.dispersion > 0, m0 = wt.iridescence > 0, v0 = wt.sheen > 0, K0 = wt.transmission > 0, R0 = B0 && !!wt.anisotropyMap, Xi = r0 && !!wt.clearcoatMap, q0 = r0 && !!wt.clearcoatNormalMap, Zi = r0 && !!wt.clearcoatRoughnessMap, Pi = m0 && !!wt.iridescenceMap, gi = m0 && !!wt.iridescenceThicknessMap, Ci = v0 && !!wt.sheenColorMap, Ei = v0 && !!wt.sheenRoughnessMap, Ii = !!wt.specularMap, Li = !!wt.specularColorMap, Ni = !!wt.specularIntensityMap, f0 = K0 && !!wt.transmissionMap, xi = K0 && !!wt.thicknessMap, w0 = !!wt.gradientMap, Wi = !!wt.alphaMap, Mi = wt.alphaTest > 0, J0 = !!wt.alphaHash, zi = !!wt.extensions;
|
|
29333
29333
|
let Bi = NoToneMapping;
|
|
29334
29334
|
wt.toneMapped && (k0 === null || k0.isXRRenderTarget === !0) && (Bi = v.toneMapping);
|
|
29335
29335
|
const Qi = {
|
|
@@ -29383,7 +29383,7 @@ function WebGLPrograms(v, t, r, m, C, _, I) {
|
|
|
29383
29383
|
specularMap: Ii,
|
|
29384
29384
|
specularColorMap: Li,
|
|
29385
29385
|
specularIntensityMap: Ni,
|
|
29386
|
-
transmission:
|
|
29386
|
+
transmission: K0,
|
|
29387
29387
|
transmissionMap: f0,
|
|
29388
29388
|
thicknessMap: xi,
|
|
29389
29389
|
gradientMap: w0,
|
|
@@ -30315,7 +30315,7 @@ function WebGLState(v, t) {
|
|
|
30315
30315
|
console.error("THREE.WebGLState:", f0);
|
|
30316
30316
|
}
|
|
30317
30317
|
}
|
|
30318
|
-
function
|
|
30318
|
+
function K0() {
|
|
30319
30319
|
try {
|
|
30320
30320
|
v.texSubImage3D(...arguments);
|
|
30321
30321
|
} catch (f0) {
|
|
@@ -30413,7 +30413,7 @@ function WebGLState(v, t) {
|
|
|
30413
30413
|
texStorage2D: q0,
|
|
30414
30414
|
texStorage3D: Zi,
|
|
30415
30415
|
texSubImage2D: v0,
|
|
30416
|
-
texSubImage3D:
|
|
30416
|
+
texSubImage3D: K0,
|
|
30417
30417
|
compressedTexSubImage2D: R0,
|
|
30418
30418
|
compressedTexSubImage3D: Xi,
|
|
30419
30419
|
scissor: Ci,
|
|
@@ -30438,15 +30438,15 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30438
30438
|
}
|
|
30439
30439
|
function ht(r0, t0, m0) {
|
|
30440
30440
|
let v0 = 1;
|
|
30441
|
-
const
|
|
30442
|
-
if ((
|
|
30441
|
+
const K0 = B0(r0);
|
|
30442
|
+
if ((K0.width > m0 || K0.height > m0) && (v0 = m0 / Math.max(K0.width, K0.height)), v0 < 1)
|
|
30443
30443
|
if (typeof HTMLImageElement != "undefined" && r0 instanceof HTMLImageElement || typeof HTMLCanvasElement != "undefined" && r0 instanceof HTMLCanvasElement || typeof ImageBitmap != "undefined" && r0 instanceof ImageBitmap || typeof VideoFrame != "undefined" && r0 instanceof VideoFrame) {
|
|
30444
|
-
const R0 = Math.floor(v0 *
|
|
30444
|
+
const R0 = Math.floor(v0 * K0.width), Xi = Math.floor(v0 * K0.height);
|
|
30445
30445
|
Ne === void 0 && (Ne = Ue(R0, Xi));
|
|
30446
30446
|
const q0 = t0 ? Ue(R0, Xi) : Ne;
|
|
30447
|
-
return q0.width = R0, q0.height = Xi, q0.getContext("2d").drawImage(r0, 0, 0, R0, Xi), console.warn("THREE.WebGLRenderer: Texture has been resized from (" +
|
|
30447
|
+
return q0.width = R0, q0.height = Xi, q0.getContext("2d").drawImage(r0, 0, 0, R0, Xi), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + K0.width + "x" + K0.height + ") to (" + R0 + "x" + Xi + ")."), q0;
|
|
30448
30448
|
} else
|
|
30449
|
-
return "data" in r0 && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" +
|
|
30449
|
+
return "data" in r0 && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + K0.width + "x" + K0.height + ")."), r0;
|
|
30450
30450
|
return r0;
|
|
30451
30451
|
}
|
|
30452
30452
|
function at(r0) {
|
|
@@ -30458,14 +30458,14 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30458
30458
|
function ct(r0) {
|
|
30459
30459
|
return r0.isWebGLCubeRenderTarget ? v.TEXTURE_CUBE_MAP : r0.isWebGL3DRenderTarget ? v.TEXTURE_3D : r0.isWebGLArrayRenderTarget || r0.isCompressedArrayTexture ? v.TEXTURE_2D_ARRAY : v.TEXTURE_2D;
|
|
30460
30460
|
}
|
|
30461
|
-
function lt(r0, t0, m0, v0,
|
|
30461
|
+
function lt(r0, t0, m0, v0, K0 = !1) {
|
|
30462
30462
|
if (r0 !== null) {
|
|
30463
30463
|
if (v[r0] !== void 0) return v[r0];
|
|
30464
30464
|
console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + r0 + "'");
|
|
30465
30465
|
}
|
|
30466
30466
|
let R0 = t0;
|
|
30467
30467
|
if (t0 === v.RED && (m0 === v.FLOAT && (R0 = v.R32F), m0 === v.HALF_FLOAT && (R0 = v.R16F), m0 === v.UNSIGNED_BYTE && (R0 = v.R8)), t0 === v.RED_INTEGER && (m0 === v.UNSIGNED_BYTE && (R0 = v.R8UI), m0 === v.UNSIGNED_SHORT && (R0 = v.R16UI), m0 === v.UNSIGNED_INT && (R0 = v.R32UI), m0 === v.BYTE && (R0 = v.R8I), m0 === v.SHORT && (R0 = v.R16I), m0 === v.INT && (R0 = v.R32I)), t0 === v.RG && (m0 === v.FLOAT && (R0 = v.RG32F), m0 === v.HALF_FLOAT && (R0 = v.RG16F), m0 === v.UNSIGNED_BYTE && (R0 = v.RG8)), t0 === v.RG_INTEGER && (m0 === v.UNSIGNED_BYTE && (R0 = v.RG8UI), m0 === v.UNSIGNED_SHORT && (R0 = v.RG16UI), m0 === v.UNSIGNED_INT && (R0 = v.RG32UI), m0 === v.BYTE && (R0 = v.RG8I), m0 === v.SHORT && (R0 = v.RG16I), m0 === v.INT && (R0 = v.RG32I)), t0 === v.RGB_INTEGER && (m0 === v.UNSIGNED_BYTE && (R0 = v.RGB8UI), m0 === v.UNSIGNED_SHORT && (R0 = v.RGB16UI), m0 === v.UNSIGNED_INT && (R0 = v.RGB32UI), m0 === v.BYTE && (R0 = v.RGB8I), m0 === v.SHORT && (R0 = v.RGB16I), m0 === v.INT && (R0 = v.RGB32I)), t0 === v.RGBA_INTEGER && (m0 === v.UNSIGNED_BYTE && (R0 = v.RGBA8UI), m0 === v.UNSIGNED_SHORT && (R0 = v.RGBA16UI), m0 === v.UNSIGNED_INT && (R0 = v.RGBA32UI), m0 === v.BYTE && (R0 = v.RGBA8I), m0 === v.SHORT && (R0 = v.RGBA16I), m0 === v.INT && (R0 = v.RGBA32I)), t0 === v.RGB && m0 === v.UNSIGNED_INT_5_9_9_9_REV && (R0 = v.RGB9_E5), t0 === v.RGBA) {
|
|
30468
|
-
const Xi =
|
|
30468
|
+
const Xi = K0 ? LinearTransfer : ColorManagement.getTransfer(v0);
|
|
30469
30469
|
m0 === v.FLOAT && (R0 = v.RGBA32F), m0 === v.HALF_FLOAT && (R0 = v.RGBA16F), m0 === v.UNSIGNED_BYTE && (R0 = Xi === SRGBTransfer ? v.SRGB8_ALPHA8 : v.RGBA8), m0 === v.UNSIGNED_SHORT_4_4_4_4 && (R0 = v.RGBA4), m0 === v.UNSIGNED_SHORT_5_5_5_1 && (R0 = v.RGB5_A1);
|
|
30470
30470
|
}
|
|
30471
30471
|
return (R0 === v.R16F || R0 === v.R32F || R0 === v.RG16F || R0 === v.RG32F || R0 === v.RGBA16F || R0 === v.RGBA32F) && t.get("EXT_color_buffer_float"), R0;
|
|
@@ -30490,8 +30490,8 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30490
30490
|
if (t0.__webglInit === void 0) return;
|
|
30491
30491
|
const m0 = r0.source, v0 = Fe.get(m0);
|
|
30492
30492
|
if (v0) {
|
|
30493
|
-
const
|
|
30494
|
-
|
|
30493
|
+
const K0 = v0[t0.__cacheKey];
|
|
30494
|
+
K0.usedTimes--, K0.usedTimes === 0 && wt(r0), Object.keys(v0).length === 0 && Fe.delete(m0);
|
|
30495
30495
|
}
|
|
30496
30496
|
m.remove(r0);
|
|
30497
30497
|
}
|
|
@@ -30506,7 +30506,7 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30506
30506
|
if (r0.depthTexture && (r0.depthTexture.dispose(), m.remove(r0.depthTexture)), r0.isWebGLCubeRenderTarget)
|
|
30507
30507
|
for (let v0 = 0; v0 < 6; v0++) {
|
|
30508
30508
|
if (Array.isArray(t0.__webglFramebuffer[v0]))
|
|
30509
|
-
for (let
|
|
30509
|
+
for (let K0 = 0; K0 < t0.__webglFramebuffer[v0].length; K0++) v.deleteFramebuffer(t0.__webglFramebuffer[v0][K0]);
|
|
30510
30510
|
else
|
|
30511
30511
|
v.deleteFramebuffer(t0.__webglFramebuffer[v0]);
|
|
30512
30512
|
t0.__webglDepthbuffer && v.deleteRenderbuffer(t0.__webglDepthbuffer[v0]);
|
|
@@ -30522,7 +30522,7 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30522
30522
|
t0.__webglDepthRenderbuffer && v.deleteRenderbuffer(t0.__webglDepthRenderbuffer);
|
|
30523
30523
|
}
|
|
30524
30524
|
const m0 = r0.textures;
|
|
30525
|
-
for (let v0 = 0,
|
|
30525
|
+
for (let v0 = 0, K0 = m0.length; v0 < K0; v0++) {
|
|
30526
30526
|
const R0 = m.get(m0[v0]);
|
|
30527
30527
|
R0.__webglTexture && (v.deleteTexture(R0.__webglTexture), I.memory.textures--), m.remove(m0[v0]);
|
|
30528
30528
|
}
|
|
@@ -30613,16 +30613,16 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30613
30613
|
let m0 = !1;
|
|
30614
30614
|
r0.__webglInit === void 0 && (r0.__webglInit = !0, t0.addEventListener("dispose", Lt));
|
|
30615
30615
|
const v0 = t0.source;
|
|
30616
|
-
let
|
|
30617
|
-
|
|
30616
|
+
let K0 = Fe.get(v0);
|
|
30617
|
+
K0 === void 0 && (K0 = {}, Fe.set(v0, K0));
|
|
30618
30618
|
const R0 = s0(t0);
|
|
30619
30619
|
if (R0 !== r0.__cacheKey) {
|
|
30620
|
-
|
|
30620
|
+
K0[R0] === void 0 && (K0[R0] = {
|
|
30621
30621
|
texture: v.createTexture(),
|
|
30622
30622
|
usedTimes: 0
|
|
30623
|
-
}, I.memory.textures++, m0 = !0),
|
|
30624
|
-
const Xi =
|
|
30625
|
-
Xi !== void 0 && (
|
|
30623
|
+
}, I.memory.textures++, m0 = !0), K0[R0].usedTimes++;
|
|
30624
|
+
const Xi = K0[r0.__cacheKey];
|
|
30625
|
+
Xi !== void 0 && (K0[r0.__cacheKey].usedTimes--, Xi.usedTimes === 0 && wt(t0)), r0.__cacheKey = R0, r0.__webglTexture = K0[R0].texture;
|
|
30626
30626
|
}
|
|
30627
30627
|
return m0;
|
|
30628
30628
|
}
|
|
@@ -30656,10 +30656,10 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30656
30656
|
function _0(r0, t0, m0) {
|
|
30657
30657
|
let v0 = v.TEXTURE_2D;
|
|
30658
30658
|
(t0.isDataArrayTexture || t0.isCompressedArrayTexture) && (v0 = v.TEXTURE_2D_ARRAY), t0.isData3DTexture && (v0 = v.TEXTURE_3D);
|
|
30659
|
-
const
|
|
30659
|
+
const K0 = j0(r0, t0), R0 = t0.source;
|
|
30660
30660
|
r.bindTexture(v0, r0.__webglTexture, v.TEXTURE0 + m0);
|
|
30661
30661
|
const Xi = m.get(R0);
|
|
30662
|
-
if (R0.version !== Xi.__version ||
|
|
30662
|
+
if (R0.version !== Xi.__version || K0 === !0) {
|
|
30663
30663
|
r.activeTexture(v.TEXTURE0 + m0);
|
|
30664
30664
|
const q0 = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), Zi = t0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(t0.colorSpace), Pi = t0.colorSpace === NoColorSpace || q0 === Zi ? v.NONE : v.BROWSER_DEFAULT_WEBGL;
|
|
30665
30665
|
v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL, t0.flipY), v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t0.premultiplyAlpha), v.pixelStorei(v.UNPACK_ALIGNMENT, t0.unpackAlignment), v.pixelStorei(v.UNPACK_COLORSPACE_CONVERSION_WEBGL, Pi);
|
|
@@ -30669,7 +30669,7 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30669
30669
|
let Ii = lt(t0.internalFormat, Ci, Ei, t0.colorSpace, t0.isVideoTexture);
|
|
30670
30670
|
T0(v0, t0);
|
|
30671
30671
|
let Li;
|
|
30672
|
-
const Ni = t0.mipmaps, f0 = t0.isVideoTexture !== !0, xi = Xi.__version === void 0 ||
|
|
30672
|
+
const Ni = t0.mipmaps, f0 = t0.isVideoTexture !== !0, xi = Xi.__version === void 0 || K0 === !0, w0 = R0.dataReady, Wi = xt(t0, gi);
|
|
30673
30673
|
if (t0.isDepthTexture)
|
|
30674
30674
|
Ii = dt(t0.format === DepthStencilFormat, t0.type), xi && (f0 ? r.texStorage2D(v.TEXTURE_2D, 1, Ii, gi.width, gi.height) : r.texImage2D(v.TEXTURE_2D, 0, Ii, gi.width, gi.height, 0, Ci, Ei, null));
|
|
30675
30675
|
else if (t0.isDataTexture)
|
|
@@ -30761,17 +30761,17 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30761
30761
|
}
|
|
30762
30762
|
function k0(r0, t0, m0) {
|
|
30763
30763
|
if (t0.image.length !== 6) return;
|
|
30764
|
-
const v0 = j0(r0, t0),
|
|
30764
|
+
const v0 = j0(r0, t0), K0 = t0.source;
|
|
30765
30765
|
r.bindTexture(v.TEXTURE_CUBE_MAP, r0.__webglTexture, v.TEXTURE0 + m0);
|
|
30766
|
-
const R0 = m.get(
|
|
30767
|
-
if (
|
|
30766
|
+
const R0 = m.get(K0);
|
|
30767
|
+
if (K0.version !== R0.__version || v0 === !0) {
|
|
30768
30768
|
r.activeTexture(v.TEXTURE0 + m0);
|
|
30769
30769
|
const Xi = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), q0 = t0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(t0.colorSpace), Zi = t0.colorSpace === NoColorSpace || Xi === q0 ? v.NONE : v.BROWSER_DEFAULT_WEBGL;
|
|
30770
30770
|
v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL, t0.flipY), v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t0.premultiplyAlpha), v.pixelStorei(v.UNPACK_ALIGNMENT, t0.unpackAlignment), v.pixelStorei(v.UNPACK_COLORSPACE_CONVERSION_WEBGL, Zi);
|
|
30771
30771
|
const Pi = t0.isCompressedTexture || t0.image[0].isCompressedTexture, gi = t0.image[0] && t0.image[0].isDataTexture, Ci = [];
|
|
30772
30772
|
for (let J0 = 0; J0 < 6; J0++)
|
|
30773
30773
|
!Pi && !gi ? Ci[J0] = ht(t0.image[J0], !0, C.maxCubemapSize) : Ci[J0] = gi ? t0.image[J0].image : t0.image[J0], Ci[J0] = A0(t0, Ci[J0]);
|
|
30774
|
-
const Ei = Ci[0], Ii = _.convert(t0.format, t0.colorSpace), Li = _.convert(t0.type), Ni = lt(t0.internalFormat, Ii, Li, t0.colorSpace), f0 = t0.isVideoTexture !== !0, xi = R0.__version === void 0 || v0 === !0, w0 =
|
|
30774
|
+
const Ei = Ci[0], Ii = _.convert(t0.format, t0.colorSpace), Li = _.convert(t0.type), Ni = lt(t0.internalFormat, Ii, Li, t0.colorSpace), f0 = t0.isVideoTexture !== !0, xi = R0.__version === void 0 || v0 === !0, w0 = K0.dataReady;
|
|
30775
30775
|
let Wi = xt(t0, Ei);
|
|
30776
30776
|
T0(v.TEXTURE_CUBE_MAP, t0);
|
|
30777
30777
|
let Mi;
|
|
@@ -30805,26 +30805,26 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30805
30805
|
}
|
|
30806
30806
|
}
|
|
30807
30807
|
}
|
|
30808
|
-
at(t0) && Ae(v.TEXTURE_CUBE_MAP), R0.__version =
|
|
30808
|
+
at(t0) && Ae(v.TEXTURE_CUBE_MAP), R0.__version = K0.version, t0.onUpdate && t0.onUpdate(t0);
|
|
30809
30809
|
}
|
|
30810
30810
|
r0.__version = t0.version;
|
|
30811
30811
|
}
|
|
30812
|
-
function bi(r0, t0, m0, v0,
|
|
30812
|
+
function bi(r0, t0, m0, v0, K0, R0) {
|
|
30813
30813
|
const Xi = _.convert(m0.format, m0.colorSpace), q0 = _.convert(m0.type), Zi = lt(m0.internalFormat, Xi, q0, m0.colorSpace), Pi = m.get(t0), gi = m.get(m0);
|
|
30814
30814
|
if (gi.__renderTarget = t0, !Pi.__hasExternalTextures) {
|
|
30815
30815
|
const Ci = Math.max(1, t0.width >> R0), Ei = Math.max(1, t0.height >> R0);
|
|
30816
|
-
|
|
30816
|
+
K0 === v.TEXTURE_3D || K0 === v.TEXTURE_2D_ARRAY ? r.texImage3D(K0, R0, Zi, Ci, Ei, t0.depth, 0, Xi, q0, null) : r.texImage2D(K0, R0, Zi, Ci, Ei, 0, Xi, q0, null);
|
|
30817
30817
|
}
|
|
30818
|
-
r.bindFramebuffer(v.FRAMEBUFFER, r0), S0(t0) ? O.framebufferTexture2DMultisampleEXT(v.FRAMEBUFFER, v0,
|
|
30818
|
+
r.bindFramebuffer(v.FRAMEBUFFER, r0), S0(t0) ? O.framebufferTexture2DMultisampleEXT(v.FRAMEBUFFER, v0, K0, gi.__webglTexture, 0, Q0(t0)) : (K0 === v.TEXTURE_2D || K0 >= v.TEXTURE_CUBE_MAP_POSITIVE_X && K0 <= v.TEXTURE_CUBE_MAP_NEGATIVE_Z) && v.framebufferTexture2D(v.FRAMEBUFFER, v0, K0, gi.__webglTexture, R0), r.bindFramebuffer(v.FRAMEBUFFER, null);
|
|
30819
30819
|
}
|
|
30820
30820
|
function yi(r0, t0, m0) {
|
|
30821
30821
|
if (v.bindRenderbuffer(v.RENDERBUFFER, r0), t0.depthBuffer) {
|
|
30822
|
-
const v0 = t0.depthTexture,
|
|
30822
|
+
const v0 = t0.depthTexture, K0 = v0 && v0.isDepthTexture ? v0.type : null, R0 = dt(t0.stencilBuffer, K0), Xi = t0.stencilBuffer ? v.DEPTH_STENCIL_ATTACHMENT : v.DEPTH_ATTACHMENT, q0 = Q0(t0);
|
|
30823
30823
|
S0(t0) ? O.renderbufferStorageMultisampleEXT(v.RENDERBUFFER, q0, R0, t0.width, t0.height) : m0 ? v.renderbufferStorageMultisample(v.RENDERBUFFER, q0, R0, t0.width, t0.height) : v.renderbufferStorage(v.RENDERBUFFER, R0, t0.width, t0.height), v.framebufferRenderbuffer(v.FRAMEBUFFER, Xi, v.RENDERBUFFER, r0);
|
|
30824
30824
|
} else {
|
|
30825
30825
|
const v0 = t0.textures;
|
|
30826
|
-
for (let
|
|
30827
|
-
const R0 = v0[
|
|
30826
|
+
for (let K0 = 0; K0 < v0.length; K0++) {
|
|
30827
|
+
const R0 = v0[K0], Xi = _.convert(R0.format, R0.colorSpace), q0 = _.convert(R0.type), Zi = lt(R0.internalFormat, Xi, q0, R0.colorSpace), Pi = Q0(t0);
|
|
30828
30828
|
m0 && S0(t0) === !1 ? v.renderbufferStorageMultisample(v.RENDERBUFFER, Pi, Zi, t0.width, t0.height) : S0(t0) ? O.renderbufferStorageMultisampleEXT(v.RENDERBUFFER, Pi, Zi, t0.width, t0.height) : v.renderbufferStorage(v.RENDERBUFFER, Zi, t0.width, t0.height);
|
|
30829
30829
|
}
|
|
30830
30830
|
}
|
|
@@ -30836,11 +30836,11 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30836
30836
|
throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
|
|
30837
30837
|
const v0 = m.get(t0.depthTexture);
|
|
30838
30838
|
v0.__renderTarget = t0, (!v0.__webglTexture || t0.depthTexture.image.width !== t0.width || t0.depthTexture.image.height !== t0.height) && (t0.depthTexture.image.width = t0.width, t0.depthTexture.image.height = t0.height, t0.depthTexture.needsUpdate = !0), qt(t0.depthTexture, 0);
|
|
30839
|
-
const
|
|
30839
|
+
const K0 = v0.__webglTexture, R0 = Q0(t0);
|
|
30840
30840
|
if (t0.depthTexture.format === DepthFormat)
|
|
30841
|
-
S0(t0) ? O.framebufferTexture2DMultisampleEXT(v.FRAMEBUFFER, v.DEPTH_ATTACHMENT, v.TEXTURE_2D,
|
|
30841
|
+
S0(t0) ? O.framebufferTexture2DMultisampleEXT(v.FRAMEBUFFER, v.DEPTH_ATTACHMENT, v.TEXTURE_2D, K0, 0, R0) : v.framebufferTexture2D(v.FRAMEBUFFER, v.DEPTH_ATTACHMENT, v.TEXTURE_2D, K0, 0);
|
|
30842
30842
|
else if (t0.depthTexture.format === DepthStencilFormat)
|
|
30843
|
-
S0(t0) ? O.framebufferTexture2DMultisampleEXT(v.FRAMEBUFFER, v.DEPTH_STENCIL_ATTACHMENT, v.TEXTURE_2D,
|
|
30843
|
+
S0(t0) ? O.framebufferTexture2DMultisampleEXT(v.FRAMEBUFFER, v.DEPTH_STENCIL_ATTACHMENT, v.TEXTURE_2D, K0, 0, R0) : v.framebufferTexture2D(v.FRAMEBUFFER, v.DEPTH_STENCIL_ATTACHMENT, v.TEXTURE_2D, K0, 0);
|
|
30844
30844
|
else
|
|
30845
30845
|
throw new Error("Unknown depthTexture format");
|
|
30846
30846
|
}
|
|
@@ -30849,10 +30849,10 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30849
30849
|
if (t0.__boundDepthTexture !== r0.depthTexture) {
|
|
30850
30850
|
const v0 = r0.depthTexture;
|
|
30851
30851
|
if (t0.__depthDisposeCallback && t0.__depthDisposeCallback(), v0) {
|
|
30852
|
-
const
|
|
30853
|
-
delete t0.__boundDepthTexture, delete t0.__depthDisposeCallback, v0.removeEventListener("dispose",
|
|
30852
|
+
const K0 = () => {
|
|
30853
|
+
delete t0.__boundDepthTexture, delete t0.__depthDisposeCallback, v0.removeEventListener("dispose", K0);
|
|
30854
30854
|
};
|
|
30855
|
-
v0.addEventListener("dispose",
|
|
30855
|
+
v0.addEventListener("dispose", K0), t0.__depthDisposeCallback = K0;
|
|
30856
30856
|
}
|
|
30857
30857
|
t0.__boundDepthTexture = v0;
|
|
30858
30858
|
}
|
|
@@ -30866,16 +30866,16 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30866
30866
|
if (r.bindFramebuffer(v.FRAMEBUFFER, t0.__webglFramebuffer[v0]), t0.__webglDepthbuffer[v0] === void 0)
|
|
30867
30867
|
t0.__webglDepthbuffer[v0] = v.createRenderbuffer(), yi(t0.__webglDepthbuffer[v0], r0, !1);
|
|
30868
30868
|
else {
|
|
30869
|
-
const
|
|
30870
|
-
v.bindRenderbuffer(v.RENDERBUFFER, R0), v.framebufferRenderbuffer(v.FRAMEBUFFER,
|
|
30869
|
+
const K0 = r0.stencilBuffer ? v.DEPTH_STENCIL_ATTACHMENT : v.DEPTH_ATTACHMENT, R0 = t0.__webglDepthbuffer[v0];
|
|
30870
|
+
v.bindRenderbuffer(v.RENDERBUFFER, R0), v.framebufferRenderbuffer(v.FRAMEBUFFER, K0, v.RENDERBUFFER, R0);
|
|
30871
30871
|
}
|
|
30872
30872
|
} else {
|
|
30873
30873
|
const v0 = r0.texture.mipmaps;
|
|
30874
30874
|
if (v0 && v0.length > 0 ? r.bindFramebuffer(v.FRAMEBUFFER, t0.__webglFramebuffer[0]) : r.bindFramebuffer(v.FRAMEBUFFER, t0.__webglFramebuffer), t0.__webglDepthbuffer === void 0)
|
|
30875
30875
|
t0.__webglDepthbuffer = v.createRenderbuffer(), yi(t0.__webglDepthbuffer, r0, !1);
|
|
30876
30876
|
else {
|
|
30877
|
-
const
|
|
30878
|
-
v.bindRenderbuffer(v.RENDERBUFFER, R0), v.framebufferRenderbuffer(v.FRAMEBUFFER,
|
|
30877
|
+
const K0 = r0.stencilBuffer ? v.DEPTH_STENCIL_ATTACHMENT : v.DEPTH_ATTACHMENT, R0 = t0.__webglDepthbuffer;
|
|
30878
|
+
v.bindRenderbuffer(v.RENDERBUFFER, R0), v.framebufferRenderbuffer(v.FRAMEBUFFER, K0, v.RENDERBUFFER, R0);
|
|
30879
30879
|
}
|
|
30880
30880
|
}
|
|
30881
30881
|
r.bindFramebuffer(v.FRAMEBUFFER, null);
|
|
@@ -30887,7 +30887,7 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30887
30887
|
function a0(r0) {
|
|
30888
30888
|
const t0 = r0.texture, m0 = m.get(r0), v0 = m.get(t0);
|
|
30889
30889
|
r0.addEventListener("dispose", Xt);
|
|
30890
|
-
const
|
|
30890
|
+
const K0 = r0.textures, R0 = r0.isWebGLCubeRenderTarget === !0, Xi = K0.length > 1;
|
|
30891
30891
|
if (Xi || (v0.__webglTexture === void 0 && (v0.__webglTexture = v.createTexture()), v0.__version = t0.version, I.memory.textures++), R0) {
|
|
30892
30892
|
m0.__webglFramebuffer = [];
|
|
30893
30893
|
for (let q0 = 0; q0 < 6; q0++)
|
|
@@ -30905,14 +30905,14 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30905
30905
|
} else
|
|
30906
30906
|
m0.__webglFramebuffer = v.createFramebuffer();
|
|
30907
30907
|
if (Xi)
|
|
30908
|
-
for (let q0 = 0, Zi =
|
|
30909
|
-
const Pi = m.get(
|
|
30908
|
+
for (let q0 = 0, Zi = K0.length; q0 < Zi; q0++) {
|
|
30909
|
+
const Pi = m.get(K0[q0]);
|
|
30910
30910
|
Pi.__webglTexture === void 0 && (Pi.__webglTexture = v.createTexture(), I.memory.textures++);
|
|
30911
30911
|
}
|
|
30912
30912
|
if (r0.samples > 0 && S0(r0) === !1) {
|
|
30913
30913
|
m0.__webglMultisampledFramebuffer = v.createFramebuffer(), m0.__webglColorRenderbuffer = [], r.bindFramebuffer(v.FRAMEBUFFER, m0.__webglMultisampledFramebuffer);
|
|
30914
|
-
for (let q0 = 0; q0 <
|
|
30915
|
-
const Zi =
|
|
30914
|
+
for (let q0 = 0; q0 < K0.length; q0++) {
|
|
30915
|
+
const Zi = K0[q0];
|
|
30916
30916
|
m0.__webglColorRenderbuffer[q0] = v.createRenderbuffer(), v.bindRenderbuffer(v.RENDERBUFFER, m0.__webglColorRenderbuffer[q0]);
|
|
30917
30917
|
const Pi = _.convert(Zi.format, Zi.colorSpace), gi = _.convert(Zi.type), Ci = lt(Zi.internalFormat, Pi, gi, Zi.colorSpace, r0.isXRRenderTarget === !0), Ei = Q0(r0);
|
|
30918
30918
|
v.renderbufferStorageMultisample(v.RENDERBUFFER, Ei, Ci, r0.width, r0.height), v.framebufferRenderbuffer(v.FRAMEBUFFER, v.COLOR_ATTACHMENT0 + q0, v.RENDERBUFFER, m0.__webglColorRenderbuffer[q0]);
|
|
@@ -30930,8 +30930,8 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30930
30930
|
bi(m0.__webglFramebuffer[q0], r0, t0, v.COLOR_ATTACHMENT0, v.TEXTURE_CUBE_MAP_POSITIVE_X + q0, 0);
|
|
30931
30931
|
at(t0) && Ae(v.TEXTURE_CUBE_MAP), r.unbindTexture();
|
|
30932
30932
|
} else if (Xi) {
|
|
30933
|
-
for (let q0 = 0, Zi =
|
|
30934
|
-
const Pi =
|
|
30933
|
+
for (let q0 = 0, Zi = K0.length; q0 < Zi; q0++) {
|
|
30934
|
+
const Pi = K0[q0], gi = m.get(Pi);
|
|
30935
30935
|
let Ci = v.TEXTURE_2D;
|
|
30936
30936
|
(r0.isWebGL3DRenderTarget || r0.isWebGLArrayRenderTarget) && (Ci = r0.isWebGL3DRenderTarget ? v.TEXTURE_3D : v.TEXTURE_2D_ARRAY), r.bindTexture(Ci, gi.__webglTexture), T0(Ci, Pi), bi(m0.__webglFramebuffer, r0, Pi, v.COLOR_ATTACHMENT0 + q0, Ci, 0), at(Pi) && Ae(Ci);
|
|
30937
30937
|
}
|
|
@@ -30950,9 +30950,9 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30950
30950
|
function P0(r0) {
|
|
30951
30951
|
const t0 = r0.textures;
|
|
30952
30952
|
for (let m0 = 0, v0 = t0.length; m0 < v0; m0++) {
|
|
30953
|
-
const
|
|
30954
|
-
if (at(
|
|
30955
|
-
const R0 = ct(r0), Xi = m.get(
|
|
30953
|
+
const K0 = t0[m0];
|
|
30954
|
+
if (at(K0)) {
|
|
30955
|
+
const R0 = ct(r0), Xi = m.get(K0).__webglTexture;
|
|
30956
30956
|
r.bindTexture(R0, Xi), Ae(R0), r.unbindTexture();
|
|
30957
30957
|
}
|
|
30958
30958
|
}
|
|
@@ -30962,7 +30962,7 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30962
30962
|
if (r0.samples > 0) {
|
|
30963
30963
|
if (S0(r0) === !1) {
|
|
30964
30964
|
const t0 = r0.textures, m0 = r0.width, v0 = r0.height;
|
|
30965
|
-
let
|
|
30965
|
+
let K0 = v.COLOR_BUFFER_BIT;
|
|
30966
30966
|
const R0 = r0.stencilBuffer ? v.DEPTH_STENCIL_ATTACHMENT : v.DEPTH_ATTACHMENT, Xi = m.get(r0), q0 = t0.length > 1;
|
|
30967
30967
|
if (q0)
|
|
30968
30968
|
for (let Pi = 0; Pi < t0.length; Pi++)
|
|
@@ -30971,12 +30971,12 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
30971
30971
|
const Zi = r0.texture.mipmaps;
|
|
30972
30972
|
Zi && Zi.length > 0 ? r.bindFramebuffer(v.DRAW_FRAMEBUFFER, Xi.__webglFramebuffer[0]) : r.bindFramebuffer(v.DRAW_FRAMEBUFFER, Xi.__webglFramebuffer);
|
|
30973
30973
|
for (let Pi = 0; Pi < t0.length; Pi++) {
|
|
30974
|
-
if (r0.resolveDepthBuffer && (r0.depthBuffer && (
|
|
30974
|
+
if (r0.resolveDepthBuffer && (r0.depthBuffer && (K0 |= v.DEPTH_BUFFER_BIT), r0.stencilBuffer && r0.resolveStencilBuffer && (K0 |= v.STENCIL_BUFFER_BIT)), q0) {
|
|
30975
30975
|
v.framebufferRenderbuffer(v.READ_FRAMEBUFFER, v.COLOR_ATTACHMENT0, v.RENDERBUFFER, Xi.__webglColorRenderbuffer[Pi]);
|
|
30976
30976
|
const gi = m.get(t0[Pi]).__webglTexture;
|
|
30977
30977
|
v.framebufferTexture2D(v.DRAW_FRAMEBUFFER, v.COLOR_ATTACHMENT0, v.TEXTURE_2D, gi, 0);
|
|
30978
30978
|
}
|
|
30979
|
-
v.blitFramebuffer(0, 0, m0, v0, 0, 0, m0, v0,
|
|
30979
|
+
v.blitFramebuffer(0, 0, m0, v0, 0, 0, m0, v0, K0, v.NEAREST), ve === !0 && (E0.length = 0, O0.length = 0, E0.push(v.COLOR_ATTACHMENT0 + Pi), r0.depthBuffer && r0.resolveDepthBuffer === !1 && (E0.push(R0), O0.push(R0), v.invalidateFramebuffer(v.DRAW_FRAMEBUFFER, O0)), v.invalidateFramebuffer(v.READ_FRAMEBUFFER, E0));
|
|
30980
30980
|
}
|
|
30981
30981
|
if (r.bindFramebuffer(v.READ_FRAMEBUFFER, null), r.bindFramebuffer(v.DRAW_FRAMEBUFFER, null), q0)
|
|
30982
30982
|
for (let Pi = 0; Pi < t0.length; Pi++) {
|
|
@@ -31003,8 +31003,8 @@ function WebGLTextures(v, t, r, m, C, _, I) {
|
|
|
31003
31003
|
Pe.get(r0) !== t0 && (Pe.set(r0, t0), r0.update());
|
|
31004
31004
|
}
|
|
31005
31005
|
function A0(r0, t0) {
|
|
31006
|
-
const m0 = r0.colorSpace, v0 = r0.format,
|
|
31007
|
-
return r0.isCompressedTexture === !0 || r0.isVideoTexture === !0 || m0 !== LinearSRGBColorSpace && m0 !== NoColorSpace && (ColorManagement.getTransfer(m0) === SRGBTransfer ? (v0 !== RGBAFormat ||
|
|
31006
|
+
const m0 = r0.colorSpace, v0 = r0.format, K0 = r0.type;
|
|
31007
|
+
return r0.isCompressedTexture === !0 || r0.isVideoTexture === !0 || m0 !== LinearSRGBColorSpace && m0 !== NoColorSpace && (ColorManagement.getTransfer(m0) === SRGBTransfer ? (v0 !== RGBAFormat || K0 !== UnsignedByteType) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", m0)), t0;
|
|
31008
31008
|
}
|
|
31009
31009
|
function B0(r0) {
|
|
31010
31010
|
return typeof HTMLImageElement != "undefined" && r0 instanceof HTMLImageElement ? (Ce.width = r0.naturalWidth || r0.width, Ce.height = r0.naturalHeight || r0.height) : typeof VideoFrame != "undefined" && r0 instanceof VideoFrame ? (Ce.width = r0.displayWidth, Ce.height = r0.displayHeight) : (Ce.width = r0.width, Ce.height = r0.height), Ce;
|
|
@@ -31259,7 +31259,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
31259
31259
|
}, this.getSession = function() {
|
|
31260
31260
|
return C;
|
|
31261
31261
|
}, this.setSession = function(g0) {
|
|
31262
|
-
return
|
|
31262
|
+
return N0(this, null, function* () {
|
|
31263
31263
|
if (C = g0, C !== null) {
|
|
31264
31264
|
if (ct = t.getRenderTarget(), C.addEventListener("select", s0), C.addEventListener("selectstart", s0), C.addEventListener("selectend", s0), C.addEventListener("squeeze", s0), C.addEventListener("squeezestart", s0), C.addEventListener("squeezeend", s0), C.addEventListener("end", qt), C.addEventListener("inputsourceschange", kt), Ae.xrCompatible !== !0 && (yield r.makeXRCompatible()), Xt = t.getPixelRatio(), t.getSize(Lt), typeof XRWebGLBinding != "undefined" && (Ne = new XRWebGLBinding(C, r)), Ne !== null && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
31265
31265
|
let k0 = null, bi = null, yi = null;
|
|
@@ -31671,9 +31671,9 @@ class WebGLRenderer {
|
|
|
31671
31671
|
} catch (Wt) {
|
|
31672
31672
|
throw console.error("THREE.WebGLRenderer: " + Wt.message), Wt;
|
|
31673
31673
|
}
|
|
31674
|
-
let E0, O0, F0, Q0, S0, C0, A0, B0, r0, t0, m0, v0,
|
|
31674
|
+
let E0, O0, F0, Q0, S0, C0, A0, B0, r0, t0, m0, v0, K0, R0, Xi, q0, Zi, Pi, gi, Ci, Ei, Ii, Li, Ni;
|
|
31675
31675
|
function f0() {
|
|
31676
|
-
E0 = new WebGLExtensions(a0), E0.init(), Ii = new WebGLUtils(a0, E0), O0 = new WebGLCapabilities(a0, E0, t, Ii), F0 = new WebGLState(a0, E0), O0.reversedDepthBuffer && Fe && F0.buffers.depth.setReversed(!0), Q0 = new WebGLInfo(a0), S0 = new WebGLProperties(), C0 = new WebGLTextures(a0, E0, F0, S0, O0, Ii, Q0), A0 = new WebGLCubeMaps(dt), B0 = new WebGLCubeUVMaps(dt), r0 = new WebGLAttributes(a0), Li = new WebGLBindingStates(a0, r0), t0 = new WebGLGeometries(a0, r0, Q0, Li), m0 = new WebGLObjects(a0, t0, r0, Q0), gi = new WebGLMorphtargets(a0, O0, C0), q0 = new WebGLClipping(S0), v0 = new WebGLPrograms(dt, A0, B0, E0, O0, Li, q0),
|
|
31676
|
+
E0 = new WebGLExtensions(a0), E0.init(), Ii = new WebGLUtils(a0, E0), O0 = new WebGLCapabilities(a0, E0, t, Ii), F0 = new WebGLState(a0, E0), O0.reversedDepthBuffer && Fe && F0.buffers.depth.setReversed(!0), Q0 = new WebGLInfo(a0), S0 = new WebGLProperties(), C0 = new WebGLTextures(a0, E0, F0, S0, O0, Ii, Q0), A0 = new WebGLCubeMaps(dt), B0 = new WebGLCubeUVMaps(dt), r0 = new WebGLAttributes(a0), Li = new WebGLBindingStates(a0, r0), t0 = new WebGLGeometries(a0, r0, Q0, Li), m0 = new WebGLObjects(a0, t0, r0, Q0), gi = new WebGLMorphtargets(a0, O0, C0), q0 = new WebGLClipping(S0), v0 = new WebGLPrograms(dt, A0, B0, E0, O0, Li, q0), K0 = new WebGLMaterials(dt, S0), R0 = new WebGLRenderLists(), Xi = new WebGLRenderStates(E0), Pi = new WebGLBackground(dt, A0, B0, F0, m0, ke, ve), Zi = new WebGLShadowMap(dt, m0, O0), Ni = new WebGLUniformsGroups(a0, Q0, O0, F0), Ci = new WebGLBufferRenderer(a0, E0, Q0), Ei = new WebGLIndexedBufferRenderer(a0, E0, Q0), Q0.programs = v0.programs, dt.capabilities = O0, dt.extensions = E0, dt.properties = S0, dt.renderLists = R0, dt.shadowMap = Zi, dt.state = F0, dt.info = Q0;
|
|
31677
31677
|
}
|
|
31678
31678
|
f0();
|
|
31679
31679
|
const xi = new WebXRManager(dt, a0);
|
|
@@ -32033,7 +32033,7 @@ class WebGLRenderer {
|
|
|
32033
32033
|
}
|
|
32034
32034
|
h0.isBatchedMesh && (Hi.setOptional(a0, h0, "batchingTexture"), Hi.setValue(a0, "batchingTexture", h0._matricesTexture, C0), Hi.setOptional(a0, h0, "batchingIdTexture"), Hi.setValue(a0, "batchingIdTexture", h0._indirectTexture, C0), Hi.setOptional(a0, h0, "batchingColorTexture"), h0._colorsTexture !== null && Hi.setValue(a0, "batchingColorTexture", h0._colorsTexture, C0));
|
|
32035
32035
|
const Di = o0.morphAttributes;
|
|
32036
|
-
if ((Di.position !== void 0 || Di.normal !== void 0 || Di.color !== void 0) && gi.update(h0, o0, Oi), (Ji || Ri.receiveShadow !== h0.receiveShadow) && (Ri.receiveShadow = h0.receiveShadow, Hi.setValue(a0, "receiveShadow", h0.receiveShadow)), c0.isMeshGouraudMaterial && c0.envMap !== null && (Yi.envMap.value = M0, Yi.flipEnvMap.value = M0.isCubeTexture && M0.isRenderTargetTexture === !1 ? -1 : 1), c0.isMeshStandardMaterial && c0.envMap === null && n0.environment !== null && (Yi.envMapIntensity.value = n0.environmentIntensity), Ji && (Hi.setValue(a0, "toneMappingExposure", dt.toneMappingExposure), Ri.needsLights && Rn(Yi, qi), l0 && c0.fog === !0 &&
|
|
32036
|
+
if ((Di.position !== void 0 || Di.normal !== void 0 || Di.color !== void 0) && gi.update(h0, o0, Oi), (Ji || Ri.receiveShadow !== h0.receiveShadow) && (Ri.receiveShadow = h0.receiveShadow, Hi.setValue(a0, "receiveShadow", h0.receiveShadow)), c0.isMeshGouraudMaterial && c0.envMap !== null && (Yi.envMap.value = M0, Yi.flipEnvMap.value = M0.isCubeTexture && M0.isRenderTargetTexture === !1 ? -1 : 1), c0.isMeshStandardMaterial && c0.envMap === null && n0.environment !== null && (Yi.envMapIntensity.value = n0.environmentIntensity), Ji && (Hi.setValue(a0, "toneMappingExposure", dt.toneMappingExposure), Ri.needsLights && Rn(Yi, qi), l0 && c0.fog === !0 && K0.refreshFogUniforms(Yi, l0), K0.refreshMaterialUniforms(Yi, c0, Kt, Yt, Ae.state.transmissionRenderTarget[Wt.id]), WebGLUniforms.upload(a0, Cn(Ri), Yi, C0)), c0.isShaderMaterial && c0.uniformsNeedUpdate === !0 && (WebGLUniforms.upload(a0, Cn(Ri), Yi, C0), c0.uniformsNeedUpdate = !1), c0.isSpriteMaterial && Hi.setValue(a0, "center", h0.center), Hi.setValue(a0, "modelViewMatrix", h0.modelViewMatrix), Hi.setValue(a0, "normalMatrix", h0.normalMatrix), Hi.setValue(a0, "modelMatrix", h0.matrixWorld), c0.isShaderMaterial || c0.isRawShaderMaterial) {
|
|
32037
32037
|
const $i = c0.uniformsGroups;
|
|
32038
32038
|
for (let nn = 0, on = $i.length; nn < on; nn++) {
|
|
32039
32039
|
const cn = $i[nn];
|
|
@@ -32126,7 +32126,7 @@ class WebGLRenderer {
|
|
|
32126
32126
|
}
|
|
32127
32127
|
}
|
|
32128
32128
|
}, this.readRenderTargetPixelsAsync = function(Wt, n0, o0, c0, h0, l0, L0, G0 = 0) {
|
|
32129
|
-
return
|
|
32129
|
+
return N0(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 M0 = S0.get(Wt).__webglFramebuffer;
|
|
@@ -40824,13 +40824,13 @@ let K$1 = class In extends BufferGeometry {
|
|
|
40824
40824
|
const C0 = 10000000000000001e-36;
|
|
40825
40825
|
let A0 = S0[0];
|
|
40826
40826
|
for (let B0 = 1; B0 <= S0.length; B0++) {
|
|
40827
|
-
const r0 = B0 % S0.length, t0 = S0[r0], m0 = t0.x - A0.x, v0 = t0.y - A0.y,
|
|
40827
|
+
const r0 = B0 % S0.length, t0 = S0[r0], m0 = t0.x - A0.x, v0 = t0.y - A0.y, K0 = m0 * m0 + v0 * v0, R0 = Math.max(
|
|
40828
40828
|
Math.abs(t0.x),
|
|
40829
40829
|
Math.abs(t0.y),
|
|
40830
40830
|
Math.abs(A0.x),
|
|
40831
40831
|
Math.abs(A0.y)
|
|
40832
40832
|
), Xi = C0 * R0 * R0;
|
|
40833
|
-
if (
|
|
40833
|
+
if (K0 <= Xi) {
|
|
40834
40834
|
S0.splice(r0, 1), B0--;
|
|
40835
40835
|
continue;
|
|
40836
40836
|
}
|
|
@@ -40849,11 +40849,11 @@ let K$1 = class In extends BufferGeometry {
|
|
|
40849
40849
|
const T0 = kt.length;
|
|
40850
40850
|
function j0(S0, C0, A0) {
|
|
40851
40851
|
let B0, r0, t0;
|
|
40852
|
-
const m0 = S0.x - C0.x, v0 = S0.y - C0.y,
|
|
40852
|
+
const m0 = S0.x - C0.x, v0 = S0.y - C0.y, K0 = A0.x - S0.x, R0 = A0.y - S0.y, Xi = m0 * m0 + v0 * v0, q0 = m0 * R0 - v0 * K0;
|
|
40853
40853
|
if (Math.abs(q0) > Number.EPSILON) {
|
|
40854
40854
|
const Zi = Math.sqrt(Xi), Pi = Math.sqrt(
|
|
40855
|
-
|
|
40856
|
-
), gi = C0.x - v0 / Zi, Ci = C0.y + m0 / Zi, Ei = A0.x - R0 / Pi, Ii = A0.y +
|
|
40855
|
+
K0 * K0 + R0 * R0
|
|
40856
|
+
), gi = C0.x - v0 / Zi, Ci = C0.y + m0 / Zi, Ei = A0.x - R0 / Pi, Ii = A0.y + K0 / Pi, Li = ((Ei - gi) * R0 - (Ii - Ci) * K0) / (m0 * R0 - v0 * K0);
|
|
40857
40857
|
B0 = gi + m0 * Li - S0.x, r0 = Ci + v0 * Li - S0.y;
|
|
40858
40858
|
const Ni = B0 * B0 + r0 * r0;
|
|
40859
40859
|
if (Ni <= 2)
|
|
@@ -40861,7 +40861,7 @@ let K$1 = class In extends BufferGeometry {
|
|
|
40861
40861
|
t0 = Math.sqrt(Ni / 2);
|
|
40862
40862
|
} else {
|
|
40863
40863
|
let Zi = !1;
|
|
40864
|
-
m0 > Number.EPSILON ?
|
|
40864
|
+
m0 > Number.EPSILON ? K0 > Number.EPSILON && (Zi = !0) : m0 < -Number.EPSILON ? K0 < -Number.EPSILON && (Zi = !0) : Math.sign(v0) === Math.sign(R0) && (Zi = !0), Zi ? (B0 = -v0, r0 = m0, t0 = Math.sqrt(Xi)) : (B0 = m0, r0 = v0, t0 = Math.sqrt(Xi / 2));
|
|
40865
40865
|
}
|
|
40866
40866
|
return new Vector2(B0 / t0, r0 / t0);
|
|
40867
40867
|
}
|
|
@@ -40885,15 +40885,15 @@ let K$1 = class In extends BufferGeometry {
|
|
|
40885
40885
|
for (let A0 = 0; A0 < lt; A0++) {
|
|
40886
40886
|
const B0 = A0 / lt, r0 = at * Math.cos(B0 * Math.PI / 2), t0 = Ae * Math.sin(B0 * Math.PI / 2) + ct;
|
|
40887
40887
|
for (let m0 = 0, v0 = d0.length; m0 < v0; m0++) {
|
|
40888
|
-
const
|
|
40889
|
-
P0(
|
|
40888
|
+
const K0 = u0(d0[m0], H0[m0], t0);
|
|
40889
|
+
P0(K0.x, K0.y, -r0), B0 === 0 && S0.push(K0);
|
|
40890
40890
|
}
|
|
40891
40891
|
for (let m0 = 0, v0 = i0; m0 < v0; m0++) {
|
|
40892
|
-
const
|
|
40892
|
+
const K0 = Yt[m0];
|
|
40893
40893
|
_0 = g0[m0];
|
|
40894
40894
|
const R0 = [];
|
|
40895
|
-
for (let Xi = 0, q0 =
|
|
40896
|
-
const Zi = u0(
|
|
40895
|
+
for (let Xi = 0, q0 = K0.length; Xi < q0; Xi++) {
|
|
40896
|
+
const Zi = u0(K0[Xi], _0[Xi], t0);
|
|
40897
40897
|
P0(Zi.x, Zi.y, -r0), B0 === 0 && R0.push(Zi);
|
|
40898
40898
|
}
|
|
40899
40899
|
B0 === 0 && C0.push(R0);
|
|
@@ -40923,7 +40923,7 @@ let K$1 = class In extends BufferGeometry {
|
|
|
40923
40923
|
for (let r0 = 0, t0 = Yt.length; r0 < t0; r0++) {
|
|
40924
40924
|
const m0 = Yt[r0];
|
|
40925
40925
|
_0 = g0[r0];
|
|
40926
|
-
for (let v0 = 0,
|
|
40926
|
+
for (let v0 = 0, K0 = m0.length; v0 < K0; v0++) {
|
|
40927
40927
|
const R0 = u0(m0[v0], _0[v0], B0);
|
|
40928
40928
|
Vt ? P0(
|
|
40929
40929
|
R0.x,
|
|
@@ -40983,7 +40983,7 @@ let K$1 = class In extends BufferGeometry {
|
|
|
40983
40983
|
let r0 = A0 - 1;
|
|
40984
40984
|
r0 < 0 && (r0 = S0.length - 1);
|
|
40985
40985
|
for (let t0 = 0, m0 = ke + lt * 2; t0 < m0; t0++) {
|
|
40986
|
-
const v0 = T0 * t0,
|
|
40986
|
+
const v0 = T0 * t0, K0 = T0 * (t0 + 1), R0 = C0 + B0 + v0, Xi = C0 + r0 + v0, q0 = C0 + r0 + K0, Zi = C0 + B0 + K0;
|
|
40987
40987
|
O0(R0, Xi, q0, Zi);
|
|
40988
40988
|
}
|
|
40989
40989
|
}
|
|
@@ -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(t) {
|
|
41852
|
-
return
|
|
41852
|
+
return N0(this, null, function* () {
|
|
41853
41853
|
if (!t) {
|
|
41854
41854
|
console.error('Stats: The "canvas" parameter is undefined.');
|
|
41855
41855
|
return;
|
|
@@ -41866,7 +41866,7 @@ const _Stats = class gn {
|
|
|
41866
41866
|
return t.isWebGLRenderer && !this.threeRendererPatched ? (this.patchThreeRenderer(t), this.gl = t.getContext(), this.trackGPU && this.initializeGPUTracking(), !0) : !1;
|
|
41867
41867
|
}
|
|
41868
41868
|
handleWebGPURenderer(t) {
|
|
41869
|
-
return
|
|
41869
|
+
return N0(this, null, function* () {
|
|
41870
41870
|
return t.isWebGPURenderer ? ((this.trackGPU || this.trackCPT) && (t.backend.trackTimestamp = !0, (yield t.hasFeatureAsync("timestamp-query")) && this.initializeWebGPUPanels()), this.info = t.info, this.patchThreeWebGPU(t), !0) : !1;
|
|
41871
41871
|
});
|
|
41872
41872
|
}
|
|
@@ -42598,7 +42598,7 @@ class SimplexNoise {
|
|
|
42598
42598
|
noise4d(t, r, m, C) {
|
|
42599
42599
|
const _ = this.grad4, I = this.simplex, O = this.perm, ve = (Math.sqrt(5) - 1) / 4, Ce = (5 - Math.sqrt(5)) / 20;
|
|
42600
42600
|
let Pe, Ne, Fe, ke, Ue;
|
|
42601
|
-
const ht = (t + r + m + C) * ve, at = Math.floor(t + ht), Ae = Math.floor(r + ht), ct = Math.floor(m + ht), lt = Math.floor(C + ht), dt = (at + Ae + ct + lt) * Ce, xt = at - dt, Lt = Ae - dt, Xt = ct - dt, Zt = lt - dt, wt = t - xt, Vt = r - Lt, zt = m - Xt, $t = C - Zt, e0 = wt > Vt ? 32 : 0, s0 = wt > zt ? 16 : 0, qt = Vt > zt ? 8 : 0, kt = wt > $t ? 4 : 0, Yt = Vt > $t ? 2 : 0, Kt = zt > $t ? 1 : 0, i0 = e0 + s0 + qt + kt + Yt + Kt, d0 = I[i0][0] >= 3 ? 1 : 0, u0 = I[i0][1] >= 3 ? 1 : 0, T0 = I[i0][2] >= 3 ? 1 : 0, j0 = I[i0][3] >= 3 ? 1 : 0, H0 = I[i0][0] >= 2 ? 1 : 0, g0 = I[i0][1] >= 2 ? 1 : 0, _0 = I[i0][2] >= 2 ? 1 : 0, k0 = I[i0][3] >= 2 ? 1 : 0, bi = I[i0][0] >= 1 ? 1 : 0, yi = I[i0][1] >= 1 ? 1 : 0, vi = I[i0][2] >= 1 ? 1 : 0, Ki = I[i0][3] >= 1 ? 1 : 0, Vi = wt - d0 + Ce, a0 = Vt - u0 + Ce, P0 = zt - T0 + Ce, E0 = $t - j0 + Ce, O0 = wt - H0 + 2 * Ce, F0 = Vt - g0 + 2 * Ce, Q0 = zt - _0 + 2 * Ce, S0 = $t - k0 + 2 * Ce, C0 = wt - bi + 3 * Ce, A0 = Vt - yi + 3 * Ce, B0 = zt - vi + 3 * Ce, r0 = $t - Ki + 3 * Ce, t0 = wt - 1 + 4 * Ce, m0 = Vt - 1 + 4 * Ce, v0 = zt - 1 + 4 * Ce,
|
|
42601
|
+
const ht = (t + r + m + C) * ve, at = Math.floor(t + ht), Ae = Math.floor(r + ht), ct = Math.floor(m + ht), lt = Math.floor(C + ht), dt = (at + Ae + ct + lt) * Ce, xt = at - dt, Lt = Ae - dt, Xt = ct - dt, Zt = lt - dt, wt = t - xt, Vt = r - Lt, zt = m - Xt, $t = C - Zt, e0 = wt > Vt ? 32 : 0, s0 = wt > zt ? 16 : 0, qt = Vt > zt ? 8 : 0, kt = wt > $t ? 4 : 0, Yt = Vt > $t ? 2 : 0, Kt = zt > $t ? 1 : 0, i0 = e0 + s0 + qt + kt + Yt + Kt, d0 = I[i0][0] >= 3 ? 1 : 0, u0 = I[i0][1] >= 3 ? 1 : 0, T0 = I[i0][2] >= 3 ? 1 : 0, j0 = I[i0][3] >= 3 ? 1 : 0, H0 = I[i0][0] >= 2 ? 1 : 0, g0 = I[i0][1] >= 2 ? 1 : 0, _0 = I[i0][2] >= 2 ? 1 : 0, k0 = I[i0][3] >= 2 ? 1 : 0, bi = I[i0][0] >= 1 ? 1 : 0, yi = I[i0][1] >= 1 ? 1 : 0, vi = I[i0][2] >= 1 ? 1 : 0, Ki = I[i0][3] >= 1 ? 1 : 0, Vi = wt - d0 + Ce, a0 = Vt - u0 + Ce, P0 = zt - T0 + Ce, E0 = $t - j0 + Ce, O0 = wt - H0 + 2 * Ce, F0 = Vt - g0 + 2 * Ce, Q0 = zt - _0 + 2 * Ce, S0 = $t - k0 + 2 * Ce, C0 = wt - bi + 3 * Ce, A0 = Vt - yi + 3 * Ce, B0 = zt - vi + 3 * Ce, r0 = $t - Ki + 3 * Ce, t0 = wt - 1 + 4 * Ce, m0 = Vt - 1 + 4 * Ce, v0 = zt - 1 + 4 * Ce, K0 = $t - 1 + 4 * Ce, R0 = at & 255, Xi = Ae & 255, q0 = ct & 255, Zi = lt & 255, Pi = O[R0 + O[Xi + O[q0 + O[Zi]]]] % 32, gi = O[R0 + d0 + O[Xi + u0 + O[q0 + T0 + O[Zi + j0]]]] % 32, Ci = O[R0 + H0 + O[Xi + g0 + O[q0 + _0 + O[Zi + k0]]]] % 32, Ei = O[R0 + bi + O[Xi + yi + O[q0 + vi + O[Zi + Ki]]]] % 32, Ii = O[R0 + 1 + O[Xi + 1 + O[q0 + 1 + O[Zi + 1]]]] % 32;
|
|
42602
42602
|
let Li = 0.6 - wt * wt - Vt * Vt - zt * zt - $t * $t;
|
|
42603
42603
|
Li < 0 ? Pe = 0 : (Li *= Li, Pe = Li * Li * this._dot4(_[Pi], wt, Vt, zt, $t));
|
|
42604
42604
|
let Ni = 0.6 - Vi * Vi - a0 * a0 - P0 * P0 - E0 * E0;
|
|
@@ -42607,8 +42607,8 @@ class SimplexNoise {
|
|
|
42607
42607
|
f0 < 0 ? Fe = 0 : (f0 *= f0, Fe = f0 * f0 * this._dot4(_[Ci], O0, F0, Q0, S0));
|
|
42608
42608
|
let xi = 0.6 - C0 * C0 - A0 * A0 - B0 * B0 - r0 * r0;
|
|
42609
42609
|
xi < 0 ? ke = 0 : (xi *= xi, ke = xi * xi * this._dot4(_[Ei], C0, A0, B0, r0));
|
|
42610
|
-
let w0 = 0.6 - t0 * t0 - m0 * m0 - v0 * v0 -
|
|
42611
|
-
return w0 < 0 ? Ue = 0 : (w0 *= w0, Ue = w0 * w0 * this._dot4(_[Ii], t0, m0, v0,
|
|
42610
|
+
let w0 = 0.6 - t0 * t0 - m0 * m0 - v0 * v0 - K0 * K0;
|
|
42611
|
+
return w0 < 0 ? Ue = 0 : (w0 *= w0, Ue = w0 * w0 * this._dot4(_[Ii], t0, m0, v0, K0)), 27 * (Pe + Ne + Fe + ke + Ue);
|
|
42612
42612
|
}
|
|
42613
42613
|
// private
|
|
42614
42614
|
_dot(t, r, m) {
|
|
@@ -44413,7 +44413,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44413
44413
|
const Wt = Ft.array.slice(Ft.offset.value, Ft.offset.value + Ft.size), n0 = unzlibSync(Wt), o0 = new Uint8Array(n0.length);
|
|
44414
44414
|
return a0(n0), P0(n0, o0), new DataView(o0.buffer);
|
|
44415
44415
|
}
|
|
44416
|
-
function
|
|
44416
|
+
function K0(Ft) {
|
|
44417
44417
|
const Wt = Ft.viewer, n0 = { value: Ft.offset.value }, o0 = new Uint16Array(Ft.columns * Ft.lines * (Ft.inputChannels.length * Ft.type)), c0 = new Uint8Array(8192);
|
|
44418
44418
|
let h0 = 0;
|
|
44419
44419
|
const l0 = new Array(Ft.inputChannels.length);
|
|
@@ -44885,7 +44885,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
44885
44885
|
l0.blockHeight = 16, l0.uncompress = v0;
|
|
44886
44886
|
break;
|
|
44887
44887
|
case "PIZ_COMPRESSION":
|
|
44888
|
-
l0.blockHeight = 32, l0.uncompress =
|
|
44888
|
+
l0.blockHeight = 32, l0.uncompress = K0;
|
|
44889
44889
|
break;
|
|
44890
44890
|
case "PXR24_COMPRESSION":
|
|
44891
44891
|
l0.blockHeight = 16, l0.uncompress = R0;
|
|
@@ -49382,8 +49382,8 @@ if (typeof document != "undefined") {
|
|
|
49382
49382
|
var a0 = this.props;
|
|
49383
49383
|
if (Yt === 1 && Kt === 0 && i0 === 0 && d0 === 0 && u0 === 0 && T0 === 1 && j0 === 0 && H0 === 0 && g0 === 0 && _0 === 0 && k0 === 1 && bi === 0)
|
|
49384
49384
|
return a0[12] = a0[12] * Yt + a0[15] * yi, a0[13] = a0[13] * T0 + a0[15] * vi, a0[14] = a0[14] * k0 + a0[15] * Ki, a0[15] *= Vi, this._identityCalculated = !1, this;
|
|
49385
|
-
var P0 = a0[0], E0 = a0[1], O0 = a0[2], F0 = a0[3], Q0 = a0[4], S0 = a0[5], C0 = a0[6], A0 = a0[7], B0 = a0[8], r0 = a0[9], t0 = a0[10], m0 = a0[11], v0 = a0[12],
|
|
49386
|
-
return a0[0] = P0 * Yt + E0 * u0 + O0 * g0 + F0 * yi, a0[1] = P0 * Kt + E0 * T0 + O0 * _0 + F0 * vi, a0[2] = P0 * i0 + E0 * j0 + O0 * k0 + F0 * Ki, a0[3] = P0 * d0 + E0 * H0 + O0 * bi + F0 * Vi, a0[4] = Q0 * Yt + S0 * u0 + C0 * g0 + A0 * yi, a0[5] = Q0 * Kt + S0 * T0 + C0 * _0 + A0 * vi, a0[6] = Q0 * i0 + S0 * j0 + C0 * k0 + A0 * Ki, a0[7] = Q0 * d0 + S0 * H0 + C0 * bi + A0 * Vi, a0[8] = B0 * Yt + r0 * u0 + t0 * g0 + m0 * yi, a0[9] = B0 * Kt + r0 * T0 + t0 * _0 + m0 * vi, a0[10] = B0 * i0 + r0 * j0 + t0 * k0 + m0 * Ki, a0[11] = B0 * d0 + r0 * H0 + t0 * bi + m0 * Vi, a0[12] = v0 * Yt +
|
|
49385
|
+
var P0 = a0[0], E0 = a0[1], O0 = a0[2], F0 = a0[3], Q0 = a0[4], S0 = a0[5], C0 = a0[6], A0 = a0[7], B0 = a0[8], r0 = a0[9], t0 = a0[10], m0 = a0[11], v0 = a0[12], K0 = a0[13], R0 = a0[14], Xi = a0[15];
|
|
49386
|
+
return a0[0] = P0 * Yt + E0 * u0 + O0 * g0 + F0 * yi, a0[1] = P0 * Kt + E0 * T0 + O0 * _0 + F0 * vi, a0[2] = P0 * i0 + E0 * j0 + O0 * k0 + F0 * Ki, a0[3] = P0 * d0 + E0 * H0 + O0 * bi + F0 * Vi, a0[4] = Q0 * Yt + S0 * u0 + C0 * g0 + A0 * yi, a0[5] = Q0 * Kt + S0 * T0 + C0 * _0 + A0 * vi, a0[6] = Q0 * i0 + S0 * j0 + C0 * k0 + A0 * Ki, a0[7] = Q0 * d0 + S0 * H0 + C0 * bi + A0 * Vi, a0[8] = B0 * Yt + r0 * u0 + t0 * g0 + m0 * yi, a0[9] = B0 * Kt + r0 * T0 + t0 * _0 + m0 * vi, a0[10] = B0 * i0 + r0 * j0 + t0 * k0 + m0 * Ki, a0[11] = B0 * d0 + r0 * H0 + t0 * bi + m0 * Vi, a0[12] = v0 * Yt + K0 * u0 + R0 * g0 + Xi * yi, a0[13] = v0 * Kt + K0 * T0 + R0 * _0 + Xi * vi, a0[14] = v0 * i0 + K0 * j0 + R0 * k0 + Xi * Ki, a0[15] = v0 * d0 + K0 * H0 + R0 * bi + Xi * Vi, this._identityCalculated = !1, this;
|
|
49387
49387
|
}
|
|
49388
49388
|
function at() {
|
|
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;
|
|
@@ -51826,8 +51826,8 @@ if (typeof document != "undefined") {
|
|
|
51826
51826
|
if (v.strokeWidthAnim && (E0 = Vi < 0 ? 0 : Vi), v.strokeColorAnim && (O0 = "rgb(" + Math.round(Ki[0] * 255) + "," + Math.round(Ki[1] * 255) + "," + Math.round(Ki[2] * 255) + ")"), v.fillColorAnim && v.fc && (F0 = "rgb(" + Math.round(a0[0] * 255) + "," + Math.round(a0[1] * 255) + "," + Math.round(a0[2] * 255) + ")"), this._hasMaskedPath) {
|
|
51827
51827
|
if (_.translate(0, -v.ls), _.translate(0, r[1] * s0 * 0.01 + Ce, 0), this._pathData.p.v) {
|
|
51828
51828
|
Vt = (ht.point[1] - dt.point[1]) / (ht.point[0] - dt.point[0]);
|
|
51829
|
-
var
|
|
51830
|
-
ht.point[0] < dt.point[0] && (
|
|
51829
|
+
var K0 = Math.atan(Vt) * 180 / Math.PI;
|
|
51830
|
+
ht.point[0] < dt.point[0] && (K0 += 180), _.rotate(-K0 * Math.PI / 180);
|
|
51831
51831
|
}
|
|
51832
51832
|
_.translate(H0, g0, 0), Ue -= r[0] * Fe[Pe].an * 5e-3, Fe[Pe + 1] && T0 !== Fe[Pe + 1].ind && (Ue += Fe[Pe].an / 2, Ue += v.tr * 1e-3 * v.finalSize);
|
|
51833
51833
|
} else {
|
|
@@ -55895,7 +55895,15 @@ class Vs {
|
|
|
55895
55895
|
m.traverse((C) => {
|
|
55896
55896
|
var _;
|
|
55897
55897
|
const I = C, O = C, ve = C;
|
|
55898
|
-
(_ = I.material) != null && _.isShadowMaterial
|
|
55898
|
+
if ((_ = I.material) != null && _.isShadowMaterial)
|
|
55899
|
+
t.push(I);
|
|
55900
|
+
else if (I.material && this.bloomLayer.test(I.layers) === !1) {
|
|
55901
|
+
if (I.material.transparent === !0 && (I.material.opacity !== 1 || I.material.alphaMap)) {
|
|
55902
|
+
t.push(I);
|
|
55903
|
+
return;
|
|
55904
|
+
}
|
|
55905
|
+
this.bloomMaterials[I.uuid] = I.material, O.isSprite ? O.material.sizeAttenuation ? O.material = Fs : O.material = Ns : I.material instanceof _e$1 ? I.material = Hs : ve.isPoints ? ve.material.sizeAttenuation ? ve.material = ks : ve.material = zs : I.material = Us;
|
|
55906
|
+
}
|
|
55899
55907
|
});
|
|
55900
55908
|
}), t.forEach((m) => {
|
|
55901
55909
|
this.bloomVisible[m.uuid] = m.visible, m.visible = !1;
|
|
@@ -57150,8 +57158,8 @@ class li {
|
|
|
57150
57158
|
this.renderer.setViewport(C, _, I, O), ve && (this.renderer.setScissor(C, _, I, O), this.renderer.setScissorTest(Ce));
|
|
57151
57159
|
}
|
|
57152
57160
|
dispose() {
|
|
57153
|
-
var t, r;
|
|
57154
|
-
this.setSize(
|
|
57161
|
+
var t, r, m;
|
|
57162
|
+
this.setSize(0, 0), (t = this.renderer) == null || t.clear(), (r = this.renderer) == null || r.dispose(), (m = this.renderer) == null || m.forceContextLoss();
|
|
57155
57163
|
}
|
|
57156
57164
|
}
|
|
57157
57165
|
const hi = {
|
|
@@ -57362,7 +57370,7 @@ function fi() {
|
|
|
57362
57370
|
const _e = class Nn {
|
|
57363
57371
|
constructor(t) {
|
|
57364
57372
|
var r, m;
|
|
57365
|
-
this.raycaster = new Raycaster(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new Vector3(), this._cameraTarget = new Vector3(), this.event = new ye.EventEmitter(), this.timer = new ui(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this.event.setMaxListeners(1 / 0), (m = (r = this.timer).connect) == null || m.call(r, document), this.options = Dt(Nn.options, t, {
|
|
57373
|
+
this.raycaster = new Raycaster(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new Vector3(), this._cameraTarget = new Vector3(), this.event = new ye.EventEmitter(), this.timer = new ui(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (m = (r = this.timer).connect) == null || m.call(r, document), this.options = Dt(Nn.options, t, {
|
|
57366
57374
|
isMergeableObject: f$1
|
|
57367
57375
|
}), this.userSetDprCache = this.options.renderer.devicePixelRatio;
|
|
57368
57376
|
const {
|
|
@@ -57661,10 +57669,10 @@ const _e = class Nn {
|
|
|
57661
57669
|
}
|
|
57662
57670
|
dispose() {
|
|
57663
57671
|
var t, r, m, C, _, I, O, ve, Ce, Pe, Ne, Fe, ke, Ue;
|
|
57664
|
-
this.stop(), this.timer.dispose(), removeAll(), this.event.removeAllListeners(), (t = this.resizeObserver) == null || t.unobserve(this.options.container), this.installPlugins.forEach((ht) => {
|
|
57672
|
+
this.handeleResize(1, 1, !1), this.stop(), this.timer.dispose(), removeAll(), this.event.removeAllListeners(), (t = this.resizeObserver) == null || t.unobserve(this.options.container), this.installPlugins.forEach((ht) => {
|
|
57665
57673
|
var at;
|
|
57666
57674
|
(at = ht.dispose) == null || at.call(ht);
|
|
57667
|
-
}), (r = this.controlsController) == null || r.dispose(), (m = this.transformController) == null || m.dispose(), (C = this.cssRendererController) == null || C.dispose(), (_ = this.sceneController) == null || _.dispose(), (I = this.cameraController) == null || I.dispose(), (O = this.helperController) == null || O.dispose(), (ve = this.composerController) == null || ve.dispose(), (Ce = this.rendererController) == null || Ce.dispose(), (Pe = this.loaderController) == null || Pe.dispose(), (Ne = this.leadController) == null || Ne.dispose(), (Fe = this.mListController) == null || Fe.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (ke = this.stats) == null || ke.dom.remove(), (Ue = this.renderer) == null || Ue.domElement.remove();
|
|
57675
|
+
}), (r = this.controlsController) == null || r.dispose(), (m = this.transformController) == null || m.dispose(), (C = this.cssRendererController) == null || C.dispose(), (_ = this.sceneController) == null || _.dispose(), (I = this.cameraController) == null || I.dispose(), (O = this.helperController) == null || O.dispose(), (ve = this.composerController) == null || ve.dispose(), (Ce = this.rendererController) == null || Ce.dispose(), (Pe = this.loaderController) == null || Pe.dispose(), (Ne = this.leadController) == null || Ne.dispose(), (Fe = this.mListController) == null || Fe.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (ke = this.stats) == null || ke.dom.remove(), (Ue = this.renderer) == null || Ue.domElement.remove(), this._isDispose = !0;
|
|
57668
57676
|
}
|
|
57669
57677
|
};
|
|
57670
57678
|
_e.options = {
|
|
@@ -57718,7 +57726,7 @@ class Point extends pt {
|
|
|
57718
57726
|
});
|
|
57719
57727
|
}
|
|
57720
57728
|
create() {
|
|
57721
|
-
return
|
|
57729
|
+
return N0(this, null, function* () {
|
|
57722
57730
|
const { sprite: r } = this.options, m = this.getMaterial();
|
|
57723
57731
|
r ? this.createSprite(m) : this.createMesh(new PlaneGeometry(1, 1), m), this.setScale(1), this.object3d.scale.multiplyScalar(0.1);
|
|
57724
57732
|
});
|
|
@@ -57794,7 +57802,7 @@ class Arc extends pt {
|
|
|
57794
57802
|
};
|
|
57795
57803
|
}
|
|
57796
57804
|
create() {
|
|
57797
|
-
return
|
|
57805
|
+
return N0(this, null, function* () {
|
|
57798
57806
|
map || (map = getLineTexture(0.5));
|
|
57799
57807
|
const { color: r, lineWidth: m, globe: C } = this.options;
|
|
57800
57808
|
let { radius: _ } = this.options;
|
|
@@ -57822,7 +57830,7 @@ class Arc extends pt {
|
|
|
57822
57830
|
{ key: "Arc_第一控制点", position: ve.v1 },
|
|
57823
57831
|
{ key: "Arc_第二控制点", position: ve.v2 },
|
|
57824
57832
|
{ key: "Arc_终点", position: ve.v3 }
|
|
57825
|
-
].map((ct) =>
|
|
57833
|
+
].map((ct) => N0(this, [ct], function* ({ key: at, position: Ae }) {
|
|
57826
57834
|
const lt = yield Pe.draw("Group", {}, this);
|
|
57827
57835
|
return lt.position.copy(Ae), lt.userData.disabledC = !0, lt.userData.disabledR = !0, lt.userData.disabledProcessedChildren = !0, Pe.updateBaseObjectKey(lt, `${at}_${this.options.key}`), lt;
|
|
57828
57836
|
}))
|
|
@@ -57836,7 +57844,7 @@ class Arc extends pt {
|
|
|
57836
57844
|
});
|
|
57837
57845
|
}
|
|
57838
57846
|
instantiate() {
|
|
57839
|
-
return
|
|
57847
|
+
return N0(this, null, function* () {
|
|
57840
57848
|
this.update();
|
|
57841
57849
|
const r = yield this.line.instantiate({
|
|
57842
57850
|
recursive: !1
|
|
@@ -57855,7 +57863,7 @@ class Arc extends pt {
|
|
|
57855
57863
|
this.line.options.nodes = ve, this.line.setGeometry(ve, _), this.pickTube && this.addPickTarget(this.pickTube.options.radius);
|
|
57856
57864
|
}
|
|
57857
57865
|
addPickTarget(r = 1, m = !1) {
|
|
57858
|
-
return
|
|
57866
|
+
return N0(this, null, function* () {
|
|
57859
57867
|
const C = this.pickTube, _ = this.pencil.lead, I = this.line.options.nodes, O = new CurvePath();
|
|
57860
57868
|
for (let Pe = 0; Pe < I.length - 1; Pe++)
|
|
57861
57869
|
O.add(new LineCurve3(I[Pe], I[Pe + 1]));
|
|
@@ -57933,7 +57941,7 @@ class CrossPlane extends pt {
|
|
|
57933
57941
|
this.options = D0({}, r);
|
|
57934
57942
|
}
|
|
57935
57943
|
create() {
|
|
57936
|
-
return
|
|
57944
|
+
return N0(this, null, function* () {
|
|
57937
57945
|
this.createGroup();
|
|
57938
57946
|
const r = this.options.material || new MeshBasicMaterial({
|
|
57939
57947
|
color: "#ffffff",
|
|
@@ -57963,7 +57971,7 @@ class CrossPlane extends pt {
|
|
|
57963
57971
|
}
|
|
57964
57972
|
class PlaneShadow extends pt {
|
|
57965
57973
|
create() {
|
|
57966
|
-
return
|
|
57974
|
+
return N0(this, null, function* () {
|
|
57967
57975
|
const t = new PlaneGeometry(100, 100, 2, 2), r = new ShadowMaterial();
|
|
57968
57976
|
r.opacity = 0.5, r.depthWrite = !1, this.createMesh(t, r), this.object3d.receiveShadow = !0, this.position.z = 0.1, this.object3d.name = "阴影接受";
|
|
57969
57977
|
});
|
|
@@ -57983,7 +57991,7 @@ class Model extends pt {
|
|
|
57983
57991
|
}, r);
|
|
57984
57992
|
}
|
|
57985
57993
|
create() {
|
|
57986
|
-
return
|
|
57994
|
+
return N0(this, null, function* () {
|
|
57987
57995
|
const r = this.pencil.loader, m = this.options.src, C = yield r.load(m, {
|
|
57988
57996
|
type: "gltf",
|
|
57989
57997
|
cache: !1
|
|
@@ -58270,6 +58278,9 @@ function defaultGetStore() {
|
|
|
58270
58278
|
function get(v, t = defaultGetStore()) {
|
|
58271
58279
|
return t("readonly", (r) => promisifyRequest(r.get(v)));
|
|
58272
58280
|
}
|
|
58281
|
+
function set(v, t, r = defaultGetStore()) {
|
|
58282
|
+
return r("readwrite", (m) => (m.put(t, v), promisifyRequest(m.transaction)));
|
|
58283
|
+
}
|
|
58273
58284
|
function setMany(v, t = defaultGetStore()) {
|
|
58274
58285
|
return t("readwrite", (r) => (v.forEach((m) => r.put(m[1], m[0])), promisifyRequest(r.transaction)));
|
|
58275
58286
|
}
|
|
@@ -58895,14 +58906,42 @@ class WebGL {
|
|
|
58895
58906
|
const r = this.getRenderer();
|
|
58896
58907
|
this.renderer = r;
|
|
58897
58908
|
}
|
|
58898
|
-
|
|
58909
|
+
withWebGLContext(t, r, m) {
|
|
58910
|
+
let C = null, _ = null;
|
|
58899
58911
|
try {
|
|
58900
|
-
|
|
58901
|
-
|
|
58902
|
-
|
|
58903
|
-
|
|
58912
|
+
return C = document.createElement("canvas"), C.width = 1, C.height = 1, t === "webgl" ? _ = C.getContext("webgl") || C.getContext(
|
|
58913
|
+
"experimental-webgl"
|
|
58914
|
+
) : _ = C.getContext("webgl2"), _ ? r(C, _) : m;
|
|
58915
|
+
} catch (I) {
|
|
58916
|
+
return m;
|
|
58917
|
+
} finally {
|
|
58918
|
+
if (_) {
|
|
58919
|
+
const I = _.getExtension("WEBGL_lose_context");
|
|
58920
|
+
I == null || I.loseContext();
|
|
58921
|
+
}
|
|
58922
|
+
C && (C.width = 0, C.height = 0);
|
|
58904
58923
|
}
|
|
58905
58924
|
}
|
|
58925
|
+
withCanvas(t, r) {
|
|
58926
|
+
let m = null;
|
|
58927
|
+
try {
|
|
58928
|
+
return m = document.createElement("canvas"), m.width = 1, m.height = 1, t(m);
|
|
58929
|
+
} catch (C) {
|
|
58930
|
+
return r;
|
|
58931
|
+
} finally {
|
|
58932
|
+
m && (m.width = 0, m.height = 0);
|
|
58933
|
+
}
|
|
58934
|
+
}
|
|
58935
|
+
getRawRenderer() {
|
|
58936
|
+
return this.withWebGLContext(
|
|
58937
|
+
"webgl",
|
|
58938
|
+
(t, r) => {
|
|
58939
|
+
const m = r.getExtension("WEBGL_debug_renderer_info");
|
|
58940
|
+
return m ? r.getParameter(m.UNMASKED_RENDERER_WEBGL) : "";
|
|
58941
|
+
},
|
|
58942
|
+
""
|
|
58943
|
+
);
|
|
58944
|
+
}
|
|
58906
58945
|
getRenderer() {
|
|
58907
58946
|
const t = this.rawRenderer;
|
|
58908
58947
|
return t ? t.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") : "";
|
|
@@ -58917,20 +58956,18 @@ class WebGL {
|
|
|
58917
58956
|
};
|
|
58918
58957
|
}
|
|
58919
58958
|
isWebGLAvailable() {
|
|
58920
|
-
|
|
58921
|
-
|
|
58922
|
-
|
|
58923
|
-
|
|
58924
|
-
|
|
58925
|
-
}
|
|
58959
|
+
return this.withWebGLContext(
|
|
58960
|
+
"webgl",
|
|
58961
|
+
(t, r) => !!(window.WebGLRenderingContext && r),
|
|
58962
|
+
!1
|
|
58963
|
+
);
|
|
58926
58964
|
}
|
|
58927
58965
|
isWebGL2Available() {
|
|
58928
|
-
|
|
58929
|
-
|
|
58930
|
-
|
|
58931
|
-
|
|
58932
|
-
|
|
58933
|
-
}
|
|
58966
|
+
return this.withWebGLContext(
|
|
58967
|
+
"webgl2",
|
|
58968
|
+
(t, r) => !!(window.WebGL2RenderingContext && r),
|
|
58969
|
+
!1
|
|
58970
|
+
);
|
|
58934
58971
|
}
|
|
58935
58972
|
isWebGL2RenderingContextAvailable() {
|
|
58936
58973
|
return typeof window.WebGL2RenderingContext != "undefined";
|
|
@@ -58940,19 +58977,17 @@ class WebGL {
|
|
|
58940
58977
|
return !/SwiftShader/gi.test(t);
|
|
58941
58978
|
}
|
|
58942
58979
|
isColorSpaceAvailable(t) {
|
|
58943
|
-
|
|
58944
|
-
|
|
58945
|
-
|
|
58946
|
-
|
|
58947
|
-
|
|
58948
|
-
|
|
58980
|
+
return this.withWebGLContext(
|
|
58981
|
+
"webgl2",
|
|
58982
|
+
(r, m) => {
|
|
58983
|
+
const C = m;
|
|
58984
|
+
return C.drawingBufferColorSpace = t, C.drawingBufferColorSpace === t;
|
|
58985
|
+
},
|
|
58986
|
+
!1
|
|
58987
|
+
);
|
|
58949
58988
|
}
|
|
58950
58989
|
isWebPAvailable() {
|
|
58951
|
-
|
|
58952
|
-
return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0;
|
|
58953
|
-
} catch (t) {
|
|
58954
|
-
return !1;
|
|
58955
|
-
}
|
|
58990
|
+
return this.withCanvas((t) => t.toDataURL("image/webp").indexOf("data:image/webp") === 0, !1);
|
|
58956
58991
|
}
|
|
58957
58992
|
}
|
|
58958
58993
|
const detect = () => {
|
|
@@ -59824,7 +59859,7 @@ class AddVis extends Command {
|
|
|
59824
59859
|
this.type = "AddVis", this.visType = m, this.visOptions = C, m !== void 0 && (this.name = `Add Vis: ${m}`);
|
|
59825
59860
|
}
|
|
59826
59861
|
execute() {
|
|
59827
|
-
return
|
|
59862
|
+
return N0(this, null, function* () {
|
|
59828
59863
|
yield this.editor.viewport.setVis(this.visType, this.visOptions), this.editor.select(null);
|
|
59829
59864
|
});
|
|
59830
59865
|
}
|
|
@@ -59850,7 +59885,7 @@ class AddObject extends Command {
|
|
|
59850
59885
|
this.type = "AddObject", this.objectType = m, this.objectOptions = C, m !== void 0 && (this.name = `Add Object: ${m}`);
|
|
59851
59886
|
}
|
|
59852
59887
|
execute() {
|
|
59853
|
-
return
|
|
59888
|
+
return N0(this, null, function* () {
|
|
59854
59889
|
var m;
|
|
59855
59890
|
const r = this.editor.viewport.vis;
|
|
59856
59891
|
this.obj = yield r.lead.draw(this.objectType, Ui(D0({}, this.objectOptions), {
|
|
@@ -59886,7 +59921,7 @@ class RemoveObject extends Command {
|
|
|
59886
59921
|
}), this.object.objectType === "BaseObject#Model" && this.object.stopAllClips()), this.editor.emit("baseObjectListChange"), this.editor.select(null);
|
|
59887
59922
|
}
|
|
59888
59923
|
undo() {
|
|
59889
|
-
return
|
|
59924
|
+
return N0(this, null, function* () {
|
|
59890
59925
|
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");
|
|
59891
59926
|
});
|
|
59892
59927
|
}
|
|
@@ -59908,7 +59943,7 @@ class CopyObject extends Command {
|
|
|
59908
59943
|
this.type = "CopyObject", this.name = "Copy Object", this.object = m;
|
|
59909
59944
|
}
|
|
59910
59945
|
execute() {
|
|
59911
|
-
return
|
|
59946
|
+
return N0(this, null, function* () {
|
|
59912
59947
|
var _;
|
|
59913
59948
|
const r = this.editor.viewport.vis, m = this.object.key, C = yield this.object.instantiate({
|
|
59914
59949
|
key: `${this.id}`
|
|
@@ -59917,7 +59952,7 @@ class CopyObject extends Command {
|
|
|
59917
59952
|
});
|
|
59918
59953
|
}
|
|
59919
59954
|
undo() {
|
|
59920
|
-
return
|
|
59955
|
+
return N0(this, null, function* () {
|
|
59921
59956
|
var r;
|
|
59922
59957
|
(r = this.copyObject) == null || r.erase(), this.editor.select(null);
|
|
59923
59958
|
});
|
|
@@ -59953,13 +59988,13 @@ class SetObjectMaterial extends Command {
|
|
|
59953
59988
|
), this.newValue = _;
|
|
59954
59989
|
}
|
|
59955
59990
|
execute() {
|
|
59956
|
-
return
|
|
59991
|
+
return N0(this, null, function* () {
|
|
59957
59992
|
const m = this.editor.pencil.mList.get(this.newValue);
|
|
59958
59993
|
m && (this.editor.setObjectMaterial(this.object, this.materialSlot, m), this.playVideo(m), this.editor.emit("materialChanged", this.object));
|
|
59959
59994
|
});
|
|
59960
59995
|
}
|
|
59961
59996
|
undo() {
|
|
59962
|
-
return
|
|
59997
|
+
return N0(this, null, function* () {
|
|
59963
59998
|
const r = this.oldMaterial;
|
|
59964
59999
|
this.editor.setObjectMaterial(this.object, this.materialSlot, r), this.playVideo(r), this.editor.emit("materialChanged", this.object);
|
|
59965
60000
|
});
|
|
@@ -60018,7 +60053,7 @@ class AddMaterial extends Command {
|
|
|
60018
60053
|
this.type = "AddMaterial", this.name = "Add Material", this.materialType = m, this.object = C, this.materialSlot = _;
|
|
60019
60054
|
}
|
|
60020
60055
|
execute() {
|
|
60021
|
-
return
|
|
60056
|
+
return N0(this, null, function* () {
|
|
60022
60057
|
this.addObjectUuid = `material_${this.id}`;
|
|
60023
60058
|
const r = this.editor.pencil.mList;
|
|
60024
60059
|
let m;
|
|
@@ -60053,7 +60088,7 @@ class AddMaterial extends Command {
|
|
|
60053
60088
|
});
|
|
60054
60089
|
}
|
|
60055
60090
|
undo() {
|
|
60056
|
-
return
|
|
60091
|
+
return N0(this, null, function* () {
|
|
60057
60092
|
this.setMaterialCommand && (yield this.setMaterialCommand.undo()), this.editor.pencil.mList.remove(this.addObjectUuid), this.flag && this.editor.emit("materialChanged");
|
|
60058
60093
|
});
|
|
60059
60094
|
}
|
|
@@ -60077,14 +60112,14 @@ class CopyMaterial extends Command {
|
|
|
60077
60112
|
this.type = "CopyMaterial", this.name = "Copy Material", this.objectUuid = m;
|
|
60078
60113
|
}
|
|
60079
60114
|
execute() {
|
|
60080
|
-
return
|
|
60115
|
+
return N0(this, null, function* () {
|
|
60081
60116
|
this.copyObjectUuid = `material_${this.id}`, this.editor.pencil.mList.copy(this.objectUuid, this.copyObjectUuid, {
|
|
60082
60117
|
name: `材质_${this.id}`
|
|
60083
60118
|
});
|
|
60084
60119
|
});
|
|
60085
60120
|
}
|
|
60086
60121
|
undo() {
|
|
60087
|
-
return
|
|
60122
|
+
return N0(this, null, function* () {
|
|
60088
60123
|
this.editor.pencil.mList.remove(this.copyObjectUuid);
|
|
60089
60124
|
});
|
|
60090
60125
|
}
|
|
@@ -60108,13 +60143,13 @@ class RemoveMaterial extends Command {
|
|
|
60108
60143
|
this.type = "RemoveMaterial", this.name = "Remove Material", this.objectUuid = m;
|
|
60109
60144
|
}
|
|
60110
60145
|
execute() {
|
|
60111
|
-
return
|
|
60146
|
+
return N0(this, null, function* () {
|
|
60112
60147
|
const r = this.editor.pencil.mList;
|
|
60113
60148
|
this.material = r.get(this.objectUuid), r.remove(this.objectUuid);
|
|
60114
60149
|
});
|
|
60115
60150
|
}
|
|
60116
60151
|
undo() {
|
|
60117
|
-
return
|
|
60152
|
+
return N0(this, null, function* () {
|
|
60118
60153
|
const r = this.editor.pencil.mList;
|
|
60119
60154
|
this.material && r.add(this.objectUuid, this.material);
|
|
60120
60155
|
});
|
|
@@ -60140,13 +60175,13 @@ class SetSetting extends Command {
|
|
|
60140
60175
|
this.type = "SetSetting", this.updatable = !0, this.name = `Set Setting.${m}`, this.attributeName = m, this.newValue = C, r.viewport.vis && (this.oldValue = r.viewport.vis.settings[m]);
|
|
60141
60176
|
}
|
|
60142
60177
|
execute() {
|
|
60143
|
-
return
|
|
60178
|
+
return N0(this, null, function* () {
|
|
60144
60179
|
const r = this.editor.viewport.vis;
|
|
60145
60180
|
r.settings[this.attributeName] = this.newValue, yield r.settings[this.attributeName], this.editor.emit("settingsChanged");
|
|
60146
60181
|
});
|
|
60147
60182
|
}
|
|
60148
60183
|
undo() {
|
|
60149
|
-
return
|
|
60184
|
+
return N0(this, null, function* () {
|
|
60150
60185
|
const r = this.editor.viewport.vis;
|
|
60151
60186
|
r.settings[this.attributeName] = this.oldValue, yield r.settings[this.attributeName], this.editor.emit("settingsChanged");
|
|
60152
60187
|
});
|
|
@@ -60289,7 +60324,7 @@ class History {
|
|
|
60289
60324
|
return !(t != null && t.updatable) || !(r != null && r.updatable) || m >= COMMAND_UPDATE_THRESHOLD ? !1 : t.object === r.object && t.objectUuid === r.objectUuid && t.type === r.type && t.attributeName === r.attributeName && t.attributeName2 === r.attributeName2 && t.name === r.name && t.materialSlot === r.materialSlot;
|
|
60290
60325
|
}
|
|
60291
60326
|
execute(t, r) {
|
|
60292
|
-
return
|
|
60327
|
+
return N0(this, null, function* () {
|
|
60293
60328
|
const m = this.undos[this.undos.length - 1], C = Date.now() - this.lastCmdTime;
|
|
60294
60329
|
this.canMergeCommands(m, t, C) ? (m.update(t), t = m) : (this.undos.push(t), t.id = ++this.idCounter), t.name = r !== void 0 ? r : t.name;
|
|
60295
60330
|
try {
|
|
@@ -60438,7 +60473,7 @@ class History {
|
|
|
60438
60473
|
return new Promise((r, m) => {
|
|
60439
60474
|
const C = [...this.undos], _ = C.length;
|
|
60440
60475
|
let I = 0;
|
|
60441
|
-
const O = () =>
|
|
60476
|
+
const O = () => N0(this, null, function* () {
|
|
60442
60477
|
const ve = performance.now();
|
|
60443
60478
|
for (; C.length > 0 && performance.now() - ve < t; ) {
|
|
60444
60479
|
if (this.editor._dispose) {
|
|
@@ -60468,7 +60503,7 @@ class History {
|
|
|
60468
60503
|
* 执行单个撤销命令
|
|
60469
60504
|
*/
|
|
60470
60505
|
executeUndo(t) {
|
|
60471
|
-
return
|
|
60506
|
+
return N0(this, null, function* () {
|
|
60472
60507
|
if (!(t != null && t.json)) {
|
|
60473
60508
|
console.warn("Invalid undo command:", t);
|
|
60474
60509
|
return;
|
|
@@ -60587,7 +60622,6 @@ class Viewport {
|
|
|
60587
60622
|
b0(this, "delLoadObj");
|
|
60588
60623
|
b0(this, "options");
|
|
60589
60624
|
b0(this, "copyObjKey");
|
|
60590
|
-
b0(this, "copyMListMaterialKey");
|
|
60591
60625
|
this.options = r, this.editor = t;
|
|
60592
60626
|
}
|
|
60593
60627
|
setSaveCamera(t) {
|
|
@@ -60595,7 +60629,7 @@ class Viewport {
|
|
|
60595
60629
|
this.vis.setSaveCamera(t), (r = this.vis.pencil.controls) == null || r.saveState(), this.cameraState = D0({}, (m = this.vis) == null ? void 0 : m.cameraState), this.editor.emit("cameraStateChanged");
|
|
60596
60630
|
}
|
|
60597
60631
|
addVis(m) {
|
|
60598
|
-
return
|
|
60632
|
+
return N0(this, arguments, function* (t, r = {}) {
|
|
60599
60633
|
this.replaceVis() && (yield this.editor.execute(new AddVis(this.editor, t, r)));
|
|
60600
60634
|
});
|
|
60601
60635
|
}
|
|
@@ -60607,7 +60641,7 @@ class Viewport {
|
|
|
60607
60641
|
return !0;
|
|
60608
60642
|
}
|
|
60609
60643
|
setVis(m) {
|
|
60610
|
-
return
|
|
60644
|
+
return N0(this, arguments, function* (t, r = {}) {
|
|
60611
60645
|
if (!this.options.visFactories && (this.editor.setViewportVis(t), !this.options.visFactories)) {
|
|
60612
60646
|
console.error("visFactories is not defined");
|
|
60613
60647
|
return;
|
|
@@ -60668,13 +60702,13 @@ class Viewport {
|
|
|
60668
60702
|
});
|
|
60669
60703
|
}
|
|
60670
60704
|
addObj(m) {
|
|
60671
|
-
return
|
|
60705
|
+
return N0(this, arguments, function* (t, r = {}) {
|
|
60672
60706
|
const C = objs$3[t].getInitOptions;
|
|
60673
60707
|
C && Object.assign(r, C(this.vis.pencil, r)), yield this.editor.execute(new AddObject(this.editor, t, r));
|
|
60674
60708
|
});
|
|
60675
60709
|
}
|
|
60676
60710
|
removeObj(t) {
|
|
60677
|
-
return
|
|
60711
|
+
return N0(this, null, function* () {
|
|
60678
60712
|
const { vis: r } = this;
|
|
60679
60713
|
if (!r || !t)
|
|
60680
60714
|
return;
|
|
@@ -60687,39 +60721,67 @@ class Viewport {
|
|
|
60687
60721
|
});
|
|
60688
60722
|
}
|
|
60689
60723
|
copyObj(t) {
|
|
60690
|
-
if (this.vis
|
|
60691
|
-
|
|
60692
|
-
|
|
60693
|
-
|
|
60724
|
+
if (!this.vis)
|
|
60725
|
+
return;
|
|
60726
|
+
const r = this.editor.findSelectItem("key", t);
|
|
60727
|
+
r && !r.disabledC && (this.copyObjKey = t);
|
|
60728
|
+
}
|
|
60729
|
+
clearCopyObj() {
|
|
60730
|
+
this.copyObjKey = void 0;
|
|
60694
60731
|
}
|
|
60695
60732
|
pasteObj() {
|
|
60696
|
-
return
|
|
60733
|
+
return N0(this, null, function* () {
|
|
60697
60734
|
const { vis: t } = this;
|
|
60698
60735
|
if (!t || !this.copyObjKey)
|
|
60699
60736
|
return;
|
|
60700
60737
|
const r = this.editor.baseObjectByUuid(this.copyObjKey);
|
|
60701
|
-
r
|
|
60738
|
+
r && this.editor.execute(new CopyObject(this.editor, r));
|
|
60702
60739
|
});
|
|
60703
60740
|
}
|
|
60704
60741
|
copyMListMaterial(t) {
|
|
60705
|
-
return
|
|
60742
|
+
return N0(this, null, function* () {
|
|
60706
60743
|
const { vis: r } = this;
|
|
60707
|
-
|
|
60744
|
+
if (!r)
|
|
60745
|
+
return;
|
|
60746
|
+
const m = r.mList.get(t);
|
|
60747
|
+
m && (yield set("copyMaterial", {
|
|
60748
|
+
project: this.editor.config.meta.key,
|
|
60749
|
+
mListkey: t,
|
|
60750
|
+
json: m.toJSON()
|
|
60751
|
+
}));
|
|
60752
|
+
});
|
|
60753
|
+
}
|
|
60754
|
+
clearCopyMListMaterial() {
|
|
60755
|
+
return N0(this, null, function* () {
|
|
60756
|
+
yield del("copyMaterial");
|
|
60708
60757
|
});
|
|
60709
60758
|
}
|
|
60710
60759
|
pasteMListMaterial() {
|
|
60711
|
-
return
|
|
60760
|
+
return N0(this, null, function* () {
|
|
60712
60761
|
const { vis: t } = this;
|
|
60713
|
-
if (t)
|
|
60714
|
-
|
|
60715
|
-
|
|
60716
|
-
|
|
60717
|
-
|
|
60718
|
-
|
|
60719
|
-
|
|
60720
|
-
|
|
60721
|
-
|
|
60722
|
-
|
|
60762
|
+
if (!t)
|
|
60763
|
+
return;
|
|
60764
|
+
const r = yield get("copyMaterial");
|
|
60765
|
+
r && (r.project === this.editor.config.meta.key ? this.editor.execute(new CopyMaterial(this.editor, r.mListkey)) : this.editor.execute(new AddMaterial(this.editor, r.json)));
|
|
60766
|
+
});
|
|
60767
|
+
}
|
|
60768
|
+
pasteMListMaterial2Replace(t) {
|
|
60769
|
+
return N0(this, null, function* () {
|
|
60770
|
+
const { vis: r } = this;
|
|
60771
|
+
if (!r)
|
|
60772
|
+
return;
|
|
60773
|
+
const m = yield get("copyMaterial");
|
|
60774
|
+
if (!m)
|
|
60775
|
+
return;
|
|
60776
|
+
const C = this.editor.materialObjectByUuid(t);
|
|
60777
|
+
this.editor.execute(
|
|
60778
|
+
new SetMaterial(
|
|
60779
|
+
this.editor,
|
|
60780
|
+
C,
|
|
60781
|
+
m.project === this.editor.config.meta.key ? r.mList.get(m.mListkey) : parseMaterial(m.json),
|
|
60782
|
+
0
|
|
60783
|
+
)
|
|
60784
|
+
);
|
|
60723
60785
|
});
|
|
60724
60786
|
}
|
|
60725
60787
|
addMListMaterial(t = "MeshBasicMaterial", r, m) {
|
|
@@ -60727,7 +60789,7 @@ class Viewport {
|
|
|
60727
60789
|
C && this.editor.execute(new AddMaterial(this.editor, t, r, m));
|
|
60728
60790
|
}
|
|
60729
60791
|
removeMListMaterial(t) {
|
|
60730
|
-
return
|
|
60792
|
+
return N0(this, null, function* () {
|
|
60731
60793
|
const { vis: r } = this;
|
|
60732
60794
|
r && this.editor.execute(new RemoveMaterial(this.editor, t));
|
|
60733
60795
|
});
|
|
@@ -60942,12 +61004,12 @@ class Editor {
|
|
|
60942
61004
|
this.emit("mListGraphChanged");
|
|
60943
61005
|
}
|
|
60944
61006
|
execute(t, r) {
|
|
60945
|
-
return
|
|
61007
|
+
return N0(this, null, function* () {
|
|
60946
61008
|
yield this.history.execute(t, r);
|
|
60947
61009
|
});
|
|
60948
61010
|
}
|
|
60949
61011
|
fromJSON(t, r) {
|
|
60950
|
-
return
|
|
61012
|
+
return N0(this, null, function* () {
|
|
60951
61013
|
var m, C, _, I;
|
|
60952
61014
|
try {
|
|
60953
61015
|
r && !f$1(r) ? console.warn(
|
|
@@ -60984,7 +61046,7 @@ class Editor {
|
|
|
60984
61046
|
});
|
|
60985
61047
|
}
|
|
60986
61048
|
appendJSON(t) {
|
|
60987
|
-
return
|
|
61049
|
+
return N0(this, null, function* () {
|
|
60988
61050
|
let r;
|
|
60989
61051
|
if (typeof t == "string") {
|
|
60990
61052
|
const m = this.options.assetsPrefix + t;
|
|
@@ -61103,7 +61165,7 @@ class Camera extends Event {
|
|
|
61103
61165
|
this.cameraState[r] = [C.x, C.y, C.z, _.x, _.y, _.z];
|
|
61104
61166
|
}
|
|
61105
61167
|
useSaveCamera(r, m = !1) {
|
|
61106
|
-
return
|
|
61168
|
+
return N0(this, null, function* () {
|
|
61107
61169
|
const C = this.cameraState[r];
|
|
61108
61170
|
return C ? (yield this.lookAt(
|
|
61109
61171
|
C[0],
|
|
@@ -61117,7 +61179,7 @@ class Camera extends Event {
|
|
|
61117
61179
|
});
|
|
61118
61180
|
}
|
|
61119
61181
|
lookAt(r, m, C, _, I, O, ve = !1, Ce = 250) {
|
|
61120
|
-
return
|
|
61182
|
+
return N0(this, null, function* () {
|
|
61121
61183
|
this.pencil.controls.smoothTime = Ce / 1e3, yield this.pencil.controls.setLookAt(
|
|
61122
61184
|
r,
|
|
61123
61185
|
m,
|
|
@@ -61130,12 +61192,12 @@ class Camera extends Event {
|
|
|
61130
61192
|
});
|
|
61131
61193
|
}
|
|
61132
61194
|
truck(r, m, C = !1, _ = 250) {
|
|
61133
|
-
return
|
|
61195
|
+
return N0(this, null, function* () {
|
|
61134
61196
|
this.pencil.controls.smoothTime = _ / 1e3, this.pencil.controls.restThreshold = 0, yield this.pencil.controls.truck(r, m, C), this.pencil.controls.restThreshold = 25e-4, this.pencil.controls.smoothTime = 250 / 1e3;
|
|
61135
61197
|
});
|
|
61136
61198
|
}
|
|
61137
61199
|
dollyTo(r, m = !1, C = 250) {
|
|
61138
|
-
return
|
|
61200
|
+
return N0(this, null, function* () {
|
|
61139
61201
|
let _ = r;
|
|
61140
61202
|
if (typeof _ == "string") {
|
|
61141
61203
|
const [I, O] = _.split("=");
|
|
@@ -61149,7 +61211,7 @@ class Camera extends Event {
|
|
|
61149
61211
|
return MathUtils.euclideanModulo(_ + Math.PI, C) - Math.PI;
|
|
61150
61212
|
}
|
|
61151
61213
|
lookAtTarget(r, m = !1, C = 250) {
|
|
61152
|
-
return
|
|
61214
|
+
return N0(this, null, function* () {
|
|
61153
61215
|
this.pencil.controls.smoothTime = C / 1e3;
|
|
61154
61216
|
const _ = this.pencil.controls.azimuthAngle, I = this.pencil.controls.polarAngle, O = this.pencil.controls.distance, ve = this.pencil.cameraTarget.clone(), Ce = r.azimuthAngle || _, Pe = r.polarAngle || I, Ne = r.distance || O, Fe = r.target || ve;
|
|
61155
61217
|
yield Promise.all([
|
|
@@ -61186,7 +61248,7 @@ class Camera extends Event {
|
|
|
61186
61248
|
});
|
|
61187
61249
|
}
|
|
61188
61250
|
resetCamera(r = !1, m = 250) {
|
|
61189
|
-
return
|
|
61251
|
+
return N0(this, null, function* () {
|
|
61190
61252
|
this.pencil.controls.smoothTime = m / 1e3, yield this.pencil.controls.reset(r), this.pencil.controls.smoothTime = 250 / 1e3;
|
|
61191
61253
|
});
|
|
61192
61254
|
}
|
|
@@ -61301,20 +61363,20 @@ class Base extends Camera {
|
|
|
61301
61363
|
loaderAdd(...r) {
|
|
61302
61364
|
}
|
|
61303
61365
|
initMaterial(...r) {
|
|
61304
|
-
return
|
|
61366
|
+
return N0(this, null, function* () {
|
|
61305
61367
|
});
|
|
61306
61368
|
}
|
|
61307
61369
|
initVis(...r) {
|
|
61308
|
-
return
|
|
61370
|
+
return N0(this, null, function* () {
|
|
61309
61371
|
});
|
|
61310
61372
|
}
|
|
61311
61373
|
init(...r) {
|
|
61312
|
-
return
|
|
61374
|
+
return N0(this, null, function* () {
|
|
61313
61375
|
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);
|
|
61314
61376
|
});
|
|
61315
61377
|
}
|
|
61316
61378
|
initPencil() {
|
|
61317
|
-
return
|
|
61379
|
+
return N0(this, null, function* () {
|
|
61318
61380
|
var C, _, I, O, ve, Ce, Pe, Ne;
|
|
61319
61381
|
if (this.pencil) return;
|
|
61320
61382
|
const r = D0({}, this.options.pencilConfig);
|
|
@@ -61521,7 +61583,7 @@ class Base extends Camera {
|
|
|
61521
61583
|
);
|
|
61522
61584
|
}
|
|
61523
61585
|
handleSetting(r, m) {
|
|
61524
|
-
return
|
|
61586
|
+
return N0(this, null, function* () {
|
|
61525
61587
|
const { pencil: C } = this;
|
|
61526
61588
|
if (r === "mouseWheel" || r === "mouseLeft" || r === "mouseRight") {
|
|
61527
61589
|
const _ = r.replace("mouse", "").toLowerCase();
|
|
@@ -61544,7 +61606,7 @@ class Base extends Camera {
|
|
|
61544
61606
|
this.showState && (this.lead.group.hide(), this.lead.prefabGroup.hide(), this.showState = !1, this.emit("hide"));
|
|
61545
61607
|
}
|
|
61546
61608
|
addCSS2D(C) {
|
|
61547
|
-
return
|
|
61609
|
+
return N0(this, arguments, function* (r, m = {}) {
|
|
61548
61610
|
typeof m == "string" && (m = { display: m }), m.display && (r.style.display = m.display);
|
|
61549
61611
|
let _ = 0;
|
|
61550
61612
|
typeof m.onTop != "undefined" && (_ = m.onTop);
|
|
@@ -61555,7 +61617,7 @@ class Base extends Camera {
|
|
|
61555
61617
|
});
|
|
61556
61618
|
}
|
|
61557
61619
|
addCSS3D(C) {
|
|
61558
|
-
return
|
|
61620
|
+
return N0(this, arguments, function* (r, m = {}) {
|
|
61559
61621
|
m.display && (r.style.display = m.display);
|
|
61560
61622
|
let _ = 0;
|
|
61561
61623
|
typeof m.onTop != "undefined" && (_ = m.onTop);
|
|
@@ -139715,7 +139777,7 @@ class Building extends pt {
|
|
|
139715
139777
|
this.options = D0({}, r);
|
|
139716
139778
|
}
|
|
139717
139779
|
create() {
|
|
139718
|
-
return
|
|
139780
|
+
return N0(this, null, function* () {
|
|
139719
139781
|
const { json: r, projection: m, cacheKey: C, meters: _, grey: I, clip: O } = this.options, ve = this.pencil.mList, Ce = this.pencil.getPlugin("worker"), Pe = this.pencil.lead, Ne = I ? "-grey" : "";
|
|
139720
139782
|
this.createGroup();
|
|
139721
139783
|
const Fe = ve.getMultiple("building" + Ne);
|
|
@@ -139771,7 +139833,7 @@ class Building extends pt {
|
|
|
139771
139833
|
);
|
|
139772
139834
|
}
|
|
139773
139835
|
yield Promise.all(
|
|
139774
|
-
ke.map((Ue) =>
|
|
139836
|
+
ke.map((Ue) => N0(this, null, function* () {
|
|
139775
139837
|
const { h: ht, z: at } = Ue.userData, Ae = ht + at, ct = Ae <= 20 ? "20" : Ae <= 60 ? "60" : "max";
|
|
139776
139838
|
let lt = this.options.material;
|
|
139777
139839
|
lt || (lt = [Fe[ct + "Top"], Fe[ct + "Side"]]);
|
|
@@ -139858,7 +139920,7 @@ class Road extends pt {
|
|
|
139858
139920
|
this.options = D0({}, r);
|
|
139859
139921
|
}
|
|
139860
139922
|
create() {
|
|
139861
|
-
return
|
|
139923
|
+
return N0(this, null, function* () {
|
|
139862
139924
|
const { clip: r, grey: m } = this.options;
|
|
139863
139925
|
this.createGroup();
|
|
139864
139926
|
const C = this.pencil.getPlugin("worker"), _ = this.pencil.lead, I = this.pencil.mList, O = m ? "-grey" : "", { json: ve, projection: Ce, cacheKey: Pe, meters: Ne } = this.options;
|
|
@@ -139910,7 +139972,7 @@ class Road extends pt {
|
|
|
139910
139972
|
);
|
|
139911
139973
|
}
|
|
139912
139974
|
yield Promise.all(
|
|
139913
|
-
Fe.map((ke, Ue) =>
|
|
139975
|
+
Fe.map((ke, Ue) => N0(this, null, function* () {
|
|
139914
139976
|
const ht = yield _.draw(
|
|
139915
139977
|
"Line",
|
|
139916
139978
|
{
|
|
@@ -139938,7 +140000,7 @@ class Area extends pt {
|
|
|
139938
140000
|
this.options = D0({}, r);
|
|
139939
140001
|
}
|
|
139940
140002
|
create() {
|
|
139941
|
-
return
|
|
140003
|
+
return N0(this, null, function* () {
|
|
139942
140004
|
this.createGroup();
|
|
139943
140005
|
const { json: r, projection: m, type: C, cacheKey: _, material: I, oArr: O, clip: ve } = this.options, Ce = this.pencil.getPlugin("worker"), Pe = this.pencil.lead;
|
|
139944
140006
|
let Ne = _ ? yield Ce.getCachedGeometry({
|
|
@@ -139998,7 +140060,7 @@ class Area extends pt {
|
|
|
139998
140060
|
);
|
|
139999
140061
|
}
|
|
140000
140062
|
yield Promise.all(
|
|
140001
|
-
Ne.map((Fe, ke) =>
|
|
140063
|
+
Ne.map((Fe, ke) => N0(this, null, function* () {
|
|
140002
140064
|
const { z: Ue } = Fe.userData, ht = yield Pe.draw(
|
|
140003
140065
|
"ExtrudePolygon",
|
|
140004
140066
|
{
|
|
@@ -140490,7 +140552,7 @@ class CityPlane extends pt {
|
|
|
140490
140552
|
}, r);
|
|
140491
140553
|
}
|
|
140492
140554
|
create() {
|
|
140493
|
-
return
|
|
140555
|
+
return N0(this, null, function* () {
|
|
140494
140556
|
const { width: r, height: m, color: C, map: _, material: I } = this.options, O = new PlaneGeometry(r, m, 2, 2);
|
|
140495
140557
|
this.plane = O;
|
|
140496
140558
|
const ve = I || new MeshBasicMaterial({
|
|
@@ -140618,7 +140680,7 @@ class Target extends pt {
|
|
|
140618
140680
|
return _.translateZ(1), _;
|
|
140619
140681
|
}
|
|
140620
140682
|
create() {
|
|
140621
|
-
return
|
|
140683
|
+
return N0(this, null, function* () {
|
|
140622
140684
|
const { scale: r = 0.03 } = this.options;
|
|
140623
140685
|
this.createGroup();
|
|
140624
140686
|
const m = this.pencil.loader, C = "241, 241, 86", _ = m.getAsset("/image/city/cylinder.webp"), I = getCanvasTexture(C), O = this.createRipple(I);
|
|
@@ -140860,7 +140922,7 @@ class City$1 extends Base {
|
|
|
140860
140922
|
);
|
|
140861
140923
|
}
|
|
140862
140924
|
initMaterial() {
|
|
140863
|
-
return
|
|
140925
|
+
return N0(this, null, function* () {
|
|
140864
140926
|
if (this.options.showBuilding) {
|
|
140865
140927
|
const r = ["20", "60", "max"].reduce(
|
|
140866
140928
|
(C, _) => {
|
|
@@ -140976,7 +141038,7 @@ class City$1 extends Base {
|
|
|
140976
141038
|
r && !r.enabled && (r.enabled = !0, console.log("enabledSSAO"));
|
|
140977
141039
|
}
|
|
140978
141040
|
init() {
|
|
140979
|
-
return
|
|
141041
|
+
return N0(this, null, function* () {
|
|
140980
141042
|
const { jsonName: r, adcode: m } = this.options;
|
|
140981
141043
|
yield this.initPencil(), this.loaderAdd(), this.loaderAddJson(r), console.time(`vis-core:time.${this.visName}${m}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}${m}-loader`), this.settings.mouseLeft = Gi.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({
|
|
140982
141044
|
center: this.pcenter,
|
|
@@ -141003,7 +141065,7 @@ class City$1 extends Base {
|
|
|
141003
141065
|
return (C = (m = this.projection).invert) == null ? void 0 : C.call(m, [r.x, -r.z]);
|
|
141004
141066
|
}
|
|
141005
141067
|
fitTo(r, m = !0) {
|
|
141006
|
-
return
|
|
141068
|
+
return N0(this, null, function* () {
|
|
141007
141069
|
this.pencil.controls.fitToBox(r.object3d, m), this.pencil.controls.rotatePolarTo(
|
|
141008
141070
|
this.pencil.camera.up.z === 1 ? Math.PI / 180 * 70 : Math.PI / 180 * 160,
|
|
141009
141071
|
m
|
|
@@ -141011,7 +141073,7 @@ class City$1 extends Base {
|
|
|
141011
141073
|
});
|
|
141012
141074
|
}
|
|
141013
141075
|
initVis() {
|
|
141014
|
-
return
|
|
141076
|
+
return N0(this, null, function* () {
|
|
141015
141077
|
const { fitTo: r, jsonName: m, planeOut: C } = this.options, _ = this.adcode, I = this.loader, O = this.options.showBuilding && I.getAsset(`/cityGzip/Building${m}.json.gzip`), ve = this.options.showRoad && I.getAsset(`/cityGzip/Road${m}.json.gzip`), Ce = this.options.showRiver && I.getAsset(`/cityGzip/River${m}.json.gzip`), Pe = this.options.showGrassland && I.getAsset(`/cityGzip/Grassland${m}.json.gzip`), Ne = {};
|
|
141016
141078
|
[
|
|
141017
141079
|
...(Ce == null ? void 0 : Ce.features) || [],
|
|
@@ -141075,7 +141137,7 @@ class City$1 extends Base {
|
|
|
141075
141137
|
});
|
|
141076
141138
|
}
|
|
141077
141139
|
fitToTarget(r, m) {
|
|
141078
|
-
return
|
|
141140
|
+
return N0(this, null, function* () {
|
|
141079
141141
|
const C = this.lead.getObject("Target", {
|
|
141080
141142
|
key: "cityTarget" + r
|
|
141081
141143
|
});
|
|
@@ -141109,7 +141171,7 @@ class City$1 extends Base {
|
|
|
141109
141171
|
});
|
|
141110
141172
|
}
|
|
141111
141173
|
drawBuilding() {
|
|
141112
|
-
return
|
|
141174
|
+
return N0(this, arguments, function* (r = {}) {
|
|
141113
141175
|
var _;
|
|
141114
141176
|
if (!r.json) {
|
|
141115
141177
|
console.warn(" json:Building");
|
|
@@ -141147,7 +141209,7 @@ class City$1 extends Base {
|
|
|
141147
141209
|
});
|
|
141148
141210
|
}
|
|
141149
141211
|
drawArea() {
|
|
141150
|
-
return
|
|
141212
|
+
return N0(this, arguments, function* (r = {}) {
|
|
141151
141213
|
var O;
|
|
141152
141214
|
if (!r.json) {
|
|
141153
141215
|
console.warn(" json:drawGeography");
|
|
@@ -141188,7 +141250,7 @@ class City$1 extends Base {
|
|
|
141188
141250
|
});
|
|
141189
141251
|
}
|
|
141190
141252
|
drawRoad() {
|
|
141191
|
-
return
|
|
141253
|
+
return N0(this, arguments, function* (r = {}) {
|
|
141192
141254
|
var I;
|
|
141193
141255
|
if (!r.json) {
|
|
141194
141256
|
console.warn(" json:Road");
|
|
@@ -141269,7 +141331,7 @@ class Countries extends pt {
|
|
|
141269
141331
|
}, r);
|
|
141270
141332
|
}
|
|
141271
141333
|
create() {
|
|
141272
|
-
return
|
|
141334
|
+
return N0(this, null, function* () {
|
|
141273
141335
|
const {
|
|
141274
141336
|
geojson: r,
|
|
141275
141337
|
mats: m,
|
|
@@ -141289,9 +141351,9 @@ class Countries extends pt {
|
|
|
141289
141351
|
});
|
|
141290
141352
|
const ke = this.options.hasTop || this.options.hasSide, Ue = this.options.hasLine;
|
|
141291
141353
|
I || (Fe = [
|
|
141292
|
-
{ coords: Fe.
|
|
141354
|
+
{ coords: Fe.flatMap(({ coords: ht }) => ht), properties: {} }
|
|
141293
141355
|
]), yield Promise.all(
|
|
141294
|
-
Fe.
|
|
141356
|
+
Fe.flatMap((ht) => [
|
|
141295
141357
|
ke && O.geoGeometry("conicPolygon", {
|
|
141296
141358
|
mesaage: {
|
|
141297
141359
|
start: [this.options.start],
|
|
@@ -141303,11 +141365,12 @@ class Countries extends pt {
|
|
|
141303
141365
|
bbox: this.options.bbox,
|
|
141304
141366
|
hasSide: C
|
|
141305
141367
|
},
|
|
141306
|
-
cb: (at) =>
|
|
141368
|
+
cb: (at) => N0(this, null, function* () {
|
|
141307
141369
|
var ct, lt;
|
|
141308
141370
|
const Ae = yield ve.draw(
|
|
141309
141371
|
"ConicPolygon",
|
|
141310
141372
|
{
|
|
141373
|
+
key: `$p:-${ht.properties.adcode || ht.properties.iso_a2 || "conicPolygon"}`,
|
|
141311
141374
|
geometry: at,
|
|
141312
141375
|
material: C ? [Pe, Ce] : Pe,
|
|
141313
141376
|
hasSide: C
|
|
@@ -141323,11 +141386,12 @@ class Countries extends pt {
|
|
|
141323
141386
|
lineWidth: [1],
|
|
141324
141387
|
coordinatesArr: ht.coords
|
|
141325
141388
|
},
|
|
141326
|
-
cb: (at) =>
|
|
141389
|
+
cb: (at) => N0(this, null, function* () {
|
|
141327
141390
|
var ct;
|
|
141328
141391
|
const Ae = yield ve.draw(
|
|
141329
141392
|
"Line",
|
|
141330
141393
|
{
|
|
141394
|
+
key: `$p:-${ht.properties.adcode || ht.properties.iso_a2 || "conicLine"}`,
|
|
141331
141395
|
geometry: at,
|
|
141332
141396
|
material: Ne,
|
|
141333
141397
|
onTop: 2
|
|
@@ -141337,7 +141401,7 @@ class Countries extends pt {
|
|
|
141337
141401
|
Ae.object3d.name = (ct = ht.properties) != null && ct.name ? ht.properties.name + "-线" : "线", Ae.userData = D0({}, ht.properties), this.lineArr.push(Ae);
|
|
141338
141402
|
})
|
|
141339
141403
|
})
|
|
141340
|
-
].filter(Boolean))
|
|
141404
|
+
].filter(Boolean))
|
|
141341
141405
|
);
|
|
141342
141406
|
});
|
|
141343
141407
|
}
|
|
@@ -141351,7 +141415,7 @@ class SphereShadow extends pt {
|
|
|
141351
141415
|
}, r);
|
|
141352
141416
|
}
|
|
141353
141417
|
create() {
|
|
141354
|
-
return
|
|
141418
|
+
return N0(this, null, function* () {
|
|
141355
141419
|
const r = new SphereGeometry(this.options.radius, 128, 90), m = new MeshBasicMaterial();
|
|
141356
141420
|
this.createMesh(r, m), this.scale.multiplyScalar(1.001), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "阴影面", this.hide();
|
|
141357
141421
|
});
|
|
@@ -141368,7 +141432,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141368
141432
|
colorCorrection: !1
|
|
141369
141433
|
});
|
|
141370
141434
|
}, v.initMaterial = function() {
|
|
141371
|
-
return
|
|
141435
|
+
return N0(this, null, function* () {
|
|
141372
141436
|
const t = this.loader, r = t.getAsset("/image/earth2/basic.jpg"), m = t.getAsset("/image/earth2/NormalMap.jpg"), C = new MeshStandardMaterial({
|
|
141373
141437
|
name: "地球材质",
|
|
141374
141438
|
map: r,
|
|
@@ -141380,7 +141444,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141380
141444
|
this.mList.add("earthMaterial", C);
|
|
141381
141445
|
});
|
|
141382
141446
|
}, v.initVis = function() {
|
|
141383
|
-
return
|
|
141447
|
+
return N0(this, null, function* () {
|
|
141384
141448
|
v.pencil.camera.near = 1, v.pencil.camera.far = 3e3, v.pencil.camera.fov = 12, v.pencil.camera.updateProjectionMatrix();
|
|
141385
141449
|
const [t, r] = yield Promise.all([
|
|
141386
141450
|
this.lead.draw("Light", {
|
|
@@ -141400,6 +141464,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141400
141464
|
};
|
|
141401
141465
|
}, chinaPlate = (v) => {
|
|
141402
141466
|
v.extendsOptions = Ui(D0({}, v.extendsOptions), {
|
|
141467
|
+
otherMapDepth: () => v.options.otherMapDepth,
|
|
141403
141468
|
copyChinaPlane: v.options.copyChinaPlane
|
|
141404
141469
|
}), v.loaderAdd = function() {
|
|
141405
141470
|
const { loader: t } = this;
|
|
@@ -141411,7 +141476,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141411
141476
|
colorCorrection: !1
|
|
141412
141477
|
});
|
|
141413
141478
|
}, v.initVis = function() {
|
|
141414
|
-
return
|
|
141479
|
+
return N0(this, null, function* () {
|
|
141415
141480
|
yield this.initLight();
|
|
141416
141481
|
const [, t, r, m] = yield Promise.all([
|
|
141417
141482
|
this.lead.draw("Earth", {
|
|
@@ -141419,6 +141484,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141419
141484
|
rotationY: Math.PI / 180 * -90
|
|
141420
141485
|
}),
|
|
141421
141486
|
this.lead.draw("Countries", {
|
|
141487
|
+
key: "countries",
|
|
141422
141488
|
geojson: {
|
|
141423
141489
|
type: "FeatureCollection",
|
|
141424
141490
|
features: worldJson.features.filter(
|
|
@@ -141428,14 +141494,16 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141428
141494
|
}
|
|
141429
141495
|
)
|
|
141430
141496
|
},
|
|
141431
|
-
depth:
|
|
141497
|
+
depth: this.options.otherMapDepth,
|
|
141432
141498
|
start: this.options.radius,
|
|
141433
141499
|
mats: this.mList.getMultiple("world"),
|
|
141434
|
-
hasSide:
|
|
141435
|
-
hasTop:
|
|
141436
|
-
areaGroup: !1
|
|
141500
|
+
hasSide: !!this.options.otherMapDepth,
|
|
141501
|
+
hasTop: !!this.options.otherMapDepth,
|
|
141502
|
+
areaGroup: !1,
|
|
141503
|
+
bbox: [-180, -90, 180, 90]
|
|
141437
141504
|
}),
|
|
141438
141505
|
this.lead.draw("Countries", {
|
|
141506
|
+
key: "chinaOutLine",
|
|
141439
141507
|
geojson: chinaLiteJson,
|
|
141440
141508
|
depth: 0,
|
|
141441
141509
|
start: this.options.radius + this.options.mapDepth,
|
|
@@ -141444,6 +141512,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141444
141512
|
hasTop: !1
|
|
141445
141513
|
}),
|
|
141446
141514
|
this.lead.draw("Countries", {
|
|
141515
|
+
key: "china",
|
|
141447
141516
|
geojson: chinaJson,
|
|
141448
141517
|
depth: this.options.mapDepth,
|
|
141449
141518
|
start: this.options.radius,
|
|
@@ -141452,9 +141521,10 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141452
141521
|
lineDuration: 6e3
|
|
141453
141522
|
})
|
|
141454
141523
|
]);
|
|
141455
|
-
if (t.object3d.name = "世界", r.object3d.name = "中国边界", m.object3d.name = "中国", this.map = m, this.options.copyChinaPlane) {
|
|
141524
|
+
if (t.object3d.name = "世界", r.object3d.name = "中国边界", m.object3d.name = "中国", v.initBaseObjectUserData(r.children[0]), this.map = m, this.options.copyChinaPlane) {
|
|
141456
141525
|
this.options.copyChinaPlane;
|
|
141457
141526
|
const C = yield this.lead.draw("Countries", {
|
|
141527
|
+
key: "chinaCopy",
|
|
141458
141528
|
geojson: chinaJson,
|
|
141459
141529
|
depth: this.options.mapDepth,
|
|
141460
141530
|
start: this.options.radius,
|
|
@@ -141481,7 +141551,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141481
141551
|
), yield this.pencil.controls.dollyTo(99.11560932366835, !1);
|
|
141482
141552
|
});
|
|
141483
141553
|
}, v.initMaterial = function() {
|
|
141484
|
-
return
|
|
141554
|
+
return N0(this, null, function* () {
|
|
141485
141555
|
const t = this.loader, r = new MeshStandardMaterial({
|
|
141486
141556
|
side: DoubleSide,
|
|
141487
141557
|
name: "顶面",
|
|
@@ -141504,17 +141574,21 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141504
141574
|
lineWidth: 0.6,
|
|
141505
141575
|
sizeAttenuation: !1,
|
|
141506
141576
|
color: new Color$1("#80abaf")
|
|
141507
|
-
}), I =
|
|
141577
|
+
}), I = new MeshBasicMaterial({
|
|
141578
|
+
name: "世界顶面"
|
|
141579
|
+
}), O = new MeshBasicMaterial({
|
|
141580
|
+
name: "世界侧面"
|
|
141581
|
+
}), ve = t.getAsset("/image/earth/basic.webp"), Ce = new MeshStandardMaterial({
|
|
141508
141582
|
name: "地球材质",
|
|
141509
|
-
map:
|
|
141583
|
+
map: ve,
|
|
141510
141584
|
color: new Color$1(2397309),
|
|
141511
141585
|
metalness: 0.84,
|
|
141512
141586
|
roughness: 0.51
|
|
141513
|
-
}),
|
|
141514
|
-
|
|
141515
|
-
const
|
|
141587
|
+
}), Pe = t.getAsset("/image/earth/flyline.png");
|
|
141588
|
+
Pe.wrapS = RepeatWrapping, Pe.wrapT = RepeatWrapping, Pe.repeat.set(0.5, 0.5);
|
|
141589
|
+
const Ne = new _e$1({
|
|
141516
141590
|
name: "省份边界",
|
|
141517
|
-
map:
|
|
141591
|
+
map: Pe,
|
|
141518
141592
|
lineWidth: 0.6,
|
|
141519
141593
|
sizeAttenuation: !1,
|
|
141520
141594
|
transparent: !0,
|
|
@@ -141523,17 +141597,19 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141523
141597
|
this.mList.addMultiple("plane", {
|
|
141524
141598
|
topMat: r,
|
|
141525
141599
|
borderMat: m,
|
|
141526
|
-
outLine:
|
|
141600
|
+
outLine: Ne
|
|
141527
141601
|
}), this.mList.addMultiple("world", {
|
|
141602
|
+
topMat: I,
|
|
141603
|
+
borderMat: O,
|
|
141528
141604
|
outLine: _
|
|
141529
141605
|
}), this.mList.addMultiple("china", {
|
|
141530
141606
|
outLine: C
|
|
141531
|
-
}), this.mList.add("earthMaterial",
|
|
141607
|
+
}), this.mList.add("earthMaterial", Ce);
|
|
141532
141608
|
});
|
|
141533
141609
|
};
|
|
141534
141610
|
}, countryPlate = (v) => {
|
|
141535
141611
|
v.initVis = function() {
|
|
141536
|
-
return
|
|
141612
|
+
return N0(this, null, function* () {
|
|
141537
141613
|
yield this.initLight();
|
|
141538
141614
|
const [, t] = yield Promise.all([
|
|
141539
141615
|
this.lead.draw("Earth", {
|
|
@@ -141541,6 +141617,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141541
141617
|
rotationY: Math.PI / 180 * -90
|
|
141542
141618
|
}),
|
|
141543
141619
|
this.lead.draw("Countries", {
|
|
141620
|
+
key: "countries",
|
|
141544
141621
|
geojson: worldJson,
|
|
141545
141622
|
depth: this.options.mapDepth,
|
|
141546
141623
|
start: this.options.radius,
|
|
@@ -141555,7 +141632,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141555
141632
|
this.map = t, 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);
|
|
141556
141633
|
});
|
|
141557
141634
|
}, v.initMaterial = function() {
|
|
141558
|
-
return
|
|
141635
|
+
return N0(this, null, function* () {
|
|
141559
141636
|
const t = new MeshStandardMaterial({
|
|
141560
141637
|
side: DoubleSide,
|
|
141561
141638
|
name: "侧面",
|
|
@@ -141598,7 +141675,6 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141598
141675
|
mapDepth: () => this.options.mapDepth
|
|
141599
141676
|
});
|
|
141600
141677
|
b0(this, "map");
|
|
141601
|
-
b0(this, "autoRotateSpeed", 0);
|
|
141602
141678
|
}
|
|
141603
141679
|
get mapArea() {
|
|
141604
141680
|
return this.map.areaArr;
|
|
@@ -141606,16 +141682,17 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141606
141682
|
setOptions(r) {
|
|
141607
141683
|
super.setOptions(D0({
|
|
141608
141684
|
mapDepth: 1.4,
|
|
141685
|
+
otherMapDepth: 0,
|
|
141609
141686
|
radius: 30,
|
|
141610
141687
|
style: "chinaPlate",
|
|
141611
141688
|
copyChinaPlane: !1
|
|
141612
141689
|
}, r)), this.initSettingsObj = {
|
|
141613
|
-
|
|
141690
|
+
autoRotateSpeed: 0
|
|
141614
141691
|
}, styles[this.options.style](this);
|
|
141615
141692
|
}
|
|
141616
141693
|
handleSetting(r, m) {
|
|
141617
|
-
return
|
|
141618
|
-
return yield yn(Zn.prototype, this, "handleSetting").call(this, r, m), r === "
|
|
141694
|
+
return N0(this, null, function* () {
|
|
141695
|
+
return yield yn(Zn.prototype, this, "handleSetting").call(this, r, m), r === "autoRotateSpeed" ? this.pencil.autoRotate(m) : r === "autoRotate" && (m ? this.settings.autoRotateSpeed = -20 : this.settings.autoRotateSpeed = 0), m;
|
|
141619
141696
|
});
|
|
141620
141697
|
}
|
|
141621
141698
|
show() {
|
|
@@ -141626,11 +141703,11 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141626
141703
|
r.addEventListener("controlstart", () => {
|
|
141627
141704
|
this.pencil.autoRotate(0);
|
|
141628
141705
|
}), r.addEventListener("controlend", () => {
|
|
141629
|
-
this.pencil.autoRotate(this.autoRotateSpeed);
|
|
141706
|
+
this.pencil.autoRotate(this.settings.autoRotateSpeed);
|
|
141630
141707
|
});
|
|
141631
141708
|
}
|
|
141632
141709
|
initLight() {
|
|
141633
|
-
return
|
|
141710
|
+
return N0(this, null, function* () {
|
|
141634
141711
|
const [r, m] = yield Promise.all([
|
|
141635
141712
|
this.lead.draw("Light", {
|
|
141636
141713
|
type: "RectAreaLight",
|
|
@@ -141673,7 +141750,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141673
141750
|
}
|
|
141674
141751
|
}
|
|
141675
141752
|
addAreaPlaneByProperty(r, m, C) {
|
|
141676
|
-
return
|
|
141753
|
+
return N0(this, null, function* () {
|
|
141677
141754
|
if (!this.map) return;
|
|
141678
141755
|
const I = this.map.options.geojson.features.find(
|
|
141679
141756
|
(O) => O.properties && O.properties[r] === m
|
|
@@ -141714,7 +141791,7 @@ const objs$1 = Ui(D0({}, objs$3), {
|
|
|
141714
141791
|
};
|
|
141715
141792
|
b0(Zn, "VisName", "earth");
|
|
141716
141793
|
let index$1 = Zn;
|
|
141717
|
-
const timeOut = (v) =>
|
|
141794
|
+
const timeOut = (v) => N0(void 0, null, function* () {
|
|
141718
141795
|
const t = makePromiseCreator();
|
|
141719
141796
|
return setTimeout(() => {
|
|
141720
141797
|
t.resolve();
|
|
@@ -141853,7 +141930,7 @@ let PlaneMap$1 = class extends pt {
|
|
|
141853
141930
|
}, r), ((m = this.options.projection.rotate) == null ? void 0 : m[0]) === -160 && (this.options.projection.projectionType === "winkel3" ? this.splitPolygons = 100 : this.splitPolygons = 300);
|
|
141854
141931
|
}
|
|
141855
141932
|
create() {
|
|
141856
|
-
return
|
|
141933
|
+
return N0(this, null, function* () {
|
|
141857
141934
|
const {
|
|
141858
141935
|
geojson: r,
|
|
141859
141936
|
extrudeLineGeojson: m,
|
|
@@ -141867,7 +141944,7 @@ let PlaneMap$1 = class extends pt {
|
|
|
141867
141944
|
const Ce = this.pencil.lead;
|
|
141868
141945
|
if (_) {
|
|
141869
141946
|
const Lt = yield Promise.all(
|
|
141870
|
-
r.features.map((Xt) =>
|
|
141947
|
+
r.features.map((Xt) => N0(this, null, function* () {
|
|
141871
141948
|
const { properties: Zt } = Xt, wt = `${this.getPropertiesKey(Zt)}`, Vt = yield Ce.draw("Group", {
|
|
141872
141949
|
target: this,
|
|
141873
141950
|
key: wt
|
|
@@ -141928,11 +142005,11 @@ let PlaneMap$1 = class extends pt {
|
|
|
141928
142005
|
});
|
|
141929
142006
|
}
|
|
141930
142007
|
addArea(r, m) {
|
|
141931
|
-
return
|
|
142008
|
+
return N0(this, null, function* () {
|
|
141932
142009
|
const { bbox: C, material: _, onTop: I } = m, O = this.geojson2Meta(r), ve = this.pencil.getPlugin("worker"), Ce = this.pencil.lead;
|
|
141933
142010
|
if (this.pencil.mList, m.areaGroup)
|
|
141934
142011
|
return yield Promise.all(
|
|
141935
|
-
O.map((Pe) =>
|
|
142012
|
+
O.map((Pe) => N0(this, null, function* () {
|
|
141936
142013
|
const { coords: Ne, properties: Fe } = Pe, ke = this.findGroup(this.getPropertiesKey(Fe)), Ue = yield ve.geoGeometry(
|
|
141937
142014
|
"extrudePolygon",
|
|
141938
142015
|
{
|
|
@@ -141992,11 +142069,11 @@ let PlaneMap$1 = class extends pt {
|
|
|
141992
142069
|
});
|
|
141993
142070
|
}
|
|
141994
142071
|
addLine(r, m) {
|
|
141995
|
-
return
|
|
142072
|
+
return N0(this, null, function* () {
|
|
141996
142073
|
const { material: C, onTop: _ } = m, I = this.geojson2Meta(r), O = this.pencil.getPlugin("worker"), ve = this.pencil.lead;
|
|
141997
142074
|
if (m.areaGroup)
|
|
141998
142075
|
return yield Promise.all(
|
|
141999
|
-
I.map((Ce) =>
|
|
142076
|
+
I.map((Ce) => N0(this, null, function* () {
|
|
142000
142077
|
const { coords: Pe, properties: Ne } = Ce, Fe = this.findGroup(this.getPropertiesKey(Ne)), ke = yield O.geoGeometry("line", {
|
|
142001
142078
|
mesaage: {
|
|
142002
142079
|
coordinatesArr: Pe,
|
|
@@ -142175,10 +142252,10 @@ class ContinentsBg extends pt {
|
|
|
142175
142252
|
this.options = r;
|
|
142176
142253
|
}
|
|
142177
142254
|
create() {
|
|
142178
|
-
return
|
|
142255
|
+
return N0(this, null, function* () {
|
|
142179
142256
|
const { depth: r } = this.options, m = this.pencil.mList, C = this.pencil.lead, _ = m.getMultiple("continents");
|
|
142180
142257
|
this.createGroup(), this.object3d.name = "大洲", yield Promise.all(
|
|
142181
|
-
Object.values(continentsLiteJson).map((I) =>
|
|
142258
|
+
Object.values(continentsLiteJson).map((I) => N0(this, null, function* () {
|
|
142182
142259
|
const O = I.features[0], ve = O.properties.adcode;
|
|
142183
142260
|
if (ve === 10) return;
|
|
142184
142261
|
const Ce = centroid(O).geometry.coordinates;
|
|
@@ -142262,7 +142339,7 @@ class PlaneMap extends pt {
|
|
|
142262
142339
|
});
|
|
142263
142340
|
}
|
|
142264
142341
|
create() {
|
|
142265
|
-
return
|
|
142342
|
+
return N0(this, null, function* () {
|
|
142266
142343
|
const { geojson: r, bbox: m } = this.options, C = this.geojson2Meta(r), _ = this.pencil.getPlugin("worker"), I = this.pencil.lead, ve = yield this.pencil.loader.load("/1.png"), Ce = yield _.geoGeometry("extrudePolygon", {
|
|
142267
142344
|
mesaage: {
|
|
142268
142345
|
coordinatesArr: C.map(({ coords: ct }) => ct).flat(),
|
|
@@ -142365,7 +142442,7 @@ const getLabelElement = (v) => {
|
|
|
142365
142442
|
const t = this.loader;
|
|
142366
142443
|
t.add(["/image/map/jianbian.webp"]), t.add(["/image/map/hp2.webp", "/image/map/fx2.webp"]);
|
|
142367
142444
|
}, v.initMaterial = function() {
|
|
142368
|
-
return
|
|
142445
|
+
return N0(this, null, function* () {
|
|
142369
142446
|
const t = this.loader, r = this.mList, m = (() => {
|
|
142370
142447
|
const C = t.getAsset("/image/map/hp2.webp");
|
|
142371
142448
|
C.center.set(0.5, 0.5), C.repeat.set(0.97, 1.01);
|
|
@@ -142409,7 +142486,7 @@ const getLabelElement = (v) => {
|
|
|
142409
142486
|
return;
|
|
142410
142487
|
}
|
|
142411
142488
|
v.initMaterial = function() {
|
|
142412
|
-
return
|
|
142489
|
+
return N0(this, null, function* () {
|
|
142413
142490
|
const t = this.mList, r = (() => {
|
|
142414
142491
|
const m = new MeshBasicMaterial({
|
|
142415
142492
|
name: "顶面",
|
|
@@ -142444,7 +142521,7 @@ const getLabelElement = (v) => {
|
|
|
142444
142521
|
};
|
|
142445
142522
|
}, china = (v) => {
|
|
142446
142523
|
v.options.lineOffset = 5e-3, v.loaderAdd = function() {
|
|
142447
|
-
return
|
|
142524
|
+
return N0(this, null, function* () {
|
|
142448
142525
|
this.loader.add([
|
|
142449
142526
|
"/image/map/jianbian.webp",
|
|
142450
142527
|
"/image/map/hp.webp",
|
|
@@ -142452,7 +142529,7 @@ const getLabelElement = (v) => {
|
|
|
142452
142529
|
]), this.loaderAddBg();
|
|
142453
142530
|
});
|
|
142454
142531
|
}, v.initMaterial = function() {
|
|
142455
|
-
return
|
|
142532
|
+
return N0(this, null, function* () {
|
|
142456
142533
|
const t = this.loader, r = (() => {
|
|
142457
142534
|
const m = new MeshStandardMaterial({
|
|
142458
142535
|
name: "顶面",
|
|
@@ -142488,11 +142565,11 @@ const getLabelElement = (v) => {
|
|
|
142488
142565
|
};
|
|
142489
142566
|
}, base$1 = (v) => {
|
|
142490
142567
|
v.loaderAdd = function() {
|
|
142491
|
-
return
|
|
142568
|
+
return N0(this, null, function* () {
|
|
142492
142569
|
this.loader.add(["/image/map/jianbian.webp"]), this.loaderAddBg();
|
|
142493
142570
|
});
|
|
142494
142571
|
}, v.initMaterial = function() {
|
|
142495
|
-
return
|
|
142572
|
+
return N0(this, null, function* () {
|
|
142496
142573
|
const t = this.loader, r = (() => {
|
|
142497
142574
|
const m = new MeshBasicMaterial({
|
|
142498
142575
|
name: "顶面",
|
|
@@ -142548,7 +142625,7 @@ const getLabelElement = (v) => {
|
|
|
142548
142625
|
}, v.options.parentBg && (v.extendsOptions.parentBgDepth = () => v.options.parentBgDepth), v.loaderAdd = function() {
|
|
142549
142626
|
this.loader.add(["/image/map2/side.png"]);
|
|
142550
142627
|
}, v.initMaterial = function() {
|
|
142551
|
-
return
|
|
142628
|
+
return N0(this, null, function* () {
|
|
142552
142629
|
const r = this.loader, m = (() => {
|
|
142553
142630
|
const C = new MeshBasicMaterial({
|
|
142554
142631
|
name: "板块顶面",
|
|
@@ -142584,13 +142661,13 @@ const getLabelElement = (v) => {
|
|
|
142584
142661
|
};
|
|
142585
142662
|
const t = v.init.bind(v);
|
|
142586
142663
|
v.init = function() {
|
|
142587
|
-
return
|
|
142664
|
+
return N0(this, null, function* () {
|
|
142588
142665
|
yield t(), yield this.initCityOnMap(this.mapInfo.adcode);
|
|
142589
142666
|
});
|
|
142590
142667
|
};
|
|
142591
142668
|
}, base = (v) => {
|
|
142592
142669
|
if (v.initMaterialBg = function() {
|
|
142593
|
-
return
|
|
142670
|
+
return N0(this, null, function* () {
|
|
142594
142671
|
const t = this.getRoomEnvMap();
|
|
142595
142672
|
if (this.options.parentBg) {
|
|
142596
142673
|
if (this.options.adcode !== 1e5) {
|
|
@@ -142674,11 +142751,11 @@ const getLabelElement = (v) => {
|
|
|
142674
142751
|
return;
|
|
142675
142752
|
}
|
|
142676
142753
|
v.loaderAdd = function() {
|
|
142677
|
-
return
|
|
142754
|
+
return N0(this, null, function* () {
|
|
142678
142755
|
this.loaderAddBg();
|
|
142679
142756
|
});
|
|
142680
142757
|
}, v.initMaterial = function() {
|
|
142681
|
-
return
|
|
142758
|
+
return N0(this, null, function* () {
|
|
142682
142759
|
const t = (() => {
|
|
142683
142760
|
const r = new MeshBasicMaterial({
|
|
142684
142761
|
name: "板块顶面",
|
|
@@ -142834,12 +142911,12 @@ const getLabelElement = (v) => {
|
|
|
142834
142911
|
})), 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);
|
|
142835
142912
|
}
|
|
142836
142913
|
handleSetting(r, m) {
|
|
142837
|
-
return
|
|
142914
|
+
return N0(this, null, function* () {
|
|
142838
142915
|
return yield yn(xn.prototype, this, "handleSetting").call(this, r, m), r === "label" ? m === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels()) : r === "labelLite" ? m === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.label = !1, yield this.settings.label, this.options.showLabel = "lite", yield this.drawLabels()) : r === "shadowMap" && (m === !1 ? this.shadowMapDisabled() : yield this.shadowMapEnabled()), m;
|
|
142839
142916
|
});
|
|
142840
142917
|
}
|
|
142841
142918
|
init() {
|
|
142842
|
-
return
|
|
142919
|
+
return N0(this, null, function* () {
|
|
142843
142920
|
const { adcode: r } = this.options;
|
|
142844
142921
|
this.options.center && (this.pcenter = this.options.center), this.projection = f({
|
|
142845
142922
|
center: this.pcenter,
|
|
@@ -142864,7 +142941,7 @@ const getLabelElement = (v) => {
|
|
|
142864
142941
|
});
|
|
142865
142942
|
}
|
|
142866
142943
|
initCityVis(C) {
|
|
142867
|
-
return
|
|
142944
|
+
return N0(this, arguments, function* (r, m = { clip: !1, grey: !1 }) {
|
|
142868
142945
|
var ve;
|
|
142869
142946
|
(ve = this.options.fixCity) != null && ve[r] && (r = this.options.fixCity[r]);
|
|
142870
142947
|
const _ = this.options.center, I = this.options.jsonNameObj[r], O = new City({
|
|
@@ -142896,7 +142973,7 @@ const getLabelElement = (v) => {
|
|
|
142896
142973
|
});
|
|
142897
142974
|
}
|
|
142898
142975
|
initCityOnMap(r) {
|
|
142899
|
-
return
|
|
142976
|
+
return N0(this, null, function* () {
|
|
142900
142977
|
if (this.getAdcodeShowLevel(r) !== "city") {
|
|
142901
142978
|
const _ = findAdcodeInfo(r).parent;
|
|
142902
142979
|
this.getAdcodeShowLevel(_) === "city" && (yield this.initCityOnMap(_));
|
|
@@ -142915,7 +142992,7 @@ const getLabelElement = (v) => {
|
|
|
142915
142992
|
});
|
|
142916
142993
|
}
|
|
142917
142994
|
initVisBg() {
|
|
142918
|
-
return
|
|
142995
|
+
return N0(this, null, function* () {
|
|
142919
142996
|
let r = 1e3, m = 1e3;
|
|
142920
142997
|
const C = new Vector3(0, 0, 0);
|
|
142921
142998
|
if (this.options.parentBg) {
|
|
@@ -142997,7 +143074,7 @@ const getLabelElement = (v) => {
|
|
|
142997
143074
|
});
|
|
142998
143075
|
}
|
|
142999
143076
|
initVis(r) {
|
|
143000
|
-
return
|
|
143077
|
+
return N0(this, null, function* () {
|
|
143001
143078
|
var m;
|
|
143002
143079
|
if (yield this.setAdcode({
|
|
143003
143080
|
adcodes: [r],
|
|
@@ -143030,7 +143107,7 @@ const getLabelElement = (v) => {
|
|
|
143030
143107
|
);
|
|
143031
143108
|
}
|
|
143032
143109
|
initMaterialBg() {
|
|
143033
|
-
return
|
|
143110
|
+
return N0(this, null, function* () {
|
|
143034
143111
|
if (this.options.parentBg) {
|
|
143035
143112
|
const r = (() => {
|
|
143036
143113
|
const m = new MeshStandardMaterial({
|
|
@@ -143113,7 +143190,7 @@ const getLabelElement = (v) => {
|
|
|
143113
143190
|
}
|
|
143114
143191
|
}
|
|
143115
143192
|
addAreaPlaneByProperty(r, m, C) {
|
|
143116
|
-
return
|
|
143193
|
+
return N0(this, null, function* () {
|
|
143117
143194
|
if (!this.map) return;
|
|
143118
143195
|
const I = this.map.options.geojson.features.find(
|
|
143119
143196
|
(O) => O.properties && O.properties[r] === m
|
|
@@ -143172,7 +143249,7 @@ const getLabelElement = (v) => {
|
|
|
143172
143249
|
});
|
|
143173
143250
|
}
|
|
143174
143251
|
showAction() {
|
|
143175
|
-
return
|
|
143252
|
+
return N0(this, null, function* () {
|
|
143176
143253
|
yn(xn.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
|
|
143177
143254
|
const r = this.lead.group;
|
|
143178
143255
|
if (this.mapHistory[0]) {
|
|
@@ -143199,7 +143276,7 @@ const getLabelElement = (v) => {
|
|
|
143199
143276
|
});
|
|
143200
143277
|
}
|
|
143201
143278
|
hide() {
|
|
143202
|
-
return
|
|
143279
|
+
return N0(this, null, function* () {
|
|
143203
143280
|
if (!this.showState) return;
|
|
143204
143281
|
const r = this.lead.group;
|
|
143205
143282
|
yield sinusoidalInOut({
|
|
@@ -143212,7 +143289,7 @@ const getLabelElement = (v) => {
|
|
|
143212
143289
|
});
|
|
143213
143290
|
}
|
|
143214
143291
|
shadowMapEnabled() {
|
|
143215
|
-
return
|
|
143292
|
+
return N0(this, null, function* () {
|
|
143216
143293
|
if (this.pencil.scene.userData.shadowMapEnabled) return;
|
|
143217
143294
|
this.pencil.scene.userData.shadowMapEnabled = !0;
|
|
143218
143295
|
const r = yield this.lead.draw("Light", {
|
|
@@ -143286,7 +143363,7 @@ const getLabelElement = (v) => {
|
|
|
143286
143363
|
return m;
|
|
143287
143364
|
}
|
|
143288
143365
|
showMap(_) {
|
|
143289
|
-
return
|
|
143366
|
+
return N0(this, arguments, function* ({
|
|
143290
143367
|
adcode: r,
|
|
143291
143368
|
adcodes: m,
|
|
143292
143369
|
duration: C = 1e3
|
|
@@ -143299,7 +143376,7 @@ const getLabelElement = (v) => {
|
|
|
143299
143376
|
});
|
|
143300
143377
|
}
|
|
143301
143378
|
drawLabels() {
|
|
143302
|
-
return
|
|
143379
|
+
return N0(this, null, function* () {
|
|
143303
143380
|
var C;
|
|
143304
143381
|
const r = this.options.showLabel;
|
|
143305
143382
|
if (!((C = this.mapArea) != null && C.length) || !r) return;
|
|
@@ -143311,7 +143388,7 @@ const getLabelElement = (v) => {
|
|
|
143311
143388
|
},
|
|
143312
143389
|
this.group
|
|
143313
143390
|
), m.object3d.name = "地图标签组", yield Promise.all(
|
|
143314
|
-
this.mapArea.map((_) =>
|
|
143391
|
+
this.mapArea.map((_) => N0(this, null, function* () {
|
|
143315
143392
|
let { name: I, adcode: O, centroid: ve } = _.userData;
|
|
143316
143393
|
const { DistrictID: Ce, DistName: Pe, iso_a2: Ne, center: Fe } = _.userData;
|
|
143317
143394
|
if (O = O || Ne || Ce, ve = ve || Fe, I = I || Pe, !ve)
|
|
@@ -143374,7 +143451,7 @@ const getLabelElement = (v) => {
|
|
|
143374
143451
|
return chinaLiteJson.features[0].geometry.coordinates.some((m) => booleanPointInPolygon$1(point(r), polygon(m)));
|
|
143375
143452
|
}
|
|
143376
143453
|
getGeojson(r, m = !1) {
|
|
143377
|
-
return
|
|
143454
|
+
return N0(this, null, function* () {
|
|
143378
143455
|
var C, _, I, O;
|
|
143379
143456
|
return m ? this.options.extrudeLine ? (I = this.options.extrudeLineGeojsonMap) != null && I[r] ? { res: (O = this.options.extrudeLineGeojsonMap) == null ? void 0 : O[r] } : yield jsonFetch(
|
|
143380
143457
|
`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`
|
|
@@ -143386,7 +143463,7 @@ const getLabelElement = (v) => {
|
|
|
143386
143463
|
});
|
|
143387
143464
|
}
|
|
143388
143465
|
handleDrillDown(O) {
|
|
143389
|
-
return
|
|
143466
|
+
return N0(this, arguments, function* ({
|
|
143390
143467
|
adcode: r,
|
|
143391
143468
|
duration: m,
|
|
143392
143469
|
handleLook: C,
|
|
@@ -143430,7 +143507,7 @@ const getLabelElement = (v) => {
|
|
|
143430
143507
|
extrudelineBloom: I
|
|
143431
143508
|
});
|
|
143432
143509
|
ke == null || ke.hide(), qt.position.setZ(zt);
|
|
143433
|
-
const kt = qt.position.z, Yt = () =>
|
|
143510
|
+
const kt = qt.position.z, Yt = () => N0(this, null, function* () {
|
|
143434
143511
|
yield sinusoidalInOut({
|
|
143435
143512
|
onUpdate: (Kt) => {
|
|
143436
143513
|
Vt !== kt && (qt.position.z = kt + (Vt - kt) * Kt);
|
|
@@ -143448,7 +143525,7 @@ const getLabelElement = (v) => {
|
|
|
143448
143525
|
enableTransition: m !== 0,
|
|
143449
143526
|
polarAngle: Kt == null ? void 0 : Kt.polarAngle,
|
|
143450
143527
|
azimuthAngle: Kt == null ? void 0 : Kt.azimuthAngle,
|
|
143451
|
-
handleStart: () =>
|
|
143528
|
+
handleStart: () => N0(this, null, function* () {
|
|
143452
143529
|
qt.position.z = kt, yield Yt();
|
|
143453
143530
|
})
|
|
143454
143531
|
});
|
|
@@ -143490,7 +143567,7 @@ const getLabelElement = (v) => {
|
|
|
143490
143567
|
r === 0 ? (this.pencil.camera.near = 1, this.pencil.camera.far = 1e3, this.pencil.camera.updateProjectionMatrix()) : (m === "country" || m === "province") && this.pencil.camera.near !== C.camera.near * 10 ? (this.pencil.camera.near = C.camera.near * 10, this.pencil.camera.updateProjectionMatrix()) : (m === "city" || m === "district") && this.pencil.camera.near !== C.camera.near && (this.pencil.camera.near = C.camera.near, this.pencil.camera.updateProjectionMatrix());
|
|
143491
143568
|
}
|
|
143492
143569
|
fitTo(Ce) {
|
|
143493
|
-
return
|
|
143570
|
+
return N0(this, arguments, function* (r, {
|
|
143494
143571
|
polarAngle: m,
|
|
143495
143572
|
azimuthAngle: C,
|
|
143496
143573
|
z: _,
|
|
@@ -143531,7 +143608,7 @@ const getLabelElement = (v) => {
|
|
|
143531
143608
|
});
|
|
143532
143609
|
}
|
|
143533
143610
|
drawPlaneMap(ve) {
|
|
143534
|
-
return
|
|
143611
|
+
return N0(this, arguments, function* ({
|
|
143535
143612
|
geojson: r,
|
|
143536
143613
|
extrudeLineGeojson: m,
|
|
143537
143614
|
bbox: C,
|
|
@@ -143584,7 +143661,7 @@ const getLabelElement = (v) => {
|
|
|
143584
143661
|
});
|
|
143585
143662
|
}
|
|
143586
143663
|
handleBack() {
|
|
143587
|
-
return
|
|
143664
|
+
return N0(this, arguments, function* ({
|
|
143588
143665
|
duration: r = 1e3,
|
|
143589
143666
|
handleLookBack: m = !0,
|
|
143590
143667
|
keepOne: C = !0
|
|
@@ -143615,7 +143692,7 @@ const getLabelElement = (v) => {
|
|
|
143615
143692
|
});
|
|
143616
143693
|
}
|
|
143617
143694
|
handleLookBack(r) {
|
|
143618
|
-
return
|
|
143695
|
+
return N0(this, null, function* () {
|
|
143619
143696
|
const { userControls: m, controls: C } = this.mapObj;
|
|
143620
143697
|
yield this.pencil.controls.setLookAt(
|
|
143621
143698
|
...m ? m.lookAt : C.lookAt,
|
|
@@ -143635,7 +143712,7 @@ const getLabelElement = (v) => {
|
|
|
143635
143712
|
return I;
|
|
143636
143713
|
}
|
|
143637
143714
|
setAdcode(C) {
|
|
143638
|
-
return
|
|
143715
|
+
return N0(this, arguments, function* ({
|
|
143639
143716
|
adcodes: r,
|
|
143640
143717
|
duration: m
|
|
143641
143718
|
}) {
|
|
@@ -143760,7 +143837,7 @@ function stringToUtf8ByteArray(v) {
|
|
|
143760
143837
|
}
|
|
143761
143838
|
let b = "/";
|
|
143762
143839
|
b === "/" && (b = "");
|
|
143763
|
-
const getMapConfig = (C, ..._) =>
|
|
143840
|
+
const getMapConfig = (C, ..._) => N0(void 0, [C, ..._], function* (v, t = b, r, m) {
|
|
143764
143841
|
if ((r == null ? void 0 : r.style) === "map2CityOnMap")
|
|
143765
143842
|
return getMapWithCityConfig(v, t, r, m);
|
|
143766
143843
|
if (v === 0)
|
|
@@ -143783,7 +143860,7 @@ const getMapConfig = (C, ..._) => K0(void 0, [C, ..._], function* (v, t = b, r,
|
|
|
143783
143860
|
m
|
|
143784
143861
|
);
|
|
143785
143862
|
}
|
|
143786
|
-
}), getMapWithCityConfig = (C, ..._) =>
|
|
143863
|
+
}), getMapWithCityConfig = (C, ..._) => N0(void 0, [C, ..._], function* (v, t = b, r, m) {
|
|
143787
143864
|
const I = findAdcodeInfo(v);
|
|
143788
143865
|
return extendMapConfig(
|
|
143789
143866
|
{
|
|
@@ -143797,7 +143874,7 @@ const getMapConfig = (C, ..._) => K0(void 0, [C, ..._], function* (v, t = b, r,
|
|
|
143797
143874
|
r,
|
|
143798
143875
|
m
|
|
143799
143876
|
);
|
|
143800
|
-
}), extendMapConfig = (C, ..._) =>
|
|
143877
|
+
}), extendMapConfig = (C, ..._) => N0(void 0, [C, ..._], function* (v, t = b, r, m) {
|
|
143801
143878
|
var Ue, ht;
|
|
143802
143879
|
if (v.adcode === 0 && v.adcode === 1e5)
|
|
143803
143880
|
return D0({}, v);
|
|
@@ -143871,7 +143948,7 @@ const getMapConfig = (C, ..._) => K0(void 0, [C, ..._], function* (v, t = b, r,
|
|
|
143871
143948
|
}
|
|
143872
143949
|
}
|
|
143873
143950
|
return r && (ke.depthReference = r.depthReference || findAdcodeInfo(r.adcode).b), ke;
|
|
143874
|
-
}), getCityConfig = (r, ...m) =>
|
|
143951
|
+
}), getCityConfig = (r, ...m) => N0(void 0, [r, ...m], function* (v, t = b) {
|
|
143875
143952
|
const C = findAdcodeInfo(v), { name: _ } = C;
|
|
143876
143953
|
return {
|
|
143877
143954
|
center: [C.lng, C.lat],
|