vis-core 0.16.12 → 0.16.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -10
- package/dist/index.module.js +201 -201
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -4,7 +4,7 @@ var kf = Object.getOwnPropertyDescriptors;
|
|
|
4
4
|
var gb = Object.getOwnPropertySymbols, zf = Object.getPrototypeOf, Uf = Object.prototype.hasOwnProperty, Bf = Object.prototype.propertyIsEnumerable, Pf = Reflect.get;
|
|
5
5
|
var to = (i, e) => (e = Symbol[i]) ? e : Symbol.for("Symbol." + i), Ef = (i) => {
|
|
6
6
|
throw TypeError(i);
|
|
7
|
-
}, Ys = Math.pow, xm = (i, e, t) => e in i ? wf(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t,
|
|
7
|
+
}, Ys = Math.pow, xm = (i, e, t) => e in i ? wf(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, we = (i, e) => {
|
|
8
8
|
for (var t in e || (e = {}))
|
|
9
9
|
Uf.call(e, t) && xm(i, t, e[t]);
|
|
10
10
|
if (gb)
|
|
@@ -11163,7 +11163,7 @@ function FC(i, e, t, n, s, l, a) {
|
|
|
11163
11163
|
je = vt.vertexShader, se = vt.fragmentShader;
|
|
11164
11164
|
} else
|
|
11165
11165
|
je = S.vertexShader, se = S.fragmentShader, c.update(S), Xe = c.getVertexShaderID(S), We = c.getFragmentShaderID(S);
|
|
11166
|
-
const Se = i.getRenderTarget(), Qe = w.isInstancedMesh === !0, st = w.isBatchedMesh === !0, qe = !!S.map, ht = !!S.matcap, M = !!E, fe = !!S.aoMap, ge = !!S.lightMap, Ce = !!S.bumpMap, ue = !!S.normalMap, re = !!S.displacementMap, ne = !!S.emissiveMap, oe = !!S.metalnessMap, F = !!S.roughnessMap, Y = S.anisotropy > 0, A = S.clearcoat > 0, le = S.dispersion > 0, de = S.iridescence > 0, pe = S.sheen > 0,
|
|
11166
|
+
const Se = i.getRenderTarget(), Qe = w.isInstancedMesh === !0, st = w.isBatchedMesh === !0, qe = !!S.map, ht = !!S.matcap, M = !!E, fe = !!S.aoMap, ge = !!S.lightMap, Ce = !!S.bumpMap, ue = !!S.normalMap, re = !!S.displacementMap, ne = !!S.emissiveMap, oe = !!S.metalnessMap, F = !!S.roughnessMap, Y = S.anisotropy > 0, A = S.clearcoat > 0, le = S.dispersion > 0, de = S.iridescence > 0, pe = S.sheen > 0, Ke = S.transmission > 0, ve = Y && !!S.anisotropyMap, ke = A && !!S.clearcoatMap, Ae = A && !!S.clearcoatNormalMap, xe = A && !!S.clearcoatRoughnessMap, ze = de && !!S.iridescenceMap, Gt = de && !!S.iridescenceThicknessMap, Ee = pe && !!S.sheenColorMap, Fe = pe && !!S.sheenRoughnessMap, et = !!S.specularMap, $e = !!S.specularColorMap, Wt = !!S.specularIntensityMap, B = Ke && !!S.transmissionMap, Ye = Ke && !!S.thicknessMap, D = !!S.gradientMap, Ze = !!S.alphaMap, Te = S.alphaTest > 0, tt = !!S.alphaHash, Rt = !!S.extensions;
|
|
11167
11167
|
let m0 = wi;
|
|
11168
11168
|
S.toneMapped && (Se === null || Se.isXRRenderTarget === !0) && (m0 = i.toneMapping);
|
|
11169
11169
|
const S0 = {
|
|
@@ -11204,12 +11204,12 @@ function FC(i, e, t, n, s, l, a) {
|
|
|
11204
11204
|
anisotropy: Y,
|
|
11205
11205
|
anisotropyMap: ve,
|
|
11206
11206
|
clearcoat: A,
|
|
11207
|
-
clearcoatMap:
|
|
11207
|
+
clearcoatMap: ke,
|
|
11208
11208
|
clearcoatNormalMap: Ae,
|
|
11209
11209
|
clearcoatRoughnessMap: xe,
|
|
11210
11210
|
dispersion: le,
|
|
11211
11211
|
iridescence: de,
|
|
11212
|
-
iridescenceMap:
|
|
11212
|
+
iridescenceMap: ze,
|
|
11213
11213
|
iridescenceThicknessMap: Gt,
|
|
11214
11214
|
sheen: pe,
|
|
11215
11215
|
sheenColorMap: Ee,
|
|
@@ -11217,7 +11217,7 @@ function FC(i, e, t, n, s, l, a) {
|
|
|
11217
11217
|
specularMap: et,
|
|
11218
11218
|
specularColorMap: $e,
|
|
11219
11219
|
specularIntensityMap: Wt,
|
|
11220
|
-
transmission:
|
|
11220
|
+
transmission: Ke,
|
|
11221
11221
|
transmissionMap: B,
|
|
11222
11222
|
thicknessMap: Ye,
|
|
11223
11223
|
gradientMap: D,
|
|
@@ -11237,10 +11237,10 @@ function FC(i, e, t, n, s, l, a) {
|
|
|
11237
11237
|
metalnessMapUv: oe && G(S.metalnessMap.channel),
|
|
11238
11238
|
roughnessMapUv: F && G(S.roughnessMap.channel),
|
|
11239
11239
|
anisotropyMapUv: ve && G(S.anisotropyMap.channel),
|
|
11240
|
-
clearcoatMapUv:
|
|
11240
|
+
clearcoatMapUv: ke && G(S.clearcoatMap.channel),
|
|
11241
11241
|
clearcoatNormalMapUv: Ae && G(S.clearcoatNormalMap.channel),
|
|
11242
11242
|
clearcoatRoughnessMapUv: xe && G(S.clearcoatRoughnessMap.channel),
|
|
11243
|
-
iridescenceMapUv:
|
|
11243
|
+
iridescenceMapUv: ze && G(S.iridescenceMap.channel),
|
|
11244
11244
|
iridescenceThicknessMapUv: Gt && G(S.iridescenceThicknessMap.channel),
|
|
11245
11245
|
sheenColorMapUv: Ee && G(S.sheenColorMap.channel),
|
|
11246
11246
|
sheenRoughnessMapUv: Fe && G(S.sheenRoughnessMap.channel),
|
|
@@ -12138,7 +12138,7 @@ function AC(i) {
|
|
|
12138
12138
|
console.error("THREE.WebGLState:", B);
|
|
12139
12139
|
}
|
|
12140
12140
|
}
|
|
12141
|
-
function
|
|
12141
|
+
function Ke() {
|
|
12142
12142
|
try {
|
|
12143
12143
|
i.texSubImage3D.apply(i, arguments);
|
|
12144
12144
|
} catch (B) {
|
|
@@ -12152,7 +12152,7 @@ function AC(i) {
|
|
|
12152
12152
|
console.error("THREE.WebGLState:", B);
|
|
12153
12153
|
}
|
|
12154
12154
|
}
|
|
12155
|
-
function
|
|
12155
|
+
function ke() {
|
|
12156
12156
|
try {
|
|
12157
12157
|
i.compressedTexSubImage3D.apply(i, arguments);
|
|
12158
12158
|
} catch (B) {
|
|
@@ -12173,7 +12173,7 @@ function AC(i) {
|
|
|
12173
12173
|
console.error("THREE.WebGLState:", B);
|
|
12174
12174
|
}
|
|
12175
12175
|
}
|
|
12176
|
-
function
|
|
12176
|
+
function ze() {
|
|
12177
12177
|
try {
|
|
12178
12178
|
i.texImage2D.apply(i, arguments);
|
|
12179
12179
|
} catch (B) {
|
|
@@ -12229,16 +12229,16 @@ function AC(i) {
|
|
|
12229
12229
|
unbindTexture: A,
|
|
12230
12230
|
compressedTexImage2D: le,
|
|
12231
12231
|
compressedTexImage3D: de,
|
|
12232
|
-
texImage2D:
|
|
12232
|
+
texImage2D: ze,
|
|
12233
12233
|
texImage3D: Gt,
|
|
12234
12234
|
updateUBOMapping: et,
|
|
12235
12235
|
uniformBlockBinding: $e,
|
|
12236
12236
|
texStorage2D: Ae,
|
|
12237
12237
|
texStorage3D: xe,
|
|
12238
12238
|
texSubImage2D: pe,
|
|
12239
|
-
texSubImage3D:
|
|
12239
|
+
texSubImage3D: Ke,
|
|
12240
12240
|
compressedTexSubImage2D: ve,
|
|
12241
|
-
compressedTexSubImage3D:
|
|
12241
|
+
compressedTexSubImage3D: ke,
|
|
12242
12242
|
scissor: Ee,
|
|
12243
12243
|
viewport: Fe,
|
|
12244
12244
|
reset: Wt
|
|
@@ -12385,10 +12385,10 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12385
12385
|
const de = oe(F);
|
|
12386
12386
|
if ((de.width > A || de.height > A) && (le = A / Math.max(de.width, de.height)), le < 1)
|
|
12387
12387
|
if (typeof HTMLImageElement != "undefined" && F instanceof HTMLImageElement || typeof HTMLCanvasElement != "undefined" && F instanceof HTMLCanvasElement || typeof ImageBitmap != "undefined" && F instanceof ImageBitmap || typeof VideoFrame != "undefined" && F instanceof VideoFrame) {
|
|
12388
|
-
const pe = Math.floor(le * de.width),
|
|
12389
|
-
r === void 0 && (r = b(pe,
|
|
12390
|
-
const ve = Y ? b(pe,
|
|
12391
|
-
return ve.width = pe, ve.height =
|
|
12388
|
+
const pe = Math.floor(le * de.width), Ke = Math.floor(le * de.height);
|
|
12389
|
+
r === void 0 && (r = b(pe, Ke));
|
|
12390
|
+
const ve = Y ? b(pe, Ke) : r;
|
|
12391
|
+
return ve.width = pe, ve.height = Ke, ve.getContext("2d").drawImage(F, 0, 0, pe, Ke), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + de.width + "x" + de.height + ") to (" + pe + "x" + Ke + ")."), ve;
|
|
12392
12392
|
} else
|
|
12393
12393
|
return "data" in F && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + de.width + "x" + de.height + ")."), F;
|
|
12394
12394
|
return F;
|
|
@@ -12406,8 +12406,8 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12406
12406
|
}
|
|
12407
12407
|
let pe = Y;
|
|
12408
12408
|
if (Y === i.RED && (A === i.FLOAT && (pe = i.R32F), A === i.HALF_FLOAT && (pe = i.R16F), A === i.UNSIGNED_BYTE && (pe = i.R8)), Y === i.RED_INTEGER && (A === i.UNSIGNED_BYTE && (pe = i.R8UI), A === i.UNSIGNED_SHORT && (pe = i.R16UI), A === i.UNSIGNED_INT && (pe = i.R32UI), A === i.BYTE && (pe = i.R8I), A === i.SHORT && (pe = i.R16I), A === i.INT && (pe = i.R32I)), Y === i.RG && (A === i.FLOAT && (pe = i.RG32F), A === i.HALF_FLOAT && (pe = i.RG16F), A === i.UNSIGNED_BYTE && (pe = i.RG8)), Y === i.RG_INTEGER && (A === i.UNSIGNED_BYTE && (pe = i.RG8UI), A === i.UNSIGNED_SHORT && (pe = i.RG16UI), A === i.UNSIGNED_INT && (pe = i.RG32UI), A === i.BYTE && (pe = i.RG8I), A === i.SHORT && (pe = i.RG16I), A === i.INT && (pe = i.RG32I)), Y === i.RGB && A === i.UNSIGNED_INT_5_9_9_9_REV && (pe = i.RGB9_E5), Y === i.RGBA) {
|
|
12409
|
-
const
|
|
12410
|
-
A === i.FLOAT && (pe = i.RGBA32F), A === i.HALF_FLOAT && (pe = i.RGBA16F), A === i.UNSIGNED_BYTE && (pe =
|
|
12409
|
+
const Ke = de ? ic : It.getTransfer(le);
|
|
12410
|
+
A === i.FLOAT && (pe = i.RGBA32F), A === i.HALF_FLOAT && (pe = i.RGBA16F), A === i.UNSIGNED_BYTE && (pe = Ke === $t ? i.SRGB8_ALPHA8 : i.RGBA8), A === i.UNSIGNED_SHORT_4_4_4_4 && (pe = i.RGBA4), A === i.UNSIGNED_SHORT_5_5_5_1 && (pe = i.RGB5_A1);
|
|
12411
12411
|
}
|
|
12412
12412
|
return (pe === i.R16F || pe === i.R32F || pe === i.RG16F || pe === i.RG32F || pe === i.RGBA16F || pe === i.RGBA32F) && e.get("EXT_color_buffer_float"), pe;
|
|
12413
12413
|
}
|
|
@@ -12562,8 +12562,8 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12562
12562
|
texture: i.createTexture(),
|
|
12563
12563
|
usedTimes: 0
|
|
12564
12564
|
}, a.memory.textures++, A = !0), de[pe].usedTimes++;
|
|
12565
|
-
const
|
|
12566
|
-
|
|
12565
|
+
const Ke = de[F.__cacheKey];
|
|
12566
|
+
Ke !== void 0 && (de[F.__cacheKey].usedTimes--, Ke.usedTimes === 0 && I(Y)), F.__cacheKey = pe, F.__webglTexture = de[pe].texture;
|
|
12567
12567
|
}
|
|
12568
12568
|
return A;
|
|
12569
12569
|
}
|
|
@@ -12572,34 +12572,34 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12572
12572
|
(Y.isDataArrayTexture || Y.isCompressedArrayTexture) && (le = i.TEXTURE_2D_ARRAY), Y.isData3DTexture && (le = i.TEXTURE_3D);
|
|
12573
12573
|
const de = Ue(F, Y), pe = Y.source;
|
|
12574
12574
|
t.bindTexture(le, F.__webglTexture, i.TEXTURE0 + A);
|
|
12575
|
-
const
|
|
12576
|
-
if (pe.version !==
|
|
12575
|
+
const Ke = n.get(pe);
|
|
12576
|
+
if (pe.version !== Ke.__version || de === !0) {
|
|
12577
12577
|
t.activeTexture(i.TEXTURE0 + A);
|
|
12578
|
-
const ve = It.getPrimaries(It.workingColorSpace),
|
|
12578
|
+
const ve = It.getPrimaries(It.workingColorSpace), ke = Y.colorSpace === dn ? null : It.getPrimaries(Y.colorSpace), Ae = Y.colorSpace === dn || ve === ke ? i.NONE : i.BROWSER_DEFAULT_WEBGL;
|
|
12579
12579
|
i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL, Y.flipY), i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, Y.premultiplyAlpha), i.pixelStorei(i.UNPACK_ALIGNMENT, Y.unpackAlignment), i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL, Ae);
|
|
12580
12580
|
let xe = G(Y.image, !1, s.maxTextureSize);
|
|
12581
12581
|
xe = ne(Y, xe);
|
|
12582
|
-
const
|
|
12583
|
-
let Ee = X(Y.internalFormat,
|
|
12582
|
+
const ze = l.convert(Y.format, Y.colorSpace), Gt = l.convert(Y.type);
|
|
12583
|
+
let Ee = X(Y.internalFormat, ze, Gt, Y.colorSpace, Y.isVideoTexture);
|
|
12584
12584
|
Ve(le, Y);
|
|
12585
12585
|
let Fe;
|
|
12586
|
-
const et = Y.mipmaps, $e = Y.isVideoTexture !== !0, Wt =
|
|
12586
|
+
const et = Y.mipmaps, $e = Y.isVideoTexture !== !0, Wt = Ke.__version === void 0 || de === !0, B = pe.dataReady, Ye = W(Y, xe);
|
|
12587
12587
|
if (Y.isDepthTexture)
|
|
12588
|
-
Ee = y(Y.format === Gs, Y.type), Wt && ($e ? t.texStorage2D(i.TEXTURE_2D, 1, Ee, xe.width, xe.height) : t.texImage2D(i.TEXTURE_2D, 0, Ee, xe.width, xe.height, 0,
|
|
12588
|
+
Ee = y(Y.format === Gs, Y.type), Wt && ($e ? t.texStorage2D(i.TEXTURE_2D, 1, Ee, xe.width, xe.height) : t.texImage2D(i.TEXTURE_2D, 0, Ee, xe.width, xe.height, 0, ze, Gt, null));
|
|
12589
12589
|
else if (Y.isDataTexture)
|
|
12590
12590
|
if (et.length > 0) {
|
|
12591
12591
|
$e && Wt && t.texStorage2D(i.TEXTURE_2D, Ye, Ee, et[0].width, et[0].height);
|
|
12592
12592
|
for (let D = 0, Ze = et.length; D < Ze; D++)
|
|
12593
|
-
Fe = et[D], $e ? B && t.texSubImage2D(i.TEXTURE_2D, D, 0, 0, Fe.width, Fe.height,
|
|
12593
|
+
Fe = et[D], $e ? B && t.texSubImage2D(i.TEXTURE_2D, D, 0, 0, Fe.width, Fe.height, ze, Gt, Fe.data) : t.texImage2D(i.TEXTURE_2D, D, Ee, Fe.width, Fe.height, 0, ze, Gt, Fe.data);
|
|
12594
12594
|
Y.generateMipmaps = !1;
|
|
12595
12595
|
} else
|
|
12596
|
-
$e ? (Wt && t.texStorage2D(i.TEXTURE_2D, Ye, Ee, xe.width, xe.height), B && t.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, xe.width, xe.height,
|
|
12596
|
+
$e ? (Wt && t.texStorage2D(i.TEXTURE_2D, Ye, Ee, xe.width, xe.height), B && t.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, xe.width, xe.height, ze, Gt, xe.data)) : t.texImage2D(i.TEXTURE_2D, 0, Ee, xe.width, xe.height, 0, ze, Gt, xe.data);
|
|
12597
12597
|
else if (Y.isCompressedTexture)
|
|
12598
12598
|
if (Y.isCompressedArrayTexture) {
|
|
12599
12599
|
$e && Wt && t.texStorage3D(i.TEXTURE_2D_ARRAY, Ye, Ee, et[0].width, et[0].height, xe.depth);
|
|
12600
12600
|
for (let D = 0, Ze = et.length; D < Ze; D++)
|
|
12601
12601
|
if (Fe = et[D], Y.format !== x0)
|
|
12602
|
-
if (
|
|
12602
|
+
if (ze !== null)
|
|
12603
12603
|
if ($e) {
|
|
12604
12604
|
if (B)
|
|
12605
12605
|
if (Y.layerUpdates.size > 0) {
|
|
@@ -12609,21 +12609,21 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12609
12609
|
tt * Te / Fe.data.BYTES_PER_ELEMENT,
|
|
12610
12610
|
(tt + 1) * Te / Fe.data.BYTES_PER_ELEMENT
|
|
12611
12611
|
);
|
|
12612
|
-
t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY, D, 0, 0, tt, Fe.width, Fe.height, 1,
|
|
12612
|
+
t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY, D, 0, 0, tt, Fe.width, Fe.height, 1, ze, Rt, 0, 0);
|
|
12613
12613
|
}
|
|
12614
12614
|
Y.clearLayerUpdates();
|
|
12615
12615
|
} else
|
|
12616
|
-
t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY, D, 0, 0, 0, Fe.width, Fe.height, xe.depth,
|
|
12616
|
+
t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY, D, 0, 0, 0, Fe.width, Fe.height, xe.depth, ze, Fe.data, 0, 0);
|
|
12617
12617
|
} else
|
|
12618
12618
|
t.compressedTexImage3D(i.TEXTURE_2D_ARRAY, D, Ee, Fe.width, Fe.height, xe.depth, 0, Fe.data, 0, 0);
|
|
12619
12619
|
else
|
|
12620
12620
|
console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
|
|
12621
12621
|
else
|
|
12622
|
-
$e ? B && t.texSubImage3D(i.TEXTURE_2D_ARRAY, D, 0, 0, 0, Fe.width, Fe.height, xe.depth,
|
|
12622
|
+
$e ? B && t.texSubImage3D(i.TEXTURE_2D_ARRAY, D, 0, 0, 0, Fe.width, Fe.height, xe.depth, ze, Gt, Fe.data) : t.texImage3D(i.TEXTURE_2D_ARRAY, D, Ee, Fe.width, Fe.height, xe.depth, 0, ze, Gt, Fe.data);
|
|
12623
12623
|
} else {
|
|
12624
12624
|
$e && Wt && t.texStorage2D(i.TEXTURE_2D, Ye, Ee, et[0].width, et[0].height);
|
|
12625
12625
|
for (let D = 0, Ze = et.length; D < Ze; D++)
|
|
12626
|
-
Fe = et[D], Y.format !== x0 ?
|
|
12626
|
+
Fe = et[D], Y.format !== x0 ? ze !== null ? $e ? B && t.compressedTexSubImage2D(i.TEXTURE_2D, D, 0, 0, Fe.width, Fe.height, ze, Fe.data) : t.compressedTexImage2D(i.TEXTURE_2D, D, Ee, Fe.width, Fe.height, 0, Fe.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : $e ? B && t.texSubImage2D(i.TEXTURE_2D, D, 0, 0, Fe.width, Fe.height, ze, Gt, Fe.data) : t.texImage2D(i.TEXTURE_2D, D, Ee, Fe.width, Fe.height, 0, ze, Gt, Fe.data);
|
|
12627
12627
|
}
|
|
12628
12628
|
else if (Y.isDataArrayTexture)
|
|
12629
12629
|
if ($e) {
|
|
@@ -12635,15 +12635,15 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12635
12635
|
Ze * D / xe.data.BYTES_PER_ELEMENT,
|
|
12636
12636
|
(Ze + 1) * D / xe.data.BYTES_PER_ELEMENT
|
|
12637
12637
|
);
|
|
12638
|
-
t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, Ze, xe.width, xe.height, 1,
|
|
12638
|
+
t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, Ze, xe.width, xe.height, 1, ze, Gt, Te);
|
|
12639
12639
|
}
|
|
12640
12640
|
Y.clearLayerUpdates();
|
|
12641
12641
|
} else
|
|
12642
|
-
t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, 0, xe.width, xe.height, xe.depth,
|
|
12642
|
+
t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, 0, xe.width, xe.height, xe.depth, ze, Gt, xe.data);
|
|
12643
12643
|
} else
|
|
12644
|
-
t.texImage3D(i.TEXTURE_2D_ARRAY, 0, Ee, xe.width, xe.height, xe.depth, 0,
|
|
12644
|
+
t.texImage3D(i.TEXTURE_2D_ARRAY, 0, Ee, xe.width, xe.height, xe.depth, 0, ze, Gt, xe.data);
|
|
12645
12645
|
else if (Y.isData3DTexture)
|
|
12646
|
-
$e ? (Wt && t.texStorage3D(i.TEXTURE_3D, Ye, Ee, xe.width, xe.height, xe.depth), B && t.texSubImage3D(i.TEXTURE_3D, 0, 0, 0, 0, xe.width, xe.height, xe.depth,
|
|
12646
|
+
$e ? (Wt && t.texStorage3D(i.TEXTURE_3D, Ye, Ee, xe.width, xe.height, xe.depth), B && t.texSubImage3D(i.TEXTURE_3D, 0, 0, 0, 0, xe.width, xe.height, xe.depth, ze, Gt, xe.data)) : t.texImage3D(i.TEXTURE_3D, 0, Ee, xe.width, xe.height, xe.depth, 0, ze, Gt, xe.data);
|
|
12647
12647
|
else if (Y.isFramebufferTexture) {
|
|
12648
12648
|
if (Wt)
|
|
12649
12649
|
if ($e)
|
|
@@ -12651,7 +12651,7 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12651
12651
|
else {
|
|
12652
12652
|
let D = xe.width, Ze = xe.height;
|
|
12653
12653
|
for (let Te = 0; Te < Ye; Te++)
|
|
12654
|
-
t.texImage2D(i.TEXTURE_2D, Te, Ee, D, Ze, 0,
|
|
12654
|
+
t.texImage2D(i.TEXTURE_2D, Te, Ee, D, Ze, 0, ze, Gt, null), D >>= 1, Ze >>= 1;
|
|
12655
12655
|
}
|
|
12656
12656
|
} else if (et.length > 0) {
|
|
12657
12657
|
if ($e && Wt) {
|
|
@@ -12659,17 +12659,17 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12659
12659
|
t.texStorage2D(i.TEXTURE_2D, Ye, Ee, D.width, D.height);
|
|
12660
12660
|
}
|
|
12661
12661
|
for (let D = 0, Ze = et.length; D < Ze; D++)
|
|
12662
|
-
Fe = et[D], $e ? B && t.texSubImage2D(i.TEXTURE_2D, D, 0, 0,
|
|
12662
|
+
Fe = et[D], $e ? B && t.texSubImage2D(i.TEXTURE_2D, D, 0, 0, ze, Gt, Fe) : t.texImage2D(i.TEXTURE_2D, D, Ee, ze, Gt, Fe);
|
|
12663
12663
|
Y.generateMipmaps = !1;
|
|
12664
12664
|
} else if ($e) {
|
|
12665
12665
|
if (Wt) {
|
|
12666
12666
|
const D = oe(xe);
|
|
12667
12667
|
t.texStorage2D(i.TEXTURE_2D, Ye, Ee, D.width, D.height);
|
|
12668
12668
|
}
|
|
12669
|
-
B && t.texSubImage2D(i.TEXTURE_2D, 0, 0, 0,
|
|
12669
|
+
B && t.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, ze, Gt, xe);
|
|
12670
12670
|
} else
|
|
12671
|
-
t.texImage2D(i.TEXTURE_2D, 0, Ee,
|
|
12672
|
-
Z(Y) && p(le),
|
|
12671
|
+
t.texImage2D(i.TEXTURE_2D, 0, Ee, ze, Gt, xe);
|
|
12672
|
+
Z(Y) && p(le), Ke.__version = pe.version, Y.onUpdate && Y.onUpdate(Y);
|
|
12673
12673
|
}
|
|
12674
12674
|
F.__version = Y.version;
|
|
12675
12675
|
}
|
|
@@ -12680,19 +12680,19 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12680
12680
|
const pe = n.get(de);
|
|
12681
12681
|
if (de.version !== pe.__version || le === !0) {
|
|
12682
12682
|
t.activeTexture(i.TEXTURE0 + A);
|
|
12683
|
-
const
|
|
12684
|
-
i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL, Y.flipY), i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, Y.premultiplyAlpha), i.pixelStorei(i.UNPACK_ALIGNMENT, Y.unpackAlignment), i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,
|
|
12685
|
-
const Ae = Y.isCompressedTexture || Y.image[0].isCompressedTexture, xe = Y.image[0] && Y.image[0].isDataTexture,
|
|
12683
|
+
const Ke = It.getPrimaries(It.workingColorSpace), ve = Y.colorSpace === dn ? null : It.getPrimaries(Y.colorSpace), ke = Y.colorSpace === dn || Ke === ve ? i.NONE : i.BROWSER_DEFAULT_WEBGL;
|
|
12684
|
+
i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL, Y.flipY), i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, Y.premultiplyAlpha), i.pixelStorei(i.UNPACK_ALIGNMENT, Y.unpackAlignment), i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL, ke);
|
|
12685
|
+
const Ae = Y.isCompressedTexture || Y.image[0].isCompressedTexture, xe = Y.image[0] && Y.image[0].isDataTexture, ze = [];
|
|
12686
12686
|
for (let Ze = 0; Ze < 6; Ze++)
|
|
12687
|
-
!Ae && !xe ?
|
|
12688
|
-
const Gt =
|
|
12687
|
+
!Ae && !xe ? ze[Ze] = G(Y.image[Ze], !0, s.maxCubemapSize) : ze[Ze] = xe ? Y.image[Ze].image : Y.image[Ze], ze[Ze] = ne(Y, ze[Ze]);
|
|
12688
|
+
const Gt = ze[0], Ee = l.convert(Y.format, Y.colorSpace), Fe = l.convert(Y.type), et = X(Y.internalFormat, Ee, Fe, Y.colorSpace), $e = Y.isVideoTexture !== !0, Wt = pe.__version === void 0 || le === !0, B = de.dataReady;
|
|
12689
12689
|
let Ye = W(Y, Gt);
|
|
12690
12690
|
Ve(i.TEXTURE_CUBE_MAP, Y);
|
|
12691
12691
|
let D;
|
|
12692
12692
|
if (Ae) {
|
|
12693
12693
|
$e && Wt && t.texStorage2D(i.TEXTURE_CUBE_MAP, Ye, et, Gt.width, Gt.height);
|
|
12694
12694
|
for (let Ze = 0; Ze < 6; Ze++) {
|
|
12695
|
-
D =
|
|
12695
|
+
D = ze[Ze].mipmaps;
|
|
12696
12696
|
for (let Te = 0; Te < D.length; Te++) {
|
|
12697
12697
|
const tt = D[Te];
|
|
12698
12698
|
Y.format !== x0 ? Ee !== null ? $e ? B && t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te, 0, 0, tt.width, tt.height, Ee, tt.data) : t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te, et, tt.width, tt.height, 0, tt.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : $e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te, 0, 0, tt.width, tt.height, Ee, Fe, tt.data) : t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te, et, tt.width, tt.height, 0, Ee, Fe, tt.data);
|
|
@@ -12701,18 +12701,18 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12701
12701
|
} else {
|
|
12702
12702
|
if (D = Y.mipmaps, $e && Wt) {
|
|
12703
12703
|
D.length > 0 && Ye++;
|
|
12704
|
-
const Ze = oe(
|
|
12704
|
+
const Ze = oe(ze[0]);
|
|
12705
12705
|
t.texStorage2D(i.TEXTURE_CUBE_MAP, Ye, et, Ze.width, Ze.height);
|
|
12706
12706
|
}
|
|
12707
12707
|
for (let Ze = 0; Ze < 6; Ze++)
|
|
12708
12708
|
if (xe) {
|
|
12709
|
-
$e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, 0, 0, 0,
|
|
12709
|
+
$e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, 0, 0, 0, ze[Ze].width, ze[Ze].height, Ee, Fe, ze[Ze].data) : t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, 0, et, ze[Ze].width, ze[Ze].height, 0, Ee, Fe, ze[Ze].data);
|
|
12710
12710
|
for (let Te = 0; Te < D.length; Te++) {
|
|
12711
12711
|
const Rt = D[Te].image[Ze].image;
|
|
12712
12712
|
$e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te + 1, 0, 0, Rt.width, Rt.height, Ee, Fe, Rt.data) : t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te + 1, et, Rt.width, Rt.height, 0, Ee, Fe, Rt.data);
|
|
12713
12713
|
}
|
|
12714
12714
|
} else {
|
|
12715
|
-
$e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, 0, 0, 0, Ee, Fe,
|
|
12715
|
+
$e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, 0, 0, 0, Ee, Fe, ze[Ze]) : t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, 0, et, Ee, Fe, ze[Ze]);
|
|
12716
12716
|
for (let Te = 0; Te < D.length; Te++) {
|
|
12717
12717
|
const tt = D[Te];
|
|
12718
12718
|
$e ? B && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te + 1, 0, 0, Ee, Fe, tt.image[Ze]) : t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ze, Te + 1, et, Ee, Fe, tt.image[Ze]);
|
|
@@ -12724,22 +12724,22 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12724
12724
|
F.__version = Y.version;
|
|
12725
12725
|
}
|
|
12726
12726
|
function Xe(F, Y, A, le, de, pe) {
|
|
12727
|
-
const
|
|
12727
|
+
const Ke = l.convert(A.format, A.colorSpace), ve = l.convert(A.type), ke = X(A.internalFormat, Ke, ve, A.colorSpace);
|
|
12728
12728
|
if (!n.get(Y).__hasExternalTextures) {
|
|
12729
|
-
const xe = Math.max(1, Y.width >> pe),
|
|
12730
|
-
de === i.TEXTURE_3D || de === i.TEXTURE_2D_ARRAY ? t.texImage3D(de, pe,
|
|
12729
|
+
const xe = Math.max(1, Y.width >> pe), ze = Math.max(1, Y.height >> pe);
|
|
12730
|
+
de === i.TEXTURE_3D || de === i.TEXTURE_2D_ARRAY ? t.texImage3D(de, pe, ke, xe, ze, Y.depth, 0, Ke, ve, null) : t.texImage2D(de, pe, ke, xe, ze, 0, Ke, ve, null);
|
|
12731
12731
|
}
|
|
12732
12732
|
t.bindFramebuffer(i.FRAMEBUFFER, F), ue(Y) ? o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER, le, de, n.get(A).__webglTexture, 0, Ce(Y)) : (de === i.TEXTURE_2D || de >= i.TEXTURE_CUBE_MAP_POSITIVE_X && de <= i.TEXTURE_CUBE_MAP_NEGATIVE_Z) && i.framebufferTexture2D(i.FRAMEBUFFER, le, de, n.get(A).__webglTexture, pe), t.bindFramebuffer(i.FRAMEBUFFER, null);
|
|
12733
12733
|
}
|
|
12734
12734
|
function We(F, Y, A) {
|
|
12735
12735
|
if (i.bindRenderbuffer(i.RENDERBUFFER, F), Y.depthBuffer) {
|
|
12736
|
-
const le = Y.depthTexture, de = le && le.isDepthTexture ? le.type : null, pe = y(Y.stencilBuffer, de),
|
|
12737
|
-
ue(Y) ? o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER, ve, pe, Y.width, Y.height) : A ? i.renderbufferStorageMultisample(i.RENDERBUFFER, ve, pe, Y.width, Y.height) : i.renderbufferStorage(i.RENDERBUFFER, pe, Y.width, Y.height), i.framebufferRenderbuffer(i.FRAMEBUFFER,
|
|
12736
|
+
const le = Y.depthTexture, de = le && le.isDepthTexture ? le.type : null, pe = y(Y.stencilBuffer, de), Ke = Y.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT, ve = Ce(Y);
|
|
12737
|
+
ue(Y) ? o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER, ve, pe, Y.width, Y.height) : A ? i.renderbufferStorageMultisample(i.RENDERBUFFER, ve, pe, Y.width, Y.height) : i.renderbufferStorage(i.RENDERBUFFER, pe, Y.width, Y.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, Ke, i.RENDERBUFFER, F);
|
|
12738
12738
|
} else {
|
|
12739
12739
|
const le = Y.textures;
|
|
12740
12740
|
for (let de = 0; de < le.length; de++) {
|
|
12741
|
-
const pe = le[de],
|
|
12742
|
-
A && ue(Y) === !1 ? i.renderbufferStorageMultisample(i.RENDERBUFFER, Ae,
|
|
12741
|
+
const pe = le[de], Ke = l.convert(pe.format, pe.colorSpace), ve = l.convert(pe.type), ke = X(pe.internalFormat, Ke, ve, pe.colorSpace), Ae = Ce(Y);
|
|
12742
|
+
A && ue(Y) === !1 ? i.renderbufferStorageMultisample(i.RENDERBUFFER, Ae, ke, Y.width, Y.height) : ue(Y) ? o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER, Ae, ke, Y.width, Y.height) : i.renderbufferStorage(i.RENDERBUFFER, ke, Y.width, Y.height);
|
|
12743
12743
|
}
|
|
12744
12744
|
}
|
|
12745
12745
|
i.bindRenderbuffer(i.RENDERBUFFER, null);
|
|
@@ -12777,14 +12777,14 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12777
12777
|
function qe(F) {
|
|
12778
12778
|
const Y = F.texture, A = n.get(F), le = n.get(Y);
|
|
12779
12779
|
F.addEventListener("dispose", g);
|
|
12780
|
-
const de = F.textures, pe = F.isWebGLCubeRenderTarget === !0,
|
|
12781
|
-
if (
|
|
12780
|
+
const de = F.textures, pe = F.isWebGLCubeRenderTarget === !0, Ke = de.length > 1;
|
|
12781
|
+
if (Ke || (le.__webglTexture === void 0 && (le.__webglTexture = i.createTexture()), le.__version = Y.version, a.memory.textures++), pe) {
|
|
12782
12782
|
A.__webglFramebuffer = [];
|
|
12783
12783
|
for (let ve = 0; ve < 6; ve++)
|
|
12784
12784
|
if (Y.mipmaps && Y.mipmaps.length > 0) {
|
|
12785
12785
|
A.__webglFramebuffer[ve] = [];
|
|
12786
|
-
for (let
|
|
12787
|
-
A.__webglFramebuffer[ve][
|
|
12786
|
+
for (let ke = 0; ke < Y.mipmaps.length; ke++)
|
|
12787
|
+
A.__webglFramebuffer[ve][ke] = i.createFramebuffer();
|
|
12788
12788
|
} else
|
|
12789
12789
|
A.__webglFramebuffer[ve] = i.createFramebuffer();
|
|
12790
12790
|
} else {
|
|
@@ -12794,18 +12794,18 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12794
12794
|
A.__webglFramebuffer[ve] = i.createFramebuffer();
|
|
12795
12795
|
} else
|
|
12796
12796
|
A.__webglFramebuffer = i.createFramebuffer();
|
|
12797
|
-
if (
|
|
12798
|
-
for (let ve = 0,
|
|
12797
|
+
if (Ke)
|
|
12798
|
+
for (let ve = 0, ke = de.length; ve < ke; ve++) {
|
|
12799
12799
|
const Ae = n.get(de[ve]);
|
|
12800
12800
|
Ae.__webglTexture === void 0 && (Ae.__webglTexture = i.createTexture(), a.memory.textures++);
|
|
12801
12801
|
}
|
|
12802
12802
|
if (F.samples > 0 && ue(F) === !1) {
|
|
12803
12803
|
A.__webglMultisampledFramebuffer = i.createFramebuffer(), A.__webglColorRenderbuffer = [], t.bindFramebuffer(i.FRAMEBUFFER, A.__webglMultisampledFramebuffer);
|
|
12804
12804
|
for (let ve = 0; ve < de.length; ve++) {
|
|
12805
|
-
const
|
|
12805
|
+
const ke = de[ve];
|
|
12806
12806
|
A.__webglColorRenderbuffer[ve] = i.createRenderbuffer(), i.bindRenderbuffer(i.RENDERBUFFER, A.__webglColorRenderbuffer[ve]);
|
|
12807
|
-
const Ae = l.convert(
|
|
12808
|
-
i.renderbufferStorageMultisample(i.RENDERBUFFER, Gt,
|
|
12807
|
+
const Ae = l.convert(ke.format, ke.colorSpace), xe = l.convert(ke.type), ze = X(ke.internalFormat, Ae, xe, ke.colorSpace, F.isXRRenderTarget === !0), Gt = Ce(F);
|
|
12808
|
+
i.renderbufferStorageMultisample(i.RENDERBUFFER, Gt, ze, F.width, F.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + ve, i.RENDERBUFFER, A.__webglColorRenderbuffer[ve]);
|
|
12809
12809
|
}
|
|
12810
12810
|
i.bindRenderbuffer(i.RENDERBUFFER, null), F.depthBuffer && (A.__webglDepthRenderbuffer = i.createRenderbuffer(), We(A.__webglDepthRenderbuffer, F, !0)), t.bindFramebuffer(i.FRAMEBUFFER, null);
|
|
12811
12811
|
}
|
|
@@ -12814,13 +12814,13 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12814
12814
|
t.bindTexture(i.TEXTURE_CUBE_MAP, le.__webglTexture), Ve(i.TEXTURE_CUBE_MAP, Y);
|
|
12815
12815
|
for (let ve = 0; ve < 6; ve++)
|
|
12816
12816
|
if (Y.mipmaps && Y.mipmaps.length > 0)
|
|
12817
|
-
for (let
|
|
12818
|
-
Xe(A.__webglFramebuffer[ve][
|
|
12817
|
+
for (let ke = 0; ke < Y.mipmaps.length; ke++)
|
|
12818
|
+
Xe(A.__webglFramebuffer[ve][ke], F, Y, i.COLOR_ATTACHMENT0, i.TEXTURE_CUBE_MAP_POSITIVE_X + ve, ke);
|
|
12819
12819
|
else
|
|
12820
12820
|
Xe(A.__webglFramebuffer[ve], F, Y, i.COLOR_ATTACHMENT0, i.TEXTURE_CUBE_MAP_POSITIVE_X + ve, 0);
|
|
12821
12821
|
Z(Y) && p(i.TEXTURE_CUBE_MAP), t.unbindTexture();
|
|
12822
|
-
} else if (
|
|
12823
|
-
for (let ve = 0,
|
|
12822
|
+
} else if (Ke) {
|
|
12823
|
+
for (let ve = 0, ke = de.length; ve < ke; ve++) {
|
|
12824
12824
|
const Ae = de[ve], xe = n.get(Ae);
|
|
12825
12825
|
t.bindTexture(i.TEXTURE_2D, xe.__webglTexture), Ve(i.TEXTURE_2D, Ae), Xe(A.__webglFramebuffer, F, Ae, i.COLOR_ATTACHMENT0 + ve, i.TEXTURE_2D, 0), Z(Ae) && p(i.TEXTURE_2D);
|
|
12826
12826
|
}
|
|
@@ -12828,8 +12828,8 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12828
12828
|
} else {
|
|
12829
12829
|
let ve = i.TEXTURE_2D;
|
|
12830
12830
|
if ((F.isWebGL3DRenderTarget || F.isWebGLArrayRenderTarget) && (ve = F.isWebGL3DRenderTarget ? i.TEXTURE_3D : i.TEXTURE_2D_ARRAY), t.bindTexture(ve, le.__webglTexture), Ve(ve, Y), Y.mipmaps && Y.mipmaps.length > 0)
|
|
12831
|
-
for (let
|
|
12832
|
-
Xe(A.__webglFramebuffer[
|
|
12831
|
+
for (let ke = 0; ke < Y.mipmaps.length; ke++)
|
|
12832
|
+
Xe(A.__webglFramebuffer[ke], F, Y, i.COLOR_ATTACHMENT0, ve, ke);
|
|
12833
12833
|
else
|
|
12834
12834
|
Xe(A.__webglFramebuffer, F, Y, i.COLOR_ATTACHMENT0, ve, 0);
|
|
12835
12835
|
Z(Y) && p(ve), t.unbindTexture();
|
|
@@ -12841,8 +12841,8 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12841
12841
|
for (let A = 0, le = Y.length; A < le; A++) {
|
|
12842
12842
|
const de = Y[A];
|
|
12843
12843
|
if (Z(de)) {
|
|
12844
|
-
const pe = F.isWebGLCubeRenderTarget ? i.TEXTURE_CUBE_MAP : i.TEXTURE_2D,
|
|
12845
|
-
t.bindTexture(pe,
|
|
12844
|
+
const pe = F.isWebGLCubeRenderTarget ? i.TEXTURE_CUBE_MAP : i.TEXTURE_2D, Ke = n.get(de).__webglTexture;
|
|
12845
|
+
t.bindTexture(pe, Ke), p(pe), t.unbindTexture();
|
|
12846
12846
|
}
|
|
12847
12847
|
}
|
|
12848
12848
|
}
|
|
@@ -12852,26 +12852,26 @@ function eY(i, e, t, n, s, l, a) {
|
|
|
12852
12852
|
if (ue(F) === !1) {
|
|
12853
12853
|
const Y = F.textures, A = F.width, le = F.height;
|
|
12854
12854
|
let de = i.COLOR_BUFFER_BIT;
|
|
12855
|
-
const pe = F.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT,
|
|
12855
|
+
const pe = F.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT, Ke = n.get(F), ve = Y.length > 1;
|
|
12856
12856
|
if (ve)
|
|
12857
|
-
for (let
|
|
12858
|
-
t.bindFramebuffer(i.FRAMEBUFFER,
|
|
12859
|
-
t.bindFramebuffer(i.READ_FRAMEBUFFER,
|
|
12860
|
-
for (let
|
|
12857
|
+
for (let ke = 0; ke < Y.length; ke++)
|
|
12858
|
+
t.bindFramebuffer(i.FRAMEBUFFER, Ke.__webglMultisampledFramebuffer), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + ke, i.RENDERBUFFER, null), t.bindFramebuffer(i.FRAMEBUFFER, Ke.__webglFramebuffer), i.framebufferTexture2D(i.DRAW_FRAMEBUFFER, i.COLOR_ATTACHMENT0 + ke, i.TEXTURE_2D, null, 0);
|
|
12859
|
+
t.bindFramebuffer(i.READ_FRAMEBUFFER, Ke.__webglMultisampledFramebuffer), t.bindFramebuffer(i.DRAW_FRAMEBUFFER, Ke.__webglFramebuffer);
|
|
12860
|
+
for (let ke = 0; ke < Y.length; ke++) {
|
|
12861
12861
|
if (F.resolveDepthBuffer && (F.depthBuffer && (de |= i.DEPTH_BUFFER_BIT), F.stencilBuffer && F.resolveStencilBuffer && (de |= i.STENCIL_BUFFER_BIT)), ve) {
|
|
12862
|
-
i.framebufferRenderbuffer(i.READ_FRAMEBUFFER, i.COLOR_ATTACHMENT0, i.RENDERBUFFER,
|
|
12863
|
-
const Ae = n.get(Y[
|
|
12862
|
+
i.framebufferRenderbuffer(i.READ_FRAMEBUFFER, i.COLOR_ATTACHMENT0, i.RENDERBUFFER, Ke.__webglColorRenderbuffer[ke]);
|
|
12863
|
+
const Ae = n.get(Y[ke]).__webglTexture;
|
|
12864
12864
|
i.framebufferTexture2D(i.DRAW_FRAMEBUFFER, i.COLOR_ATTACHMENT0, i.TEXTURE_2D, Ae, 0);
|
|
12865
12865
|
}
|
|
12866
|
-
i.blitFramebuffer(0, 0, A, le, 0, 0, A, le, de, i.NEAREST), c === !0 && (M.length = 0, fe.length = 0, M.push(i.COLOR_ATTACHMENT0 +
|
|
12866
|
+
i.blitFramebuffer(0, 0, A, le, 0, 0, A, le, de, i.NEAREST), c === !0 && (M.length = 0, fe.length = 0, M.push(i.COLOR_ATTACHMENT0 + ke), F.depthBuffer && F.resolveDepthBuffer === !1 && (M.push(pe), fe.push(pe), i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER, fe)), i.invalidateFramebuffer(i.READ_FRAMEBUFFER, M));
|
|
12867
12867
|
}
|
|
12868
12868
|
if (t.bindFramebuffer(i.READ_FRAMEBUFFER, null), t.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), ve)
|
|
12869
|
-
for (let
|
|
12870
|
-
t.bindFramebuffer(i.FRAMEBUFFER,
|
|
12871
|
-
const Ae = n.get(Y[
|
|
12872
|
-
t.bindFramebuffer(i.FRAMEBUFFER,
|
|
12869
|
+
for (let ke = 0; ke < Y.length; ke++) {
|
|
12870
|
+
t.bindFramebuffer(i.FRAMEBUFFER, Ke.__webglMultisampledFramebuffer), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + ke, i.RENDERBUFFER, Ke.__webglColorRenderbuffer[ke]);
|
|
12871
|
+
const Ae = n.get(Y[ke]).__webglTexture;
|
|
12872
|
+
t.bindFramebuffer(i.FRAMEBUFFER, Ke.__webglFramebuffer), i.framebufferTexture2D(i.DRAW_FRAMEBUFFER, i.COLOR_ATTACHMENT0 + ke, i.TEXTURE_2D, Ae, 0);
|
|
12873
12873
|
}
|
|
12874
|
-
t.bindFramebuffer(i.DRAW_FRAMEBUFFER,
|
|
12874
|
+
t.bindFramebuffer(i.DRAW_FRAMEBUFFER, Ke.__webglMultisampledFramebuffer);
|
|
12875
12875
|
} else if (F.depthBuffer && F.resolveDepthBuffer === !1 && c) {
|
|
12876
12876
|
const Y = F.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT;
|
|
12877
12877
|
i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER, [Y]);
|
|
@@ -13566,9 +13566,9 @@ class By {
|
|
|
13566
13566
|
} catch (T) {
|
|
13567
13567
|
throw console.error("THREE.WebGLRenderer: " + T.message), T;
|
|
13568
13568
|
}
|
|
13569
|
-
let ge, Ce, ue, re, ne, oe, F, Y, A, le, de, pe,
|
|
13569
|
+
let ge, Ce, ue, re, ne, oe, F, Y, A, le, de, pe, Ke, ve, ke, Ae, xe, ze, Gt, Ee, Fe, et, $e, Wt;
|
|
13570
13570
|
function B() {
|
|
13571
|
-
ge = new ZL(M), ge.init(), et = new zy(M, ge), Ce = new rL(M, ge, e, et), ue = new AC(M), re = new yL(M), ne = new HC(), oe = new eY(M, ge, ue, ne, Ce, et, re), F = new uL(y), Y = new bL(y), A = new Sx(M), $e = new cL(M, A), le = new GL(M, A, re, $e), de = new VL(M, le, A, re), Gt = new WL(M, Ce, oe), Ae = new hL(ne), pe = new FC(y, F, Y, ge, Ce, $e, Ae),
|
|
13571
|
+
ge = new ZL(M), ge.init(), et = new zy(M, ge), Ce = new rL(M, ge, e, et), ue = new AC(M), re = new yL(M), ne = new HC(), oe = new eY(M, ge, ue, ne, Ce, et, re), F = new uL(y), Y = new bL(y), A = new Sx(M), $e = new cL(M, A), le = new GL(M, A, re, $e), de = new VL(M, le, A, re), Gt = new WL(M, Ce, oe), Ae = new hL(ne), pe = new FC(y, F, Y, ge, Ce, $e, Ae), Ke = new oY(y, ne), ve = new wC(), ke = new PC(ge), ze = new oL(y, F, Y, ue, de, u, c), xe = new jC(y, de, Ce), Wt = new cY(M, re, Ce, ue), Ee = new dL(M, ge, re), Fe = new XL(M, ge, re), re.programs = pe.programs, y.capabilities = Ce, y.extensions = ge, y.properties = ne, y.renderLists = ve, y.shadowMap = xe, y.state = ue, y.info = re;
|
|
13572
13572
|
}
|
|
13573
13573
|
B();
|
|
13574
13574
|
const Ye = new lY(y, M);
|
|
@@ -13617,13 +13617,13 @@ class By {
|
|
|
13617
13617
|
}, this.setTransparentSort = function(T) {
|
|
13618
13618
|
te = T;
|
|
13619
13619
|
}, this.getClearColor = function(T) {
|
|
13620
|
-
return T.copy(
|
|
13620
|
+
return T.copy(ze.getClearColor());
|
|
13621
13621
|
}, this.setClearColor = function() {
|
|
13622
|
-
|
|
13622
|
+
ze.setClearColor.apply(ze, arguments);
|
|
13623
13623
|
}, this.getClearAlpha = function() {
|
|
13624
|
-
return
|
|
13624
|
+
return ze.getClearAlpha();
|
|
13625
13625
|
}, this.setClearAlpha = function() {
|
|
13626
|
-
|
|
13626
|
+
ze.setClearAlpha.apply(ze, arguments);
|
|
13627
13627
|
}, this.clear = function(T = !0, j = !0, V = !0) {
|
|
13628
13628
|
let x = 0;
|
|
13629
13629
|
if (T) {
|
|
@@ -13633,7 +13633,7 @@ class By {
|
|
|
13633
13633
|
C = J === wu || J === Ju || J === Jc;
|
|
13634
13634
|
}
|
|
13635
13635
|
if (C) {
|
|
13636
|
-
const J = L.texture.type, P = J === C0 || J === yi || J === Ca || J === Zs || J === Fu || J === Hu, U =
|
|
13636
|
+
const J = L.texture.type, P = J === C0 || J === yi || J === Ca || J === Zs || J === Fu || J === Hu, U = ze.getClearColor(), q = ze.getClearAlpha(), ce = U.r, ee = U.g, $ = U.b;
|
|
13637
13637
|
P ? (m[0] = ce, m[1] = ee, m[2] = $, m[3] = q, M.clearBufferuiv(M.COLOR, 0, m)) : (b[0] = ce, b[1] = ee, b[2] = $, b[3] = q, M.clearBufferiv(M.COLOR, 0, b));
|
|
13638
13638
|
} else
|
|
13639
13639
|
x |= M.COLOR_BUFFER_BIT;
|
|
@@ -13646,7 +13646,7 @@ class By {
|
|
|
13646
13646
|
}, this.clearStencil = function() {
|
|
13647
13647
|
this.clear(!1, !1, !0);
|
|
13648
13648
|
}, this.dispose = function() {
|
|
13649
|
-
t.removeEventListener("webglcontextlost", D, !1), t.removeEventListener("webglcontextrestored", Ze, !1), t.removeEventListener("webglcontextcreationerror", Te, !1), ve.dispose(),
|
|
13649
|
+
t.removeEventListener("webglcontextlost", D, !1), t.removeEventListener("webglcontextrestored", Ze, !1), t.removeEventListener("webglcontextcreationerror", Te, !1), ve.dispose(), ke.dispose(), ne.dispose(), F.dispose(), Y.dispose(), de.dispose(), $e.dispose(), Wt.dispose(), pe.dispose(), Ye.dispose(), Ye.removeEventListener("sessionstart", Ln), Ye.removeEventListener("sessionend", hd), gi.stop();
|
|
13650
13650
|
};
|
|
13651
13651
|
function D(T) {
|
|
13652
13652
|
T.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), W = !0;
|
|
@@ -13716,7 +13716,7 @@ class By {
|
|
|
13716
13716
|
T.transparent === !0 && T.side === Ht && T.forceSinglePass === !1 ? (T.side = W0, T.needsUpdate = !0, Il(T, j, V), T.side = ti, T.needsUpdate = !0, Il(T, j, V), T.side = Ht) : Il(T, j, V);
|
|
13717
13717
|
}
|
|
13718
13718
|
this.compile = function(T, j, V = null) {
|
|
13719
|
-
V === null && (V = T), Z =
|
|
13719
|
+
V === null && (V = T), Z = ke.get(V), Z.init(j), X.push(Z), V.traverseVisible(function(C) {
|
|
13720
13720
|
C.isLight && C.layers.test(j.layers) && (Z.pushLight(C), C.castShadow && Z.pushShadow(C));
|
|
13721
13721
|
}), T !== V && T.traverseVisible(function(C) {
|
|
13722
13722
|
C.isLight && C.layers.test(j.layers) && (Z.pushLight(C), C.castShadow && Z.pushShadow(C));
|
|
@@ -13767,11 +13767,11 @@ class By {
|
|
|
13767
13767
|
return;
|
|
13768
13768
|
}
|
|
13769
13769
|
if (W === !0) return;
|
|
13770
|
-
if (T.matrixWorldAutoUpdate === !0 && T.updateMatrixWorld(), j.parent === null && j.matrixWorldAutoUpdate === !0 && j.updateMatrixWorld(), Ye.enabled === !0 && Ye.isPresenting === !0 && (Ye.cameraAutoUpdate === !0 && Ye.updateCamera(j), j = Ye.getCamera()), T.isScene === !0 && T.onBeforeRender(y, T, j, L), Z =
|
|
13770
|
+
if (T.matrixWorldAutoUpdate === !0 && T.updateMatrixWorld(), j.parent === null && j.matrixWorldAutoUpdate === !0 && j.updateMatrixWorld(), Ye.enabled === !0 && Ye.isPresenting === !0 && (Ye.cameraAutoUpdate === !0 && Ye.updateCamera(j), j = Ye.getCamera()), T.isScene === !0 && T.onBeforeRender(y, T, j, L), Z = ke.get(T, X.length), Z.init(j), X.push(Z), We.multiplyMatrices(j.projectionMatrix, j.matrixWorldInverse), je.setFromProjectionMatrix(We), Xe = this.localClippingEnabled, se = Ae.init(this.clippingPlanes, Xe), G = ve.get(T, p.length), G.init(), p.push(G), Ye.enabled === !0 && Ye.isPresenting === !0) {
|
|
13771
13771
|
const J = y.xr.getDepthSensingMesh();
|
|
13772
13772
|
J !== null && $a(J, j, -1 / 0, y.sortObjects);
|
|
13773
13773
|
}
|
|
13774
|
-
$a(T, j, 0, y.sortObjects), G.finish(), y.sortObjects === !0 && G.sort(Q, te), qe = Ye.enabled === !1 || Ye.isPresenting === !1 || Ye.hasDepthSensing() === !1, qe &&
|
|
13774
|
+
$a(T, j, 0, y.sortObjects), G.finish(), y.sortObjects === !0 && G.sort(Q, te), qe = Ye.enabled === !1 || Ye.isPresenting === !1 || Ye.hasDepthSensing() === !1, qe && ze.addToRenderList(G, T), this.info.render.frame++, se === !0 && Ae.beginShadows();
|
|
13775
13775
|
const V = Z.state.shadowsArray;
|
|
13776
13776
|
xe.render(V, T, j), se === !0 && Ae.endShadows(), this.info.autoReset === !0 && this.info.reset();
|
|
13777
13777
|
const x = G.opaque, C = G.transmissive;
|
|
@@ -13782,13 +13782,13 @@ class By {
|
|
|
13782
13782
|
const q = J[P];
|
|
13783
13783
|
md(x, C, T, q);
|
|
13784
13784
|
}
|
|
13785
|
-
qe &&
|
|
13785
|
+
qe && ze.render(T);
|
|
13786
13786
|
for (let P = 0, U = J.length; P < U; P++) {
|
|
13787
13787
|
const q = J[P];
|
|
13788
13788
|
ud(G, T, q, q.viewport);
|
|
13789
13789
|
}
|
|
13790
13790
|
} else
|
|
13791
|
-
C.length > 0 && md(x, C, T, j), qe &&
|
|
13791
|
+
C.length > 0 && md(x, C, T, j), qe && ze.render(T), ud(G, T, j);
|
|
13792
13792
|
L !== null && (oe.updateMultisampleRenderTarget(L), oe.updateRenderTargetMipmap(L)), T.isScene === !0 && T.onAfterRender(y, T, j), $e.resetDefaultState(), I = -1, S = null, X.pop(), X.length > 0 ? (Z = X[X.length - 1], se === !0 && Ae.setGlobalState(y.clippingPlanes, Z.state.camera)) : Z = null, p.pop(), p.length > 0 ? G = p[p.length - 1] : G = null;
|
|
13793
13793
|
};
|
|
13794
13794
|
function $a(T, j, V, x) {
|
|
@@ -13841,7 +13841,7 @@ class By {
|
|
|
13841
13841
|
const J = Z.state.transmissionRenderTarget[x.id], P = x.viewport || R;
|
|
13842
13842
|
J.setSize(P.z, P.w);
|
|
13843
13843
|
const U = y.getRenderTarget();
|
|
13844
|
-
y.setRenderTarget(J), y.getClearColor(w), K = y.getClearAlpha(), K < 1 && y.setClearColor(16777215, 0.5), qe ?
|
|
13844
|
+
y.setRenderTarget(J), y.getClearColor(w), K = y.getClearAlpha(), K < 1 && y.setClearColor(16777215, 0.5), qe ? ze.render(V) : y.clear();
|
|
13845
13845
|
const q = y.toneMapping;
|
|
13846
13846
|
y.toneMapping = wi;
|
|
13847
13847
|
const ce = x.viewport;
|
|
@@ -13925,7 +13925,7 @@ class By {
|
|
|
13925
13925
|
}
|
|
13926
13926
|
C.isBatchedMesh && (_e.setOptional(M, C, "batchingTexture"), _e.setValue(M, "batchingTexture", C._matricesTexture, oe), _e.setOptional(M, C, "batchingIdTexture"), _e.setValue(M, "batchingIdTexture", C._indirectTexture, oe), _e.setOptional(M, C, "batchingColorTexture"), C._colorsTexture !== null && _e.setValue(M, "batchingColorTexture", C._colorsTexture, oe));
|
|
13927
13927
|
const K0 = V.morphAttributes;
|
|
13928
|
-
if ((K0.position !== void 0 || K0.normal !== void 0 || K0.color !== void 0) && Gt.update(C, V, Zt), (At || me.receiveShadow !== C.receiveShadow) && (me.receiveShadow = C.receiveShadow, _e.setValue(M, "receiveShadow", C.receiveShadow)), x.isMeshGouraudMaterial && x.envMap !== null && (Pt.envMap.value = q, Pt.flipEnvMap.value = q.isCubeTexture && q.isRenderTargetTexture === !1 ? -1 : 1), x.isMeshStandardMaterial && x.envMap === null && j.environment !== null && (Pt.envMapIntensity.value = j.environmentIntensity), At && (_e.setValue(M, "toneMappingExposure", y.toneMappingExposure), me.needsLights && Xd(Pt, zt), J && x.fog === !0 &&
|
|
13928
|
+
if ((K0.position !== void 0 || K0.normal !== void 0 || K0.color !== void 0) && Gt.update(C, V, Zt), (At || me.receiveShadow !== C.receiveShadow) && (me.receiveShadow = C.receiveShadow, _e.setValue(M, "receiveShadow", C.receiveShadow)), x.isMeshGouraudMaterial && x.envMap !== null && (Pt.envMap.value = q, Pt.flipEnvMap.value = q.isCubeTexture && q.isRenderTargetTexture === !1 ? -1 : 1), x.isMeshStandardMaterial && x.envMap === null && j.environment !== null && (Pt.envMapIntensity.value = j.environmentIntensity), At && (_e.setValue(M, "toneMappingExposure", y.toneMappingExposure), me.needsLights && Xd(Pt, zt), J && x.fog === !0 && Ke.refreshFogUniforms(Pt, J), Ke.refreshMaterialUniforms(Pt, x, E, z, Z.state.transmissionRenderTarget[T.id]), wr.upload(M, bd(me), Pt, oe)), x.isShaderMaterial && x.uniformsNeedUpdate === !0 && (wr.upload(M, bd(me), Pt, oe), x.uniformsNeedUpdate = !1), x.isSpriteMaterial && _e.setValue(M, "center", C.center), _e.setValue(M, "modelViewMatrix", C.modelViewMatrix), _e.setValue(M, "normalMatrix", C.normalMatrix), _e.setValue(M, "modelMatrix", C.matrixWorld), x.isShaderMaterial || x.isRawShaderMaterial) {
|
|
13929
13929
|
const Ft = x.uniformsGroups;
|
|
13930
13930
|
for (let Yt = 0, Et = Ft.length; Yt < Et; Yt++) {
|
|
13931
13931
|
const Cn = Ft[Yt];
|
|
@@ -14959,7 +14959,7 @@ class Qy extends Ge {
|
|
|
14959
14959
|
U0.material = null, U0.geometry.index = null, U0.geometry.attributes = {}, U0.geometry.setDrawRange(0, 1 / 0);
|
|
14960
14960
|
}
|
|
14961
14961
|
copy(e) {
|
|
14962
|
-
return super.copy(e), this.geometry = e.geometry.clone(), this.perObjectFrustumCulled = e.perObjectFrustumCulled, this.sortObjects = e.sortObjects, this.boundingBox = e.boundingBox !== null ? e.boundingBox.clone() : null, this.boundingSphere = e.boundingSphere !== null ? e.boundingSphere.clone() : null, this._drawRanges = e._drawRanges.map((t) =>
|
|
14962
|
+
return super.copy(e), this.geometry = e.geometry.clone(), this.perObjectFrustumCulled = e.perObjectFrustumCulled, this.sortObjects = e.sortObjects, this.boundingBox = e.boundingBox !== null ? e.boundingBox.clone() : null, this.boundingSphere = e.boundingSphere !== null ? e.boundingSphere.clone() : null, this._drawRanges = e._drawRanges.map((t) => we({}, t)), this._reservedRanges = e._reservedRanges.map((t) => we({}, t)), this._drawInfo = e._drawInfo.map((t) => we({}, t)), this._bounds = e._bounds.map((t) => ({
|
|
14963
14963
|
boxInitialized: t.boxInitialized,
|
|
14964
14964
|
box: t.box.clone(),
|
|
14965
14965
|
sphereInitialized: t.sphereInitialized,
|
|
@@ -16699,12 +16699,12 @@ class im extends Oe {
|
|
|
16699
16699
|
let Ce, ue, re;
|
|
16700
16700
|
const ne = M.x - fe.x, oe = M.y - fe.y, F = ge.x - M.x, Y = ge.y - M.y, A = ne * ne + oe * oe, le = ne * Y - oe * F;
|
|
16701
16701
|
if (Math.abs(le) > Number.EPSILON) {
|
|
16702
|
-
const de = Math.sqrt(A), pe = Math.sqrt(F * F + Y * Y),
|
|
16703
|
-
Ce =
|
|
16704
|
-
const
|
|
16705
|
-
if (
|
|
16702
|
+
const de = Math.sqrt(A), pe = Math.sqrt(F * F + Y * Y), Ke = fe.x - oe / de, ve = fe.y + ne / de, ke = ge.x - Y / pe, Ae = ge.y + F / pe, xe = ((ke - Ke) * Y - (Ae - ve) * F) / (ne * Y - oe * F);
|
|
16703
|
+
Ce = Ke + ne * xe - M.x, ue = ve + oe * xe - M.y;
|
|
16704
|
+
const ze = Ce * Ce + ue * ue;
|
|
16705
|
+
if (ze <= 2)
|
|
16706
16706
|
return new _(Ce, ue);
|
|
16707
|
-
re = Math.sqrt(
|
|
16707
|
+
re = Math.sqrt(ze / 2);
|
|
16708
16708
|
} else {
|
|
16709
16709
|
let de = !1;
|
|
16710
16710
|
ne > Number.EPSILON ? F > Number.EPSILON && (de = !0) : ne < -Number.EPSILON ? F < -Number.EPSILON && (de = !0) : Math.sign(oe) === Math.sign(Y) && (de = !0), de ? (Ce = -oe, ue = ne, re = Math.sqrt(A)) : (Ce = ne, ue = oe, re = Math.sqrt(A / 2));
|
|
@@ -21516,7 +21516,7 @@ class UI {
|
|
|
21516
21516
|
class BI extends s0 {
|
|
21517
21517
|
// @deprecated, r162
|
|
21518
21518
|
constructor(e = 1, t = 1, n = 1, s = {}) {
|
|
21519
|
-
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'), super(e, t, Dt(
|
|
21519
|
+
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'), super(e, t, Dt(we({}, s), { count: n })), this.isWebGLMultipleRenderTargets = !0;
|
|
21520
21520
|
}
|
|
21521
21521
|
get texture() {
|
|
21522
21522
|
return this.textures;
|
|
@@ -39084,19 +39084,19 @@ class yb extends Oe {
|
|
|
39084
39084
|
const Ve = z.length, Ue = Q.length;
|
|
39085
39085
|
function je(re, ne, oe) {
|
|
39086
39086
|
let F, Y, A;
|
|
39087
|
-
const le = re.x - ne.x, de = re.y - ne.y, pe = oe.x - re.x,
|
|
39088
|
-
if (Math.abs(
|
|
39087
|
+
const le = re.x - ne.x, de = re.y - ne.y, pe = oe.x - re.x, Ke = oe.y - re.y, ve = le * le + de * de, ke = le * Ke - de * pe;
|
|
39088
|
+
if (Math.abs(ke) > Number.EPSILON) {
|
|
39089
39089
|
const Ae = Math.sqrt(ve), xe = Math.sqrt(
|
|
39090
|
-
pe * pe +
|
|
39091
|
-
),
|
|
39092
|
-
F =
|
|
39090
|
+
pe * pe + Ke * Ke
|
|
39091
|
+
), ze = ne.x - de / Ae, Gt = ne.y + le / Ae, Ee = oe.x - Ke / xe, Fe = oe.y + pe / xe, et = ((Ee - ze) * Ke - (Fe - Gt) * pe) / (le * Ke - de * pe);
|
|
39092
|
+
F = ze + le * et - re.x, Y = Gt + de * et - re.y;
|
|
39093
39093
|
const $e = F * F + Y * Y;
|
|
39094
39094
|
if ($e <= 2)
|
|
39095
39095
|
return new _(F, Y);
|
|
39096
39096
|
A = Math.sqrt($e / 2);
|
|
39097
39097
|
} else {
|
|
39098
39098
|
let Ae = !1;
|
|
39099
|
-
le > Number.EPSILON ? pe > Number.EPSILON && (Ae = !0) : le < -Number.EPSILON ? pe < -Number.EPSILON && (Ae = !0) : Math.sign(de) === Math.sign(
|
|
39099
|
+
le > Number.EPSILON ? pe > Number.EPSILON && (Ae = !0) : le < -Number.EPSILON ? pe < -Number.EPSILON && (Ae = !0) : Math.sign(de) === Math.sign(Ke) && (Ae = !0), Ae ? (F = -de, Y = le, A = Math.sqrt(ve)) : (F = le, Y = de, A = Math.sqrt(ve / 2));
|
|
39100
39100
|
}
|
|
39101
39101
|
return new _(F / A, Y / A);
|
|
39102
39102
|
}
|
|
@@ -39122,8 +39122,8 @@ class yb extends Oe {
|
|
|
39122
39122
|
const le = E[Y];
|
|
39123
39123
|
We = Xe[Y];
|
|
39124
39124
|
for (let de = 0, pe = le.length; de < pe; de++) {
|
|
39125
|
-
const
|
|
39126
|
-
M(
|
|
39125
|
+
const Ke = ye(le[de], We[de], F);
|
|
39126
|
+
M(Ke.x, Ke.y, -oe);
|
|
39127
39127
|
}
|
|
39128
39128
|
}
|
|
39129
39129
|
}
|
|
@@ -39147,12 +39147,12 @@ class yb extends Oe {
|
|
|
39147
39147
|
const le = E[Y];
|
|
39148
39148
|
We = Xe[Y];
|
|
39149
39149
|
for (let de = 0, pe = le.length; de < pe; de++) {
|
|
39150
|
-
const
|
|
39150
|
+
const Ke = ye(le[de], We[de], F);
|
|
39151
39151
|
R ? M(
|
|
39152
|
-
|
|
39153
|
-
|
|
39152
|
+
Ke.x,
|
|
39153
|
+
Ke.y + S[m - 1].y,
|
|
39154
39154
|
S[m - 1].x + oe
|
|
39155
|
-
) : M(
|
|
39155
|
+
) : M(Ke.x, Ke.y, b + oe);
|
|
39156
39156
|
}
|
|
39157
39157
|
}
|
|
39158
39158
|
}
|
|
@@ -39206,8 +39206,8 @@ class yb extends Oe {
|
|
|
39206
39206
|
let Y = oe - 1;
|
|
39207
39207
|
Y < 0 && (Y = re.length - 1);
|
|
39208
39208
|
for (let A = 0, le = m + y * 2; A < le; A++) {
|
|
39209
|
-
const de = Ve * A, pe = Ve * (A + 1),
|
|
39210
|
-
ge(
|
|
39209
|
+
const de = Ve * A, pe = Ve * (A + 1), Ke = ne + F + de, ve = ne + Y + de, ke = ne + Y + pe, Ae = ne + F + pe;
|
|
39210
|
+
ge(Ke, ve, ke, Ae);
|
|
39211
39211
|
}
|
|
39212
39212
|
}
|
|
39213
39213
|
}
|
|
@@ -39481,7 +39481,7 @@ class AK extends yt {
|
|
|
39481
39481
|
constructor(t) {
|
|
39482
39482
|
super();
|
|
39483
39483
|
O(this, "options");
|
|
39484
|
-
this.options =
|
|
39484
|
+
this.options = we({
|
|
39485
39485
|
sprite: !0
|
|
39486
39486
|
}, t);
|
|
39487
39487
|
}
|
|
@@ -39544,7 +39544,7 @@ class _K extends yt {
|
|
|
39544
39544
|
O(this, "line");
|
|
39545
39545
|
O(this, "helperMesh");
|
|
39546
39546
|
O(this, "helperMeshPosition");
|
|
39547
|
-
this.options =
|
|
39547
|
+
this.options = we({
|
|
39548
39548
|
color: "#ffffff",
|
|
39549
39549
|
lineWidth: 6,
|
|
39550
39550
|
globe: !1,
|
|
@@ -39677,7 +39677,7 @@ class qK extends yt {
|
|
|
39677
39677
|
constructor(t) {
|
|
39678
39678
|
super();
|
|
39679
39679
|
O(this, "options");
|
|
39680
|
-
this.options =
|
|
39680
|
+
this.options = we({}, t);
|
|
39681
39681
|
}
|
|
39682
39682
|
create() {
|
|
39683
39683
|
return be(this, null, function* () {
|
|
@@ -39842,7 +39842,7 @@ const pk = {
|
|
|
39842
39842
|
Icosahedron: sk,
|
|
39843
39843
|
Lathe: lk,
|
|
39844
39844
|
Octahedron: ak
|
|
39845
|
-
}, Ls =
|
|
39845
|
+
}, Ls = we(we({}, pk), bk);
|
|
39846
39846
|
class Zk {
|
|
39847
39847
|
constructor() {
|
|
39848
39848
|
O(this, "pluginName", "materialList");
|
|
@@ -42399,7 +42399,7 @@ class pz extends bW {
|
|
|
42399
42399
|
const x = V.array.slice(V.offset.value, V.offset.value + V.size), C = Mr(x), J = new Uint8Array(C.length);
|
|
42400
42400
|
return fe(C), ge(C, J), new DataView(J.buffer);
|
|
42401
42401
|
}
|
|
42402
|
-
function
|
|
42402
|
+
function Ke(V) {
|
|
42403
42403
|
const x = V.viewer, C = { value: V.offset.value }, J = new Uint16Array(V.columns * V.lines * (V.inputChannels.length * V.type)), P = new Uint8Array(8192);
|
|
42404
42404
|
let U = 0;
|
|
42405
42405
|
const q = new Array(V.inputChannels.length);
|
|
@@ -42462,7 +42462,7 @@ class pz extends bW {
|
|
|
42462
42462
|
}
|
|
42463
42463
|
return U;
|
|
42464
42464
|
}
|
|
42465
|
-
function
|
|
42465
|
+
function ke(V) {
|
|
42466
42466
|
const x = V.viewer, C = { value: V.offset.value }, J = new Uint8Array(V.columns * V.lines * (V.inputChannels.length * V.type * 2)), P = {
|
|
42467
42467
|
version: Wt(x, C),
|
|
42468
42468
|
unknownUncompressedSize: Wt(x, C),
|
|
@@ -42574,7 +42574,7 @@ class pz extends bW {
|
|
|
42574
42574
|
);
|
|
42575
42575
|
return x.value = x.value + C, J;
|
|
42576
42576
|
}
|
|
42577
|
-
function
|
|
42577
|
+
function ze(V, x) {
|
|
42578
42578
|
const C = Ee(V, x), J = Fe(V, x);
|
|
42579
42579
|
return [C, J];
|
|
42580
42580
|
}
|
|
@@ -42724,7 +42724,7 @@ class pz extends bW {
|
|
|
42724
42724
|
if (J === "int")
|
|
42725
42725
|
return Ee(V, C);
|
|
42726
42726
|
if (J === "rational")
|
|
42727
|
-
return
|
|
42727
|
+
return ze(V, C);
|
|
42728
42728
|
if (J === "timecode")
|
|
42729
42729
|
return Gt(V, C);
|
|
42730
42730
|
if (J === "preview")
|
|
@@ -42868,16 +42868,16 @@ class pz extends bW {
|
|
|
42868
42868
|
U.blockHeight = 16, U.uncompress = pe;
|
|
42869
42869
|
break;
|
|
42870
42870
|
case "PIZ_COMPRESSION":
|
|
42871
|
-
U.blockHeight = 32, U.uncompress =
|
|
42871
|
+
U.blockHeight = 32, U.uncompress = Ke;
|
|
42872
42872
|
break;
|
|
42873
42873
|
case "PXR24_COMPRESSION":
|
|
42874
42874
|
U.blockHeight = 16, U.uncompress = ve;
|
|
42875
42875
|
break;
|
|
42876
42876
|
case "DWAA_COMPRESSION":
|
|
42877
|
-
U.blockHeight = 32, U.uncompress =
|
|
42877
|
+
U.blockHeight = 32, U.uncompress = ke;
|
|
42878
42878
|
break;
|
|
42879
42879
|
case "DWAB_COMPRESSION":
|
|
42880
|
-
U.blockHeight = 256, U.uncompress =
|
|
42880
|
+
U.blockHeight = 256, U.uncompress = ke;
|
|
42881
42881
|
break;
|
|
42882
42882
|
default:
|
|
42883
42883
|
throw new Error("EXRLoader.parse: " + V.compression + " is unsupported");
|
|
@@ -43669,7 +43669,7 @@ function oa(i) {
|
|
|
43669
43669
|
const e = new De();
|
|
43670
43670
|
return e.color.setScalar(i), e;
|
|
43671
43671
|
}
|
|
43672
|
-
const Gf = "0.16.
|
|
43672
|
+
const Gf = "0.16.13", dp = !1;
|
|
43673
43673
|
class qa {
|
|
43674
43674
|
constructor(e, t = {}) {
|
|
43675
43675
|
O(this, "container");
|
|
@@ -43702,7 +43702,7 @@ class qa {
|
|
|
43702
43702
|
move: !1,
|
|
43703
43703
|
click: !1
|
|
43704
43704
|
});
|
|
43705
|
-
if (this.container = e, this.options =
|
|
43705
|
+
if (this.container = e, this.options = we({}, t), !this.options.assetsPrefix) {
|
|
43706
43706
|
let n = "/";
|
|
43707
43707
|
n === "/" && (n = ""), this.options.assetsPrefix = n;
|
|
43708
43708
|
}
|
|
@@ -43759,7 +43759,7 @@ class qa {
|
|
|
43759
43759
|
this.devicePixelRatio = this.getDevicePixelRatio(), this.options.css2DContainer && (this.pencilConfig.css2DRendererParams = {
|
|
43760
43760
|
container: this.options.css2DContainer
|
|
43761
43761
|
}), this.initPencilPlugin();
|
|
43762
|
-
const e = new iM(
|
|
43762
|
+
const e = new iM(we(we({
|
|
43763
43763
|
container: this.container,
|
|
43764
43764
|
isdev: !this.playing && dp,
|
|
43765
43765
|
stats: !this.playing && dp,
|
|
@@ -43776,7 +43776,7 @@ class qa {
|
|
|
43776
43776
|
far: 1e3,
|
|
43777
43777
|
fov: 45
|
|
43778
43778
|
}
|
|
43779
|
-
}, this.pencilConfig));
|
|
43779
|
+
}, this.pencilConfig), this.options.pencilConfig));
|
|
43780
43780
|
this.leftTruck && (e.cameraControls.mouseButtons.left = ln.TRUCK, e.cameraControls.mouseButtons.right = ln.ROTATE), e.use(this.mList), e.use(this.loader), e.use(this.worker), e.use(this.drawController), yield this.drawController.initGroup(), this.drawController.hide(), this.pencil = e, this.checkDprTimer = new Af(() => {
|
|
43781
43781
|
const t = this.getDevicePixelRatio();
|
|
43782
43782
|
this.setDevicePixelRatio(t);
|
|
@@ -43825,7 +43825,7 @@ class qa {
|
|
|
43825
43825
|
mouseRight: this.leftTruck ? ln.ROTATE : ln.TRUCK,
|
|
43826
43826
|
mouseWheel: ln.DOLLY
|
|
43827
43827
|
}, this.settings = new Proxy(
|
|
43828
|
-
Dt(
|
|
43828
|
+
Dt(we(we({}, this.initSettingsObj), this.mouseButtonsActiveStore), {
|
|
43829
43829
|
mouseNone: !1
|
|
43830
43830
|
}),
|
|
43831
43831
|
{
|
|
@@ -43868,7 +43868,7 @@ class qa {
|
|
|
43868
43868
|
});
|
|
43869
43869
|
}
|
|
43870
43870
|
show() {
|
|
43871
|
-
this.showState || (this.showState = "ing", this.playing ? this.drawController.show() : (this.drawController.showPrefab(), this.drawController.show()), this.pencil.start(), this.showState = !0, this.emit("show"));
|
|
43871
|
+
this.showState || this.options.disableInitShow || (this.showState = "ing", this.playing ? this.drawController.show() : (this.drawController.showPrefab(), this.drawController.show()), this.pencil.start(), this.showState = !0, this.emit("show"));
|
|
43872
43872
|
}
|
|
43873
43873
|
hide() {
|
|
43874
43874
|
this.showState && (this.playing ? this.drawController.hide() : (this.drawController.hidePrefab(), this.drawController.hide()), this.showState = !1, this.emit("hide"));
|
|
@@ -43929,7 +43929,7 @@ class qa {
|
|
|
43929
43929
|
this.pickListener.move = !0;
|
|
43930
43930
|
let t;
|
|
43931
43931
|
const n = hp((s) => {
|
|
43932
|
-
const a = this.pickFunctionsArr.map((r) => Dt(
|
|
43932
|
+
const a = this.pickFunctionsArr.map((r) => Dt(we({}, r), {
|
|
43933
43933
|
objArr: r.objArr instanceof Function ? r.objArr() : r.objArr
|
|
43934
43934
|
})).filter((r) => r.type !== "click").reduce(
|
|
43935
43935
|
(r, u) => r.concat(
|
|
@@ -43955,7 +43955,7 @@ class qa {
|
|
|
43955
43955
|
} else if (!e && !this.pickListener.click) {
|
|
43956
43956
|
this.pickListener.click = !0;
|
|
43957
43957
|
const t = hp((n) => {
|
|
43958
|
-
const l = this.pickFunctionsArr.map((d) => Dt(
|
|
43958
|
+
const l = this.pickFunctionsArr.map((d) => Dt(we({}, d), {
|
|
43959
43959
|
objArr: d.objArr instanceof Function ? d.objArr() : d.objArr
|
|
43960
43960
|
})).filter((d) => d.type === "click").reduce(
|
|
43961
43961
|
(d, h) => d.concat(
|
|
@@ -44006,7 +44006,7 @@ class yf extends yt {
|
|
|
44006
44006
|
O(this, "areaArr", []);
|
|
44007
44007
|
O(this, "lineArr");
|
|
44008
44008
|
O(this, "extrudelineArr");
|
|
44009
|
-
if (this.options =
|
|
44009
|
+
if (this.options = we({
|
|
44010
44010
|
areaGroup: !0,
|
|
44011
44011
|
hasSide: !0,
|
|
44012
44012
|
curvatureResolution: 0,
|
|
@@ -44044,7 +44044,7 @@ class yf extends yt {
|
|
|
44044
44044
|
target: this,
|
|
44045
44045
|
key: I
|
|
44046
44046
|
});
|
|
44047
|
-
return S.userData =
|
|
44047
|
+
return S.userData = we({}, L), S;
|
|
44048
44048
|
}))
|
|
44049
44049
|
);
|
|
44050
44050
|
this.groupArr = f;
|
|
@@ -44129,14 +44129,14 @@ class yf extends yt {
|
|
|
44129
44129
|
},
|
|
44130
44130
|
G
|
|
44131
44131
|
);
|
|
44132
|
-
return p.userData =
|
|
44132
|
+
return p.userData = we({}, b), p;
|
|
44133
44133
|
}))
|
|
44134
44134
|
);
|
|
44135
44135
|
{
|
|
44136
44136
|
const u = yield d.geoGeometry("extrudePolygon", {
|
|
44137
44137
|
mesaage: {
|
|
44138
44138
|
coordinatesArr: c.map(({ coords: b }) => b).flat(),
|
|
44139
|
-
projection:
|
|
44139
|
+
projection: we({}, this.options.projection),
|
|
44140
44140
|
bbox: s,
|
|
44141
44141
|
bboxOffset: o,
|
|
44142
44142
|
depth: [this.options.depth],
|
|
@@ -44168,7 +44168,7 @@ class yf extends yt {
|
|
|
44168
44168
|
}), a = this.pencil.getPlugin("worker"), o = this.pencil.getPlugin("draw"), c = (G = n.curvatureResolution) != null ? G : this.options.curvatureResolution, { coords: d, properties: h } = l[0], r = this.findGroup(this.getPropertiesKey(h)), u = yield o.draw("Group", {
|
|
44169
44169
|
target: r
|
|
44170
44170
|
});
|
|
44171
|
-
u.userData =
|
|
44171
|
+
u.userData = we({}, h);
|
|
44172
44172
|
const [m, b] = yield Promise.all([
|
|
44173
44173
|
a.geoGeometry(
|
|
44174
44174
|
c ? "conicPolygon" : "extrudePolygon",
|
|
@@ -44240,7 +44240,7 @@ class yf extends yt {
|
|
|
44240
44240
|
},
|
|
44241
44241
|
m
|
|
44242
44242
|
);
|
|
44243
|
-
return G.userData =
|
|
44243
|
+
return G.userData = we({}, u), G;
|
|
44244
44244
|
}))
|
|
44245
44245
|
);
|
|
44246
44246
|
{
|
|
@@ -44428,7 +44428,7 @@ class Wf extends yt {
|
|
|
44428
44428
|
areaGroup: !1,
|
|
44429
44429
|
// bbox: bboxworld,
|
|
44430
44430
|
depth: t,
|
|
44431
|
-
materialOptions:
|
|
44431
|
+
materialOptions: we({}, l)
|
|
44432
44432
|
},
|
|
44433
44433
|
this
|
|
44434
44434
|
);
|
|
@@ -44485,7 +44485,7 @@ class Vf extends yt {
|
|
|
44485
44485
|
});
|
|
44486
44486
|
}
|
|
44487
44487
|
}
|
|
44488
|
-
const Nz = Dt(
|
|
44488
|
+
const Nz = Dt(we({}, Ls), {
|
|
44489
44489
|
PlaneMap: yf,
|
|
44490
44490
|
ContinentsBg: Wf,
|
|
44491
44491
|
PlaneShadow: Vf
|
|
@@ -44562,14 +44562,14 @@ const Nz = Dt(ze({}, Ls), {
|
|
|
44562
44562
|
`, e;
|
|
44563
44563
|
}, qs = class qs extends qa {
|
|
44564
44564
|
constructor(t, n) {
|
|
44565
|
-
const s =
|
|
44565
|
+
const s = we({
|
|
44566
44566
|
0: Lm,
|
|
44567
44567
|
1e5: JX
|
|
44568
44568
|
}, n == null ? void 0 : n.geojsonMap);
|
|
44569
44569
|
let l = {
|
|
44570
44570
|
1e5: xb
|
|
44571
44571
|
};
|
|
44572
|
-
const a =
|
|
44572
|
+
const a = we({
|
|
44573
44573
|
0: Yz,
|
|
44574
44574
|
1e5: Xf
|
|
44575
44575
|
}, n == null ? void 0 : n.bboxMap);
|
|
@@ -44581,8 +44581,8 @@ const Nz = Dt(ze({}, Ls), {
|
|
|
44581
44581
|
features: [d]
|
|
44582
44582
|
};
|
|
44583
44583
|
});
|
|
44584
|
-
}), l =
|
|
44585
|
-
super(t, Dt(
|
|
44584
|
+
}), l = we(we({}, l), n == null ? void 0 : n.extrudeLineGeojsonMap);
|
|
44585
|
+
super(t, Dt(we({
|
|
44586
44586
|
parentBg: !1,
|
|
44587
44587
|
continentsBg: !1,
|
|
44588
44588
|
continentsBgDepth: 0,
|
|
@@ -44708,7 +44708,7 @@ const Nz = Dt(ze({}, Ls), {
|
|
|
44708
44708
|
areaGroup: !1,
|
|
44709
44709
|
bbox: d,
|
|
44710
44710
|
depth: this.options.parentBgDepth,
|
|
44711
|
-
materialOptions:
|
|
44711
|
+
materialOptions: we({}, h)
|
|
44712
44712
|
});
|
|
44713
44713
|
u.position.z = -this.options.parentBgDepth, this.parentBg.push(u);
|
|
44714
44714
|
}
|
|
@@ -44942,7 +44942,7 @@ const Nz = Dt(ze({}, Ls), {
|
|
|
44942
44942
|
}
|
|
44943
44943
|
show() {
|
|
44944
44944
|
return be(this, null, function* () {
|
|
44945
|
-
if (this.showState) return;
|
|
44945
|
+
if (this.showState || this.options.disableInitShow) return;
|
|
44946
44946
|
Kn(qs.prototype, this, "show").call(this);
|
|
44947
44947
|
const t = this.drawController.group;
|
|
44948
44948
|
this.mapHistory[0] && (t.position.z = -this.mapHistory[0].depth, yield new Promise((n) => {
|
|
@@ -45262,7 +45262,7 @@ const Nz = Dt(ze({}, Ls), {
|
|
|
45262
45262
|
depth: l,
|
|
45263
45263
|
adcode: a
|
|
45264
45264
|
}) {
|
|
45265
|
-
const c = this.mList.getMaterialObj("plane"), d =
|
|
45265
|
+
const c = this.mList.getMaterialObj("plane"), d = we({}, c);
|
|
45266
45266
|
return yield this.drawController.draw(
|
|
45267
45267
|
"PlaneMap",
|
|
45268
45268
|
{
|
|
@@ -45474,7 +45474,7 @@ class gf extends yt {
|
|
|
45474
45474
|
O(this, "options");
|
|
45475
45475
|
O(this, "building", {});
|
|
45476
45476
|
O(this, "outJson", /* @__PURE__ */ new Map());
|
|
45477
|
-
this.options =
|
|
45477
|
+
this.options = we({}, t);
|
|
45478
45478
|
}
|
|
45479
45479
|
create() {
|
|
45480
45480
|
return be(this, null, function* () {
|
|
@@ -45562,7 +45562,7 @@ class ff extends yt {
|
|
|
45562
45562
|
O(this, "outJson", /* @__PURE__ */ new Map());
|
|
45563
45563
|
O(this, "linePrimary", []);
|
|
45564
45564
|
O(this, "lineSecondary", []);
|
|
45565
|
-
this.options =
|
|
45565
|
+
this.options = we({}, t);
|
|
45566
45566
|
}
|
|
45567
45567
|
create() {
|
|
45568
45568
|
return be(this, null, function* () {
|
|
@@ -45588,8 +45588,8 @@ class ff extends yt {
|
|
|
45588
45588
|
const g = [
|
|
45589
45589
|
Z.geometry.coordinates[0].filter((L) => v2(L, y))
|
|
45590
45590
|
];
|
|
45591
|
-
return g[0].length && m[p].push(Dt(
|
|
45592
|
-
geometry: Dt(
|
|
45591
|
+
return g[0].length && m[p].push(Dt(we({}, Z), {
|
|
45592
|
+
geometry: Dt(we({}, Z.geometry), {
|
|
45593
45593
|
coordinates: g
|
|
45594
45594
|
})
|
|
45595
45595
|
})), !0;
|
|
@@ -45654,7 +45654,7 @@ class Rf extends yt {
|
|
|
45654
45654
|
O(this, "options");
|
|
45655
45655
|
O(this, "area", []);
|
|
45656
45656
|
O(this, "outJson", /* @__PURE__ */ new Map());
|
|
45657
|
-
this.options =
|
|
45657
|
+
this.options = we({}, t);
|
|
45658
45658
|
}
|
|
45659
45659
|
create() {
|
|
45660
45660
|
return be(this, null, function* () {
|
|
@@ -45678,8 +45678,8 @@ class Rf extends yt {
|
|
|
45678
45678
|
const f = HX(G.geometry.coordinates[0]);
|
|
45679
45679
|
if (tR(X, f)) {
|
|
45680
45680
|
const L = Hz(X, G);
|
|
45681
|
-
L.features[0] && u[Z].push(Dt(
|
|
45682
|
-
geometry: Dt(
|
|
45681
|
+
L.features[0] && u[Z].push(Dt(we({}, G), {
|
|
45682
|
+
geometry: Dt(we({}, G.geometry), {
|
|
45683
45683
|
coordinates: L.features[0].geometry.coordinates
|
|
45684
45684
|
})
|
|
45685
45685
|
}));
|
|
@@ -46190,7 +46190,7 @@ class xf extends yt {
|
|
|
46190
46190
|
super();
|
|
46191
46191
|
O(this, "options");
|
|
46192
46192
|
O(this, "plane");
|
|
46193
|
-
this.options =
|
|
46193
|
+
this.options = we({
|
|
46194
46194
|
color: "#0C4557",
|
|
46195
46195
|
map: null
|
|
46196
46196
|
}, t);
|
|
@@ -46344,7 +46344,7 @@ class Sf extends yt {
|
|
|
46344
46344
|
this.time.value += 0.01, this.offset.y -= 0.02;
|
|
46345
46345
|
}
|
|
46346
46346
|
}
|
|
46347
|
-
const Uz = Dt(
|
|
46347
|
+
const Uz = Dt(we({}, Ls), {
|
|
46348
46348
|
Building: gf,
|
|
46349
46349
|
Road: ff,
|
|
46350
46350
|
Area: Rf,
|
|
@@ -46352,7 +46352,7 @@ const Uz = Dt(ze({}, Ls), {
|
|
|
46352
46352
|
Target: Sf
|
|
46353
46353
|
}), Iu = class Iu extends qa {
|
|
46354
46354
|
constructor(t, n) {
|
|
46355
|
-
super(t,
|
|
46355
|
+
super(t, we({
|
|
46356
46356
|
fitTo: !0,
|
|
46357
46357
|
loaderAdd: !0,
|
|
46358
46358
|
plane: !0,
|
|
@@ -46784,7 +46784,7 @@ class Lf extends Wb {
|
|
|
46784
46784
|
constructor(t) {
|
|
46785
46785
|
super();
|
|
46786
46786
|
O(this, "options");
|
|
46787
|
-
this.options =
|
|
46787
|
+
this.options = we({
|
|
46788
46788
|
radius: 30
|
|
46789
46789
|
}, t);
|
|
46790
46790
|
}
|
|
@@ -46798,7 +46798,7 @@ class Cf extends yt {
|
|
|
46798
46798
|
super();
|
|
46799
46799
|
O(this, "options");
|
|
46800
46800
|
O(this, "areaArr", []);
|
|
46801
|
-
this.options =
|
|
46801
|
+
this.options = we({
|
|
46802
46802
|
start: 30,
|
|
46803
46803
|
depth: 1.4,
|
|
46804
46804
|
hasTop: !0,
|
|
@@ -46840,7 +46840,7 @@ class Cf extends yt {
|
|
|
46840
46840
|
},
|
|
46841
46841
|
this
|
|
46842
46842
|
);
|
|
46843
|
-
b.userData =
|
|
46843
|
+
b.userData = we({}, u.properties), this.areaArr.push(b);
|
|
46844
46844
|
})
|
|
46845
46845
|
}),
|
|
46846
46846
|
l.geoGeometry("conicLine", {
|
|
@@ -46891,7 +46891,7 @@ class Cf extends yt {
|
|
|
46891
46891
|
return a.emissive.set(n), a.emissiveIntensity = s, t.useMaterial(l), a;
|
|
46892
46892
|
}
|
|
46893
46893
|
}
|
|
46894
|
-
const Bz = Dt(
|
|
46894
|
+
const Bz = Dt(we({}, Ls), {
|
|
46895
46895
|
Earth: Lf,
|
|
46896
46896
|
Countries: Cf
|
|
46897
46897
|
}), Pz = {
|
|
@@ -46913,7 +46913,7 @@ const Bz = Dt(ze({}, Ls), {
|
|
|
46913
46913
|
}
|
|
46914
46914
|
}, qo = class qo extends qa {
|
|
46915
46915
|
constructor(t, n) {
|
|
46916
|
-
super(t,
|
|
46916
|
+
super(t, we({
|
|
46917
46917
|
mapDepth: 1.4,
|
|
46918
46918
|
radius: 30
|
|
46919
46919
|
}, n));
|
|
@@ -47335,7 +47335,7 @@ class Az extends yt {
|
|
|
47335
47335
|
this.object3d.position.set(t, n, s), this.object3d.lookAt(0, 0, 0);
|
|
47336
47336
|
}
|
|
47337
47337
|
}
|
|
47338
|
-
const Dz = Dt(
|
|
47338
|
+
const Dz = Dt(we({}, Ls), {
|
|
47339
47339
|
Earth: Ez,
|
|
47340
47340
|
Bg: Qz,
|
|
47341
47341
|
Label: jz,
|
|
@@ -47348,7 +47348,7 @@ const Dz = Dt(ze({}, Ls), {
|
|
|
47348
47348
|
}
|
|
47349
47349
|
}, $o = class $o extends qa {
|
|
47350
47350
|
constructor(t, n) {
|
|
47351
|
-
super(t,
|
|
47351
|
+
super(t, we({}, n));
|
|
47352
47352
|
O(this, "leftTruck", !1);
|
|
47353
47353
|
//@ts-ignore
|
|
47354
47354
|
O(this, "drawController", new Yl(Dz));
|
|
@@ -47430,7 +47430,7 @@ class _z extends yt {
|
|
|
47430
47430
|
constructor(t) {
|
|
47431
47431
|
super();
|
|
47432
47432
|
O(this, "options");
|
|
47433
|
-
this.options =
|
|
47433
|
+
this.options = we({
|
|
47434
47434
|
radius: 30
|
|
47435
47435
|
}, t);
|
|
47436
47436
|
}
|
|
@@ -47443,7 +47443,7 @@ class _z extends yt {
|
|
|
47443
47443
|
});
|
|
47444
47444
|
}
|
|
47445
47445
|
}
|
|
47446
|
-
const qz = Dt(
|
|
47446
|
+
const qz = Dt(we({}, Ls), {
|
|
47447
47447
|
Earth: Lf,
|
|
47448
47448
|
Countries: Cf,
|
|
47449
47449
|
SphereShadow: _z
|
|
@@ -47531,7 +47531,7 @@ const $z = {
|
|
|
47531
47531
|
scene: {
|
|
47532
47532
|
om: !1
|
|
47533
47533
|
}
|
|
47534
|
-
}, Yf = Dt(
|
|
47534
|
+
}, Yf = Dt(we({}, Ls), {
|
|
47535
47535
|
PlaneMap: yf,
|
|
47536
47536
|
ContinentsBg: Wf,
|
|
47537
47537
|
PlaneShadow: Vf,
|
|
@@ -47543,7 +47543,7 @@ const $z = {
|
|
|
47543
47543
|
});
|
|
47544
47544
|
class eU extends Cc {
|
|
47545
47545
|
constructor(t, n) {
|
|
47546
|
-
super(t,
|
|
47546
|
+
super(t, we({
|
|
47547
47547
|
polarAngle: 0.6690037180091797,
|
|
47548
47548
|
mapDepth: [1, 0.3, 0.12],
|
|
47549
47549
|
curvatureResolution: 0,
|
|
@@ -47560,7 +47560,7 @@ class eU extends Cc {
|
|
|
47560
47560
|
labelLite: !1,
|
|
47561
47561
|
shadowMap: !1
|
|
47562
47562
|
});
|
|
47563
|
-
this.extendsOptions = Dt(
|
|
47563
|
+
this.extendsOptions = Dt(we({}, this.extendsOptions), {
|
|
47564
47564
|
mapDepth: () => this.options.mapDepth,
|
|
47565
47565
|
clickOusideBack: this.options.clickOusideBack,
|
|
47566
47566
|
clickHandleDrillDown: this.options.clickHandleDrillDown,
|
|
@@ -47729,13 +47729,13 @@ class eU extends Cc {
|
|
|
47729
47729
|
if (this.options.adcode !== 1e5) {
|
|
47730
47730
|
const G = this.mList.getMaterialObj("parentPlane"), Z = yield this.drawController.draw(
|
|
47731
47731
|
"PlaneMap",
|
|
47732
|
-
|
|
47733
|
-
geojson: Dt(
|
|
47732
|
+
we({
|
|
47733
|
+
geojson: Dt(we({}, c), {
|
|
47734
47734
|
features: [
|
|
47735
47735
|
...c.features.filter((p) => p.properties.adcode !== t)
|
|
47736
47736
|
]
|
|
47737
47737
|
}),
|
|
47738
|
-
materialOptions:
|
|
47738
|
+
materialOptions: we({}, G)
|
|
47739
47739
|
}, h),
|
|
47740
47740
|
this.group
|
|
47741
47741
|
);
|
|
@@ -47743,13 +47743,13 @@ class eU extends Cc {
|
|
|
47743
47743
|
}
|
|
47744
47744
|
const r = this.mList.getMaterialObj("worldPlane"), u = yield this.drawController.draw(
|
|
47745
47745
|
"PlaneMap",
|
|
47746
|
-
|
|
47747
|
-
geojson: Dt(
|
|
47746
|
+
we({
|
|
47747
|
+
geojson: Dt(we({}, c), {
|
|
47748
47748
|
features: [
|
|
47749
47749
|
...this.options.geojsonMap[0].features.filter((G) => G.properties.ISO_A3 !== "CHN")
|
|
47750
47750
|
]
|
|
47751
47751
|
}),
|
|
47752
|
-
materialOptions:
|
|
47752
|
+
materialOptions: we({}, r)
|
|
47753
47753
|
}, h),
|
|
47754
47754
|
this.group
|
|
47755
47755
|
), { min: m, max: b } = u.getSize();
|
|
@@ -47793,7 +47793,7 @@ class eU extends Cc {
|
|
|
47793
47793
|
adcode: a
|
|
47794
47794
|
}) {
|
|
47795
47795
|
var u;
|
|
47796
|
-
const c = this.mapHistory.length === 0, d = this.mList.getMaterialObj("plane"), h =
|
|
47796
|
+
const c = this.mapHistory.length === 0, d = this.mList.getMaterialObj("plane"), h = we({}, d);
|
|
47797
47797
|
c || !h.topMatTwo ? (h.topMat = h.topMatOne, h.bgTopMat = h.bgTopMatOne) : h.topMat = h.topMatTwo;
|
|
47798
47798
|
const r = yield this.drawController.draw(
|
|
47799
47799
|
"PlaneMap",
|
|
@@ -47937,7 +47937,7 @@ const tU = (i) => {
|
|
|
47937
47937
|
const l = X0[e].parent || 0, a = i.options.geojsonMap[l], o = i.options.bboxMap[l], c = i.mList.getMaterialObj("parentPlane"), d = yield i.drawController.draw(
|
|
47938
47938
|
"PlaneMap",
|
|
47939
47939
|
{
|
|
47940
|
-
geojson: Dt(
|
|
47940
|
+
geojson: Dt(we({}, a), {
|
|
47941
47941
|
features: a.features.filter((u) => u.properties.adcode !== e)
|
|
47942
47942
|
}),
|
|
47943
47943
|
projection: {
|
|
@@ -47950,7 +47950,7 @@ const tU = (i) => {
|
|
|
47950
47950
|
bbox: o,
|
|
47951
47951
|
bboxOffset: [0, -0.2, -0.1, 0],
|
|
47952
47952
|
depth: 0.1,
|
|
47953
|
-
materialOptions:
|
|
47953
|
+
materialOptions: we({}, c)
|
|
47954
47954
|
},
|
|
47955
47955
|
i.group
|
|
47956
47956
|
), { min: h, max: r } = d.getSize();
|
|
@@ -48099,7 +48099,7 @@ class sU extends Nc {
|
|
|
48099
48099
|
}
|
|
48100
48100
|
const Nu = class Nu extends eU {
|
|
48101
48101
|
constructor(t, n) {
|
|
48102
|
-
super(t,
|
|
48102
|
+
super(t, we({
|
|
48103
48103
|
initCity: !1,
|
|
48104
48104
|
cityOnMap: !1,
|
|
48105
48105
|
clipOutShow: !0,
|
|
@@ -48125,7 +48125,7 @@ const Nu = class Nu extends eU {
|
|
|
48125
48125
|
showRiver: this.options.showRiver
|
|
48126
48126
|
// ...this.extendsOptions,
|
|
48127
48127
|
// initCity: this.options.initCity,
|
|
48128
|
-
} : this.extendsOptions = Dt(
|
|
48128
|
+
} : this.extendsOptions = Dt(we({}, this.extendsOptions), {
|
|
48129
48129
|
initCity: this.options.initCity
|
|
48130
48130
|
}), this.pencilConfig = $z, this.pencilConfig.bloom = this.options.bloom;
|
|
48131
48131
|
}
|
|
@@ -48735,7 +48735,7 @@ class Mf extends A0 {
|
|
|
48735
48735
|
var s, l;
|
|
48736
48736
|
if (this.obj = yield this.editor.viewport.vis.drawController.draw(
|
|
48737
48737
|
this.objectType,
|
|
48738
|
-
Dt(
|
|
48738
|
+
Dt(we({}, this.objectOptions), {
|
|
48739
48739
|
key: `${this.id}`
|
|
48740
48740
|
})
|
|
48741
48741
|
), this.editor.viewport.vis.mList.objectList.has(this.obj.object3d))
|
|
@@ -49029,7 +49029,7 @@ class yU {
|
|
|
49029
49029
|
"VisFactories is not defined",
|
|
49030
49030
|
"add with vis.use({[type]:VisFactories})"
|
|
49031
49031
|
), new Error("VisFactories is not defined");
|
|
49032
|
-
const l = new s(this.container,
|
|
49032
|
+
const l = new s(this.container, we(we({
|
|
49033
49033
|
assetsPrefix: this.editor.assetsPrefix,
|
|
49034
49034
|
css2DContainer: this.editor.css2DContainer
|
|
49035
49035
|
}, t), this.extendsOptions));
|
|
@@ -49175,7 +49175,7 @@ const Fo = (i, e) => {
|
|
|
49175
49175
|
}), i.h.u[0] && i.h.u[0].visType === "city" && (i.h.u[0].visOptions.jsonName || (i.h.u = [])), i.h.u[0] && i.h.u[0].visType === "map") {
|
|
49176
49176
|
if (i.h.u[0].visOptions.geojson) {
|
|
49177
49177
|
const { geojson: n, adcode: s, geojsonLite: l } = i.h.u[0].visOptions;
|
|
49178
|
-
i.h.u[0].visOptions = Dt(
|
|
49178
|
+
i.h.u[0].visOptions = Dt(we({}, i.h.u[0].visOptions), {
|
|
49179
49179
|
geojsonMap: {
|
|
49180
49180
|
[s]: n
|
|
49181
49181
|
},
|
|
@@ -49186,7 +49186,7 @@ const Fo = (i, e) => {
|
|
|
49186
49186
|
}
|
|
49187
49187
|
if (i.h.u[0].visOptions.bbox) {
|
|
49188
49188
|
const { bbox: n, bboxMap: s, adcode: l } = i.h.u[0].visOptions;
|
|
49189
|
-
i.h.u[0].visOptions = Dt(
|
|
49189
|
+
i.h.u[0].visOptions = Dt(we({}, i.h.u[0].visOptions), {
|
|
49190
49190
|
bboxMap: s || {
|
|
49191
49191
|
[l]: n
|
|
49192
49192
|
}
|
|
@@ -49194,7 +49194,7 @@ const Fo = (i, e) => {
|
|
|
49194
49194
|
}
|
|
49195
49195
|
if (i.h.u[0].visOptions.worldBg) {
|
|
49196
49196
|
const { worldBg: n } = i.h.u[0].visOptions;
|
|
49197
|
-
i.h.u[0].visOptions = Dt(
|
|
49197
|
+
i.h.u[0].visOptions = Dt(we({}, i.h.u[0].visOptions), {
|
|
49198
49198
|
parentBg: n
|
|
49199
49199
|
}), delete i.h.u[0].visOptions.worldBg;
|
|
49200
49200
|
}
|
|
@@ -49282,7 +49282,7 @@ const VU = (t, ...n) => be(void 0, [t, ...n], function* (i, e = fl) {
|
|
|
49282
49282
|
);
|
|
49283
49283
|
const { res: r } = yield hs(
|
|
49284
49284
|
t + `/geojson/${d || "json-lite"}/${e.adcode}.json`
|
|
49285
|
-
), u = Hr(r), m = e.adcode, b = Dt(
|
|
49285
|
+
), u = Hr(r), m = e.adcode, b = Dt(we({}, e), {
|
|
49286
49286
|
geojsonMap: {
|
|
49287
49287
|
[m]: e.cityOnMap ? r : h
|
|
49288
49288
|
},
|
|
@@ -49325,7 +49325,7 @@ const VU = (t, ...n) => be(void 0, [t, ...n], function* (i, e = fl) {
|
|
|
49325
49325
|
}
|
|
49326
49326
|
return b;
|
|
49327
49327
|
}
|
|
49328
|
-
return
|
|
49328
|
+
return we({}, e);
|
|
49329
49329
|
}), RU = (t, ...n) => be(void 0, [t, ...n], function* (i, e = fl) {
|
|
49330
49330
|
const s = X0[i], l = yield fetch(
|
|
49331
49331
|
e + `/geojson/json-lite/${i}.json`
|
|
@@ -49440,7 +49440,7 @@ class eB {
|
|
|
49440
49440
|
}), a = [...n.objectList.keys()].filter((c) => n.objectList.get(c).selectHide !== !0).map((c) => {
|
|
49441
49441
|
const { name: d, meta: h } = n.objectList.get(c);
|
|
49442
49442
|
let r = !1;
|
|
49443
|
-
return h != null && h.baseObject && h.remove !== !1 && (r = !0), Dt(
|
|
49443
|
+
return h != null && h.baseObject && h.remove !== !1 && (r = !0), Dt(we({
|
|
49444
49444
|
uuid: d.replace(d[0], d[0].toLowerCase()),
|
|
49445
49445
|
object: c,
|
|
49446
49446
|
name: c.name
|