vis-core 0.19.16 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/index.d.ts +0 -2
- package/dist/index.js +10 -10
- package/dist/index.module.js +653 -623
- package/dist/version.d.ts +1 -1
- package/dist/vis/all/MaterialList.d.ts +31 -19
- package/dist/vis/map2/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -4,7 +4,7 @@ var aR = Object.getOwnPropertyDescriptors;
|
|
|
4
4
|
var N9 = Object.getOwnPropertySymbols, oR = Object.getPrototypeOf, cR = Object.prototype.hasOwnProperty, dR = Object.prototype.propertyIsEnumerable, rR = Reflect.get;
|
|
5
5
|
var uo = (s, t) => (t = Symbol[s]) ? t : Symbol.for("Symbol." + s), hR = (s) => {
|
|
6
6
|
throw TypeError(s);
|
|
7
|
-
}, Ns = Math.pow, Wm = (s, t, e) => t in s ? sR(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e,
|
|
7
|
+
}, Ns = Math.pow, Wm = (s, t, e) => t in s ? sR(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, Tt = (s, t) => {
|
|
8
8
|
for (var e in t || (t = {}))
|
|
9
9
|
cR.call(t, e) && Wm(s, e, t[e]);
|
|
10
10
|
if (N9)
|
|
@@ -12,7 +12,7 @@ var uo = (s, t) => (t = Symbol[s]) ? t : Symbol.for("Symbol." + s), hR = (s) =>
|
|
|
12
12
|
dR.call(t, e) && Wm(s, e, t[e]);
|
|
13
13
|
return s;
|
|
14
14
|
}, Be = (s, t) => lR(s, aR(t));
|
|
15
|
-
var
|
|
15
|
+
var O = (s, t, e) => Wm(s, typeof t != "symbol" ? t + "" : t, e);
|
|
16
16
|
var Ms = (s, t, e) => rR(oR(s), e, t);
|
|
17
17
|
var rt = (s, t, e) => new Promise((i, n) => {
|
|
18
18
|
var l = (c) => {
|
|
@@ -11231,7 +11231,7 @@ function dY(s, t, e, i, n, l, a) {
|
|
|
11231
11231
|
At = Le.vertexShader, at = Le.fragmentShader;
|
|
11232
11232
|
} else
|
|
11233
11233
|
At = C.vertexShader, at = C.fragmentShader, c.update(C), yt = c.getVertexShaderID(C), Vt = c.getFragmentShaderID(C);
|
|
11234
|
-
const Ct = s.getRenderTarget(), Et = w.isInstancedMesh === !0, $t = w.isBatchedMesh === !0, qt = !!C.map, he = !!C.matcap, v = !!E, ft = !!C.aoMap, gt = !!C.lightMap, Lt = !!C.bumpMap, pt = !!C.normalMap, ut = !!C.displacementMap, nt = !!C.emissiveMap, ct = !!C.metalnessMap, F = !!C.roughnessMap, S = C.anisotropy > 0,
|
|
11234
|
+
const Ct = s.getRenderTarget(), Et = w.isInstancedMesh === !0, $t = w.isBatchedMesh === !0, qt = !!C.map, he = !!C.matcap, v = !!E, ft = !!C.aoMap, gt = !!C.lightMap, Lt = !!C.bumpMap, pt = !!C.normalMap, ut = !!C.displacementMap, nt = !!C.emissiveMap, ct = !!C.metalnessMap, F = !!C.roughnessMap, S = C.anisotropy > 0, A = C.clearcoat > 0, it = C.dispersion > 0, ot = C.iridescence > 0, ht = C.sheen > 0, Kt = C.transmission > 0, Mt = S && !!C.anisotropyMap, kt = A && !!C.clearcoatMap, Dt = A && !!C.clearcoatNormalMap, xt = A && !!C.clearcoatRoughnessMap, zt = ot && !!C.iridescenceMap, Ge = ot && !!C.iridescenceThicknessMap, Qt = ht && !!C.sheenColorMap, Jt = ht && !!C.sheenRoughnessMap, ee = !!C.specularMap, te = !!C.specularColorMap, ye = !!C.specularIntensityMap, B = Kt && !!C.transmissionMap, Yt = Kt && !!C.thicknessMap, D = !!C.gradientMap, Gt = !!C.alphaMap, Ft = C.alphaTest > 0, ie = !!C.alphaHash, ge = !!C.extensions;
|
|
11235
11235
|
let c0 = Un;
|
|
11236
11236
|
C.toneMapped && (Ct === null || Ct.isXRRenderTarget === !0) && (c0 = s.toneMapping);
|
|
11237
11237
|
const W0 = {
|
|
@@ -11271,7 +11271,7 @@ function dY(s, t, e, i, n, l, a) {
|
|
|
11271
11271
|
roughnessMap: F,
|
|
11272
11272
|
anisotropy: S,
|
|
11273
11273
|
anisotropyMap: Mt,
|
|
11274
|
-
clearcoat:
|
|
11274
|
+
clearcoat: A,
|
|
11275
11275
|
clearcoatMap: kt,
|
|
11276
11276
|
clearcoatNormalMap: Dt,
|
|
11277
11277
|
clearcoatRoughnessMap: xt,
|
|
@@ -11288,10 +11288,10 @@ function dY(s, t, e, i, n, l, a) {
|
|
|
11288
11288
|
transmission: Kt,
|
|
11289
11289
|
transmissionMap: B,
|
|
11290
11290
|
thicknessMap: Yt,
|
|
11291
|
-
gradientMap:
|
|
11291
|
+
gradientMap: D,
|
|
11292
11292
|
opaque: C.transparent === !1 && C.blending === zn && C.alphaToCoverage === !1,
|
|
11293
11293
|
alphaMap: Gt,
|
|
11294
|
-
alphaTest:
|
|
11294
|
+
alphaTest: Ft,
|
|
11295
11295
|
alphaHash: ie,
|
|
11296
11296
|
combine: C.combine,
|
|
11297
11297
|
//
|
|
@@ -11944,35 +11944,35 @@ function gY(s) {
|
|
|
11944
11944
|
function t() {
|
|
11945
11945
|
let B = !1;
|
|
11946
11946
|
const Yt = new ae();
|
|
11947
|
-
let
|
|
11947
|
+
let D = null;
|
|
11948
11948
|
const Gt = new ae(0, 0, 0, 0);
|
|
11949
11949
|
return {
|
|
11950
|
-
setMask: function(
|
|
11951
|
-
|
|
11950
|
+
setMask: function(Ft) {
|
|
11951
|
+
D !== Ft && !B && (s.colorMask(Ft, Ft, Ft, Ft), D = Ft);
|
|
11952
11952
|
},
|
|
11953
|
-
setLocked: function(
|
|
11954
|
-
B =
|
|
11953
|
+
setLocked: function(Ft) {
|
|
11954
|
+
B = Ft;
|
|
11955
11955
|
},
|
|
11956
|
-
setClear: function(
|
|
11957
|
-
W0 === !0 && (
|
|
11956
|
+
setClear: function(Ft, ie, ge, c0, W0) {
|
|
11957
|
+
W0 === !0 && (Ft *= c0, ie *= c0, ge *= c0), Yt.set(Ft, ie, ge, c0), Gt.equals(Yt) === !1 && (s.clearColor(Ft, ie, ge, c0), Gt.copy(Yt));
|
|
11958
11958
|
},
|
|
11959
11959
|
reset: function() {
|
|
11960
|
-
B = !1,
|
|
11960
|
+
B = !1, D = null, Gt.set(-1, 0, 0, 0);
|
|
11961
11961
|
}
|
|
11962
11962
|
};
|
|
11963
11963
|
}
|
|
11964
11964
|
function e() {
|
|
11965
|
-
let B = !1, Yt = null,
|
|
11965
|
+
let B = !1, Yt = null, D = null, Gt = null;
|
|
11966
11966
|
return {
|
|
11967
|
-
setTest: function(
|
|
11968
|
-
|
|
11967
|
+
setTest: function(Ft) {
|
|
11968
|
+
Ft ? Vt(s.DEPTH_TEST) : Ct(s.DEPTH_TEST);
|
|
11969
11969
|
},
|
|
11970
|
-
setMask: function(
|
|
11971
|
-
Yt !==
|
|
11970
|
+
setMask: function(Ft) {
|
|
11971
|
+
Yt !== Ft && !B && (s.depthMask(Ft), Yt = Ft);
|
|
11972
11972
|
},
|
|
11973
|
-
setFunc: function(
|
|
11974
|
-
if (
|
|
11975
|
-
switch (
|
|
11973
|
+
setFunc: function(Ft) {
|
|
11974
|
+
if (D !== Ft) {
|
|
11975
|
+
switch (Ft) {
|
|
11976
11976
|
case Sy:
|
|
11977
11977
|
s.depthFunc(s.NEVER);
|
|
11978
11978
|
break;
|
|
@@ -12000,22 +12000,22 @@ function gY(s) {
|
|
|
12000
12000
|
default:
|
|
12001
12001
|
s.depthFunc(s.LEQUAL);
|
|
12002
12002
|
}
|
|
12003
|
-
|
|
12003
|
+
D = Ft;
|
|
12004
12004
|
}
|
|
12005
12005
|
},
|
|
12006
|
-
setLocked: function(
|
|
12007
|
-
B =
|
|
12006
|
+
setLocked: function(Ft) {
|
|
12007
|
+
B = Ft;
|
|
12008
12008
|
},
|
|
12009
|
-
setClear: function(
|
|
12010
|
-
Gt !==
|
|
12009
|
+
setClear: function(Ft) {
|
|
12010
|
+
Gt !== Ft && (s.clearDepth(Ft), Gt = Ft);
|
|
12011
12011
|
},
|
|
12012
12012
|
reset: function() {
|
|
12013
|
-
B = !1, Yt = null,
|
|
12013
|
+
B = !1, Yt = null, D = null, Gt = null;
|
|
12014
12014
|
}
|
|
12015
12015
|
};
|
|
12016
12016
|
}
|
|
12017
12017
|
function i() {
|
|
12018
|
-
let B = !1, Yt = null,
|
|
12018
|
+
let B = !1, Yt = null, D = null, Gt = null, Ft = null, ie = null, ge = null, c0 = null, W0 = null;
|
|
12019
12019
|
return {
|
|
12020
12020
|
setTest: function(Le) {
|
|
12021
12021
|
B || (Le ? Vt(s.STENCIL_TEST) : Ct(s.STENCIL_TEST));
|
|
@@ -12024,7 +12024,7 @@ function gY(s) {
|
|
|
12024
12024
|
Yt !== Le && !B && (s.stencilMask(Le), Yt = Le);
|
|
12025
12025
|
},
|
|
12026
12026
|
setFunc: function(Le, Hi, xi) {
|
|
12027
|
-
(
|
|
12027
|
+
(D !== Le || Gt !== Hi || Ft !== xi) && (s.stencilFunc(Le, Hi, xi), D = Le, Gt = Hi, Ft = xi);
|
|
12028
12028
|
},
|
|
12029
12029
|
setOp: function(Le, Hi, xi) {
|
|
12030
12030
|
(ie !== Le || ge !== Hi || c0 !== xi) && (s.stencilOp(Le, Hi, xi), ie = Le, ge = Hi, c0 = xi);
|
|
@@ -12036,7 +12036,7 @@ function gY(s) {
|
|
|
12036
12036
|
W0 !== Le && (s.clearStencil(Le), W0 = Le);
|
|
12037
12037
|
},
|
|
12038
12038
|
reset: function() {
|
|
12039
|
-
B = !1, Yt = null,
|
|
12039
|
+
B = !1, Yt = null, D = null, Gt = null, Ft = null, ie = null, ge = null, c0 = null, W0 = null;
|
|
12040
12040
|
}
|
|
12041
12041
|
};
|
|
12042
12042
|
}
|
|
@@ -12048,11 +12048,11 @@ function gY(s) {
|
|
|
12048
12048
|
E.indexOf("WebGL") !== -1 ? (z = parseFloat(/^WebGL (\d)/.exec(E)[1]), J = z >= 1) : E.indexOf("OpenGL ES") !== -1 && (z = parseFloat(/^OpenGL ES (\d)/.exec(E)[1]), J = z >= 2);
|
|
12049
12049
|
let Q = null, et = {};
|
|
12050
12050
|
const Xt = s.getParameter(s.SCISSOR_BOX), Wt = s.getParameter(s.VIEWPORT), Bt = new ae().fromArray(Xt), At = new ae().fromArray(Wt);
|
|
12051
|
-
function at(B, Yt,
|
|
12052
|
-
const
|
|
12051
|
+
function at(B, Yt, D, Gt) {
|
|
12052
|
+
const Ft = new Uint8Array(4), ie = s.createTexture();
|
|
12053
12053
|
s.bindTexture(B, ie), s.texParameteri(B, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(B, s.TEXTURE_MAG_FILTER, s.NEAREST);
|
|
12054
|
-
for (let ge = 0; ge <
|
|
12055
|
-
B === s.TEXTURE_3D || B === s.TEXTURE_2D_ARRAY ? s.texImage3D(Yt, 0, s.RGBA, 1, 1, Gt, 0, s.RGBA, s.UNSIGNED_BYTE,
|
|
12054
|
+
for (let ge = 0; ge < D; ge++)
|
|
12055
|
+
B === s.TEXTURE_3D || B === s.TEXTURE_2D_ARRAY ? s.texImage3D(Yt, 0, s.RGBA, 1, 1, Gt, 0, s.RGBA, s.UNSIGNED_BYTE, Ft) : s.texImage2D(Yt + ge, 0, s.RGBA, 1, 1, 0, s.RGBA, s.UNSIGNED_BYTE, Ft);
|
|
12056
12056
|
return ie;
|
|
12057
12057
|
}
|
|
12058
12058
|
const yt = {};
|
|
@@ -12067,18 +12067,18 @@ function gY(s) {
|
|
|
12067
12067
|
return h[B] !== Yt ? (s.bindFramebuffer(B, Yt), h[B] = Yt, B === s.DRAW_FRAMEBUFFER && (h[s.FRAMEBUFFER] = Yt), B === s.FRAMEBUFFER && (h[s.DRAW_FRAMEBUFFER] = Yt), !0) : !1;
|
|
12068
12068
|
}
|
|
12069
12069
|
function $t(B, Yt) {
|
|
12070
|
-
let
|
|
12070
|
+
let D = u, Gt = !1;
|
|
12071
12071
|
if (B) {
|
|
12072
|
-
|
|
12073
|
-
const
|
|
12074
|
-
if (
|
|
12075
|
-
for (let ie = 0, ge =
|
|
12076
|
-
|
|
12077
|
-
|
|
12072
|
+
D = r.get(Yt), D === void 0 && (D = [], r.set(Yt, D));
|
|
12073
|
+
const Ft = B.textures;
|
|
12074
|
+
if (D.length !== Ft.length || D[0] !== s.COLOR_ATTACHMENT0) {
|
|
12075
|
+
for (let ie = 0, ge = Ft.length; ie < ge; ie++)
|
|
12076
|
+
D[ie] = s.COLOR_ATTACHMENT0 + ie;
|
|
12077
|
+
D.length = Ft.length, Gt = !0;
|
|
12078
12078
|
}
|
|
12079
12079
|
} else
|
|
12080
|
-
|
|
12081
|
-
Gt && s.drawBuffers(
|
|
12080
|
+
D[0] !== s.BACK && (D[0] = s.BACK, Gt = !0);
|
|
12081
|
+
Gt && s.drawBuffers(D);
|
|
12082
12082
|
}
|
|
12083
12083
|
function qt(B) {
|
|
12084
12084
|
return m !== B ? (s.useProgram(B), m = B, !0) : !1;
|
|
@@ -12106,7 +12106,7 @@ function gY(s) {
|
|
|
12106
12106
|
[xy]: s.CONSTANT_ALPHA,
|
|
12107
12107
|
[Cy]: s.ONE_MINUS_CONSTANT_ALPHA
|
|
12108
12108
|
};
|
|
12109
|
-
function ft(B, Yt,
|
|
12109
|
+
function ft(B, Yt, D, Gt, Ft, ie, ge, c0, W0, Le) {
|
|
12110
12110
|
if (B === Xn) {
|
|
12111
12111
|
b === !0 && (Ct(s.BLEND), b = !1);
|
|
12112
12112
|
return;
|
|
@@ -12153,12 +12153,12 @@ function gY(s) {
|
|
|
12153
12153
|
}
|
|
12154
12154
|
return;
|
|
12155
12155
|
}
|
|
12156
|
-
|
|
12156
|
+
Ft = Ft || Yt, ie = ie || D, ge = ge || Gt, (Yt !== Z || Ft !== X) && (s.blendEquationSeparate(he[Yt], he[Ft]), Z = Yt, X = Ft), (D !== p || Gt !== y || ie !== W || ge !== g) && (s.blendFuncSeparate(v[D], v[Gt], v[ie], v[ge]), p = D, y = Gt, W = ie, g = ge), (c0.equals(f) === !1 || W0 !== L) && (s.blendColor(c0.r, c0.g, c0.b, W0), f.copy(c0), L = W0), G = B, N = !1;
|
|
12157
12157
|
}
|
|
12158
12158
|
function gt(B, Yt) {
|
|
12159
12159
|
B.side === Qe ? Ct(s.CULL_FACE) : Vt(s.CULL_FACE);
|
|
12160
|
-
let
|
|
12161
|
-
Yt && (
|
|
12160
|
+
let D = B.side === Y0;
|
|
12161
|
+
Yt && (D = !D), Lt(D), B.blending === zn && B.transparent === !1 ? ft(Xn) : ft(B.blending, B.blendEquation, B.blendSrc, B.blendDst, B.blendEquationAlpha, B.blendSrcAlpha, B.blendDstAlpha, B.blendColor, B.blendAlpha, B.premultipliedAlpha), l.setFunc(B.depthFunc), l.setTest(B.depthTest), l.setMask(B.depthWrite), n.setMask(B.colorWrite);
|
|
12162
12162
|
const Gt = B.stencilWrite;
|
|
12163
12163
|
a.setTest(Gt), Gt && (a.setMask(B.stencilWriteMask), a.setFunc(B.stencilFunc, B.stencilRef, B.stencilFuncMask), a.setOp(B.stencilFail, B.stencilZFail, B.stencilZPass)), nt(B.polygonOffset, B.polygonOffsetFactor, B.polygonOffsetUnits), B.alphaToCoverage === !0 ? Vt(s.SAMPLE_ALPHA_TO_COVERAGE) : Ct(s.SAMPLE_ALPHA_TO_COVERAGE);
|
|
12164
12164
|
}
|
|
@@ -12171,8 +12171,8 @@ function gY(s) {
|
|
|
12171
12171
|
function ut(B) {
|
|
12172
12172
|
B !== M && (J && s.lineWidth(B), M = B);
|
|
12173
12173
|
}
|
|
12174
|
-
function nt(B, Yt,
|
|
12175
|
-
B ? (Vt(s.POLYGON_OFFSET_FILL), (k !== Yt || w !==
|
|
12174
|
+
function nt(B, Yt, D) {
|
|
12175
|
+
B ? (Vt(s.POLYGON_OFFSET_FILL), (k !== Yt || w !== D) && (s.polygonOffset(Yt, D), k = Yt, w = D)) : Ct(s.POLYGON_OFFSET_FILL);
|
|
12176
12176
|
}
|
|
12177
12177
|
function ct(B) {
|
|
12178
12178
|
B ? Vt(s.SCISSOR_TEST) : Ct(s.SCISSOR_TEST);
|
|
@@ -12180,12 +12180,12 @@ function gY(s) {
|
|
|
12180
12180
|
function F(B) {
|
|
12181
12181
|
B === void 0 && (B = s.TEXTURE0 + K - 1), Q !== B && (s.activeTexture(B), Q = B);
|
|
12182
12182
|
}
|
|
12183
|
-
function S(B, Yt,
|
|
12184
|
-
|
|
12185
|
-
let Gt = et[
|
|
12186
|
-
Gt === void 0 && (Gt = { type: void 0, texture: void 0 }, et[
|
|
12183
|
+
function S(B, Yt, D) {
|
|
12184
|
+
D === void 0 && (Q === null ? D = s.TEXTURE0 + K - 1 : D = Q);
|
|
12185
|
+
let Gt = et[D];
|
|
12186
|
+
Gt === void 0 && (Gt = { type: void 0, texture: void 0 }, et[D] = Gt), (Gt.type !== B || Gt.texture !== Yt) && (Q !== D && (s.activeTexture(D), Q = D), s.bindTexture(B, Yt || yt[B]), Gt.type = B, Gt.texture = Yt);
|
|
12187
12187
|
}
|
|
12188
|
-
function
|
|
12188
|
+
function A() {
|
|
12189
12189
|
const B = et[Q];
|
|
12190
12190
|
B !== void 0 && B.type !== void 0 && (s.bindTexture(B.type, null), B.type = void 0, B.texture = void 0);
|
|
12191
12191
|
}
|
|
@@ -12266,10 +12266,10 @@ function gY(s) {
|
|
|
12266
12266
|
At.equals(B) === !1 && (s.viewport(B.x, B.y, B.z, B.w), At.copy(B));
|
|
12267
12267
|
}
|
|
12268
12268
|
function ee(B, Yt) {
|
|
12269
|
-
let
|
|
12270
|
-
|
|
12271
|
-
let Gt =
|
|
12272
|
-
Gt === void 0 && (Gt = s.getUniformBlockIndex(Yt, B.name),
|
|
12269
|
+
let D = c.get(Yt);
|
|
12270
|
+
D === void 0 && (D = /* @__PURE__ */ new WeakMap(), c.set(Yt, D));
|
|
12271
|
+
let Gt = D.get(B);
|
|
12272
|
+
Gt === void 0 && (Gt = s.getUniformBlockIndex(Yt, B.name), D.set(B, Gt));
|
|
12273
12273
|
}
|
|
12274
12274
|
function te(B, Yt) {
|
|
12275
12275
|
const Gt = c.get(Yt).get(B);
|
|
@@ -12298,7 +12298,7 @@ function gY(s) {
|
|
|
12298
12298
|
setScissorTest: ct,
|
|
12299
12299
|
activeTexture: F,
|
|
12300
12300
|
bindTexture: S,
|
|
12301
|
-
unbindTexture:
|
|
12301
|
+
unbindTexture: A,
|
|
12302
12302
|
compressedTexImage2D: it,
|
|
12303
12303
|
compressedTexImage3D: ot,
|
|
12304
12304
|
texImage2D: zt,
|
|
@@ -12452,10 +12452,10 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12452
12452
|
new OffscreenCanvas(F, S)
|
|
12453
12453
|
) : uc("canvas");
|
|
12454
12454
|
}
|
|
12455
|
-
function G(F, S,
|
|
12455
|
+
function G(F, S, A) {
|
|
12456
12456
|
let it = 1;
|
|
12457
12457
|
const ot = ct(F);
|
|
12458
|
-
if ((ot.width >
|
|
12458
|
+
if ((ot.width > A || ot.height > A) && (it = A / Math.max(ot.width, ot.height)), it < 1)
|
|
12459
12459
|
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) {
|
|
12460
12460
|
const ht = Math.floor(it * ot.width), Kt = Math.floor(it * ot.height);
|
|
12461
12461
|
r === void 0 && (r = b(ht, Kt));
|
|
@@ -12471,21 +12471,21 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12471
12471
|
function p(F) {
|
|
12472
12472
|
s.generateMipmap(F);
|
|
12473
12473
|
}
|
|
12474
|
-
function y(F, S,
|
|
12474
|
+
function y(F, S, A, it, ot = !1) {
|
|
12475
12475
|
if (F !== null) {
|
|
12476
12476
|
if (s[F] !== void 0) return s[F];
|
|
12477
12477
|
console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + F + "'");
|
|
12478
12478
|
}
|
|
12479
12479
|
let ht = S;
|
|
12480
|
-
if (S === s.RED && (
|
|
12480
|
+
if (S === s.RED && (A === s.FLOAT && (ht = s.R32F), A === s.HALF_FLOAT && (ht = s.R16F), A === s.UNSIGNED_BYTE && (ht = s.R8)), S === s.RED_INTEGER && (A === s.UNSIGNED_BYTE && (ht = s.R8UI), A === s.UNSIGNED_SHORT && (ht = s.R16UI), A === s.UNSIGNED_INT && (ht = s.R32UI), A === s.BYTE && (ht = s.R8I), A === s.SHORT && (ht = s.R16I), A === s.INT && (ht = s.R32I)), S === s.RG && (A === s.FLOAT && (ht = s.RG32F), A === s.HALF_FLOAT && (ht = s.RG16F), A === s.UNSIGNED_BYTE && (ht = s.RG8)), S === s.RG_INTEGER && (A === s.UNSIGNED_BYTE && (ht = s.RG8UI), A === s.UNSIGNED_SHORT && (ht = s.RG16UI), A === s.UNSIGNED_INT && (ht = s.RG32UI), A === s.BYTE && (ht = s.RG8I), A === s.SHORT && (ht = s.RG16I), A === s.INT && (ht = s.RG32I)), S === s.RGB && A === s.UNSIGNED_INT_5_9_9_9_REV && (ht = s.RGB9_E5), S === s.RGBA) {
|
|
12481
12481
|
const Kt = ot ? oc : fe.getTransfer(it);
|
|
12482
|
-
|
|
12482
|
+
A === s.FLOAT && (ht = s.RGBA32F), A === s.HALF_FLOAT && (ht = s.RGBA16F), A === s.UNSIGNED_BYTE && (ht = Kt === Pe ? s.SRGB8_ALPHA8 : s.RGBA8), A === s.UNSIGNED_SHORT_4_4_4_4 && (ht = s.RGBA4), A === s.UNSIGNED_SHORT_5_5_5_1 && (ht = s.RGB5_A1);
|
|
12483
12483
|
}
|
|
12484
12484
|
return (ht === s.R16F || ht === s.R32F || ht === s.RG16F || ht === s.RG32F || ht === s.RGBA16F || ht === s.RGBA32F) && t.get("EXT_color_buffer_float"), ht;
|
|
12485
12485
|
}
|
|
12486
12486
|
function X(F, S) {
|
|
12487
|
-
let
|
|
12488
|
-
return F ? S === null || S === An || S === Wl ?
|
|
12487
|
+
let A;
|
|
12488
|
+
return F ? S === null || S === An || S === Wl ? A = s.DEPTH24_STENCIL8 : S === V0 ? A = s.DEPTH32F_STENCIL8 : S === Ma && (A = s.DEPTH24_STENCIL8, console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : S === null || S === An || S === Wl ? A = s.DEPTH_COMPONENT24 : S === V0 ? A = s.DEPTH_COMPONENT32F : S === Ma && (A = s.DEPTH_COMPONENT16), A;
|
|
12489
12489
|
}
|
|
12490
12490
|
function W(F, S) {
|
|
12491
12491
|
return Z(F) === !0 || F.isFramebufferTexture && F.minFilter !== Ae && F.minFilter !== Je ? Math.log2(Math.max(S.width, S.height)) + 1 : F.mipmaps !== void 0 && F.mipmaps.length > 0 ? F.mipmaps.length : F.isCompressedTexture && Array.isArray(F.image) ? S.mipmaps.length : 1;
|
|
@@ -12501,17 +12501,17 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12501
12501
|
function L(F) {
|
|
12502
12502
|
const S = i.get(F);
|
|
12503
12503
|
if (S.__webglInit === void 0) return;
|
|
12504
|
-
const
|
|
12504
|
+
const A = F.source, it = u.get(A);
|
|
12505
12505
|
if (it) {
|
|
12506
12506
|
const ot = it[S.__cacheKey];
|
|
12507
|
-
ot.usedTimes--, ot.usedTimes === 0 && N(F), Object.keys(it).length === 0 && u.delete(
|
|
12507
|
+
ot.usedTimes--, ot.usedTimes === 0 && N(F), Object.keys(it).length === 0 && u.delete(A);
|
|
12508
12508
|
}
|
|
12509
12509
|
i.remove(F);
|
|
12510
12510
|
}
|
|
12511
12511
|
function N(F) {
|
|
12512
12512
|
const S = i.get(F);
|
|
12513
12513
|
s.deleteTexture(S.__webglTexture);
|
|
12514
|
-
const
|
|
12514
|
+
const A = F.source, it = u.get(A);
|
|
12515
12515
|
delete it[S.__cacheKey], a.memory.textures--;
|
|
12516
12516
|
}
|
|
12517
12517
|
function C(F) {
|
|
@@ -12534,10 +12534,10 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12534
12534
|
S.__webglColorRenderbuffer[it] && s.deleteRenderbuffer(S.__webglColorRenderbuffer[it]);
|
|
12535
12535
|
S.__webglDepthRenderbuffer && s.deleteRenderbuffer(S.__webglDepthRenderbuffer);
|
|
12536
12536
|
}
|
|
12537
|
-
const
|
|
12538
|
-
for (let it = 0, ot =
|
|
12539
|
-
const ht = i.get(
|
|
12540
|
-
ht.__webglTexture && (s.deleteTexture(ht.__webglTexture), a.memory.textures--), i.remove(
|
|
12537
|
+
const A = F.textures;
|
|
12538
|
+
for (let it = 0, ot = A.length; it < ot; it++) {
|
|
12539
|
+
const ht = i.get(A[it]);
|
|
12540
|
+
ht.__webglTexture && (s.deleteTexture(ht.__webglTexture), a.memory.textures--), i.remove(A[it]);
|
|
12541
12541
|
}
|
|
12542
12542
|
i.remove(F);
|
|
12543
12543
|
}
|
|
@@ -12554,43 +12554,43 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12554
12554
|
return S.push(F.wrapS), S.push(F.wrapT), S.push(F.wrapR || 0), S.push(F.magFilter), S.push(F.minFilter), S.push(F.anisotropy), S.push(F.internalFormat), S.push(F.format), S.push(F.type), S.push(F.generateMipmaps), S.push(F.premultiplyAlpha), S.push(F.flipY), S.push(F.unpackAlignment), S.push(F.colorSpace), S.join();
|
|
12555
12555
|
}
|
|
12556
12556
|
function K(F, S) {
|
|
12557
|
-
const
|
|
12558
|
-
if (F.isVideoTexture && ut(F), F.isRenderTargetTexture === !1 && F.version > 0 &&
|
|
12557
|
+
const A = i.get(F);
|
|
12558
|
+
if (F.isVideoTexture && ut(F), F.isRenderTargetTexture === !1 && F.version > 0 && A.__version !== F.version) {
|
|
12559
12559
|
const it = F.image;
|
|
12560
12560
|
if (it === null)
|
|
12561
12561
|
console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");
|
|
12562
12562
|
else if (it.complete === !1)
|
|
12563
12563
|
console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");
|
|
12564
12564
|
else {
|
|
12565
|
-
At(
|
|
12565
|
+
At(A, F, S);
|
|
12566
12566
|
return;
|
|
12567
12567
|
}
|
|
12568
12568
|
}
|
|
12569
|
-
e.bindTexture(s.TEXTURE_2D,
|
|
12569
|
+
e.bindTexture(s.TEXTURE_2D, A.__webglTexture, s.TEXTURE0 + S);
|
|
12570
12570
|
}
|
|
12571
12571
|
function J(F, S) {
|
|
12572
|
-
const
|
|
12573
|
-
if (F.version > 0 &&
|
|
12574
|
-
At(
|
|
12572
|
+
const A = i.get(F);
|
|
12573
|
+
if (F.version > 0 && A.__version !== F.version) {
|
|
12574
|
+
At(A, F, S);
|
|
12575
12575
|
return;
|
|
12576
12576
|
}
|
|
12577
|
-
e.bindTexture(s.TEXTURE_2D_ARRAY,
|
|
12577
|
+
e.bindTexture(s.TEXTURE_2D_ARRAY, A.__webglTexture, s.TEXTURE0 + S);
|
|
12578
12578
|
}
|
|
12579
12579
|
function z(F, S) {
|
|
12580
|
-
const
|
|
12581
|
-
if (F.version > 0 &&
|
|
12582
|
-
At(
|
|
12580
|
+
const A = i.get(F);
|
|
12581
|
+
if (F.version > 0 && A.__version !== F.version) {
|
|
12582
|
+
At(A, F, S);
|
|
12583
12583
|
return;
|
|
12584
12584
|
}
|
|
12585
|
-
e.bindTexture(s.TEXTURE_3D,
|
|
12585
|
+
e.bindTexture(s.TEXTURE_3D, A.__webglTexture, s.TEXTURE0 + S);
|
|
12586
12586
|
}
|
|
12587
12587
|
function E(F, S) {
|
|
12588
|
-
const
|
|
12589
|
-
if (F.version > 0 &&
|
|
12590
|
-
at(
|
|
12588
|
+
const A = i.get(F);
|
|
12589
|
+
if (F.version > 0 && A.__version !== F.version) {
|
|
12590
|
+
at(A, F, S);
|
|
12591
12591
|
return;
|
|
12592
12592
|
}
|
|
12593
|
-
e.bindTexture(s.TEXTURE_CUBE_MAP,
|
|
12593
|
+
e.bindTexture(s.TEXTURE_CUBE_MAP, A.__webglTexture, s.TEXTURE0 + S);
|
|
12594
12594
|
}
|
|
12595
12595
|
const Q = {
|
|
12596
12596
|
[Re]: s.REPEAT,
|
|
@@ -12617,13 +12617,13 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12617
12617
|
if (S.type === V0 && t.has("OES_texture_float_linear") === !1 && (S.magFilter === Je || S.magFilter === dl || S.magFilter === Zs || S.magFilter === Vi || S.minFilter === Je || S.minFilter === dl || S.minFilter === Zs || S.minFilter === Vi) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), s.texParameteri(F, s.TEXTURE_WRAP_S, Q[S.wrapS]), s.texParameteri(F, s.TEXTURE_WRAP_T, Q[S.wrapT]), (F === s.TEXTURE_3D || F === s.TEXTURE_2D_ARRAY) && s.texParameteri(F, s.TEXTURE_WRAP_R, Q[S.wrapR]), s.texParameteri(F, s.TEXTURE_MAG_FILTER, et[S.magFilter]), s.texParameteri(F, s.TEXTURE_MIN_FILTER, et[S.minFilter]), S.compareFunction && (s.texParameteri(F, s.TEXTURE_COMPARE_MODE, s.COMPARE_REF_TO_TEXTURE), s.texParameteri(F, s.TEXTURE_COMPARE_FUNC, Xt[S.compareFunction])), t.has("EXT_texture_filter_anisotropic") === !0) {
|
|
12618
12618
|
if (S.magFilter === Ae || S.minFilter !== Zs && S.minFilter !== Vi || S.type === V0 && t.has("OES_texture_float_linear") === !1) return;
|
|
12619
12619
|
if (S.anisotropy > 1 || i.get(S).__currentAnisotropy) {
|
|
12620
|
-
const
|
|
12621
|
-
s.texParameterf(F,
|
|
12620
|
+
const A = t.get("EXT_texture_filter_anisotropic");
|
|
12621
|
+
s.texParameterf(F, A.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(S.anisotropy, n.getMaxAnisotropy())), i.get(S).__currentAnisotropy = S.anisotropy;
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
}
|
|
12625
12625
|
function Bt(F, S) {
|
|
12626
|
-
let
|
|
12626
|
+
let A = !1;
|
|
12627
12627
|
F.__webglInit === void 0 && (F.__webglInit = !0, S.addEventListener("dispose", g));
|
|
12628
12628
|
const it = S.source;
|
|
12629
12629
|
let ot = u.get(it);
|
|
@@ -12633,20 +12633,20 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12633
12633
|
ot[ht] === void 0 && (ot[ht] = {
|
|
12634
12634
|
texture: s.createTexture(),
|
|
12635
12635
|
usedTimes: 0
|
|
12636
|
-
}, a.memory.textures++,
|
|
12636
|
+
}, a.memory.textures++, A = !0), ot[ht].usedTimes++;
|
|
12637
12637
|
const Kt = ot[F.__cacheKey];
|
|
12638
12638
|
Kt !== void 0 && (ot[F.__cacheKey].usedTimes--, Kt.usedTimes === 0 && N(S)), F.__cacheKey = ht, F.__webglTexture = ot[ht].texture;
|
|
12639
12639
|
}
|
|
12640
|
-
return
|
|
12640
|
+
return A;
|
|
12641
12641
|
}
|
|
12642
|
-
function At(F, S,
|
|
12642
|
+
function At(F, S, A) {
|
|
12643
12643
|
let it = s.TEXTURE_2D;
|
|
12644
12644
|
(S.isDataArrayTexture || S.isCompressedArrayTexture) && (it = s.TEXTURE_2D_ARRAY), S.isData3DTexture && (it = s.TEXTURE_3D);
|
|
12645
12645
|
const ot = Bt(F, S), ht = S.source;
|
|
12646
|
-
e.bindTexture(it, F.__webglTexture, s.TEXTURE0 +
|
|
12646
|
+
e.bindTexture(it, F.__webglTexture, s.TEXTURE0 + A);
|
|
12647
12647
|
const Kt = i.get(ht);
|
|
12648
12648
|
if (ht.version !== Kt.__version || ot === !0) {
|
|
12649
|
-
e.activeTexture(s.TEXTURE0 +
|
|
12649
|
+
e.activeTexture(s.TEXTURE0 + A);
|
|
12650
12650
|
const Mt = fe.getPrimaries(fe.workingColorSpace), kt = S.colorSpace === Ni ? null : fe.getPrimaries(S.colorSpace), Dt = S.colorSpace === Ni || Mt === kt ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
12651
12651
|
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, S.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, S.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, S.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, Dt);
|
|
12652
12652
|
let xt = G(S.image, !1, n.maxTextureSize);
|
|
@@ -12661,53 +12661,53 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12661
12661
|
else if (S.isDataTexture)
|
|
12662
12662
|
if (ee.length > 0) {
|
|
12663
12663
|
te && ye && e.texStorage2D(s.TEXTURE_2D, Yt, Qt, ee[0].width, ee[0].height);
|
|
12664
|
-
for (let
|
|
12665
|
-
Jt = ee[
|
|
12664
|
+
for (let D = 0, Gt = ee.length; D < Gt; D++)
|
|
12665
|
+
Jt = ee[D], te ? B && e.texSubImage2D(s.TEXTURE_2D, D, 0, 0, Jt.width, Jt.height, zt, Ge, Jt.data) : e.texImage2D(s.TEXTURE_2D, D, Qt, Jt.width, Jt.height, 0, zt, Ge, Jt.data);
|
|
12666
12666
|
S.generateMipmaps = !1;
|
|
12667
12667
|
} else
|
|
12668
12668
|
te ? (ye && e.texStorage2D(s.TEXTURE_2D, Yt, Qt, xt.width, xt.height), B && e.texSubImage2D(s.TEXTURE_2D, 0, 0, 0, xt.width, xt.height, zt, Ge, xt.data)) : e.texImage2D(s.TEXTURE_2D, 0, Qt, xt.width, xt.height, 0, zt, Ge, xt.data);
|
|
12669
12669
|
else if (S.isCompressedTexture)
|
|
12670
12670
|
if (S.isCompressedArrayTexture) {
|
|
12671
12671
|
te && ye && e.texStorage3D(s.TEXTURE_2D_ARRAY, Yt, Qt, ee[0].width, ee[0].height, xt.depth);
|
|
12672
|
-
for (let
|
|
12673
|
-
if (Jt = ee[
|
|
12672
|
+
for (let D = 0, Gt = ee.length; D < Gt; D++)
|
|
12673
|
+
if (Jt = ee[D], S.format !== X0)
|
|
12674
12674
|
if (zt !== null)
|
|
12675
12675
|
if (te) {
|
|
12676
12676
|
if (B)
|
|
12677
12677
|
if (S.layerUpdates.size > 0) {
|
|
12678
|
-
const
|
|
12678
|
+
const Ft = Gp(Jt.width, Jt.height, S.format, S.type);
|
|
12679
12679
|
for (const ie of S.layerUpdates) {
|
|
12680
12680
|
const ge = Jt.data.subarray(
|
|
12681
|
-
ie *
|
|
12682
|
-
(ie + 1) *
|
|
12681
|
+
ie * Ft / Jt.data.BYTES_PER_ELEMENT,
|
|
12682
|
+
(ie + 1) * Ft / Jt.data.BYTES_PER_ELEMENT
|
|
12683
12683
|
);
|
|
12684
|
-
e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,
|
|
12684
|
+
e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY, D, 0, 0, ie, Jt.width, Jt.height, 1, zt, ge, 0, 0);
|
|
12685
12685
|
}
|
|
12686
12686
|
S.clearLayerUpdates();
|
|
12687
12687
|
} else
|
|
12688
|
-
e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,
|
|
12688
|
+
e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY, D, 0, 0, 0, Jt.width, Jt.height, xt.depth, zt, Jt.data, 0, 0);
|
|
12689
12689
|
} else
|
|
12690
|
-
e.compressedTexImage3D(s.TEXTURE_2D_ARRAY,
|
|
12690
|
+
e.compressedTexImage3D(s.TEXTURE_2D_ARRAY, D, Qt, Jt.width, Jt.height, xt.depth, 0, Jt.data, 0, 0);
|
|
12691
12691
|
else
|
|
12692
12692
|
console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
|
|
12693
12693
|
else
|
|
12694
|
-
te ? B && e.texSubImage3D(s.TEXTURE_2D_ARRAY,
|
|
12694
|
+
te ? B && e.texSubImage3D(s.TEXTURE_2D_ARRAY, D, 0, 0, 0, Jt.width, Jt.height, xt.depth, zt, Ge, Jt.data) : e.texImage3D(s.TEXTURE_2D_ARRAY, D, Qt, Jt.width, Jt.height, xt.depth, 0, zt, Ge, Jt.data);
|
|
12695
12695
|
} else {
|
|
12696
12696
|
te && ye && e.texStorage2D(s.TEXTURE_2D, Yt, Qt, ee[0].width, ee[0].height);
|
|
12697
|
-
for (let
|
|
12698
|
-
Jt = ee[
|
|
12697
|
+
for (let D = 0, Gt = ee.length; D < Gt; D++)
|
|
12698
|
+
Jt = ee[D], S.format !== X0 ? zt !== null ? te ? B && e.compressedTexSubImage2D(s.TEXTURE_2D, D, 0, 0, Jt.width, Jt.height, zt, Jt.data) : e.compressedTexImage2D(s.TEXTURE_2D, D, Qt, Jt.width, Jt.height, 0, Jt.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : te ? B && e.texSubImage2D(s.TEXTURE_2D, D, 0, 0, Jt.width, Jt.height, zt, Ge, Jt.data) : e.texImage2D(s.TEXTURE_2D, D, Qt, Jt.width, Jt.height, 0, zt, Ge, Jt.data);
|
|
12699
12699
|
}
|
|
12700
12700
|
else if (S.isDataArrayTexture)
|
|
12701
12701
|
if (te) {
|
|
12702
12702
|
if (ye && e.texStorage3D(s.TEXTURE_2D_ARRAY, Yt, Qt, xt.width, xt.height, xt.depth), B)
|
|
12703
12703
|
if (S.layerUpdates.size > 0) {
|
|
12704
|
-
const
|
|
12704
|
+
const D = Gp(xt.width, xt.height, S.format, S.type);
|
|
12705
12705
|
for (const Gt of S.layerUpdates) {
|
|
12706
|
-
const
|
|
12707
|
-
Gt *
|
|
12708
|
-
(Gt + 1) *
|
|
12706
|
+
const Ft = xt.data.subarray(
|
|
12707
|
+
Gt * D / xt.data.BYTES_PER_ELEMENT,
|
|
12708
|
+
(Gt + 1) * D / xt.data.BYTES_PER_ELEMENT
|
|
12709
12709
|
);
|
|
12710
|
-
e.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, Gt, xt.width, xt.height, 1, zt, Ge,
|
|
12710
|
+
e.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, Gt, xt.width, xt.height, 1, zt, Ge, Ft);
|
|
12711
12711
|
}
|
|
12712
12712
|
S.clearLayerUpdates();
|
|
12713
12713
|
} else
|
|
@@ -12721,22 +12721,22 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12721
12721
|
if (te)
|
|
12722
12722
|
e.texStorage2D(s.TEXTURE_2D, Yt, Qt, xt.width, xt.height);
|
|
12723
12723
|
else {
|
|
12724
|
-
let
|
|
12725
|
-
for (let
|
|
12726
|
-
e.texImage2D(s.TEXTURE_2D,
|
|
12724
|
+
let D = xt.width, Gt = xt.height;
|
|
12725
|
+
for (let Ft = 0; Ft < Yt; Ft++)
|
|
12726
|
+
e.texImage2D(s.TEXTURE_2D, Ft, Qt, D, Gt, 0, zt, Ge, null), D >>= 1, Gt >>= 1;
|
|
12727
12727
|
}
|
|
12728
12728
|
} else if (ee.length > 0) {
|
|
12729
12729
|
if (te && ye) {
|
|
12730
|
-
const
|
|
12731
|
-
e.texStorage2D(s.TEXTURE_2D, Yt, Qt,
|
|
12730
|
+
const D = ct(ee[0]);
|
|
12731
|
+
e.texStorage2D(s.TEXTURE_2D, Yt, Qt, D.width, D.height);
|
|
12732
12732
|
}
|
|
12733
|
-
for (let
|
|
12734
|
-
Jt = ee[
|
|
12733
|
+
for (let D = 0, Gt = ee.length; D < Gt; D++)
|
|
12734
|
+
Jt = ee[D], te ? B && e.texSubImage2D(s.TEXTURE_2D, D, 0, 0, zt, Ge, Jt) : e.texImage2D(s.TEXTURE_2D, D, Qt, zt, Ge, Jt);
|
|
12735
12735
|
S.generateMipmaps = !1;
|
|
12736
12736
|
} else if (te) {
|
|
12737
12737
|
if (ye) {
|
|
12738
|
-
const
|
|
12739
|
-
e.texStorage2D(s.TEXTURE_2D, Yt, Qt,
|
|
12738
|
+
const D = ct(xt);
|
|
12739
|
+
e.texStorage2D(s.TEXTURE_2D, Yt, Qt, D.width, D.height);
|
|
12740
12740
|
}
|
|
12741
12741
|
B && e.texSubImage2D(s.TEXTURE_2D, 0, 0, 0, zt, Ge, xt);
|
|
12742
12742
|
} else
|
|
@@ -12745,13 +12745,13 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12745
12745
|
}
|
|
12746
12746
|
F.__version = S.version;
|
|
12747
12747
|
}
|
|
12748
|
-
function at(F, S,
|
|
12748
|
+
function at(F, S, A) {
|
|
12749
12749
|
if (S.image.length !== 6) return;
|
|
12750
12750
|
const it = Bt(F, S), ot = S.source;
|
|
12751
|
-
e.bindTexture(s.TEXTURE_CUBE_MAP, F.__webglTexture, s.TEXTURE0 +
|
|
12751
|
+
e.bindTexture(s.TEXTURE_CUBE_MAP, F.__webglTexture, s.TEXTURE0 + A);
|
|
12752
12752
|
const ht = i.get(ot);
|
|
12753
12753
|
if (ot.version !== ht.__version || it === !0) {
|
|
12754
|
-
e.activeTexture(s.TEXTURE0 +
|
|
12754
|
+
e.activeTexture(s.TEXTURE0 + A);
|
|
12755
12755
|
const Kt = fe.getPrimaries(fe.workingColorSpace), Mt = S.colorSpace === Ni ? null : fe.getPrimaries(S.colorSpace), kt = S.colorSpace === Ni || Kt === Mt ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
12756
12756
|
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, S.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, S.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, S.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, kt);
|
|
12757
12757
|
const Dt = S.isCompressedTexture || S.image[0].isCompressedTexture, xt = S.image[0] && S.image[0].isDataTexture, zt = [];
|
|
@@ -12760,34 +12760,34 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12760
12760
|
const Ge = zt[0], Qt = l.convert(S.format, S.colorSpace), Jt = l.convert(S.type), ee = y(S.internalFormat, Qt, Jt, S.colorSpace), te = S.isVideoTexture !== !0, ye = ht.__version === void 0 || it === !0, B = ot.dataReady;
|
|
12761
12761
|
let Yt = W(S, Ge);
|
|
12762
12762
|
Wt(s.TEXTURE_CUBE_MAP, S);
|
|
12763
|
-
let
|
|
12763
|
+
let D;
|
|
12764
12764
|
if (Dt) {
|
|
12765
12765
|
te && ye && e.texStorage2D(s.TEXTURE_CUBE_MAP, Yt, ee, Ge.width, Ge.height);
|
|
12766
12766
|
for (let Gt = 0; Gt < 6; Gt++) {
|
|
12767
|
-
|
|
12768
|
-
for (let
|
|
12769
|
-
const ie =
|
|
12770
|
-
S.format !== X0 ? Qt !== null ? te ? B && e.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt,
|
|
12767
|
+
D = zt[Gt].mipmaps;
|
|
12768
|
+
for (let Ft = 0; Ft < D.length; Ft++) {
|
|
12769
|
+
const ie = D[Ft];
|
|
12770
|
+
S.format !== X0 ? Qt !== null ? te ? B && e.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft, 0, 0, ie.width, ie.height, Qt, ie.data) : e.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft, ee, ie.width, ie.height, 0, ie.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft, 0, 0, ie.width, ie.height, Qt, Jt, ie.data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft, ee, ie.width, ie.height, 0, Qt, Jt, ie.data);
|
|
12771
12771
|
}
|
|
12772
12772
|
}
|
|
12773
12773
|
} else {
|
|
12774
|
-
if (
|
|
12775
|
-
|
|
12774
|
+
if (D = S.mipmaps, te && ye) {
|
|
12775
|
+
D.length > 0 && Yt++;
|
|
12776
12776
|
const Gt = ct(zt[0]);
|
|
12777
12777
|
e.texStorage2D(s.TEXTURE_CUBE_MAP, Yt, ee, Gt.width, Gt.height);
|
|
12778
12778
|
}
|
|
12779
12779
|
for (let Gt = 0; Gt < 6; Gt++)
|
|
12780
12780
|
if (xt) {
|
|
12781
12781
|
te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, 0, 0, 0, zt[Gt].width, zt[Gt].height, Qt, Jt, zt[Gt].data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, 0, ee, zt[Gt].width, zt[Gt].height, 0, Qt, Jt, zt[Gt].data);
|
|
12782
|
-
for (let
|
|
12783
|
-
const ge =
|
|
12784
|
-
te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt,
|
|
12782
|
+
for (let Ft = 0; Ft < D.length; Ft++) {
|
|
12783
|
+
const ge = D[Ft].image[Gt].image;
|
|
12784
|
+
te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft + 1, 0, 0, ge.width, ge.height, Qt, Jt, ge.data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft + 1, ee, ge.width, ge.height, 0, Qt, Jt, ge.data);
|
|
12785
12785
|
}
|
|
12786
12786
|
} else {
|
|
12787
12787
|
te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, 0, 0, 0, Qt, Jt, zt[Gt]) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, 0, ee, Qt, Jt, zt[Gt]);
|
|
12788
|
-
for (let
|
|
12789
|
-
const ie =
|
|
12790
|
-
te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt,
|
|
12788
|
+
for (let Ft = 0; Ft < D.length; Ft++) {
|
|
12789
|
+
const ie = D[Ft];
|
|
12790
|
+
te ? B && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft + 1, 0, 0, Qt, Jt, ie.image[Gt]) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + Gt, Ft + 1, ee, Qt, Jt, ie.image[Gt]);
|
|
12791
12791
|
}
|
|
12792
12792
|
}
|
|
12793
12793
|
}
|
|
@@ -12795,23 +12795,23 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12795
12795
|
}
|
|
12796
12796
|
F.__version = S.version;
|
|
12797
12797
|
}
|
|
12798
|
-
function yt(F, S,
|
|
12799
|
-
const Kt = l.convert(
|
|
12798
|
+
function yt(F, S, A, it, ot, ht) {
|
|
12799
|
+
const Kt = l.convert(A.format, A.colorSpace), Mt = l.convert(A.type), kt = y(A.internalFormat, Kt, Mt, A.colorSpace);
|
|
12800
12800
|
if (!i.get(S).__hasExternalTextures) {
|
|
12801
12801
|
const xt = Math.max(1, S.width >> ht), zt = Math.max(1, S.height >> ht);
|
|
12802
12802
|
ot === s.TEXTURE_3D || ot === s.TEXTURE_2D_ARRAY ? e.texImage3D(ot, ht, kt, xt, zt, S.depth, 0, Kt, Mt, null) : e.texImage2D(ot, ht, kt, xt, zt, 0, Kt, Mt, null);
|
|
12803
12803
|
}
|
|
12804
|
-
e.bindFramebuffer(s.FRAMEBUFFER, F), pt(S) ? o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, it, ot, i.get(
|
|
12804
|
+
e.bindFramebuffer(s.FRAMEBUFFER, F), pt(S) ? o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, it, ot, i.get(A).__webglTexture, 0, Lt(S)) : (ot === s.TEXTURE_2D || ot >= s.TEXTURE_CUBE_MAP_POSITIVE_X && ot <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, it, ot, i.get(A).__webglTexture, ht), e.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
12805
12805
|
}
|
|
12806
|
-
function Vt(F, S,
|
|
12806
|
+
function Vt(F, S, A) {
|
|
12807
12807
|
if (s.bindRenderbuffer(s.RENDERBUFFER, F), S.depthBuffer) {
|
|
12808
12808
|
const it = S.depthTexture, ot = it && it.isDepthTexture ? it.type : null, ht = X(S.stencilBuffer, ot), Kt = S.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, Mt = Lt(S);
|
|
12809
|
-
pt(S) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, Mt, ht, S.width, S.height) :
|
|
12809
|
+
pt(S) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, Mt, ht, S.width, S.height) : A ? s.renderbufferStorageMultisample(s.RENDERBUFFER, Mt, ht, S.width, S.height) : s.renderbufferStorage(s.RENDERBUFFER, ht, S.width, S.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, Kt, s.RENDERBUFFER, F);
|
|
12810
12810
|
} else {
|
|
12811
12811
|
const it = S.textures;
|
|
12812
12812
|
for (let ot = 0; ot < it.length; ot++) {
|
|
12813
12813
|
const ht = it[ot], Kt = l.convert(ht.format, ht.colorSpace), Mt = l.convert(ht.type), kt = y(ht.internalFormat, Kt, Mt, ht.colorSpace), Dt = Lt(S);
|
|
12814
|
-
|
|
12814
|
+
A && pt(S) === !1 ? s.renderbufferStorageMultisample(s.RENDERBUFFER, Dt, kt, S.width, S.height) : pt(S) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, Dt, kt, S.width, S.height) : s.renderbufferStorage(s.RENDERBUFFER, kt, S.width, S.height);
|
|
12815
12815
|
}
|
|
12816
12816
|
}
|
|
12817
12817
|
s.bindRenderbuffer(s.RENDERBUFFER, null);
|
|
@@ -12830,7 +12830,7 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12830
12830
|
throw new Error("Unknown depthTexture format");
|
|
12831
12831
|
}
|
|
12832
12832
|
function Et(F) {
|
|
12833
|
-
const S = i.get(F),
|
|
12833
|
+
const S = i.get(F), A = F.isWebGLCubeRenderTarget === !0;
|
|
12834
12834
|
if (S.__boundDepthTexture !== F.depthTexture) {
|
|
12835
12835
|
const it = F.depthTexture;
|
|
12836
12836
|
if (S.__depthDisposeCallback && S.__depthDisposeCallback(), it) {
|
|
@@ -12842,9 +12842,9 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12842
12842
|
S.__boundDepthTexture = it;
|
|
12843
12843
|
}
|
|
12844
12844
|
if (F.depthTexture && !S.__autoAllocateDepthBuffer) {
|
|
12845
|
-
if (
|
|
12845
|
+
if (A) throw new Error("target.depthTexture not supported in Cube render targets");
|
|
12846
12846
|
Ct(S.__webglFramebuffer, F);
|
|
12847
|
-
} else if (
|
|
12847
|
+
} else if (A) {
|
|
12848
12848
|
S.__webglDepthbuffer = [];
|
|
12849
12849
|
for (let it = 0; it < 6; it++)
|
|
12850
12850
|
if (e.bindFramebuffer(s.FRAMEBUFFER, S.__webglFramebuffer[it]), S.__webglDepthbuffer[it] === void 0)
|
|
@@ -12861,44 +12861,44 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12861
12861
|
}
|
|
12862
12862
|
e.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
12863
12863
|
}
|
|
12864
|
-
function $t(F, S,
|
|
12864
|
+
function $t(F, S, A) {
|
|
12865
12865
|
const it = i.get(F);
|
|
12866
|
-
S !== void 0 && yt(it.__webglFramebuffer, F, F.texture, s.COLOR_ATTACHMENT0, s.TEXTURE_2D, 0),
|
|
12866
|
+
S !== void 0 && yt(it.__webglFramebuffer, F, F.texture, s.COLOR_ATTACHMENT0, s.TEXTURE_2D, 0), A !== void 0 && Et(F);
|
|
12867
12867
|
}
|
|
12868
12868
|
function qt(F) {
|
|
12869
|
-
const S = F.texture,
|
|
12869
|
+
const S = F.texture, A = i.get(F), it = i.get(S);
|
|
12870
12870
|
F.addEventListener("dispose", f);
|
|
12871
12871
|
const ot = F.textures, ht = F.isWebGLCubeRenderTarget === !0, Kt = ot.length > 1;
|
|
12872
12872
|
if (Kt || (it.__webglTexture === void 0 && (it.__webglTexture = s.createTexture()), it.__version = S.version, a.memory.textures++), ht) {
|
|
12873
|
-
|
|
12873
|
+
A.__webglFramebuffer = [];
|
|
12874
12874
|
for (let Mt = 0; Mt < 6; Mt++)
|
|
12875
12875
|
if (S.mipmaps && S.mipmaps.length > 0) {
|
|
12876
|
-
|
|
12876
|
+
A.__webglFramebuffer[Mt] = [];
|
|
12877
12877
|
for (let kt = 0; kt < S.mipmaps.length; kt++)
|
|
12878
|
-
|
|
12878
|
+
A.__webglFramebuffer[Mt][kt] = s.createFramebuffer();
|
|
12879
12879
|
} else
|
|
12880
|
-
|
|
12880
|
+
A.__webglFramebuffer[Mt] = s.createFramebuffer();
|
|
12881
12881
|
} else {
|
|
12882
12882
|
if (S.mipmaps && S.mipmaps.length > 0) {
|
|
12883
|
-
|
|
12883
|
+
A.__webglFramebuffer = [];
|
|
12884
12884
|
for (let Mt = 0; Mt < S.mipmaps.length; Mt++)
|
|
12885
|
-
|
|
12885
|
+
A.__webglFramebuffer[Mt] = s.createFramebuffer();
|
|
12886
12886
|
} else
|
|
12887
|
-
|
|
12887
|
+
A.__webglFramebuffer = s.createFramebuffer();
|
|
12888
12888
|
if (Kt)
|
|
12889
12889
|
for (let Mt = 0, kt = ot.length; Mt < kt; Mt++) {
|
|
12890
12890
|
const Dt = i.get(ot[Mt]);
|
|
12891
12891
|
Dt.__webglTexture === void 0 && (Dt.__webglTexture = s.createTexture(), a.memory.textures++);
|
|
12892
12892
|
}
|
|
12893
12893
|
if (F.samples > 0 && pt(F) === !1) {
|
|
12894
|
-
|
|
12894
|
+
A.__webglMultisampledFramebuffer = s.createFramebuffer(), A.__webglColorRenderbuffer = [], e.bindFramebuffer(s.FRAMEBUFFER, A.__webglMultisampledFramebuffer);
|
|
12895
12895
|
for (let Mt = 0; Mt < ot.length; Mt++) {
|
|
12896
12896
|
const kt = ot[Mt];
|
|
12897
|
-
|
|
12897
|
+
A.__webglColorRenderbuffer[Mt] = s.createRenderbuffer(), s.bindRenderbuffer(s.RENDERBUFFER, A.__webglColorRenderbuffer[Mt]);
|
|
12898
12898
|
const Dt = l.convert(kt.format, kt.colorSpace), xt = l.convert(kt.type), zt = y(kt.internalFormat, Dt, xt, kt.colorSpace, F.isXRRenderTarget === !0), Ge = Lt(F);
|
|
12899
|
-
s.renderbufferStorageMultisample(s.RENDERBUFFER, Ge, zt, F.width, F.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + Mt, s.RENDERBUFFER,
|
|
12899
|
+
s.renderbufferStorageMultisample(s.RENDERBUFFER, Ge, zt, F.width, F.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + Mt, s.RENDERBUFFER, A.__webglColorRenderbuffer[Mt]);
|
|
12900
12900
|
}
|
|
12901
|
-
s.bindRenderbuffer(s.RENDERBUFFER, null), F.depthBuffer && (
|
|
12901
|
+
s.bindRenderbuffer(s.RENDERBUFFER, null), F.depthBuffer && (A.__webglDepthRenderbuffer = s.createRenderbuffer(), Vt(A.__webglDepthRenderbuffer, F, !0)), e.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
12902
12902
|
}
|
|
12903
12903
|
}
|
|
12904
12904
|
if (ht) {
|
|
@@ -12906,31 +12906,31 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12906
12906
|
for (let Mt = 0; Mt < 6; Mt++)
|
|
12907
12907
|
if (S.mipmaps && S.mipmaps.length > 0)
|
|
12908
12908
|
for (let kt = 0; kt < S.mipmaps.length; kt++)
|
|
12909
|
-
yt(
|
|
12909
|
+
yt(A.__webglFramebuffer[Mt][kt], F, S, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + Mt, kt);
|
|
12910
12910
|
else
|
|
12911
|
-
yt(
|
|
12911
|
+
yt(A.__webglFramebuffer[Mt], F, S, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + Mt, 0);
|
|
12912
12912
|
Z(S) && p(s.TEXTURE_CUBE_MAP), e.unbindTexture();
|
|
12913
12913
|
} else if (Kt) {
|
|
12914
12914
|
for (let Mt = 0, kt = ot.length; Mt < kt; Mt++) {
|
|
12915
12915
|
const Dt = ot[Mt], xt = i.get(Dt);
|
|
12916
|
-
e.bindTexture(s.TEXTURE_2D, xt.__webglTexture), Wt(s.TEXTURE_2D, Dt), yt(
|
|
12916
|
+
e.bindTexture(s.TEXTURE_2D, xt.__webglTexture), Wt(s.TEXTURE_2D, Dt), yt(A.__webglFramebuffer, F, Dt, s.COLOR_ATTACHMENT0 + Mt, s.TEXTURE_2D, 0), Z(Dt) && p(s.TEXTURE_2D);
|
|
12917
12917
|
}
|
|
12918
12918
|
e.unbindTexture();
|
|
12919
12919
|
} else {
|
|
12920
12920
|
let Mt = s.TEXTURE_2D;
|
|
12921
12921
|
if ((F.isWebGL3DRenderTarget || F.isWebGLArrayRenderTarget) && (Mt = F.isWebGL3DRenderTarget ? s.TEXTURE_3D : s.TEXTURE_2D_ARRAY), e.bindTexture(Mt, it.__webglTexture), Wt(Mt, S), S.mipmaps && S.mipmaps.length > 0)
|
|
12922
12922
|
for (let kt = 0; kt < S.mipmaps.length; kt++)
|
|
12923
|
-
yt(
|
|
12923
|
+
yt(A.__webglFramebuffer[kt], F, S, s.COLOR_ATTACHMENT0, Mt, kt);
|
|
12924
12924
|
else
|
|
12925
|
-
yt(
|
|
12925
|
+
yt(A.__webglFramebuffer, F, S, s.COLOR_ATTACHMENT0, Mt, 0);
|
|
12926
12926
|
Z(S) && p(Mt), e.unbindTexture();
|
|
12927
12927
|
}
|
|
12928
12928
|
F.depthBuffer && Et(F);
|
|
12929
12929
|
}
|
|
12930
12930
|
function he(F) {
|
|
12931
12931
|
const S = F.textures;
|
|
12932
|
-
for (let
|
|
12933
|
-
const ot = S[
|
|
12932
|
+
for (let A = 0, it = S.length; A < it; A++) {
|
|
12933
|
+
const ot = S[A];
|
|
12934
12934
|
if (Z(ot)) {
|
|
12935
12935
|
const ht = F.isWebGLCubeRenderTarget ? s.TEXTURE_CUBE_MAP : s.TEXTURE_2D, Kt = i.get(ot).__webglTexture;
|
|
12936
12936
|
e.bindTexture(ht, Kt), p(ht), e.unbindTexture();
|
|
@@ -12941,7 +12941,7 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12941
12941
|
function gt(F) {
|
|
12942
12942
|
if (F.samples > 0) {
|
|
12943
12943
|
if (pt(F) === !1) {
|
|
12944
|
-
const S = F.textures,
|
|
12944
|
+
const S = F.textures, A = F.width, it = F.height;
|
|
12945
12945
|
let ot = s.COLOR_BUFFER_BIT;
|
|
12946
12946
|
const ht = F.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, Kt = i.get(F), Mt = S.length > 1;
|
|
12947
12947
|
if (Mt)
|
|
@@ -12954,7 +12954,7 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12954
12954
|
const Dt = i.get(S[kt]).__webglTexture;
|
|
12955
12955
|
s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.TEXTURE_2D, Dt, 0);
|
|
12956
12956
|
}
|
|
12957
|
-
s.blitFramebuffer(0, 0,
|
|
12957
|
+
s.blitFramebuffer(0, 0, A, it, 0, 0, A, it, ot, s.NEAREST), c === !0 && (v.length = 0, ft.length = 0, v.push(s.COLOR_ATTACHMENT0 + kt), F.depthBuffer && F.resolveDepthBuffer === !1 && (v.push(ht), ft.push(ht), s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER, ft)), s.invalidateFramebuffer(s.READ_FRAMEBUFFER, v));
|
|
12958
12958
|
}
|
|
12959
12959
|
if (e.bindFramebuffer(s.READ_FRAMEBUFFER, null), e.bindFramebuffer(s.DRAW_FRAMEBUFFER, null), Mt)
|
|
12960
12960
|
for (let kt = 0; kt < S.length; kt++) {
|
|
@@ -12981,8 +12981,8 @@ function LY(s, t, e, i, n, l, a) {
|
|
|
12981
12981
|
h.get(F) !== S && (h.set(F, S), F.update());
|
|
12982
12982
|
}
|
|
12983
12983
|
function nt(F, S) {
|
|
12984
|
-
const
|
|
12985
|
-
return F.isCompressedTexture === !0 || F.isVideoTexture === !0 ||
|
|
12984
|
+
const A = F.colorSpace, it = F.format, ot = F.type;
|
|
12985
|
+
return F.isCompressedTexture === !0 || F.isVideoTexture === !0 || A !== Z0 && A !== Ni && (fe.getTransfer(A) === Pe ? (it !== X0 || ot !== Rn) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", A)), S;
|
|
12986
12986
|
}
|
|
12987
12987
|
function ct(F) {
|
|
12988
12988
|
return typeof HTMLImageElement != "undefined" && F instanceof HTMLImageElement ? (d.width = F.naturalWidth || F.width, d.height = F.naturalHeight || F.height) : typeof VideoFrame != "undefined" && F instanceof VideoFrame ? (d.width = F.displayWidth, d.height = F.displayHeight) : (d.width = F.width, d.height = F.height), d;
|
|
@@ -13353,8 +13353,8 @@ class TY extends Cn {
|
|
|
13353
13353
|
if (yt.matrixWorld.decompose(at.position, at.quaternion, at.scale), at.translateX(ct), at.translateZ(nt), at.matrixWorld.compose(at.position, at.quaternion, at.scale), at.matrixWorldInverse.copy(at.matrixWorld).invert(), Et[10] === -1)
|
|
13354
13354
|
at.projectionMatrix.copy(yt.projectionMatrix), at.projectionMatrixInverse.copy(yt.projectionMatrixInverse);
|
|
13355
13355
|
else {
|
|
13356
|
-
const F = qt + nt, S = he + nt,
|
|
13357
|
-
at.projectionMatrix.makePerspective(
|
|
13356
|
+
const F = qt + nt, S = he + nt, A = pt - ct, it = ut + (Ct - ct), ot = v * he / S * F, ht = ft * he / S * F;
|
|
13357
|
+
at.projectionMatrix.makePerspective(A, it, ot, ht, F, S), at.projectionMatrixInverse.copy(at.projectionMatrix).invert();
|
|
13358
13358
|
}
|
|
13359
13359
|
}
|
|
13360
13360
|
function et(at, yt) {
|
|
@@ -13653,7 +13653,7 @@ class pW {
|
|
|
13653
13653
|
powerPreference: h,
|
|
13654
13654
|
failIfMajorPerformanceCaveat: r
|
|
13655
13655
|
};
|
|
13656
|
-
if ("setAttribute" in e && e.setAttribute("data-engine", `three.js r${vu}`), e.addEventListener("webglcontextlost",
|
|
13656
|
+
if ("setAttribute" in e && e.setAttribute("data-engine", `three.js r${vu}`), e.addEventListener("webglcontextlost", D, !1), e.addEventListener("webglcontextrestored", Gt, !1), e.addEventListener("webglcontextcreationerror", Ft, !1), v === null) {
|
|
13657
13657
|
const j = "webgl2";
|
|
13658
13658
|
if (v = ft(j, T), v === null)
|
|
13659
13659
|
throw ft(j) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
|
|
@@ -13661,9 +13661,9 @@ class pW {
|
|
|
13661
13661
|
} catch (T) {
|
|
13662
13662
|
throw console.error("THREE.WebGLRenderer: " + T.message), T;
|
|
13663
13663
|
}
|
|
13664
|
-
let gt, Lt, pt, ut, nt, ct, F, S,
|
|
13664
|
+
let gt, Lt, pt, ut, nt, ct, F, S, A, it, ot, ht, Kt, Mt, kt, Dt, xt, zt, Ge, Qt, Jt, ee, te, ye;
|
|
13665
13665
|
function B() {
|
|
13666
|
-
gt = new BS(v), gt.init(), ee = new uW(v, gt), Lt = new HS(v, gt, t, ee), pt = new gY(v), ut = new QS(v), nt = new rY(), ct = new LY(v, gt, pt, nt, Lt, ee, ut), F = new KS(X), S = new US(X),
|
|
13666
|
+
gt = new BS(v), gt.init(), ee = new uW(v, gt), Lt = new HS(v, gt, t, ee), pt = new gY(v), ut = new QS(v), nt = new rY(), ct = new LY(v, gt, pt, nt, Lt, ee, ut), F = new KS(X), S = new US(X), A = new $x(v), te = new vS(v, A), it = new PS(v, A, ut, te), ot = new AS(v, it, A, ut), Ge = new jS(v, Lt, ct), Dt = new wS(nt), ht = new dY(X, F, S, gt, Lt, te, Dt), Kt = new vY(X, nt), Mt = new uY(), kt = new XY(gt), zt = new FS(X, F, S, pt, ot, u, c), xt = new VY(X, ot, Lt), ye = new JY(v, ut, Lt, pt), Qt = new JS(v, gt, ut), Jt = new ES(v, gt, ut), ut.programs = ht.programs, X.capabilities = Lt, X.extensions = gt, X.properties = nt, X.renderLists = Mt, X.shadowMap = xt, X.state = pt, X.info = ut;
|
|
13667
13667
|
}
|
|
13668
13668
|
B();
|
|
13669
13669
|
const Yt = new TY(X, v);
|
|
@@ -13741,9 +13741,9 @@ class pW {
|
|
|
13741
13741
|
}, this.clearStencil = function() {
|
|
13742
13742
|
this.clear(!1, !1, !0);
|
|
13743
13743
|
}, this.dispose = function() {
|
|
13744
|
-
e.removeEventListener("webglcontextlost",
|
|
13744
|
+
e.removeEventListener("webglcontextlost", D, !1), e.removeEventListener("webglcontextrestored", Gt, !1), e.removeEventListener("webglcontextcreationerror", Ft, !1), Mt.dispose(), kt.dispose(), nt.dispose(), F.dispose(), S.dispose(), ot.dispose(), te.dispose(), ye.dispose(), ht.dispose(), Yt.dispose(), Yt.removeEventListener("sessionstart", xi), Yt.removeEventListener("sessionend", bd), Ln.stop();
|
|
13745
13745
|
};
|
|
13746
|
-
function
|
|
13746
|
+
function D(T) {
|
|
13747
13747
|
T.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), W = !0;
|
|
13748
13748
|
}
|
|
13749
13749
|
function Gt() {
|
|
@@ -13751,7 +13751,7 @@ class pW {
|
|
|
13751
13751
|
const T = ut.autoReset, j = xt.enabled, V = xt.autoUpdate, x = xt.needsUpdate, Y = xt.type;
|
|
13752
13752
|
B(), ut.autoReset = T, xt.enabled = j, xt.autoUpdate = V, xt.needsUpdate = x, xt.type = Y;
|
|
13753
13753
|
}
|
|
13754
|
-
function
|
|
13754
|
+
function Ft(T) {
|
|
13755
13755
|
console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ", T.statusMessage);
|
|
13756
13756
|
}
|
|
13757
13757
|
function ie(T) {
|
|
@@ -13782,8 +13782,8 @@ class pW {
|
|
|
13782
13782
|
const St = Rt - lt;
|
|
13783
13783
|
if (St < 0 || St === 1 / 0) return;
|
|
13784
13784
|
te.setup(Y, x, U, V, q);
|
|
13785
|
-
let
|
|
13786
|
-
if (q !== null && (
|
|
13785
|
+
let vt, Nt = Qt;
|
|
13786
|
+
if (q !== null && (vt = A.get(q), Nt = Jt, Nt.setIndex(vt)), Y.isMesh)
|
|
13787
13787
|
x.wireframe === !0 ? (pt.setLineWidth(x.wireframeLinewidth * he()), Nt.setMode(v.LINES)) : Nt.setMode(v.TRIANGLES);
|
|
13788
13788
|
else if (Y.isLine) {
|
|
13789
13789
|
let bt = x.linewidth;
|
|
@@ -13795,7 +13795,7 @@ class pW {
|
|
|
13795
13795
|
else if (gt.get("WEBGL_multi_draw"))
|
|
13796
13796
|
Nt.renderMultiDraw(Y._multiDrawStarts, Y._multiDrawCounts, Y._multiDrawCount);
|
|
13797
13797
|
else {
|
|
13798
|
-
const bt = Y._multiDrawStarts, Ht = Y._multiDrawCounts, wt = Y._multiDrawCount, Ze = q ?
|
|
13798
|
+
const bt = Y._multiDrawStarts, Ht = Y._multiDrawCounts, wt = Y._multiDrawCount, Ze = q ? A.get(q).bytesPerElement : 1, Ne = nt.get(x).currentProgram.getUniforms();
|
|
13799
13799
|
for (let Ue = 0; Ue < wt; Ue++)
|
|
13800
13800
|
Ne.setValue(v, "_gl_DrawID", Ue), Nt.render(bt[Ue] / Ze, Ht[Ue]);
|
|
13801
13801
|
}
|
|
@@ -13943,10 +13943,10 @@ class pW {
|
|
|
13943
13943
|
if (x.viewport !== void 0 && (x.viewport = void 0), Z.setupLightsView(x), at === !0 && Dt.setGlobalState(X.clippingPlanes, x), Is(T, V, x), ct.updateMultisampleRenderTarget(H), ct.updateRenderTargetMipmap(H), gt.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
13944
13944
|
let tt = !1;
|
|
13945
13945
|
for (let $ = 0, lt = j.length; $ < lt; $++) {
|
|
13946
|
-
const Rt = j[$], St = Rt.object,
|
|
13946
|
+
const Rt = j[$], St = Rt.object, vt = Rt.geometry, Nt = Rt.material, bt = Rt.group;
|
|
13947
13947
|
if (Nt.side === Qe && St.layers.test(x.layers)) {
|
|
13948
13948
|
const Ht = Nt.side;
|
|
13949
|
-
Nt.side = Y0, Nt.needsUpdate = !0, Xd(St, V, x,
|
|
13949
|
+
Nt.side = Y0, Nt.needsUpdate = !0, Xd(St, V, x, vt, Nt, bt), Nt.side = Ht, Nt.needsUpdate = !0, tt = !0;
|
|
13950
13950
|
}
|
|
13951
13951
|
}
|
|
13952
13952
|
tt === !0 && (ct.updateMultisampleRenderTarget(H), ct.updateRenderTargetMipmap(H));
|
|
@@ -13993,7 +13993,7 @@ class pW {
|
|
|
13993
13993
|
const H = j.fog, P = x.isMeshStandardMaterial ? j.environment : null, U = L === null ? X.outputColorSpace : L.isXRRenderTarget === !0 ? L.texture.colorSpace : Z0, q = (x.isMeshStandardMaterial ? S : F).get(x.envMap || P), dt = x.vertexColors === !0 && !!V.attributes.color && V.attributes.color.itemSize === 4, tt = !!V.attributes.tangent && (!!x.normalMap || x.anisotropy > 0), $ = !!V.morphAttributes.position, lt = !!V.morphAttributes.normal, Rt = !!V.morphAttributes.color;
|
|
13994
13994
|
let St = Un;
|
|
13995
13995
|
x.toneMapped && (L === null || L.isXRRenderTarget === !0) && (St = X.toneMapping);
|
|
13996
|
-
const
|
|
13996
|
+
const vt = V.morphAttributes.position || V.morphAttributes.normal || V.morphAttributes.color, Nt = vt !== void 0 ? vt.length : 0, bt = nt.get(x), Ht = Z.state.lights;
|
|
13997
13997
|
if (at === !0 && (yt === !0 || T !== C)) {
|
|
13998
13998
|
const Ie = T === C && x.id === N;
|
|
13999
13999
|
Dt.setState(x, T, Ie);
|
|
@@ -14146,14 +14146,14 @@ class pW {
|
|
|
14146
14146
|
V !== null ? (H = V.max.x - V.min.x, P = V.max.y - V.min.y, U = V.min.x, q = V.min.y) : (H = T.image.width, P = T.image.height, U = 0, q = 0), x !== null ? (dt = x.x, tt = x.y) : (dt = 0, tt = 0);
|
|
14147
14147
|
const $ = ee.convert(j.format), lt = ee.convert(j.type);
|
|
14148
14148
|
ct.setTexture2D(j, 0), v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL, j.flipY), v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL, j.premultiplyAlpha), v.pixelStorei(v.UNPACK_ALIGNMENT, j.unpackAlignment);
|
|
14149
|
-
const Rt = v.getParameter(v.UNPACK_ROW_LENGTH), St = v.getParameter(v.UNPACK_IMAGE_HEIGHT),
|
|
14150
|
-
v.pixelStorei(v.UNPACK_ROW_LENGTH, Ht.width), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, Ht.height), v.pixelStorei(v.UNPACK_SKIP_PIXELS, U), v.pixelStorei(v.UNPACK_SKIP_ROWS, q), T.isDataTexture ? v.texSubImage2D(v.TEXTURE_2D, Y, dt, tt, H, P, $, lt, Ht.data) : T.isCompressedTexture ? v.compressedTexSubImage2D(v.TEXTURE_2D, Y, dt, tt, Ht.width, Ht.height, $, Ht.data) : v.texSubImage2D(v.TEXTURE_2D, Y, dt, tt, H, P, $, lt, Ht), v.pixelStorei(v.UNPACK_ROW_LENGTH, Rt), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, St), v.pixelStorei(v.UNPACK_SKIP_PIXELS,
|
|
14149
|
+
const Rt = v.getParameter(v.UNPACK_ROW_LENGTH), St = v.getParameter(v.UNPACK_IMAGE_HEIGHT), vt = v.getParameter(v.UNPACK_SKIP_PIXELS), Nt = v.getParameter(v.UNPACK_SKIP_ROWS), bt = v.getParameter(v.UNPACK_SKIP_IMAGES), Ht = T.isCompressedTexture ? T.mipmaps[Y] : T.image;
|
|
14150
|
+
v.pixelStorei(v.UNPACK_ROW_LENGTH, Ht.width), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, Ht.height), v.pixelStorei(v.UNPACK_SKIP_PIXELS, U), v.pixelStorei(v.UNPACK_SKIP_ROWS, q), T.isDataTexture ? v.texSubImage2D(v.TEXTURE_2D, Y, dt, tt, H, P, $, lt, Ht.data) : T.isCompressedTexture ? v.compressedTexSubImage2D(v.TEXTURE_2D, Y, dt, tt, Ht.width, Ht.height, $, Ht.data) : v.texSubImage2D(v.TEXTURE_2D, Y, dt, tt, H, P, $, lt, Ht), v.pixelStorei(v.UNPACK_ROW_LENGTH, Rt), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, St), v.pixelStorei(v.UNPACK_SKIP_PIXELS, vt), v.pixelStorei(v.UNPACK_SKIP_ROWS, Nt), v.pixelStorei(v.UNPACK_SKIP_IMAGES, bt), Y === 0 && j.generateMipmaps && v.generateMipmap(v.TEXTURE_2D), pt.unbindTexture();
|
|
14151
14151
|
}, this.copyTextureToTexture3D = function(T, j, V = null, x = null, Y = 0) {
|
|
14152
14152
|
T.isTexture !== !0 && (ga("WebGLRenderer: copyTextureToTexture3D function signature has changed."), V = arguments[0] || null, x = arguments[1] || null, T = arguments[2], j = arguments[3], Y = arguments[4] || 0);
|
|
14153
14153
|
let H, P, U, q, dt, tt, $, lt, Rt;
|
|
14154
14154
|
const St = T.isCompressedTexture ? T.mipmaps[Y] : T.image;
|
|
14155
14155
|
V !== null ? (H = V.max.x - V.min.x, P = V.max.y - V.min.y, U = V.max.z - V.min.z, q = V.min.x, dt = V.min.y, tt = V.min.z) : (H = St.width, P = St.height, U = St.depth, q = 0, dt = 0, tt = 0), x !== null ? ($ = x.x, lt = x.y, Rt = x.z) : ($ = 0, lt = 0, Rt = 0);
|
|
14156
|
-
const
|
|
14156
|
+
const vt = ee.convert(j.format), Nt = ee.convert(j.type);
|
|
14157
14157
|
let bt;
|
|
14158
14158
|
if (j.isData3DTexture)
|
|
14159
14159
|
ct.setTexture3D(j, 0), bt = v.TEXTURE_3D;
|
|
@@ -14165,7 +14165,7 @@ class pW {
|
|
|
14165
14165
|
}
|
|
14166
14166
|
v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL, j.flipY), v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL, j.premultiplyAlpha), v.pixelStorei(v.UNPACK_ALIGNMENT, j.unpackAlignment);
|
|
14167
14167
|
const Ht = v.getParameter(v.UNPACK_ROW_LENGTH), wt = v.getParameter(v.UNPACK_IMAGE_HEIGHT), Ze = v.getParameter(v.UNPACK_SKIP_PIXELS), Ne = v.getParameter(v.UNPACK_SKIP_ROWS), Ue = v.getParameter(v.UNPACK_SKIP_IMAGES);
|
|
14168
|
-
v.pixelStorei(v.UNPACK_ROW_LENGTH, St.width), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, St.height), v.pixelStorei(v.UNPACK_SKIP_PIXELS, q), v.pixelStorei(v.UNPACK_SKIP_ROWS, dt), v.pixelStorei(v.UNPACK_SKIP_IMAGES, tt), T.isDataTexture || T.isData3DTexture ? v.texSubImage3D(bt, Y, $, lt, Rt, H, P, U,
|
|
14168
|
+
v.pixelStorei(v.UNPACK_ROW_LENGTH, St.width), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, St.height), v.pixelStorei(v.UNPACK_SKIP_PIXELS, q), v.pixelStorei(v.UNPACK_SKIP_ROWS, dt), v.pixelStorei(v.UNPACK_SKIP_IMAGES, tt), T.isDataTexture || T.isData3DTexture ? v.texSubImage3D(bt, Y, $, lt, Rt, H, P, U, vt, Nt, St.data) : j.isCompressedArrayTexture ? v.compressedTexSubImage3D(bt, Y, $, lt, Rt, H, P, U, vt, St.data) : v.texSubImage3D(bt, Y, $, lt, Rt, H, P, U, vt, Nt, St), v.pixelStorei(v.UNPACK_ROW_LENGTH, Ht), v.pixelStorei(v.UNPACK_IMAGE_HEIGHT, wt), v.pixelStorei(v.UNPACK_SKIP_PIXELS, Ze), v.pixelStorei(v.UNPACK_SKIP_ROWS, Ne), v.pixelStorei(v.UNPACK_SKIP_IMAGES, Ue), Y === 0 && j.generateMipmaps && v.generateMipmap(bt), pt.unbindTexture();
|
|
14169
14169
|
}, this.initRenderTarget = function(T) {
|
|
14170
14170
|
nt.get(T).__webglFramebuffer === void 0 && ct.setupRenderTarget(T);
|
|
14171
14171
|
}, this.initTexture = function(T) {
|
|
@@ -15067,7 +15067,7 @@ class GW extends Zt {
|
|
|
15067
15067
|
B0.material = null, B0.geometry.index = null, B0.geometry.attributes = {}, B0.geometry.setDrawRange(0, 1 / 0);
|
|
15068
15068
|
}
|
|
15069
15069
|
copy(t) {
|
|
15070
|
-
return super.copy(t), this.geometry = t.geometry.clone(), this.perObjectFrustumCulled = t.perObjectFrustumCulled, this.sortObjects = t.sortObjects, this.boundingBox = t.boundingBox !== null ? t.boundingBox.clone() : null, this.boundingSphere = t.boundingSphere !== null ? t.boundingSphere.clone() : null, this._drawRanges = t._drawRanges.map((e) =>
|
|
15070
|
+
return super.copy(t), this.geometry = t.geometry.clone(), this.perObjectFrustumCulled = t.perObjectFrustumCulled, this.sortObjects = t.sortObjects, this.boundingBox = t.boundingBox !== null ? t.boundingBox.clone() : null, this.boundingSphere = t.boundingSphere !== null ? t.boundingSphere.clone() : null, this._drawRanges = t._drawRanges.map((e) => Tt({}, e)), this._reservedRanges = t._reservedRanges.map((e) => Tt({}, e)), this._drawInfo = t._drawInfo.map((e) => Tt({}, e)), this._bounds = t._bounds.map((e) => ({
|
|
15071
15071
|
boxInitialized: e.boxInitialized,
|
|
15072
15072
|
box: e.box.clone(),
|
|
15073
15073
|
sphereInitialized: e.sphereInitialized,
|
|
@@ -16805,9 +16805,9 @@ class em extends Ot {
|
|
|
16805
16805
|
const z = R.length, E = w.length;
|
|
16806
16806
|
function Q(v, ft, gt) {
|
|
16807
16807
|
let Lt, pt, ut;
|
|
16808
|
-
const nt = v.x - ft.x, ct = v.y - ft.y, F = gt.x - v.x, S = gt.y - v.y,
|
|
16808
|
+
const nt = v.x - ft.x, ct = v.y - ft.y, F = gt.x - v.x, S = gt.y - v.y, A = nt * nt + ct * ct, it = nt * S - ct * F;
|
|
16809
16809
|
if (Math.abs(it) > Number.EPSILON) {
|
|
16810
|
-
const ot = Math.sqrt(
|
|
16810
|
+
const ot = Math.sqrt(A), ht = Math.sqrt(F * F + S * S), Kt = ft.x - ct / ot, Mt = ft.y + nt / ot, kt = gt.x - S / ht, Dt = gt.y + F / ht, xt = ((kt - Kt) * S - (Dt - Mt) * F) / (nt * S - ct * F);
|
|
16811
16811
|
Lt = Kt + nt * xt - v.x, pt = Mt + ct * xt - v.y;
|
|
16812
16812
|
const zt = Lt * Lt + pt * pt;
|
|
16813
16813
|
if (zt <= 2)
|
|
@@ -16815,7 +16815,7 @@ class em extends Ot {
|
|
|
16815
16815
|
ut = Math.sqrt(zt / 2);
|
|
16816
16816
|
} else {
|
|
16817
16817
|
let ot = !1;
|
|
16818
|
-
nt > Number.EPSILON ? F > Number.EPSILON && (ot = !0) : nt < -Number.EPSILON ? F < -Number.EPSILON && (ot = !0) : Math.sign(ct) === Math.sign(S) && (ot = !0), ot ? (Lt = -ct, pt = nt, ut = Math.sqrt(
|
|
16818
|
+
nt > Number.EPSILON ? F > Number.EPSILON && (ot = !0) : nt < -Number.EPSILON ? F < -Number.EPSILON && (ot = !0) : Math.sign(ct) === Math.sign(S) && (ot = !0), ot ? (Lt = -ct, pt = nt, ut = Math.sqrt(A)) : (Lt = nt, pt = ct, ut = Math.sqrt(A / 2));
|
|
16819
16819
|
}
|
|
16820
16820
|
return new _(Lt / ut, pt / ut);
|
|
16821
16821
|
}
|
|
@@ -16914,8 +16914,8 @@ class em extends Ot {
|
|
|
16914
16914
|
let pt = gt - 1;
|
|
16915
16915
|
pt < 0 && (pt = v.length - 1);
|
|
16916
16916
|
for (let ut = 0, nt = h + Z * 2; ut < nt; ut++) {
|
|
16917
|
-
const ct = z * ut, F = z * (ut + 1), S = ft + Lt + ct,
|
|
16918
|
-
$t(S,
|
|
16917
|
+
const ct = z * ut, F = z * (ut + 1), S = ft + Lt + ct, A = ft + pt + ct, it = ft + pt + F, ot = ft + Lt + F;
|
|
16918
|
+
$t(S, A, it, ot);
|
|
16919
16919
|
}
|
|
16920
16920
|
}
|
|
16921
16921
|
}
|
|
@@ -21664,7 +21664,7 @@ class bN extends Cn {
|
|
|
21664
21664
|
class ZN extends I0 {
|
|
21665
21665
|
// @deprecated, r162
|
|
21666
21666
|
constructor(t = 1, e = 1, i = 1, n = {}) {
|
|
21667
|
-
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(t, e, Be(
|
|
21667
|
+
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(t, e, Be(Tt({}, n), { count: i })), this.isWebGLMultipleRenderTargets = !0;
|
|
21668
21668
|
}
|
|
21669
21669
|
get texture() {
|
|
21670
21670
|
return this.textures;
|
|
@@ -35848,7 +35848,7 @@ class L9 extends Ot {
|
|
|
35848
35848
|
}
|
|
35849
35849
|
const Wt = z.length, Bt = Q.length;
|
|
35850
35850
|
function At(ut, nt, ct) {
|
|
35851
|
-
let F, S,
|
|
35851
|
+
let F, S, A;
|
|
35852
35852
|
const it = ut.x - nt.x, ot = ut.y - nt.y, ht = ct.x - ut.x, Kt = ct.y - ut.y, Mt = it * it + ot * ot, kt = it * Kt - ot * ht;
|
|
35853
35853
|
if (Math.abs(kt) > Number.EPSILON) {
|
|
35854
35854
|
const Dt = Math.sqrt(Mt), xt = Math.sqrt(
|
|
@@ -35858,12 +35858,12 @@ class L9 extends Ot {
|
|
|
35858
35858
|
const te = F * F + S * S;
|
|
35859
35859
|
if (te <= 2)
|
|
35860
35860
|
return new _(F, S);
|
|
35861
|
-
|
|
35861
|
+
A = Math.sqrt(te / 2);
|
|
35862
35862
|
} else {
|
|
35863
35863
|
let Dt = !1;
|
|
35864
|
-
it > Number.EPSILON ? ht > Number.EPSILON && (Dt = !0) : it < -Number.EPSILON ? ht < -Number.EPSILON && (Dt = !0) : Math.sign(ot) === Math.sign(Kt) && (Dt = !0), Dt ? (F = -ot, S = it,
|
|
35864
|
+
it > Number.EPSILON ? ht > Number.EPSILON && (Dt = !0) : it < -Number.EPSILON ? ht < -Number.EPSILON && (Dt = !0) : Math.sign(ot) === Math.sign(Kt) && (Dt = !0), Dt ? (F = -ot, S = it, A = Math.sqrt(Mt)) : (F = it, S = ot, A = Math.sqrt(Mt / 2));
|
|
35865
35865
|
}
|
|
35866
|
-
return new _(F /
|
|
35866
|
+
return new _(F / A, S / A);
|
|
35867
35867
|
}
|
|
35868
35868
|
const at = [];
|
|
35869
35869
|
for (let ut = 0, nt = et.length, ct = nt - 1, F = ut + 1; ut < nt; ut++, ct++, F++)
|
|
@@ -35873,17 +35873,17 @@ class L9 extends Ot {
|
|
|
35873
35873
|
for (let ut = 0, nt = E.length; ut < nt; ut++) {
|
|
35874
35874
|
const ct = E[ut];
|
|
35875
35875
|
Vt = [];
|
|
35876
|
-
for (let F = 0, S = ct.length,
|
|
35877
|
-
|
|
35876
|
+
for (let F = 0, S = ct.length, A = S - 1, it = F + 1; F < S; F++, A++, it++)
|
|
35877
|
+
A === S && (A = 0), it === S && (it = 0), Vt[F] = At(ct[F], ct[A], ct[it]);
|
|
35878
35878
|
yt.push(Vt), Ct = Ct.concat(Vt);
|
|
35879
35879
|
}
|
|
35880
35880
|
for (let ut = 0; ut < X; ut++) {
|
|
35881
35881
|
const nt = ut / X, ct = Z * Math.cos(nt * Math.PI / 2), F = p * Math.sin(nt * Math.PI / 2) + y;
|
|
35882
|
-
for (let S = 0,
|
|
35882
|
+
for (let S = 0, A = et.length; S < A; S++) {
|
|
35883
35883
|
const it = Xt(et[S], at[S], F);
|
|
35884
35884
|
v(it.x, it.y, -ct);
|
|
35885
35885
|
}
|
|
35886
|
-
for (let S = 0,
|
|
35886
|
+
for (let S = 0, A = E.length; S < A; S++) {
|
|
35887
35887
|
const it = E[S];
|
|
35888
35888
|
Vt = yt[S];
|
|
35889
35889
|
for (let ot = 0, ht = it.length; ot < ht; ot++) {
|
|
@@ -35904,11 +35904,11 @@ class L9 extends Ot {
|
|
|
35904
35904
|
}
|
|
35905
35905
|
for (let ut = X - 1; ut >= 0; ut--) {
|
|
35906
35906
|
const nt = ut / X, ct = Z * Math.cos(nt * Math.PI / 2), F = p * Math.sin(nt * Math.PI / 2) + y;
|
|
35907
|
-
for (let S = 0,
|
|
35907
|
+
for (let S = 0, A = et.length; S < A; S++) {
|
|
35908
35908
|
const it = Xt(et[S], at[S], F);
|
|
35909
35909
|
v(it.x, it.y, b + ct);
|
|
35910
35910
|
}
|
|
35911
|
-
for (let S = 0,
|
|
35911
|
+
for (let S = 0, A = E.length; S < A; S++) {
|
|
35912
35912
|
const it = E[S];
|
|
35913
35913
|
Vt = yt[S];
|
|
35914
35914
|
for (let ot = 0, ht = it.length; ot < ht; ot++) {
|
|
@@ -35970,8 +35970,8 @@ class L9 extends Ot {
|
|
|
35970
35970
|
const F = ct;
|
|
35971
35971
|
let S = ct - 1;
|
|
35972
35972
|
S < 0 && (S = ut.length - 1);
|
|
35973
|
-
for (let
|
|
35974
|
-
const ot = Wt *
|
|
35973
|
+
for (let A = 0, it = m + X * 2; A < it; A++) {
|
|
35974
|
+
const ot = Wt * A, ht = Wt * (A + 1), Kt = nt + F + ot, Mt = nt + S + ot, kt = nt + S + ht, Dt = nt + F + ht;
|
|
35975
35975
|
gt(Kt, Mt, kt, Dt);
|
|
35976
35976
|
}
|
|
35977
35977
|
}
|
|
@@ -35992,7 +35992,7 @@ class L9 extends Ot {
|
|
|
35992
35992
|
}
|
|
35993
35993
|
function gt(ut, nt, ct, F) {
|
|
35994
35994
|
Lt(ut), Lt(nt), Lt(F), Lt(nt), Lt(ct), Lt(F);
|
|
35995
|
-
const S = n.length / 3,
|
|
35995
|
+
const S = n.length / 3, A = g.generateSideWallUV(
|
|
35996
35996
|
i,
|
|
35997
35997
|
n,
|
|
35998
35998
|
S - 6,
|
|
@@ -36000,7 +36000,7 @@ class L9 extends Ot {
|
|
|
36000
36000
|
S - 2,
|
|
36001
36001
|
S - 1
|
|
36002
36002
|
);
|
|
36003
|
-
pt(
|
|
36003
|
+
pt(A[0]), pt(A[1]), pt(A[3]), pt(A[1]), pt(A[2]), pt(A[3]);
|
|
36004
36004
|
}
|
|
36005
36005
|
function Lt(ut) {
|
|
36006
36006
|
n.push(r[ut * 3 + 0]), n.push(r[ut * 3 + 1]), n.push(r[ut * 3 + 2]);
|
|
@@ -36170,13 +36170,13 @@ class tK {
|
|
|
36170
36170
|
class eK extends be {
|
|
36171
36171
|
constructor(e) {
|
|
36172
36172
|
super();
|
|
36173
|
-
|
|
36174
|
-
|
|
36175
|
-
|
|
36176
|
-
|
|
36177
|
-
|
|
36178
|
-
|
|
36179
|
-
|
|
36173
|
+
O(this, "options");
|
|
36174
|
+
O(this, "directionalLight");
|
|
36175
|
+
O(this, "spotLight");
|
|
36176
|
+
O(this, "pointLight");
|
|
36177
|
+
O(this, "hemisphereLight");
|
|
36178
|
+
O(this, "rectAreaLight");
|
|
36179
|
+
O(this, "rectAreaLightUniformsLibInit", !1);
|
|
36180
36180
|
this.options = e;
|
|
36181
36181
|
}
|
|
36182
36182
|
create() {
|
|
@@ -36254,8 +36254,8 @@ class eK extends be {
|
|
|
36254
36254
|
class iK extends be {
|
|
36255
36255
|
constructor(e) {
|
|
36256
36256
|
super();
|
|
36257
|
-
|
|
36258
|
-
this.options =
|
|
36257
|
+
O(this, "options");
|
|
36258
|
+
this.options = Tt({
|
|
36259
36259
|
sprite: !0
|
|
36260
36260
|
}, e);
|
|
36261
36261
|
}
|
|
@@ -36314,12 +36314,12 @@ let tp;
|
|
|
36314
36314
|
class xf extends be {
|
|
36315
36315
|
constructor(e) {
|
|
36316
36316
|
super();
|
|
36317
|
-
|
|
36318
|
-
|
|
36319
|
-
|
|
36320
|
-
|
|
36321
|
-
|
|
36322
|
-
this.options =
|
|
36317
|
+
O(this, "options");
|
|
36318
|
+
O(this, "line");
|
|
36319
|
+
O(this, "helperMesh");
|
|
36320
|
+
O(this, "helperMeshPosition");
|
|
36321
|
+
O(this, "pickTube", null);
|
|
36322
|
+
this.options = Tt({
|
|
36323
36323
|
color: "#ffffff",
|
|
36324
36324
|
lineWidth: 6,
|
|
36325
36325
|
globe: !1,
|
|
@@ -36474,8 +36474,8 @@ class xf extends be {
|
|
|
36474
36474
|
class lK extends be {
|
|
36475
36475
|
constructor(e) {
|
|
36476
36476
|
super();
|
|
36477
|
-
|
|
36478
|
-
this.options =
|
|
36477
|
+
O(this, "options");
|
|
36478
|
+
this.options = Tt({}, e);
|
|
36479
36479
|
}
|
|
36480
36480
|
create() {
|
|
36481
36481
|
return rt(this, null, function* () {
|
|
@@ -36502,8 +36502,8 @@ class aK extends be {
|
|
|
36502
36502
|
class Cf extends be {
|
|
36503
36503
|
constructor(e) {
|
|
36504
36504
|
super();
|
|
36505
|
-
|
|
36506
|
-
this.options =
|
|
36505
|
+
O(this, "options");
|
|
36506
|
+
this.options = Tt({}, e);
|
|
36507
36507
|
}
|
|
36508
36508
|
create() {
|
|
36509
36509
|
return rt(this, null, function* () {
|
|
@@ -36602,9 +36602,9 @@ class ZK extends be {
|
|
|
36602
36602
|
class Y9 extends be {
|
|
36603
36603
|
constructor() {
|
|
36604
36604
|
super(...arguments);
|
|
36605
|
-
|
|
36606
|
-
|
|
36607
|
-
|
|
36605
|
+
O(this, "radius", 100);
|
|
36606
|
+
O(this, "material");
|
|
36607
|
+
O(this, "options");
|
|
36608
36608
|
}
|
|
36609
36609
|
create() {
|
|
36610
36610
|
var i;
|
|
@@ -36678,97 +36678,116 @@ const gK = {
|
|
|
36678
36678
|
Icosahedron: uK,
|
|
36679
36679
|
Lathe: mK,
|
|
36680
36680
|
Octahedron: pK
|
|
36681
|
-
}, fK = Object.keys(Be(
|
|
36681
|
+
}, fK = Object.keys(Be(Tt({}, Sf), { Arc: xf, Model: Cf })).map(
|
|
36682
36682
|
(s) => s
|
|
36683
|
-
), Ml =
|
|
36683
|
+
), Ml = Tt(Tt({}, gK), Sf);
|
|
36684
36684
|
class RK {
|
|
36685
36685
|
constructor() {
|
|
36686
|
-
|
|
36687
|
-
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
A(this, "showMaterialListTitle", /* @__PURE__ */ new Map());
|
|
36692
|
-
A(this, "objectList", /* @__PURE__ */ new Map());
|
|
36686
|
+
O(this, "pluginName", "materialList");
|
|
36687
|
+
O(this, "pencil");
|
|
36688
|
+
O(this, "fixBufferGeometry", new Ot());
|
|
36689
|
+
O(this, "materialList", /* @__PURE__ */ new Map());
|
|
36690
|
+
O(this, "objectList", /* @__PURE__ */ new Map());
|
|
36693
36691
|
}
|
|
36694
36692
|
install(t) {
|
|
36695
36693
|
this.pencil = t;
|
|
36696
36694
|
}
|
|
36697
36695
|
setMaterial(t, e, i) {
|
|
36698
|
-
this.materialList.has(t) && console.warn(`MaterialList: ${t} already exists`), this.materialList.set(t,
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36696
|
+
this.materialList.has(t) && console.warn(`MaterialList: ${t} already exists`), this.materialList.set(t, e), this.setShowMaterialList(t, t, Tt({
|
|
36697
|
+
name: e.name,
|
|
36698
|
+
disableCheckHide: !0
|
|
36699
|
+
}, i));
|
|
36700
|
+
}
|
|
36701
|
+
setMaterialObj(t, e, i) {
|
|
36702
|
+
Object.keys(e).forEach((n) => {
|
|
36703
|
+
const l = `${t}#${n}`, a = i == null ? void 0 : i[n];
|
|
36704
|
+
this.setMaterial(l, e[n], a);
|
|
36704
36705
|
});
|
|
36705
36706
|
}
|
|
36706
36707
|
getMaterial(t) {
|
|
36707
|
-
|
|
36708
|
-
return (e = this.materialList.get(t)) == null ? void 0 : e.material;
|
|
36708
|
+
return this.materialList.get(t);
|
|
36709
36709
|
}
|
|
36710
36710
|
getMaterialObj(t) {
|
|
36711
36711
|
const e = {};
|
|
36712
36712
|
return this.materialList.forEach((i, n) => {
|
|
36713
36713
|
if (n.startsWith(`${t}#`)) {
|
|
36714
36714
|
const l = n.replace(`${t}#`, "");
|
|
36715
|
-
e[l] = i
|
|
36715
|
+
e[l] = i;
|
|
36716
36716
|
}
|
|
36717
36717
|
}), Object.values(e).length ? e : void 0;
|
|
36718
36718
|
}
|
|
36719
|
-
|
|
36720
|
-
|
|
36721
|
-
|
|
36722
|
-
|
|
36723
|
-
|
|
36724
|
-
return n || console.warn(`MaterialList: ${i} not exists`), n;
|
|
36719
|
+
setShowMaterialList(t, e, i) {
|
|
36720
|
+
if (!(i != null && i.disableCheckHide)) {
|
|
36721
|
+
const a = Array.isArray(e) ? e : [e];
|
|
36722
|
+
this.objectList.forEach((o) => {
|
|
36723
|
+
a.includes(o.key) && (o.selectHide = !0);
|
|
36725
36724
|
});
|
|
36726
|
-
{
|
|
36727
|
-
const i = this.getMaterial(e);
|
|
36728
|
-
return i || console.warn(`MaterialList: ${e} not exists`), i;
|
|
36729
36725
|
}
|
|
36726
|
+
const n = Array.isArray(e) ? e.map((a) => this.getMaterial(a)) : this.getMaterial(e), l = new Zt(this.fixBufferGeometry, n);
|
|
36727
|
+
l.userData.fixBufferGeometry = !0, i != null && i.name && (l.name = i.name), this.setObject3d(l, t, {
|
|
36728
|
+
selectHide: i == null ? void 0 : i.selectHide,
|
|
36729
|
+
disableCheckHide: i == null ? void 0 : i.disableCheckHide
|
|
36730
|
+
});
|
|
36731
|
+
}
|
|
36732
|
+
getValidShowObjectListArr() {
|
|
36733
|
+
return [...this.objectList.values()].filter((t) => t.selectHide !== !0);
|
|
36730
36734
|
}
|
|
36731
36735
|
emitObject3dChange() {
|
|
36732
36736
|
this.pencil.event.emit("object3dListChange");
|
|
36733
36737
|
}
|
|
36734
36738
|
setObject3d(t, e, i) {
|
|
36735
|
-
this.objectList.has(t) && console.warn(`ObjectList: ${t.uuid} already exists`),
|
|
36739
|
+
if (this.objectList.has(t) && console.warn(`ObjectList: ${t.uuid} already exists`), !(i != null && i.disableCheckHide)) {
|
|
36740
|
+
const n = t.material;
|
|
36741
|
+
if (n) {
|
|
36742
|
+
const l = Array.isArray(n) ? n : [n];
|
|
36743
|
+
this.objectList.forEach((a) => {
|
|
36744
|
+
const o = a.object3d.material;
|
|
36745
|
+
if (o) {
|
|
36746
|
+
const c = Array.isArray(o) ? o : [o];
|
|
36747
|
+
l.every((d, h) => c[h] === d) && (a.selectHide = !0);
|
|
36748
|
+
}
|
|
36749
|
+
});
|
|
36750
|
+
}
|
|
36751
|
+
}
|
|
36752
|
+
this.objectList.set(t, Tt({
|
|
36753
|
+
key: e,
|
|
36754
|
+
object3d: t
|
|
36755
|
+
}, i)), this.emitObject3dChange();
|
|
36736
36756
|
}
|
|
36737
36757
|
delObject3d(t) {
|
|
36738
36758
|
this.objectList.delete(t), this.emitObject3dChange();
|
|
36739
36759
|
}
|
|
36740
|
-
|
|
36760
|
+
getObject3dKey(t) {
|
|
36741
36761
|
var e;
|
|
36742
|
-
return (e = this.objectList.get(t)) == null ? void 0 : e.
|
|
36762
|
+
return (e = this.objectList.get(t)) == null ? void 0 : e.key;
|
|
36743
36763
|
}
|
|
36744
|
-
|
|
36764
|
+
changeObject3dKey(t, e) {
|
|
36745
36765
|
this.objectList.forEach((i, n) => {
|
|
36746
|
-
|
|
36747
|
-
|
|
36748
|
-
|
|
36749
|
-
|
|
36750
|
-
|
|
36766
|
+
const { parent: l, key: a } = i;
|
|
36767
|
+
if (n === t || l === t) {
|
|
36768
|
+
let o = e;
|
|
36769
|
+
o.includes("$1") && (o = o.replace("$1", a)), this.objectList.set(n, Be(Tt({}, i), {
|
|
36770
|
+
key: o
|
|
36771
|
+
}));
|
|
36751
36772
|
}
|
|
36752
36773
|
}), this.emitObject3dChange();
|
|
36753
36774
|
}
|
|
36754
36775
|
removeObject3d(t) {
|
|
36755
36776
|
this.objectList.forEach((e, i) => {
|
|
36756
|
-
|
|
36757
|
-
(i === t || ((n = e.meta) == null ? void 0 : n.parent) === t) && (e.selectHide = !0);
|
|
36777
|
+
(i === t || e.parent === t) && (e.selectHide = !0);
|
|
36758
36778
|
}), this.emitObject3dChange();
|
|
36759
36779
|
}
|
|
36760
36780
|
resetObject3d(t) {
|
|
36761
36781
|
this.objectList.forEach((e, i) => {
|
|
36762
|
-
|
|
36763
|
-
(i === t || ((n = e.meta) == null ? void 0 : n.parent) === t) && (e.selectHide = !1);
|
|
36782
|
+
(i === t || e.parent === t) && (e.selectHide = !1);
|
|
36764
36783
|
}), this.emitObject3dChange();
|
|
36765
36784
|
}
|
|
36766
36785
|
dispose() {
|
|
36767
36786
|
this.materialList.forEach((t) => {
|
|
36768
|
-
t
|
|
36769
|
-
material: t
|
|
36787
|
+
t && Ka({
|
|
36788
|
+
material: t
|
|
36770
36789
|
});
|
|
36771
|
-
}), this.materialList.clear(), this.objectList.clear()
|
|
36790
|
+
}), this.materialList.clear(), this.objectList.clear();
|
|
36772
36791
|
}
|
|
36773
36792
|
}
|
|
36774
36793
|
function vX(s, t) {
|
|
@@ -39038,17 +39057,17 @@ class gk extends JW {
|
|
|
39038
39057
|
for (; $ <= tt; ) $ <<= 1;
|
|
39039
39058
|
for ($ >>= 1, lt = $, $ >>= 1; $ >= 1; ) {
|
|
39040
39059
|
Rt = 0;
|
|
39041
|
-
const St = Rt + U * (P - lt),
|
|
39060
|
+
const St = Rt + U * (P - lt), vt = U * $, Nt = U * lt, bt = H * $, Ht = H * lt;
|
|
39042
39061
|
let wt, Ze, Ne, Ue;
|
|
39043
39062
|
for (; Rt <= St; Rt += Nt) {
|
|
39044
39063
|
let ve = Rt;
|
|
39045
39064
|
const _t = Rt + H * (Y - lt);
|
|
39046
39065
|
for (; ve <= _t; ve += Ht) {
|
|
39047
|
-
const we = ve + bt, k0 = ve +
|
|
39066
|
+
const we = ve + bt, k0 = ve + vt, Ie = k0 + bt;
|
|
39048
39067
|
dt ? (Ct(V[ve + x], V[k0 + x]), wt = Vt.a, Ne = Vt.b, Ct(V[we + x], V[Ie + x]), Ze = Vt.a, Ue = Vt.b, Ct(wt, Ze), V[ve + x] = Vt.a, V[we + x] = Vt.b, Ct(Ne, Ue), V[k0 + x] = Vt.a, V[Ie + x] = Vt.b) : (Et(V[ve + x], V[k0 + x]), wt = Vt.a, Ne = Vt.b, Et(V[we + x], V[Ie + x]), Ze = Vt.a, Ue = Vt.b, Et(wt, Ze), V[ve + x] = Vt.a, V[we + x] = Vt.b, Et(Ne, Ue), V[k0 + x] = Vt.a, V[Ie + x] = Vt.b);
|
|
39049
39068
|
}
|
|
39050
39069
|
if (Y & $) {
|
|
39051
|
-
const we = ve +
|
|
39070
|
+
const we = ve + vt;
|
|
39052
39071
|
dt ? Ct(V[ve + x], V[we + x]) : Et(V[ve + x], V[we + x]), wt = Vt.a, V[we + x] = Vt.b, V[ve + x] = wt;
|
|
39053
39072
|
}
|
|
39054
39073
|
}
|
|
@@ -39089,8 +39108,8 @@ class gk extends JW {
|
|
|
39089
39108
|
throw new Error("hufDecode issues");
|
|
39090
39109
|
}
|
|
39091
39110
|
}
|
|
39092
|
-
const
|
|
39093
|
-
for ($ >>=
|
|
39111
|
+
const vt = 8 - P & 7;
|
|
39112
|
+
for ($ >>= vt, lt -= vt; lt > 0; ) {
|
|
39094
39113
|
const Nt = x[$ << 14 - lt & 16383];
|
|
39095
39114
|
if (Nt.len)
|
|
39096
39115
|
lt -= Nt.len, At(Nt.lit, U, $, lt, Y, H, dt, tt, Rt), $ = Bt.c, lt = Bt.lc;
|
|
@@ -39107,8 +39126,8 @@ class gk extends JW {
|
|
|
39107
39126
|
throw new Error("Something wrong with HUF_ENCSIZE");
|
|
39108
39127
|
const Rt = new Array(65537), St = new Array(16384);
|
|
39109
39128
|
M(St);
|
|
39110
|
-
const
|
|
39111
|
-
if (z(V, Y,
|
|
39129
|
+
const vt = H - (Y.value - dt);
|
|
39130
|
+
if (z(V, Y, vt, tt, $, Rt), lt > 8 * (H - (Y.value - dt)))
|
|
39112
39131
|
throw new Error("Something wrong with hufUncompress");
|
|
39113
39132
|
et(Rt, tt, $, St), qt(Rt, St, V, Y, lt, $, U, P, q);
|
|
39114
39133
|
}
|
|
@@ -39152,7 +39171,7 @@ class gk extends JW {
|
|
|
39152
39171
|
}
|
|
39153
39172
|
function pt(V, x, Y, H, P, U) {
|
|
39154
39173
|
let q = new DataView(U.buffer);
|
|
39155
|
-
const dt = Y[V.idx[0]].width, tt = Y[V.idx[0]].height, $ = 3, lt = Math.floor(dt / 8), Rt = Math.ceil(dt / 8), St = Math.ceil(tt / 8),
|
|
39174
|
+
const dt = Y[V.idx[0]].width, tt = Y[V.idx[0]].height, $ = 3, lt = Math.floor(dt / 8), Rt = Math.ceil(dt / 8), St = Math.ceil(tt / 8), vt = dt - (Rt - 1) * 8, Nt = tt - (St - 1) * 8, bt = { value: 0 }, Ht = new Array($), wt = new Array($), Ze = new Array($), Ne = new Array($), Ue = new Array($);
|
|
39156
39175
|
for (let _t = 0; _t < $; ++_t)
|
|
39157
39176
|
Ue[_t] = x[V.idx[_t]], Ht[_t] = _t < 1 ? 0 : Ht[_t - 1] + Rt * St, wt[_t] = new Float32Array(64), Ze[_t] = new Uint16Array(64), Ne[_t] = new Uint16Array(Rt * 64);
|
|
39158
39177
|
for (let _t = 0; _t < St; ++_t) {
|
|
@@ -39160,7 +39179,7 @@ class gk extends JW {
|
|
|
39160
39179
|
_t == St - 1 && (we = Nt);
|
|
39161
39180
|
let k0 = 8;
|
|
39162
39181
|
for (let Se = 0; Se < Rt; ++Se) {
|
|
39163
|
-
Se == Rt - 1 && (k0 =
|
|
39182
|
+
Se == Rt - 1 && (k0 = vt);
|
|
39164
39183
|
for (let Ke = 0; Ke < $; ++Ke)
|
|
39165
39184
|
Ze[Ke].fill(0), Ze[Ke][0] = P[Ht[Ke]++], ut(bt, H, Ze[Ke]), nt(Ze[Ke], wt[Ke]), ct(wt[Ke]);
|
|
39166
39185
|
F(wt);
|
|
@@ -39196,7 +39215,7 @@ class gk extends JW {
|
|
|
39196
39215
|
for (let Se = 0; Se < dt; ++Se)
|
|
39197
39216
|
ve[Se] = q.getUint16(Ie + Se * 2 * we, !0);
|
|
39198
39217
|
for (let Se = 0; Se < dt; ++Se)
|
|
39199
|
-
q.setFloat32(Ie + Se * 2 * we,
|
|
39218
|
+
q.setFloat32(Ie + Se * 2 * we, D(ve[Se]), !0);
|
|
39200
39219
|
}
|
|
39201
39220
|
}
|
|
39202
39221
|
}
|
|
@@ -39206,13 +39225,13 @@ class gk extends JW {
|
|
|
39206
39225
|
H = x[V.value], H == 65280 ? P = 64 : H >> 8 == 255 ? P += H & 255 : (Y[P] = H, P++), V.value++;
|
|
39207
39226
|
}
|
|
39208
39227
|
function nt(V, x) {
|
|
39209
|
-
x[0] =
|
|
39228
|
+
x[0] = D(V[0]), x[1] = D(V[1]), x[2] = D(V[5]), x[3] = D(V[6]), x[4] = D(V[14]), x[5] = D(V[15]), x[6] = D(V[27]), x[7] = D(V[28]), x[8] = D(V[2]), x[9] = D(V[4]), x[10] = D(V[7]), x[11] = D(V[13]), x[12] = D(V[16]), x[13] = D(V[26]), x[14] = D(V[29]), x[15] = D(V[42]), x[16] = D(V[3]), x[17] = D(V[8]), x[18] = D(V[12]), x[19] = D(V[17]), x[20] = D(V[25]), x[21] = D(V[30]), x[22] = D(V[41]), x[23] = D(V[43]), x[24] = D(V[9]), x[25] = D(V[11]), x[26] = D(V[18]), x[27] = D(V[24]), x[28] = D(V[31]), x[29] = D(V[40]), x[30] = D(V[44]), x[31] = D(V[53]), x[32] = D(V[10]), x[33] = D(V[19]), x[34] = D(V[23]), x[35] = D(V[32]), x[36] = D(V[39]), x[37] = D(V[45]), x[38] = D(V[52]), x[39] = D(V[54]), x[40] = D(V[20]), x[41] = D(V[22]), x[42] = D(V[33]), x[43] = D(V[38]), x[44] = D(V[46]), x[45] = D(V[51]), x[46] = D(V[55]), x[47] = D(V[60]), x[48] = D(V[21]), x[49] = D(V[34]), x[50] = D(V[37]), x[51] = D(V[47]), x[52] = D(V[50]), x[53] = D(V[56]), x[54] = D(V[59]), x[55] = D(V[61]), x[56] = D(V[35]), x[57] = D(V[36]), x[58] = D(V[48]), x[59] = D(V[49]), x[60] = D(V[57]), x[61] = D(V[58]), x[62] = D(V[62]), x[63] = D(V[63]);
|
|
39210
39229
|
}
|
|
39211
39230
|
function ct(V) {
|
|
39212
39231
|
const x = 0.5 * Math.cos(0.7853975), Y = 0.5 * Math.cos(3.14159 / 16), H = 0.5 * Math.cos(3.14159 / 8), P = 0.5 * Math.cos(3 * 3.14159 / 16), U = 0.5 * Math.cos(5 * 3.14159 / 16), q = 0.5 * Math.cos(3 * 3.14159 / 8), dt = 0.5 * Math.cos(7 * 3.14159 / 16), tt = new Array(4), $ = new Array(4), lt = new Array(4), Rt = new Array(4);
|
|
39213
39232
|
for (let St = 0; St < 8; ++St) {
|
|
39214
|
-
const
|
|
39215
|
-
tt[0] = H * V[
|
|
39233
|
+
const vt = St * 8;
|
|
39234
|
+
tt[0] = H * V[vt + 2], tt[1] = q * V[vt + 2], tt[2] = H * V[vt + 6], tt[3] = q * V[vt + 6], $[0] = Y * V[vt + 1] + P * V[vt + 3] + U * V[vt + 5] + dt * V[vt + 7], $[1] = P * V[vt + 1] - dt * V[vt + 3] - Y * V[vt + 5] - U * V[vt + 7], $[2] = U * V[vt + 1] - Y * V[vt + 3] + dt * V[vt + 5] + P * V[vt + 7], $[3] = dt * V[vt + 1] - U * V[vt + 3] + P * V[vt + 5] - Y * V[vt + 7], lt[0] = x * (V[vt + 0] + V[vt + 4]), lt[3] = x * (V[vt + 0] - V[vt + 4]), lt[1] = tt[0] + tt[3], lt[2] = tt[1] - tt[2], Rt[0] = lt[0] + lt[1], Rt[1] = lt[3] + lt[2], Rt[2] = lt[3] - lt[2], Rt[3] = lt[0] - lt[1], V[vt + 0] = Rt[0] + $[0], V[vt + 1] = Rt[1] + $[1], V[vt + 2] = Rt[2] + $[2], V[vt + 3] = Rt[3] + $[3], V[vt + 4] = Rt[3] - $[3], V[vt + 5] = Rt[2] - $[2], V[vt + 6] = Rt[1] - $[1], V[vt + 7] = Rt[0] - $[0];
|
|
39216
39235
|
}
|
|
39217
39236
|
for (let St = 0; St < 8; ++St)
|
|
39218
39237
|
tt[0] = H * V[16 + St], tt[1] = q * V[16 + St], tt[2] = H * V[48 + St], tt[3] = q * V[48 + St], $[0] = Y * V[8 + St] + P * V[24 + St] + U * V[40 + St] + dt * V[56 + St], $[1] = P * V[8 + St] - dt * V[24 + St] - Y * V[40 + St] - U * V[56 + St], $[2] = U * V[8 + St] - Y * V[24 + St] + dt * V[40 + St] + P * V[56 + St], $[3] = dt * V[8 + St] - U * V[24 + St] + P * V[40 + St] - Y * V[56 + St], lt[0] = x * (V[St] + V[32 + St]), lt[3] = x * (V[St] - V[32 + St]), lt[1] = tt[0] + tt[3], lt[2] = tt[1] - tt[2], Rt[0] = lt[0] + lt[1], Rt[1] = lt[3] + lt[2], Rt[2] = lt[3] - lt[2], Rt[3] = lt[0] - lt[1], V[0 + St] = Rt[0] + $[0], V[8 + St] = Rt[1] + $[1], V[16 + St] = Rt[2] + $[2], V[24 + St] = Rt[3] + $[3], V[32 + St] = Rt[3] - $[3], V[40 + St] = Rt[2] - $[2], V[48 + St] = Rt[1] - $[1], V[56 + St] = Rt[0] - $[0];
|
|
@@ -39225,9 +39244,9 @@ class gk extends JW {
|
|
|
39225
39244
|
}
|
|
39226
39245
|
function S(V, x, Y) {
|
|
39227
39246
|
for (let H = 0; H < 64; ++H)
|
|
39228
|
-
x[Y + H] = mc.toHalfFloat(
|
|
39247
|
+
x[Y + H] = mc.toHalfFloat(A(V[H]));
|
|
39229
39248
|
}
|
|
39230
|
-
function
|
|
39249
|
+
function A(V) {
|
|
39231
39250
|
return V <= 1 ? Math.sign(V) * Math.pow(Math.abs(V), 2.2) : Math.sign(V) * Math.pow(C, Math.abs(V) - 1);
|
|
39232
39251
|
}
|
|
39233
39252
|
function it(V) {
|
|
@@ -39270,13 +39289,13 @@ class gk extends JW {
|
|
|
39270
39289
|
}
|
|
39271
39290
|
v($, H, U);
|
|
39272
39291
|
let St = 0;
|
|
39273
|
-
const
|
|
39292
|
+
const vt = new Uint8Array(H.buffer.byteLength);
|
|
39274
39293
|
for (let Nt = 0; Nt < V.lines; Nt++)
|
|
39275
39294
|
for (let bt = 0; bt < V.inputChannels.length; bt++) {
|
|
39276
39295
|
const Ht = q[bt], wt = Ht.nx * Ht.size, Ze = new Uint8Array(H.buffer, Ht.end * 2, wt * 2);
|
|
39277
|
-
|
|
39296
|
+
vt.set(Ze, St), St += wt * 2, Ht.end += wt;
|
|
39278
39297
|
}
|
|
39279
|
-
return new DataView(
|
|
39298
|
+
return new DataView(vt.buffer);
|
|
39280
39299
|
}
|
|
39281
39300
|
function Mt(V) {
|
|
39282
39301
|
const x = V.array.slice(V.offset.value, V.offset.value + V.size), Y = Br(x), H = V.inputChannels.length * V.lines * V.columns * V.totalBytes, P = new ArrayBuffer(H), U = new DataView(P);
|
|
@@ -39288,14 +39307,14 @@ class gk extends JW {
|
|
|
39288
39307
|
switch (V.inputChannels[lt].pixelType) {
|
|
39289
39308
|
case 1:
|
|
39290
39309
|
tt[0] = q, tt[1] = tt[0] + V.columns, q = tt[1] + V.columns;
|
|
39291
|
-
for (let
|
|
39310
|
+
for (let vt = 0; vt < V.columns; ++vt) {
|
|
39292
39311
|
const Nt = Y[tt[0]++] << 8 | Y[tt[1]++];
|
|
39293
39312
|
Rt += Nt, U.setUint16(dt, Rt, !0), dt += 2;
|
|
39294
39313
|
}
|
|
39295
39314
|
break;
|
|
39296
39315
|
case 2:
|
|
39297
39316
|
tt[0] = q, tt[1] = tt[0] + V.columns, tt[2] = tt[1] + V.columns, q = tt[2] + V.columns;
|
|
39298
|
-
for (let
|
|
39317
|
+
for (let vt = 0; vt < V.columns; ++vt) {
|
|
39299
39318
|
const Nt = Y[tt[0]++] << 24 | Y[tt[1]++] << 16 | Y[tt[2]++] << 8;
|
|
39300
39319
|
Rt += Nt, U.setUint32(dt, Rt, !0), dt += 4;
|
|
39301
39320
|
}
|
|
@@ -39369,13 +39388,13 @@ class gk extends JW {
|
|
|
39369
39388
|
const bt = V.array.slice(Y.value, Y.value + P.rleCompressedSize), Ht = Br(bt);
|
|
39370
39389
|
St = Lt(Ht.buffer), Y.value += P.rleCompressedSize;
|
|
39371
39390
|
}
|
|
39372
|
-
let
|
|
39391
|
+
let vt = 0;
|
|
39373
39392
|
const Nt = new Array(tt.length);
|
|
39374
39393
|
for (let bt = 0; bt < Nt.length; ++bt)
|
|
39375
39394
|
Nt[bt] = new Array();
|
|
39376
39395
|
for (let bt = 0; bt < V.lines; ++bt)
|
|
39377
39396
|
for (let Ht = 0; Ht < tt.length; ++Ht)
|
|
39378
|
-
Nt[Ht].push(
|
|
39397
|
+
Nt[Ht].push(vt), vt += tt[Ht].width * V.type * 2;
|
|
39379
39398
|
pt($, Nt, tt, lt, Rt, H);
|
|
39380
39399
|
for (let bt = 0; bt < tt.length; ++bt) {
|
|
39381
39400
|
const Ht = tt[bt];
|
|
@@ -39451,7 +39470,7 @@ class gk extends JW {
|
|
|
39451
39470
|
function Yt(V, x) {
|
|
39452
39471
|
return mc.toHalfFloat(B(V, x));
|
|
39453
39472
|
}
|
|
39454
|
-
function
|
|
39473
|
+
function D(V) {
|
|
39455
39474
|
const x = (V & 31744) >> 10, Y = V & 1023;
|
|
39456
39475
|
return (V >> 15 ? -1 : 1) * (x ? x === 31 ? Y ? NaN : 1 / 0 : Math.pow(2, x - 15) * (1 + Y / 1024) : 6103515625e-14 * (Y / 1024));
|
|
39457
39476
|
}
|
|
@@ -39459,8 +39478,8 @@ class gk extends JW {
|
|
|
39459
39478
|
const Y = V.getUint16(x.value, !0);
|
|
39460
39479
|
return x.value += 2, Y;
|
|
39461
39480
|
}
|
|
39462
|
-
function
|
|
39463
|
-
return
|
|
39481
|
+
function Ft(V, x) {
|
|
39482
|
+
return D(Gt(V, x));
|
|
39464
39483
|
}
|
|
39465
39484
|
function ie(V, x, Y, H) {
|
|
39466
39485
|
const P = Y.value, U = [];
|
|
@@ -39613,8 +39632,8 @@ class gk extends JW {
|
|
|
39613
39632
|
x.value += V.size;
|
|
39614
39633
|
for (let Rt = 0; Rt < V.lines; Rt++) {
|
|
39615
39634
|
const St = Rt * V.columns * V.totalBytes;
|
|
39616
|
-
for (let
|
|
39617
|
-
const Nt = T.channels[
|
|
39635
|
+
for (let vt = 0; vt < V.inputChannels.length; vt++) {
|
|
39636
|
+
const Nt = T.channels[vt].name, bt = V.channelByteOffsets[Nt] * V.columns, Ht = V.decodeChannels[Nt];
|
|
39618
39637
|
if (Ht === void 0) continue;
|
|
39619
39638
|
Y.value = St + bt;
|
|
39620
39639
|
const wt = (V.height - (1 + dt + Rt)) * V.outLineWidth;
|
|
@@ -39637,8 +39656,8 @@ class gk extends JW {
|
|
|
39637
39656
|
const $ = H * V.blockHeight, lt = tt + V.scanOrder($);
|
|
39638
39657
|
if (lt >= V.height) continue;
|
|
39639
39658
|
const Rt = tt * U, St = (V.height - 1 - lt) * V.outLineWidth;
|
|
39640
|
-
for (let
|
|
39641
|
-
const Nt = T.channels[
|
|
39659
|
+
for (let vt = 0; vt < V.inputChannels.length; vt++) {
|
|
39660
|
+
const Nt = T.channels[vt].name, bt = V.channelByteOffsets[Nt] * V.columns, Ht = V.decodeChannels[Nt];
|
|
39642
39661
|
if (Ht !== void 0) {
|
|
39643
39662
|
Y.value = Rt + bt;
|
|
39644
39663
|
for (let wt = 0; wt < V.columns; wt++) {
|
|
@@ -39744,7 +39763,7 @@ class gk extends JW {
|
|
|
39744
39763
|
if (U.type == 1)
|
|
39745
39764
|
switch (P) {
|
|
39746
39765
|
case V0:
|
|
39747
|
-
U.getter =
|
|
39766
|
+
U.getter = Ft;
|
|
39748
39767
|
break;
|
|
39749
39768
|
case g0:
|
|
39750
39769
|
U.getter = Gt;
|
|
@@ -39780,9 +39799,9 @@ class gk extends JW {
|
|
|
39780
39799
|
U.blockHeight = V.tiles.ySize, U.blockWidth = V.tiles.xSize;
|
|
39781
39800
|
const lt = Gd(V.tiles, U.width, U.height), Rt = Is(lt, U.width, V.tiles.xSize, V.tiles.roundingMode), St = Is(lt, U.height, V.tiles.ySize, V.tiles.roundingMode);
|
|
39782
39801
|
U.tileCount = Rt[0] * St[0];
|
|
39783
|
-
for (let
|
|
39784
|
-
for (let Nt = 0; Nt < St[
|
|
39785
|
-
for (let bt = 0; bt < Rt[
|
|
39802
|
+
for (let vt = 0; vt < lt; vt++)
|
|
39803
|
+
for (let Nt = 0; Nt < St[vt]; Nt++)
|
|
39804
|
+
for (let bt = 0; bt < Rt[vt]; bt++)
|
|
39786
39805
|
ye(x, H);
|
|
39787
39806
|
U.decode = Xd.bind(U);
|
|
39788
39807
|
} else {
|
|
@@ -40408,13 +40427,13 @@ function ra(s) {
|
|
|
40408
40427
|
const t = new jt();
|
|
40409
40428
|
return t.color.setScalar(s), t;
|
|
40410
40429
|
}
|
|
40411
|
-
const Kf = "0.
|
|
40430
|
+
const Kf = "0.20.0";
|
|
40412
40431
|
class Fk {
|
|
40413
40432
|
constructor() {
|
|
40414
|
-
|
|
40415
|
-
|
|
40416
|
-
|
|
40417
|
-
|
|
40433
|
+
O(this, "event", new ey());
|
|
40434
|
+
O(this, "eventHandlers", {});
|
|
40435
|
+
O(this, "on", this.event.on.bind(this.event));
|
|
40436
|
+
O(this, "emit", this.event.emit.bind(this.event));
|
|
40418
40437
|
}
|
|
40419
40438
|
addListener(t, e, i, n = !1) {
|
|
40420
40439
|
e in this.eventHandlers || (this.eventHandlers[e] = []), this.eventHandlers[e].push({
|
|
@@ -40444,11 +40463,11 @@ class Fk {
|
|
|
40444
40463
|
}
|
|
40445
40464
|
class K0 {
|
|
40446
40465
|
constructor(t) {
|
|
40447
|
-
|
|
40448
|
-
|
|
40449
|
-
|
|
40450
|
-
|
|
40451
|
-
|
|
40466
|
+
O(this, "id");
|
|
40467
|
+
O(this, "updatable");
|
|
40468
|
+
O(this, "type");
|
|
40469
|
+
O(this, "name");
|
|
40470
|
+
O(this, "editor");
|
|
40452
40471
|
this.id = -1, this.updatable = !1, this.type = "", this.name = "", this.editor = t;
|
|
40453
40472
|
}
|
|
40454
40473
|
toJSON() {
|
|
@@ -40841,8 +40860,8 @@ class Pk extends K0 {
|
|
|
40841
40860
|
class Bf extends K0 {
|
|
40842
40861
|
constructor(e, i, n) {
|
|
40843
40862
|
super(e);
|
|
40844
|
-
|
|
40845
|
-
|
|
40863
|
+
O(this, "visType");
|
|
40864
|
+
O(this, "visOptions");
|
|
40846
40865
|
this.type = "AddVis", this.visType = i, this.visOptions = n, i !== void 0 && (this.name = `Add Vis: ${i}`);
|
|
40847
40866
|
}
|
|
40848
40867
|
execute() {
|
|
@@ -40865,9 +40884,9 @@ class Bf extends K0 {
|
|
|
40865
40884
|
class Pf extends K0 {
|
|
40866
40885
|
constructor(e, i, n) {
|
|
40867
40886
|
super(e);
|
|
40868
|
-
|
|
40869
|
-
|
|
40870
|
-
|
|
40887
|
+
O(this, "objectType");
|
|
40888
|
+
O(this, "objectOptions");
|
|
40889
|
+
O(this, "obj");
|
|
40871
40890
|
this.type = "AddObject", this.objectType = i, this.objectOptions = n, i !== void 0 && (this.name = `Add Object: ${i}`);
|
|
40872
40891
|
}
|
|
40873
40892
|
execute() {
|
|
@@ -40875,11 +40894,11 @@ class Pf extends K0 {
|
|
|
40875
40894
|
var n, l, a;
|
|
40876
40895
|
if (this.obj = yield this.editor.viewport.vis.drawController.draw(
|
|
40877
40896
|
this.objectType,
|
|
40878
|
-
Be(
|
|
40897
|
+
Be(Tt({}, this.objectOptions), {
|
|
40879
40898
|
key: `${this.id}`
|
|
40880
40899
|
})
|
|
40881
40900
|
), this.editor.viewport.vis.mList.objectList.has(this.obj.object3d))
|
|
40882
|
-
(n = this.editor.viewport.vis) == null || n.mList.
|
|
40901
|
+
(n = this.editor.viewport.vis) == null || n.mList.changeObject3dKey(
|
|
40883
40902
|
this.obj.object3d,
|
|
40884
40903
|
`$1_${this.id}`
|
|
40885
40904
|
);
|
|
@@ -40920,8 +40939,8 @@ class Pf extends K0 {
|
|
|
40920
40939
|
class Ef extends K0 {
|
|
40921
40940
|
constructor(e, i) {
|
|
40922
40941
|
super(e);
|
|
40923
|
-
|
|
40924
|
-
|
|
40942
|
+
O(this, "object");
|
|
40943
|
+
O(this, "objectUuid");
|
|
40925
40944
|
this.type = "RemoveObject", this.name = "Remove Object", this.object = i, this.objectUuid = this.editor.uuidByBaseObject(i);
|
|
40926
40945
|
}
|
|
40927
40946
|
execute() {
|
|
@@ -40945,15 +40964,15 @@ class Ef extends K0 {
|
|
|
40945
40964
|
class Qf extends K0 {
|
|
40946
40965
|
constructor(e, i) {
|
|
40947
40966
|
super(e);
|
|
40948
|
-
|
|
40949
|
-
|
|
40967
|
+
O(this, "object");
|
|
40968
|
+
O(this, "copyObject", null);
|
|
40950
40969
|
this.type = "CopyObject", this.name = "Copy Object", this.object = i;
|
|
40951
40970
|
}
|
|
40952
40971
|
execute() {
|
|
40953
40972
|
return rt(this, null, function* () {
|
|
40954
40973
|
var a, o;
|
|
40955
|
-
const e = this.editor.viewport.vis.mList, i = e.
|
|
40956
|
-
this.copyObject = n, e.objectList.has(n.object3d) ? (a = this.editor.viewport.vis) == null || a.mList.
|
|
40974
|
+
const e = this.editor.viewport.vis.mList, i = e.getObject3dKey(this.object.object3d), n = yield this.object.instantiate();
|
|
40975
|
+
this.copyObject = n, e.objectList.has(n.object3d) ? (a = this.editor.viewport.vis) == null || a.mList.changeObject3dKey(
|
|
40957
40976
|
n.object3d,
|
|
40958
40977
|
`$1_${this.id}`
|
|
40959
40978
|
) : e.setObject3d(n.object3d, `${i}_${this.id}`, {
|
|
@@ -40988,9 +41007,9 @@ class Qf extends K0 {
|
|
|
40988
41007
|
class Ek extends K0 {
|
|
40989
41008
|
constructor(e, i, n) {
|
|
40990
41009
|
super(e);
|
|
40991
|
-
|
|
40992
|
-
|
|
40993
|
-
|
|
41010
|
+
O(this, "attributeName");
|
|
41011
|
+
O(this, "newValue");
|
|
41012
|
+
O(this, "oldValue");
|
|
40994
41013
|
this.type = "SetSetting", this.updatable = !0, this.name = `Set Setting.${i}`, this.attributeName = i, this.newValue = n, e.viewport.vis && (this.oldValue = e.viewport.vis.settings[i]);
|
|
40995
41014
|
}
|
|
40996
41015
|
execute() {
|
|
@@ -41081,12 +41100,12 @@ const jk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
41081
41100
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
41082
41101
|
class Ak {
|
|
41083
41102
|
constructor(t) {
|
|
41084
|
-
|
|
41085
|
-
|
|
41086
|
-
|
|
41087
|
-
|
|
41088
|
-
|
|
41089
|
-
|
|
41103
|
+
O(this, "editor");
|
|
41104
|
+
O(this, "undos");
|
|
41105
|
+
O(this, "redos");
|
|
41106
|
+
O(this, "lastCmdTime");
|
|
41107
|
+
O(this, "idCounter");
|
|
41108
|
+
O(this, "historyDisabled");
|
|
41090
41109
|
this.editor = t, this.undos = [], this.redos = [], this.lastCmdTime = Date.now(), this.idCounter = 0, this.historyDisabled = !1;
|
|
41091
41110
|
}
|
|
41092
41111
|
execute(t, e) {
|
|
@@ -41123,17 +41142,21 @@ class Ak {
|
|
|
41123
41142
|
return t;
|
|
41124
41143
|
}
|
|
41125
41144
|
fromJSON(t, e) {
|
|
41126
|
-
if (t
|
|
41127
|
-
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
|
|
41131
|
-
|
|
41132
|
-
|
|
41133
|
-
l.json = n, l.id = n.id, l.name = n.name, this.undos.push(l), this.idCounter = n.id > this.idCounter ? n.id : this.idCounter;
|
|
41145
|
+
if (t === void 0) return;
|
|
41146
|
+
let i = -1;
|
|
41147
|
+
for (let n = 0; n < t.u.length; n++) {
|
|
41148
|
+
const l = t.u[n];
|
|
41149
|
+
if (l.id <= i) {
|
|
41150
|
+
console.error("历史记录id错误");
|
|
41151
|
+
continue;
|
|
41134
41152
|
}
|
|
41135
|
-
|
|
41153
|
+
if (l.id === 1 && l.visOptions && e && (l.visOptions = e(l.visOptions)), l.type === "SetOption")
|
|
41154
|
+
continue;
|
|
41155
|
+
l.type.endsWith("Command") && (l.type = l.type.replace("Command", ""));
|
|
41156
|
+
const a = new jk[l.type](this.editor);
|
|
41157
|
+
a.json = l, a.id = l.id, a.name = l.name, this.undos.push(a), this.idCounter = l.id > this.idCounter ? l.id : this.idCounter, i = l.id;
|
|
41136
41158
|
}
|
|
41159
|
+
this.editor.emit("historyChanged", this.undos[this.undos.length - 1]);
|
|
41137
41160
|
}
|
|
41138
41161
|
processUndos() {
|
|
41139
41162
|
return new Promise((t) => {
|
|
@@ -41169,11 +41192,11 @@ class Ak {
|
|
|
41169
41192
|
}
|
|
41170
41193
|
class Dk {
|
|
41171
41194
|
constructor(t, e) {
|
|
41172
|
-
|
|
41173
|
-
|
|
41174
|
-
|
|
41175
|
-
|
|
41176
|
-
|
|
41195
|
+
O(this, "editor");
|
|
41196
|
+
O(this, "vis");
|
|
41197
|
+
O(this, "extendsOptions", {});
|
|
41198
|
+
O(this, "delLoadObj");
|
|
41199
|
+
O(this, "options");
|
|
41177
41200
|
this.options = e, this.editor = t;
|
|
41178
41201
|
}
|
|
41179
41202
|
setSaveCamera() {
|
|
@@ -41207,29 +41230,27 @@ class Dk {
|
|
|
41207
41230
|
}
|
|
41208
41231
|
setVis(i) {
|
|
41209
41232
|
return rt(this, arguments, function* (t, e = {}) {
|
|
41210
|
-
var a
|
|
41233
|
+
var a;
|
|
41211
41234
|
if (!this.options.visFactories && (this.editor.setViewportVis(t), !this.options.visFactories)) {
|
|
41212
41235
|
console.error("visFactories is not defined");
|
|
41213
41236
|
return;
|
|
41214
41237
|
}
|
|
41215
41238
|
if (this.vis = this.options.visFactories, this.vis.visName !== t)
|
|
41216
41239
|
throw new Error(`visName is not match, import {${t}}`);
|
|
41217
|
-
this.vis.setOptions(
|
|
41240
|
+
this.vis.setOptions(Tt(Tt({}, e), this.extendsOptions)), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing;
|
|
41218
41241
|
let n = 1;
|
|
41219
|
-
this.vis.on("loaderProgress", (
|
|
41242
|
+
this.vis.on("loaderProgress", (o, c) => {
|
|
41220
41243
|
n === 1 && (this.editor.emit("progress", {
|
|
41221
41244
|
type: "下载资源",
|
|
41222
|
-
value:
|
|
41223
|
-
}),
|
|
41245
|
+
value: o / c * 100 | 0
|
|
41246
|
+
}), o === c && (n = 0));
|
|
41224
41247
|
}), this.vis.on("settingsChanged", () => {
|
|
41225
41248
|
this.editor.emit("settingsChanged");
|
|
41226
41249
|
}), this.vis.on("show", () => {
|
|
41227
41250
|
this.editor.emit("visShow");
|
|
41228
41251
|
}), yield this.vis.init();
|
|
41229
41252
|
const { pencil: l } = this.vis;
|
|
41230
|
-
l.userData.EditorEnv = !this.editor.playing, this.editor.pencil = l, this.editor.changeSelectOption(), this.editor.playing || (this.initEvent(), this.editor.emit("visChanged", this.vis)), (a = this.vis) == null || a.pencil.event.on("
|
|
41231
|
-
this.editor.changeSelectOption();
|
|
41232
|
-
}), (o = this.vis) == null || o.pencil.event.on("object3dListChange", () => {
|
|
41253
|
+
l.userData.EditorEnv = !this.editor.playing, this.editor.pencil = l, this.editor.changeSelectOption(), this.editor.playing || (this.initEvent(), this.editor.emit("visChanged", this.vis)), (a = this.vis) == null || a.pencil.event.on("object3dListChange", () => {
|
|
41233
41254
|
this.editor.changeSelectOption();
|
|
41234
41255
|
});
|
|
41235
41256
|
});
|
|
@@ -41364,7 +41385,7 @@ const us = (s, t) => {
|
|
|
41364
41385
|
}), s.h.u[0] && s.h.u[0].visType === "city" && (s.h.u[0].visOptions.jsonName || (s.h.u = [])), s.h.u[0] && s.h.u[0].visType === "map") {
|
|
41365
41386
|
if (s.h.u[0].visOptions.geojson) {
|
|
41366
41387
|
const { geojson: i, adcode: n, geojsonLite: l } = s.h.u[0].visOptions;
|
|
41367
|
-
s.h.u[0].visOptions = Be(
|
|
41388
|
+
s.h.u[0].visOptions = Be(Tt({}, s.h.u[0].visOptions), {
|
|
41368
41389
|
geojsonMap: {
|
|
41369
41390
|
[n]: i
|
|
41370
41391
|
},
|
|
@@ -41375,7 +41396,7 @@ const us = (s, t) => {
|
|
|
41375
41396
|
}
|
|
41376
41397
|
if (s.h.u[0].visOptions.bbox) {
|
|
41377
41398
|
const { bbox: i, bboxMap: n, adcode: l } = s.h.u[0].visOptions;
|
|
41378
|
-
s.h.u[0].visOptions = Be(
|
|
41399
|
+
s.h.u[0].visOptions = Be(Tt({}, s.h.u[0].visOptions), {
|
|
41379
41400
|
bboxMap: n || {
|
|
41380
41401
|
[l]: i
|
|
41381
41402
|
}
|
|
@@ -41383,7 +41404,7 @@ const us = (s, t) => {
|
|
|
41383
41404
|
}
|
|
41384
41405
|
if (s.h.u[0].visOptions.worldBg) {
|
|
41385
41406
|
const { worldBg: i } = s.h.u[0].visOptions;
|
|
41386
|
-
s.h.u[0].visOptions = Be(
|
|
41407
|
+
s.h.u[0].visOptions = Be(Tt({}, s.h.u[0].visOptions), {
|
|
41387
41408
|
parentBg: i
|
|
41388
41409
|
}), delete s.h.u[0].visOptions.worldBg;
|
|
41389
41410
|
}
|
|
@@ -41425,25 +41446,23 @@ const us = (s, t) => {
|
|
|
41425
41446
|
};
|
|
41426
41447
|
class _k {
|
|
41427
41448
|
constructor(t) {
|
|
41428
|
-
|
|
41429
|
-
|
|
41430
|
-
|
|
41431
|
-
|
|
41432
|
-
|
|
41433
|
-
|
|
41434
|
-
|
|
41435
|
-
|
|
41436
|
-
|
|
41437
|
-
|
|
41438
|
-
|
|
41439
|
-
|
|
41440
|
-
|
|
41441
|
-
|
|
41442
|
-
|
|
41443
|
-
|
|
41444
|
-
|
|
41445
|
-
A(this, "selectOption", []);
|
|
41446
|
-
A(this, "checkSelectOption", XR(
|
|
41449
|
+
O(this, "selected", null);
|
|
41450
|
+
O(this, "playing", !0);
|
|
41451
|
+
O(this, "currentMaterialSlot", 0);
|
|
41452
|
+
O(this, "events", new ey());
|
|
41453
|
+
O(this, "history");
|
|
41454
|
+
O(this, "viewport");
|
|
41455
|
+
O(this, "pencil");
|
|
41456
|
+
O(this, "on", this.events.on.bind(this.events));
|
|
41457
|
+
O(this, "emit", this.events.emit.bind(this.events));
|
|
41458
|
+
O(this, "sdkVersion", Kf);
|
|
41459
|
+
O(this, "jsonVersion");
|
|
41460
|
+
O(this, "key");
|
|
41461
|
+
O(this, "name");
|
|
41462
|
+
O(this, "open", !1);
|
|
41463
|
+
O(this, "options");
|
|
41464
|
+
O(this, "selectOption", []);
|
|
41465
|
+
O(this, "checkSelectOption", XR(
|
|
41447
41466
|
(t) => {
|
|
41448
41467
|
const e = new window.Map();
|
|
41449
41468
|
t.forEach((i) => {
|
|
@@ -41453,11 +41472,11 @@ class _k {
|
|
|
41453
41472
|
500,
|
|
41454
41473
|
{ leading: !1 }
|
|
41455
41474
|
));
|
|
41456
|
-
this.options =
|
|
41475
|
+
this.options = Tt({
|
|
41457
41476
|
assetsPrefix: ""
|
|
41458
41477
|
}, t), this.events.setMaxListeners(9999999), this.viewport = new Dk(this, {
|
|
41459
41478
|
visFactories: t.visFactories
|
|
41460
|
-
}), this.history = new Ak(this)
|
|
41479
|
+
}), this.history = new Ak(this);
|
|
41461
41480
|
}
|
|
41462
41481
|
getObjectMaterial(t, e) {
|
|
41463
41482
|
if (!t)
|
|
@@ -41467,19 +41486,19 @@ class _k {
|
|
|
41467
41486
|
return Array.isArray(n) && e !== void 0 && (n = n[e]), n;
|
|
41468
41487
|
}
|
|
41469
41488
|
setObjectMaterial(t, e, i) {
|
|
41470
|
-
|
|
41471
|
-
let
|
|
41472
|
-
Array.isArray(t.material) && e !== void 0 ? (
|
|
41473
|
-
const
|
|
41474
|
-
if (
|
|
41475
|
-
if (Array.isArray(
|
|
41476
|
-
const
|
|
41477
|
-
|
|
41478
|
-
|
|
41489
|
+
const n = this.viewport.vis, { mList: l } = n;
|
|
41490
|
+
let a = t.material;
|
|
41491
|
+
Array.isArray(t.material) && e !== void 0 ? (a = t.material[e], t.material[e] = i) : t.material = i, a && t.userData.fixBufferGeometry && (this.pencil.scene.traverse((o) => {
|
|
41492
|
+
const c = o;
|
|
41493
|
+
if (c.material)
|
|
41494
|
+
if (Array.isArray(c.material)) {
|
|
41495
|
+
const d = c.material;
|
|
41496
|
+
d.forEach((h, r) => {
|
|
41497
|
+
h === a && (d[r] = i);
|
|
41479
41498
|
});
|
|
41480
|
-
} else
|
|
41481
|
-
}),
|
|
41482
|
-
|
|
41499
|
+
} else c.material === a && (c.material = i);
|
|
41500
|
+
}), l.materialList.forEach((o, c) => {
|
|
41501
|
+
o === a && l.materialList.set(c, i);
|
|
41483
41502
|
}));
|
|
41484
41503
|
}
|
|
41485
41504
|
uuidByObject(t) {
|
|
@@ -41499,28 +41518,19 @@ class _k {
|
|
|
41499
41518
|
return (e = this.selectOption.find((i) => i.uuid === t || i.fixUuid === t)) == null ? void 0 : e.baseObject;
|
|
41500
41519
|
}
|
|
41501
41520
|
changeSelectOption() {
|
|
41502
|
-
const t = this.viewport.vis, { pencil: e, mList: i } = t,
|
|
41503
|
-
const
|
|
41504
|
-
this.fixMeshMap.set(d, h), h.userData.fixBufferGeometry = !0;
|
|
41505
|
-
const r = c.replace(c[0], c[0].toLowerCase());
|
|
41506
|
-
let u;
|
|
41507
|
-
return d != null && d.name ? u = d == null ? void 0 : d.name : n && i.showMaterialListTitle.has(c) && (u = i.showMaterialListTitle.get(c)), {
|
|
41508
|
-
uuid: r,
|
|
41509
|
-
name: u,
|
|
41510
|
-
object: h
|
|
41511
|
-
};
|
|
41512
|
-
}), a = [...i.objectList.keys()].filter((c) => i.objectList.get(c).selectHide !== !0).map((c) => {
|
|
41513
|
-
const { name: d, meta: h } = i.objectList.get(c);
|
|
41521
|
+
const t = this.viewport.vis, { pencil: e, mList: i } = t, l = i.getValidShowObjectListArr().map((a) => {
|
|
41522
|
+
const { key: o, object3d: c, baseObject: d, parent: h } = a;
|
|
41514
41523
|
let r = !1;
|
|
41515
|
-
return
|
|
41516
|
-
uuid:
|
|
41524
|
+
return d && a.remove !== !1 && (r = !0), {
|
|
41525
|
+
uuid: o.replace(o[0], o[0].toLowerCase()),
|
|
41517
41526
|
object: c,
|
|
41518
|
-
name: c.name
|
|
41519
|
-
|
|
41520
|
-
remove: r
|
|
41521
|
-
|
|
41522
|
-
|
|
41523
|
-
|
|
41527
|
+
name: c.name,
|
|
41528
|
+
baseObject: d,
|
|
41529
|
+
remove: r,
|
|
41530
|
+
parent: h
|
|
41531
|
+
};
|
|
41532
|
+
});
|
|
41533
|
+
if (l.unshift(
|
|
41524
41534
|
{
|
|
41525
41535
|
name: "场景",
|
|
41526
41536
|
object: e.scene,
|
|
@@ -41532,12 +41542,12 @@ class _k {
|
|
|
41532
41542
|
uuid: "camera"
|
|
41533
41543
|
}
|
|
41534
41544
|
), !this.jsonVersion) {
|
|
41535
|
-
const
|
|
41536
|
-
|
|
41537
|
-
|
|
41538
|
-
}),
|
|
41545
|
+
const a = new window.Map();
|
|
41546
|
+
l.forEach((o, c) => {
|
|
41547
|
+
a.has(o.name) ? o.fixUuid = o.name + "_" + c : (o.fixUuid = o.name, a.set(o.name, !0));
|
|
41548
|
+
}), a.clear();
|
|
41539
41549
|
}
|
|
41540
|
-
this.checkSelectOption(
|
|
41550
|
+
this.checkSelectOption(l), this.selectOption = l, this.emit("sceneGraphChanged");
|
|
41541
41551
|
}
|
|
41542
41552
|
execute(t, e) {
|
|
41543
41553
|
return rt(this, null, function* () {
|
|
@@ -41602,37 +41612,37 @@ class _k {
|
|
|
41602
41612
|
return this.pencil ? (this.pencil.render(), this.pencil.renderer.domElement.toDataURL()) : "";
|
|
41603
41613
|
}
|
|
41604
41614
|
dispose() {
|
|
41605
|
-
this.
|
|
41615
|
+
this.events.removeAllListeners(), this.viewport.dispose(), this.history.clear();
|
|
41606
41616
|
}
|
|
41607
41617
|
}
|
|
41608
41618
|
const op = !1;
|
|
41609
41619
|
class pd extends Fk {
|
|
41610
41620
|
constructor(e) {
|
|
41611
41621
|
super();
|
|
41612
|
-
|
|
41613
|
-
|
|
41614
|
-
|
|
41615
|
-
|
|
41616
|
-
|
|
41617
|
-
|
|
41618
|
-
|
|
41619
|
-
|
|
41620
|
-
|
|
41621
|
-
|
|
41622
|
-
|
|
41623
|
-
|
|
41624
|
-
|
|
41625
|
-
|
|
41626
|
-
|
|
41627
|
-
|
|
41628
|
-
|
|
41629
|
-
|
|
41630
|
-
|
|
41631
|
-
|
|
41632
|
-
|
|
41633
|
-
|
|
41634
|
-
|
|
41635
|
-
if (this.container = e.container, this.options =
|
|
41622
|
+
O(this, "container");
|
|
41623
|
+
O(this, "playing", !0);
|
|
41624
|
+
O(this, "leftTruck", !0);
|
|
41625
|
+
O(this, "options");
|
|
41626
|
+
O(this, "pencilConfig", {});
|
|
41627
|
+
O(this, "showState", !1);
|
|
41628
|
+
O(this, "settings", {});
|
|
41629
|
+
O(this, "delLoadArr");
|
|
41630
|
+
O(this, "extendsOptions", {});
|
|
41631
|
+
O(this, "pencil");
|
|
41632
|
+
O(this, "drawController", new co(Ml));
|
|
41633
|
+
O(this, "mList");
|
|
41634
|
+
O(this, "loader");
|
|
41635
|
+
O(this, "worker");
|
|
41636
|
+
O(this, "pmremGenerator", null);
|
|
41637
|
+
O(this, "re", null);
|
|
41638
|
+
O(this, "roomEnvMap");
|
|
41639
|
+
O(this, "visName");
|
|
41640
|
+
O(this, "checkDprTimer");
|
|
41641
|
+
O(this, "editor");
|
|
41642
|
+
O(this, "devicePixelRatio", 1);
|
|
41643
|
+
O(this, "initSettingsObj");
|
|
41644
|
+
O(this, "mouseButtonsActiveStore");
|
|
41645
|
+
if (this.container = e.container, this.options = Tt({
|
|
41636
41646
|
assetsPrefix: "",
|
|
41637
41647
|
editor: !0
|
|
41638
41648
|
}, e), !this.options.assetsPrefix) {
|
|
@@ -41645,7 +41655,7 @@ class pd extends Fk {
|
|
|
41645
41655
|
})), this.visName = this.constructor.VisName;
|
|
41646
41656
|
}
|
|
41647
41657
|
setOptions(e) {
|
|
41648
|
-
this.options =
|
|
41658
|
+
this.options = Tt(Tt({}, this.options), e);
|
|
41649
41659
|
}
|
|
41650
41660
|
get fromJSON() {
|
|
41651
41661
|
return this.editor.fromJSON.bind(this.editor);
|
|
@@ -41684,7 +41694,7 @@ class pd extends Fk {
|
|
|
41684
41694
|
this.devicePixelRatio = this.getDevicePixelRatio(), this.options.css2DContainer && (this.pencilConfig.css2DRendererParams = {
|
|
41685
41695
|
container: this.options.css2DContainer
|
|
41686
41696
|
}), this.initPencilPlugin();
|
|
41687
|
-
const e = new nT(
|
|
41697
|
+
const e = new nT(Tt(Tt({
|
|
41688
41698
|
container: this.container,
|
|
41689
41699
|
isdev: !this.playing && op,
|
|
41690
41700
|
stats: !this.playing && op,
|
|
@@ -41783,7 +41793,7 @@ class pd extends Fk {
|
|
|
41783
41793
|
mouseRight: this.leftTruck ? oi.ROTATE : oi.TRUCK,
|
|
41784
41794
|
mouseWheel: oi.DOLLY
|
|
41785
41795
|
}, this.settings = new Proxy(
|
|
41786
|
-
Be(
|
|
41796
|
+
Be(Tt(Tt({}, this.initSettingsObj), this.mouseButtonsActiveStore), {
|
|
41787
41797
|
mouseNone: !1
|
|
41788
41798
|
}),
|
|
41789
41799
|
{
|
|
@@ -41896,8 +41906,8 @@ class pd extends Fk {
|
|
|
41896
41906
|
super.dispose(), this.editor && (this.editor.viewport.vis = void 0, this.editor.dispose()), (e = this.pencil) == null || e.dispose(), (i = this.pmremGenerator) == null || i.dispose(), (n = this.re) == null || n.dispose(), (l = this.checkDprTimer) == null || l.stop();
|
|
41897
41907
|
}
|
|
41898
41908
|
}
|
|
41899
|
-
|
|
41900
|
-
const Af = [73.502355, 18.143579, 135.09567, 53.563269], qk = [-180, -55.643164, 180, 83.564844], Fc = Be(
|
|
41909
|
+
O(pd, "VisName", "base");
|
|
41910
|
+
const Af = [73.502355, 18.143579, 135.09567, 53.563269], qk = [-180, -55.643164, 180, 83.564844], Fc = Be(Tt({}, F9), {
|
|
41901
41911
|
features: F9.features.map((s) => {
|
|
41902
41912
|
if (s.properties.ISO_A2 === "CN") {
|
|
41903
41913
|
const t = s.geometry.coordinates, e = [...dp.features[0].geometry.coordinates];
|
|
@@ -41909,15 +41919,15 @@ const Af = [73.502355, 18.143579, 135.09567, 53.563269], qk = [-180, -55.643164,
|
|
|
41909
41919
|
//start 广西
|
|
41910
41920
|
t[0][0][73]
|
|
41911
41921
|
]
|
|
41912
|
-
], Be(
|
|
41913
|
-
geometry: Be(
|
|
41922
|
+
], Be(Tt({}, s), {
|
|
41923
|
+
geometry: Be(Tt({}, s.geometry), {
|
|
41914
41924
|
coordinates: e
|
|
41915
41925
|
})
|
|
41916
41926
|
});
|
|
41917
41927
|
} else
|
|
41918
41928
|
return s;
|
|
41919
41929
|
})
|
|
41920
|
-
}), Y2 = Be(
|
|
41930
|
+
}), Y2 = Be(Tt({}, Fc), {
|
|
41921
41931
|
features: Fc.features.filter(
|
|
41922
41932
|
(s) => s.properties.ISO_A3 !== "ATA"
|
|
41923
41933
|
)
|
|
@@ -41931,13 +41941,13 @@ const Af = [73.502355, 18.143579, 135.09567, 53.563269], qk = [-180, -55.643164,
|
|
|
41931
41941
|
class Df extends be {
|
|
41932
41942
|
constructor(e) {
|
|
41933
41943
|
super();
|
|
41934
|
-
|
|
41935
|
-
|
|
41936
|
-
|
|
41937
|
-
|
|
41938
|
-
|
|
41939
|
-
|
|
41940
|
-
if (this.options =
|
|
41944
|
+
O(this, "options");
|
|
41945
|
+
O(this, "isActive", !0);
|
|
41946
|
+
O(this, "groupArr", []);
|
|
41947
|
+
O(this, "areaArr", []);
|
|
41948
|
+
O(this, "lineArr");
|
|
41949
|
+
O(this, "extrudelineArr");
|
|
41950
|
+
if (this.options = Tt({
|
|
41941
41951
|
areaGroup: !0,
|
|
41942
41952
|
hasSide: !0,
|
|
41943
41953
|
lineOffset: 0,
|
|
@@ -41976,7 +41986,7 @@ class Df extends be {
|
|
|
41976
41986
|
target: this,
|
|
41977
41987
|
key: N
|
|
41978
41988
|
});
|
|
41979
|
-
return C.userData =
|
|
41989
|
+
return C.userData = Tt({}, L), C;
|
|
41980
41990
|
}))
|
|
41981
41991
|
);
|
|
41982
41992
|
this.groupArr = g;
|
|
@@ -42093,14 +42103,14 @@ class Df extends be {
|
|
|
42093
42103
|
},
|
|
42094
42104
|
G
|
|
42095
42105
|
);
|
|
42096
|
-
return p.userData =
|
|
42106
|
+
return p.userData = Tt({}, b), p;
|
|
42097
42107
|
}))
|
|
42098
42108
|
);
|
|
42099
42109
|
{
|
|
42100
42110
|
const u = yield d.geoGeometry("extrudePolygon", {
|
|
42101
42111
|
mesaage: {
|
|
42102
42112
|
coordinatesArr: c.map(({ coords: b }) => b).flat(),
|
|
42103
|
-
projection:
|
|
42113
|
+
projection: Tt({}, this.options.projection),
|
|
42104
42114
|
bbox: n,
|
|
42105
42115
|
bboxOffset: o,
|
|
42106
42116
|
depth: [this.options.depth],
|
|
@@ -42132,7 +42142,7 @@ class Df extends be {
|
|
|
42132
42142
|
}), a = this.pencil.getPlugin("worker"), o = this.pencil.getPlugin("draw"), c = (G = i.curvatureResolution) != null ? G : this.options.curvatureResolution, { coords: d, properties: h } = l[0], r = this.findGroup(this.getPropertiesKey(h)), u = yield o.draw("Group", {
|
|
42133
42143
|
target: r
|
|
42134
42144
|
});
|
|
42135
|
-
u.userData =
|
|
42145
|
+
u.userData = Tt({}, h);
|
|
42136
42146
|
const [m, b] = yield Promise.all([
|
|
42137
42147
|
a.geoGeometry(
|
|
42138
42148
|
c ? "conicPolygon" : "extrudePolygon",
|
|
@@ -42204,7 +42214,7 @@ class Df extends be {
|
|
|
42204
42214
|
},
|
|
42205
42215
|
m
|
|
42206
42216
|
);
|
|
42207
|
-
return G.userData =
|
|
42217
|
+
return G.userData = Tt({}, u), G;
|
|
42208
42218
|
}))
|
|
42209
42219
|
);
|
|
42210
42220
|
{
|
|
@@ -42364,8 +42374,8 @@ class Df extends be {
|
|
|
42364
42374
|
class Of extends be {
|
|
42365
42375
|
constructor(e) {
|
|
42366
42376
|
super();
|
|
42367
|
-
|
|
42368
|
-
|
|
42377
|
+
O(this, "options");
|
|
42378
|
+
O(this, "mapArr", []);
|
|
42369
42379
|
this.options = e;
|
|
42370
42380
|
}
|
|
42371
42381
|
create() {
|
|
@@ -42392,7 +42402,7 @@ class Of extends be {
|
|
|
42392
42402
|
areaGroup: !1,
|
|
42393
42403
|
// bbox: bboxworld,
|
|
42394
42404
|
depth: e,
|
|
42395
|
-
materialOptions:
|
|
42405
|
+
materialOptions: Tt({}, l)
|
|
42396
42406
|
},
|
|
42397
42407
|
this
|
|
42398
42408
|
);
|
|
@@ -42441,7 +42451,7 @@ class Of extends be {
|
|
|
42441
42451
|
}), this.mapArr.length = 0;
|
|
42442
42452
|
}
|
|
42443
42453
|
}
|
|
42444
|
-
const tz = Be(
|
|
42454
|
+
const tz = Be(Tt({}, Ml), {
|
|
42445
42455
|
PlaneMap: Df,
|
|
42446
42456
|
ContinentsBg: Of
|
|
42447
42457
|
}), ez = (s) => {
|
|
@@ -42480,11 +42490,15 @@ const tz = Be(vt({}, Ml), {
|
|
|
42480
42490
|
extrudeLineMat: o
|
|
42481
42491
|
};
|
|
42482
42492
|
})();
|
|
42483
|
-
e.setMaterialObj("plane", i), e.
|
|
42493
|
+
e.setMaterialObj("plane", i), e.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
42494
|
+
name: "板块"
|
|
42495
|
+
}), e.setShowMaterialList("line", "plane#lineMat", {
|
|
42496
|
+
name: "板块线"
|
|
42497
|
+
});
|
|
42484
42498
|
});
|
|
42485
42499
|
};
|
|
42486
42500
|
}, iz = (s) => {
|
|
42487
|
-
if (s.initSettingsObj =
|
|
42501
|
+
if (s.initSettingsObj = Tt({
|
|
42488
42502
|
"测试板块颜色.color:::caId": "ffffff",
|
|
42489
42503
|
"测试边框颜色.color:::caId": "ffffff",
|
|
42490
42504
|
"测试边框宽度:::caId": 0
|
|
@@ -42530,11 +42544,15 @@ const tz = Be(vt({}, Ml), {
|
|
|
42530
42544
|
extrudeLineMat: a
|
|
42531
42545
|
};
|
|
42532
42546
|
})();
|
|
42533
|
-
t.setMaterialObj("plane", e), t.
|
|
42547
|
+
t.setMaterialObj("plane", e), t.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
42548
|
+
name: "板块"
|
|
42549
|
+
}), t.setShowMaterialList("line", "plane#lineMat", {
|
|
42550
|
+
name: "板块线"
|
|
42551
|
+
});
|
|
42534
42552
|
});
|
|
42535
42553
|
};
|
|
42536
42554
|
}, nz = (s) => {
|
|
42537
|
-
s.initSettingsObj =
|
|
42555
|
+
s.initSettingsObj = Tt({
|
|
42538
42556
|
"测试板块颜色.color:::caId": "ffffff",
|
|
42539
42557
|
"测试边框颜色.color:::caId": "ffffff",
|
|
42540
42558
|
"测试边框宽度:::caId": 0
|
|
@@ -42563,6 +42581,7 @@ const tz = Be(vt({}, Ml), {
|
|
|
42563
42581
|
//@ts-ignore
|
|
42564
42582
|
depthWrite: !1
|
|
42565
42583
|
}), a = new Xe({
|
|
42584
|
+
name: "板块边线",
|
|
42566
42585
|
color: new st("#00FFED"),
|
|
42567
42586
|
sizeAttenuation: 0,
|
|
42568
42587
|
lineWidth: this.options.extrudeLineWidth,
|
|
@@ -42576,7 +42595,11 @@ const tz = Be(vt({}, Ml), {
|
|
|
42576
42595
|
extrudeLineMat: a
|
|
42577
42596
|
};
|
|
42578
42597
|
})();
|
|
42579
|
-
this.mList.setMaterialObj("plane", e), this.mList.
|
|
42598
|
+
this.mList.setMaterialObj("plane", e), this.mList.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
42599
|
+
name: "板块"
|
|
42600
|
+
}), this.mList.setShowMaterialList("line", "plane#lineMat", {
|
|
42601
|
+
name: "板块线"
|
|
42602
|
+
}), this.initMaterialBg();
|
|
42580
42603
|
});
|
|
42581
42604
|
};
|
|
42582
42605
|
}, sz = (s) => {
|
|
@@ -42613,7 +42636,11 @@ const tz = Be(vt({}, Ml), {
|
|
|
42613
42636
|
extrudeLineMat: a
|
|
42614
42637
|
};
|
|
42615
42638
|
})();
|
|
42616
|
-
this.mList.setMaterialObj("plane", e), this.mList.
|
|
42639
|
+
this.mList.setMaterialObj("plane", e), this.mList.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
42640
|
+
name: "板块"
|
|
42641
|
+
}), this.mList.setShowMaterialList("line", "plane#lineMat", {
|
|
42642
|
+
name: "板块线"
|
|
42643
|
+
}), this.initMaterialBg();
|
|
42617
42644
|
});
|
|
42618
42645
|
};
|
|
42619
42646
|
}, lz = (s) => {
|
|
@@ -42637,31 +42664,31 @@ const tz = Be(vt({}, Ml), {
|
|
|
42637
42664
|
constructor() {
|
|
42638
42665
|
super(...arguments);
|
|
42639
42666
|
//@ts-ignore
|
|
42640
|
-
|
|
42641
|
-
|
|
42642
|
-
|
|
42643
|
-
|
|
42644
|
-
|
|
42645
|
-
|
|
42646
|
-
|
|
42647
|
-
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
|
|
42651
|
-
|
|
42652
|
-
|
|
42667
|
+
O(this, "drawController", new co(tz));
|
|
42668
|
+
O(this, "mapHistory", []);
|
|
42669
|
+
O(this, "activePlaneMap", null);
|
|
42670
|
+
O(this, "isAnimating", !1);
|
|
42671
|
+
O(this, "parentBg", []);
|
|
42672
|
+
O(this, "continentsBg");
|
|
42673
|
+
O(this, "group");
|
|
42674
|
+
O(this, "centroidObj", {});
|
|
42675
|
+
O(this, "projection");
|
|
42676
|
+
O(this, "pcenter", [104, 37.5]);
|
|
42677
|
+
O(this, "pscale", 5e4 / 1e3);
|
|
42678
|
+
O(this, "meters");
|
|
42679
|
+
O(this, "extendsOptions", {
|
|
42653
42680
|
mapDepth: () => this.mapObj.depth,
|
|
42654
42681
|
equirectangular: () => this.options.equirectangular,
|
|
42655
42682
|
handleBackKeepCamvasState: () => this.options.handleBackKeepCamvasState,
|
|
42656
42683
|
mapBoundary: () => this.options.mapBoundary
|
|
42657
42684
|
});
|
|
42658
|
-
|
|
42685
|
+
O(this, "initSettingsObj", {
|
|
42659
42686
|
label: !1,
|
|
42660
42687
|
labelLite: !1,
|
|
42661
42688
|
shadowMap: !1
|
|
42662
42689
|
});
|
|
42663
|
-
|
|
42664
|
-
|
|
42690
|
+
O(this, "caId");
|
|
42691
|
+
O(this, "shadowMapLight");
|
|
42665
42692
|
}
|
|
42666
42693
|
get mapObj() {
|
|
42667
42694
|
return this.mapHistory[this.mapHistory.length - 1];
|
|
@@ -42686,14 +42713,14 @@ const tz = Be(vt({}, Ml), {
|
|
|
42686
42713
|
return this.mapHistory.map((e) => e.mapInfo.adcode);
|
|
42687
42714
|
}
|
|
42688
42715
|
setOptions(e) {
|
|
42689
|
-
const i =
|
|
42716
|
+
const i = Tt({
|
|
42690
42717
|
0: Y2,
|
|
42691
42718
|
1e5: sy
|
|
42692
42719
|
}, e == null ? void 0 : e.geojsonMap);
|
|
42693
42720
|
let n = {
|
|
42694
42721
|
1e5: dp
|
|
42695
42722
|
};
|
|
42696
|
-
const l =
|
|
42723
|
+
const l = Tt({
|
|
42697
42724
|
0: qk,
|
|
42698
42725
|
1e5: Af
|
|
42699
42726
|
}, e == null ? void 0 : e.bboxMap);
|
|
@@ -42705,7 +42732,7 @@ const tz = Be(vt({}, Ml), {
|
|
|
42705
42732
|
features: [c]
|
|
42706
42733
|
};
|
|
42707
42734
|
});
|
|
42708
|
-
}), n =
|
|
42735
|
+
}), n = Tt(Tt({}, n), e == null ? void 0 : e.extrudeLineGeojsonMap), super.setOptions(Be(Tt({
|
|
42709
42736
|
parentBg: !1,
|
|
42710
42737
|
continentsBg: !1,
|
|
42711
42738
|
continentsBgDepth: 0,
|
|
@@ -42793,7 +42820,7 @@ const tz = Be(vt({}, Ml), {
|
|
|
42793
42820
|
areaGroup: !1,
|
|
42794
42821
|
bbox: d,
|
|
42795
42822
|
depth: this.options.parentBgDepth,
|
|
42796
|
-
materialOptions:
|
|
42823
|
+
materialOptions: Tt({}, h)
|
|
42797
42824
|
}), u = o === 0 ? "world" : `${o}`;
|
|
42798
42825
|
r.lineArr.forEach((m) => {
|
|
42799
42826
|
m.object3d.name = "背景线", this.mList.setObject3d(m.object3d, u + "line", {
|
|
@@ -42896,10 +42923,15 @@ const tz = Be(vt({}, Ml), {
|
|
|
42896
42923
|
lineMat: c
|
|
42897
42924
|
};
|
|
42898
42925
|
})();
|
|
42899
|
-
this.mList.setMaterialObj("continents", i), this.mList.
|
|
42900
|
-
"
|
|
42901
|
-
"continents#sideMat"
|
|
42902
|
-
|
|
42926
|
+
this.mList.setMaterialObj("continents", i), this.mList.setShowMaterialList(
|
|
42927
|
+
"continentsArea",
|
|
42928
|
+
["continents#topMat", "continents#sideMat"],
|
|
42929
|
+
{
|
|
42930
|
+
name: "大洲"
|
|
42931
|
+
}
|
|
42932
|
+
), this.mList.setShowMaterialList("continentsLine", "continents#lineMat", {
|
|
42933
|
+
name: "大洲线"
|
|
42934
|
+
});
|
|
42903
42935
|
}
|
|
42904
42936
|
});
|
|
42905
42937
|
}
|
|
@@ -43081,7 +43113,7 @@ const tz = Be(vt({}, Ml), {
|
|
|
43081
43113
|
penumbra: 1,
|
|
43082
43114
|
decay: 0
|
|
43083
43115
|
}), i = e.object3d;
|
|
43084
|
-
this.mList.
|
|
43116
|
+
this.mList.changeObject3dKey(i, "Shadow$1"), this.mList.changeObject3dKey(i.target, "Shadow$1"), this.shadowMapLight = e, e.object3d.position.set(0.281, 32.487, 43.077), e.object3d.castShadow = !0;
|
|
43085
43117
|
const n = yield this.drawController.draw("PlaneShadow");
|
|
43086
43118
|
this.mList.setObject3d(n.object3d, "PlaneShadow", {
|
|
43087
43119
|
baseObject: n,
|
|
@@ -43219,13 +43251,12 @@ const tz = Be(vt({}, Ml), {
|
|
|
43219
43251
|
const { name: G } = b;
|
|
43220
43252
|
let { res: Z } = (a = this.options.geojsonMap) != null && a[e] ? { res: (o = this.options.geojsonMap) == null ? void 0 : o[e] } : yield L2(
|
|
43221
43253
|
`${this.options.assetsPrefix}/geojson/json/${e}.json`
|
|
43222
|
-
)
|
|
43223
|
-
const { res: p } = this.options.extrudeLine ? (c = this.options.extrudeLineGeojsonMap) != null && c[e] ? { res: (d = this.options.extrudeLineGeojsonMap) == null ? void 0 : d[e] } : yield L2(
|
|
43254
|
+
), { res: p } = this.options.extrudeLine ? (c = this.options.extrudeLineGeojsonMap) != null && c[e] ? { res: (d = this.options.extrudeLineGeojsonMap) == null ? void 0 : d[e] } : yield L2(
|
|
43224
43255
|
`${this.options.assetsPrefix}/geojson/json-lite/${e}.json`
|
|
43225
43256
|
) : {
|
|
43226
43257
|
res: void 0
|
|
43227
43258
|
};
|
|
43228
|
-
if (!this.options.showDistrict && this.getAdcodeShowLevel(e) === "city" && (Z = p), Z) {
|
|
43259
|
+
if (!this.options.showDistrict && this.getAdcodeShowLevel(e) === "city" && (Z = p, p = void 0), Z) {
|
|
43229
43260
|
const X = this.options.plateInCenter && (this.mapHistory.length < 1 || this.options.drillDownPlateInCenter);
|
|
43230
43261
|
if (X && this.fixNear(e), (h = this.options.fixGeojson) != null && h[e]) {
|
|
43231
43262
|
const J = (r = this.options.fixGeojson) == null ? void 0 : r[e];
|
|
@@ -43362,7 +43393,7 @@ const tz = Be(vt({}, Ml), {
|
|
|
43362
43393
|
depth: l,
|
|
43363
43394
|
adcode: a
|
|
43364
43395
|
}) {
|
|
43365
|
-
const c = this.mList.getMaterialObj("plane"), d =
|
|
43396
|
+
const c = this.mList.getMaterialObj("plane"), d = Tt({}, c), h = yield this.drawController.draw(
|
|
43366
43397
|
"PlaneMap",
|
|
43367
43398
|
{
|
|
43368
43399
|
geojson: e,
|
|
@@ -43516,7 +43547,7 @@ const tz = Be(vt({}, Ml), {
|
|
|
43516
43547
|
}), this.parentBg.length = 0, (i = this.continentsBg) == null || i.dispose(), this.continentsBg = void 0, this.mapHistory.length = 0, this.centroidObj = {}, super.dispose();
|
|
43517
43548
|
}
|
|
43518
43549
|
};
|
|
43519
|
-
|
|
43550
|
+
O(Va, "VisName", "map");
|
|
43520
43551
|
let I2 = Va;
|
|
43521
43552
|
const az = {
|
|
43522
43553
|
camera: {
|
|
@@ -43978,10 +44009,10 @@ Xm.WaterShader = {
|
|
|
43978
44009
|
class _f extends be {
|
|
43979
44010
|
constructor(e) {
|
|
43980
44011
|
super();
|
|
43981
|
-
|
|
43982
|
-
|
|
43983
|
-
|
|
43984
|
-
this.options =
|
|
44012
|
+
O(this, "options");
|
|
44013
|
+
O(this, "plane");
|
|
44014
|
+
O(this, "water");
|
|
44015
|
+
this.options = Tt({
|
|
43985
44016
|
color: "#0C4557",
|
|
43986
44017
|
map: null
|
|
43987
44018
|
}, e);
|
|
@@ -44056,10 +44087,10 @@ const I9 = (s) => {
|
|
|
44056
44087
|
class qf extends be {
|
|
44057
44088
|
constructor(e) {
|
|
44058
44089
|
super();
|
|
44059
|
-
|
|
44060
|
-
|
|
44061
|
-
|
|
44062
|
-
this.options =
|
|
44090
|
+
O(this, "options");
|
|
44091
|
+
O(this, "building", {});
|
|
44092
|
+
O(this, "outJson", /* @__PURE__ */ new Map());
|
|
44093
|
+
this.options = Tt({}, e);
|
|
44063
44094
|
}
|
|
44064
44095
|
create() {
|
|
44065
44096
|
return rt(this, null, function* () {
|
|
@@ -44143,10 +44174,10 @@ class qf extends be {
|
|
|
44143
44174
|
class $f extends be {
|
|
44144
44175
|
constructor(e) {
|
|
44145
44176
|
super();
|
|
44146
|
-
|
|
44147
|
-
|
|
44148
|
-
|
|
44149
|
-
this.options =
|
|
44177
|
+
O(this, "options");
|
|
44178
|
+
O(this, "area", []);
|
|
44179
|
+
O(this, "outJson", /* @__PURE__ */ new Map());
|
|
44180
|
+
this.options = Tt({}, e);
|
|
44150
44181
|
}
|
|
44151
44182
|
create() {
|
|
44152
44183
|
return rt(this, null, function* () {
|
|
@@ -44170,8 +44201,8 @@ class $f extends be {
|
|
|
44170
44201
|
const g = ny(G.geometry.coordinates[0]);
|
|
44171
44202
|
if (xR(y, g)) {
|
|
44172
44203
|
const L = oz(y, G);
|
|
44173
|
-
L.features[0] && u[Z].push(Be(
|
|
44174
|
-
geometry: Be(
|
|
44204
|
+
L.features[0] && u[Z].push(Be(Tt({}, G), {
|
|
44205
|
+
geometry: Be(Tt({}, G.geometry), {
|
|
44175
44206
|
coordinates: L.features[0].geometry.coordinates
|
|
44176
44207
|
})
|
|
44177
44208
|
}));
|
|
@@ -44231,11 +44262,11 @@ class $f extends be {
|
|
|
44231
44262
|
class tR extends be {
|
|
44232
44263
|
constructor(e) {
|
|
44233
44264
|
super();
|
|
44234
|
-
|
|
44235
|
-
|
|
44236
|
-
|
|
44237
|
-
|
|
44238
|
-
this.options =
|
|
44265
|
+
O(this, "options");
|
|
44266
|
+
O(this, "outJson", /* @__PURE__ */ new Map());
|
|
44267
|
+
O(this, "linePrimary", []);
|
|
44268
|
+
O(this, "lineSecondary", []);
|
|
44269
|
+
this.options = Tt({}, e);
|
|
44239
44270
|
}
|
|
44240
44271
|
create() {
|
|
44241
44272
|
return rt(this, null, function* () {
|
|
@@ -44261,8 +44292,8 @@ class tR extends be {
|
|
|
44261
44292
|
const f = [
|
|
44262
44293
|
Z.geometry.coordinates[0].filter((L) => M2(L, X))
|
|
44263
44294
|
];
|
|
44264
|
-
return f[0].length && m[p].push(Be(
|
|
44265
|
-
geometry: Be(
|
|
44295
|
+
return f[0].length && m[p].push(Be(Tt({}, Z), {
|
|
44296
|
+
geometry: Be(Tt({}, Z.geometry), {
|
|
44266
44297
|
coordinates: f
|
|
44267
44298
|
})
|
|
44268
44299
|
})), !0;
|
|
@@ -44330,12 +44361,12 @@ function uz(s) {
|
|
|
44330
44361
|
class eR extends be {
|
|
44331
44362
|
constructor(e) {
|
|
44332
44363
|
super();
|
|
44333
|
-
|
|
44334
|
-
|
|
44335
|
-
|
|
44336
|
-
|
|
44337
|
-
|
|
44338
|
-
|
|
44364
|
+
O(this, "options");
|
|
44365
|
+
O(this, "time", { value: 0 });
|
|
44366
|
+
O(this, "offset", new _(0, 0));
|
|
44367
|
+
O(this, "timer", null);
|
|
44368
|
+
O(this, "inTween", null);
|
|
44369
|
+
O(this, "outTween", null);
|
|
44339
44370
|
this.options = e;
|
|
44340
44371
|
}
|
|
44341
44372
|
createWave(e) {
|
|
@@ -44437,7 +44468,7 @@ class eR extends be {
|
|
|
44437
44468
|
this.time.value += 0.01, this.offset.y -= 0.02;
|
|
44438
44469
|
}
|
|
44439
44470
|
}
|
|
44440
|
-
const iR = Be(
|
|
44471
|
+
const iR = Be(Tt({}, Ml), {
|
|
44441
44472
|
PlaneMap: Df,
|
|
44442
44473
|
ContinentsBg: Of,
|
|
44443
44474
|
Plane: _f,
|
|
@@ -44515,7 +44546,8 @@ const iR = Be(vt({}, Ml), {
|
|
|
44515
44546
|
showBuilding: s.options.showBuilding,
|
|
44516
44547
|
showRoad: s.options.showRoad,
|
|
44517
44548
|
showGrassland: s.options.showGrassland,
|
|
44518
|
-
showRiver: s.options.showRiver
|
|
44549
|
+
showRiver: s.options.showRiver,
|
|
44550
|
+
showCityOnMapInnerLine: s.options.showCityOnMapInnerLine
|
|
44519
44551
|
// ...this.extendsOptions,
|
|
44520
44552
|
// initCity: this.options.initCity,
|
|
44521
44553
|
}, s.loaderAdd = function() {
|
|
@@ -44537,13 +44569,19 @@ const iR = Be(vt({}, Ml), {
|
|
|
44537
44569
|
lineWidth: 6,
|
|
44538
44570
|
sizeAttenuation: 0,
|
|
44539
44571
|
depthTest: !1
|
|
44540
|
-
})
|
|
44541
|
-
return {
|
|
44572
|
+
}), a = {
|
|
44542
44573
|
topMatOne: i,
|
|
44543
44574
|
sideMat: n,
|
|
44544
44575
|
lineMat: l
|
|
44545
|
-
// extrudeLineMat,
|
|
44546
44576
|
};
|
|
44577
|
+
return this.options.showCityOnMapInnerLine && (a.extrudeLineMat = new Xe({
|
|
44578
|
+
// @ts-ignore
|
|
44579
|
+
name: "板块内线",
|
|
44580
|
+
color: new st("#02f7eb"),
|
|
44581
|
+
lineWidth: 6,
|
|
44582
|
+
sizeAttenuation: 0,
|
|
44583
|
+
depthTest: !1
|
|
44584
|
+
})), a;
|
|
44547
44585
|
})();
|
|
44548
44586
|
this.mList.setMaterialObj("plane", e), this.initMaterialBg();
|
|
44549
44587
|
});
|
|
@@ -44664,7 +44702,7 @@ const iR = Be(vt({}, Ml), {
|
|
|
44664
44702
|
const l = Ii[t].parent || 0, a = s.options.geojsonMap[l], o = s.options.bboxMap[l], c = s.mList.getMaterialObj("parentPlane"), d = yield s.drawController.draw(
|
|
44665
44703
|
"PlaneMap",
|
|
44666
44704
|
{
|
|
44667
|
-
geojson: Be(
|
|
44705
|
+
geojson: Be(Tt({}, a), {
|
|
44668
44706
|
features: a.features.filter((u) => u.properties.adcode !== t)
|
|
44669
44707
|
}),
|
|
44670
44708
|
projection: {
|
|
@@ -44677,7 +44715,7 @@ const iR = Be(vt({}, Ml), {
|
|
|
44677
44715
|
bbox: o,
|
|
44678
44716
|
bboxOffset: [0, -0.2, -0.1, 0],
|
|
44679
44717
|
depth: 0.1,
|
|
44680
|
-
materialOptions:
|
|
44718
|
+
materialOptions: Tt({}, c)
|
|
44681
44719
|
},
|
|
44682
44720
|
s.group
|
|
44683
44721
|
), { min: h, max: r } = d.getSize();
|
|
@@ -44699,7 +44737,7 @@ const iR = Be(vt({}, Ml), {
|
|
|
44699
44737
|
},
|
|
44700
44738
|
s.group
|
|
44701
44739
|
);
|
|
44702
|
-
s.options.bottomPlaneWater && a.addWater(), s.mList.
|
|
44740
|
+
s.options.bottomPlaneWater && a.addWater(), s.mList.changeObject3dKey(a.object3d, "map-$1"), a.position.copy(n);
|
|
44703
44741
|
}
|
|
44704
44742
|
});
|
|
44705
44743
|
}, Zz = (s) => {
|
|
@@ -44785,15 +44823,15 @@ class Gz extends I2 {
|
|
|
44785
44823
|
constructor() {
|
|
44786
44824
|
super(...arguments);
|
|
44787
44825
|
//@ts-ignore
|
|
44788
|
-
|
|
44789
|
-
|
|
44826
|
+
O(this, "drawController", new co(iR));
|
|
44827
|
+
O(this, "initSettingsObj", {
|
|
44790
44828
|
label: !1,
|
|
44791
44829
|
labelLite: !1,
|
|
44792
44830
|
shadowMap: !1
|
|
44793
44831
|
});
|
|
44794
44832
|
}
|
|
44795
44833
|
setOptions(e) {
|
|
44796
|
-
super.setOptions(
|
|
44834
|
+
super.setOptions(Tt({
|
|
44797
44835
|
polarAngle: 0.6690037180091797,
|
|
44798
44836
|
mapDepth: [1, 0.3, 0.12],
|
|
44799
44837
|
curvatureResolution: 0,
|
|
@@ -44804,7 +44842,7 @@ class Gz extends I2 {
|
|
|
44804
44842
|
parentBg: !0,
|
|
44805
44843
|
cityOnMap: !1,
|
|
44806
44844
|
style: "map2"
|
|
44807
|
-
}, e)), this.extendsOptions = Be(
|
|
44845
|
+
}, e)), this.extendsOptions = Be(Tt({}, this.extendsOptions), {
|
|
44808
44846
|
mapDepth: () => this.options.mapDepth,
|
|
44809
44847
|
clickOusideBack: this.options.clickOusideBack,
|
|
44810
44848
|
clickHandleDrillDown: this.options.clickHandleDrillDown,
|
|
@@ -44815,7 +44853,7 @@ class Gz extends I2 {
|
|
|
44815
44853
|
bottomPlane: this.options.bottomPlane,
|
|
44816
44854
|
bottomPlaneWater: this.options.bottomPlaneWater,
|
|
44817
44855
|
initCity: this.options.initCity
|
|
44818
|
-
}), this.options.adcode === 35e4 ? bz(this) : this.options.cityOnMap ?
|
|
44856
|
+
}), this.options.adcode === 35e4 ? bz(this) : this.options.cityOnMap ? pz(this) : mz(this);
|
|
44819
44857
|
}
|
|
44820
44858
|
loaderAddBg() {
|
|
44821
44859
|
this.options.bottomPlaneWater && this.loader.add(
|
|
@@ -44926,13 +44964,13 @@ class Gz extends I2 {
|
|
|
44926
44964
|
if (this.options.adcode !== 1e5) {
|
|
44927
44965
|
const G = this.mList.getMaterialObj("parentPlane"), Z = yield this.drawController.draw(
|
|
44928
44966
|
"PlaneMap",
|
|
44929
|
-
|
|
44930
|
-
geojson: Be(
|
|
44967
|
+
Tt({
|
|
44968
|
+
geojson: Be(Tt({}, c), {
|
|
44931
44969
|
features: [
|
|
44932
44970
|
...c.features.filter((p) => p.properties.adcode !== e)
|
|
44933
44971
|
]
|
|
44934
44972
|
}),
|
|
44935
|
-
materialOptions:
|
|
44973
|
+
materialOptions: Tt({}, G)
|
|
44936
44974
|
}, h),
|
|
44937
44975
|
this.group
|
|
44938
44976
|
);
|
|
@@ -44940,13 +44978,13 @@ class Gz extends I2 {
|
|
|
44940
44978
|
}
|
|
44941
44979
|
const r = this.mList.getMaterialObj("worldPlane"), u = yield this.drawController.draw(
|
|
44942
44980
|
"PlaneMap",
|
|
44943
|
-
|
|
44944
|
-
geojson: Be(
|
|
44981
|
+
Tt({
|
|
44982
|
+
geojson: Be(Tt({}, c), {
|
|
44945
44983
|
features: [
|
|
44946
44984
|
...this.options.geojsonMap[0].features.filter((G) => G.properties.ISO_A3 !== "CHN")
|
|
44947
44985
|
]
|
|
44948
44986
|
}),
|
|
44949
|
-
materialOptions:
|
|
44987
|
+
materialOptions: Tt({}, r)
|
|
44950
44988
|
}, h),
|
|
44951
44989
|
this.group
|
|
44952
44990
|
), { min: m, max: b } = u.getSize();
|
|
@@ -44973,7 +45011,7 @@ class Gz extends I2 {
|
|
|
44973
45011
|
},
|
|
44974
45012
|
this.group
|
|
44975
45013
|
);
|
|
44976
|
-
this.options.bottomPlaneWater && o.addWater(), this.mList.
|
|
45014
|
+
this.options.bottomPlaneWater && o.addWater(), this.mList.changeObject3dKey(o.object3d, "map-$1"), o.position.copy(l), o.position.z -= 0.1;
|
|
44977
45015
|
}
|
|
44978
45016
|
if (this.options.mapBoundary) {
|
|
44979
45017
|
const o = new Oe().setFromObject((a = this.map) == null ? void 0 : a.object3d);
|
|
@@ -44989,14 +45027,14 @@ class Gz extends I2 {
|
|
|
44989
45027
|
depth: l,
|
|
44990
45028
|
adcode: a
|
|
44991
45029
|
}) {
|
|
44992
|
-
|
|
44993
|
-
const c = this.mapHistory.length === 0, d = this.mList.getMaterialObj("plane"), h = vt({}, d);
|
|
45030
|
+
const c = this.mapHistory.length === 0, d = this.mList.getMaterialObj("plane"), h = Tt({}, d);
|
|
44994
45031
|
c || !h.topMatTwo ? (h.topMat = h.topMatOne, h.bgTopMat = h.bgTopMatOne) : h.topMat = h.topMatTwo;
|
|
44995
|
-
|
|
45032
|
+
let r = e, u = i;
|
|
45033
|
+
return this.options.cityOnMap && i && (r = i, this.options.showCityOnMapInnerLine ? u = e : u = void 0), yield this.drawController.draw(
|
|
44996
45034
|
"PlaneMap",
|
|
44997
45035
|
{
|
|
44998
|
-
geojson:
|
|
44999
|
-
extrudeLineGeojson:
|
|
45036
|
+
geojson: r,
|
|
45037
|
+
extrudeLineGeojson: u,
|
|
45000
45038
|
depth: l,
|
|
45001
45039
|
projection: {
|
|
45002
45040
|
center: this.pcenter,
|
|
@@ -45011,15 +45049,10 @@ class Gz extends I2 {
|
|
|
45011
45049
|
},
|
|
45012
45050
|
this.group
|
|
45013
45051
|
);
|
|
45014
|
-
return (u = r.extrudelineArr) == null || u.forEach((m) => {
|
|
45015
|
-
m.animate({
|
|
45016
|
-
duration: c ? 4e4 : 16e3
|
|
45017
|
-
});
|
|
45018
|
-
}), r;
|
|
45019
45052
|
});
|
|
45020
45053
|
}
|
|
45021
45054
|
}
|
|
45022
|
-
const Xz = Be(
|
|
45055
|
+
const Xz = Be(Tt({}, Ml), {
|
|
45023
45056
|
Building: qf,
|
|
45024
45057
|
Road: tR,
|
|
45025
45058
|
Area: $f,
|
|
@@ -45037,19 +45070,19 @@ class nR extends pd {
|
|
|
45037
45070
|
constructor() {
|
|
45038
45071
|
super(...arguments);
|
|
45039
45072
|
//@ts-ignore
|
|
45040
|
-
|
|
45041
|
-
|
|
45042
|
-
|
|
45043
|
-
|
|
45073
|
+
O(this, "drawController", new co(Xz));
|
|
45074
|
+
O(this, "adcode", 0);
|
|
45075
|
+
O(this, "pcenter", [104, 37.5]);
|
|
45076
|
+
O(this, "pscale", 5e4);
|
|
45044
45077
|
// pscale = 50000 / 1000;
|
|
45045
|
-
|
|
45046
|
-
|
|
45047
|
-
|
|
45048
|
-
|
|
45049
|
-
|
|
45078
|
+
O(this, "projection");
|
|
45079
|
+
O(this, "group");
|
|
45080
|
+
O(this, "building");
|
|
45081
|
+
O(this, "outAreaGroup");
|
|
45082
|
+
O(this, "multiplyScalar", 1);
|
|
45050
45083
|
}
|
|
45051
45084
|
setOptions(e) {
|
|
45052
|
-
super.setOptions(
|
|
45085
|
+
super.setOptions(Tt({
|
|
45053
45086
|
fitTo: !0,
|
|
45054
45087
|
loaderAdd: !0,
|
|
45055
45088
|
plane: !0,
|
|
@@ -45249,7 +45282,7 @@ class nR extends pd {
|
|
|
45249
45282
|
},
|
|
45250
45283
|
l ? this.outAreaGroup : this.group
|
|
45251
45284
|
);
|
|
45252
|
-
X.position.copy(p), this.mList.
|
|
45285
|
+
X.position.copy(p), this.mList.changeObject3dKey(X.object3d, `city${a}$1`);
|
|
45253
45286
|
const [W] = yield Promise.all(
|
|
45254
45287
|
[
|
|
45255
45288
|
c && this.options.showBuilding && this.drawBuilding({
|
|
@@ -45463,13 +45496,13 @@ class nR extends pd {
|
|
|
45463
45496
|
};
|
|
45464
45497
|
}
|
|
45465
45498
|
}
|
|
45466
|
-
|
|
45499
|
+
O(nR, "VisName", "city");
|
|
45467
45500
|
class Wz extends nR {
|
|
45468
45501
|
constructor() {
|
|
45469
45502
|
super(...arguments);
|
|
45470
45503
|
//@ts-ignore
|
|
45471
|
-
|
|
45472
|
-
|
|
45504
|
+
O(this, "drawController", iR);
|
|
45505
|
+
O(this, "multiplyScalar", 1 / 1e3);
|
|
45473
45506
|
}
|
|
45474
45507
|
fixNearFar(e = 0.01) {
|
|
45475
45508
|
const i = e * this.multiplyScalar;
|
|
@@ -45479,8 +45512,8 @@ class Wz extends nR {
|
|
|
45479
45512
|
const Mu = class Mu extends Gz {
|
|
45480
45513
|
constructor() {
|
|
45481
45514
|
super(...arguments);
|
|
45482
|
-
|
|
45483
|
-
|
|
45515
|
+
O(this, "cityVisObj", {});
|
|
45516
|
+
O(this, "showGroup");
|
|
45484
45517
|
}
|
|
45485
45518
|
get cityVis() {
|
|
45486
45519
|
var i, n;
|
|
@@ -45499,7 +45532,7 @@ const Mu = class Mu extends Gz {
|
|
|
45499
45532
|
});
|
|
45500
45533
|
}
|
|
45501
45534
|
setOptions(e) {
|
|
45502
|
-
super.setOptions(
|
|
45535
|
+
super.setOptions(Tt({
|
|
45503
45536
|
initCity: !1,
|
|
45504
45537
|
clipOutShow: !0,
|
|
45505
45538
|
allCity: !1,
|
|
@@ -45507,7 +45540,8 @@ const Mu = class Mu extends Gz {
|
|
|
45507
45540
|
showBuilding: !0,
|
|
45508
45541
|
showRoad: !0,
|
|
45509
45542
|
showGrassland: !0,
|
|
45510
|
-
showRiver: !0
|
|
45543
|
+
showRiver: !0,
|
|
45544
|
+
showCityOnMapInnerLine: !1
|
|
45511
45545
|
}, e)), this.pencilConfig = az;
|
|
45512
45546
|
}
|
|
45513
45547
|
init() {
|
|
@@ -45656,13 +45690,13 @@ const Mu = class Mu extends Gz {
|
|
|
45656
45690
|
}), super.dispose();
|
|
45657
45691
|
}
|
|
45658
45692
|
};
|
|
45659
|
-
|
|
45693
|
+
O(Mu, "VisName", "map2");
|
|
45660
45694
|
let qX = Mu;
|
|
45661
45695
|
class Vz extends Y9 {
|
|
45662
45696
|
constructor(e) {
|
|
45663
45697
|
super();
|
|
45664
|
-
|
|
45665
|
-
this.options =
|
|
45698
|
+
O(this, "options");
|
|
45699
|
+
this.options = Tt({
|
|
45666
45700
|
radius: 30
|
|
45667
45701
|
}, e);
|
|
45668
45702
|
}
|
|
@@ -45674,10 +45708,10 @@ class Vz extends Y9 {
|
|
|
45674
45708
|
class gz extends be {
|
|
45675
45709
|
constructor(e) {
|
|
45676
45710
|
super();
|
|
45677
|
-
|
|
45678
|
-
|
|
45679
|
-
|
|
45680
|
-
this.options =
|
|
45711
|
+
O(this, "options");
|
|
45712
|
+
O(this, "areaArr", []);
|
|
45713
|
+
O(this, "lineArr", []);
|
|
45714
|
+
this.options = Tt({
|
|
45681
45715
|
start: 30,
|
|
45682
45716
|
depth: 1.4,
|
|
45683
45717
|
hasTop: !0,
|
|
@@ -45719,7 +45753,7 @@ class gz extends be {
|
|
|
45719
45753
|
},
|
|
45720
45754
|
this
|
|
45721
45755
|
);
|
|
45722
|
-
b.userData =
|
|
45756
|
+
b.userData = Tt({}, u.properties), this.areaArr.push(b);
|
|
45723
45757
|
})
|
|
45724
45758
|
}),
|
|
45725
45759
|
l.geoGeometry("conicLine", {
|
|
@@ -45738,7 +45772,7 @@ class gz extends be {
|
|
|
45738
45772
|
},
|
|
45739
45773
|
this
|
|
45740
45774
|
);
|
|
45741
|
-
b.userData =
|
|
45775
|
+
b.userData = Tt({}, u.properties), this.lineArr.push(b), b.animate({
|
|
45742
45776
|
duration: this.options.lineDuration
|
|
45743
45777
|
});
|
|
45744
45778
|
})
|
|
@@ -45783,8 +45817,8 @@ class gz extends be {
|
|
|
45783
45817
|
class fz extends be {
|
|
45784
45818
|
constructor(e) {
|
|
45785
45819
|
super();
|
|
45786
|
-
|
|
45787
|
-
this.options =
|
|
45820
|
+
O(this, "options");
|
|
45821
|
+
this.options = Tt({
|
|
45788
45822
|
radius: 30
|
|
45789
45823
|
}, e);
|
|
45790
45824
|
}
|
|
@@ -45797,7 +45831,7 @@ class fz extends be {
|
|
|
45797
45831
|
});
|
|
45798
45832
|
}
|
|
45799
45833
|
}
|
|
45800
|
-
const Rz = Be(
|
|
45834
|
+
const Rz = Be(Tt({}, Ml), {
|
|
45801
45835
|
Earth: Vz,
|
|
45802
45836
|
Countries: gz,
|
|
45803
45837
|
SphereShadow: fz
|
|
@@ -45919,9 +45953,7 @@ const Rz = Be(vt({}, Ml), {
|
|
|
45919
45953
|
outLine: l
|
|
45920
45954
|
}), this.mList.setMaterialObj("china", {
|
|
45921
45955
|
outLine: n
|
|
45922
|
-
}), this.mList.setMaterial("earthMaterial", o
|
|
45923
|
-
selectHide: !0
|
|
45924
|
-
});
|
|
45956
|
+
}), this.mList.setMaterial("earthMaterial", o);
|
|
45925
45957
|
});
|
|
45926
45958
|
};
|
|
45927
45959
|
}, Sz = (s) => {
|
|
@@ -45969,9 +46001,7 @@ const Rz = Be(vt({}, Ml), {
|
|
|
45969
46001
|
topMat: e,
|
|
45970
46002
|
borderMat: t,
|
|
45971
46003
|
outLine: i
|
|
45972
|
-
}), this.mList.setMaterial("earthMaterial", n
|
|
45973
|
-
selectHide: !0
|
|
45974
|
-
});
|
|
46004
|
+
}), this.mList.setMaterial("earthMaterial", n);
|
|
45975
46005
|
});
|
|
45976
46006
|
}, s.getLocationPosition = function(t, e = 0) {
|
|
45977
46007
|
const [i, n] = t, l = this.options.mapDepth + this.options.radius + e;
|
|
@@ -45985,19 +46015,19 @@ const Rz = Be(vt({}, Ml), {
|
|
|
45985
46015
|
constructor() {
|
|
45986
46016
|
super(...arguments);
|
|
45987
46017
|
//@ts-ignore
|
|
45988
|
-
|
|
45989
|
-
|
|
45990
|
-
|
|
46018
|
+
O(this, "drawController", new co(Rz));
|
|
46019
|
+
O(this, "leftTruck", !1);
|
|
46020
|
+
O(this, "extendsOptions", {
|
|
45991
46021
|
mapDepth: () => this.options.mapDepth
|
|
45992
46022
|
});
|
|
45993
|
-
|
|
45994
|
-
|
|
46023
|
+
O(this, "map");
|
|
46024
|
+
O(this, "barArr", []);
|
|
45995
46025
|
}
|
|
45996
46026
|
get mapArea() {
|
|
45997
46027
|
return this.map.areaArr;
|
|
45998
46028
|
}
|
|
45999
46029
|
setOptions(e) {
|
|
46000
|
-
super.setOptions(
|
|
46030
|
+
super.setOptions(Tt({
|
|
46001
46031
|
mapDepth: 1.4,
|
|
46002
46032
|
radius: 30,
|
|
46003
46033
|
style: "chinaPlate"
|
|
@@ -46028,7 +46058,7 @@ const Rz = Be(vt({}, Ml), {
|
|
|
46028
46058
|
height: 170
|
|
46029
46059
|
})
|
|
46030
46060
|
]);
|
|
46031
|
-
e.position.set(0, 50, -100), i.position.set(0, 0, 150), e.object3d.lookAt(0, 0, 0), i.object3d.lookAt(0, 0, 0), this.mList.
|
|
46061
|
+
e.position.set(0, 50, -100), i.position.set(0, 0, 150), e.object3d.lookAt(0, 0, 0), i.object3d.lookAt(0, 0, 0), this.mList.changeObject3dKey(e.object3d, "$1_1"), this.mList.changeObject3dKey(i.object3d, "$1_2");
|
|
46032
46062
|
});
|
|
46033
46063
|
}
|
|
46034
46064
|
getLocationPosition(e, i = 0) {
|
|
@@ -46190,7 +46220,7 @@ const Rz = Be(vt({}, Ml), {
|
|
|
46190
46220
|
}), this.barArr.length = 0;
|
|
46191
46221
|
}
|
|
46192
46222
|
};
|
|
46193
|
-
|
|
46223
|
+
O(Tu, "VisName", "earth");
|
|
46194
46224
|
let $X = Tu;
|
|
46195
46225
|
class Yz extends Y9 {
|
|
46196
46226
|
create() {
|
|
@@ -46254,8 +46284,8 @@ class Nz extends be {
|
|
|
46254
46284
|
class Mz extends be {
|
|
46255
46285
|
constructor(e) {
|
|
46256
46286
|
super();
|
|
46257
|
-
|
|
46258
|
-
|
|
46287
|
+
O(this, "options");
|
|
46288
|
+
O(this, "icon");
|
|
46259
46289
|
this.options = e;
|
|
46260
46290
|
}
|
|
46261
46291
|
create() {
|
|
@@ -46300,7 +46330,7 @@ class Mz extends be {
|
|
|
46300
46330
|
this.object3d.position.set(e, i, n), this.object3d.lookAt(0, 0, 0);
|
|
46301
46331
|
}
|
|
46302
46332
|
}
|
|
46303
|
-
const Tz = Be(
|
|
46333
|
+
const Tz = Be(Tt({}, Ml), {
|
|
46304
46334
|
Earth: Yz,
|
|
46305
46335
|
Bg: Iz,
|
|
46306
46336
|
Label: Nz,
|
|
@@ -46314,16 +46344,16 @@ const Tz = Be(vt({}, Ml), {
|
|
|
46314
46344
|
}, Fu = class Fu extends pd {
|
|
46315
46345
|
constructor() {
|
|
46316
46346
|
super(...arguments);
|
|
46317
|
-
|
|
46347
|
+
O(this, "leftTruck", !1);
|
|
46318
46348
|
//@ts-ignore
|
|
46319
|
-
|
|
46320
|
-
|
|
46321
|
-
|
|
46349
|
+
O(this, "drawController", new co(Tz));
|
|
46350
|
+
O(this, "autoRotateSpeed", 0);
|
|
46351
|
+
O(this, "initSettingsObj", {
|
|
46322
46352
|
autoRotate: !1
|
|
46323
46353
|
});
|
|
46324
46354
|
}
|
|
46325
46355
|
setOptions(e) {
|
|
46326
|
-
super.setOptions(
|
|
46356
|
+
super.setOptions(Tt({}, e)), this.pencilConfig = Fz;
|
|
46327
46357
|
}
|
|
46328
46358
|
loaderAdd() {
|
|
46329
46359
|
this.loader.add([
|
|
@@ -46386,7 +46416,7 @@ const Tz = Be(vt({}, Ml), {
|
|
|
46386
46416
|
super.dispose(), this.pencil.dispose();
|
|
46387
46417
|
}
|
|
46388
46418
|
};
|
|
46389
|
-
|
|
46419
|
+
O(Fu, "VisName", "earth2");
|
|
46390
46420
|
let ty = Fu;
|
|
46391
46421
|
const dU = {
|
|
46392
46422
|
set token(s) {
|