vis-core 0.21.27 → 0.21.28

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.
@@ -14,7 +14,7 @@ var yn = (ct, e) => (e = Symbol[ct]) ? e : Symbol.for("Symbol." + ct), zn = (ct)
14
14
  }, Ei = (ct, e) => Fn(ct, kn(e));
15
15
  var J0 = (ct, e, c) => Ln(ct, typeof e != "symbol" ? e + "" : e, c);
16
16
  var cn = (ct, e, c) => Kn(Hn(ct), c, e);
17
- var si = (ct, e, c) => new Promise((st, Zt) => {
17
+ var ni = (ct, e, c) => new Promise((st, Zt) => {
18
18
  var Wt = (Tt) => {
19
19
  try {
20
20
  vt(c.next(Tt));
@@ -13362,7 +13362,7 @@ class WebXRManager extends EventDispatcher {
13362
13362
  }, this.getSession = function() {
13363
13363
  return Zt;
13364
13364
  }, this.setSession = function(F0) {
13365
- return si(this, null, function* () {
13365
+ return ni(this, null, function* () {
13366
13366
  if (Zt = F0, Zt !== null) {
13367
13367
  if (Je = e.getRenderTarget(), Zt.addEventListener("select", V0), Zt.addEventListener("selectstart", V0), Zt.addEventListener("selectend", V0), Zt.addEventListener("squeeze", V0), Zt.addEventListener("squeezestart", V0), Zt.addEventListener("squeezeend", V0), Zt.addEventListener("end", S0), Zt.addEventListener("inputsourceschange", b0), $e.xrCompatible !== !0 && (yield c.makeXRCompatible()), n0 = e.getPixelRatio(), e.getSize(i0), Zt.renderState.layers === void 0) {
13368
13368
  const Q0 = {
@@ -13819,8 +13819,8 @@ class WebGLRenderer {
13819
13819
  I0 = N0 === RGBAIntegerFormat || N0 === RGIntegerFormat || N0 === RedIntegerFormat;
13820
13820
  }
13821
13821
  if (I0) {
13822
- const N0 = l0.texture.type, w0 = N0 === UnsignedByteType || N0 === UnsignedIntType || N0 === UnsignedShortType || N0 === UnsignedInt248Type || N0 === UnsignedShort4444Type || N0 === UnsignedShort5551Type, q0 = Ti.getClearColor(), B0 = Ti.getClearAlpha(), D0 = q0.r, _0 = q0.g, ni = q0.b;
13823
- w0 ? (Qe[0] = D0, Qe[1] = _0, Qe[2] = ni, Qe[3] = B0, v0.clearBufferuiv(v0.COLOR, 0, Qe)) : (qe[0] = D0, qe[1] = _0, qe[2] = ni, qe[3] = B0, v0.clearBufferiv(v0.COLOR, 0, qe));
13822
+ const N0 = l0.texture.type, w0 = N0 === UnsignedByteType || N0 === UnsignedIntType || N0 === UnsignedShortType || N0 === UnsignedInt248Type || N0 === UnsignedShort4444Type || N0 === UnsignedShort5551Type, q0 = Ti.getClearColor(), B0 = Ti.getClearAlpha(), D0 = q0.r, _0 = q0.g, si = q0.b;
13823
+ w0 ? (Qe[0] = D0, Qe[1] = _0, Qe[2] = si, Qe[3] = B0, v0.clearBufferuiv(v0.COLOR, 0, Qe)) : (qe[0] = D0, qe[1] = _0, qe[2] = si, qe[3] = B0, v0.clearBufferiv(v0.COLOR, 0, qe));
13824
13824
  } else
13825
13825
  L0 |= v0.COLOR_BUFFER_BIT;
13826
13826
  }
@@ -13867,9 +13867,9 @@ class WebGLRenderer {
13867
13867
  if (B0 = ii.getWireframeAttribute(R0), B0 === void 0) return;
13868
13868
  D0 = 2;
13869
13869
  }
13870
- const _0 = R0.drawRange, ni = R0.attributes.position;
13870
+ const _0 = R0.drawRange, si = R0.attributes.position;
13871
13871
  let mi = _0.start * D0, Gi = (_0.start + _0.count) * D0;
13872
- N0 !== null && (mi = Math.max(mi, N0.start * D0), Gi = Math.min(Gi, (N0.start + N0.count) * D0)), B0 !== null ? (mi = Math.max(mi, 0), Gi = Math.min(Gi, B0.count)) : ni != null && (mi = Math.max(mi, 0), Gi = Math.min(Gi, ni.count));
13872
+ N0 !== null && (mi = Math.max(mi, N0.start * D0), Gi = Math.min(Gi, (N0.start + N0.count) * D0)), B0 !== null ? (mi = Math.max(mi, 0), Gi = Math.min(Gi, B0.count)) : si != null && (mi = Math.max(mi, 0), Gi = Math.min(Gi, si.count));
13873
13873
  const Si = Gi - mi;
13874
13874
  if (Si < 0 || Si === 1 / 0) return;
13875
13875
  ki.setup(I0, L0, q0, R0, B0);
@@ -13999,8 +13999,8 @@ class WebGLRenderer {
13999
13999
  if (L0 && (a0.boundingSphere !== void 0 ? (a0.boundingSphere === null && a0.computeBoundingSphere(), Xi.copy(a0.boundingSphere.center)) : (w0.boundingSphere === null && w0.computeBoundingSphere(), Xi.copy(w0.boundingSphere.center)), Xi.applyMatrix4(a0.matrixWorld).applyMatrix4(Zi)), Array.isArray(q0)) {
14000
14000
  const B0 = w0.groups;
14001
14001
  for (let D0 = 0, _0 = B0.length; D0 < _0; D0++) {
14002
- const ni = B0[D0], mi = q0[ni.materialIndex];
14003
- mi && mi.visible && $e.push(a0, w0, mi, R0, Xi.z, ni);
14002
+ const si = B0[D0], mi = q0[si.materialIndex];
14003
+ mi && mi.visible && $e.push(a0, w0, mi, R0, Xi.z, si);
14004
14004
  }
14005
14005
  } else q0.visible && $e.push(a0, w0, q0, R0, Xi.z, null);
14006
14006
  }
@@ -14035,8 +14035,8 @@ class WebGLRenderer {
14035
14035
  const D0 = L0.viewport;
14036
14036
  if (L0.viewport !== void 0 && (L0.viewport = void 0), Je.setupLightsView(L0), Q0 === !0 && hi.setGlobalState(e0.clippingPlanes, L0), dn(a0, R0, L0), C0.updateMultisampleRenderTarget(N0), C0.updateRenderTargetMipmap(N0), ri.has("WEBGL_multisampled_render_to_texture") === !1) {
14037
14037
  let _0 = !1;
14038
- for (let ni = 0, mi = u0.length; ni < mi; ni++) {
14039
- const Gi = u0[ni], Si = Gi.object, gi = Gi.geometry, Wi = Gi.material, ui = Gi.group;
14038
+ for (let si = 0, mi = u0.length; si < mi; si++) {
14039
+ const Gi = u0[si], Si = Gi.object, gi = Gi.geometry, Wi = Gi.material, ui = Gi.group;
14040
14040
  if (Wi.side === DoubleSide && Si.layers.test(L0.layers)) {
14041
14041
  const Ui = Wi.side;
14042
14042
  Wi.side = BackSide, Wi.needsUpdate = !0, fn(Si, R0, L0, gi, Wi, ui), Wi.side = Ui, Wi.needsUpdate = !0, _0 = !0;
@@ -14067,8 +14067,8 @@ class WebGLRenderer {
14067
14067
  return Gn(a0, q0), _0;
14068
14068
  } else
14069
14069
  q0.uniforms = Ri.getUniforms(a0), a0.onBeforeCompile(q0, e0), _0 = Ri.acquireProgram(q0, B0), D0.set(B0, _0), L0.uniforms = q0.uniforms;
14070
- const ni = L0.uniforms;
14071
- return (!a0.isShaderMaterial && !a0.isRawShaderMaterial || a0.clipping === !0) && (ni.clippingPlanes = hi.uniform), Gn(a0, q0), L0.needsLights = on(a0), L0.lightsStateVersion = w0, L0.needsLights && (ni.ambientLightColor.value = I0.state.ambient, ni.lightProbe.value = I0.state.probe, ni.directionalLights.value = I0.state.directional, ni.directionalLightShadows.value = I0.state.directionalShadow, ni.spotLights.value = I0.state.spot, ni.spotLightShadows.value = I0.state.spotShadow, ni.rectAreaLights.value = I0.state.rectArea, ni.ltc_1.value = I0.state.rectAreaLTC1, ni.ltc_2.value = I0.state.rectAreaLTC2, ni.pointLights.value = I0.state.point, ni.pointLightShadows.value = I0.state.pointShadow, ni.hemisphereLights.value = I0.state.hemi, ni.directionalShadowMap.value = I0.state.directionalShadowMap, ni.directionalShadowMatrix.value = I0.state.directionalShadowMatrix, ni.spotShadowMap.value = I0.state.spotShadowMap, ni.spotLightMatrix.value = I0.state.spotLightMatrix, ni.spotLightMap.value = I0.state.spotLightMap, ni.pointShadowMap.value = I0.state.pointShadowMap, ni.pointShadowMatrix.value = I0.state.pointShadowMatrix), L0.currentProgram = _0, L0.uniformsList = null, _0;
14070
+ const si = L0.uniforms;
14071
+ return (!a0.isShaderMaterial && !a0.isRawShaderMaterial || a0.clipping === !0) && (si.clippingPlanes = hi.uniform), Gn(a0, q0), L0.needsLights = on(a0), L0.lightsStateVersion = w0, L0.needsLights && (si.ambientLightColor.value = I0.state.ambient, si.lightProbe.value = I0.state.probe, si.directionalLights.value = I0.state.directional, si.directionalLightShadows.value = I0.state.directionalShadow, si.spotLights.value = I0.state.spot, si.spotLightShadows.value = I0.state.spotShadow, si.rectAreaLights.value = I0.state.rectArea, si.ltc_1.value = I0.state.rectAreaLTC1, si.ltc_2.value = I0.state.rectAreaLTC2, si.pointLights.value = I0.state.point, si.pointLightShadows.value = I0.state.pointShadow, si.hemisphereLights.value = I0.state.hemi, si.directionalShadowMap.value = I0.state.directionalShadowMap, si.directionalShadowMatrix.value = I0.state.directionalShadowMatrix, si.spotShadowMap.value = I0.state.spotShadowMap, si.spotLightMatrix.value = I0.state.spotLightMatrix, si.spotLightMap.value = I0.state.spotLightMap, si.pointShadowMap.value = I0.state.pointShadowMap, si.pointShadowMatrix.value = I0.state.pointShadowMatrix), L0.currentProgram = _0, L0.uniformsList = null, _0;
14072
14072
  }
14073
14073
  function Zn(a0) {
14074
14074
  if (a0.uniformsList === null) {
@@ -14083,7 +14083,7 @@ class WebGLRenderer {
14083
14083
  }
14084
14084
  function Cn(a0, u0, R0, L0, I0) {
14085
14085
  u0.isScene !== !0 && (u0 = vi), C0.resetTextureUnits();
14086
- const N0 = u0.fog, w0 = L0.isMeshStandardMaterial ? u0.environment : null, q0 = l0 === null ? e0.outputColorSpace : l0.isXRRenderTarget === !0 ? l0.texture.colorSpace : LinearSRGBColorSpace, B0 = (L0.isMeshStandardMaterial ? k0 : g0).get(L0.envMap || w0), D0 = L0.vertexColors === !0 && !!R0.attributes.color && R0.attributes.color.itemSize === 4, _0 = !!R0.attributes.tangent && (!!L0.normalMap || L0.anisotropy > 0), ni = !!R0.morphAttributes.position, mi = !!R0.morphAttributes.normal, Gi = !!R0.morphAttributes.color;
14086
+ const N0 = u0.fog, w0 = L0.isMeshStandardMaterial ? u0.environment : null, q0 = l0 === null ? e0.outputColorSpace : l0.isXRRenderTarget === !0 ? l0.texture.colorSpace : LinearSRGBColorSpace, B0 = (L0.isMeshStandardMaterial ? k0 : g0).get(L0.envMap || w0), D0 = L0.vertexColors === !0 && !!R0.attributes.color && R0.attributes.color.itemSize === 4, _0 = !!R0.attributes.tangent && (!!L0.normalMap || L0.anisotropy > 0), si = !!R0.morphAttributes.position, mi = !!R0.morphAttributes.normal, Gi = !!R0.morphAttributes.color;
14087
14087
  let Si = NoToneMapping;
14088
14088
  L0.toneMapped && (l0 === null || l0.isXRRenderTarget === !0) && (Si = e0.toneMapping);
14089
14089
  const gi = R0.morphAttributes.position || R0.morphAttributes.normal || R0.morphAttributes.color, Wi = gi !== void 0 ? gi.length : 0, ui = oi.get(L0), Ui = Je.state.lights;
@@ -14092,7 +14092,7 @@ class WebGLRenderer {
14092
14092
  hi.setState(L0, a0, zi);
14093
14093
  }
14094
14094
  let Fi = !1;
14095
- L0.version === ui.__version ? (ui.needsLights && ui.lightsStateVersion !== Ui.state.version || ui.outputColorSpace !== q0 || I0.isBatchedMesh && ui.batching === !1 || !I0.isBatchedMesh && ui.batching === !0 || I0.isBatchedMesh && ui.batchingColor === !0 && I0.colorTexture === null || I0.isBatchedMesh && ui.batchingColor === !1 && I0.colorTexture !== null || I0.isInstancedMesh && ui.instancing === !1 || !I0.isInstancedMesh && ui.instancing === !0 || I0.isSkinnedMesh && ui.skinning === !1 || !I0.isSkinnedMesh && ui.skinning === !0 || I0.isInstancedMesh && ui.instancingColor === !0 && I0.instanceColor === null || I0.isInstancedMesh && ui.instancingColor === !1 && I0.instanceColor !== null || I0.isInstancedMesh && ui.instancingMorph === !0 && I0.morphTexture === null || I0.isInstancedMesh && ui.instancingMorph === !1 && I0.morphTexture !== null || ui.envMap !== B0 || L0.fog === !0 && ui.fog !== N0 || ui.numClippingPlanes !== void 0 && (ui.numClippingPlanes !== hi.numPlanes || ui.numIntersection !== hi.numIntersection) || ui.vertexAlphas !== D0 || ui.vertexTangents !== _0 || ui.morphTargets !== ni || ui.morphNormals !== mi || ui.morphColors !== Gi || ui.toneMapping !== Si || ui.morphTargetsCount !== Wi) && (Fi = !0) : (Fi = !0, ui.__version = L0.version);
14095
+ L0.version === ui.__version ? (ui.needsLights && ui.lightsStateVersion !== Ui.state.version || ui.outputColorSpace !== q0 || I0.isBatchedMesh && ui.batching === !1 || !I0.isBatchedMesh && ui.batching === !0 || I0.isBatchedMesh && ui.batchingColor === !0 && I0.colorTexture === null || I0.isBatchedMesh && ui.batchingColor === !1 && I0.colorTexture !== null || I0.isInstancedMesh && ui.instancing === !1 || !I0.isInstancedMesh && ui.instancing === !0 || I0.isSkinnedMesh && ui.skinning === !1 || !I0.isSkinnedMesh && ui.skinning === !0 || I0.isInstancedMesh && ui.instancingColor === !0 && I0.instanceColor === null || I0.isInstancedMesh && ui.instancingColor === !1 && I0.instanceColor !== null || I0.isInstancedMesh && ui.instancingMorph === !0 && I0.morphTexture === null || I0.isInstancedMesh && ui.instancingMorph === !1 && I0.morphTexture !== null || ui.envMap !== B0 || L0.fog === !0 && ui.fog !== N0 || ui.numClippingPlanes !== void 0 && (ui.numClippingPlanes !== hi.numPlanes || ui.numIntersection !== hi.numIntersection) || ui.vertexAlphas !== D0 || ui.vertexTangents !== _0 || ui.morphTargets !== si || ui.morphNormals !== mi || ui.morphColors !== Gi || ui.toneMapping !== Si || ui.morphTargetsCount !== Wi) && (Fi = !0) : (Fi = !0, ui.__version = L0.version);
14096
14096
  let _i = ui.currentProgram;
14097
14097
  Fi === !0 && (_i = hn(L0, u0, I0));
14098
14098
  let Qi = !1, wi = !1, Di = !1;
@@ -14153,9 +14153,9 @@ class WebGLRenderer {
14153
14153
  else if (B0.__hasExternalTextures)
14154
14154
  C0.rebindTextures(a0, oi.get(a0.texture).__webglTexture, oi.get(a0.depthTexture).__webglTexture);
14155
14155
  else if (a0.depthBuffer) {
14156
- const ni = a0.depthTexture;
14157
- if (B0.__boundDepthTexture !== ni) {
14158
- if (ni !== null && oi.has(ni) && (a0.width !== ni.image.width || a0.height !== ni.image.height))
14156
+ const si = a0.depthTexture;
14157
+ if (B0.__boundDepthTexture !== si) {
14158
+ if (si !== null && oi.has(si) && (a0.width !== si.image.width || a0.height !== si.image.height))
14159
14159
  throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");
14160
14160
  C0.setupDepthRenderbuffer(a0);
14161
14161
  }
@@ -14199,7 +14199,7 @@ class WebGLRenderer {
14199
14199
  }
14200
14200
  }
14201
14201
  }, this.readRenderTargetPixelsAsync = function(a0, u0, R0, L0, I0, N0, w0) {
14202
- return si(this, null, function* () {
14202
+ return ni(this, null, function* () {
14203
14203
  if (!(a0 && a0.isWebGLRenderTarget))
14204
14204
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
14205
14205
  let q0 = oi.get(a0).__webglFramebuffer;
@@ -14211,12 +14211,12 @@ class WebGLRenderer {
14211
14211
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
14212
14212
  if (u0 >= 0 && u0 <= a0.width - L0 && R0 >= 0 && R0 <= a0.height - I0) {
14213
14213
  U0.bindFramebuffer(v0.FRAMEBUFFER, q0);
14214
- const ni = v0.createBuffer();
14215
- v0.bindBuffer(v0.PIXEL_PACK_BUFFER, ni), v0.bufferData(v0.PIXEL_PACK_BUFFER, N0.byteLength, v0.STREAM_READ), v0.readPixels(u0, R0, L0, I0, Ni.convert(D0), Ni.convert(_0), 0);
14214
+ const si = v0.createBuffer();
14215
+ v0.bindBuffer(v0.PIXEL_PACK_BUFFER, si), v0.bufferData(v0.PIXEL_PACK_BUFFER, N0.byteLength, v0.STREAM_READ), v0.readPixels(u0, R0, L0, I0, Ni.convert(D0), Ni.convert(_0), 0);
14216
14216
  const mi = l0 !== null ? oi.get(l0).__webglFramebuffer : null;
14217
14217
  U0.bindFramebuffer(v0.FRAMEBUFFER, mi);
14218
14218
  const Gi = v0.fenceSync(v0.SYNC_GPU_COMMANDS_COMPLETE, 0);
14219
- return v0.flush(), yield probeAsync(v0, Gi, 4), v0.bindBuffer(v0.PIXEL_PACK_BUFFER, ni), v0.getBufferSubData(v0.PIXEL_PACK_BUFFER, 0, N0), v0.deleteBuffer(ni), v0.deleteSync(Gi), N0;
14219
+ return v0.flush(), yield probeAsync(v0, Gi, 4), v0.bindBuffer(v0.PIXEL_PACK_BUFFER, si), v0.getBufferSubData(v0.PIXEL_PACK_BUFFER, 0, N0), v0.deleteBuffer(si), v0.deleteSync(Gi), N0;
14220
14220
  } else
14221
14221
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.");
14222
14222
  }
@@ -14227,9 +14227,9 @@ class WebGLRenderer {
14227
14227
  C0.setTexture2D(a0, 0), v0.copyTexSubImage2D(v0.TEXTURE_2D, R0, 0, 0, w0, q0, I0, N0), U0.unbindTexture();
14228
14228
  }, this.copyTextureToTexture = function(a0, u0, R0 = null, L0 = null, I0 = 0) {
14229
14229
  a0.isTexture !== !0 && (warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed."), L0 = arguments[0] || null, a0 = arguments[1], u0 = arguments[2], I0 = arguments[3] || 0, R0 = null);
14230
- let N0, w0, q0, B0, D0, _0, ni, mi, Gi;
14230
+ let N0, w0, q0, B0, D0, _0, si, mi, Gi;
14231
14231
  const Si = a0.isCompressedTexture ? a0.mipmaps[I0] : a0.image;
14232
- R0 !== null ? (N0 = R0.max.x - R0.min.x, w0 = R0.max.y - R0.min.y, q0 = R0.isBox3 ? R0.max.z - R0.min.z : 1, B0 = R0.min.x, D0 = R0.min.y, _0 = R0.isBox3 ? R0.min.z : 0) : (N0 = Si.width, w0 = Si.height, q0 = Si.depth || 1, B0 = 0, D0 = 0, _0 = 0), L0 !== null ? (ni = L0.x, mi = L0.y, Gi = L0.z) : (ni = 0, mi = 0, Gi = 0);
14232
+ R0 !== null ? (N0 = R0.max.x - R0.min.x, w0 = R0.max.y - R0.min.y, q0 = R0.isBox3 ? R0.max.z - R0.min.z : 1, B0 = R0.min.x, D0 = R0.min.y, _0 = R0.isBox3 ? R0.min.z : 0) : (N0 = Si.width, w0 = Si.height, q0 = Si.depth || 1, B0 = 0, D0 = 0, _0 = 0), L0 !== null ? (si = L0.x, mi = L0.y, Gi = L0.z) : (si = 0, mi = 0, Gi = 0);
14233
14233
  const gi = Ni.convert(u0.format), Wi = Ni.convert(u0.type);
14234
14234
  let ui;
14235
14235
  u0.isData3DTexture ? (C0.setTexture3D(u0, 0), ui = v0.TEXTURE_3D) : u0.isDataArrayTexture || u0.isCompressedArrayTexture ? (C0.setTexture2DArray(u0, 0), ui = v0.TEXTURE_2D_ARRAY) : (C0.setTexture2D(u0, 0), ui = v0.TEXTURE_2D), v0.pixelStorei(v0.UNPACK_FLIP_Y_WEBGL, u0.flipY), v0.pixelStorei(v0.UNPACK_PREMULTIPLY_ALPHA_WEBGL, u0.premultiplyAlpha), v0.pixelStorei(v0.UNPACK_ALIGNMENT, u0.unpackAlignment);
@@ -14240,10 +14240,10 @@ class WebGLRenderer {
14240
14240
  const ji = oi.get(a0), Pi = oi.get(u0), zi = oi.get(ji.__renderTarget), qi = oi.get(Pi.__renderTarget);
14241
14241
  U0.bindFramebuffer(v0.READ_FRAMEBUFFER, zi.__webglFramebuffer), U0.bindFramebuffer(v0.DRAW_FRAMEBUFFER, qi.__webglFramebuffer);
14242
14242
  for (let tn = 0; tn < q0; tn++)
14243
- Di && v0.framebufferTextureLayer(v0.READ_FRAMEBUFFER, v0.COLOR_ATTACHMENT0, oi.get(a0).__webglTexture, I0, _0 + tn), a0.isDepthTexture ? (Bi && v0.framebufferTextureLayer(v0.DRAW_FRAMEBUFFER, v0.COLOR_ATTACHMENT0, oi.get(u0).__webglTexture, I0, Gi + tn), v0.blitFramebuffer(B0, D0, N0, w0, ni, mi, N0, w0, v0.DEPTH_BUFFER_BIT, v0.NEAREST)) : Bi ? v0.copyTexSubImage3D(ui, I0, ni, mi, Gi + tn, B0, D0, N0, w0) : v0.copyTexSubImage2D(ui, I0, ni, mi, Gi + tn, B0, D0, N0, w0);
14243
+ Di && v0.framebufferTextureLayer(v0.READ_FRAMEBUFFER, v0.COLOR_ATTACHMENT0, oi.get(a0).__webglTexture, I0, _0 + tn), a0.isDepthTexture ? (Bi && v0.framebufferTextureLayer(v0.DRAW_FRAMEBUFFER, v0.COLOR_ATTACHMENT0, oi.get(u0).__webglTexture, I0, Gi + tn), v0.blitFramebuffer(B0, D0, N0, w0, si, mi, N0, w0, v0.DEPTH_BUFFER_BIT, v0.NEAREST)) : Bi ? v0.copyTexSubImage3D(ui, I0, si, mi, Gi + tn, B0, D0, N0, w0) : v0.copyTexSubImage2D(ui, I0, si, mi, Gi + tn, B0, D0, N0, w0);
14244
14244
  U0.bindFramebuffer(v0.READ_FRAMEBUFFER, null), U0.bindFramebuffer(v0.DRAW_FRAMEBUFFER, null);
14245
14245
  } else
14246
- Bi ? a0.isDataTexture || a0.isData3DTexture ? v0.texSubImage3D(ui, I0, ni, mi, Gi, N0, w0, q0, gi, Wi, Si.data) : u0.isCompressedArrayTexture ? v0.compressedTexSubImage3D(ui, I0, ni, mi, Gi, N0, w0, q0, gi, Si.data) : v0.texSubImage3D(ui, I0, ni, mi, Gi, N0, w0, q0, gi, Wi, Si) : a0.isDataTexture ? v0.texSubImage2D(v0.TEXTURE_2D, I0, ni, mi, N0, w0, gi, Wi, Si.data) : a0.isCompressedTexture ? v0.compressedTexSubImage2D(v0.TEXTURE_2D, I0, ni, mi, Si.width, Si.height, gi, Si.data) : v0.texSubImage2D(v0.TEXTURE_2D, I0, ni, mi, N0, w0, gi, Wi, Si);
14246
+ Bi ? a0.isDataTexture || a0.isData3DTexture ? v0.texSubImage3D(ui, I0, si, mi, Gi, N0, w0, q0, gi, Wi, Si.data) : u0.isCompressedArrayTexture ? v0.compressedTexSubImage3D(ui, I0, si, mi, Gi, N0, w0, q0, gi, Si.data) : v0.texSubImage3D(ui, I0, si, mi, Gi, N0, w0, q0, gi, Wi, Si) : a0.isDataTexture ? v0.texSubImage2D(v0.TEXTURE_2D, I0, si, mi, N0, w0, gi, Wi, Si.data) : a0.isCompressedTexture ? v0.compressedTexSubImage2D(v0.TEXTURE_2D, I0, si, mi, Si.width, Si.height, gi, Si.data) : v0.texSubImage2D(v0.TEXTURE_2D, I0, si, mi, N0, w0, gi, Wi, Si);
14247
14247
  v0.pixelStorei(v0.UNPACK_ROW_LENGTH, Ui), v0.pixelStorei(v0.UNPACK_IMAGE_HEIGHT, Fi), v0.pixelStorei(v0.UNPACK_SKIP_PIXELS, _i), v0.pixelStorei(v0.UNPACK_SKIP_ROWS, Qi), v0.pixelStorei(v0.UNPACK_SKIP_IMAGES, wi), I0 === 0 && u0.generateMipmaps && v0.generateMipmap(ui), U0.unbindTexture();
14248
14248
  }, this.copyTextureToTexture3D = function(a0, u0, R0 = null, L0 = null, I0 = 0) {
14249
14249
  return a0.isTexture !== !0 && (warnOnce("WebGLRenderer: copyTextureToTexture3D function signature has changed."), R0 = arguments[0] || null, L0 = arguments[1] || null, a0 = arguments[2], u0 = arguments[3], I0 = arguments[4] || 0), warnOnce('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'), this.copyTextureToTexture(a0, u0, R0, L0, I0);
@@ -19388,7 +19388,7 @@ class ObjectLoader extends Loader {
19388
19388
  }, st, Zt);
19389
19389
  }
19390
19390
  loadAsync(e, c) {
19391
- return si(this, null, function* () {
19391
+ return ni(this, null, function* () {
19392
19392
  const st = this, Zt = this.path === "" ? LoaderUtils.extractUrlBase(e) : this.path;
19393
19393
  this.resourcePath = this.resourcePath || Zt;
19394
19394
  const Wt = new FileLoader(this.manager);
@@ -19415,7 +19415,7 @@ class ObjectLoader extends Loader {
19415
19415
  return Jt;
19416
19416
  }
19417
19417
  parseAsync(e) {
19418
- return si(this, null, function* () {
19418
+ return ni(this, null, function* () {
19419
19419
  const c = this.parseAnimations(e.animations), st = this.parseShapes(e.shapes), Zt = this.parseGeometries(e.geometries, st), Wt = yield this.parseImagesAsync(e.images), Yt = this.parseTextures(e.textures, Wt), vt = this.parseMaterials(e.materials, Yt), Tt = this.parseObject(e.object, Zt, vt, Yt, c), Jt = this.parseSkeletons(e.skeletons, Tt);
19420
19420
  return this.bindSkeletons(Tt, Jt), this.bindLightTargets(Tt), Tt;
19421
19421
  });
@@ -19523,11 +19523,11 @@ class ObjectLoader extends Loader {
19523
19523
  return Zt;
19524
19524
  }
19525
19525
  parseImagesAsync(e) {
19526
- return si(this, null, function* () {
19526
+ return ni(this, null, function* () {
19527
19527
  const c = this, st = {};
19528
19528
  let Zt;
19529
19529
  function Wt(Yt) {
19530
- return si(this, null, function* () {
19530
+ return ni(this, null, function* () {
19531
19531
  if (typeof Yt == "string") {
19532
19532
  const vt = Yt, Tt = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(vt) ? vt : c.resourcePath + vt;
19533
19533
  return yield Zt.loadAsync(Tt);
@@ -22721,6 +22721,48 @@ const tween_esm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
22721
22721
  remove,
22722
22722
  removeAll,
22723
22723
  update
22724
+ }, Symbol.toStringTag, { value: "Module" })), timeOut = (ct) => ni(void 0, null, function* () {
22725
+ const e = makePromiseCreator();
22726
+ return setTimeout(() => {
22727
+ e.resolve();
22728
+ }, ct), e.promise;
22729
+ }), getTween = (ct) => (e) => {
22730
+ const c = makePromiseCreator();
22731
+ return new Tween({ v: 0 }).to({ v: 1 }, e.duration || 1e3).onUpdate(({ v: st }) => {
22732
+ var Zt;
22733
+ (Zt = e.onUpdate) == null || Zt.call(e, st);
22734
+ }).onComplete(() => {
22735
+ e.onUpdate && e.onUpdate(1), e.onComplete && e.onComplete(), c.resolve();
22736
+ }).easing(ct).start(), c.promise;
22737
+ }, sinusoidalInOut = getTween(Easing.Sinusoidal.InOut), baseObjectfadeIn = (ct, e = 1e3) => ni(void 0, null, function* () {
22738
+ const c = /* @__PURE__ */ new Set(), st = /* @__PURE__ */ new Set();
22739
+ ct.object3d.traverse((Wt) => {
22740
+ const Yt = Wt;
22741
+ Yt.material && (Array.isArray(Yt.material) ? Yt.material : [Yt.material]).forEach((Tt) => {
22742
+ c.add(Tt);
22743
+ });
22744
+ });
22745
+ const Zt = /* @__PURE__ */ new Map();
22746
+ c.forEach((Wt) => {
22747
+ Zt.set(Wt, Wt.opacity), Wt.transparent || (st.add(Wt), Wt.transparent = !0, Wt.needsUpdate = !0), Wt.opacity = 0;
22748
+ }), ct.show(), yield sinusoidalInOut({
22749
+ duration: e,
22750
+ onUpdate: (Wt) => {
22751
+ c.forEach((Yt) => {
22752
+ Yt.opacity = Wt * Zt.get(Yt);
22753
+ });
22754
+ },
22755
+ onComplete: () => {
22756
+ st.forEach((Wt) => {
22757
+ Wt.transparent = !1, Wt.needsUpdate = !0;
22758
+ }), c.clear(), st.clear(), Zt.clear();
22759
+ }
22760
+ });
22761
+ }), animation = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22762
+ __proto__: null,
22763
+ baseObjectfadeIn,
22764
+ sinusoidalInOut,
22765
+ timeOut
22724
22766
  }, Symbol.toStringTag, { value: "Module" }));
22725
22767
  var p = { exports: {} }, a = typeof Reflect == "object" ? Reflect : null, d = a && typeof a.apply == "function" ? a.apply : function(ct, e, c) {
22726
22768
  return Function.prototype.apply.call(ct, e, c);
@@ -23066,7 +23108,7 @@ const _Stats = class un {
23066
23108
  this.mode = e;
23067
23109
  }
23068
23110
  init(e) {
23069
- return si(this, null, function* () {
23111
+ return ni(this, null, function* () {
23070
23112
  if (!e) {
23071
23113
  console.error('Stats: The "canvas" parameter is undefined.');
23072
23114
  return;
@@ -33782,7 +33824,7 @@ function Q(ct) {
33782
33824
  function $(ct) {
33783
33825
  return Math.abs(ct) < Number.MAX_VALUE ? ct : ct * (1 / 0);
33784
33826
  }
33785
- function ot(ct, e, c, st, Zt = 1 / 0, Wt) {
33827
+ function rt(ct, e, c, st, Zt = 1 / 0, Wt) {
33786
33828
  st = Math.max(1e-4, st);
33787
33829
  const Yt = 2 / st, vt = Yt * Wt, Tt = 1 / (1 + vt + 0.48 * vt * vt + 0.235 * vt * vt * vt);
33788
33830
  let Jt = ct - e;
@@ -33880,7 +33922,7 @@ class fe {
33880
33922
  }
33881
33923
  }
33882
33924
  }
33883
- const rt = 1 / 8, ge = /Mac/.test(navigator.platform);
33925
+ const ot = 1 / 8, ge = /Mac/.test(navigator.platform);
33884
33926
  let v, St, nt, _t, L$1, P$1, S$1, G, J$1, F$1, H$1, N$1, Dt, bt, z, tt, X, Ut$1, ut, At, ft$1, gt$1, at;
33885
33927
  class Y extends fe {
33886
33928
  /**
@@ -34173,11 +34215,11 @@ class Y extends fe {
34173
34215
  if (Zt.copy(L$1), ((this._state & h.ROTATE) === h.ROTATE || (this._state & h.TOUCH_ROTATE) === h.TOUCH_ROTATE || (this._state & h.TOUCH_DOLLY_ROTATE) === h.TOUCH_DOLLY_ROTATE || (this._state & h.TOUCH_ZOOM_ROTATE) === h.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(_e, t0), this._isUserControllingRotate = !0), (this._state & h.DOLLY) === h.DOLLY || (this._state & h.ZOOM) === h.ZOOM) {
34174
34216
  const e0 = this.dollyToCursor ? (st.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, i0 = this.dollyToCursor ? (st.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, n0 = this.dollyDragInverted ? -1 : 1;
34175
34217
  (this._state & h.DOLLY) === h.DOLLY ? (this._dollyInternal(
34176
- n0 * t0 * rt,
34218
+ n0 * t0 * ot,
34177
34219
  e0,
34178
34220
  i0
34179
34221
  ), this._isUserControllingDolly = !0) : (this._zoomInternal(
34180
- n0 * t0 * rt,
34222
+ n0 * t0 * ot,
34181
34223
  e0,
34182
34224
  i0
34183
34225
  ), this._isUserControllingZoom = !0);
@@ -34186,7 +34228,7 @@ class Y extends fe {
34186
34228
  const e0 = L$1.x - this._activePointers[1].clientX, i0 = L$1.y - this._activePointers[1].clientY, n0 = Math.sqrt(e0 * e0 + i0 * i0), s0 = Wt.y - n0;
34187
34229
  Wt.set(0, n0);
34188
34230
  const l0 = this.dollyToCursor ? (Zt.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, o0 = this.dollyToCursor ? (Zt.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
34189
- (this._state & h.TOUCH_DOLLY) === h.TOUCH_DOLLY || (this._state & h.TOUCH_DOLLY_ROTATE) === h.TOUCH_DOLLY_ROTATE || (this._state & h.TOUCH_DOLLY_TRUCK) === h.TOUCH_DOLLY_TRUCK || (this._state & h.TOUCH_DOLLY_OFFSET) === h.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(s0 * rt, l0, o0), this._isUserControllingDolly = !0) : (this._zoomInternal(s0 * rt, l0, o0), this._isUserControllingZoom = !0);
34231
+ (this._state & h.TOUCH_DOLLY) === h.TOUCH_DOLLY || (this._state & h.TOUCH_DOLLY_ROTATE) === h.TOUCH_DOLLY_ROTATE || (this._state & h.TOUCH_DOLLY_TRUCK) === h.TOUCH_DOLLY_TRUCK || (this._state & h.TOUCH_DOLLY_OFFSET) === h.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(s0 * ot, l0, o0), this._isUserControllingDolly = !0) : (this._zoomInternal(s0 * ot, l0, o0), this._isUserControllingZoom = !0);
34190
34232
  }
34191
34233
  ((this._state & h.TRUCK) === h.TRUCK || (this._state & h.TOUCH_TRUCK) === h.TOUCH_TRUCK || (this._state & h.TOUCH_DOLLY_TRUCK) === h.TOUCH_DOLLY_TRUCK || (this._state & h.TOUCH_ZOOM_TRUCK) === h.TOUCH_ZOOM_TRUCK) && (this._truckInternal(_e, t0, !1), this._isUserControllingTruck = !0), ((this._state & h.OFFSET) === h.OFFSET || (this._state & h.TOUCH_OFFSET) === h.TOUCH_OFFSET || (this._state & h.TOUCH_DOLLY_OFFSET) === h.TOUCH_DOLLY_OFFSET || (this._state & h.TOUCH_ZOOM_OFFSET) === h.TOUCH_ZOOM_OFFSET) && (this._truckInternal(_e, t0, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
34192
34234
  }, Qe = () => {
@@ -35076,7 +35118,7 @@ class Y extends fe {
35076
35118
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
35077
35119
  else {
35078
35120
  const $t = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
35079
- this._spherical.theta = ot(
35121
+ this._spherical.theta = rt(
35080
35122
  this._spherical.theta,
35081
35123
  this._sphericalEnd.theta,
35082
35124
  this._thetaVelocity,
@@ -35089,7 +35131,7 @@ class Y extends fe {
35089
35131
  this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
35090
35132
  else {
35091
35133
  const $t = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
35092
- this._spherical.phi = ot(
35134
+ this._spherical.phi = rt(
35093
35135
  this._spherical.phi,
35094
35136
  this._sphericalEnd.phi,
35095
35137
  this._phiVelocity,
@@ -35102,7 +35144,7 @@ class Y extends fe {
35102
35144
  this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
35103
35145
  else {
35104
35146
  const $t = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
35105
- this._spherical.radius = ot(
35147
+ this._spherical.radius = rt(
35106
35148
  this._spherical.radius,
35107
35149
  this._sphericalEnd.radius,
35108
35150
  this._radiusVelocity,
@@ -35143,7 +35185,7 @@ class Y extends fe {
35143
35185
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
35144
35186
  else {
35145
35187
  const $t = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
35146
- this._zoom = ot(
35188
+ this._zoom = rt(
35147
35189
  this._zoom,
35148
35190
  this._zoomEnd,
35149
35191
  this._zoomVelocity,
@@ -35192,7 +35234,7 @@ class Y extends fe {
35192
35234
  1
35193
35235
  );
35194
35236
  const Jt = this._needsUpdate;
35195
- return Jt && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : Jt ? (this.dispatchEvent({ type: "update" }), U$1(c, this.restThreshold) && U$1(st, this.restThreshold) && U$1(Zt, this.restThreshold) && U$1(Wt.x, this.restThreshold) && U$1(Wt.y, this.restThreshold) && U$1(Wt.z, this.restThreshold) && U$1(Yt.x, this.restThreshold) && U$1(Yt.y, this.restThreshold) && U$1(Yt.z, this.restThreshold) && U$1(vt, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !Jt && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = Jt, this._needsUpdate = !1, Jt;
35237
+ return Jt && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : Jt ? (this.dispatchEvent({ type: "update" }), U$1(c, this.restThreshold) && U$1(st, this.restThreshold) && U$1(Zt, this.restThreshold) && U$1(Wt.x, this.restThreshold) && U$1(Wt.y, this.restThreshold) && U$1(Wt.z, this.restThreshold) && U$1(Yt.x, this.restThreshold) && U$1(Yt.y, this.restThreshold) && U$1(Yt.z, this.restThreshold) && U$1(vt, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !Jt && this._updatedLastTime && (this._hasRested || (this._hasRested = !0, this.dispatchEvent({ type: "rest" })), this.dispatchEvent({ type: "sleep" })), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = Jt, this._needsUpdate = !1, Jt;
35196
35238
  }
35197
35239
  /**
35198
35240
  * Get all state in JSON string
@@ -37830,7 +37872,7 @@ class Point extends D$1 {
37830
37872
  });
37831
37873
  }
37832
37874
  create() {
37833
- return si(this, null, function* () {
37875
+ return ni(this, null, function* () {
37834
37876
  const { sprite: c } = this.options, st = this.getMaterial();
37835
37877
  c ? this.createSprite(st) : this.createMesh(new PlaneGeometry(1, 1), st), this.setScale(1), this.object3d.scale.multiplyScalar(0.1);
37836
37878
  });
@@ -37906,7 +37948,7 @@ class Arc extends D$1 {
37906
37948
  };
37907
37949
  }
37908
37950
  create() {
37909
- return si(this, null, function* () {
37951
+ return ni(this, null, function* () {
37910
37952
  map || (map = getLineTexture(0.5));
37911
37953
  const { color: c, lineWidth: st, globe: Zt } = this.options;
37912
37954
  let { radius: Wt } = this.options;
@@ -37939,7 +37981,7 @@ class Arc extends D$1 {
37939
37981
  });
37940
37982
  }
37941
37983
  instantiate() {
37942
- return si(this, null, function* () {
37984
+ return ni(this, null, function* () {
37943
37985
  this.update();
37944
37986
  const c = yield this.line.instantiate(), st = yield this.drawController.instantiate(this, {
37945
37987
  create: (Zt) => {
@@ -38046,7 +38088,7 @@ class CrossPlane extends D$1 {
38046
38088
  this.options = bi({}, c);
38047
38089
  }
38048
38090
  create() {
38049
- return si(this, null, function* () {
38091
+ return ni(this, null, function* () {
38050
38092
  const Zt = new PlaneGeometry(0.5, 5, 2, 2);
38051
38093
  this.createGroup();
38052
38094
  const Wt = this.options.material || new MeshBasicMaterial({
@@ -38061,7 +38103,7 @@ class CrossPlane extends D$1 {
38061
38103
  }
38062
38104
  class PlaneShadow extends D$1 {
38063
38105
  create() {
38064
- return si(this, null, function* () {
38106
+ return ni(this, null, function* () {
38065
38107
  const e = new PlaneGeometry(100, 100, 2, 2), c = new ShadowMaterial();
38066
38108
  c.opacity = 0.5, c.depthWrite = !1, this.createMesh(e, c), this.object3d.receiveShadow = !0, this.position.z = 0.1, this.object3d.name = "阴影接受";
38067
38109
  });
@@ -38074,7 +38116,7 @@ class Model extends D$1 {
38074
38116
  this.options = bi({}, c);
38075
38117
  }
38076
38118
  create() {
38077
- return si(this, null, function* () {
38119
+ return ni(this, null, function* () {
38078
38120
  const c = this.pencil.getPlugin("loader"), st = this.options.src;
38079
38121
  if (!st)
38080
38122
  throw new Error("src is required");
@@ -40629,15 +40671,15 @@ class EXRLoader extends DataTextureLoader {
40629
40671
  }
40630
40672
  function xi(a0, u0, R0, L0, I0, N0, w0) {
40631
40673
  const q0 = w0 < 16384, B0 = R0 > I0 ? I0 : R0;
40632
- let D0 = 1, _0, ni;
40674
+ let D0 = 1, _0, si;
40633
40675
  for (; D0 <= B0; ) D0 <<= 1;
40634
40676
  for (D0 >>= 1, _0 = D0, D0 >>= 1; D0 >= 1; ) {
40635
- ni = 0;
40636
- const mi = ni + N0 * (I0 - _0), Gi = N0 * D0, Si = N0 * _0, gi = L0 * D0, Wi = L0 * _0;
40677
+ si = 0;
40678
+ const mi = si + N0 * (I0 - _0), Gi = N0 * D0, Si = N0 * _0, gi = L0 * D0, Wi = L0 * _0;
40637
40679
  let ui, Ui, Fi, _i;
40638
- for (; ni <= mi; ni += Si) {
40639
- let Qi = ni;
40640
- const wi = ni + L0 * (R0 - _0);
40680
+ for (; si <= mi; si += Si) {
40681
+ let Qi = si;
40682
+ const wi = si + L0 * (R0 - _0);
40641
40683
  for (; Qi <= wi; Qi += Wi) {
40642
40684
  const Di = Qi + gi, Bi = Qi + Gi, ji = Bi + gi;
40643
40685
  q0 ? (li(a0[Qi + u0], a0[Bi + u0]), ui = $0.a, Fi = $0.b, li(a0[Di + u0], a0[ji + u0]), Ui = $0.a, _i = $0.b, li(ui, Ui), a0[Qi + u0] = $0.a, a0[Di + u0] = $0.b, li(Fi, _i), a0[Bi + u0] = $0.a, a0[ji + u0] = $0.b) : (Zi(a0[Qi + u0], a0[Bi + u0]), ui = $0.a, Fi = $0.b, Zi(a0[Di + u0], a0[ji + u0]), Ui = $0.a, _i = $0.b, Zi(ui, Ui), a0[Qi + u0] = $0.a, a0[Di + u0] = $0.b, Zi(Fi, _i), a0[Bi + u0] = $0.a, a0[ji + u0] = $0.b);
@@ -40648,8 +40690,8 @@ class EXRLoader extends DataTextureLoader {
40648
40690
  }
40649
40691
  }
40650
40692
  if (I0 & D0) {
40651
- let Qi = ni;
40652
- const wi = ni + L0 * (R0 - _0);
40693
+ let Qi = si;
40694
+ const wi = si + L0 * (R0 - _0);
40653
40695
  for (; Qi <= wi; Qi += Wi) {
40654
40696
  const Di = Qi + gi;
40655
40697
  q0 ? li(a0[Qi + u0], a0[Di + u0]) : Zi(a0[Qi + u0], a0[Di + u0]), ui = $0.a, a0[Di + u0] = $0.b, a0[Qi + u0] = ui;
@@ -40657,16 +40699,16 @@ class EXRLoader extends DataTextureLoader {
40657
40699
  }
40658
40700
  _0 = D0, D0 >>= 1;
40659
40701
  }
40660
- return ni;
40702
+ return si;
40661
40703
  }
40662
40704
  function Xi(a0, u0, R0, L0, I0, N0, w0, q0, B0) {
40663
40705
  let D0 = 0, _0 = 0;
40664
- const ni = w0, mi = Math.trunc(L0.value + (I0 + 7) / 8);
40706
+ const si = w0, mi = Math.trunc(L0.value + (I0 + 7) / 8);
40665
40707
  for (; L0.value < mi; )
40666
40708
  for (T0(D0, _0, R0, L0), D0 = M0.c, _0 = M0.lc; _0 >= 14; ) {
40667
40709
  const Si = D0 >> _0 - 14 & 16383, gi = u0[Si];
40668
40710
  if (gi.len)
40669
- _0 -= gi.len, di(gi.lit, N0, D0, _0, R0, L0, q0, B0, ni), D0 = E0.c, _0 = E0.lc;
40711
+ _0 -= gi.len, di(gi.lit, N0, D0, _0, R0, L0, q0, B0, si), D0 = E0.c, _0 = E0.lc;
40670
40712
  else {
40671
40713
  if (!gi.p)
40672
40714
  throw new Error("hufDecode issues");
@@ -40676,7 +40718,7 @@ class EXRLoader extends DataTextureLoader {
40676
40718
  for (; _0 < ui && L0.value < mi; )
40677
40719
  T0(D0, _0, R0, L0), D0 = M0.c, _0 = M0.lc;
40678
40720
  if (_0 >= ui && d0(a0[gi.p[Wi]]) == (D0 >> _0 - ui & (1 << ui) - 1)) {
40679
- _0 -= ui, di(gi.p[Wi], N0, D0, _0, R0, L0, q0, B0, ni), D0 = E0.c, _0 = E0.lc;
40721
+ _0 -= ui, di(gi.p[Wi], N0, D0, _0, R0, L0, q0, B0, si), D0 = E0.c, _0 = E0.lc;
40680
40722
  break;
40681
40723
  }
40682
40724
  }
@@ -40688,7 +40730,7 @@ class EXRLoader extends DataTextureLoader {
40688
40730
  for (D0 >>= Gi, _0 -= Gi; _0 > 0; ) {
40689
40731
  const Si = u0[D0 << 14 - _0 & 16383];
40690
40732
  if (Si.len)
40691
- _0 -= Si.len, di(Si.lit, N0, D0, _0, R0, L0, q0, B0, ni), D0 = E0.c, _0 = E0.lc;
40733
+ _0 -= Si.len, di(Si.lit, N0, D0, _0, R0, L0, q0, B0, si), D0 = E0.c, _0 = E0.lc;
40692
40734
  else
40693
40735
  throw new Error("hufDecode issues");
40694
40736
  }
@@ -40700,12 +40742,12 @@ class EXRLoader extends DataTextureLoader {
40700
40742
  const _0 = Mi(u0, R0);
40701
40743
  if (R0.value += 4, B0 < 0 || B0 >= 65537 || D0 < 0 || D0 >= 65537)
40702
40744
  throw new Error("Something wrong with HUF_ENCSIZE");
40703
- const ni = new Array(65537), mi = new Array(16384);
40745
+ const si = new Array(65537), mi = new Array(16384);
40704
40746
  c0(mi);
40705
40747
  const Gi = L0 - (R0.value - q0);
40706
- if (h0(a0, R0, Gi, B0, D0, ni), _0 > 8 * (L0 - (R0.value - q0)))
40748
+ if (h0(a0, R0, Gi, B0, D0, si), _0 > 8 * (L0 - (R0.value - q0)))
40707
40749
  throw new Error("Something wrong with hufUncompress");
40708
- f0(ni, B0, D0, mi), Xi(ni, mi, a0, R0, _0, D0, N0, I0, w0);
40750
+ f0(si, B0, D0, mi), Xi(si, mi, a0, R0, _0, D0, N0, I0, w0);
40709
40751
  }
40710
40752
  function ti(a0, u0, R0) {
40711
40753
  for (let L0 = 0; L0 < R0; ++L0)
@@ -40747,15 +40789,15 @@ class EXRLoader extends DataTextureLoader {
40747
40789
  }
40748
40790
  function ri(a0, u0, R0, L0, I0, N0) {
40749
40791
  let w0 = new DataView(N0.buffer);
40750
- const q0 = R0[a0.idx[0]].width, B0 = R0[a0.idx[0]].height, D0 = 3, _0 = Math.floor(q0 / 8), ni = Math.ceil(q0 / 8), mi = Math.ceil(B0 / 8), Gi = q0 - (ni - 1) * 8, Si = B0 - (mi - 1) * 8, gi = { value: 0 }, Wi = new Array(D0), ui = new Array(D0), Ui = new Array(D0), Fi = new Array(D0), _i = new Array(D0);
40792
+ const q0 = R0[a0.idx[0]].width, B0 = R0[a0.idx[0]].height, D0 = 3, _0 = Math.floor(q0 / 8), si = Math.ceil(q0 / 8), mi = Math.ceil(B0 / 8), Gi = q0 - (si - 1) * 8, Si = B0 - (mi - 1) * 8, gi = { value: 0 }, Wi = new Array(D0), ui = new Array(D0), Ui = new Array(D0), Fi = new Array(D0), _i = new Array(D0);
40751
40793
  for (let wi = 0; wi < D0; ++wi)
40752
- _i[wi] = u0[a0.idx[wi]], Wi[wi] = wi < 1 ? 0 : Wi[wi - 1] + ni * mi, ui[wi] = new Float32Array(64), Ui[wi] = new Uint16Array(64), Fi[wi] = new Uint16Array(ni * 64);
40794
+ _i[wi] = u0[a0.idx[wi]], Wi[wi] = wi < 1 ? 0 : Wi[wi - 1] + si * mi, ui[wi] = new Float32Array(64), Ui[wi] = new Uint16Array(64), Fi[wi] = new Uint16Array(si * 64);
40753
40795
  for (let wi = 0; wi < mi; ++wi) {
40754
40796
  let Di = 8;
40755
40797
  wi == mi - 1 && (Di = Si);
40756
40798
  let Bi = 8;
40757
- for (let Pi = 0; Pi < ni; ++Pi) {
40758
- Pi == ni - 1 && (Bi = Gi);
40799
+ for (let Pi = 0; Pi < si; ++Pi) {
40800
+ Pi == si - 1 && (Bi = Gi);
40759
40801
  for (let zi = 0; zi < D0; ++zi)
40760
40802
  Ui[zi].fill(0), Ui[zi][0] = I0[Wi[zi]++], A0(gi, L0, Ui[zi]), U0(Ui[zi], ui[zi]), ai(ui[zi]);
40761
40803
  oi(ui);
@@ -40772,7 +40814,7 @@ class EXRLoader extends DataTextureLoader {
40772
40814
  w0.setUint16(ji + 0 * 2 * zi, Fi[Pi][nn + 0], !0), w0.setUint16(ji + 1 * 2 * zi, Fi[Pi][nn + 1], !0), w0.setUint16(ji + 2 * 2 * zi, Fi[Pi][nn + 2], !0), w0.setUint16(ji + 3 * 2 * zi, Fi[Pi][nn + 3], !0), w0.setUint16(ji + 4 * 2 * zi, Fi[Pi][nn + 4], !0), w0.setUint16(ji + 5 * 2 * zi, Fi[Pi][nn + 5], !0), w0.setUint16(ji + 6 * 2 * zi, Fi[Pi][nn + 6], !0), w0.setUint16(ji + 7 * 2 * zi, Fi[Pi][nn + 7], !0), ji += 8 * 2 * zi;
40773
40815
  }
40774
40816
  }
40775
- if (_0 != ni)
40817
+ if (_0 != si)
40776
40818
  for (let qi = 8 * wi; qi < 8 * wi + Di; ++qi) {
40777
40819
  const tn = _i[Pi][qi] + 8 * _0 * 2 * zi, nn = _0 * 64 + (qi & 7) * 8;
40778
40820
  for (let gn = 0; gn < Bi; ++gn)
@@ -40804,13 +40846,13 @@ class EXRLoader extends DataTextureLoader {
40804
40846
  u0[0] = O0(a0[0]), u0[1] = O0(a0[1]), u0[2] = O0(a0[5]), u0[3] = O0(a0[6]), u0[4] = O0(a0[14]), u0[5] = O0(a0[15]), u0[6] = O0(a0[27]), u0[7] = O0(a0[28]), u0[8] = O0(a0[2]), u0[9] = O0(a0[4]), u0[10] = O0(a0[7]), u0[11] = O0(a0[13]), u0[12] = O0(a0[16]), u0[13] = O0(a0[26]), u0[14] = O0(a0[29]), u0[15] = O0(a0[42]), u0[16] = O0(a0[3]), u0[17] = O0(a0[8]), u0[18] = O0(a0[12]), u0[19] = O0(a0[17]), u0[20] = O0(a0[25]), u0[21] = O0(a0[30]), u0[22] = O0(a0[41]), u0[23] = O0(a0[43]), u0[24] = O0(a0[9]), u0[25] = O0(a0[11]), u0[26] = O0(a0[18]), u0[27] = O0(a0[24]), u0[28] = O0(a0[31]), u0[29] = O0(a0[40]), u0[30] = O0(a0[44]), u0[31] = O0(a0[53]), u0[32] = O0(a0[10]), u0[33] = O0(a0[19]), u0[34] = O0(a0[23]), u0[35] = O0(a0[32]), u0[36] = O0(a0[39]), u0[37] = O0(a0[45]), u0[38] = O0(a0[52]), u0[39] = O0(a0[54]), u0[40] = O0(a0[20]), u0[41] = O0(a0[22]), u0[42] = O0(a0[33]), u0[43] = O0(a0[38]), u0[44] = O0(a0[46]), u0[45] = O0(a0[51]), u0[46] = O0(a0[55]), u0[47] = O0(a0[60]), u0[48] = O0(a0[21]), u0[49] = O0(a0[34]), u0[50] = O0(a0[37]), u0[51] = O0(a0[47]), u0[52] = O0(a0[50]), u0[53] = O0(a0[56]), u0[54] = O0(a0[59]), u0[55] = O0(a0[61]), u0[56] = O0(a0[35]), u0[57] = O0(a0[36]), u0[58] = O0(a0[48]), u0[59] = O0(a0[49]), u0[60] = O0(a0[57]), u0[61] = O0(a0[58]), u0[62] = O0(a0[62]), u0[63] = O0(a0[63]);
40805
40847
  }
40806
40848
  function ai(a0) {
40807
- const u0 = 0.5 * Math.cos(0.7853975), R0 = 0.5 * Math.cos(3.14159 / 16), L0 = 0.5 * Math.cos(3.14159 / 8), I0 = 0.5 * Math.cos(3 * 3.14159 / 16), N0 = 0.5 * Math.cos(5 * 3.14159 / 16), w0 = 0.5 * Math.cos(3 * 3.14159 / 8), q0 = 0.5 * Math.cos(7 * 3.14159 / 16), B0 = new Array(4), D0 = new Array(4), _0 = new Array(4), ni = new Array(4);
40849
+ const u0 = 0.5 * Math.cos(0.7853975), R0 = 0.5 * Math.cos(3.14159 / 16), L0 = 0.5 * Math.cos(3.14159 / 8), I0 = 0.5 * Math.cos(3 * 3.14159 / 16), N0 = 0.5 * Math.cos(5 * 3.14159 / 16), w0 = 0.5 * Math.cos(3 * 3.14159 / 8), q0 = 0.5 * Math.cos(7 * 3.14159 / 16), B0 = new Array(4), D0 = new Array(4), _0 = new Array(4), si = new Array(4);
40808
40850
  for (let mi = 0; mi < 8; ++mi) {
40809
40851
  const Gi = mi * 8;
40810
- B0[0] = L0 * a0[Gi + 2], B0[1] = w0 * a0[Gi + 2], B0[2] = L0 * a0[Gi + 6], B0[3] = w0 * a0[Gi + 6], D0[0] = R0 * a0[Gi + 1] + I0 * a0[Gi + 3] + N0 * a0[Gi + 5] + q0 * a0[Gi + 7], D0[1] = I0 * a0[Gi + 1] - q0 * a0[Gi + 3] - R0 * a0[Gi + 5] - N0 * a0[Gi + 7], D0[2] = N0 * a0[Gi + 1] - R0 * a0[Gi + 3] + q0 * a0[Gi + 5] + I0 * a0[Gi + 7], D0[3] = q0 * a0[Gi + 1] - N0 * a0[Gi + 3] + I0 * a0[Gi + 5] - R0 * a0[Gi + 7], _0[0] = u0 * (a0[Gi + 0] + a0[Gi + 4]), _0[3] = u0 * (a0[Gi + 0] - a0[Gi + 4]), _0[1] = B0[0] + B0[3], _0[2] = B0[1] - B0[2], ni[0] = _0[0] + _0[1], ni[1] = _0[3] + _0[2], ni[2] = _0[3] - _0[2], ni[3] = _0[0] - _0[1], a0[Gi + 0] = ni[0] + D0[0], a0[Gi + 1] = ni[1] + D0[1], a0[Gi + 2] = ni[2] + D0[2], a0[Gi + 3] = ni[3] + D0[3], a0[Gi + 4] = ni[3] - D0[3], a0[Gi + 5] = ni[2] - D0[2], a0[Gi + 6] = ni[1] - D0[1], a0[Gi + 7] = ni[0] - D0[0];
40852
+ B0[0] = L0 * a0[Gi + 2], B0[1] = w0 * a0[Gi + 2], B0[2] = L0 * a0[Gi + 6], B0[3] = w0 * a0[Gi + 6], D0[0] = R0 * a0[Gi + 1] + I0 * a0[Gi + 3] + N0 * a0[Gi + 5] + q0 * a0[Gi + 7], D0[1] = I0 * a0[Gi + 1] - q0 * a0[Gi + 3] - R0 * a0[Gi + 5] - N0 * a0[Gi + 7], D0[2] = N0 * a0[Gi + 1] - R0 * a0[Gi + 3] + q0 * a0[Gi + 5] + I0 * a0[Gi + 7], D0[3] = q0 * a0[Gi + 1] - N0 * a0[Gi + 3] + I0 * a0[Gi + 5] - R0 * a0[Gi + 7], _0[0] = u0 * (a0[Gi + 0] + a0[Gi + 4]), _0[3] = u0 * (a0[Gi + 0] - a0[Gi + 4]), _0[1] = B0[0] + B0[3], _0[2] = B0[1] - B0[2], si[0] = _0[0] + _0[1], si[1] = _0[3] + _0[2], si[2] = _0[3] - _0[2], si[3] = _0[0] - _0[1], a0[Gi + 0] = si[0] + D0[0], a0[Gi + 1] = si[1] + D0[1], a0[Gi + 2] = si[2] + D0[2], a0[Gi + 3] = si[3] + D0[3], a0[Gi + 4] = si[3] - D0[3], a0[Gi + 5] = si[2] - D0[2], a0[Gi + 6] = si[1] - D0[1], a0[Gi + 7] = si[0] - D0[0];
40811
40853
  }
40812
40854
  for (let mi = 0; mi < 8; ++mi)
40813
- B0[0] = L0 * a0[16 + mi], B0[1] = w0 * a0[16 + mi], B0[2] = L0 * a0[48 + mi], B0[3] = w0 * a0[48 + mi], D0[0] = R0 * a0[8 + mi] + I0 * a0[24 + mi] + N0 * a0[40 + mi] + q0 * a0[56 + mi], D0[1] = I0 * a0[8 + mi] - q0 * a0[24 + mi] - R0 * a0[40 + mi] - N0 * a0[56 + mi], D0[2] = N0 * a0[8 + mi] - R0 * a0[24 + mi] + q0 * a0[40 + mi] + I0 * a0[56 + mi], D0[3] = q0 * a0[8 + mi] - N0 * a0[24 + mi] + I0 * a0[40 + mi] - R0 * a0[56 + mi], _0[0] = u0 * (a0[mi] + a0[32 + mi]), _0[3] = u0 * (a0[mi] - a0[32 + mi]), _0[1] = B0[0] + B0[3], _0[2] = B0[1] - B0[2], ni[0] = _0[0] + _0[1], ni[1] = _0[3] + _0[2], ni[2] = _0[3] - _0[2], ni[3] = _0[0] - _0[1], a0[0 + mi] = ni[0] + D0[0], a0[8 + mi] = ni[1] + D0[1], a0[16 + mi] = ni[2] + D0[2], a0[24 + mi] = ni[3] + D0[3], a0[32 + mi] = ni[3] - D0[3], a0[40 + mi] = ni[2] - D0[2], a0[48 + mi] = ni[1] - D0[1], a0[56 + mi] = ni[0] - D0[0];
40855
+ B0[0] = L0 * a0[16 + mi], B0[1] = w0 * a0[16 + mi], B0[2] = L0 * a0[48 + mi], B0[3] = w0 * a0[48 + mi], D0[0] = R0 * a0[8 + mi] + I0 * a0[24 + mi] + N0 * a0[40 + mi] + q0 * a0[56 + mi], D0[1] = I0 * a0[8 + mi] - q0 * a0[24 + mi] - R0 * a0[40 + mi] - N0 * a0[56 + mi], D0[2] = N0 * a0[8 + mi] - R0 * a0[24 + mi] + q0 * a0[40 + mi] + I0 * a0[56 + mi], D0[3] = q0 * a0[8 + mi] - N0 * a0[24 + mi] + I0 * a0[40 + mi] - R0 * a0[56 + mi], _0[0] = u0 * (a0[mi] + a0[32 + mi]), _0[3] = u0 * (a0[mi] - a0[32 + mi]), _0[1] = B0[0] + B0[3], _0[2] = B0[1] - B0[2], si[0] = _0[0] + _0[1], si[1] = _0[3] + _0[2], si[2] = _0[3] - _0[2], si[3] = _0[0] - _0[1], a0[0 + mi] = si[0] + D0[0], a0[8 + mi] = si[1] + D0[1], a0[16 + mi] = si[2] + D0[2], a0[24 + mi] = si[3] + D0[3], a0[32 + mi] = si[3] - D0[3], a0[40 + mi] = si[2] - D0[2], a0[48 + mi] = si[1] - D0[1], a0[56 + mi] = si[0] - D0[0];
40814
40856
  }
40815
40857
  function oi(a0) {
40816
40858
  for (let u0 = 0; u0 < 64; ++u0) {
@@ -40848,8 +40890,8 @@ class EXRLoader extends DataTextureLoader {
40848
40890
  if (q0 <= B0)
40849
40891
  for (let Si = 0; Si < B0 - q0 + 1; Si++)
40850
40892
  I0[Si + q0] = Hi(u0, R0);
40851
- const D0 = new Uint16Array(65536), _0 = r0(I0, D0), ni = Mi(u0, R0);
40852
- vi(a0.array, u0, R0, ni, L0, N0);
40893
+ const D0 = new Uint16Array(65536), _0 = r0(I0, D0), si = Mi(u0, R0);
40894
+ vi(a0.array, u0, R0, si, L0, N0);
40853
40895
  for (let Si = 0; Si < a0.inputChannels.length; ++Si) {
40854
40896
  const gi = w0[Si];
40855
40897
  for (let Wi = 0; Wi < w0[Si].size; ++Wi)
@@ -40879,20 +40921,20 @@ class EXRLoader extends DataTextureLoader {
40879
40921
  const B0 = new Array(4);
40880
40922
  for (let D0 = 0; D0 < a0.lines; D0++)
40881
40923
  for (let _0 = 0; _0 < a0.inputChannels.length; _0++) {
40882
- let ni = 0;
40924
+ let si = 0;
40883
40925
  switch (a0.inputChannels[_0].pixelType) {
40884
40926
  case 1:
40885
40927
  B0[0] = w0, B0[1] = B0[0] + a0.columns, w0 = B0[1] + a0.columns;
40886
40928
  for (let Gi = 0; Gi < a0.columns; ++Gi) {
40887
40929
  const Si = R0[B0[0]++] << 8 | R0[B0[1]++];
40888
- ni += Si, N0.setUint16(q0, ni, !0), q0 += 2;
40930
+ si += Si, N0.setUint16(q0, si, !0), q0 += 2;
40889
40931
  }
40890
40932
  break;
40891
40933
  case 2:
40892
40934
  B0[0] = w0, B0[1] = B0[0] + a0.columns, B0[2] = B0[1] + a0.columns, w0 = B0[2] + a0.columns;
40893
40935
  for (let Gi = 0; Gi < a0.columns; ++Gi) {
40894
40936
  const Si = R0[B0[0]++] << 24 | R0[B0[1]++] << 16 | R0[B0[2]++] << 8;
40895
- ni += Si, N0.setUint32(q0, ni, !0), q0 += 4;
40937
+ si += Si, N0.setUint32(q0, si, !0), q0 += 4;
40896
40938
  }
40897
40939
  break;
40898
40940
  }
@@ -40941,7 +40983,7 @@ class EXRLoader extends DataTextureLoader {
40941
40983
  Wi.name == Ui.name && (Wi.compression = Ui.compression, Ui.index >= 0 && (D0.idx[Ui.index] = gi), Wi.offset = gi);
40942
40984
  }
40943
40985
  }
40944
- let _0, ni, mi;
40986
+ let _0, si, mi;
40945
40987
  if (I0.acCompressedSize > 0)
40946
40988
  switch (I0.acCompression) {
40947
40989
  case 0:
@@ -40958,7 +41000,7 @@ class EXRLoader extends DataTextureLoader {
40958
41000
  offset: R0,
40959
41001
  size: I0.dcCompressedSize
40960
41002
  };
40961
- ni = new Uint16Array(ii(gi).buffer), R0.value += I0.dcCompressedSize;
41003
+ si = new Uint16Array(ii(gi).buffer), R0.value += I0.dcCompressedSize;
40962
41004
  }
40963
41005
  if (I0.rleRawSize > 0) {
40964
41006
  const gi = a0.array.slice(R0.value, R0.value + I0.rleCompressedSize), Wi = unzlibSync(gi);
@@ -40971,7 +41013,7 @@ class EXRLoader extends DataTextureLoader {
40971
41013
  for (let gi = 0; gi < a0.lines; ++gi)
40972
41014
  for (let Wi = 0; Wi < B0.length; ++Wi)
40973
41015
  Si[Wi].push(Gi), Gi += B0[Wi].width * a0.type * 2;
40974
- ri(D0, Si, B0, _0, ni, L0);
41016
+ ri(D0, Si, B0, _0, si, L0);
40975
41017
  for (let gi = 0; gi < B0.length; ++gi) {
40976
41018
  const Wi = B0[gi];
40977
41019
  if (!Wi.decoded)
@@ -41206,13 +41248,13 @@ class EXRLoader extends DataTextureLoader {
41206
41248
  a0.columns = w0 + a0.blockWidth > a0.width ? a0.width - w0 : a0.blockWidth, a0.lines = q0 + a0.blockHeight > a0.height ? a0.height - q0 : a0.blockHeight;
41207
41249
  const B0 = a0.columns * a0.totalBytes, _0 = a0.size < a0.lines * B0 ? a0.uncompress(a0) : k0(a0);
41208
41250
  u0.value += a0.size;
41209
- for (let ni = 0; ni < a0.lines; ni++) {
41210
- const mi = ni * a0.columns * a0.totalBytes;
41251
+ for (let si = 0; si < a0.lines; si++) {
41252
+ const mi = si * a0.columns * a0.totalBytes;
41211
41253
  for (let Gi = 0; Gi < a0.inputChannels.length; Gi++) {
41212
41254
  const Si = ln.channels[Gi].name, gi = a0.channelByteOffsets[Si] * a0.columns, Wi = a0.decodeChannels[Si];
41213
41255
  if (Wi === void 0) continue;
41214
41256
  R0.value = mi + gi;
41215
- const ui = (a0.height - (1 + q0 + ni)) * a0.outLineWidth;
41257
+ const ui = (a0.height - (1 + q0 + si)) * a0.outLineWidth;
41216
41258
  for (let Ui = 0; Ui < a0.columns; Ui++) {
41217
41259
  const Fi = ui + (Ui + w0) * a0.outputChannels + Wi;
41218
41260
  a0.byteArray[Fi] = a0.getter(_0, R0);
@@ -41231,11 +41273,11 @@ class EXRLoader extends DataTextureLoader {
41231
41273
  for (let B0 = 0; B0 < a0.blockHeight; B0++) {
41232
41274
  const D0 = L0 * a0.blockHeight, _0 = B0 + a0.scanOrder(D0);
41233
41275
  if (_0 >= a0.height) continue;
41234
- const ni = B0 * N0, mi = (a0.height - 1 - _0) * a0.outLineWidth;
41276
+ const si = B0 * N0, mi = (a0.height - 1 - _0) * a0.outLineWidth;
41235
41277
  for (let Gi = 0; Gi < a0.inputChannels.length; Gi++) {
41236
41278
  const Si = ln.channels[Gi].name, gi = a0.channelByteOffsets[Si] * a0.columns, Wi = a0.decodeChannels[Si];
41237
41279
  if (Wi !== void 0) {
41238
- R0.value = ni + gi;
41280
+ R0.value = si + gi;
41239
41281
  for (let ui = 0; ui < a0.columns; ui++) {
41240
41282
  const Ui = mi + ui * a0.outputChannels + Wi;
41241
41283
  a0.byteArray[Ui] = a0.getter(q0, R0);
@@ -41373,17 +41415,17 @@ class EXRLoader extends DataTextureLoader {
41373
41415
  N0.decodeChannels[_0.name] !== void 0 && (N0.channelByteOffsets[_0.name] = D0), D0 += _0.pixelType * 2;
41374
41416
  if (N0.totalBytes = D0, N0.outLineWidth = N0.width * N0.outputChannels, a0.lineOrder === "INCREASING_Y" ? N0.scanOrder = (_0) => _0 : N0.scanOrder = (_0) => N0.height - 1 - _0, N0.outputChannels == 4 ? (N0.format = RGBAFormat, N0.colorSpace = LinearSRGBColorSpace) : (N0.format = RedFormat, N0.colorSpace = NoColorSpace), a0.spec.singleTile) {
41375
41417
  N0.blockHeight = a0.tiles.ySize, N0.blockWidth = a0.tiles.xSize;
41376
- const _0 = pn(a0.tiles, N0.width, N0.height), ni = bn(_0, N0.width, a0.tiles.xSize, a0.tiles.roundingMode), mi = bn(_0, N0.height, a0.tiles.ySize, a0.tiles.roundingMode);
41377
- N0.tileCount = ni[0] * mi[0];
41418
+ const _0 = pn(a0.tiles, N0.width, N0.height), si = bn(_0, N0.width, a0.tiles.xSize, a0.tiles.roundingMode), mi = bn(_0, N0.height, a0.tiles.ySize, a0.tiles.roundingMode);
41419
+ N0.tileCount = si[0] * mi[0];
41378
41420
  for (let Gi = 0; Gi < _0; Gi++)
41379
41421
  for (let Si = 0; Si < mi[Gi]; Si++)
41380
- for (let gi = 0; gi < ni[Gi]; gi++)
41422
+ for (let gi = 0; gi < si[Gi]; gi++)
41381
41423
  Ni(u0, L0);
41382
41424
  N0.decode = Wn.bind(N0);
41383
41425
  } else {
41384
41426
  N0.blockWidth = N0.width;
41385
41427
  const _0 = Math.ceil(N0.height / N0.blockHeight);
41386
- for (let ni = 0; ni < _0; ni++)
41428
+ for (let si = 0; si < _0; si++)
41387
41429
  Ni(u0, L0);
41388
41430
  N0.decode = dn.bind(N0);
41389
41431
  }
@@ -48268,7 +48310,7 @@ function createAreaLightMaterial(ct) {
48268
48310
  const e = new MeshBasicMaterial();
48269
48311
  return e.color.setScalar(ct), e;
48270
48312
  }
48271
- const version = "0.21.27";
48313
+ const version = "0.21.28";
48272
48314
  class Event {
48273
48315
  constructor() {
48274
48316
  J0(this, "event", new EventEmitter());
@@ -48716,7 +48758,7 @@ class AddVis extends Command {
48716
48758
  this.type = "AddVis", this.visType = st, this.visOptions = Zt, st !== void 0 && (this.name = `Add Vis: ${st}`);
48717
48759
  }
48718
48760
  execute() {
48719
- return si(this, null, function* () {
48761
+ return ni(this, null, function* () {
48720
48762
  yield this.editor.viewport.setVis(this.visType, this.visOptions), this.editor.select(null);
48721
48763
  });
48722
48764
  }
@@ -48742,7 +48784,7 @@ class AddObject extends Command {
48742
48784
  this.type = "AddObject", this.objectType = st, this.objectOptions = Zt, st !== void 0 && (this.name = `Add Object: ${st}`);
48743
48785
  }
48744
48786
  execute() {
48745
- return si(this, null, function* () {
48787
+ return ni(this, null, function* () {
48746
48788
  var Zt, Wt, Yt;
48747
48789
  this.obj = yield this.editor.viewport.vis.drawController.draw(
48748
48790
  this.objectType,
@@ -48807,7 +48849,7 @@ class RemoveObject extends Command {
48807
48849
  this.object.hide(), (c = this.editor.viewport.vis) == null || c.mList.removeObject3d(this.object.object3d), this.editor.select(null);
48808
48850
  }
48809
48851
  undo() {
48810
- return si(this, null, function* () {
48852
+ return ni(this, null, function* () {
48811
48853
  var c;
48812
48854
  this.object.show(), (c = this.editor.viewport.vis) == null || c.mList.resetObject3d(this.object.object3d);
48813
48855
  });
@@ -48829,7 +48871,7 @@ class CopyObject extends Command {
48829
48871
  this.type = "CopyObject", this.name = "Copy Object", this.object = st;
48830
48872
  }
48831
48873
  execute() {
48832
- return si(this, null, function* () {
48874
+ return ni(this, null, function* () {
48833
48875
  var Yt, vt;
48834
48876
  const c = this.editor.viewport.vis.mList, st = c.getObject3dKey(this.object.object3d), Zt = yield this.object.instantiate();
48835
48877
  this.copyObject = Zt, c.objectList.has(Zt.object3d) ? (Yt = this.editor.viewport.vis) == null || Yt.mList.changeObject3dKey(
@@ -48851,7 +48893,7 @@ class CopyObject extends Command {
48851
48893
  });
48852
48894
  }
48853
48895
  undo() {
48854
- return si(this, null, function* () {
48896
+ return ni(this, null, function* () {
48855
48897
  var c, st;
48856
48898
  (c = this.editor.viewport.vis) == null || c.mList.removeObject3d(this.copyObject.object3d), (st = this.copyObject) == null || st.erase(), this.editor.select(null);
48857
48899
  });
@@ -48877,13 +48919,13 @@ class SetSetting extends Command {
48877
48919
  this.type = "SetSetting", this.updatable = !0, this.name = `Set Setting.${st}`, this.attributeName = st, this.newValue = Zt, c.viewport.vis && (this.oldValue = c.viewport.vis.settings[st]);
48878
48920
  }
48879
48921
  execute() {
48880
- return si(this, null, function* () {
48922
+ return ni(this, null, function* () {
48881
48923
  const c = this.editor.viewport.vis;
48882
48924
  c.settings[this.attributeName] = this.newValue, yield c.settings[this.attributeName], this.editor.emit("settingsChanged");
48883
48925
  });
48884
48926
  }
48885
48927
  undo() {
48886
- return si(this, null, function* () {
48928
+ return ni(this, null, function* () {
48887
48929
  const c = this.editor.viewport.vis;
48888
48930
  c.settings[this.attributeName] = this.oldValue, yield c.settings[this.attributeName], this.editor.emit("settingsChanged");
48889
48931
  });
@@ -48939,6 +48981,31 @@ class SetSceenMap extends SetMaterialMap {
48939
48981
  super.fromJSON(e), this.material = this.object[this.materialSlot];
48940
48982
  }
48941
48983
  }
48984
+ class SetGeometry extends Command {
48985
+ constructor(e, c = null, st) {
48986
+ super(e), this.type = "SetGeometry", this.name = "Set Geometry", this.updatable = !0, this.object = c, this.oldGeometry = c !== null ? c.geometry : null, this.newGeometry = st || null;
48987
+ }
48988
+ execute() {
48989
+ this.object.geometry.dispose(), this.object.geometry = this.newGeometry, this.object.geometry.computeBoundingSphere(), this.editor.emit("geometryChanged", this.object);
48990
+ }
48991
+ undo() {
48992
+ this.object.geometry.dispose(), this.object.geometry = this.oldGeometry, this.object.geometry.computeBoundingSphere(), this.editor.emit("geometryChanged", this.object);
48993
+ }
48994
+ update(e) {
48995
+ this.newGeometry = e.newGeometry;
48996
+ }
48997
+ toJSON() {
48998
+ var c;
48999
+ const e = super.toJSON(this);
49000
+ return e.objectUuid = this.editor.uuidByObject(this.object), e.oldGeometry = (c = this.oldGeometry) == null ? void 0 : c.toJSON(), e.newGeometry = this.newGeometry.toJSON(), e;
49001
+ }
49002
+ fromJSON(e) {
49003
+ super.fromJSON(e), this.object = this.editor.objectByUuid(e.objectUuid), e.oldGeometry && (this.oldGeometry = c(e.oldGeometry)), this.newGeometry = c(e.newGeometry);
49004
+ function c(st) {
49005
+ return new ObjectLoader().parseGeometries([st])[st.uuid];
49006
+ }
49007
+ }
49008
+ }
48942
49009
  const Commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
48943
49010
  __proto__: null,
48944
49011
  AddObject,
@@ -48946,6 +49013,7 @@ const Commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
48946
49013
  CopyObject,
48947
49014
  RemoveObject,
48948
49015
  SetColor,
49016
+ SetGeometry,
48949
49017
  SetMaterial,
48950
49018
  SetMaterialColor,
48951
49019
  SetMaterialMap,
@@ -48971,9 +49039,15 @@ class History {
48971
49039
  this.editor = e, this.undos = [], this.redos = [], this.lastCmdTime = Date.now(), this.idCounter = 0, this.historyDisabled = !1;
48972
49040
  }
48973
49041
  execute(e, c) {
48974
- return si(this, null, function* () {
49042
+ return ni(this, null, function* () {
48975
49043
  const st = this.undos[this.undos.length - 1], Zt = Date.now() - this.lastCmdTime;
48976
- st && st.updatable && e.updatable && st.object === e.object && st.type === e.type && st.attributeName === e.attributeName && st.attributeName2 === e.attributeName2 && st.name === e.name && st.objectUuid === e.objectUuid && st.materialSlot === e.materialSlot && Zt < 500 ? (st.update(e), e = st) : (this.undos.push(e), e.id = ++this.idCounter), e.name = c !== void 0 ? c : e.name, yield e.execute(), this.editor.playing || (e.json = e.toJSON()), this.lastCmdTime = Date.now(), this.redos = [], this.editor.emit("historyChanged", e);
49044
+ st && st.updatable && e.updatable && st.object === e.object && st.type === e.type && st.attributeName === e.attributeName && st.attributeName2 === e.attributeName2 && st.name === e.name && st.objectUuid === e.objectUuid && st.materialSlot === e.materialSlot && Zt < 500 ? (st.update(e), e = st) : (this.undos.push(e), e.id = ++this.idCounter), e.name = c !== void 0 ? c : e.name;
49045
+ try {
49046
+ yield e.execute();
49047
+ } catch (Yt) {
49048
+ console.error(Yt, e);
49049
+ }
49050
+ this.editor.playing || (e.json = e.toJSON()), this.lastCmdTime = Date.now(), this.redos = [], this.editor.emit("historyChanged", e);
48977
49051
  });
48978
49052
  }
48979
49053
  undo() {
@@ -49024,7 +49098,7 @@ class History {
49024
49098
  return new Promise((e) => {
49025
49099
  const c = [...this.undos], st = c.length;
49026
49100
  let Zt = 0;
49027
- const Wt = 1e3 / 60, Yt = () => si(this, null, function* () {
49101
+ const Wt = 1e3 / 60, Yt = () => ni(this, null, function* () {
49028
49102
  const vt = performance.now();
49029
49103
  for (; c.length > 0 && performance.now() - vt < Wt; ) {
49030
49104
  const Tt = c.shift();
@@ -49039,7 +49113,7 @@ class History {
49039
49113
  });
49040
49114
  }
49041
49115
  executeUndo(e) {
49042
- return si(this, null, function* () {
49116
+ return ni(this, null, function* () {
49043
49117
  e.fromJSON(e.json);
49044
49118
  try {
49045
49119
  (e.json.type === "AddObject" || !e.json.objectUuid || e.object) && (yield e.execute(), e.fixJSON());
@@ -49062,7 +49136,7 @@ class Viewport {
49062
49136
  this.options = c, this.editor = e;
49063
49137
  }
49064
49138
  setSaveCamera() {
49065
- return si(this, null, function* () {
49139
+ return ni(this, null, function* () {
49066
49140
  var Zt;
49067
49141
  const e = this.vis.pencil, c = e.cameraPositon, st = e.cameraTarget;
49068
49142
  yield this.editor.execute(
@@ -49073,7 +49147,7 @@ class Viewport {
49073
49147
  });
49074
49148
  }
49075
49149
  addVis(st) {
49076
- return si(this, arguments, function* (e, c = {}) {
49150
+ return ni(this, arguments, function* (e, c = {}) {
49077
49151
  this.replaceVis() && (yield this.editor.execute(new AddVis(this.editor, e, c)));
49078
49152
  });
49079
49153
  }
@@ -49085,7 +49159,7 @@ class Viewport {
49085
49159
  return !0;
49086
49160
  }
49087
49161
  setVis(st) {
49088
- return si(this, arguments, function* (e, c = {}) {
49162
+ return ni(this, arguments, function* (e, c = {}) {
49089
49163
  var Wt;
49090
49164
  if (!this.options.visFactories && (this.editor.setViewportVis(e), !this.options.visFactories)) {
49091
49165
  console.error("visFactories is not defined");
@@ -49109,10 +49183,6 @@ class Viewport {
49109
49183
  });
49110
49184
  });
49111
49185
  }
49112
- setResetCamera() {
49113
- var e, c;
49114
- (c = (e = this.vis) == null ? void 0 : e.pencil.controls) == null || c.reset(!0);
49115
- }
49116
49186
  setResetCameraUp() {
49117
49187
  var Yt, vt, Tt;
49118
49188
  const c = ((Yt = this.vis) == null ? void 0 : Yt.pencil.getPlugin("draw").group).getSize(), st = (c.max.x + c.min.x) / 2, Zt = (c.max.y + c.min.y) / 2, Wt = (vt = this.vis) == null ? void 0 : vt.pencil.cameraPositon.z;
@@ -49134,13 +49204,13 @@ class Viewport {
49134
49204
  });
49135
49205
  }
49136
49206
  addObj(st) {
49137
- return si(this, arguments, function* (e, c = {}) {
49207
+ return ni(this, arguments, function* (e, c = {}) {
49138
49208
  const Zt = objs$5[e].getInitOptions;
49139
49209
  Zt && Object.assign(c, Zt(this.vis.pencil, c)), yield this.editor.execute(new AddObject(this.editor, e, c));
49140
49210
  });
49141
49211
  }
49142
49212
  removeObj(e) {
49143
- return si(this, null, function* () {
49213
+ return ni(this, null, function* () {
49144
49214
  const { vis: c } = this;
49145
49215
  if (!c)
49146
49216
  return;
@@ -49149,7 +49219,7 @@ class Viewport {
49149
49219
  });
49150
49220
  }
49151
49221
  copyObj(e) {
49152
- return si(this, null, function* () {
49222
+ return ni(this, null, function* () {
49153
49223
  const { vis: c } = this;
49154
49224
  if (!c)
49155
49225
  return;
@@ -49406,12 +49476,12 @@ class Editor {
49406
49476
  this.checkSelectOption(Wt), this.selectOption = Wt, this.emit("sceneGraphChanged");
49407
49477
  }
49408
49478
  execute(e, c) {
49409
- return si(this, null, function* () {
49479
+ return ni(this, null, function* () {
49410
49480
  yield this.history.execute(e, c);
49411
49481
  });
49412
49482
  }
49413
49483
  fromJSON(e, c) {
49414
- return si(this, null, function* () {
49484
+ return ni(this, null, function* () {
49415
49485
  var st, Zt, Wt;
49416
49486
  try {
49417
49487
  console.time("vis-core:time.fromJSON");
@@ -49516,19 +49586,20 @@ class Base extends Event {
49516
49586
  J0(this, "mouseButtonsActiveStore");
49517
49587
  if (this.container = c.container, this.options = bi({
49518
49588
  assetsPrefix: "",
49519
- editor: !0,
49520
- showInfoLog: !0
49589
+ editor: !0
49521
49590
  }, c), !this.options.assetsPrefix) {
49522
49591
  let st = "/";
49523
49592
  st === "/" && (st = ""), this.options.assetsPrefix = st;
49524
49593
  }
49525
- if (this.options.editor && (this.editor = new Editor({
49526
- assetsPrefix: this.options.assetsPrefix,
49527
- visFactories: this
49528
- })), this.visName = this.constructor.VisName, this.options.showInfoLog) {
49594
+ if (this.options.editor) {
49595
+ this.editor = new Editor({
49596
+ assetsPrefix: this.options.assetsPrefix,
49597
+ visFactories: this
49598
+ });
49529
49599
  const st = detecting();
49530
49600
  console.info("vis-core:", version, st);
49531
49601
  }
49602
+ this.visName = this.constructor.VisName;
49532
49603
  }
49533
49604
  setOptions(c) {
49534
49605
  this.options = bi(bi({}, this.options), c);
@@ -49539,26 +49610,29 @@ class Base extends Event {
49539
49610
  get baseObjectByUuid() {
49540
49611
  return this.editor.baseObjectByUuid.bind(this.editor);
49541
49612
  }
49613
+ get objectByUuid() {
49614
+ return this.editor.objectByUuid.bind(this.editor);
49615
+ }
49542
49616
  get getDataURL() {
49543
49617
  return this.editor.getDataURL.bind(this.editor);
49544
49618
  }
49545
49619
  loaderAdd(...c) {
49546
49620
  }
49547
49621
  initMaterial(...c) {
49548
- return si(this, null, function* () {
49622
+ return ni(this, null, function* () {
49549
49623
  });
49550
49624
  }
49551
49625
  initVis(...c) {
49552
- return si(this, null, function* () {
49626
+ return ni(this, null, function* () {
49553
49627
  });
49554
49628
  }
49555
49629
  init(...c) {
49556
- return si(this, null, function* () {
49630
+ return ni(this, null, function* () {
49557
49631
  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.drawController.objectsPromise);
49558
49632
  });
49559
49633
  }
49560
49634
  initPencil() {
49561
- return si(this, null, function* () {
49635
+ return ni(this, null, function* () {
49562
49636
  if (this.pencil) return;
49563
49637
  this.pencilConfig = bi({}, this.pencilConfig), this.options.css2DContainer && (this.pencilConfig.css2DRendererParams = {
49564
49638
  container: this.options.css2DContainer
@@ -49695,7 +49769,7 @@ class Base extends Event {
49695
49769
  );
49696
49770
  }
49697
49771
  handleSetting(c, st) {
49698
- return si(this, null, function* () {
49772
+ return ni(this, null, function* () {
49699
49773
  const { pencil: Zt } = this;
49700
49774
  if (c === "mouseWheel" || c === "mouseLeft" || c === "mouseRight") {
49701
49775
  if (yield this.settings.mouseNone, !this.settings.mouseNone) {
@@ -49724,7 +49798,7 @@ class Base extends Event {
49724
49798
  this.showState && (this.playing ? this.drawController.hide() : (this.drawController.hidePrefab(), this.drawController.hide()), this.showState = !1, this.emit("hide"));
49725
49799
  }
49726
49800
  addCSS2D(Zt) {
49727
- return si(this, arguments, function* (c, st = {}) {
49801
+ return ni(this, arguments, function* (c, st = {}) {
49728
49802
  typeof st == "string" && (st = { display: st }), st.display && (c.style.display = st.display);
49729
49803
  let Wt = 0;
49730
49804
  typeof st.onTop != "undefined" && (Wt = st.onTop);
@@ -49735,7 +49809,7 @@ class Base extends Event {
49735
49809
  });
49736
49810
  }
49737
49811
  addCSS3D(Zt) {
49738
- return si(this, arguments, function* (c, st = {}) {
49812
+ return ni(this, arguments, function* (c, st = {}) {
49739
49813
  st.display && (c.style.display = st.display);
49740
49814
  let Wt = 0;
49741
49815
  typeof st.onTop != "undefined" && (Wt = st.onTop);
@@ -49748,16 +49822,28 @@ class Base extends Event {
49748
49822
  return vt.setChildren(c), vt;
49749
49823
  });
49750
49824
  }
49751
- lookAt(c, st, Zt, Wt, Yt, vt, Tt = !1) {
49752
- this.pencil.controls.setLookAt(
49753
- c,
49754
- st,
49755
- Zt,
49756
- Wt,
49757
- Yt,
49758
- vt,
49759
- Tt
49760
- );
49825
+ lookAt(c, st, Zt, Wt, Yt, vt, Tt = !1, Jt = 250) {
49826
+ return ni(this, null, function* () {
49827
+ this.pencil.controls.smoothTime = Jt / 1e3, yield this.pencil.controls.setLookAt(
49828
+ c,
49829
+ st,
49830
+ Zt,
49831
+ Wt,
49832
+ Yt,
49833
+ vt,
49834
+ Tt
49835
+ ), this.pencil.controls.smoothTime = 250 / 1e3;
49836
+ });
49837
+ }
49838
+ truck(c, st, Zt = !1, Wt = 250) {
49839
+ return ni(this, null, function* () {
49840
+ this.pencil.controls.smoothTime = Wt / 1e3, this.pencil.controls.restThreshold = 0, yield this.pencil.controls.truck(c, st, Zt), this.pencil.controls.restThreshold = 25e-4, this.pencil.controls.smoothTime = 250 / 1e3;
49841
+ });
49842
+ }
49843
+ resetCamera(c = !1, st = 250) {
49844
+ return ni(this, null, function* () {
49845
+ this.pencil.controls.smoothTime = st / 1e3, yield this.pencil.controls.reset(c), this.pencil.controls.smoothTime = 250 / 1e3;
49846
+ });
49761
49847
  }
49762
49848
  unproject(c, st = 0) {
49763
49849
  const Zt = new Vector3(), Wt = new Vector3(), { left: Yt, top: vt, width: Tt, height: Jt } = this.container.getBoundingClientRect(), $t = (c.clientX - Yt) / Tt * 2 - 1, de = -((c.clientY - vt) / Jt) * 2 + 1, Xe = this.pencil.cameraPositon.clone();
@@ -49845,7 +49931,7 @@ let PlaneMap$1 = class extends D$1 {
49845
49931
  }, c);
49846
49932
  }
49847
49933
  create() {
49848
- return si(this, null, function* () {
49934
+ return ni(this, null, function* () {
49849
49935
  const {
49850
49936
  geojson: c,
49851
49937
  extrudeLineGeojson: st,
@@ -49858,7 +49944,7 @@ let PlaneMap$1 = class extends D$1 {
49858
49944
  const Tt = this.pencil.getPlugin("draw");
49859
49945
  if (Wt) {
49860
49946
  const e0 = yield Promise.all(
49861
- c.features.map((i0) => si(this, null, function* () {
49947
+ c.features.map((i0) => ni(this, null, function* () {
49862
49948
  const { properties: n0 } = i0, s0 = `area-group-${this.getPropertiesKey(n0)}`, l0 = yield Tt.draw("Group", {
49863
49949
  target: this,
49864
49950
  key: s0
@@ -49947,12 +50033,12 @@ let PlaneMap$1 = class extends D$1 {
49947
50033
  return Wt.lineWidth = st, c.useMaterial(Zt), Wt;
49948
50034
  }
49949
50035
  addArea(c, st) {
49950
- return si(this, null, function* () {
50036
+ return ni(this, null, function* () {
49951
50037
  var $t;
49952
50038
  const { bbox: Zt, material: Wt, onTop: Yt } = st, vt = this.geojson2Meta(c), Tt = this.pencil.getPlugin("worker"), Jt = this.pencil.getPlugin("draw");
49953
50039
  if (st.areaGroup)
49954
50040
  return yield Promise.all(
49955
- vt.map((de) => si(this, null, function* () {
50041
+ vt.map((de) => ni(this, null, function* () {
49956
50042
  var Je;
49957
50043
  const { coords: Xe, properties: Ke } = de, Qe = this.findGroup(this.getPropertiesKey(Ke)), qe = yield Tt.geoGeometry(
49958
50044
  "extrudePolygon",
@@ -50009,7 +50095,7 @@ let PlaneMap$1 = class extends D$1 {
50009
50095
  return `${this.key}-${c.adcode || c.DistrictID || c.NAME_CN}`;
50010
50096
  }
50011
50097
  addPlane(c, st) {
50012
- return si(this, null, function* () {
50098
+ return ni(this, null, function* () {
50013
50099
  var Qe, qe, $e;
50014
50100
  const { material: Zt } = st, Wt = this.geojson2Meta({
50015
50101
  type: "FeatureCollection",
@@ -50065,12 +50151,12 @@ let PlaneMap$1 = class extends D$1 {
50065
50151
  });
50066
50152
  }
50067
50153
  addLine(c, st) {
50068
- return si(this, null, function* () {
50154
+ return ni(this, null, function* () {
50069
50155
  var Jt;
50070
50156
  const { material: Zt, onTop: Wt } = st, Yt = this.geojson2Meta(c), vt = this.pencil.getPlugin("worker"), Tt = this.pencil.getPlugin("draw");
50071
50157
  if (st.areaGroup)
50072
50158
  return yield Promise.all(
50073
- Yt.map(($t) => si(this, null, function* () {
50159
+ Yt.map(($t) => ni(this, null, function* () {
50074
50160
  var $e;
50075
50161
  const { coords: de, properties: Xe } = $t, Ke = this.findGroup(this.getPropertiesKey(Xe)), Qe = yield vt.geoGeometry("line", {
50076
50162
  mesaage: {
@@ -50253,10 +50339,10 @@ class ContinentsBg extends D$1 {
50253
50339
  this.options = c;
50254
50340
  }
50255
50341
  create() {
50256
- return si(this, null, function* () {
50342
+ return ni(this, null, function* () {
50257
50343
  const { depth: c } = this.options, st = this.pencil.installPlugins.get("materialList"), Zt = this.pencil.getPlugin("draw"), Wt = st.getMaterialObj("continents");
50258
50344
  this.createGroup(), this.object3d.name = "大洲组", yield Promise.all(
50259
- continents.features.map((Yt) => si(this, null, function* () {
50345
+ continents.features.map((Yt) => ni(this, null, function* () {
50260
50346
  const vt = Yt.properties.name;
50261
50347
  vt === "大洋洲" && (Yt.geometry.coordinates[4] = [], Yt.geometry.coordinates[21] = []);
50262
50348
  const Tt = centroid(Yt).geometry.coordinates;
@@ -50354,7 +50440,7 @@ class PlaneMap extends D$1 {
50354
50440
  });
50355
50441
  }
50356
50442
  create() {
50357
- return si(this, null, function* () {
50443
+ return ni(this, null, function* () {
50358
50444
  const { geojson: c, bbox: st } = this.options, Zt = this.geojson2Meta(c), Wt = this.pencil.getPlugin("worker"), Yt = this.pencil.getPlugin("draw"), Tt = yield this.pencil.getPlugin("loader").load("/1.png"), Jt = yield Wt.geoGeometry("extrudePolygon", {
50359
50445
  mesaage: {
50360
50446
  coordinatesArr: Zt.map(({ coords: _e }) => _e).flat(),
@@ -50423,7 +50509,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50423
50509
  const e = this.loader;
50424
50510
  e.add(["/image/map/jianbian.webp"]), e.add(["/image/map/hp2.webp", "/image/map/fx2.webp"]);
50425
50511
  }, ct.initMaterial = function() {
50426
- return si(this, null, function* () {
50512
+ return ni(this, null, function* () {
50427
50513
  const e = this.loader, c = this.mList, st = (() => {
50428
50514
  const Zt = e.getAsset("/image/map/hp2.webp");
50429
50515
  Zt.center.set(0.5, 0.5), Zt.repeat.set(0.97, 1.01);
@@ -50473,7 +50559,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50473
50559
  return;
50474
50560
  }
50475
50561
  ct.initMaterial = function() {
50476
- return si(this, null, function* () {
50562
+ return ni(this, null, function* () {
50477
50563
  const e = this.mList, c = (() => {
50478
50564
  const st = new MeshBasicMaterial({
50479
50565
  name: "顶面",
@@ -50514,7 +50600,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50514
50600
  "测试边框颜色.color:::caId": "ffffff",
50515
50601
  "测试边框宽度:::caId": 0
50516
50602
  }, ct.initSettingsObj), ct.options.lineOffset = 5e-3, ct.loaderAdd = function() {
50517
- return si(this, null, function* () {
50603
+ return ni(this, null, function* () {
50518
50604
  this.loader.add([
50519
50605
  "/image/map/jianbian.webp",
50520
50606
  "/image/map/hp.webp",
@@ -50522,7 +50608,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50522
50608
  ]), this.loaderAddBg();
50523
50609
  });
50524
50610
  }, ct.initMaterial = function() {
50525
- return si(this, null, function* () {
50611
+ return ni(this, null, function* () {
50526
50612
  const e = this.loader, c = (() => {
50527
50613
  const st = new MeshStandardMaterial({
50528
50614
  name: "顶面",
@@ -50561,11 +50647,11 @@ const objs$4 = Ei(bi({}, objs$5), {
50561
50647
  };
50562
50648
  }, base$1 = (ct) => {
50563
50649
  ct.loaderAdd = function() {
50564
- return si(this, null, function* () {
50650
+ return ni(this, null, function* () {
50565
50651
  this.loader.add(["/image/map/jianbian.webp"]), this.loaderAddBg();
50566
50652
  });
50567
50653
  }, ct.initMaterial = function() {
50568
- return si(this, null, function* () {
50654
+ return ni(this, null, function* () {
50569
50655
  const e = this.loader, c = (() => {
50570
50656
  const st = new MeshBasicMaterial({
50571
50657
  name: "顶面",
@@ -50729,7 +50815,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50729
50815
  })), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.fahey && (this.options.projectionType = "fahey", this.pscale = 100, this.pcenter = [0, 0]), this.pencilConfig = PENCIL_CONFIG$4, (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.parentBg = () => this.options.parentBg, this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth, this.extendsOptions.parentBgTopSegments = () => this.options.parentBgTopSegments, this.extendsOptions.continentsBg = () => this.options.continentsBg, this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth), this.options.adcode === 0 ? world(this) : this.options.style === "map2" || (this.options.adcode === 1e5 ? china(this) : base$1(this));
50730
50816
  }
50731
50817
  handleSetting(c, st) {
50732
- return si(this, null, function* () {
50818
+ return ni(this, null, function* () {
50733
50819
  if (yield cn(mn.prototype, this, "handleSetting").call(this, c, st), c === "label")
50734
50820
  st === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels());
50735
50821
  else if (c === "labelLite")
@@ -50759,7 +50845,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50759
50845
  });
50760
50846
  }
50761
50847
  init() {
50762
- return si(this, null, function* () {
50848
+ return ni(this, null, function* () {
50763
50849
  const { adcode: c } = this.options;
50764
50850
  this.options.center && (this.pcenter = this.options.center), this.projection = F({
50765
50851
  center: this.pcenter,
@@ -50770,7 +50856,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50770
50856
  });
50771
50857
  }
50772
50858
  initVis(c) {
50773
- return si(this, null, function* () {
50859
+ return ni(this, null, function* () {
50774
50860
  var Yt;
50775
50861
  if (this.options.parentBg) {
50776
50862
  const vt = adcodeMap[c].parent || 0, Tt = this.options.geojsonMap[vt], Jt = this.options.bboxMap[vt], $t = this.mList.getMaterialObj("parentPlane"), de = yield this.drawController.draw("PlaneMap", {
@@ -50833,7 +50919,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50833
50919
  (this.options.parentBg || this.options.continentsBg) && c.add(["/image/map/dian.webp"]);
50834
50920
  }
50835
50921
  initMaterialBg() {
50836
- return si(this, null, function* () {
50922
+ return ni(this, null, function* () {
50837
50923
  const c = this.loader;
50838
50924
  if (this.options.parentBg) {
50839
50925
  const st = (() => {
@@ -50997,7 +51083,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50997
51083
  Wt && this.map.setLineWidth(Wt, Zt);
50998
51084
  }
50999
51085
  addAreaPlaneByProperty(Wt, Yt) {
51000
- return si(this, arguments, function* (c, st, Zt = {}) {
51086
+ return ni(this, arguments, function* (c, st, Zt = {}) {
51001
51087
  var Jt, $t, de;
51002
51088
  if (!this.map) return;
51003
51089
  const Tt = this.map.options.geojson.features.find(
@@ -51019,7 +51105,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51019
51105
  });
51020
51106
  }
51021
51107
  show() {
51022
- return si(this, null, function* () {
51108
+ return ni(this, null, function* () {
51023
51109
  if (this.showState || this.options.disableInitShow) return;
51024
51110
  cn(mn.prototype, this, "show").call(this);
51025
51111
  const c = this.drawController.group;
@@ -51036,10 +51122,10 @@ const objs$4 = Ei(bi({}, objs$5), {
51036
51122
  });
51037
51123
  }
51038
51124
  handlePickTest() {
51039
- return si(this, null, function* () {
51125
+ return ni(this, null, function* () {
51040
51126
  var c;
51041
51127
  this.playing || (c = this.mapArea) == null || c.forEach((st) => {
51042
- st.onPointerEvent("down", (Zt) => si(this, null, function* () {
51128
+ st.onPointerEvent("down", (Zt) => ni(this, null, function* () {
51043
51129
  this.caId = Zt.userData.ISO_A2 || Zt.userData.adcode;
51044
51130
  const Wt = this.mapLine.find(
51045
51131
  (Tt) => Tt.userData.ISO_A2 === this.caId || Tt.userData.adcode === this.caId
@@ -51050,7 +51136,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51050
51136
  });
51051
51137
  }
51052
51138
  hide() {
51053
- return si(this, null, function* () {
51139
+ return ni(this, null, function* () {
51054
51140
  if (!this.showState) return;
51055
51141
  const c = this.drawController.group;
51056
51142
  yield new Promise((st) => {
@@ -51068,7 +51154,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51068
51154
  });
51069
51155
  }
51070
51156
  shadowMapEnabled() {
51071
- return si(this, null, function* () {
51157
+ return ni(this, null, function* () {
51072
51158
  if (this.pencil.scene.userData.shadowMapEnabled) return;
51073
51159
  this.pencil.scene.userData.shadowMapEnabled = !0;
51074
51160
  const c = yield this.drawController.draw("Light", {
@@ -51133,7 +51219,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51133
51219
  return !0;
51134
51220
  }
51135
51221
  clickArea(Zt) {
51136
- return si(this, arguments, function* ({
51222
+ return ni(this, arguments, function* ({
51137
51223
  adcodes: c,
51138
51224
  duration: st = 1e3
51139
51225
  }) {
@@ -51144,13 +51230,13 @@ const objs$4 = Ei(bi({}, objs$5), {
51144
51230
  });
51145
51231
  }
51146
51232
  drawLabels() {
51147
- return si(this, null, function* () {
51233
+ return ni(this, null, function* () {
51148
51234
  var Zt;
51149
51235
  const c = this.options.showLabel;
51150
51236
  !((Zt = this.mapArea) != null && Zt.length) || !c || this.drawController.getAllObject("Node", {
51151
51237
  key: "mapLabel"
51152
51238
  }).length || (yield Promise.all(
51153
- this.mapArea.map((Wt) => si(this, null, function* () {
51239
+ this.mapArea.map((Wt) => ni(this, null, function* () {
51154
51240
  let { name: Yt, adcode: vt } = Wt.userData;
51155
51241
  const { DistrictID: Tt, DistName: Jt, NAME_CN: $t, CENTROID: de } = Wt.userData;
51156
51242
  vt = vt || Tt, Yt = this.options.adcode === 0 ? $t : Yt || Jt;
@@ -51202,7 +51288,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51202
51288
  return json100000.features[0].geometry.coordinates.some((st) => booleanPointInPolygon$1(point(c), polygon(st)));
51203
51289
  }
51204
51290
  handleDrillDown(Zt) {
51205
- return si(this, arguments, function* ({
51291
+ return ni(this, arguments, function* ({
51206
51292
  adcode: c,
51207
51293
  duration: st
51208
51294
  }) {
@@ -51289,7 +51375,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51289
51375
  return MathUtils.euclideanModulo(Wt + Math.PI, Zt) - Math.PI;
51290
51376
  }
51291
51377
  fitTo(Yt) {
51292
- return si(this, arguments, function* (c, {
51378
+ return ni(this, arguments, function* (c, {
51293
51379
  polarAngle: st,
51294
51380
  azimuthAngle: Zt,
51295
51381
  enableTransition: Wt = !0
@@ -51356,7 +51442,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51356
51442
  });
51357
51443
  }
51358
51444
  drawPlaneMap(vt) {
51359
- return si(this, arguments, function* ({
51445
+ return ni(this, arguments, function* ({
51360
51446
  geojson: c,
51361
51447
  extrudeLineGeojson: st,
51362
51448
  bbox: Zt,
@@ -51396,7 +51482,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51396
51482
  });
51397
51483
  }
51398
51484
  handleBack(c) {
51399
- return si(this, null, function* () {
51485
+ return ni(this, null, function* () {
51400
51486
  if (this.mapHistory.length > 1 && !this.isAnimating) {
51401
51487
  this.isAnimating = !0;
51402
51488
  const st = this.mapHistory.pop();
@@ -51418,7 +51504,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51418
51504
  });
51419
51505
  }
51420
51506
  handleLookBack(c) {
51421
- return si(this, null, function* () {
51507
+ return ni(this, null, function* () {
51422
51508
  var Yt;
51423
51509
  const { map: st, cameraPositon: Zt, cameraTarget: Wt } = this.mapObj;
51424
51510
  Zt && Wt ? yield (Yt = this.pencil.controls) == null ? void 0 : Yt.setLookAt(
@@ -51435,7 +51521,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51435
51521
  });
51436
51522
  }
51437
51523
  setAdcode(Zt) {
51438
- return si(this, arguments, function* ({ adcodes: c, duration: st }) {
51524
+ return ni(this, arguments, function* ({ adcodes: c, duration: st }) {
51439
51525
  const { adcodes: Wt } = this;
51440
51526
  if (!(JSON.stringify(c) === JSON.stringify(Wt) || this.isAnimating))
51441
51527
  if (JSON.stringify(c) === JSON.stringify([0]))
@@ -51993,7 +52079,7 @@ class Plane extends D$1 {
51993
52079
  }, c);
51994
52080
  }
51995
52081
  create() {
51996
- return si(this, null, function* () {
52082
+ return ni(this, null, function* () {
51997
52083
  const { width: c, height: st, color: Zt, map: Wt, material: Yt } = this.options, vt = new PlaneGeometry(c, st, 2, 2);
51998
52084
  this.plane = vt;
51999
52085
  const Tt = Yt || new MeshBasicMaterial({
@@ -52071,7 +52157,7 @@ class Building extends D$1 {
52071
52157
  this.options = bi({}, c);
52072
52158
  }
52073
52159
  create() {
52074
- return si(this, null, function* () {
52160
+ return ni(this, null, function* () {
52075
52161
  const { json: c, projection: st, cacheKey: Zt, meters: Wt, grey: Yt, clip: vt } = this.options, Tt = this.pencil.installPlugins.get("materialList"), Jt = this.pencil.getPlugin("worker"), $t = this.pencil.getPlugin("draw"), de = Yt ? "-grey" : "";
52076
52162
  this.createGroup();
52077
52163
  const Xe = Tt.getMaterialObj("building" + de);
@@ -52127,7 +52213,7 @@ class Building extends D$1 {
52127
52213
  );
52128
52214
  }
52129
52215
  yield Promise.all(
52130
- Ke.map((Qe) => si(this, null, function* () {
52216
+ Ke.map((Qe) => ni(this, null, function* () {
52131
52217
  const { h: qe, z: $e } = Qe.userData, Je = qe + $e, _e = Je <= 20 ? "20" : Je <= 60 ? "60" : "max";
52132
52218
  let t0 = this.options.material;
52133
52219
  t0 || (t0 = [Xe[_e + "Top"], Xe[_e + "Side"]]);
@@ -52210,7 +52296,7 @@ class Area extends D$1 {
52210
52296
  this.options = bi({}, c);
52211
52297
  }
52212
52298
  create() {
52213
- return si(this, null, function* () {
52299
+ return ni(this, null, function* () {
52214
52300
  this.createGroup();
52215
52301
  const { json: c, projection: st, type: Zt, cacheKey: Wt, material: Yt, oArr: vt, clip: Tt } = this.options, Jt = this.pencil.getPlugin("worker"), $t = this.pencil.getPlugin("draw");
52216
52302
  let de = Wt ? yield Jt.getCachedGeometry({
@@ -52270,7 +52356,7 @@ class Area extends D$1 {
52270
52356
  );
52271
52357
  }
52272
52358
  yield Promise.all(
52273
- de.map((Xe) => si(this, null, function* () {
52359
+ de.map((Xe) => ni(this, null, function* () {
52274
52360
  const { z: Ke } = Xe.userData, Qe = yield $t.draw(
52275
52361
  "ExtrudePolygon",
52276
52362
  {
@@ -52299,7 +52385,7 @@ class Road extends D$1 {
52299
52385
  this.options = bi({}, c);
52300
52386
  }
52301
52387
  create() {
52302
- return si(this, null, function* () {
52388
+ return ni(this, null, function* () {
52303
52389
  const { clip: c, grey: st } = this.options;
52304
52390
  this.createGroup();
52305
52391
  const Zt = this.pencil.getPlugin("worker"), Wt = this.pencil.getPlugin("draw");
@@ -52353,7 +52439,7 @@ class Road extends D$1 {
52353
52439
  );
52354
52440
  }
52355
52441
  yield Promise.all(
52356
- Xe.map((Ke) => si(this, null, function* () {
52442
+ Xe.map((Ke) => ni(this, null, function* () {
52357
52443
  const Qe = yield Wt.draw(
52358
52444
  "Line",
52359
52445
  {
@@ -52375,11 +52461,11 @@ class Road extends D$1 {
52375
52461
  };
52376
52462
  this.object3d.userData = new Proxy(c, {
52377
52463
  set: (st, Zt, Wt) => (Zt === "bloom" ? this.pencil.composerController.toggleBloomSelection(this, Wt) : Zt === "animationDuration" && this.linePrimary.forEach((Yt) => {
52378
- Yt.material.userData.tween && (Yt.material.userData.tween.stop(), remove(Yt.material.userData.tween), Yt.material.userData.tween = null), Yt.material.uniforms.offset.value.x = 1, Yt.material.uniforms.offsetLoop.value = 0, Yt.animate({
52464
+ Yt.material.userData.tween && (Yt.material.userData.tween.stop(), remove(Yt.material.userData.tween), Yt.material.userData.tween = null), Wt && (Yt.material.uniforms.offset.value.x = 1, Yt.material.uniforms.offsetLoop.value = 0, Yt.animate({
52379
52465
  duration: Wt,
52380
52466
  repeat: 1 / 0,
52381
52467
  lineLoop: !0
52382
- });
52468
+ }));
52383
52469
  }), Reflect.set(st, Zt, Wt))
52384
52470
  });
52385
52471
  }
@@ -52495,7 +52581,7 @@ class Target extends D$1 {
52495
52581
  return Wt.translateZ(1), Wt;
52496
52582
  }
52497
52583
  create() {
52498
- return si(this, null, function* () {
52584
+ return ni(this, null, function* () {
52499
52585
  const { scale: c = 0.03 } = this.options;
52500
52586
  this.createGroup();
52501
52587
  const st = this.pencil.getPlugin("loader"), Zt = "241, 241, 86", Wt = st.getAsset("/image/city/cylinder.webp"), Yt = getCanvasTexture(Zt), vt = this.createRipple(Yt);
@@ -52522,11 +52608,11 @@ const objs$3 = Ei(bi({}, objs$5), {
52522
52608
  Target
52523
52609
  }), base = (ct) => {
52524
52610
  ct.loaderAdd = function() {
52525
- return si(this, null, function* () {
52611
+ return ni(this, null, function* () {
52526
52612
  this.loaderAddBg();
52527
52613
  });
52528
52614
  }, ct.initMaterial = function() {
52529
- return si(this, null, function* () {
52615
+ return ni(this, null, function* () {
52530
52616
  const e = (() => {
52531
52617
  const c = new MeshBasicMaterial({
52532
52618
  name: "板块顶面",
@@ -52592,13 +52678,14 @@ const objs$3 = Ei(bi({}, objs$5), {
52592
52678
  showRiver: ct.options.showRiver,
52593
52679
  buildingSideGradient: ct.options.buildingSideGradient,
52594
52680
  setWaterMaterial: ct.options.setWaterMaterial,
52595
- showCityOnMapInnerLine: ct.options.showCityOnMapInnerLine
52681
+ showCityOnMapInnerLine: ct.options.showCityOnMapInnerLine,
52682
+ greyFull: ct.options.greyFull
52596
52683
  // ...this.extendsOptions,
52597
52684
  // initCity: this.options.initCity,
52598
52685
  }, ct.loaderAdd = function() {
52599
52686
  this.loader.add(["/image/map2/side.png"]);
52600
52687
  }, ct.initMaterial = function() {
52601
- return si(this, null, function* () {
52688
+ return ni(this, null, function* () {
52602
52689
  const c = this.loader, st = (() => {
52603
52690
  const Zt = new MeshBasicMaterial({
52604
52691
  name: "板块顶面",
@@ -52633,7 +52720,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52633
52720
  };
52634
52721
  const e = ct.drawPlaneMap.bind(ct);
52635
52722
  ct.drawPlaneMap = function(c) {
52636
- return si(this, null, function* () {
52723
+ return ni(this, null, function* () {
52637
52724
  const st = yield e(c);
52638
52725
  return st.lineArr.forEach((Zt) => {
52639
52726
  Zt.object3d.userData = new Proxy(
@@ -52642,12 +52729,12 @@ const objs$3 = Ei(bi({}, objs$5), {
52642
52729
  animationDuration: 0
52643
52730
  },
52644
52731
  {
52645
- set: (Wt, Yt, vt) => (Yt === "bloom" ? ct.pencil.composerController.toggleBloomSelection(Zt, vt) : Yt === "animationDuration" && (Zt.material.userData.tween && (Zt.material.userData.tween.stop(), remove(Zt.material.userData.tween), Zt.material.userData.tween = null), Zt.material.uniforms.offset.value.x = 1, Zt.material.uniforms.offsetLoop.value = 1, Zt.animate({
52732
+ set: (Wt, Yt, vt) => (Yt === "bloom" ? ct.pencil.composerController.toggleBloomSelection(Zt, vt) : Yt === "animationDuration" && (Zt.material.userData.tween && (Zt.material.userData.tween.stop(), remove(Zt.material.userData.tween), Zt.material.userData.tween = null), vt && (Zt.material.uniforms.offset.value.x = 1, Zt.material.uniforms.offsetLoop.value = 1, Zt.animate({
52646
52733
  duration: vt,
52647
52734
  repeat: 1 / 0,
52648
52735
  lineLoop: !0,
52649
52736
  startShow: !0
52650
- })), Reflect.set(Wt, Yt, vt))
52737
+ }))), Reflect.set(Wt, Yt, vt))
52651
52738
  }
52652
52739
  ), Zt.object3d.name = "板块边框", ct.mList.setObject3d(Zt.object3d, "plane#lineMat");
52653
52740
  }), st;
@@ -52678,7 +52765,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52678
52765
  }
52679
52766
  );
52680
52767
  }, ct.initMaterial = function() {
52681
- return si(this, null, function* () {
52768
+ return ni(this, null, function* () {
52682
52769
  const e = ct.roomEnvMap, c = ct.loader, st = (() => {
52683
52770
  const Wt = new MeshStandardMaterial({
52684
52771
  name: "顶面",
@@ -52762,7 +52849,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52762
52849
  })();
52763
52850
  ct.mList.setMaterialObj("plane", Zt);
52764
52851
  });
52765
- }, ct.initVis = (e) => si(void 0, null, function* () {
52852
+ }, ct.initVis = (e) => ni(void 0, null, function* () {
52766
52853
  let c = 1e3, st = 1e3;
52767
52854
  const Zt = new Vector3(0, 0, 0);
52768
52855
  if (ct.options.parentBg) {
@@ -52822,7 +52909,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52822
52909
  }
52823
52910
  );
52824
52911
  }, ct.initMaterial = function() {
52825
- return si(this, null, function* () {
52912
+ return ni(this, null, function* () {
52826
52913
  if (!ct.mList.getMaterialObj("building")) {
52827
52914
  const e = ["20", "60", "max"].reduce(
52828
52915
  (c, st) => {
@@ -52929,7 +53016,7 @@ class Map$1 extends Map$2 {
52929
53016
  );
52930
53017
  }
52931
53018
  initMaterialBg() {
52932
- return si(this, null, function* () {
53019
+ return ni(this, null, function* () {
52933
53020
  const c = this.roomEnvMap;
52934
53021
  if (this.options.parentBg) {
52935
53022
  if (this.options.adcode !== 1e5) {
@@ -53010,7 +53097,7 @@ class Map$1 extends Map$2 {
53010
53097
  });
53011
53098
  }
53012
53099
  initVis(c) {
53013
- return si(this, null, function* () {
53100
+ return ni(this, null, function* () {
53014
53101
  var Yt;
53015
53102
  let st = 1e3, Zt = 1e3;
53016
53103
  const Wt = new Vector3(0, 0, 0);
@@ -53084,7 +53171,7 @@ class Map$1 extends Map$2 {
53084
53171
  });
53085
53172
  }
53086
53173
  drawPlaneMap(vt) {
53087
- return si(this, arguments, function* ({
53174
+ return ni(this, arguments, function* ({
53088
53175
  geojson: c,
53089
53176
  extrudeLineGeojson: st,
53090
53177
  bbox: Zt,
@@ -53298,6 +53385,8 @@ class City$1 extends Base {
53298
53385
  J0(this, "projection");
53299
53386
  J0(this, "group");
53300
53387
  J0(this, "building");
53388
+ J0(this, "road");
53389
+ J0(this, "innerAreaGroup");
53301
53390
  J0(this, "outAreaGroup");
53302
53391
  J0(this, "multiplyScalar", 1);
53303
53392
  }
@@ -53306,6 +53395,7 @@ class City$1 extends Base {
53306
53395
  fitTo: !0,
53307
53396
  plane: !0,
53308
53397
  grey: !1,
53398
+ greyFull: !1,
53309
53399
  clipOutShow: !1,
53310
53400
  planeOut: !1,
53311
53401
  showBuilding: !0,
@@ -53344,7 +53434,7 @@ class City$1 extends Base {
53344
53434
  );
53345
53435
  }
53346
53436
  initMaterial() {
53347
- return si(this, null, function* () {
53437
+ return ni(this, null, function* () {
53348
53438
  if (!this.mList.getMaterialObj("building")) {
53349
53439
  const c = ["20", "60", "max"].reduce(
53350
53440
  (Zt, Wt) => {
@@ -53453,14 +53543,18 @@ class City$1 extends Base {
53453
53543
  });
53454
53544
  }
53455
53545
  init() {
53456
- return si(this, null, function* () {
53546
+ return ni(this, null, function* () {
53457
53547
  const { jsonName: c, bbox: st, adcode: Zt } = this.options;
53458
53548
  yield this.initPencil();
53459
53549
  const Wt = this.pencil.composerController.ssaoPass;
53460
53550
  Wt && (Wt.enabled = !0), this.loaderAdd(), this.loaderAddJson(c), console.time(`vis-core:time.${this.visName}${Zt}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}${Zt}-loader`), this.verticalDragToForward = !0, this.adcode = this.options.adcode, this.options.center && (this.pcenter = this.options.center), this.projection = F({
53461
53551
  center: this.pcenter,
53462
53552
  scale: this.pscale
53463
- }), this.group = yield this.drawController.draw("Group"), this.group.scale.multiplyScalar(this.multiplyScalar), this.outAreaGroup = yield this.drawController.draw("Group", {}, this.group), yield this.initMaterial(), yield this.initVis(), yield Promise.all(this.drawController.objectsPromise);
53553
+ }), this.group = yield this.drawController.draw("Group"), this.group.scale.multiplyScalar(this.multiplyScalar), this.innerAreaGroup = yield this.drawController.draw(
53554
+ "Group",
53555
+ {},
53556
+ this.group
53557
+ ), this.outAreaGroup = yield this.drawController.draw("Group", {}, this.group), yield this.initMaterial(), yield this.initVis(), yield Promise.all(this.drawController.objectsPromise);
53464
53558
  });
53465
53559
  }
53466
53560
  getInvert(c) {
@@ -53468,7 +53562,7 @@ class City$1 extends Base {
53468
53562
  return (Zt = (st = this.projection).invert) == null ? void 0 : Zt.call(st, [c.x, -c.z]);
53469
53563
  }
53470
53564
  fitTo(c, st = !0) {
53471
- return si(this, null, function* () {
53565
+ return ni(this, null, function* () {
53472
53566
  this.pencil.controls.fitToBox(c.object3d, st), this.pencil.controls.rotatePolarTo(
53473
53567
  this.pencil.camera.up.z === 1 ? Math.PI / 180 * 70 : Math.PI / 180 * 160,
53474
53568
  st
@@ -53476,7 +53570,7 @@ class City$1 extends Base {
53476
53570
  });
53477
53571
  }
53478
53572
  initVis() {
53479
- return si(this, null, function* () {
53573
+ return ni(this, null, function* () {
53480
53574
  const { fitTo: c, jsonName: st, bbox: Zt, planeOut: Wt } = this.options, Yt = this.adcode, vt = this.loader, Tt = vt.getAsset(`/city/Building${st}.json`), Jt = vt.getAsset(`/city/Road${st}.json`), $t = vt.getAsset(`/city/River${st}.json`), de = vt.getAsset(`/city/Grassland${st}.json`), Xe = {};
53481
53575
  [
53482
53576
  ...($t == null ? void 0 : $t.features) || [],
@@ -53501,7 +53595,7 @@ class City$1 extends Base {
53501
53595
  height: $e * 10,
53502
53596
  material: _e
53503
53597
  },
53504
- Wt ? this.outAreaGroup : this.group
53598
+ Wt ? this.outAreaGroup : this.innerAreaGroup
53505
53599
  );
53506
53600
  t0.position.copy(Je), this.mList.setObject3d(t0.object3d, "city-plane"), yield Promise.all(
53507
53601
  [
@@ -53538,14 +53632,14 @@ class City$1 extends Base {
53538
53632
  {
53539
53633
  key: "cityTarget" + Yt
53540
53634
  },
53541
- this.group
53635
+ this.innerAreaGroup
53542
53636
  )
53543
53637
  ].filter(Boolean)
53544
53638
  ), c && this.fitToTarget(Yt), this.pencil.getPlugin("worker").saveCache();
53545
53639
  });
53546
53640
  }
53547
53641
  fitToTarget(c, st) {
53548
- return si(this, null, function* () {
53642
+ return ni(this, null, function* () {
53549
53643
  const Zt = this.drawController.getObject("Target", {
53550
53644
  key: "cityTarget" + c
53551
53645
  });
@@ -53579,7 +53673,7 @@ class City$1 extends Base {
53579
53673
  return MathUtils.euclideanModulo(Wt + Math.PI, Zt) - Math.PI;
53580
53674
  }
53581
53675
  lookAtTarget(c, st, Zt, Wt = 0) {
53582
- return si(this, null, function* () {
53676
+ return ni(this, null, function* () {
53583
53677
  const Yt = this.pencil.controls.azimuthAngle, vt = this.pencil.controls.polarAngle, Tt = Yt !== Wt || vt !== Zt;
53584
53678
  yield Promise.all(
53585
53679
  [
@@ -53595,7 +53689,7 @@ class City$1 extends Base {
53595
53689
  });
53596
53690
  }
53597
53691
  drawBuilding() {
53598
- return si(this, arguments, function* (c = {}) {
53692
+ return ni(this, arguments, function* (c = {}) {
53599
53693
  var Wt;
53600
53694
  if (!c.json) {
53601
53695
  console.warn(" json:Building");
@@ -53615,10 +53709,10 @@ class City$1 extends Base {
53615
53709
  grey: c.grey,
53616
53710
  clip: c.clip
53617
53711
  },
53618
- (Wt = c.group) != null ? Wt : this.group
53712
+ (Wt = c.group) != null ? Wt : this.innerAreaGroup
53619
53713
  );
53620
53714
  return this.options.clipOutShow && Zt.outJson.size && (yield this.drawBuilding({
53621
- json: {
53715
+ json: this.options.greyFull ? c.json : {
53622
53716
  features: Array.from(Zt.outJson.keys()).filter(
53623
53717
  (Yt) => Yt !== 1
53624
53718
  )
@@ -53632,7 +53726,7 @@ class City$1 extends Base {
53632
53726
  });
53633
53727
  }
53634
53728
  drawArea() {
53635
- return si(this, arguments, function* (c = {}) {
53729
+ return ni(this, arguments, function* (c = {}) {
53636
53730
  var vt;
53637
53731
  if (!c.json) {
53638
53732
  console.warn(" json:drawArea");
@@ -53653,10 +53747,10 @@ class City$1 extends Base {
53653
53747
  oArr: c.oArr,
53654
53748
  clip: c.clip
53655
53749
  },
53656
- (vt = c.group) != null ? vt : this.group
53750
+ (vt = c.group) != null ? vt : this.innerAreaGroup
53657
53751
  );
53658
53752
  return this.options.clipOutShow && Yt.outJson.size && (yield this.drawArea({
53659
- json: {
53753
+ json: this.options.greyFull ? c.json : {
53660
53754
  features: Array.from(Yt.outJson.keys()).filter(
53661
53755
  (Tt) => Tt !== 1
53662
53756
  )
@@ -53672,7 +53766,7 @@ class City$1 extends Base {
53672
53766
  });
53673
53767
  }
53674
53768
  drawRoad() {
53675
- return si(this, arguments, function* (c = {}) {
53769
+ return ni(this, arguments, function* (c = {}) {
53676
53770
  var Yt;
53677
53771
  if (!c.json) {
53678
53772
  console.warn(" json:Road");
@@ -53691,10 +53785,10 @@ class City$1 extends Base {
53691
53785
  meters: c.meters,
53692
53786
  clip: c.clip
53693
53787
  },
53694
- (Yt = c.group) != null ? Yt : this.group
53788
+ (Yt = c.group) != null ? Yt : this.innerAreaGroup
53695
53789
  ), Wt = c.z || 0;
53696
53790
  return Zt.position.z = (Wt + 1) * 1e-3, this.options.clipOutShow && Zt.outJson.size && (yield this.drawRoad({
53697
- json: {
53791
+ json: this.options.greyFull ? c.json : {
53698
53792
  features: Array.from(Zt.outJson.keys()).filter(
53699
53793
  (vt) => vt !== 1
53700
53794
  )
@@ -53704,7 +53798,7 @@ class City$1 extends Base {
53704
53798
  clip: void 0,
53705
53799
  grey: !0,
53706
53800
  group: this.outAreaGroup
53707
- })), Zt;
53801
+ })), c.grey || (this.road = Zt), Zt;
53708
53802
  });
53709
53803
  }
53710
53804
  getWorldPosition(c, st) {
@@ -53765,13 +53859,14 @@ const xn = class xn extends Map$1 {
53765
53859
  showGrassland: !0,
53766
53860
  showRiver: !0,
53767
53861
  setWaterMaterial: !1,
53768
- showCityOnMapInnerLine: !1
53862
+ showCityOnMapInnerLine: !1,
53863
+ greyFull: !1
53769
53864
  }, c)), this.pencilConfig = PENCIL_CONFIG$3;
53770
53865
  }
53771
53866
  init() {
53772
- return si(this, null, function* () {
53867
+ return ni(this, null, function* () {
53773
53868
  var c;
53774
- if (yield cn(xn.prototype, this, "init").call(this), this.showGroup = "map", this.options.adcode == 1e5 && (this.pencil.camera.far = 500, this.pencil.camera.updateProjectionMatrix()), this.on("handleDrillDown", (Zt) => si(this, [Zt], function* ({ adcode: st }) {
53869
+ if (yield cn(xn.prototype, this, "init").call(this), this.showGroup = "map", this.options.adcode == 1e5 && (this.pencil.camera.far = 500, this.pencil.camera.updateProjectionMatrix()), this.on("handleDrillDown", (Zt) => ni(this, [Zt], function* ({ adcode: st }) {
53775
53870
  const Wt = this.getAdcodeShowLevel(st) === "city";
53776
53871
  this.options.initCity && Wt && this.initCityVis(st, {
53777
53872
  clip: !!this.options.cityOnMap,
@@ -53783,7 +53878,7 @@ const xn = class xn extends Map$1 {
53783
53878
  if (this.options.allCity) {
53784
53879
  const st = adcodeMap[this.mapInfo.adcode], Zt = st.level === "province" ? st.adcode : adcodeMap[this.mapInfo.adcode].parent, Wt = (c = allArr.find((Yt) => Yt.adcode === Zt)) == null ? void 0 : c.subAreas;
53785
53880
  Wt && (yield Promise.all(
53786
- Wt.map((Yt) => si(this, null, function* () {
53881
+ Wt.map((Yt) => ni(this, null, function* () {
53787
53882
  yield this.initCityOnMap(Yt);
53788
53883
  }))
53789
53884
  ));
@@ -53792,7 +53887,7 @@ const xn = class xn extends Map$1 {
53792
53887
  });
53793
53888
  }
53794
53889
  preInitCityVis() {
53795
- return si(this, null, function* () {
53890
+ return ni(this, null, function* () {
53796
53891
  const c = Object.keys(this.options.jsonNameObj);
53797
53892
  for (let st = 0; st < c.length; st++)
53798
53893
  yield this.initCityVis(Number(c[st]));
@@ -53800,7 +53895,7 @@ const xn = class xn extends Map$1 {
53800
53895
  });
53801
53896
  }
53802
53897
  initCityVis(Zt) {
53803
- return si(this, arguments, function* (c, st = { clip: !1, grey: !1 }) {
53898
+ return ni(this, arguments, function* (c, st = { clip: !1, grey: !1 }) {
53804
53899
  var $t;
53805
53900
  ($t = this.options.fixCity) != null && $t[c] && (c = this.options.fixCity[c]);
53806
53901
  const Wt = this.options.center, Yt = this.options.cityBboxMap[c];
@@ -53812,6 +53907,10 @@ const xn = class xn extends Map$1 {
53812
53907
  state: makePromiseCreator(!0)
53813
53908
  };
53814
53909
  const vt = this.options.jsonNameObj[c], Tt = new City({
53910
+ container: this.container,
53911
+ editor: !1
53912
+ });
53913
+ Tt.setOptions({
53815
53914
  container: this.container,
53816
53915
  center: Wt,
53817
53916
  bbox: Yt,
@@ -53820,6 +53919,7 @@ const xn = class xn extends Map$1 {
53820
53919
  cacheKey: this.options.adcode + "-" + c,
53821
53920
  jsonName: vt,
53822
53921
  grey: st.grey,
53922
+ greyFull: this.options.greyFull,
53823
53923
  clip: st.clip ? this.map.options.geojson : void 0,
53824
53924
  clipOutShow: this.options.clipOutShow,
53825
53925
  planeOut: this.options.cityOnMap,
@@ -53828,10 +53928,8 @@ const xn = class xn extends Map$1 {
53828
53928
  showRoad: this.options.showRoad,
53829
53929
  showGrassland: this.options.showGrassland,
53830
53930
  showRiver: this.options.showRiver,
53831
- setWaterMaterial: this.options.setWaterMaterial,
53832
- showInfoLog: !1
53833
- });
53834
- adcodeMap[c].parent === 35e4 && this.options.curvatureResolution && city350000(Tt), Tt.pencil = this.pencil, Tt.roomEnvMap = this.roomEnvMap, Tt.mList = this.mList, Tt.loader = this.loader, Tt.drawController = this.drawController, yield Tt.init(), Tt.group.hide(), this.cityVisObj[c].city = Tt, this.cityVisObj[c].state.resolve(), this.emit("initCityVis", c);
53931
+ setWaterMaterial: this.options.setWaterMaterial
53932
+ }), adcodeMap[c].parent === 35e4 && this.options.curvatureResolution && city350000(Tt), Tt.pencilConfig = this.pencilConfig, Tt.pencil = this.pencil, Tt.roomEnvMap = this.roomEnvMap, Tt.mList = this.mList, Tt.loader = this.loader, Tt.editor = this.editor, Tt.drawController = this.drawController, yield Tt.init(), Tt.group.hide(), this.cityVisObj[c].city = Tt, this.cityVisObj[c].state.resolve(), this.emit("initCityVis", c);
53835
53933
  });
53836
53934
  }
53837
53935
  consoleMousePostion() {
@@ -53842,7 +53940,7 @@ const xn = class xn extends Map$1 {
53842
53940
  });
53843
53941
  }
53844
53942
  initCityOnMap(c) {
53845
- return si(this, null, function* () {
53943
+ return ni(this, null, function* () {
53846
53944
  if (this.getAdcodeShowLevel(c) !== "city") {
53847
53945
  const Wt = adcodeMap[c].parent;
53848
53946
  this.getAdcodeShowLevel(Wt) === "city" && (yield this.initCityOnMap(Wt));
@@ -53863,7 +53961,7 @@ const xn = class xn extends Map$1 {
53863
53961
  });
53864
53962
  }
53865
53963
  showCity(c, st) {
53866
- return si(this, null, function* () {
53964
+ return ni(this, null, function* () {
53867
53965
  var $t;
53868
53966
  let Zt, Wt, Yt = this.mapInfo.adcode, vt = 0.03637926645733737, Tt = 0.9963693538268685, Jt = 0;
53869
53967
  if (typeof c == "number" ? (Yt = c, Zt = st, console.warn(
@@ -53900,7 +53998,7 @@ const xn = class xn extends Map$1 {
53900
53998
  });
53901
53999
  }
53902
54000
  showMap(c) {
53903
- return si(this, null, function* () {
54001
+ return ni(this, null, function* () {
53904
54002
  if (this.isAnimating)
53905
54003
  return;
53906
54004
  c || (c = this.adcodes), this.showGroup === "city" && !this.options.cityOnMap && (this.fixNear(this.mapInfo.adcode), this.cityVis.group.hide(), this.group.show(), this.verticalDragToForward = !1), this.showGroup = "map", JSON.stringify(c) === JSON.stringify(this.adcodes) ? (this.emit("beforeDrillDown", [...this.adcodes]), this.options.cityOnMap ? yield this.handleLookBack() : yield this.fitTo(this.map), this.emit("afterDrillDown", [...this.adcodes])) : yield this.clickArea({
@@ -53948,7 +54046,7 @@ class Countries extends D$1 {
53948
54046
  }, c);
53949
54047
  }
53950
54048
  create() {
53951
- return si(this, null, function* () {
54049
+ return ni(this, null, function* () {
53952
54050
  const {
53953
54051
  geojson: c,
53954
54052
  mats: st,
@@ -53982,7 +54080,7 @@ class Countries extends D$1 {
53982
54080
  bbox: this.options.bbox,
53983
54081
  hasSide: Zt
53984
54082
  },
53985
- cb: ($e) => si(this, null, function* () {
54083
+ cb: ($e) => ni(this, null, function* () {
53986
54084
  const Je = yield Tt.draw(
53987
54085
  "ConicPolygon",
53988
54086
  {
@@ -54001,7 +54099,7 @@ class Countries extends D$1 {
54001
54099
  lineWidth: [1],
54002
54100
  coordinatesArr: qe.coords
54003
54101
  },
54004
- cb: ($e) => si(this, null, function* () {
54102
+ cb: ($e) => ni(this, null, function* () {
54005
54103
  const Je = yield Tt.draw(
54006
54104
  "Line",
54007
54105
  {
@@ -54060,7 +54158,7 @@ class SphereShadow extends D$1 {
54060
54158
  }, c);
54061
54159
  }
54062
54160
  create() {
54063
- return si(this, null, function* () {
54161
+ return ni(this, null, function* () {
54064
54162
  const c = this.pencil.installPlugins.get("materialList"), st = new SphereGeometry(this.options.radius, 128, 90), Zt = new MeshBasicMaterial();
54065
54163
  this.createMesh(st, Zt), this.scale.multiplyScalar(1.001), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "阴影面", c.setObject3d(this.object3d, "SphereShadow", {
54066
54164
  baseObject: this
@@ -54090,7 +54188,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54090
54188
  colorCorrection: !1
54091
54189
  });
54092
54190
  }, ct.initVis = function() {
54093
- return si(this, null, function* () {
54191
+ return ni(this, null, function* () {
54094
54192
  yield this.initLight();
54095
54193
  const [, e, , c] = yield Promise.all([
54096
54194
  this.drawController.draw("Earth", {
@@ -54162,7 +54260,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54162
54260
  ), yield this.pencil.controls.dollyTo(99.11560932366835, !1);
54163
54261
  });
54164
54262
  }, ct.initMaterial = function() {
54165
- return si(this, null, function* () {
54263
+ return ni(this, null, function* () {
54166
54264
  const e = this.loader, c = new MeshStandardMaterial({
54167
54265
  side: DoubleSide,
54168
54266
  name: "顶面",
@@ -54215,7 +54313,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54215
54313
  };
54216
54314
  }, countryPlate = (ct) => {
54217
54315
  ct.initVis = function() {
54218
- return si(this, null, function* () {
54316
+ return ni(this, null, function* () {
54219
54317
  yield this.initLight();
54220
54318
  const [, e] = yield Promise.all([
54221
54319
  this.drawController.draw("Earth", {
@@ -54236,7 +54334,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54236
54334
  this.map = e, yield this.pencil.controls.rotateTo(1.8041576242193995, 1.2232045720480524, !1), yield this.pencil.controls.dollyTo(99.11560932366835, !1), this.playing && (this.pencil.controls.minPolarAngle = this.pencil.controls.polarAngle, this.pencil.controls.maxPolarAngle = this.pencil.controls.polarAngle);
54237
54335
  });
54238
54336
  }, ct.initMaterial = function() {
54239
- return si(this, null, function* () {
54337
+ return ni(this, null, function* () {
54240
54338
  const e = new MeshStandardMaterial({
54241
54339
  side: DoubleSide,
54242
54340
  name: "侧面",
@@ -54299,7 +54397,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54299
54397
  }, styles[this.options.style](this);
54300
54398
  }
54301
54399
  handleSetting(c, st) {
54302
- return si(this, null, function* () {
54400
+ return ni(this, null, function* () {
54303
54401
  return yield cn(Rn.prototype, this, "handleSetting").call(this, c, st), c === "测试板块颜色.color" ? this.setAreaEmissiveByProperty("ISO_A2", "CN", st) : c === "测试边框颜色.color" ? this.setLineColorByProperty("ISO_A2", "CN", st) : c === "测试立柱" ? (typeof st == "boolean" && (st = ""), st ? this.addBar(st) : this.removeBar()) : c === "autoRotate" && this.playing && (st ? this.autoRotateSpeed = -20 : this.autoRotateSpeed = 0, this.pencil.autoRotate(this.autoRotateSpeed)), st;
54304
54402
  });
54305
54403
  }
@@ -54315,7 +54413,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54315
54413
  });
54316
54414
  }
54317
54415
  initLight() {
54318
- return si(this, null, function* () {
54416
+ return ni(this, null, function* () {
54319
54417
  const [c, st] = yield Promise.all([
54320
54418
  this.drawController.draw("Light", {
54321
54419
  type: "RectAreaLight",
@@ -54425,7 +54523,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54425
54523
  Wt && this.map.setLineColor(Wt, Zt);
54426
54524
  }
54427
54525
  addAreaPlaneByProperty(c, st, Zt) {
54428
- return si(this, null, function* () {
54526
+ return ni(this, null, function* () {
54429
54527
  if (!this.map) return;
54430
54528
  const Yt = this.map.options.geojson.features.find(
54431
54529
  (vt) => vt.properties && vt.properties[c] === st
@@ -54481,7 +54579,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54481
54579
  "马来西亚",
54482
54580
  "俄罗斯"
54483
54581
  ];
54484
- this.mapArea.filter((Wt) => Zt.includes(Wt.userData.NAME_CN)).forEach((Wt) => si(this, null, function* () {
54582
+ this.mapArea.filter((Wt) => Zt.includes(Wt.userData.NAME_CN)).forEach((Wt) => ni(this, null, function* () {
54485
54583
  const [Yt, vt] = Wt.userData.CENTROID, Tt = this.getLocationPosition([Yt, vt], 0.1), Jt = yield st.instantiate();
54486
54584
  Jt.position.set(...Tt), Jt.object3d.lookAt(0, 0, 0), this.barArr.push(Jt);
54487
54585
  }));
@@ -54540,7 +54638,7 @@ const objs = Ei(bi({}, objs$5), {
54540
54638
  ]);
54541
54639
  }
54542
54640
  initVis() {
54543
- return si(this, null, function* () {
54641
+ return ni(this, null, function* () {
54544
54642
  yield Promise.all([
54545
54643
  this.drawController.draw("Light", {
54546
54644
  type: "PointLight",
@@ -54557,12 +54655,12 @@ const objs = Ei(bi({}, objs$5), {
54557
54655
  super.show(), this.animationIn();
54558
54656
  }
54559
54657
  handleSetting(c, st) {
54560
- return si(this, null, function* () {
54658
+ return ni(this, null, function* () {
54561
54659
  return yield cn(Sn.prototype, this, "handleSetting").call(this, c, st), c === "autoRotate" && this.playing && (st ? this.autoRotateSpeed = -20 : this.autoRotateSpeed = 0, this.pencil.autoRotate(this.autoRotateSpeed)), st;
54562
54660
  });
54563
54661
  }
54564
54662
  animationIn() {
54565
- return si(this, null, function* () {
54663
+ return ni(this, null, function* () {
54566
54664
  const c = this.pencil.controls;
54567
54665
  c.setPosition(0, 0, 1800, !1), yield c.rotatePolarTo(1.046, !1);
54568
54666
  const st = this.drawController.getObject("Light"), Zt = new Vector3();
@@ -54602,7 +54700,7 @@ function stringToUtf8ByteArray(ct) {
54602
54700
  }
54603
54701
  let b = "/";
54604
54702
  b === "/" && (b = "");
54605
- const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b, c) {
54703
+ const getMapConfig = (st, ...Zt) => ni(void 0, [st, ...Zt], function* (ct, e = b, c) {
54606
54704
  if (ct === 0)
54607
54705
  return {
54608
54706
  mapDepth: 5,
@@ -54623,7 +54721,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54623
54721
  c
54624
54722
  );
54625
54723
  }
54626
- }), getMap2Config = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b, c) {
54724
+ }), getMap2Config = (st, ...Zt) => ni(void 0, [st, ...Zt], function* (ct, e = b, c) {
54627
54725
  const Wt = adcodeMap[ct];
54628
54726
  return extendMapConfig(
54629
54727
  "map2",
@@ -54635,7 +54733,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54635
54733
  e,
54636
54734
  c
54637
54735
  );
54638
- }), getMap2WithCityConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b, c) {
54736
+ }), getMap2WithCityConfig = (st, ...Zt) => ni(void 0, [st, ...Zt], function* (ct, e = b, c) {
54639
54737
  const Wt = adcodeMap[ct];
54640
54738
  return extendMapConfig(
54641
54739
  "map2",
@@ -54652,7 +54750,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54652
54750
  e,
54653
54751
  c
54654
54752
  );
54655
- }), extendMapConfig = (Zt, Wt, ...Yt) => si(void 0, [Zt, Wt, ...Yt], function* (ct, e, c = b, st) {
54753
+ }), extendMapConfig = (Zt, Wt, ...Yt) => ni(void 0, [Zt, Wt, ...Yt], function* (ct, e, c = b, st) {
54656
54754
  var vt, Tt;
54657
54755
  if (e.adcode !== 0 && e.adcode !== 1e5) {
54658
54756
  const Jt = (vt = e.fixGeojson) == null ? void 0 : vt[e.adcode], $t = (Tt = e.fixGeojson) == null ? void 0 : Tt[e.adcode + "-lite"];
@@ -54706,7 +54804,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54706
54804
  return st && (qe.depthReference = st.depthReference || st.bboxMap[st.adcode]), qe;
54707
54805
  }
54708
54806
  return bi({}, e);
54709
- }), getCityConfig = (c, ...st) => si(void 0, [c, ...st], function* (ct, e = b) {
54807
+ }), getCityConfig = (c, ...st) => ni(void 0, [c, ...st], function* (ct, e = b) {
54710
54808
  const Zt = adcodeMap[ct], Wt = yield fetch(
54711
54809
  e + `/geojson/json-lite/${ct}.json`
54712
54810
  ).then((Tt) => Tt.json()), Yt = bbox(Wt), { name: vt } = adcodeMap[ct];
@@ -54731,6 +54829,7 @@ export {
54731
54829
  THREE,
54732
54830
  tween_esm as TWEEN,
54733
54831
  access,
54832
+ animation as animationUtils,
54734
54833
  extendMapConfig,
54735
54834
  getCityConfig,
54736
54835
  getMap2Config,