vis-core 0.21.27 → 0.21.29

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.29";
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,54 @@ 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
+ absoluteAngle(c, st) {
49844
+ const Zt = Math.PI * 2, Wt = c - st;
49845
+ return MathUtils.euclideanModulo(Wt + Math.PI, Zt) - Math.PI;
49846
+ }
49847
+ lookAtTarget(c, st = !1, Zt = 250) {
49848
+ return ni(this, null, function* () {
49849
+ this.pencil.controls.smoothTime = Zt / 1e3;
49850
+ const Wt = this.pencil.controls.azimuthAngle, Yt = this.pencil.controls.polarAngle, vt = this.pencil.controls.distance, Tt = this.pencil.cameraTarget.clone(), Jt = c.azimuthAngle || Wt, $t = c.polarAngle || Yt, de = c.distance || vt, Xe = c.target || Tt, Ke = Wt !== Jt || Yt !== $t, Qe = vt !== de, qe = !Xe.equals(Tt);
49851
+ yield Promise.all(
49852
+ [
49853
+ qe && this.pencil.controls.setTarget(
49854
+ Xe.x,
49855
+ Xe.y,
49856
+ Xe.z,
49857
+ st
49858
+ ),
49859
+ Qe && this.pencil.controls.dollyTo(de, st),
49860
+ Ke && this.pencil.controls.rotate(
49861
+ this.absoluteAngle(Jt, Wt),
49862
+ this.absoluteAngle($t, Yt),
49863
+ st
49864
+ )
49865
+ ].filter(Boolean)
49866
+ ), this.pencil.controls.smoothTime = 250 / 1e3;
49867
+ });
49868
+ }
49869
+ resetCamera(c = !1, st = 250) {
49870
+ return ni(this, null, function* () {
49871
+ this.pencil.controls.smoothTime = st / 1e3, yield this.pencil.controls.reset(c), this.pencil.controls.smoothTime = 250 / 1e3;
49872
+ });
49761
49873
  }
49762
49874
  unproject(c, st = 0) {
49763
49875
  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 +49957,7 @@ let PlaneMap$1 = class extends D$1 {
49845
49957
  }, c);
49846
49958
  }
49847
49959
  create() {
49848
- return si(this, null, function* () {
49960
+ return ni(this, null, function* () {
49849
49961
  const {
49850
49962
  geojson: c,
49851
49963
  extrudeLineGeojson: st,
@@ -49858,7 +49970,7 @@ let PlaneMap$1 = class extends D$1 {
49858
49970
  const Tt = this.pencil.getPlugin("draw");
49859
49971
  if (Wt) {
49860
49972
  const e0 = yield Promise.all(
49861
- c.features.map((i0) => si(this, null, function* () {
49973
+ c.features.map((i0) => ni(this, null, function* () {
49862
49974
  const { properties: n0 } = i0, s0 = `area-group-${this.getPropertiesKey(n0)}`, l0 = yield Tt.draw("Group", {
49863
49975
  target: this,
49864
49976
  key: s0
@@ -49947,12 +50059,12 @@ let PlaneMap$1 = class extends D$1 {
49947
50059
  return Wt.lineWidth = st, c.useMaterial(Zt), Wt;
49948
50060
  }
49949
50061
  addArea(c, st) {
49950
- return si(this, null, function* () {
50062
+ return ni(this, null, function* () {
49951
50063
  var $t;
49952
50064
  const { bbox: Zt, material: Wt, onTop: Yt } = st, vt = this.geojson2Meta(c), Tt = this.pencil.getPlugin("worker"), Jt = this.pencil.getPlugin("draw");
49953
50065
  if (st.areaGroup)
49954
50066
  return yield Promise.all(
49955
- vt.map((de) => si(this, null, function* () {
50067
+ vt.map((de) => ni(this, null, function* () {
49956
50068
  var Je;
49957
50069
  const { coords: Xe, properties: Ke } = de, Qe = this.findGroup(this.getPropertiesKey(Ke)), qe = yield Tt.geoGeometry(
49958
50070
  "extrudePolygon",
@@ -50009,7 +50121,7 @@ let PlaneMap$1 = class extends D$1 {
50009
50121
  return `${this.key}-${c.adcode || c.DistrictID || c.NAME_CN}`;
50010
50122
  }
50011
50123
  addPlane(c, st) {
50012
- return si(this, null, function* () {
50124
+ return ni(this, null, function* () {
50013
50125
  var Qe, qe, $e;
50014
50126
  const { material: Zt } = st, Wt = this.geojson2Meta({
50015
50127
  type: "FeatureCollection",
@@ -50065,12 +50177,12 @@ let PlaneMap$1 = class extends D$1 {
50065
50177
  });
50066
50178
  }
50067
50179
  addLine(c, st) {
50068
- return si(this, null, function* () {
50180
+ return ni(this, null, function* () {
50069
50181
  var Jt;
50070
50182
  const { material: Zt, onTop: Wt } = st, Yt = this.geojson2Meta(c), vt = this.pencil.getPlugin("worker"), Tt = this.pencil.getPlugin("draw");
50071
50183
  if (st.areaGroup)
50072
50184
  return yield Promise.all(
50073
- Yt.map(($t) => si(this, null, function* () {
50185
+ Yt.map(($t) => ni(this, null, function* () {
50074
50186
  var $e;
50075
50187
  const { coords: de, properties: Xe } = $t, Ke = this.findGroup(this.getPropertiesKey(Xe)), Qe = yield vt.geoGeometry("line", {
50076
50188
  mesaage: {
@@ -50253,10 +50365,10 @@ class ContinentsBg extends D$1 {
50253
50365
  this.options = c;
50254
50366
  }
50255
50367
  create() {
50256
- return si(this, null, function* () {
50368
+ return ni(this, null, function* () {
50257
50369
  const { depth: c } = this.options, st = this.pencil.installPlugins.get("materialList"), Zt = this.pencil.getPlugin("draw"), Wt = st.getMaterialObj("continents");
50258
50370
  this.createGroup(), this.object3d.name = "大洲组", yield Promise.all(
50259
- continents.features.map((Yt) => si(this, null, function* () {
50371
+ continents.features.map((Yt) => ni(this, null, function* () {
50260
50372
  const vt = Yt.properties.name;
50261
50373
  vt === "大洋洲" && (Yt.geometry.coordinates[4] = [], Yt.geometry.coordinates[21] = []);
50262
50374
  const Tt = centroid(Yt).geometry.coordinates;
@@ -50354,7 +50466,7 @@ class PlaneMap extends D$1 {
50354
50466
  });
50355
50467
  }
50356
50468
  create() {
50357
- return si(this, null, function* () {
50469
+ return ni(this, null, function* () {
50358
50470
  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
50471
  mesaage: {
50360
50472
  coordinatesArr: Zt.map(({ coords: _e }) => _e).flat(),
@@ -50423,7 +50535,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50423
50535
  const e = this.loader;
50424
50536
  e.add(["/image/map/jianbian.webp"]), e.add(["/image/map/hp2.webp", "/image/map/fx2.webp"]);
50425
50537
  }, ct.initMaterial = function() {
50426
- return si(this, null, function* () {
50538
+ return ni(this, null, function* () {
50427
50539
  const e = this.loader, c = this.mList, st = (() => {
50428
50540
  const Zt = e.getAsset("/image/map/hp2.webp");
50429
50541
  Zt.center.set(0.5, 0.5), Zt.repeat.set(0.97, 1.01);
@@ -50473,7 +50585,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50473
50585
  return;
50474
50586
  }
50475
50587
  ct.initMaterial = function() {
50476
- return si(this, null, function* () {
50588
+ return ni(this, null, function* () {
50477
50589
  const e = this.mList, c = (() => {
50478
50590
  const st = new MeshBasicMaterial({
50479
50591
  name: "顶面",
@@ -50514,7 +50626,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50514
50626
  "测试边框颜色.color:::caId": "ffffff",
50515
50627
  "测试边框宽度:::caId": 0
50516
50628
  }, ct.initSettingsObj), ct.options.lineOffset = 5e-3, ct.loaderAdd = function() {
50517
- return si(this, null, function* () {
50629
+ return ni(this, null, function* () {
50518
50630
  this.loader.add([
50519
50631
  "/image/map/jianbian.webp",
50520
50632
  "/image/map/hp.webp",
@@ -50522,7 +50634,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50522
50634
  ]), this.loaderAddBg();
50523
50635
  });
50524
50636
  }, ct.initMaterial = function() {
50525
- return si(this, null, function* () {
50637
+ return ni(this, null, function* () {
50526
50638
  const e = this.loader, c = (() => {
50527
50639
  const st = new MeshStandardMaterial({
50528
50640
  name: "顶面",
@@ -50561,11 +50673,11 @@ const objs$4 = Ei(bi({}, objs$5), {
50561
50673
  };
50562
50674
  }, base$1 = (ct) => {
50563
50675
  ct.loaderAdd = function() {
50564
- return si(this, null, function* () {
50676
+ return ni(this, null, function* () {
50565
50677
  this.loader.add(["/image/map/jianbian.webp"]), this.loaderAddBg();
50566
50678
  });
50567
50679
  }, ct.initMaterial = function() {
50568
- return si(this, null, function* () {
50680
+ return ni(this, null, function* () {
50569
50681
  const e = this.loader, c = (() => {
50570
50682
  const st = new MeshBasicMaterial({
50571
50683
  name: "顶面",
@@ -50729,7 +50841,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50729
50841
  })), 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
50842
  }
50731
50843
  handleSetting(c, st) {
50732
- return si(this, null, function* () {
50844
+ return ni(this, null, function* () {
50733
50845
  if (yield cn(mn.prototype, this, "handleSetting").call(this, c, st), c === "label")
50734
50846
  st === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels());
50735
50847
  else if (c === "labelLite")
@@ -50759,7 +50871,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50759
50871
  });
50760
50872
  }
50761
50873
  init() {
50762
- return si(this, null, function* () {
50874
+ return ni(this, null, function* () {
50763
50875
  const { adcode: c } = this.options;
50764
50876
  this.options.center && (this.pcenter = this.options.center), this.projection = F({
50765
50877
  center: this.pcenter,
@@ -50770,7 +50882,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50770
50882
  });
50771
50883
  }
50772
50884
  initVis(c) {
50773
- return si(this, null, function* () {
50885
+ return ni(this, null, function* () {
50774
50886
  var Yt;
50775
50887
  if (this.options.parentBg) {
50776
50888
  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 +50945,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50833
50945
  (this.options.parentBg || this.options.continentsBg) && c.add(["/image/map/dian.webp"]);
50834
50946
  }
50835
50947
  initMaterialBg() {
50836
- return si(this, null, function* () {
50948
+ return ni(this, null, function* () {
50837
50949
  const c = this.loader;
50838
50950
  if (this.options.parentBg) {
50839
50951
  const st = (() => {
@@ -50997,7 +51109,7 @@ const objs$4 = Ei(bi({}, objs$5), {
50997
51109
  Wt && this.map.setLineWidth(Wt, Zt);
50998
51110
  }
50999
51111
  addAreaPlaneByProperty(Wt, Yt) {
51000
- return si(this, arguments, function* (c, st, Zt = {}) {
51112
+ return ni(this, arguments, function* (c, st, Zt = {}) {
51001
51113
  var Jt, $t, de;
51002
51114
  if (!this.map) return;
51003
51115
  const Tt = this.map.options.geojson.features.find(
@@ -51019,7 +51131,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51019
51131
  });
51020
51132
  }
51021
51133
  show() {
51022
- return si(this, null, function* () {
51134
+ return ni(this, null, function* () {
51023
51135
  if (this.showState || this.options.disableInitShow) return;
51024
51136
  cn(mn.prototype, this, "show").call(this);
51025
51137
  const c = this.drawController.group;
@@ -51036,10 +51148,10 @@ const objs$4 = Ei(bi({}, objs$5), {
51036
51148
  });
51037
51149
  }
51038
51150
  handlePickTest() {
51039
- return si(this, null, function* () {
51151
+ return ni(this, null, function* () {
51040
51152
  var c;
51041
51153
  this.playing || (c = this.mapArea) == null || c.forEach((st) => {
51042
- st.onPointerEvent("down", (Zt) => si(this, null, function* () {
51154
+ st.onPointerEvent("down", (Zt) => ni(this, null, function* () {
51043
51155
  this.caId = Zt.userData.ISO_A2 || Zt.userData.adcode;
51044
51156
  const Wt = this.mapLine.find(
51045
51157
  (Tt) => Tt.userData.ISO_A2 === this.caId || Tt.userData.adcode === this.caId
@@ -51050,7 +51162,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51050
51162
  });
51051
51163
  }
51052
51164
  hide() {
51053
- return si(this, null, function* () {
51165
+ return ni(this, null, function* () {
51054
51166
  if (!this.showState) return;
51055
51167
  const c = this.drawController.group;
51056
51168
  yield new Promise((st) => {
@@ -51068,7 +51180,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51068
51180
  });
51069
51181
  }
51070
51182
  shadowMapEnabled() {
51071
- return si(this, null, function* () {
51183
+ return ni(this, null, function* () {
51072
51184
  if (this.pencil.scene.userData.shadowMapEnabled) return;
51073
51185
  this.pencil.scene.userData.shadowMapEnabled = !0;
51074
51186
  const c = yield this.drawController.draw("Light", {
@@ -51133,7 +51245,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51133
51245
  return !0;
51134
51246
  }
51135
51247
  clickArea(Zt) {
51136
- return si(this, arguments, function* ({
51248
+ return ni(this, arguments, function* ({
51137
51249
  adcodes: c,
51138
51250
  duration: st = 1e3
51139
51251
  }) {
@@ -51144,13 +51256,13 @@ const objs$4 = Ei(bi({}, objs$5), {
51144
51256
  });
51145
51257
  }
51146
51258
  drawLabels() {
51147
- return si(this, null, function* () {
51259
+ return ni(this, null, function* () {
51148
51260
  var Zt;
51149
51261
  const c = this.options.showLabel;
51150
51262
  !((Zt = this.mapArea) != null && Zt.length) || !c || this.drawController.getAllObject("Node", {
51151
51263
  key: "mapLabel"
51152
51264
  }).length || (yield Promise.all(
51153
- this.mapArea.map((Wt) => si(this, null, function* () {
51265
+ this.mapArea.map((Wt) => ni(this, null, function* () {
51154
51266
  let { name: Yt, adcode: vt } = Wt.userData;
51155
51267
  const { DistrictID: Tt, DistName: Jt, NAME_CN: $t, CENTROID: de } = Wt.userData;
51156
51268
  vt = vt || Tt, Yt = this.options.adcode === 0 ? $t : Yt || Jt;
@@ -51202,7 +51314,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51202
51314
  return json100000.features[0].geometry.coordinates.some((st) => booleanPointInPolygon$1(point(c), polygon(st)));
51203
51315
  }
51204
51316
  handleDrillDown(Zt) {
51205
- return si(this, arguments, function* ({
51317
+ return ni(this, arguments, function* ({
51206
51318
  adcode: c,
51207
51319
  duration: st
51208
51320
  }) {
@@ -51289,7 +51401,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51289
51401
  return MathUtils.euclideanModulo(Wt + Math.PI, Zt) - Math.PI;
51290
51402
  }
51291
51403
  fitTo(Yt) {
51292
- return si(this, arguments, function* (c, {
51404
+ return ni(this, arguments, function* (c, {
51293
51405
  polarAngle: st,
51294
51406
  azimuthAngle: Zt,
51295
51407
  enableTransition: Wt = !0
@@ -51356,7 +51468,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51356
51468
  });
51357
51469
  }
51358
51470
  drawPlaneMap(vt) {
51359
- return si(this, arguments, function* ({
51471
+ return ni(this, arguments, function* ({
51360
51472
  geojson: c,
51361
51473
  extrudeLineGeojson: st,
51362
51474
  bbox: Zt,
@@ -51396,7 +51508,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51396
51508
  });
51397
51509
  }
51398
51510
  handleBack(c) {
51399
- return si(this, null, function* () {
51511
+ return ni(this, null, function* () {
51400
51512
  if (this.mapHistory.length > 1 && !this.isAnimating) {
51401
51513
  this.isAnimating = !0;
51402
51514
  const st = this.mapHistory.pop();
@@ -51418,7 +51530,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51418
51530
  });
51419
51531
  }
51420
51532
  handleLookBack(c) {
51421
- return si(this, null, function* () {
51533
+ return ni(this, null, function* () {
51422
51534
  var Yt;
51423
51535
  const { map: st, cameraPositon: Zt, cameraTarget: Wt } = this.mapObj;
51424
51536
  Zt && Wt ? yield (Yt = this.pencil.controls) == null ? void 0 : Yt.setLookAt(
@@ -51435,7 +51547,7 @@ const objs$4 = Ei(bi({}, objs$5), {
51435
51547
  });
51436
51548
  }
51437
51549
  setAdcode(Zt) {
51438
- return si(this, arguments, function* ({ adcodes: c, duration: st }) {
51550
+ return ni(this, arguments, function* ({ adcodes: c, duration: st }) {
51439
51551
  const { adcodes: Wt } = this;
51440
51552
  if (!(JSON.stringify(c) === JSON.stringify(Wt) || this.isAnimating))
51441
51553
  if (JSON.stringify(c) === JSON.stringify([0]))
@@ -51993,7 +52105,7 @@ class Plane extends D$1 {
51993
52105
  }, c);
51994
52106
  }
51995
52107
  create() {
51996
- return si(this, null, function* () {
52108
+ return ni(this, null, function* () {
51997
52109
  const { width: c, height: st, color: Zt, map: Wt, material: Yt } = this.options, vt = new PlaneGeometry(c, st, 2, 2);
51998
52110
  this.plane = vt;
51999
52111
  const Tt = Yt || new MeshBasicMaterial({
@@ -52071,7 +52183,7 @@ class Building extends D$1 {
52071
52183
  this.options = bi({}, c);
52072
52184
  }
52073
52185
  create() {
52074
- return si(this, null, function* () {
52186
+ return ni(this, null, function* () {
52075
52187
  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
52188
  this.createGroup();
52077
52189
  const Xe = Tt.getMaterialObj("building" + de);
@@ -52127,7 +52239,7 @@ class Building extends D$1 {
52127
52239
  );
52128
52240
  }
52129
52241
  yield Promise.all(
52130
- Ke.map((Qe) => si(this, null, function* () {
52242
+ Ke.map((Qe) => ni(this, null, function* () {
52131
52243
  const { h: qe, z: $e } = Qe.userData, Je = qe + $e, _e = Je <= 20 ? "20" : Je <= 60 ? "60" : "max";
52132
52244
  let t0 = this.options.material;
52133
52245
  t0 || (t0 = [Xe[_e + "Top"], Xe[_e + "Side"]]);
@@ -52210,7 +52322,7 @@ class Area extends D$1 {
52210
52322
  this.options = bi({}, c);
52211
52323
  }
52212
52324
  create() {
52213
- return si(this, null, function* () {
52325
+ return ni(this, null, function* () {
52214
52326
  this.createGroup();
52215
52327
  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
52328
  let de = Wt ? yield Jt.getCachedGeometry({
@@ -52270,7 +52382,7 @@ class Area extends D$1 {
52270
52382
  );
52271
52383
  }
52272
52384
  yield Promise.all(
52273
- de.map((Xe) => si(this, null, function* () {
52385
+ de.map((Xe) => ni(this, null, function* () {
52274
52386
  const { z: Ke } = Xe.userData, Qe = yield $t.draw(
52275
52387
  "ExtrudePolygon",
52276
52388
  {
@@ -52299,7 +52411,7 @@ class Road extends D$1 {
52299
52411
  this.options = bi({}, c);
52300
52412
  }
52301
52413
  create() {
52302
- return si(this, null, function* () {
52414
+ return ni(this, null, function* () {
52303
52415
  const { clip: c, grey: st } = this.options;
52304
52416
  this.createGroup();
52305
52417
  const Zt = this.pencil.getPlugin("worker"), Wt = this.pencil.getPlugin("draw");
@@ -52353,7 +52465,7 @@ class Road extends D$1 {
52353
52465
  );
52354
52466
  }
52355
52467
  yield Promise.all(
52356
- Xe.map((Ke) => si(this, null, function* () {
52468
+ Xe.map((Ke) => ni(this, null, function* () {
52357
52469
  const Qe = yield Wt.draw(
52358
52470
  "Line",
52359
52471
  {
@@ -52375,11 +52487,11 @@ class Road extends D$1 {
52375
52487
  };
52376
52488
  this.object3d.userData = new Proxy(c, {
52377
52489
  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({
52490
+ 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
52491
  duration: Wt,
52380
52492
  repeat: 1 / 0,
52381
52493
  lineLoop: !0
52382
- });
52494
+ }));
52383
52495
  }), Reflect.set(st, Zt, Wt))
52384
52496
  });
52385
52497
  }
@@ -52495,7 +52607,7 @@ class Target extends D$1 {
52495
52607
  return Wt.translateZ(1), Wt;
52496
52608
  }
52497
52609
  create() {
52498
- return si(this, null, function* () {
52610
+ return ni(this, null, function* () {
52499
52611
  const { scale: c = 0.03 } = this.options;
52500
52612
  this.createGroup();
52501
52613
  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 +52634,11 @@ const objs$3 = Ei(bi({}, objs$5), {
52522
52634
  Target
52523
52635
  }), base = (ct) => {
52524
52636
  ct.loaderAdd = function() {
52525
- return si(this, null, function* () {
52637
+ return ni(this, null, function* () {
52526
52638
  this.loaderAddBg();
52527
52639
  });
52528
52640
  }, ct.initMaterial = function() {
52529
- return si(this, null, function* () {
52641
+ return ni(this, null, function* () {
52530
52642
  const e = (() => {
52531
52643
  const c = new MeshBasicMaterial({
52532
52644
  name: "板块顶面",
@@ -52592,13 +52704,14 @@ const objs$3 = Ei(bi({}, objs$5), {
52592
52704
  showRiver: ct.options.showRiver,
52593
52705
  buildingSideGradient: ct.options.buildingSideGradient,
52594
52706
  setWaterMaterial: ct.options.setWaterMaterial,
52595
- showCityOnMapInnerLine: ct.options.showCityOnMapInnerLine
52707
+ showCityOnMapInnerLine: ct.options.showCityOnMapInnerLine,
52708
+ greyFull: ct.options.greyFull
52596
52709
  // ...this.extendsOptions,
52597
52710
  // initCity: this.options.initCity,
52598
52711
  }, ct.loaderAdd = function() {
52599
52712
  this.loader.add(["/image/map2/side.png"]);
52600
52713
  }, ct.initMaterial = function() {
52601
- return si(this, null, function* () {
52714
+ return ni(this, null, function* () {
52602
52715
  const c = this.loader, st = (() => {
52603
52716
  const Zt = new MeshBasicMaterial({
52604
52717
  name: "板块顶面",
@@ -52633,7 +52746,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52633
52746
  };
52634
52747
  const e = ct.drawPlaneMap.bind(ct);
52635
52748
  ct.drawPlaneMap = function(c) {
52636
- return si(this, null, function* () {
52749
+ return ni(this, null, function* () {
52637
52750
  const st = yield e(c);
52638
52751
  return st.lineArr.forEach((Zt) => {
52639
52752
  Zt.object3d.userData = new Proxy(
@@ -52642,12 +52755,12 @@ const objs$3 = Ei(bi({}, objs$5), {
52642
52755
  animationDuration: 0
52643
52756
  },
52644
52757
  {
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({
52758
+ 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
52759
  duration: vt,
52647
52760
  repeat: 1 / 0,
52648
52761
  lineLoop: !0,
52649
52762
  startShow: !0
52650
- })), Reflect.set(Wt, Yt, vt))
52763
+ }))), Reflect.set(Wt, Yt, vt))
52651
52764
  }
52652
52765
  ), Zt.object3d.name = "板块边框", ct.mList.setObject3d(Zt.object3d, "plane#lineMat");
52653
52766
  }), st;
@@ -52678,7 +52791,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52678
52791
  }
52679
52792
  );
52680
52793
  }, ct.initMaterial = function() {
52681
- return si(this, null, function* () {
52794
+ return ni(this, null, function* () {
52682
52795
  const e = ct.roomEnvMap, c = ct.loader, st = (() => {
52683
52796
  const Wt = new MeshStandardMaterial({
52684
52797
  name: "顶面",
@@ -52762,7 +52875,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52762
52875
  })();
52763
52876
  ct.mList.setMaterialObj("plane", Zt);
52764
52877
  });
52765
- }, ct.initVis = (e) => si(void 0, null, function* () {
52878
+ }, ct.initVis = (e) => ni(void 0, null, function* () {
52766
52879
  let c = 1e3, st = 1e3;
52767
52880
  const Zt = new Vector3(0, 0, 0);
52768
52881
  if (ct.options.parentBg) {
@@ -52822,7 +52935,7 @@ const objs$3 = Ei(bi({}, objs$5), {
52822
52935
  }
52823
52936
  );
52824
52937
  }, ct.initMaterial = function() {
52825
- return si(this, null, function* () {
52938
+ return ni(this, null, function* () {
52826
52939
  if (!ct.mList.getMaterialObj("building")) {
52827
52940
  const e = ["20", "60", "max"].reduce(
52828
52941
  (c, st) => {
@@ -52929,7 +53042,7 @@ class Map$1 extends Map$2 {
52929
53042
  );
52930
53043
  }
52931
53044
  initMaterialBg() {
52932
- return si(this, null, function* () {
53045
+ return ni(this, null, function* () {
52933
53046
  const c = this.roomEnvMap;
52934
53047
  if (this.options.parentBg) {
52935
53048
  if (this.options.adcode !== 1e5) {
@@ -53010,7 +53123,7 @@ class Map$1 extends Map$2 {
53010
53123
  });
53011
53124
  }
53012
53125
  initVis(c) {
53013
- return si(this, null, function* () {
53126
+ return ni(this, null, function* () {
53014
53127
  var Yt;
53015
53128
  let st = 1e3, Zt = 1e3;
53016
53129
  const Wt = new Vector3(0, 0, 0);
@@ -53084,7 +53197,7 @@ class Map$1 extends Map$2 {
53084
53197
  });
53085
53198
  }
53086
53199
  drawPlaneMap(vt) {
53087
- return si(this, arguments, function* ({
53200
+ return ni(this, arguments, function* ({
53088
53201
  geojson: c,
53089
53202
  extrudeLineGeojson: st,
53090
53203
  bbox: Zt,
@@ -53298,6 +53411,8 @@ class City$1 extends Base {
53298
53411
  J0(this, "projection");
53299
53412
  J0(this, "group");
53300
53413
  J0(this, "building");
53414
+ J0(this, "road");
53415
+ J0(this, "innerAreaGroup");
53301
53416
  J0(this, "outAreaGroup");
53302
53417
  J0(this, "multiplyScalar", 1);
53303
53418
  }
@@ -53306,6 +53421,7 @@ class City$1 extends Base {
53306
53421
  fitTo: !0,
53307
53422
  plane: !0,
53308
53423
  grey: !1,
53424
+ greyFull: !1,
53309
53425
  clipOutShow: !1,
53310
53426
  planeOut: !1,
53311
53427
  showBuilding: !0,
@@ -53344,7 +53460,7 @@ class City$1 extends Base {
53344
53460
  );
53345
53461
  }
53346
53462
  initMaterial() {
53347
- return si(this, null, function* () {
53463
+ return ni(this, null, function* () {
53348
53464
  if (!this.mList.getMaterialObj("building")) {
53349
53465
  const c = ["20", "60", "max"].reduce(
53350
53466
  (Zt, Wt) => {
@@ -53453,14 +53569,18 @@ class City$1 extends Base {
53453
53569
  });
53454
53570
  }
53455
53571
  init() {
53456
- return si(this, null, function* () {
53572
+ return ni(this, null, function* () {
53457
53573
  const { jsonName: c, bbox: st, adcode: Zt } = this.options;
53458
53574
  yield this.initPencil();
53459
53575
  const Wt = this.pencil.composerController.ssaoPass;
53460
53576
  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
53577
  center: this.pcenter,
53462
53578
  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);
53579
+ }), this.group = yield this.drawController.draw("Group"), this.group.scale.multiplyScalar(this.multiplyScalar), this.innerAreaGroup = yield this.drawController.draw(
53580
+ "Group",
53581
+ {},
53582
+ this.group
53583
+ ), this.outAreaGroup = yield this.drawController.draw("Group", {}, this.group), yield this.initMaterial(), yield this.initVis(), yield Promise.all(this.drawController.objectsPromise);
53464
53584
  });
53465
53585
  }
53466
53586
  getInvert(c) {
@@ -53468,7 +53588,7 @@ class City$1 extends Base {
53468
53588
  return (Zt = (st = this.projection).invert) == null ? void 0 : Zt.call(st, [c.x, -c.z]);
53469
53589
  }
53470
53590
  fitTo(c, st = !0) {
53471
- return si(this, null, function* () {
53591
+ return ni(this, null, function* () {
53472
53592
  this.pencil.controls.fitToBox(c.object3d, st), this.pencil.controls.rotatePolarTo(
53473
53593
  this.pencil.camera.up.z === 1 ? Math.PI / 180 * 70 : Math.PI / 180 * 160,
53474
53594
  st
@@ -53476,7 +53596,7 @@ class City$1 extends Base {
53476
53596
  });
53477
53597
  }
53478
53598
  initVis() {
53479
- return si(this, null, function* () {
53599
+ return ni(this, null, function* () {
53480
53600
  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
53601
  [
53482
53602
  ...($t == null ? void 0 : $t.features) || [],
@@ -53501,7 +53621,7 @@ class City$1 extends Base {
53501
53621
  height: $e * 10,
53502
53622
  material: _e
53503
53623
  },
53504
- Wt ? this.outAreaGroup : this.group
53624
+ Wt ? this.outAreaGroup : this.innerAreaGroup
53505
53625
  );
53506
53626
  t0.position.copy(Je), this.mList.setObject3d(t0.object3d, "city-plane"), yield Promise.all(
53507
53627
  [
@@ -53538,14 +53658,14 @@ class City$1 extends Base {
53538
53658
  {
53539
53659
  key: "cityTarget" + Yt
53540
53660
  },
53541
- this.group
53661
+ this.innerAreaGroup
53542
53662
  )
53543
53663
  ].filter(Boolean)
53544
53664
  ), c && this.fitToTarget(Yt), this.pencil.getPlugin("worker").saveCache();
53545
53665
  });
53546
53666
  }
53547
53667
  fitToTarget(c, st) {
53548
- return si(this, null, function* () {
53668
+ return ni(this, null, function* () {
53549
53669
  const Zt = this.drawController.getObject("Target", {
53550
53670
  key: "cityTarget" + c
53551
53671
  });
@@ -53567,35 +53687,19 @@ class City$1 extends Base {
53567
53687
  }
53568
53688
  const Wt = Zt.object3d.getWorldPosition(new Vector3());
53569
53689
  yield this.lookAtTarget(
53570
- Wt,
53571
- 6.984429017840711 * this.multiplyScalar,
53572
- 0.9963693538268685
53690
+ {
53691
+ target: Wt,
53692
+ distance: 6.984429017840711 * this.multiplyScalar,
53693
+ polarAngle: 0.9963693538268685,
53694
+ azimuthAngle: 0
53695
+ },
53696
+ !0
53573
53697
  );
53574
53698
  }
53575
53699
  });
53576
53700
  }
53577
- absoluteAngle(c, st) {
53578
- const Zt = Math.PI * 2, Wt = c - st;
53579
- return MathUtils.euclideanModulo(Wt + Math.PI, Zt) - Math.PI;
53580
- }
53581
- lookAtTarget(c, st, Zt, Wt = 0) {
53582
- return si(this, null, function* () {
53583
- const Yt = this.pencil.controls.azimuthAngle, vt = this.pencil.controls.polarAngle, Tt = Yt !== Wt || vt !== Zt;
53584
- yield Promise.all(
53585
- [
53586
- this.pencil.controls.setTarget(c.x, c.y, c.z, !0),
53587
- this.pencil.controls.dollyTo(st, !0),
53588
- Tt && this.pencil.controls.rotate(
53589
- this.absoluteAngle(Wt, Yt),
53590
- this.absoluteAngle(Zt, vt),
53591
- !0
53592
- )
53593
- ].filter(Boolean)
53594
- );
53595
- });
53596
- }
53597
53701
  drawBuilding() {
53598
- return si(this, arguments, function* (c = {}) {
53702
+ return ni(this, arguments, function* (c = {}) {
53599
53703
  var Wt;
53600
53704
  if (!c.json) {
53601
53705
  console.warn(" json:Building");
@@ -53615,10 +53719,10 @@ class City$1 extends Base {
53615
53719
  grey: c.grey,
53616
53720
  clip: c.clip
53617
53721
  },
53618
- (Wt = c.group) != null ? Wt : this.group
53722
+ (Wt = c.group) != null ? Wt : this.innerAreaGroup
53619
53723
  );
53620
53724
  return this.options.clipOutShow && Zt.outJson.size && (yield this.drawBuilding({
53621
- json: {
53725
+ json: this.options.greyFull ? c.json : {
53622
53726
  features: Array.from(Zt.outJson.keys()).filter(
53623
53727
  (Yt) => Yt !== 1
53624
53728
  )
@@ -53632,7 +53736,7 @@ class City$1 extends Base {
53632
53736
  });
53633
53737
  }
53634
53738
  drawArea() {
53635
- return si(this, arguments, function* (c = {}) {
53739
+ return ni(this, arguments, function* (c = {}) {
53636
53740
  var vt;
53637
53741
  if (!c.json) {
53638
53742
  console.warn(" json:drawArea");
@@ -53653,10 +53757,10 @@ class City$1 extends Base {
53653
53757
  oArr: c.oArr,
53654
53758
  clip: c.clip
53655
53759
  },
53656
- (vt = c.group) != null ? vt : this.group
53760
+ (vt = c.group) != null ? vt : this.innerAreaGroup
53657
53761
  );
53658
53762
  return this.options.clipOutShow && Yt.outJson.size && (yield this.drawArea({
53659
- json: {
53763
+ json: this.options.greyFull ? c.json : {
53660
53764
  features: Array.from(Yt.outJson.keys()).filter(
53661
53765
  (Tt) => Tt !== 1
53662
53766
  )
@@ -53672,7 +53776,7 @@ class City$1 extends Base {
53672
53776
  });
53673
53777
  }
53674
53778
  drawRoad() {
53675
- return si(this, arguments, function* (c = {}) {
53779
+ return ni(this, arguments, function* (c = {}) {
53676
53780
  var Yt;
53677
53781
  if (!c.json) {
53678
53782
  console.warn(" json:Road");
@@ -53691,10 +53795,10 @@ class City$1 extends Base {
53691
53795
  meters: c.meters,
53692
53796
  clip: c.clip
53693
53797
  },
53694
- (Yt = c.group) != null ? Yt : this.group
53798
+ (Yt = c.group) != null ? Yt : this.innerAreaGroup
53695
53799
  ), Wt = c.z || 0;
53696
53800
  return Zt.position.z = (Wt + 1) * 1e-3, this.options.clipOutShow && Zt.outJson.size && (yield this.drawRoad({
53697
- json: {
53801
+ json: this.options.greyFull ? c.json : {
53698
53802
  features: Array.from(Zt.outJson.keys()).filter(
53699
53803
  (vt) => vt !== 1
53700
53804
  )
@@ -53704,7 +53808,7 @@ class City$1 extends Base {
53704
53808
  clip: void 0,
53705
53809
  grey: !0,
53706
53810
  group: this.outAreaGroup
53707
- })), Zt;
53811
+ })), c.grey || (this.road = Zt), Zt;
53708
53812
  });
53709
53813
  }
53710
53814
  getWorldPosition(c, st) {
@@ -53765,13 +53869,14 @@ const xn = class xn extends Map$1 {
53765
53869
  showGrassland: !0,
53766
53870
  showRiver: !0,
53767
53871
  setWaterMaterial: !1,
53768
- showCityOnMapInnerLine: !1
53872
+ showCityOnMapInnerLine: !1,
53873
+ greyFull: !1
53769
53874
  }, c)), this.pencilConfig = PENCIL_CONFIG$3;
53770
53875
  }
53771
53876
  init() {
53772
- return si(this, null, function* () {
53877
+ return ni(this, null, function* () {
53773
53878
  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 }) {
53879
+ 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
53880
  const Wt = this.getAdcodeShowLevel(st) === "city";
53776
53881
  this.options.initCity && Wt && this.initCityVis(st, {
53777
53882
  clip: !!this.options.cityOnMap,
@@ -53783,7 +53888,7 @@ const xn = class xn extends Map$1 {
53783
53888
  if (this.options.allCity) {
53784
53889
  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
53890
  Wt && (yield Promise.all(
53786
- Wt.map((Yt) => si(this, null, function* () {
53891
+ Wt.map((Yt) => ni(this, null, function* () {
53787
53892
  yield this.initCityOnMap(Yt);
53788
53893
  }))
53789
53894
  ));
@@ -53792,7 +53897,7 @@ const xn = class xn extends Map$1 {
53792
53897
  });
53793
53898
  }
53794
53899
  preInitCityVis() {
53795
- return si(this, null, function* () {
53900
+ return ni(this, null, function* () {
53796
53901
  const c = Object.keys(this.options.jsonNameObj);
53797
53902
  for (let st = 0; st < c.length; st++)
53798
53903
  yield this.initCityVis(Number(c[st]));
@@ -53800,7 +53905,7 @@ const xn = class xn extends Map$1 {
53800
53905
  });
53801
53906
  }
53802
53907
  initCityVis(Zt) {
53803
- return si(this, arguments, function* (c, st = { clip: !1, grey: !1 }) {
53908
+ return ni(this, arguments, function* (c, st = { clip: !1, grey: !1 }) {
53804
53909
  var $t;
53805
53910
  ($t = this.options.fixCity) != null && $t[c] && (c = this.options.fixCity[c]);
53806
53911
  const Wt = this.options.center, Yt = this.options.cityBboxMap[c];
@@ -53812,6 +53917,10 @@ const xn = class xn extends Map$1 {
53812
53917
  state: makePromiseCreator(!0)
53813
53918
  };
53814
53919
  const vt = this.options.jsonNameObj[c], Tt = new City({
53920
+ container: this.container,
53921
+ editor: !1
53922
+ });
53923
+ Tt.setOptions({
53815
53924
  container: this.container,
53816
53925
  center: Wt,
53817
53926
  bbox: Yt,
@@ -53820,6 +53929,7 @@ const xn = class xn extends Map$1 {
53820
53929
  cacheKey: this.options.adcode + "-" + c,
53821
53930
  jsonName: vt,
53822
53931
  grey: st.grey,
53932
+ greyFull: this.options.greyFull,
53823
53933
  clip: st.clip ? this.map.options.geojson : void 0,
53824
53934
  clipOutShow: this.options.clipOutShow,
53825
53935
  planeOut: this.options.cityOnMap,
@@ -53828,10 +53938,8 @@ const xn = class xn extends Map$1 {
53828
53938
  showRoad: this.options.showRoad,
53829
53939
  showGrassland: this.options.showGrassland,
53830
53940
  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);
53941
+ setWaterMaterial: this.options.setWaterMaterial
53942
+ }), 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
53943
  });
53836
53944
  }
53837
53945
  consoleMousePostion() {
@@ -53842,7 +53950,7 @@ const xn = class xn extends Map$1 {
53842
53950
  });
53843
53951
  }
53844
53952
  initCityOnMap(c) {
53845
- return si(this, null, function* () {
53953
+ return ni(this, null, function* () {
53846
53954
  if (this.getAdcodeShowLevel(c) !== "city") {
53847
53955
  const Wt = adcodeMap[c].parent;
53848
53956
  this.getAdcodeShowLevel(Wt) === "city" && (yield this.initCityOnMap(Wt));
@@ -53863,7 +53971,7 @@ const xn = class xn extends Map$1 {
53863
53971
  });
53864
53972
  }
53865
53973
  showCity(c, st) {
53866
- return si(this, null, function* () {
53974
+ return ni(this, null, function* () {
53867
53975
  var $t;
53868
53976
  let Zt, Wt, Yt = this.mapInfo.adcode, vt = 0.03637926645733737, Tt = 0.9963693538268685, Jt = 0;
53869
53977
  if (typeof c == "number" ? (Yt = c, Zt = st, console.warn(
@@ -53877,10 +53985,13 @@ const xn = class xn extends Map$1 {
53877
53985
  this.mapObj.z + this.mapObj.depth
53878
53986
  );
53879
53987
  this.emit("beforeDrillDown", "city"), yield this.cityVis.lookAtTarget(
53880
- Xe,
53881
- vt,
53882
- Tt,
53883
- Jt
53988
+ {
53989
+ target: Xe,
53990
+ distance: vt,
53991
+ polarAngle: Tt,
53992
+ azimuthAngle: Jt
53993
+ },
53994
+ !0
53884
53995
  ), this.emit("afterDrillDown", "city");
53885
53996
  } else
53886
53997
  console.error("showCityOnMap lnglat or target is required");
@@ -53900,7 +54011,7 @@ const xn = class xn extends Map$1 {
53900
54011
  });
53901
54012
  }
53902
54013
  showMap(c) {
53903
- return si(this, null, function* () {
54014
+ return ni(this, null, function* () {
53904
54015
  if (this.isAnimating)
53905
54016
  return;
53906
54017
  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 +54059,7 @@ class Countries extends D$1 {
53948
54059
  }, c);
53949
54060
  }
53950
54061
  create() {
53951
- return si(this, null, function* () {
54062
+ return ni(this, null, function* () {
53952
54063
  const {
53953
54064
  geojson: c,
53954
54065
  mats: st,
@@ -53982,7 +54093,7 @@ class Countries extends D$1 {
53982
54093
  bbox: this.options.bbox,
53983
54094
  hasSide: Zt
53984
54095
  },
53985
- cb: ($e) => si(this, null, function* () {
54096
+ cb: ($e) => ni(this, null, function* () {
53986
54097
  const Je = yield Tt.draw(
53987
54098
  "ConicPolygon",
53988
54099
  {
@@ -54001,7 +54112,7 @@ class Countries extends D$1 {
54001
54112
  lineWidth: [1],
54002
54113
  coordinatesArr: qe.coords
54003
54114
  },
54004
- cb: ($e) => si(this, null, function* () {
54115
+ cb: ($e) => ni(this, null, function* () {
54005
54116
  const Je = yield Tt.draw(
54006
54117
  "Line",
54007
54118
  {
@@ -54060,7 +54171,7 @@ class SphereShadow extends D$1 {
54060
54171
  }, c);
54061
54172
  }
54062
54173
  create() {
54063
- return si(this, null, function* () {
54174
+ return ni(this, null, function* () {
54064
54175
  const c = this.pencil.installPlugins.get("materialList"), st = new SphereGeometry(this.options.radius, 128, 90), Zt = new MeshBasicMaterial();
54065
54176
  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
54177
  baseObject: this
@@ -54090,7 +54201,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54090
54201
  colorCorrection: !1
54091
54202
  });
54092
54203
  }, ct.initVis = function() {
54093
- return si(this, null, function* () {
54204
+ return ni(this, null, function* () {
54094
54205
  yield this.initLight();
54095
54206
  const [, e, , c] = yield Promise.all([
54096
54207
  this.drawController.draw("Earth", {
@@ -54162,7 +54273,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54162
54273
  ), yield this.pencil.controls.dollyTo(99.11560932366835, !1);
54163
54274
  });
54164
54275
  }, ct.initMaterial = function() {
54165
- return si(this, null, function* () {
54276
+ return ni(this, null, function* () {
54166
54277
  const e = this.loader, c = new MeshStandardMaterial({
54167
54278
  side: DoubleSide,
54168
54279
  name: "顶面",
@@ -54215,7 +54326,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54215
54326
  };
54216
54327
  }, countryPlate = (ct) => {
54217
54328
  ct.initVis = function() {
54218
- return si(this, null, function* () {
54329
+ return ni(this, null, function* () {
54219
54330
  yield this.initLight();
54220
54331
  const [, e] = yield Promise.all([
54221
54332
  this.drawController.draw("Earth", {
@@ -54236,7 +54347,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54236
54347
  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
54348
  });
54238
54349
  }, ct.initMaterial = function() {
54239
- return si(this, null, function* () {
54350
+ return ni(this, null, function* () {
54240
54351
  const e = new MeshStandardMaterial({
54241
54352
  side: DoubleSide,
54242
54353
  name: "侧面",
@@ -54299,7 +54410,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54299
54410
  }, styles[this.options.style](this);
54300
54411
  }
54301
54412
  handleSetting(c, st) {
54302
- return si(this, null, function* () {
54413
+ return ni(this, null, function* () {
54303
54414
  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
54415
  });
54305
54416
  }
@@ -54315,7 +54426,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54315
54426
  });
54316
54427
  }
54317
54428
  initLight() {
54318
- return si(this, null, function* () {
54429
+ return ni(this, null, function* () {
54319
54430
  const [c, st] = yield Promise.all([
54320
54431
  this.drawController.draw("Light", {
54321
54432
  type: "RectAreaLight",
@@ -54425,7 +54536,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54425
54536
  Wt && this.map.setLineColor(Wt, Zt);
54426
54537
  }
54427
54538
  addAreaPlaneByProperty(c, st, Zt) {
54428
- return si(this, null, function* () {
54539
+ return ni(this, null, function* () {
54429
54540
  if (!this.map) return;
54430
54541
  const Yt = this.map.options.geojson.features.find(
54431
54542
  (vt) => vt.properties && vt.properties[c] === st
@@ -54481,7 +54592,7 @@ const objs$1 = Ei(bi({}, objs$5), {
54481
54592
  "马来西亚",
54482
54593
  "俄罗斯"
54483
54594
  ];
54484
- this.mapArea.filter((Wt) => Zt.includes(Wt.userData.NAME_CN)).forEach((Wt) => si(this, null, function* () {
54595
+ this.mapArea.filter((Wt) => Zt.includes(Wt.userData.NAME_CN)).forEach((Wt) => ni(this, null, function* () {
54485
54596
  const [Yt, vt] = Wt.userData.CENTROID, Tt = this.getLocationPosition([Yt, vt], 0.1), Jt = yield st.instantiate();
54486
54597
  Jt.position.set(...Tt), Jt.object3d.lookAt(0, 0, 0), this.barArr.push(Jt);
54487
54598
  }));
@@ -54540,7 +54651,7 @@ const objs = Ei(bi({}, objs$5), {
54540
54651
  ]);
54541
54652
  }
54542
54653
  initVis() {
54543
- return si(this, null, function* () {
54654
+ return ni(this, null, function* () {
54544
54655
  yield Promise.all([
54545
54656
  this.drawController.draw("Light", {
54546
54657
  type: "PointLight",
@@ -54557,12 +54668,12 @@ const objs = Ei(bi({}, objs$5), {
54557
54668
  super.show(), this.animationIn();
54558
54669
  }
54559
54670
  handleSetting(c, st) {
54560
- return si(this, null, function* () {
54671
+ return ni(this, null, function* () {
54561
54672
  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
54673
  });
54563
54674
  }
54564
54675
  animationIn() {
54565
- return si(this, null, function* () {
54676
+ return ni(this, null, function* () {
54566
54677
  const c = this.pencil.controls;
54567
54678
  c.setPosition(0, 0, 1800, !1), yield c.rotatePolarTo(1.046, !1);
54568
54679
  const st = this.drawController.getObject("Light"), Zt = new Vector3();
@@ -54602,7 +54713,7 @@ function stringToUtf8ByteArray(ct) {
54602
54713
  }
54603
54714
  let b = "/";
54604
54715
  b === "/" && (b = "");
54605
- const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b, c) {
54716
+ const getMapConfig = (st, ...Zt) => ni(void 0, [st, ...Zt], function* (ct, e = b, c) {
54606
54717
  if (ct === 0)
54607
54718
  return {
54608
54719
  mapDepth: 5,
@@ -54623,7 +54734,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54623
54734
  c
54624
54735
  );
54625
54736
  }
54626
- }), getMap2Config = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b, c) {
54737
+ }), getMap2Config = (st, ...Zt) => ni(void 0, [st, ...Zt], function* (ct, e = b, c) {
54627
54738
  const Wt = adcodeMap[ct];
54628
54739
  return extendMapConfig(
54629
54740
  "map2",
@@ -54635,7 +54746,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54635
54746
  e,
54636
54747
  c
54637
54748
  );
54638
- }), getMap2WithCityConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b, c) {
54749
+ }), getMap2WithCityConfig = (st, ...Zt) => ni(void 0, [st, ...Zt], function* (ct, e = b, c) {
54639
54750
  const Wt = adcodeMap[ct];
54640
54751
  return extendMapConfig(
54641
54752
  "map2",
@@ -54652,7 +54763,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54652
54763
  e,
54653
54764
  c
54654
54765
  );
54655
- }), extendMapConfig = (Zt, Wt, ...Yt) => si(void 0, [Zt, Wt, ...Yt], function* (ct, e, c = b, st) {
54766
+ }), extendMapConfig = (Zt, Wt, ...Yt) => ni(void 0, [Zt, Wt, ...Yt], function* (ct, e, c = b, st) {
54656
54767
  var vt, Tt;
54657
54768
  if (e.adcode !== 0 && e.adcode !== 1e5) {
54658
54769
  const Jt = (vt = e.fixGeojson) == null ? void 0 : vt[e.adcode], $t = (Tt = e.fixGeojson) == null ? void 0 : Tt[e.adcode + "-lite"];
@@ -54706,7 +54817,7 @@ const getMapConfig = (st, ...Zt) => si(void 0, [st, ...Zt], function* (ct, e = b
54706
54817
  return st && (qe.depthReference = st.depthReference || st.bboxMap[st.adcode]), qe;
54707
54818
  }
54708
54819
  return bi({}, e);
54709
- }), getCityConfig = (c, ...st) => si(void 0, [c, ...st], function* (ct, e = b) {
54820
+ }), getCityConfig = (c, ...st) => ni(void 0, [c, ...st], function* (ct, e = b) {
54710
54821
  const Zt = adcodeMap[ct], Wt = yield fetch(
54711
54822
  e + `/geojson/json-lite/${ct}.json`
54712
54823
  ).then((Tt) => Tt.json()), Yt = bbox(Wt), { name: vt } = adcodeMap[ct];
@@ -54731,6 +54842,7 @@ export {
54731
54842
  THREE,
54732
54843
  tween_esm as TWEEN,
54733
54844
  access,
54845
+ animation as animationUtils,
54734
54846
  extendMapConfig,
54735
54847
  getCityConfig,
54736
54848
  getMap2Config,