@abi-software/scaffoldvuer 1.7.0 → 1.7.2
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/scaffoldvuer.js +315 -315
- package/dist/scaffoldvuer.umd.cjs +9 -9
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/src/components/ScaffoldVuer.vue +4 -0
package/dist/scaffoldvuer.js
CHANGED
|
@@ -2111,8 +2111,8 @@ function dA(n) {
|
|
|
2111
2111
|
if (A) for (var z = p ? 3 : 1, V = function(re) {
|
|
2112
2112
|
var j = _.find(function(k) {
|
|
2113
2113
|
var W = x.get(k);
|
|
2114
|
-
if (W) return W.slice(0, re).every(function(
|
|
2115
|
-
return
|
|
2114
|
+
if (W) return W.slice(0, re).every(function(K) {
|
|
2115
|
+
return K;
|
|
2116
2116
|
});
|
|
2117
2117
|
});
|
|
2118
2118
|
if (j) return P = j, "break";
|
|
@@ -2160,7 +2160,7 @@ function wA(n) {
|
|
|
2160
2160
|
var e = n.state, t = n.options, i = n.name, r = t.mainAxis, s = r === void 0 ? !0 : r, o = t.altAxis, a = o === void 0 ? !1 : o, c = t.boundary, l = t.rootBoundary, d = t.altBoundary, h = t.padding, f = t.tether, g = f === void 0 ? !0 : f, p = t.tetherOffset, u = p === void 0 ? 0 : p, y = Ja(e, { boundary: c, rootBoundary: l, padding: h, altBoundary: d }), v = Di(e.placement), m = Oo(e.placement), w = !m, _ = _f(v), S = xA(_), M = e.modifiersData.popperOffsets, x = e.rects.reference, A = e.rects.popper, P = typeof u == "function" ? u(Object.assign({}, e.rects, { placement: e.placement })) : u, T = typeof P == "number" ? { mainAxis: P, altAxis: P } : Object.assign({ mainAxis: 0, altAxis: 0 }, P), R = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, E = { x: 0, y: 0 };
|
|
2161
2161
|
if (M) {
|
|
2162
2162
|
if (s) {
|
|
2163
|
-
var C, L = _ === "y" ? zn : Un, O = _ === "y" ? ri : si, b = _ === "y" ? "height" : "width", I = M[_], N = I + y[L], D = I - y[O], z = g ? -A[b] / 2 : 0, V = m === Lo ? x[b] : A[b], H = m === Lo ? -A[b] : -x[b], X = e.elements.arrow, re = g && X ? Mf(X) : { width: 0, height: 0 }, j = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : G0(), k = j[L], W = j[O],
|
|
2163
|
+
var C, L = _ === "y" ? zn : Un, O = _ === "y" ? ri : si, b = _ === "y" ? "height" : "width", I = M[_], N = I + y[L], D = I - y[O], z = g ? -A[b] / 2 : 0, V = m === Lo ? x[b] : A[b], H = m === Lo ? -A[b] : -x[b], X = e.elements.arrow, re = g && X ? Mf(X) : { width: 0, height: 0 }, j = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : G0(), k = j[L], W = j[O], K = za(0, x[b], re[b]), ee = w ? x[b] / 2 - z - K - k - T.mainAxis : V - K - k - T.mainAxis, q = w ? -x[b] / 2 + z + K + W + T.mainAxis : H + K + W + T.mainAxis, ie = e.elements.arrow && ml(e.elements.arrow), Y = ie ? _ === "y" ? ie.clientTop || 0 : ie.clientLeft || 0 : 0, te = (C = R == null ? void 0 : R[_]) != null ? C : 0, B = I + ee - te - Y, $ = I + q - te, Q = za(g ? Yc(N, B) : N, I, g ? Ss(D, $) : D);
|
|
2164
2164
|
M[_] = Q, E[_] = Q - I;
|
|
2165
2165
|
}
|
|
2166
2166
|
if (a) {
|
|
@@ -2971,7 +2971,7 @@ const uC = dt({
|
|
|
2971
2971
|
return;
|
|
2972
2972
|
((se = m.value) == null ? void 0 : se.offsetParent) === null || (pe(), Me = !0);
|
|
2973
2973
|
};
|
|
2974
|
-
})(W),
|
|
2974
|
+
})(W), q = () => {
|
|
2975
2975
|
const pe = x.value, Me = i.formatter ? i.formatter(N.value) : N.value;
|
|
2976
2976
|
!pe || pe.value === Me || (pe.value = Me);
|
|
2977
2977
|
}, ie = async (pe) => {
|
|
@@ -2979,10 +2979,10 @@ const uC = dt({
|
|
|
2979
2979
|
let { value: Me } = pe.target;
|
|
2980
2980
|
if (i.formatter && (Me = i.parser ? i.parser(Me) : Me), !te.value) {
|
|
2981
2981
|
if (Me === N.value) {
|
|
2982
|
-
|
|
2982
|
+
q();
|
|
2983
2983
|
return;
|
|
2984
2984
|
}
|
|
2985
|
-
t(It, Me), t("input", Me), await wt(),
|
|
2985
|
+
t(It, Me), t("input", Me), await wt(), q(), k();
|
|
2986
2986
|
}
|
|
2987
2987
|
}, Y = (pe) => {
|
|
2988
2988
|
t("change", pe.target.value);
|
|
@@ -3014,10 +3014,10 @@ const uC = dt({
|
|
|
3014
3014
|
return qe(() => i.modelValue, () => {
|
|
3015
3015
|
var pe;
|
|
3016
3016
|
wt(() => W()), i.validateEvent && ((pe = h == null ? void 0 : h.validate) == null || pe.call(h, "change").catch((Me) => Jt(Me)));
|
|
3017
|
-
}), qe(N, () =>
|
|
3018
|
-
await wt(),
|
|
3017
|
+
}), qe(N, () => q()), qe(() => i.type, async () => {
|
|
3018
|
+
await wt(), q(), W();
|
|
3019
3019
|
}), tn(() => {
|
|
3020
|
-
!i.formatter && i.parser && Jt("ElInput", "If you set the parser, you also need to set the formatter."),
|
|
3020
|
+
!i.formatter && i.parser && Jt("ElInput", "If you set the parser, you also need to set the formatter."), q(), wt(W);
|
|
3021
3021
|
}), e({
|
|
3022
3022
|
input: v,
|
|
3023
3023
|
textarea: m,
|
|
@@ -6625,7 +6625,7 @@ const gR = 11, vR = (n, e) => {
|
|
|
6625
6625
|
const Ve = de.findIndex((je) => je.value === Oe);
|
|
6626
6626
|
Ve > -1 && Se.push(de[Ve]);
|
|
6627
6627
|
}), Se.length >= de.length ? Se : de;
|
|
6628
|
-
}), W = ce(() => Array.from(o.cachedOptions.values())),
|
|
6628
|
+
}), W = ce(() => Array.from(o.cachedOptions.values())), K = ce(() => {
|
|
6629
6629
|
const de = k.value.filter((Se) => !Se.created).some((Se) => Se.currentLabel === o.inputValue);
|
|
6630
6630
|
return n.filterable && n.allowCreate && o.inputValue !== "" && !de;
|
|
6631
6631
|
}), ee = () => {
|
|
@@ -6633,7 +6633,7 @@ const gR = 11, vR = (n, e) => {
|
|
|
6633
6633
|
var Se;
|
|
6634
6634
|
(Se = de.updateOption) == null || Se.call(de, o.inputValue);
|
|
6635
6635
|
});
|
|
6636
|
-
},
|
|
6636
|
+
}, q = ra(), ie = ce(() => ["small"].includes(q.value) ? "small" : "default"), Y = ce({
|
|
6637
6637
|
get() {
|
|
6638
6638
|
return P.value && re.value !== !1;
|
|
6639
6639
|
},
|
|
@@ -6846,7 +6846,7 @@ const gR = 11, vR = (n, e) => {
|
|
|
6846
6846
|
expanded: P,
|
|
6847
6847
|
optionsArray: k,
|
|
6848
6848
|
hoverOption: T,
|
|
6849
|
-
selectSize:
|
|
6849
|
+
selectSize: q,
|
|
6850
6850
|
filteredOptionsCount: j,
|
|
6851
6851
|
resetCalculatorWidth: ve,
|
|
6852
6852
|
updateTooltip: we,
|
|
@@ -6867,7 +6867,7 @@ const gR = 11, vR = (n, e) => {
|
|
|
6867
6867
|
iconReverse: z,
|
|
6868
6868
|
validateState: V,
|
|
6869
6869
|
validateIcon: H,
|
|
6870
|
-
showNewOption:
|
|
6870
|
+
showNewOption: K,
|
|
6871
6871
|
updateOptions: ee,
|
|
6872
6872
|
collapseTagSize: ie,
|
|
6873
6873
|
setSelected: U,
|
|
@@ -8048,8 +8048,8 @@ const iP = De({
|
|
|
8048
8048
|
]), z = FR(i);
|
|
8049
8049
|
JR(i, o, f, g, t, a);
|
|
8050
8050
|
const V = ce(() => {
|
|
8051
|
-
const W = [i.min, i.max, i.step].map((
|
|
8052
|
-
const ee = `${
|
|
8051
|
+
const W = [i.min, i.max, i.step].map((K) => {
|
|
8052
|
+
const ee = `${K}`.split(".")[1];
|
|
8053
8053
|
return ee ? ee.length : 0;
|
|
8054
8054
|
});
|
|
8055
8055
|
return Math.max.apply(null, W);
|
|
@@ -8070,8 +8070,8 @@ const iP = De({
|
|
|
8070
8070
|
updateDragging: k
|
|
8071
8071
|
}), e({
|
|
8072
8072
|
onSliderClick: w
|
|
8073
|
-
}), (W,
|
|
8074
|
-
var ee,
|
|
8073
|
+
}), (W, K) => {
|
|
8074
|
+
var ee, q;
|
|
8075
8075
|
return ge(), Re("div", {
|
|
8076
8076
|
id: W.range ? G(T) : void 0,
|
|
8077
8077
|
ref_key: "sliderWrapper",
|
|
@@ -8107,7 +8107,7 @@ const iP = De({
|
|
|
8107
8107
|
placement: W.placement,
|
|
8108
8108
|
role: "slider",
|
|
8109
8109
|
"aria-label": W.range || !G(R) ? G(O) : void 0,
|
|
8110
|
-
"aria-labelledby": !W.range && G(R) ? (
|
|
8110
|
+
"aria-labelledby": !W.range && G(R) ? (q = G(a)) == null ? void 0 : q.labelId : void 0,
|
|
8111
8111
|
"aria-valuemin": W.min,
|
|
8112
8112
|
"aria-valuemax": W.range ? G(re) : W.max,
|
|
8113
8113
|
"aria-valuenow": G(X),
|
|
@@ -16702,10 +16702,10 @@ function eD(n, e, t, i) {
|
|
|
16702
16702
|
if (H !== void 0) {
|
|
16703
16703
|
const X = H.normalized, re = H.itemSize, j = t.get(H);
|
|
16704
16704
|
if (j === void 0) continue;
|
|
16705
|
-
const k = j.buffer, W = j.type,
|
|
16705
|
+
const k = j.buffer, W = j.type, K = j.bytesPerElement;
|
|
16706
16706
|
if (H.isInterleavedBufferAttribute) {
|
|
16707
|
-
const ee = H.data,
|
|
16708
|
-
ee && ee.isInstancedInterleavedBuffer ? (_(V, ee.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = ee.meshPerAttribute * ee.count)) : w(V), n.bindBuffer(34962, k), M(V, re, W, X,
|
|
16707
|
+
const ee = H.data, q = ee.stride, ie = H.offset;
|
|
16708
|
+
ee && ee.isInstancedInterleavedBuffer ? (_(V, ee.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = ee.meshPerAttribute * ee.count)) : w(V), n.bindBuffer(34962, k), M(V, re, W, X, q * K, ie * K);
|
|
16709
16709
|
} else
|
|
16710
16710
|
H.isInstancedBufferAttribute ? (_(V, H.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = H.meshPerAttribute * H.count)) : w(V), n.bindBuffer(34962, k), M(V, re, W, X, 0, 0);
|
|
16711
16711
|
} else if (z === "instanceMatrix") {
|
|
@@ -18881,7 +18881,7 @@ function RN(n, e, t) {
|
|
|
18881
18881
|
function W(se, Te) {
|
|
18882
18882
|
return Te === null && h !== null && (Te = h), f[se] !== Te ? (n.bindFramebuffer(se, Te), f[se] = Te, i && (se === 36009 && (f[36160] = Te), se === 36160 && (f[36009] = Te)), !0) : !1;
|
|
18883
18883
|
}
|
|
18884
|
-
function
|
|
18884
|
+
function K(se) {
|
|
18885
18885
|
return g !== se ? (n.useProgram(se), g = se, !0) : !1;
|
|
18886
18886
|
}
|
|
18887
18887
|
const ee = {
|
|
@@ -18895,7 +18895,7 @@ function RN(n, e, t) {
|
|
|
18895
18895
|
const se = e.get("EXT_blend_minmax");
|
|
18896
18896
|
se !== null && (ee[Md] = se.MIN_EXT, ee[_d] = se.MAX_EXT);
|
|
18897
18897
|
}
|
|
18898
|
-
const
|
|
18898
|
+
const q = {
|
|
18899
18899
|
[ky]: 0,
|
|
18900
18900
|
[Gy]: 1,
|
|
18901
18901
|
[Hy]: 768,
|
|
@@ -18955,7 +18955,7 @@ function RN(n, e, t) {
|
|
|
18955
18955
|
}
|
|
18956
18956
|
return;
|
|
18957
18957
|
}
|
|
18958
|
-
Ie = Ie || Te, et = et || ye, mt = mt || xe, (Te !== y || Ie !== w) && (n.blendEquationSeparate(ee[Te], ee[Ie]), y = Te, w = Ie), (ye !== v || xe !== m || et !== _ || mt !== S) && (n.blendFuncSeparate(
|
|
18958
|
+
Ie = Ie || Te, et = et || ye, mt = mt || xe, (Te !== y || Ie !== w) && (n.blendEquationSeparate(ee[Te], ee[Ie]), y = Te, w = Ie), (ye !== v || xe !== m || et !== _ || mt !== S) && (n.blendFuncSeparate(q[ye], q[xe], q[et], q[mt]), v = ye, m = xe, _ = et, S = mt), u = se, M = null;
|
|
18959
18959
|
}
|
|
18960
18960
|
function Y(se, Te) {
|
|
18961
18961
|
se.side === Xr ? j(2884) : re(2884);
|
|
@@ -19031,7 +19031,7 @@ function RN(n, e, t) {
|
|
|
19031
19031
|
disable: j,
|
|
19032
19032
|
bindFramebuffer: W,
|
|
19033
19033
|
bindXRFramebuffer: k,
|
|
19034
|
-
useProgram:
|
|
19034
|
+
useProgram: K,
|
|
19035
19035
|
setBlending: ie,
|
|
19036
19036
|
setMaterial: Y,
|
|
19037
19037
|
setFlipSided: te,
|
|
@@ -19324,7 +19324,7 @@ function PN(n, e, t, i, r, s, o) {
|
|
|
19324
19324
|
t.bindFramebuffer(36160, U.__webglFramebuffer), U.__webglDepthbuffer = n.createRenderbuffer(), j(U.__webglDepthbuffer, F, !1);
|
|
19325
19325
|
t.bindFramebuffer(36160, null);
|
|
19326
19326
|
}
|
|
19327
|
-
function
|
|
19327
|
+
function K(F) {
|
|
19328
19328
|
const U = F.texture, oe = i.get(F), le = i.get(U);
|
|
19329
19329
|
F.addEventListener("dispose", A), F.isWebGLMultipleRenderTargets !== !0 && (le.__webglTexture = n.createTexture(), le.__version = U.version, o.memory.textures++);
|
|
19330
19330
|
const ue = F.isWebGLCubeRenderTarget === !0, ve = F.isWebGLMultipleRenderTargets === !0, _e = F.isWebGLMultisampleRenderTarget === !0, we = U.isDataTexture3D || U.isDataTexture2DArray, pe = v(F) || a;
|
|
@@ -19376,7 +19376,7 @@ function PN(n, e, t, i, r, s, o) {
|
|
|
19376
19376
|
}
|
|
19377
19377
|
}
|
|
19378
19378
|
}
|
|
19379
|
-
function
|
|
19379
|
+
function q(F) {
|
|
19380
19380
|
if (F.isWebGLMultisampleRenderTarget)
|
|
19381
19381
|
if (a) {
|
|
19382
19382
|
const U = F.width, oe = F.height;
|
|
@@ -19401,7 +19401,7 @@ function PN(n, e, t, i, r, s, o) {
|
|
|
19401
19401
|
function Q(F, U) {
|
|
19402
19402
|
F && F.isWebGLCubeRenderTarget && (B === !1 && (console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."), B = !0), F = F.texture), I(F, U);
|
|
19403
19403
|
}
|
|
19404
|
-
this.allocateTextureUnit = C, this.resetTextureUnits = E, this.setTexture2D = L, this.setTexture2DArray = O, this.setTexture3D = b, this.setTextureCube = I, this.setupRenderTarget =
|
|
19404
|
+
this.allocateTextureUnit = C, this.resetTextureUnits = E, this.setTexture2D = L, this.setTexture2DArray = O, this.setTexture3D = b, this.setTextureCube = I, this.setupRenderTarget = K, this.updateRenderTargetMipmap = ee, this.updateMultisampleRenderTarget = q, this.safeSetTexture2D = $, this.safeSetTextureCube = Q;
|
|
19405
19405
|
}
|
|
19406
19406
|
function Dx(n, e, t) {
|
|
19407
19407
|
const i = t.isWebGL2;
|
|
@@ -19606,9 +19606,9 @@ class ON extends ts {
|
|
|
19606
19606
|
const A = new J(), P = new J();
|
|
19607
19607
|
function T(O, b, I) {
|
|
19608
19608
|
A.setFromMatrixPosition(b.matrixWorld), P.setFromMatrixPosition(I.matrixWorld);
|
|
19609
|
-
const N = A.distanceTo(P), D = b.projectionMatrix.elements, z = I.projectionMatrix.elements, V = D[14] / (D[10] - 1), H = D[14] / (D[10] + 1), X = (D[9] + 1) / D[5], re = (D[9] - 1) / D[5], j = (D[8] - 1) / D[0], k = (z[8] + 1) / z[0], W = V * j,
|
|
19610
|
-
b.matrixWorld.decompose(O.position, O.quaternion, O.scale), O.translateX(
|
|
19611
|
-
const ie = V + ee, Y = H + ee, te = W -
|
|
19609
|
+
const N = A.distanceTo(P), D = b.projectionMatrix.elements, z = I.projectionMatrix.elements, V = D[14] / (D[10] - 1), H = D[14] / (D[10] + 1), X = (D[9] + 1) / D[5], re = (D[9] - 1) / D[5], j = (D[8] - 1) / D[0], k = (z[8] + 1) / z[0], W = V * j, K = V * k, ee = N / (-j + k), q = ee * -j;
|
|
19610
|
+
b.matrixWorld.decompose(O.position, O.quaternion, O.scale), O.translateX(q), O.translateZ(ee), O.matrixWorld.compose(O.position, O.quaternion, O.scale), O.matrixWorldInverse.copy(O.matrixWorld).invert();
|
|
19611
|
+
const ie = V + ee, Y = H + ee, te = W - q, B = K + (N - q), $ = X * H / Y * ie, Q = re * H / Y * ie;
|
|
19612
19612
|
O.projectionMatrix.makePerspective(te, B, $, Q, ie, Y);
|
|
19613
19613
|
}
|
|
19614
19614
|
function R(O, b) {
|
|
@@ -19792,9 +19792,9 @@ function St(n = {}) {
|
|
|
19792
19792
|
} catch (Z) {
|
|
19793
19793
|
throw console.error("THREE.WebGLRenderer: " + Z.message), Z;
|
|
19794
19794
|
}
|
|
19795
|
-
let
|
|
19795
|
+
let K, ee, q, ie, Y, te, B, $, Q, F, U, oe, le, ue, ve, _e, we, pe, Me, se, Te, ye;
|
|
19796
19796
|
function xe() {
|
|
19797
|
-
|
|
19797
|
+
K = new sD(k), ee = new nD(k, K, n), K.init(ee), Te = new Dx(k, K, ee), q = new RN(k, K, ee), I[0] = 1029, ie = new lD(), Y = new bN(), te = new PN(k, K, q, Y, ee, Te, ie), B = new rD(u), $ = new PI(k, ee), ye = new eD(k, K, $, ee), Q = new oD(k, $, ie, ye), F = new dD(k, Q, $, ie), pe = new hD(k), ve = new iD(Y), U = new yN(u, B, K, ee, ye, ve), oe = new DN(Y), le = new wN(Y), ue = new AN(K, ee), we = new Q3(u, B, q, F, a), _e = new Ox(u, F, ee), Me = new tD(k, K, ie, ee), se = new aD(k, K, ie, ee), ie.programs = U.programs, u.capabilities = ee, u.extensions = K, u.properties = Y, u.renderLists = le, u.shadowMap = _e, u.state = q, u.info = ie;
|
|
19798
19798
|
}
|
|
19799
19799
|
xe();
|
|
19800
19800
|
const Ie = new ON(u, k);
|
|
@@ -19803,10 +19803,10 @@ function St(n = {}) {
|
|
|
19803
19803
|
}, this.getContextAttributes = function() {
|
|
19804
19804
|
return k.getContextAttributes();
|
|
19805
19805
|
}, this.forceContextLoss = function() {
|
|
19806
|
-
const Z =
|
|
19806
|
+
const Z = K.get("WEBGL_lose_context");
|
|
19807
19807
|
Z && Z.loseContext();
|
|
19808
19808
|
}, this.forceContextRestore = function() {
|
|
19809
|
-
const Z =
|
|
19809
|
+
const Z = K.get("WEBGL_lose_context");
|
|
19810
19810
|
Z && Z.restoreContext();
|
|
19811
19811
|
}, this.getPixelRatio = function() {
|
|
19812
19812
|
return R;
|
|
@@ -19829,15 +19829,15 @@ function St(n = {}) {
|
|
|
19829
19829
|
}, this.getViewport = function(Z) {
|
|
19830
19830
|
return Z.copy(L);
|
|
19831
19831
|
}, this.setViewport = function(Z, fe, he, be) {
|
|
19832
|
-
Z.isVector4 ? L.set(Z.x, Z.y, Z.z, Z.w) : L.set(Z, fe, he, be),
|
|
19832
|
+
Z.isVector4 ? L.set(Z.x, Z.y, Z.z, Z.w) : L.set(Z, fe, he, be), q.viewport(M.copy(L).multiplyScalar(R).floor());
|
|
19833
19833
|
}, this.getScissor = function(Z) {
|
|
19834
19834
|
return Z.copy(O);
|
|
19835
19835
|
}, this.setScissor = function(Z, fe, he, be) {
|
|
19836
|
-
Z.isVector4 ? O.set(Z.x, Z.y, Z.z, Z.w) : O.set(Z, fe, he, be),
|
|
19836
|
+
Z.isVector4 ? O.set(Z.x, Z.y, Z.z, Z.w) : O.set(Z, fe, he, be), q.scissor(x.copy(O).multiplyScalar(R).floor());
|
|
19837
19837
|
}, this.getScissorTest = function() {
|
|
19838
19838
|
return b;
|
|
19839
19839
|
}, this.setScissorTest = function(Z) {
|
|
19840
|
-
|
|
19840
|
+
q.setScissorTest(b = Z);
|
|
19841
19841
|
}, this.setOpaqueSort = function(Z) {
|
|
19842
19842
|
E = Z;
|
|
19843
19843
|
}, this.setTransparentSort = function(Z) {
|
|
@@ -19897,7 +19897,7 @@ function St(n = {}) {
|
|
|
19897
19897
|
}, this.renderBufferDirect = function(Z, fe, he, be, Ce, de) {
|
|
19898
19898
|
fe === null && (fe = re);
|
|
19899
19899
|
const Se = Ce.isMesh && Ce.matrixWorld.determinant() < 0, Oe = Ne(Z, fe, be, Ce);
|
|
19900
|
-
|
|
19900
|
+
q.setMaterial(be, Se);
|
|
19901
19901
|
let Ve = he.index;
|
|
19902
19902
|
const je = he.attributes.position;
|
|
19903
19903
|
if (Ve === null) {
|
|
@@ -19911,10 +19911,10 @@ function St(n = {}) {
|
|
|
19911
19911
|
const Ht = Ve !== null ? Ve.count : je.count, an = he.drawRange.start * Qe, os = he.drawRange.count * Qe, At = de !== null ? de.start * Qe : 0, as = de !== null ? de.count * Qe : 1 / 0, wn = Math.max(an, At), Kw = Math.min(Ht, an + os, At + as) - 1, Dl = Math.max(0, Kw - wn + 1);
|
|
19912
19912
|
if (Dl !== 0) {
|
|
19913
19913
|
if (Ce.isMesh)
|
|
19914
|
-
be.wireframe === !0 ? (
|
|
19914
|
+
be.wireframe === !0 ? (q.setLineWidth(be.wireframeLinewidth * j()), ut.setMode(1)) : ut.setMode(4);
|
|
19915
19915
|
else if (Ce.isLine) {
|
|
19916
19916
|
let ma = be.linewidth;
|
|
19917
|
-
ma === void 0 && (ma = 1),
|
|
19917
|
+
ma === void 0 && (ma = 1), q.setLineWidth(ma * j()), Ce.isLineSegments ? ut.setMode(1) : Ce.isLineLoop ? ut.setMode(2) : ut.setMode(3);
|
|
19918
19918
|
} else Ce.isPoints ? ut.setMode(0) : Ce.isSprite && ut.setMode(4);
|
|
19919
19919
|
if (Ce.isInstancedMesh)
|
|
19920
19920
|
ut.renderInstances(wn, Dl, Ce.count);
|
|
@@ -19962,7 +19962,7 @@ function St(n = {}) {
|
|
|
19962
19962
|
const he = f.state.shadowsArray;
|
|
19963
19963
|
_e.render(he, Z, fe), f.setupLights(), f.setupLightsView(fe), D === !0 && ve.endShadows(), this.info.autoReset === !0 && this.info.reset(), we.render(h, Z);
|
|
19964
19964
|
const be = h.opaque, Ce = h.transmissive, de = h.transparent;
|
|
19965
|
-
be.length > 0 && li(be, Z, fe), Ce.length > 0 && kn(be, Ce, Z, fe), de.length > 0 && li(de, Z, fe), w !== null && (te.updateMultisampleRenderTarget(w), te.updateRenderTargetMipmap(w)), Z.isScene === !0 && Z.onAfterRender(u, Z, fe),
|
|
19965
|
+
be.length > 0 && li(be, Z, fe), Ce.length > 0 && kn(be, Ce, Z, fe), de.length > 0 && li(de, Z, fe), w !== null && (te.updateMultisampleRenderTarget(w), te.updateRenderTargetMipmap(w)), Z.isScene === !0 && Z.onAfterRender(u, Z, fe), q.buffers.depth.setTest(!0), q.buffers.depth.setMask(!0), q.buffers.color.setMask(!0), q.setPolygonOffset(!1), ye.resetDefaultState(), _ = -1, S = null, p.pop(), p.length > 0 ? f = p[p.length - 1] : f = null, g.pop(), g.length > 0 ? h = g[g.length - 1] : h = null;
|
|
19966
19966
|
};
|
|
19967
19967
|
function On(Z, fe, he, be) {
|
|
19968
19968
|
if (Z.visible === !1) return;
|
|
@@ -20022,7 +20022,7 @@ function St(n = {}) {
|
|
|
20022
20022
|
const Ye = he.cameras;
|
|
20023
20023
|
for (let ut = 0, Ht = Ye.length; ut < Ht; ut++) {
|
|
20024
20024
|
const an = Ye[ut];
|
|
20025
|
-
Oe.layers.test(an.layers) && (
|
|
20025
|
+
Oe.layers.test(an.layers) && (q.viewport(M.copy(an.viewport)), f.setupLightsView(an), ss(Oe, fe, an, Ve, je, Qe));
|
|
20026
20026
|
}
|
|
20027
20027
|
} else
|
|
20028
20028
|
ss(Oe, fe, he, Ve, je, Qe);
|
|
@@ -20031,7 +20031,7 @@ function St(n = {}) {
|
|
|
20031
20031
|
function ss(Z, fe, he, be, Ce, de) {
|
|
20032
20032
|
if (Z.onBeforeRender(u, fe, he, be, Ce, de), Z.modelViewMatrix.multiplyMatrices(he.matrixWorldInverse, Z.matrixWorld), Z.normalMatrix.getNormalMatrix(Z.modelViewMatrix), Z.isImmediateRenderObject) {
|
|
20033
20033
|
const Se = Ne(he, fe, Ce, Z);
|
|
20034
|
-
|
|
20034
|
+
q.setMaterial(Ce), ye.reset(), at(Z, Se);
|
|
20035
20035
|
} else
|
|
20036
20036
|
Ce.transparent === !0 && Ce.side === Xr ? (Ce.side = Zt, Ce.needsUpdate = !0, u.renderBufferDirect(he, fe, be, Ce, Z, de), Ce.side = Zr, Ce.needsUpdate = !0, u.renderBufferDirect(he, fe, be, Ce, Z, de), Ce.side = Xr) : u.renderBufferDirect(he, fe, be, Ce, Z, de);
|
|
20037
20037
|
Z.onAfterRender(u, fe, he, be, Ce, de);
|
|
@@ -20069,7 +20069,7 @@ function St(n = {}) {
|
|
|
20069
20069
|
Ye === !0 && (ut = ne(he, fe, be));
|
|
20070
20070
|
let Ht = !1, an = !1, os = !1;
|
|
20071
20071
|
const At = ut.getUniforms(), as = je.uniforms;
|
|
20072
|
-
if (
|
|
20072
|
+
if (q.useProgram(ut.program) && (Ht = !0, an = !0, os = !0), he.id !== _ && (_ = he.id, an = !0), Ht || S !== Z) {
|
|
20073
20073
|
if (At.setValue(k, "projectionMatrix", Z.projectionMatrix), ee.logarithmicDepthBuffer && At.setValue(
|
|
20074
20074
|
k,
|
|
20075
20075
|
"logDepthBufFC",
|
|
@@ -20112,7 +20112,7 @@ function St(n = {}) {
|
|
|
20112
20112
|
Z.isWebGLCubeRenderTarget ? (be = Ve[fe], Ce = !0) : Z.isWebGLMultisampleRenderTarget ? be = Y.get(Z).__webglMultisampledFramebuffer : be = Ve, M.copy(Z.viewport), x.copy(Z.scissor), A = Z.scissorTest;
|
|
20113
20113
|
} else
|
|
20114
20114
|
M.copy(L).multiplyScalar(R).floor(), x.copy(O).multiplyScalar(R).floor(), A = b;
|
|
20115
|
-
if (
|
|
20115
|
+
if (q.bindFramebuffer(36160, be) && ee.drawBuffers) {
|
|
20116
20116
|
let Oe = !1;
|
|
20117
20117
|
if (Z)
|
|
20118
20118
|
if (Z.isWebGLMultipleRenderTargets) {
|
|
@@ -20126,9 +20126,9 @@ function St(n = {}) {
|
|
|
20126
20126
|
(I.length !== 1 || I[0] !== 36064) && (I[0] = 36064, I.length = 1, Oe = !0);
|
|
20127
20127
|
else
|
|
20128
20128
|
(I.length !== 1 || I[0] !== 1029) && (I[0] = 1029, I.length = 1, Oe = !0);
|
|
20129
|
-
Oe && (ee.isWebGL2 ? k.drawBuffers(I) :
|
|
20129
|
+
Oe && (ee.isWebGL2 ? k.drawBuffers(I) : K.get("WEBGL_draw_buffers").drawBuffersWEBGL(I));
|
|
20130
20130
|
}
|
|
20131
|
-
if (
|
|
20131
|
+
if (q.viewport(M), q.scissor(x), q.setScissorTest(A), Ce) {
|
|
20132
20132
|
const Oe = Y.get(Z.texture);
|
|
20133
20133
|
k.framebufferTexture2D(36160, 36064, 34069 + fe, Oe.__webglTexture, he);
|
|
20134
20134
|
} else if (de) {
|
|
@@ -20142,16 +20142,16 @@ function St(n = {}) {
|
|
|
20142
20142
|
}
|
|
20143
20143
|
let Oe = Y.get(Z).__webglFramebuffer;
|
|
20144
20144
|
if (Z.isWebGLCubeRenderTarget && Se !== void 0 && (Oe = Oe[Se]), Oe) {
|
|
20145
|
-
|
|
20145
|
+
q.bindFramebuffer(36160, Oe);
|
|
20146
20146
|
try {
|
|
20147
20147
|
const Ve = Z.texture, je = Ve.format, Qe = Ve.type;
|
|
20148
20148
|
if (je !== Zn && Te.convert(je) !== k.getParameter(35739)) {
|
|
20149
20149
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
|
|
20150
20150
|
return;
|
|
20151
20151
|
}
|
|
20152
|
-
const Ye = Qe === Ts && (
|
|
20152
|
+
const Ye = Qe === Ts && (K.has("EXT_color_buffer_half_float") || ee.isWebGL2 && K.has("EXT_color_buffer_float"));
|
|
20153
20153
|
if (Qe !== Ps && Te.convert(Qe) !== k.getParameter(35738) && // Edge and Chrome Mac < 52 (#9513)
|
|
20154
|
-
!(Qe === tr && (ee.isWebGL2 ||
|
|
20154
|
+
!(Qe === tr && (ee.isWebGL2 || K.has("OES_texture_float") || K.has("WEBGL_color_buffer_float"))) && // Chrome Mac >= 52 and Firefox
|
|
20155
20155
|
!Ye) {
|
|
20156
20156
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
20157
20157
|
return;
|
|
@@ -20159,16 +20159,16 @@ function St(n = {}) {
|
|
|
20159
20159
|
k.checkFramebufferStatus(36160) === 36053 ? fe >= 0 && fe <= Z.width - be && he >= 0 && he <= Z.height - Ce && k.readPixels(fe, he, be, Ce, Te.convert(je), Te.convert(Qe), de) : console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");
|
|
20160
20160
|
} finally {
|
|
20161
20161
|
const Ve = w !== null ? Y.get(w).__webglFramebuffer : null;
|
|
20162
|
-
|
|
20162
|
+
q.bindFramebuffer(36160, Ve);
|
|
20163
20163
|
}
|
|
20164
20164
|
}
|
|
20165
20165
|
}, this.copyFramebufferToTexture = function(Z, fe, he = 0) {
|
|
20166
20166
|
const be = Math.pow(2, -he), Ce = Math.floor(fe.image.width * be), de = Math.floor(fe.image.height * be);
|
|
20167
20167
|
let Se = Te.convert(fe.format);
|
|
20168
|
-
ee.isWebGL2 && (Se === 6407 && (Se = 32849), Se === 6408 && (Se = 32856)), te.setTexture2D(fe, 0), k.copyTexImage2D(3553, he, Se, Z.x, Z.y, Ce, de, 0),
|
|
20168
|
+
ee.isWebGL2 && (Se === 6407 && (Se = 32849), Se === 6408 && (Se = 32856)), te.setTexture2D(fe, 0), k.copyTexImage2D(3553, he, Se, Z.x, Z.y, Ce, de, 0), q.unbindTexture();
|
|
20169
20169
|
}, this.copyTextureToTexture = function(Z, fe, he, be = 0) {
|
|
20170
20170
|
const Ce = fe.image.width, de = fe.image.height, Se = Te.convert(he.format), Oe = Te.convert(he.type);
|
|
20171
|
-
te.setTexture2D(he, 0), k.pixelStorei(37440, he.flipY), k.pixelStorei(37441, he.premultiplyAlpha), k.pixelStorei(3317, he.unpackAlignment), fe.isDataTexture ? k.texSubImage2D(3553, be, Z.x, Z.y, Ce, de, Se, Oe, fe.image.data) : fe.isCompressedTexture ? k.compressedTexSubImage2D(3553, be, Z.x, Z.y, fe.mipmaps[0].width, fe.mipmaps[0].height, Se, fe.mipmaps[0].data) : k.texSubImage2D(3553, be, Z.x, Z.y, Se, Oe, fe.image), be === 0 && he.generateMipmaps && k.generateMipmap(3553),
|
|
20171
|
+
te.setTexture2D(he, 0), k.pixelStorei(37440, he.flipY), k.pixelStorei(37441, he.premultiplyAlpha), k.pixelStorei(3317, he.unpackAlignment), fe.isDataTexture ? k.texSubImage2D(3553, be, Z.x, Z.y, Ce, de, Se, Oe, fe.image.data) : fe.isCompressedTexture ? k.compressedTexSubImage2D(3553, be, Z.x, Z.y, fe.mipmaps[0].width, fe.mipmaps[0].height, Se, fe.mipmaps[0].data) : k.texSubImage2D(3553, be, Z.x, Z.y, Se, Oe, fe.image), be === 0 && he.generateMipmaps && k.generateMipmap(3553), q.unbindTexture();
|
|
20172
20172
|
}, this.copyTextureToTexture3D = function(Z, fe, he, be, Ce = 0) {
|
|
20173
20173
|
if (u.isWebGL1Renderer) {
|
|
20174
20174
|
console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");
|
|
@@ -20186,11 +20186,11 @@ function St(n = {}) {
|
|
|
20186
20186
|
}
|
|
20187
20187
|
k.pixelStorei(37440, be.flipY), k.pixelStorei(37441, be.premultiplyAlpha), k.pixelStorei(3317, be.unpackAlignment);
|
|
20188
20188
|
const Ye = k.getParameter(3314), ut = k.getParameter(32878), Ht = k.getParameter(3316), an = k.getParameter(3315), os = k.getParameter(32877), At = he.isCompressedTexture ? he.mipmaps[0] : he.image;
|
|
20189
|
-
k.pixelStorei(3314, At.width), k.pixelStorei(32878, At.height), k.pixelStorei(3316, Z.min.x), k.pixelStorei(3315, Z.min.y), k.pixelStorei(32877, Z.min.z), he.isDataTexture || he.isDataTexture3D ? k.texSubImage3D(Qe, Ce, fe.x, fe.y, fe.z, de, Se, Oe, Ve, je, At.data) : he.isCompressedTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), k.compressedTexSubImage3D(Qe, Ce, fe.x, fe.y, fe.z, de, Se, Oe, Ve, At.data)) : k.texSubImage3D(Qe, Ce, fe.x, fe.y, fe.z, de, Se, Oe, Ve, je, At), k.pixelStorei(3314, Ye), k.pixelStorei(32878, ut), k.pixelStorei(3316, Ht), k.pixelStorei(3315, an), k.pixelStorei(32877, os), Ce === 0 && be.generateMipmaps && k.generateMipmap(Qe),
|
|
20189
|
+
k.pixelStorei(3314, At.width), k.pixelStorei(32878, At.height), k.pixelStorei(3316, Z.min.x), k.pixelStorei(3315, Z.min.y), k.pixelStorei(32877, Z.min.z), he.isDataTexture || he.isDataTexture3D ? k.texSubImage3D(Qe, Ce, fe.x, fe.y, fe.z, de, Se, Oe, Ve, je, At.data) : he.isCompressedTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), k.compressedTexSubImage3D(Qe, Ce, fe.x, fe.y, fe.z, de, Se, Oe, Ve, At.data)) : k.texSubImage3D(Qe, Ce, fe.x, fe.y, fe.z, de, Se, Oe, Ve, je, At), k.pixelStorei(3314, Ye), k.pixelStorei(32878, ut), k.pixelStorei(3316, Ht), k.pixelStorei(3315, an), k.pixelStorei(32877, os), Ce === 0 && be.generateMipmaps && k.generateMipmap(Qe), q.unbindTexture();
|
|
20190
20190
|
}, this.initTexture = function(Z) {
|
|
20191
|
-
te.setTexture2D(Z, 0),
|
|
20191
|
+
te.setTexture2D(Z, 0), q.unbindTexture();
|
|
20192
20192
|
}, this.resetState = function() {
|
|
20193
|
-
v = 0, m = 0, w = null,
|
|
20193
|
+
v = 0, m = 0, w = null, q.reset(), ye.reset();
|
|
20194
20194
|
}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
20195
20195
|
}
|
|
20196
20196
|
class Nx extends St {
|
|
@@ -22204,21 +22204,21 @@ class xi extends Ke {
|
|
|
22204
22204
|
let te = 0, B = b * te;
|
|
22205
22205
|
for (let $ = 0; $ < I; $++) {
|
|
22206
22206
|
const Q = C[$];
|
|
22207
|
-
|
|
22207
|
+
K(Q[2] + B, Q[1] + B, Q[0] + B);
|
|
22208
22208
|
}
|
|
22209
22209
|
te = d + y * 2, B = b * te;
|
|
22210
22210
|
for (let $ = 0; $ < I; $++) {
|
|
22211
22211
|
const Q = C[$];
|
|
22212
|
-
|
|
22212
|
+
K(Q[0] + B, Q[1] + B, Q[2] + B);
|
|
22213
22213
|
}
|
|
22214
22214
|
} else {
|
|
22215
22215
|
for (let te = 0; te < I; te++) {
|
|
22216
22216
|
const B = C[te];
|
|
22217
|
-
|
|
22217
|
+
K(B[2], B[1], B[0]);
|
|
22218
22218
|
}
|
|
22219
22219
|
for (let te = 0; te < I; te++) {
|
|
22220
22220
|
const B = C[te];
|
|
22221
|
-
|
|
22221
|
+
K(B[0] + b * d, B[1] + b * d, B[2] + b * d);
|
|
22222
22222
|
}
|
|
22223
22223
|
}
|
|
22224
22224
|
i.addGroup(Y, r.length / 3 - Y, 0);
|
|
@@ -22248,17 +22248,17 @@ class xi extends Ke {
|
|
|
22248
22248
|
function W(Y, te, B) {
|
|
22249
22249
|
c.push(Y), c.push(te), c.push(B);
|
|
22250
22250
|
}
|
|
22251
|
-
function
|
|
22252
|
-
|
|
22251
|
+
function K(Y, te, B) {
|
|
22252
|
+
q(Y), q(te), q(B);
|
|
22253
22253
|
const $ = r.length / 3, Q = m.generateTopUV(i, r, $ - 3, $ - 2, $ - 1);
|
|
22254
22254
|
ie(Q[0]), ie(Q[1]), ie(Q[2]);
|
|
22255
22255
|
}
|
|
22256
22256
|
function ee(Y, te, B, $) {
|
|
22257
|
-
|
|
22257
|
+
q(Y), q(te), q($), q(te), q(B), q($);
|
|
22258
22258
|
const Q = r.length / 3, F = m.generateSideWallUV(i, r, Q - 6, Q - 3, Q - 2, Q - 1);
|
|
22259
22259
|
ie(F[0]), ie(F[1]), ie(F[3]), ie(F[1]), ie(F[2]), ie(F[3]);
|
|
22260
22260
|
}
|
|
22261
|
-
function
|
|
22261
|
+
function q(Y) {
|
|
22262
22262
|
r.push(c[Y * 3 + 0]), r.push(c[Y * 3 + 1]), r.push(c[Y * 3 + 2]);
|
|
22263
22263
|
}
|
|
22264
22264
|
function ie(Y) {
|
|
@@ -31411,7 +31411,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31411
31411
|
/* 2 */
|
|
31412
31412
|
/***/
|
|
31413
31413
|
(o) => {
|
|
31414
|
-
o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.11.
|
|
31414
|
+
o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.11.7","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
|
|
31415
31415
|
},
|
|
31416
31416
|
/* 3 */
|
|
31417
31417
|
/***/
|
|
@@ -31486,7 +31486,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31486
31486
|
}
|
|
31487
31487
|
return C;
|
|
31488
31488
|
} catch {
|
|
31489
|
-
console.error("There is an issue
|
|
31489
|
+
console.error("There is an issue creating the url link with: ".concat(R, "."));
|
|
31490
31490
|
}
|
|
31491
31491
|
};
|
|
31492
31492
|
if (!Array.isArray(x)) return P(x, A);
|
|
@@ -31565,11 +31565,11 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31565
31565
|
V && (I[P] = Array(V.length).fill().map(() => []));
|
|
31566
31566
|
}
|
|
31567
31567
|
for (var H = Math.log10(1 / A), X = Math.pow(10, H), D = 0; D < C; D++) {
|
|
31568
|
-
for (var re = R ? R.getX(D) : D, j = "", k = 0, z = O.length; k < z; k++) for (var P = O[k], W = x.getAttribute(P),
|
|
31568
|
+
for (var re = R ? R.getX(D) : D, j = "", k = 0, z = O.length; k < z; k++) for (var P = O[k], W = x.getAttribute(P), K = W.itemSize, ee = 0; ee < K; ee++)
|
|
31569
31569
|
j += "".concat(~~(W[N[ee]](re) * X), ",");
|
|
31570
31570
|
if (j in T) ue.push(T[j]);
|
|
31571
31571
|
else {
|
|
31572
|
-
for (var k = 0, z = O.length; k < z; k++) for (var
|
|
31572
|
+
for (var k = 0, z = O.length; k < z; k++) for (var q, P = O[k], W = x.getAttribute(P), V = x.morphAttributes[P], K = W.itemSize, ie = b[P], Y = I[P], ee = 0; ee < K; ee++) if (q = N[ee], ie.push(W[q](re)), V) for (var te = 0, B = V.length; te < B; te++) Y[te].push(V[te][q](re));
|
|
31573
31573
|
T[j] = L, ue.push(L), L++;
|
|
31574
31574
|
}
|
|
31575
31575
|
}
|
|
@@ -31660,8 +31660,8 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31660
31660
|
},
|
|
31661
31661
|
fromBufferGeometry: function(m) {
|
|
31662
31662
|
function w(H, X, re, j) {
|
|
31663
|
-
var k = P === void 0 ? [] : [_.colors[H].clone(), _.colors[X].clone(), _.colors[re].clone()], W = A === void 0 ? [] : [new l.Vector3().fromBufferAttribute(A, H), new l.Vector3().fromBufferAttribute(A, X), new l.Vector3().fromBufferAttribute(A, re)],
|
|
31664
|
-
_.faces.push(
|
|
31663
|
+
var k = P === void 0 ? [] : [_.colors[H].clone(), _.colors[X].clone(), _.colors[re].clone()], W = A === void 0 ? [] : [new l.Vector3().fromBufferAttribute(A, H), new l.Vector3().fromBufferAttribute(A, X), new l.Vector3().fromBufferAttribute(A, re)], K = new y(H, X, re, W, k, j);
|
|
31664
|
+
_.faces.push(K), T !== void 0 && _.faceVertexUvs[0].push([new l.Vector2().fromBufferAttribute(T, H), new l.Vector2().fromBufferAttribute(T, X), new l.Vector2().fromBufferAttribute(T, re)]), R !== void 0 && _.faceVertexUvs[1].push([new l.Vector2().fromBufferAttribute(R, H), new l.Vector2().fromBufferAttribute(R, X), new l.Vector2().fromBufferAttribute(R, re)]);
|
|
31665
31665
|
}
|
|
31666
31666
|
var _ = this, S = m.index === null ? void 0 : m.index, M = m.attributes;
|
|
31667
31667
|
if (M.position === void 0) return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."), this;
|
|
@@ -31773,12 +31773,12 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31773
31773
|
for (var N = 0; N < P.length; N += 3) g.set(P[N], P[N + 1], P[N + 2]), w !== void 0 && g.applyMatrix4(w), this.normals.push(g.x, g.y, g.z);
|
|
31774
31774
|
for (var D = 0, z = C.length; D < z; D++) typeof C[D] == "number" ? E.push(C[D]) : E.push(C[D].clone());
|
|
31775
31775
|
for (var V = 0, H = R.length; V < H; V++) {
|
|
31776
|
-
var X = R[V], re = void 0, j = void 0, k = X.vertexNormals, W = X.vertexColors,
|
|
31777
|
-
|
|
31778
|
-
for (var ee = 0,
|
|
31779
|
-
|
|
31780
|
-
for (var ie = 0, Y = W.length; ie < Y; ie++) j = W[ie],
|
|
31781
|
-
|
|
31776
|
+
var X = R[V], re = void 0, j = void 0, k = X.vertexNormals, W = X.vertexColors, K = new y(X.a + M, X.b + M, X.c + M);
|
|
31777
|
+
K.normal.copy(X.normal), S !== void 0 && K.normal.applyMatrix3(S).normalize();
|
|
31778
|
+
for (var ee = 0, q = k.length; ee < q; ee++) re = k[ee].clone(), S !== void 0 && re.applyMatrix3(S).normalize(), K.vertexNormals.push(re);
|
|
31779
|
+
K.color.copy(X.color);
|
|
31780
|
+
for (var ie = 0, Y = W.length; ie < Y; ie++) j = W[ie], K.vertexColors.push(j.clone());
|
|
31781
|
+
K.materialIndex = X.materialIndex + _, T.push(K);
|
|
31782
31782
|
}
|
|
31783
31783
|
for (var te, B = 0, $ = m.faceVertexUvs.length; B < $; B++) {
|
|
31784
31784
|
te = m.faceVertexUvs[B], this.faceVertexUvs[B] === void 0 && (this.faceVertexUvs[B] = []);
|
|
@@ -31855,14 +31855,14 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31855
31855
|
}
|
|
31856
31856
|
for (var P, T = [], R = 0; R < this.vertices.length; R++) P = this.vertices[R], T.push(P.x, P.y, P.z);
|
|
31857
31857
|
for (var E = [], C = [], L = {}, O = [], b = {}, I = [], N = {}, D = 0; D < this.faces.length; D++) {
|
|
31858
|
-
var z = this.faces[D], V = !0, H = !1, X = this.faceVertexUvs[0][D] !== void 0, re = 0 < z.normal.length(), j = 0 < z.vertexNormals.length, k = z.color.r !== 1 || z.color.g !== 1 || z.color.b !== 1, W = 0 < z.vertexColors.length,
|
|
31859
|
-
if (
|
|
31858
|
+
var z = this.faces[D], V = !0, H = !1, X = this.faceVertexUvs[0][D] !== void 0, re = 0 < z.normal.length(), j = 0 < z.vertexNormals.length, k = z.color.r !== 1 || z.color.g !== 1 || z.color.b !== 1, W = 0 < z.vertexColors.length, K = 0;
|
|
31859
|
+
if (K = m(K, 0, 0), K = m(K, 1, V), K = m(K, 2, H), K = m(K, 3, X), K = m(K, 4, re), K = m(K, 5, j), K = m(K, 6, k), K = m(K, 7, W), E.push(K), E.push(z.a, z.b, z.c), E.push(z.materialIndex), X) {
|
|
31860
31860
|
var ee = this.faceVertexUvs[0][D];
|
|
31861
31861
|
E.push(S(ee[0]), S(ee[1]), S(ee[2]));
|
|
31862
31862
|
}
|
|
31863
31863
|
if (re && E.push(w(z.normal)), j) {
|
|
31864
|
-
var
|
|
31865
|
-
E.push(w(
|
|
31864
|
+
var q = z.vertexNormals;
|
|
31865
|
+
E.push(w(q[0]), w(q[1]), w(q[2]));
|
|
31866
31866
|
}
|
|
31867
31867
|
if (k && E.push(_(z.color)), W) {
|
|
31868
31868
|
var ie = z.vertexColors;
|
|
@@ -31893,23 +31893,23 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31893
31893
|
}
|
|
31894
31894
|
if (X[re].normals !== void 0) {
|
|
31895
31895
|
H.normals = [];
|
|
31896
|
-
for (var
|
|
31896
|
+
for (var K = 0, ee = X[re].normals.length; K < ee; K++) H.normals.push(X[re].normals[K].clone());
|
|
31897
31897
|
}
|
|
31898
31898
|
this.morphTargets.push(H);
|
|
31899
31899
|
}
|
|
31900
|
-
for (var
|
|
31901
|
-
if (
|
|
31902
|
-
|
|
31900
|
+
for (var q, ie = m.morphNormals, Y = 0, te = ie.length; Y < te; Y++) {
|
|
31901
|
+
if (q = {}, ie[Y].vertexNormals !== void 0) {
|
|
31902
|
+
q.vertexNormals = [];
|
|
31903
31903
|
for (var B = 0, $ = ie[Y].vertexNormals.length; B < $; B++) {
|
|
31904
31904
|
var Q = ie[Y].vertexNormals[B], F = {};
|
|
31905
|
-
F.a = Q.a.clone(), F.b = Q.b.clone(), F.c = Q.c.clone(),
|
|
31905
|
+
F.a = Q.a.clone(), F.b = Q.b.clone(), F.c = Q.c.clone(), q.vertexNormals.push(F);
|
|
31906
31906
|
}
|
|
31907
31907
|
}
|
|
31908
31908
|
if (ie[Y].faceNormals !== void 0) {
|
|
31909
|
-
|
|
31910
|
-
for (var U = 0, oe = ie[Y].faceNormals.length; U < oe; U++)
|
|
31909
|
+
q.faceNormals = [];
|
|
31910
|
+
for (var U = 0, oe = ie[Y].faceNormals.length; U < oe; U++) q.faceNormals.push(ie[Y].faceNormals[U].clone());
|
|
31911
31911
|
}
|
|
31912
|
-
this.morphNormals.push(
|
|
31912
|
+
this.morphNormals.push(q);
|
|
31913
31913
|
}
|
|
31914
31914
|
for (var le = m.skinWeights, ue = 0, ve = le.length; ue < ve; ue++) this.skinWeights.push(le[ue].clone());
|
|
31915
31915
|
for (var _e = m.skinIndices, we = 0, pe = _e.length; we < pe; we++) this.skinIndices.push(_e[we].clone());
|
|
@@ -32089,8 +32089,8 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32089
32089
|
var W = M[1][V];
|
|
32090
32090
|
W === void 0 ? (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", V), this.uvs2.push(new l.Vector2(), new l.Vector2(), new l.Vector2())) : this.uvs2.push(W[0], W[1], W[2]);
|
|
32091
32091
|
}
|
|
32092
|
-
for (var
|
|
32093
|
-
for (var
|
|
32092
|
+
for (var K, ee = 0; ee < T; ee++) K = P[ee].vertices, w[ee].data.push(K[z.a], K[z.b], K[z.c]);
|
|
32093
|
+
for (var q, ie = 0; ie < L; ie++) q = C[ie].vertexNormals[V], E[ie].data.push(q.a, q.b, q.c);
|
|
32094
32094
|
N && this.skinIndices.push(b[z.a], b[z.b], b[z.c]), D && this.skinWeights.push(I[z.a], I[z.b], I[z.c]);
|
|
32095
32095
|
}
|
|
32096
32096
|
return this.computeGroups(m), this.verticesNeedUpdate = m.verticesNeedUpdate, this.normalsNeedUpdate = m.normalsNeedUpdate, this.colorsNeedUpdate = m.colorsNeedUpdate, this.uvsNeedUpdate = m.uvsNeedUpdate, this.groupsNeedUpdate = m.groupsNeedUpdate, m.boundingSphere !== null && (this.boundingSphere = m.boundingSphere.clone()), m.boundingBox !== null && (this.boundingBox = m.boundingBox.clone()), this;
|
|
@@ -32454,8 +32454,8 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32454
32454
|
if (z !== null) for (var X = Math.max(0, R.start), re = Math.min(z.count, R.start + R.count), j = X; j < re - 1; j += D) {
|
|
32455
32455
|
var k = z.getX(j), W = z.getX(j + 1);
|
|
32456
32456
|
_(O, b, this, H, E, k, W);
|
|
32457
|
-
var
|
|
32458
|
-
if (!(
|
|
32457
|
+
var K = g.distanceSqToSegment(O, b, N, I);
|
|
32458
|
+
if (!(K > L)) {
|
|
32459
32459
|
N.applyMatrix4(this.matrixWorld);
|
|
32460
32460
|
var ee = M.ray.origin.distanceTo(N);
|
|
32461
32461
|
ee < M.near || ee > M.far || x.push({
|
|
@@ -32470,7 +32470,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32470
32470
|
});
|
|
32471
32471
|
}
|
|
32472
32472
|
}
|
|
32473
|
-
else for (var
|
|
32473
|
+
else for (var q = Math.max(0, R.start), ie = Math.min(H.count, R.start + R.count), Y = q; Y < ie - 1; Y += D) {
|
|
32474
32474
|
_(O, b, this, H, E, Y, Y + 1);
|
|
32475
32475
|
var te = g.distanceSqToSegment(O, b, N, I);
|
|
32476
32476
|
if (!(te > L)) {
|
|
@@ -32645,7 +32645,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32645
32645
|
te(Q, U)(ue.geometry, ue.materials), ue.geometry.dispose();
|
|
32646
32646
|
} else oe.crossOrigin = "Anonymous", oe.load($, te(Q, U));
|
|
32647
32647
|
};
|
|
32648
|
-
var
|
|
32648
|
+
var K = (B, $, Q, F, U, oe) => {
|
|
32649
32649
|
if (T == "NONE" || T == "MIRROR") {
|
|
32650
32650
|
for (var le, ue = [0, 0, 0], ve = [0, 0, 0], _e = [0, 0, 0], we = [0, 0, 0], pe = [0, 0, 0], Me = [0, 0, 0], se = [0, 0, 0], Te = [0, 0, 0], ye = [0, 0, 0], xe = 0; 3 > xe; xe++) le = 0 > U[xe] ? -1 : 1, ue[xe] = le * x[xe] + U[xe] * P[xe];
|
|
32651
32651
|
for (var xe = 0; 3 > xe; xe++) ve[xe] = $[xe] * ue[0], _e[xe] = Q[xe] * ue[1], we[xe] = F[xe] * ue[2], pe[xe] = B[xe] + A[0] * ve[xe] + A[1] * _e[xe] + A[2] * we[xe], T == "MIRROR" && (Me[xe] = -ve[xe], se[xe] = -_e[xe], Te[xe] = -we[xe], ye[xe] = pe[xe], 0 > U[0] && (pe[xe] -= ve[xe], ye[xe] -= Me[xe]));
|
|
@@ -32677,7 +32677,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32677
32677
|
var le = B.length / 3, ue = 0;
|
|
32678
32678
|
k.length = oe;
|
|
32679
32679
|
for (var ve = 0; ve < le; ve++) {
|
|
32680
|
-
var _e = 3 * ve, we = [B[_e], B[_e + 1], B[_e + 2]], pe = [$[_e], $[_e + 1], $[_e + 2]], Me = [Q[_e], Q[_e + 1], Q[_e + 2]], se = [F[_e], F[_e + 1], F[_e + 2]], Te = [U[_e], U[_e + 1], U[_e + 2]], ye =
|
|
32680
|
+
var _e = 3 * ve, we = [B[_e], B[_e + 1], B[_e + 2]], pe = [$[_e], $[_e + 1], $[_e + 2]], Me = [Q[_e], Q[_e + 1], Q[_e + 2]], se = [F[_e], F[_e + 1], F[_e + 2]], Te = [U[_e], U[_e + 1], U[_e + 2]], ye = K(we, pe, Me, se, Te, k);
|
|
32681
32681
|
if (ye.length == oe) for (var xe = 0; xe < oe; xe++) {
|
|
32682
32682
|
C.elements[0] = ye[xe][1][0], C.elements[1] = ye[xe][1][1], C.elements[2] = ye[xe][1][2], C.elements[3] = 0, C.elements[4] = ye[xe][2][0], C.elements[5] = ye[xe][2][1], C.elements[6] = ye[xe][2][2], C.elements[7] = 0, C.elements[8] = ye[xe][3][0], C.elements[9] = ye[xe][3][1], C.elements[10] = ye[xe][3][2], C.elements[11] = 0, C.elements[12] = ye[xe][0][0], C.elements[13] = ye[xe][0][1], C.elements[14] = ye[xe][0][2], C.elements[15] = 1, this.morph.setMatrixAt(ue, C);
|
|
32683
32683
|
var Ie = g[ue];
|
|
@@ -32685,7 +32685,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32685
32685
|
}
|
|
32686
32686
|
}
|
|
32687
32687
|
this.morph.instanceMatrix.needsUpdate = !0;
|
|
32688
|
-
},
|
|
32688
|
+
}, q = (B) => {
|
|
32689
32689
|
var $ = 1;
|
|
32690
32690
|
T == "AXES_2D" || T == "MIRROR" ? $ = 2 : T == "AXES_3D" && ($ = 3);
|
|
32691
32691
|
for (var Q, F = B.length, U = 0, oe = 0; oe < F; oe++) {
|
|
@@ -32710,7 +32710,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32710
32710
|
oe.length = bt.length;
|
|
32711
32711
|
for (var at = 0; at < bt.length; at++) L.setHex(bt[at]), O.setHex(ze[at]), L.setRGB(L.r * ve + O.r * (1 - ve), L.g * ve + O.g * (1 - ve), L.b * ve + O.b * (1 - ve)), oe[at] = L.getHex();
|
|
32712
32712
|
} else w[0], l("current_colors");
|
|
32713
|
-
|
|
32713
|
+
q(oe);
|
|
32714
32714
|
}
|
|
32715
32715
|
};
|
|
32716
32716
|
this.showLabel = () => {
|
|
@@ -32718,7 +32718,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32718
32718
|
};
|
|
32719
32719
|
var Y = (B) => {
|
|
32720
32720
|
if (_ != null && B) for (var $, Q = 0; Q < M; Q++) $ = new (c(16)).Glyph(void 0, void 0, Q, this), _ != null && _[Q] != null && $.setLabel(_[Q]), 0 < S && $.setFrustumCulled(!1), g[Q] = $, this.morph.add($.getGroup());
|
|
32721
|
-
_ != null && B && this.showLabel(this.morph.material ? this.morph.material.color : void 0), ee(v[0], p[0], u[0], y[0], m[0]), w != null &&
|
|
32721
|
+
_ != null && B && this.showLabel(this.morph.material ? this.morph.material.color : void 0), ee(v[0], p[0], u[0], y[0], m[0]), w != null && q(w[0]), this.ready = !0, this.boundingBoxUpdateRequired = !0;
|
|
32722
32722
|
};
|
|
32723
32723
|
this.addCustomGlyph = (B) => {
|
|
32724
32724
|
B.isGlyph && g.push(B), this.ready = !0, this.boundingBoxUpdateRequired = !0;
|
|
@@ -32812,7 +32812,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32812
32812
|
function C(Te, ye) {
|
|
32813
32813
|
return Te & 1 << ye;
|
|
32814
32814
|
}
|
|
32815
|
-
var L, O, b, I, N, D, z, V, H, X, re, j, k, W,
|
|
32815
|
+
var L, O, b, I, N, D, z, V, H, X, re, j, k, W, K, ee, q, ie, Y, te, B, $, Q, F, U, oe, le, ue = R.faces, ve = R.vertices, _e = R.normals, we = R.colors, pe = R.scale, Me = 0;
|
|
32816
32816
|
if (R.uvs !== void 0) {
|
|
32817
32817
|
for (L = 0; L < R.uvs.length; L++) R.uvs[L].length && Me++;
|
|
32818
32818
|
for (L = 0; L < Me; L++) E.faceVertexUvs[L] = [];
|
|
@@ -32825,15 +32825,15 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32825
32825
|
if (_e) for (L = 0; L < _e.length; L++) E.normals[L] = _e[L];
|
|
32826
32826
|
if (we) for (L = 0; L < we.length; L++) E.colors[L] = we[L];
|
|
32827
32827
|
for (; I < N; )
|
|
32828
|
-
if (X = ue[I++], re = C(X, 0), j = C(X, 1), k = C(X, 3), W = C(X, 4),
|
|
32828
|
+
if (X = ue[I++], re = C(X, 0), j = C(X, 1), k = C(X, 3), W = C(X, 4), K = C(X, 5), ee = C(X, 6), q = C(X, 7), re) {
|
|
32829
32829
|
if (te = new v(), te.a = ue[I], te.b = ue[I + 1], te.c = ue[I + 3], B = new v(), B.a = ue[I + 1], B.b = ue[I + 2], B.c = ue[I + 3], I += 4, j && (H = ue[I++], te.materialIndex = H, B.materialIndex = H), b = E.faces.length, k) for (L = 0; L < Me; L++) for (F = R.uvs[L], E.faceVertexUvs[L][b] = [], E.faceVertexUvs[L][b + 1] = [], O = 0; 4 > O; O++) V = ue[I++], oe = F[2 * V], le = F[2 * V + 1], U = new y(oe, le), O !== 2 && E.faceVertexUvs[L][b].push(U), O !== 0 && E.faceVertexUvs[L][b + 1].push(U);
|
|
32830
|
-
if (W && (z = 3 * ue[I++], te.normal.set(_e[z++], _e[z++], _e[z]), B.normal.copy(te.normal)),
|
|
32831
|
-
if (ee && (D = ue[I++], $ = we[D], te.color.setHex($), B.color.setHex($)),
|
|
32830
|
+
if (W && (z = 3 * ue[I++], te.normal.set(_e[z++], _e[z++], _e[z]), B.normal.copy(te.normal)), K) for (L = 0; 4 > L; L++) z = 3 * ue[I++], Q = new g(_e[z++], _e[z++], _e[z]), L !== 2 && te.vertexNormals.push(Q), L !== 0 && B.vertexNormals.push(Q);
|
|
32831
|
+
if (ee && (D = ue[I++], $ = we[D], te.color.setHex($), B.color.setHex($)), q) for (L = 0; 4 > L; L++) D = ue[I++], $ = we[D], L !== 2 && te.vertexColors.push(new u($)), L !== 0 && B.vertexColors.push(new u($));
|
|
32832
32832
|
E.faces.push(te), E.faces.push(B);
|
|
32833
32833
|
} else {
|
|
32834
32834
|
if (Y = new v(), Y.a = ue[I++], Y.b = ue[I++], Y.c = ue[I++], j && (H = ue[I++], Y.materialIndex = H), b = E.faces.length, k) for (L = 0; L < Me; L++) for (F = R.uvs[L], E.faceVertexUvs[L][b] = [], O = 0; 3 > O; O++) V = ue[I++], oe = F[2 * V], le = F[2 * V + 1], U = new y(oe, le), E.faceVertexUvs[L][b].push(U);
|
|
32835
|
-
if (W && (z = 3 * ue[I++], Y.normal.set(_e[z++], _e[z++], _e[z])),
|
|
32836
|
-
if (ee && (D = ue[I++], Y.color.setHex(we[D])),
|
|
32835
|
+
if (W && (z = 3 * ue[I++], Y.normal.set(_e[z++], _e[z++], _e[z])), K) for (L = 0; 3 > L; L++) z = 3 * ue[I++], Q = new g(_e[z++], _e[z++], _e[z]), Y.vertexNormals.push(Q);
|
|
32836
|
+
if (ee && (D = ue[I++], Y.color.setHex(we[D])), q) for (L = 0; 3 > L; L++) D = ue[I++], Y.vertexColors.push(new u(we[D]));
|
|
32837
32837
|
E.faces.push(Y);
|
|
32838
32838
|
}
|
|
32839
32839
|
}
|
|
@@ -32863,8 +32863,8 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32863
32863
|
}
|
|
32864
32864
|
}
|
|
32865
32865
|
if (R.morphColors !== void 0) {
|
|
32866
|
-
var L, O, re, j, k, W,
|
|
32867
|
-
for (L = 0, O = R.morphColors.length; L < O; L++) for (E.morphColors[L] = {}, E.morphColors[L].name = R.morphColors[L].name, E.morphColors[L].colors = [], k = E.morphColors[L].colors, W = R.morphColors[L].colors, re = 0, j = W.length; re < j; re += 3)
|
|
32866
|
+
var L, O, re, j, k, W, K;
|
|
32867
|
+
for (L = 0, O = R.morphColors.length; L < O; L++) for (E.morphColors[L] = {}, E.morphColors[L].name = R.morphColors[L].name, E.morphColors[L].colors = [], k = E.morphColors[L].colors, W = R.morphColors[L].colors, re = 0, j = W.length; re < j; re += 3) K = new l.Color(16755200), K.setRGB(W[re], W[re + 1], W[re + 2]), k.push(K);
|
|
32868
32868
|
}
|
|
32869
32869
|
}
|
|
32870
32870
|
function T(R, E) {
|
|
@@ -33734,9 +33734,9 @@ void main() {
|
|
|
33734
33734
|
this.forcePickableObjectsUpdate = !1, this.uuid = v();
|
|
33735
33735
|
var k = new d(this);
|
|
33736
33736
|
k.disable(), O.add(k.group);
|
|
33737
|
-
var W = () => x ? typeof x.clientWidth > "u" ? x.width : x.clientWidth : 0,
|
|
33737
|
+
var W = () => x ? typeof x.clientWidth > "u" ? x.width : x.clientWidth : 0, K = () => x ? typeof x.clientHeight > "u" ? x.height : x.clientHeight : 0;
|
|
33738
33738
|
this.getDownloadProgress = () => P.getDownloadProgress(), this.onWindowResize = () => {
|
|
33739
|
-
var B =
|
|
33739
|
+
var B = K();
|
|
33740
33740
|
this.camera.aspect = W() / B, this.camera.updateProjectionMatrix(), this.minimapScissor.updateRequired = !0, D.onResize(), D.calculateHeightPerPixelAtZeroDepth(B);
|
|
33741
33741
|
}, this.resetView = () => {
|
|
33742
33742
|
this.onWindowResize(), D.resetView();
|
|
@@ -33744,7 +33744,7 @@ void main() {
|
|
|
33744
33744
|
D.changeZoomByScrollRateUnit(B);
|
|
33745
33745
|
};
|
|
33746
33746
|
var ee = () => {
|
|
33747
|
-
this.camera = new l.PerspectiveCamera(40, W() /
|
|
33747
|
+
this.camera = new l.PerspectiveCamera(40, W() / K(), 0, 10), this.ambient = new l.AmbientLight(16777215, 0.2), O.add(this.ambient), this.directionalLight = new l.DirectionalLight(16777215, 0.8), O.add(this.directionalLight), D = new (c(43)).CameraControls(this.camera, S.domElement, S, this), D.setDirectionalLight(this.directionalLight), D.resetView(), T = new (c(49)).Minimap(this);
|
|
33748
33748
|
};
|
|
33749
33749
|
ee(), this.loadView = (B) => {
|
|
33750
33750
|
var $ = new g();
|
|
@@ -33758,7 +33758,7 @@ void main() {
|
|
|
33758
33758
|
}, this.getBoundingBox = () => b.getBoundingBox(!0), this.viewAllWithBoundingBox = (B) => {
|
|
33759
33759
|
if (B) {
|
|
33760
33760
|
var $ = D.getViewportFromBoundingBox(B, 1);
|
|
33761
|
-
D.setCurrentCameraSettings($), D.calculateHeightPerPixelAtZeroDepth(
|
|
33761
|
+
D.setCurrentCameraSettings($), D.calculateHeightPerPixelAtZeroDepth(K()), k.markerUpdateRequired = !0;
|
|
33762
33762
|
}
|
|
33763
33763
|
}, this.viewAll = () => {
|
|
33764
33764
|
var B = this.getBoundingBox();
|
|
@@ -33776,7 +33776,7 @@ void main() {
|
|
|
33776
33776
|
return Q;
|
|
33777
33777
|
}, this.vectorToScreenXY = (B) => {
|
|
33778
33778
|
B.project(this.camera);
|
|
33779
|
-
var $ = W(), Q =
|
|
33779
|
+
var $ = W(), Q = K(), F = $ / 2, U = Q / 2;
|
|
33780
33780
|
return B.x = B.x * F + F, B.y = -(B.y * U) + U, B;
|
|
33781
33781
|
}, this.getObjectsScreenXY = (B) => {
|
|
33782
33782
|
if (B && 0 < B.length) {
|
|
@@ -33822,22 +33822,22 @@ void main() {
|
|
|
33822
33822
|
A != null && A.setMorphTime(B, N), b.setMorphTime(B, !0);
|
|
33823
33823
|
}, this.isTimeVarying = () => !!(A && A.video && !A.video.error) || b.isTimeVarying(), this.renderGeometries = (B, $, Q) => {
|
|
33824
33824
|
var F = {};
|
|
33825
|
-
if (F.camera = D, F.displayMarkers = this.displayMarkers, F.markerCluster = k, F.markersList = k.markers, F.ndcToBeUpdated = !1, Q && (F.markerCluster.markerUpdateRequired = !0), !A) P.toBeDownloaded == 0 ? (F.ndcToBeUpdated = D.update($), F.ndcToBeUpdated && D.calculateHeightPerPixelAtZeroDepth(
|
|
33825
|
+
if (F.camera = D, F.displayMarkers = this.displayMarkers, F.markerCluster = k, F.markersList = k.markers, F.ndcToBeUpdated = !1, Q && (F.markerCluster.markerUpdateRequired = !0), !A) P.toBeDownloaded == 0 ? (F.ndcToBeUpdated = D.update($), F.ndcToBeUpdated && D.calculateHeightPerPixelAtZeroDepth(K()), b.renderGeometries(B, $, Q, D, F, !0)) : D.update(0);
|
|
33826
33826
|
else if (A.isReadyToPlay()) {
|
|
33827
33827
|
Q ? A.video.play() : A.video.pause();
|
|
33828
33828
|
var U = A.video.currentTime / A.getVideoDuration() * N;
|
|
33829
|
-
P.toBeDownloaded == 0 ? (D.setTime(U), F.ndcToBeUpdated = D.update(0), F.ndcToBeUpdated && D.calculateHeightPerPixelAtZeroDepth(
|
|
33829
|
+
P.toBeDownloaded == 0 ? (D.setTime(U), F.ndcToBeUpdated = D.update(0), F.ndcToBeUpdated && D.calculateHeightPerPixelAtZeroDepth(K()), b.setMorphTime(U, !0), b.renderGeometries(0, 0, Q, D, F, !0)) : D.update(0);
|
|
33830
33830
|
} else myPlayRate = 0;
|
|
33831
33831
|
}, this.getThreeJSScene = () => O, this.setVideoHandler = (B) => {
|
|
33832
33832
|
A || (A = B);
|
|
33833
33833
|
}, this.setAdditionalScenesGroup = (B) => {
|
|
33834
33834
|
O.add(B);
|
|
33835
33835
|
};
|
|
33836
|
-
var
|
|
33836
|
+
var q = (B, $, Q, F, U, oe, le) => {
|
|
33837
33837
|
var ue = 0, ve = 0;
|
|
33838
33838
|
return ve = B.includes("top") ? le - U - Q : B.includes("bottom") ? Q : Math.floor((le - U) / 2), ue = B.includes("left") ? $ : B.includes("right") ? oe - $ - F : Math.floor((oe - F) / 2), { x: ue, y: ve };
|
|
33839
33839
|
}, ie = (B) => {
|
|
33840
|
-
this.displayMinimap === !0 && (B.setScissorTest(!0), B.getSize(re), this.minimapScissor.updateRequired && (H =
|
|
33840
|
+
this.displayMinimap === !0 && (B.setScissorTest(!0), B.getSize(re), this.minimapScissor.updateRequired && (H = q(this.minimapScissor.align, this.minimapScissor.x_offset, this.minimapScissor.y_offset, this.minimapScissor.width, this.minimapScissor.height, re.x, re.y), this.minimapScissor.updateRequired = !1), B.setScissor(H.x, H.y, this.minimapScissor.width, this.minimapScissor.height), B.setViewport(H.x, H.y, this.minimapScissor.width, this.minimapScissor.height), T.updateCamera(), O.add(T.mask), B.render(O, T.camera), O.remove(T.mask), B.setScissorTest(!1), B.setViewport(0, 0, re.x, re.y));
|
|
33841
33841
|
};
|
|
33842
33842
|
this.render = (B) => {
|
|
33843
33843
|
this.autoClearFlag && B.clear(), z && V ? V.render(O, this.camera) : (B.render(O, this.camera), ie(B));
|
|
@@ -33846,7 +33846,7 @@ void main() {
|
|
|
33846
33846
|
}, this.getZincCameraControls = () => D, this.getThreeJSScene = () => O, this.setDuration = (B) => {
|
|
33847
33847
|
b.setDuration(B), N = B, D.setPathDuration(B), P.duration = B;
|
|
33848
33848
|
}, this.getDuration = () => N, this.setStereoEffectEnable = (B) => {
|
|
33849
|
-
B != !0 || V || (V = new c(43).StereoEffect(S)), S.setSize(W(),
|
|
33849
|
+
B != !0 || V || (V = new c(43).StereoEffect(S)), S.setSize(W(), K()), this.camera.updateProjectionMatrix(), z = B;
|
|
33850
33850
|
}, this.objectIsInScene = (B) => b.objectIsInRegion(B, !0), this.alignBoundingBoxToCameraView = (B, $) => {
|
|
33851
33851
|
if (B) {
|
|
33852
33852
|
var Q = new l.Vector3();
|
|
@@ -34094,8 +34094,8 @@ void main() {
|
|
|
34094
34094
|
var v = !1, m = !1, w = new p();
|
|
34095
34095
|
this.getDownloadProgress = () => {
|
|
34096
34096
|
var j = 0, k = 0, W = !1;
|
|
34097
|
-
for (var
|
|
34098
|
-
var ee = this.progressMap[
|
|
34097
|
+
for (var K in this.progressMap) {
|
|
34098
|
+
var ee = this.progressMap[K];
|
|
34099
34099
|
j += ee[1], k += ee[0], ee[1] == 0 && (W = !0);
|
|
34100
34100
|
}
|
|
34101
34101
|
return W && (j = 0), [j, k, m];
|
|
@@ -34108,13 +34108,13 @@ void main() {
|
|
|
34108
34108
|
var W = k.Default;
|
|
34109
34109
|
if (k.Inline) y.setupMultipleViews(W, k.Entries);
|
|
34110
34110
|
else {
|
|
34111
|
-
var
|
|
34112
|
-
j && (newURL = h(ie, j),
|
|
34111
|
+
var K = [], ee = function(te) {
|
|
34112
|
+
j && (newURL = h(ie, j), K.push(new Promise((B, $) => {
|
|
34113
34113
|
fetch(newURL).then((Q) => Q.json()).then((Q) => B({ key: te, data: Q })).catch((Q) => $(Q));
|
|
34114
34114
|
})));
|
|
34115
34115
|
};
|
|
34116
|
-
for (var [
|
|
34117
|
-
Promise.all(
|
|
34116
|
+
for (var [q, ie] of Object.entries(k.Entries)) ee(q);
|
|
34117
|
+
Promise.all(K).then((Y) => {
|
|
34118
34118
|
var te = {};
|
|
34119
34119
|
Y.forEach(($) => {
|
|
34120
34120
|
te[$.key] = $.data;
|
|
@@ -34133,159 +34133,158 @@ void main() {
|
|
|
34133
34133
|
y.setupMultipleViews("default", { default: ee }), y.resetView(), v = !0, --this.toBeDownloaded, k != null && typeof k == "function" && k();
|
|
34134
34134
|
} else this.onError();
|
|
34135
34135
|
};
|
|
34136
|
-
var
|
|
34137
|
-
W.open("GET",
|
|
34138
|
-
}, this.loadModelsURL = (j, k, W,
|
|
34136
|
+
var K = d(j);
|
|
34137
|
+
W.open("GET", K, !0), W.send();
|
|
34138
|
+
}, this.loadModelsURL = (j, k, W, K, ee, q, ie) => {
|
|
34139
34139
|
var Y = k.length;
|
|
34140
34140
|
this.toBeDownloaded += Y;
|
|
34141
34141
|
for (var te = 0; te < Y; te++) {
|
|
34142
34142
|
var B = k[te], $ = c(0).defaultMaterialColor, Q = c(0).defaultOpacity;
|
|
34143
|
-
W != null && W[te] != null && ($ = !!W[te]),
|
|
34143
|
+
W != null && W[te] != null && ($ = !!W[te]), K != null && K[te] != null && (Q = K[te]);
|
|
34144
34144
|
var F = 0;
|
|
34145
34145
|
ee != null && ee[te] != null && (F = !!ee[te]);
|
|
34146
34146
|
var U = 0;
|
|
34147
|
-
|
|
34147
|
+
q != null && q[te] != null && (U = !!q[te]), w.load(d(B), L(j, $, Q, F, U, void 0, void 0, void 0, void 0, ie), this.onProgress(B), this.onError(ie));
|
|
34148
34148
|
}
|
|
34149
34149
|
}, this.loadFromViewURL = (j, k, W) => {
|
|
34150
|
-
var
|
|
34151
|
-
|
|
34152
|
-
if (
|
|
34153
|
-
var
|
|
34154
|
-
y.loadView(
|
|
34155
|
-
for (var ie, Y = [], te = k + "_", B = 0; B <
|
|
34156
|
-
this.loadModelsURL(j, Y,
|
|
34150
|
+
var K = new XMLHttpRequest();
|
|
34151
|
+
K.onreadystatechange = () => {
|
|
34152
|
+
if (K.readyState == 4 && K.status == 200) {
|
|
34153
|
+
var q = JSON.parse(K.responseText);
|
|
34154
|
+
y.loadView(q);
|
|
34155
|
+
for (var ie, Y = [], te = k + "_", B = 0; B < q.numberOfResources; B++) ie = te + (B + 1) + ".json", Y.push(ie);
|
|
34156
|
+
this.loadModelsURL(j, Y, q.colour, q.opacity, q.timeEnabled, q.morphColour, W);
|
|
34157
34157
|
}
|
|
34158
34158
|
};
|
|
34159
34159
|
var ee = d(k + "_view.json");
|
|
34160
|
-
|
|
34160
|
+
K.open("GET", ee, !0), K.send();
|
|
34161
34161
|
};
|
|
34162
|
-
var S = (j, k, W,
|
|
34162
|
+
var S = (j, k, W, K, ee, q, ie, Y) => (te, B) => {
|
|
34163
34163
|
var $ = new (c(24)).Lines(), Q = void 0;
|
|
34164
34164
|
B && B[0] && (Q = new l.LineBasicMaterial({ color: B[0].color.clone() }), 1 > B[0].opacity && (Q.transparent = !0), Q.opacity = B[0].opacity, Q.morphTargets = k, Q.vertexColors = B[0].vertexColors);
|
|
34165
34165
|
var F = { localTimeEnabled: k, localMorphColour: W };
|
|
34166
|
-
if ($ && ($.createLineSegment(te, Q, F), $.setName(
|
|
34166
|
+
if ($ && ($.createLineSegment(te, Q, F), $.setName(K), $.anatomicalId = ee, $.setRenderOrder(q), j.addZincObject($), $.setDuration(y.getDuration()), ie && ie.levels)) for (var [U, oe] of Object.entries(ie.levels)) $.addLOD(w, U, oe.URL, oe.Index, ie.preload);
|
|
34167
34167
|
--this.toBeDownloaded, te.dispose(), Y != null && typeof Y == "function" && Y($);
|
|
34168
34168
|
};
|
|
34169
|
-
this.loadLinesURL = (j, k, W,
|
|
34169
|
+
this.loadLinesURL = (j, k, W, K, ee, q, ie) => {
|
|
34170
34170
|
var Y = 0;
|
|
34171
34171
|
this.toBeDownloaded += 1;
|
|
34172
34172
|
var te = !!(ie && ie.isInline) && ie.isInline, B = ie && ie.anatomicalId ? ie.anatomicalId : void 0, $ = ie && ie.renderOrder ? ie.renderOrder : void 0;
|
|
34173
34173
|
W != null && (Y = !!W);
|
|
34174
34174
|
var Q = 0;
|
|
34175
|
-
if (
|
|
34175
|
+
if (K != null && (Q = !!K), te) {
|
|
34176
34176
|
var F = w.parse(k);
|
|
34177
|
-
S(j, Y, Q, ee, B, $, ie.lod,
|
|
34178
|
-
} else w.load(k, S(j, Y, Q, ee, B, $, ie.lod,
|
|
34177
|
+
S(j, Y, Q, ee, B, $, ie.lod, q)(F.geometry, F.materials);
|
|
34178
|
+
} else w.load(k, S(j, Y, Q, ee, B, $, ie.lod, q), this.onProgress(k), this.onError(q), ie.loaderOptions);
|
|
34179
34179
|
};
|
|
34180
|
-
var M = (j, k, W,
|
|
34181
|
-
var ie =
|
|
34182
|
-
$.setDuration(y.getDuration()), $.groupName =
|
|
34180
|
+
var M = (j, k, W, K, ee, q) => {
|
|
34181
|
+
var ie = q && q.isInline ? q.isInline : void 0, Y = q && q.anatomicalId ? q.anatomicalId : void 0, te = q && q.displayLabels ? q.displayLabels : void 0, B = q && q.renderOrder ? q.renderOrder : void 0, $ = new (c(18)).Glyphset();
|
|
34182
|
+
$.setDuration(y.getDuration()), $.groupName = K;
|
|
34183
34183
|
var Q = () => {
|
|
34184
34184
|
--this.toBeDownloaded, ee != null && typeof ee == "function" && ee($);
|
|
34185
34185
|
};
|
|
34186
34186
|
++this.toBeDownloaded, ie ? $.load(k, W, Q, ie, te) : $.load(k, d(W), Q, ie, te), $.anatomicalId = Y, $.setRenderOrder(B), j.addZincObject($);
|
|
34187
|
-
}, x = (j, k, W,
|
|
34187
|
+
}, x = (j, k, W, K, ee, q) => () => {
|
|
34188
34188
|
if (k.readyState == 4 && k.status == 200) {
|
|
34189
34189
|
var ie = JSON.parse(k.responseText);
|
|
34190
|
-
M(j, ie, W,
|
|
34190
|
+
M(j, ie, W, K, ee, q);
|
|
34191
34191
|
}
|
|
34192
|
-
}, A = (j, k, W,
|
|
34192
|
+
}, A = (j, k, W, K, ee, q, ie) => (Y, te) => {
|
|
34193
34193
|
var B = new (c(22)).Pointset(), $ = new l.PointsMaterial({ alphaTest: 0.5, size: 10, sizeAttenuation: !1 });
|
|
34194
34194
|
te && te[0] && (1 > te[0].opacity && ($.transparent = !0), $.opacity = te[0].opacity, $.color = te[0].color, $.morphTargets = k, $.vertexColors = te[0].vertexColors);
|
|
34195
34195
|
var Q = {};
|
|
34196
|
-
Q.localTimeEnabled = k, Q.localMorphColour = W, B && (B.createMesh(Y, $, Q), B.setName(
|
|
34196
|
+
Q.localTimeEnabled = k, Q.localMorphColour = W, B && (B.createMesh(Y, $, Q), B.setName(K), B.anatomicalId = ee, j.addZincObject(B), B.setDuration(y.getDuration()), B.setRenderOrder(q)), Y.dispose(), --this.toBeDownloaded, ie != null && typeof ie == "function" && ie(B);
|
|
34197
34197
|
};
|
|
34198
|
-
this.loadSTL = (j, k, W,
|
|
34198
|
+
this.loadSTL = (j, k, W, K) => {
|
|
34199
34199
|
this.toBeDownloaded += 1;
|
|
34200
|
-
var ee = c(0).defaultMaterialColor,
|
|
34201
|
-
ie.crossOrigin = "Anonymous", ie.load(d(k), L(j, ee,
|
|
34202
|
-
}, this.loadOBJ = (j, k, W,
|
|
34200
|
+
var ee = c(0).defaultMaterialColor, q = c(0).defaultOpacity, ie = new f();
|
|
34201
|
+
ie.crossOrigin = "Anonymous", ie.load(d(k), L(j, ee, q, !1, !1, W, void 0, void 0, void 0, K));
|
|
34202
|
+
}, this.loadOBJ = (j, k, W, K) => {
|
|
34203
34203
|
this.toBeDownloaded += 1;
|
|
34204
|
-
var ee = c(0).defaultMaterialColor,
|
|
34205
|
-
ie.crossOrigin = "Anonymous", ie.load(d(k), L(j, ee,
|
|
34204
|
+
var ee = c(0).defaultMaterialColor, q = c(0).defaultOpacity, ie = new g();
|
|
34205
|
+
ie.crossOrigin = "Anonymous", ie.load(d(k), L(j, ee, q, !1, !1, W, void 0, void 0, void 0, K));
|
|
34206
34206
|
};
|
|
34207
|
-
var P = (j, k, W,
|
|
34207
|
+
var P = (j, k, W, K, ee, q, ie) => {
|
|
34208
34208
|
this.toBeDownloaded += 1;
|
|
34209
34209
|
var Y = c(0).defaultMaterialColor, te = c(0).defaultOpacity, B = 0, $ = !!(ie && ie.isInline) && ie.isInline, Q = ie && ie.fileFormat ? ie.fileFormat : void 0, F = ie && ie.anatomicalId ? ie.anatomicalId : void 0, U = ie && ie.renderOrder ? ie.renderOrder : void 0;
|
|
34210
34210
|
W != null && (B = !!W);
|
|
34211
34211
|
var oe = 0;
|
|
34212
|
-
|
|
34212
|
+
K != null && (oe = !!K);
|
|
34213
34213
|
var le = w;
|
|
34214
34214
|
if (Q !== void 0) {
|
|
34215
34215
|
if (Q == "STL") le = new f();
|
|
34216
|
-
else if (Q == "OBJ") return le = new g(), le.crossOrigin = "Anonymous", void le.load(k, objloader(j, Y, te, B, oe, ee, F,
|
|
34216
|
+
else if (Q == "OBJ") return le = new g(), le.crossOrigin = "Anonymous", void le.load(k, objloader(j, Y, te, B, oe, ee, F, q), this.onProgress(k), this.onError, ie.loaderOptions);
|
|
34217
34217
|
}
|
|
34218
34218
|
if ($) {
|
|
34219
34219
|
var ue = w.parse(k);
|
|
34220
|
-
L(j, Y, te, B, oe, ee, F, U, ie,
|
|
34221
|
-
} else le.crossOrigin = "Anonymous", w.load(k, L(j, Y, te, B, oe, ee, F, U, ie,
|
|
34222
|
-
}, T = function(k, W,
|
|
34220
|
+
L(j, Y, te, B, oe, ee, F, U, ie, q)(ue.geometry, ue.materials);
|
|
34221
|
+
} else le.crossOrigin = "Anonymous", w.load(k, L(j, Y, te, B, oe, ee, F, U, ie, q), this.onProgress(k), this.onError(q), ie.loaderOptions);
|
|
34222
|
+
}, T = function(k, W, K) {
|
|
34223
34223
|
var ee = 0;
|
|
34224
|
-
return (
|
|
34225
|
-
if (++ee,
|
|
34226
|
-
|
|
34224
|
+
return (q) => {
|
|
34225
|
+
if (++ee, q && W != null && typeof W == "function" && W(q), ee == k && (v == !1 && y.viewAll(), K != null && typeof K == "function")) {
|
|
34226
|
+
K();
|
|
34227
34227
|
var ie = y.getZincCameraControls();
|
|
34228
34228
|
ie && ie.calculateMaxAllowedDistance(y);
|
|
34229
34229
|
}
|
|
34230
|
-
ee == k && (v == !1 && y.viewAll(), q != null && typeof q == "function" && q());
|
|
34231
34230
|
};
|
|
34232
34231
|
};
|
|
34233
|
-
this.loadPointsetURL = (j, k, W,
|
|
34232
|
+
this.loadPointsetURL = (j, k, W, K, ee, q, ie) => {
|
|
34234
34233
|
var Y = 0;
|
|
34235
34234
|
this.toBeDownloaded += 1, W != null && (Y = !!W);
|
|
34236
34235
|
var te = 0;
|
|
34237
|
-
|
|
34236
|
+
K != null && (te = !!K);
|
|
34238
34237
|
var B = !!(ie && ie.isInline) && ie.isInline, $ = ie && ie.anatomicalId ? ie.anatomicalId : void 0, Q = ie && ie.renderOrder ? ie.renderOrder : void 0;
|
|
34239
34238
|
if (B) {
|
|
34240
34239
|
var F = w.parse(k);
|
|
34241
|
-
A(j, Y, te, ee, $, Q,
|
|
34242
|
-
} else w.load(k, A(j, Y, te, ee, $, Q,
|
|
34240
|
+
A(j, Y, te, ee, $, Q, q)(F.geometry, F.materials);
|
|
34241
|
+
} else w.load(k, A(j, Y, te, ee, $, Q, q), this.onProgress(k), this.onError(q), ie.loaderOptions);
|
|
34243
34242
|
};
|
|
34244
|
-
var R = (j, k, W,
|
|
34245
|
-
var ie =
|
|
34243
|
+
var R = (j, k, W, K, ee, q) => {
|
|
34244
|
+
var ie = q && q.isInline ? q.isInline : void 0, Y = q && q.anatomicalId ? q.anatomicalId : void 0, te = q && q.renderOrder ? q.renderOrder : void 0, B = void 0;
|
|
34246
34245
|
if (W) {
|
|
34247
34246
|
if (k && W.images && W.images.source) for (var $, Q = W.images.source, F = 0; F < Q.length; F++) $ = h(Q[F], k), W.images.source[F] = $;
|
|
34248
34247
|
if (W.type === "slides" && (B = new (c(27)).TextureSlides()), B) {
|
|
34249
|
-
B.groupName =
|
|
34248
|
+
B.groupName = K;
|
|
34250
34249
|
var U = () => {
|
|
34251
34250
|
--this.toBeDownloaded, ee != null && typeof ee == "function" && ee(B);
|
|
34252
34251
|
};
|
|
34253
34252
|
++this.toBeDownloaded, B.load(W, U, ie), B.anatomicalId = Y, B.setRenderOrder(te), j.addZincObject(B);
|
|
34254
34253
|
}
|
|
34255
34254
|
}
|
|
34256
|
-
}, E = (j, k, W,
|
|
34255
|
+
}, E = (j, k, W, K, ee) => () => {
|
|
34257
34256
|
if (k.readyState == 4 && k.status == 200) {
|
|
34258
|
-
var
|
|
34259
|
-
R(j, k.responseURL,
|
|
34257
|
+
var q = JSON.parse(k.responseText);
|
|
34258
|
+
R(j, k.responseURL, q, W, K, ee);
|
|
34260
34259
|
}
|
|
34261
34260
|
};
|
|
34262
|
-
this.loadTextureURL = (j, k, W,
|
|
34263
|
-
var
|
|
34264
|
-
if (
|
|
34261
|
+
this.loadTextureURL = (j, k, W, K, ee) => {
|
|
34262
|
+
var q = !!(ee && ee.isInline) && ee.isInline;
|
|
34263
|
+
if (q) R(j, void 0, k, W, K, ee);
|
|
34265
34264
|
else {
|
|
34266
34265
|
var ie = new XMLHttpRequest();
|
|
34267
|
-
ie.onreadystatechange = E(j, ie, W,
|
|
34266
|
+
ie.onreadystatechange = E(j, ie, W, K, ee), ie.open("GET", d(k), !0), ie.send();
|
|
34268
34267
|
}
|
|
34269
|
-
}, this.loadGlyphsetURL = (j, k, W,
|
|
34270
|
-
var ie = !!(
|
|
34271
|
-
if (ie) M(j, k, W,
|
|
34268
|
+
}, this.loadGlyphsetURL = (j, k, W, K, ee, q) => {
|
|
34269
|
+
var ie = !!(q && q.isInline) && q.isInline;
|
|
34270
|
+
if (ie) M(j, k, W, K, ee, q);
|
|
34272
34271
|
else {
|
|
34273
34272
|
var Y = new XMLHttpRequest();
|
|
34274
|
-
Y.onreadystatechange = x(j, Y, W,
|
|
34273
|
+
Y.onreadystatechange = x(j, Y, W, K, ee, q), Y.open("GET", d(k), !0), Y.send();
|
|
34275
34274
|
}
|
|
34276
34275
|
};
|
|
34277
|
-
var C = (j, k, W,
|
|
34278
|
-
var B = { colour: W, opacity:
|
|
34276
|
+
var C = (j, k, W, K, ee, q, ie, Y, te) => {
|
|
34277
|
+
var B = { colour: W, opacity: K, localTimeEnabled: ee, localMorphColour: q }, $ = new (c(3)).Geometry();
|
|
34279
34278
|
return $.createMesh(k, Y, B), $.getMorph() ? ($.setName(te), j && j.addZincObject($), $.setDuration(y.getDuration()), $.videoHandler && y.setVideoHandler($.videoHandler), $) : void 0;
|
|
34280
|
-
}, L = (j, k, W,
|
|
34279
|
+
}, L = (j, k, W, K, ee, q, ie, Y, te, B) => ($, Q) => {
|
|
34281
34280
|
var F;
|
|
34282
34281
|
Q && Q[0] && (F = Q[0]);
|
|
34283
|
-
var U = C(j, $, k, W,
|
|
34282
|
+
var U = C(j, $, k, W, K, ee, void 0, F, q);
|
|
34284
34283
|
if (U.anatomicalId = ie, U.setRenderOrder(Y), te.lod && te.lod.levels) for (var [oe, le] of Object.entries(te.lod.levels)) U.addLOD(w, oe, le.URL, le.Index, te.lod.preload);
|
|
34285
34284
|
--this.toBeDownloaded, $.dispose(), B != null && typeof B == "function" && B(U);
|
|
34286
34285
|
}, O = (j) => {
|
|
34287
|
-
var k = /P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/, [, W,
|
|
34288
|
-
return { years: W, months:
|
|
34286
|
+
var k = /P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/, [, W, K, ee, q, ie, Y, te] = j.match(k);
|
|
34287
|
+
return { years: W, months: K, weeks: ee, days: q, hours: ie, mins: Y, secs: te };
|
|
34289
34288
|
};
|
|
34290
34289
|
this.loadSettings = (j) => {
|
|
34291
34290
|
if (j) {
|
|
@@ -34297,16 +34296,16 @@ void main() {
|
|
|
34297
34296
|
var W = O(j.OriginalDuration);
|
|
34298
34297
|
y.setOriginalDurationFromObject(W);
|
|
34299
34298
|
}
|
|
34300
|
-
if (j.TimeStamps) for (var
|
|
34301
|
-
var ee = O(j.TimeStamps[
|
|
34302
|
-
y.addMetadataTimeStamp(
|
|
34299
|
+
if (j.TimeStamps) for (var K in j.TimeStamps) {
|
|
34300
|
+
var ee = O(j.TimeStamps[K]);
|
|
34301
|
+
y.addMetadataTimeStamp(K, ee);
|
|
34303
34302
|
}
|
|
34304
34303
|
}
|
|
34305
34304
|
};
|
|
34306
|
-
var b = (j, k, W,
|
|
34305
|
+
var b = (j, k, W, K, ee) => {
|
|
34307
34306
|
if (W) {
|
|
34308
|
-
var
|
|
34309
|
-
W.URL ? (
|
|
34307
|
+
var q = void 0, ie = !1;
|
|
34308
|
+
W.URL ? (q = W.URL, k && (q = h(q, k))) : W.Inline && (q = W.Inline.URL, ie = !0);
|
|
34310
34309
|
var Y = {};
|
|
34311
34310
|
if (W.LOD && W.LOD.Levels) {
|
|
34312
34311
|
Y.preload = !!W.LOD.Preload, Y.levels = {};
|
|
@@ -34314,32 +34313,32 @@ void main() {
|
|
|
34314
34313
|
}
|
|
34315
34314
|
var $ = W.GroupName;
|
|
34316
34315
|
($ === void 0 || $ === "") && ($ = "_Unnamed");
|
|
34317
|
-
var Q = { loaderOptions: { index: W.Index }, isInline: ie, fileFormat: W.FileFormat, anatomicalId: W.AnatomicalId, compression: W.compression, lod: Y, renderOrder:
|
|
34316
|
+
var Q = { loaderOptions: { index: W.Index }, isInline: ie, fileFormat: W.FileFormat, anatomicalId: W.AnatomicalId, compression: W.compression, lod: Y, renderOrder: K };
|
|
34318
34317
|
switch (W.Type) {
|
|
34319
34318
|
case "Surfaces":
|
|
34320
|
-
P(j,
|
|
34319
|
+
P(j, q, W.MorphVertices, W.MorphColours, $, ee, Q);
|
|
34321
34320
|
break;
|
|
34322
34321
|
case "Glyph":
|
|
34323
34322
|
var F;
|
|
34324
|
-
ie ? F = W.Inline.GlyphGeometriesURL : (F = W.GlyphGeometriesURL, F = h(W.GlyphGeometriesURL, k)), W.DisplayLabels && (Q.displayLabels = !0), this.loadGlyphsetURL(j,
|
|
34323
|
+
ie ? F = W.Inline.GlyphGeometriesURL : (F = W.GlyphGeometriesURL, F = h(W.GlyphGeometriesURL, k)), W.DisplayLabels && (Q.displayLabels = !0), this.loadGlyphsetURL(j, q, F, $, ee, Q);
|
|
34325
34324
|
break;
|
|
34326
34325
|
case "Points":
|
|
34327
|
-
this.loadPointsetURL(j,
|
|
34326
|
+
this.loadPointsetURL(j, q, W.MorphVertices, W.MorphColours, $, ee, Q);
|
|
34328
34327
|
break;
|
|
34329
34328
|
case "Lines":
|
|
34330
|
-
this.loadLinesURL(j,
|
|
34329
|
+
this.loadLinesURL(j, q, W.MorphVertices, W.MorphColours, $, ee, Q);
|
|
34331
34330
|
break;
|
|
34332
34331
|
case "Texture":
|
|
34333
|
-
this.loadTextureURL(j,
|
|
34332
|
+
this.loadTextureURL(j, q, $, ee, Q);
|
|
34334
34333
|
break;
|
|
34335
34334
|
}
|
|
34336
34335
|
}
|
|
34337
34336
|
}, I = (j, k, W) => {
|
|
34338
34337
|
if (k) {
|
|
34339
|
-
var
|
|
34340
|
-
switch (k.URL ? (
|
|
34338
|
+
var K = void 0, ee = !1;
|
|
34339
|
+
switch (k.URL ? (K = k.URL, j && (K = h(k.URL, j))) : k.Inline && (K = k.Inline.URL, ee = !0), k.Type) {
|
|
34341
34340
|
case "View":
|
|
34342
|
-
ee ? (y.setupMultipleViews("default", { default:
|
|
34341
|
+
ee ? (y.setupMultipleViews("default", { default: K }), v = !0, W != null && typeof W == "function" && W()) : this.loadViewURL(K, W);
|
|
34343
34342
|
break;
|
|
34344
34343
|
case "Settings":
|
|
34345
34344
|
this.loadSettings(k);
|
|
@@ -34347,21 +34346,21 @@ void main() {
|
|
|
34347
34346
|
}
|
|
34348
34347
|
}
|
|
34349
34348
|
};
|
|
34350
|
-
this.loadGLTF = (j, k, W,
|
|
34351
|
-
var
|
|
34352
|
-
|
|
34349
|
+
this.loadGLTF = (j, k, W, K, ee) => {
|
|
34350
|
+
var q = new (c(39)).GLTFToZincJSLoader();
|
|
34351
|
+
q.load(y, j, k, W, K, ee);
|
|
34353
34352
|
};
|
|
34354
|
-
var N = (j, k, W,
|
|
34353
|
+
var N = (j, k, W, K) => {
|
|
34355
34354
|
if (W.Primitives && W.Primitives.forEach((Y) => {
|
|
34356
34355
|
var te = 1;
|
|
34357
|
-
Y.Order && (te = Y.Order), b(j, k, Y, te,
|
|
34358
|
-
}), W.Transformation && j.setTransformation(W.Transformation), W.Children) for (var [ee,
|
|
34356
|
+
Y.Order && (te = Y.Order), b(j, k, Y, te, K);
|
|
34357
|
+
}), W.Transformation && j.setTransformation(W.Transformation), W.Children) for (var [ee, q] of Object.entries(W.Children)) {
|
|
34359
34358
|
var ie = j.findOrCreateChildFromPath(ee);
|
|
34360
|
-
ie && N(ie, k,
|
|
34359
|
+
ie && N(ie, k, q, K);
|
|
34361
34360
|
}
|
|
34362
34361
|
}, D = (j, k) => {
|
|
34363
34362
|
if (Array.isArray(j)) {
|
|
34364
|
-
for (var W = 0,
|
|
34363
|
+
for (var W = 0, K = 0; K < j.length; K++) j[K].Type && (k && j[K].Type === "View" || j[K].Type === "Surfaces" || j[K].Type === "Glyph" || j[K].Type === "Points" || j[K].Type === "Lines" || j[K].Type === "Texture") && W++;
|
|
34365
34364
|
return W;
|
|
34366
34365
|
}
|
|
34367
34366
|
return 0;
|
|
@@ -34370,27 +34369,27 @@ void main() {
|
|
|
34370
34369
|
return j.Children && Object.values(j.Children).forEach((W) => {
|
|
34371
34370
|
k += z(W);
|
|
34372
34371
|
}), k;
|
|
34373
|
-
}, V = (j) => Array.isArray(j) ? D(j, !0) : typeof j == "object" && j !== null && j.Version === "2.0" ? z(j.Regions) : void 0, H = (j, k, W,
|
|
34374
|
-
var
|
|
34375
|
-
W.RegionPath && W.RegionPath !== "" && (
|
|
34376
|
-
}, X = (j, k, W,
|
|
34377
|
-
for (var
|
|
34372
|
+
}, V = (j) => Array.isArray(j) ? D(j, !0) : typeof j == "object" && j !== null && j.Version === "2.0" ? z(j.Regions) : void 0, H = (j, k, W, K, ee) => {
|
|
34373
|
+
var q = j;
|
|
34374
|
+
W.RegionPath && W.RegionPath !== "" && (q = j.findOrCreateChildFromPath(W.RegionPath)), b(q, k, W, 2 * K, ee);
|
|
34375
|
+
}, X = (j, k, W, K, ee) => {
|
|
34376
|
+
for (var q = V(k), ie = new T(q, K, ee), Y = 0; Y < k.length; Y++) I(W, k[Y], ie);
|
|
34378
34377
|
for (var te = 0; te < k.length; te++) H(j, W, k[te], te, ie);
|
|
34379
|
-
}, re = (j, k, W,
|
|
34380
|
-
var
|
|
34378
|
+
}, re = (j, k, W, K, ee) => {
|
|
34379
|
+
var q = V(k), ie = new T(q, K, ee);
|
|
34381
34380
|
k.Settings && this.loadSettings(k.Settings), k.Views && _(W, k.Views), k.Regions && N(j, W, k.Regions, ie);
|
|
34382
34381
|
};
|
|
34383
|
-
this.loadMetadataURL = (j, k, W,
|
|
34384
|
-
var ee = new XMLHttpRequest(),
|
|
34382
|
+
this.loadMetadataURL = (j, k, W, K) => {
|
|
34383
|
+
var ee = new XMLHttpRequest(), q = d(k);
|
|
34385
34384
|
ee.onreadystatechange = () => {
|
|
34386
34385
|
if (ee.readyState == 4 && ee.status == 200) {
|
|
34387
34386
|
y.resetMetadata(), y.resetDuration(), v = !1;
|
|
34388
34387
|
var ie = ee.responseURL;
|
|
34389
|
-
ie === void 0 && (ie = new URL(
|
|
34388
|
+
ie === void 0 && (ie = new URL(q).href);
|
|
34390
34389
|
var Y = JSON.parse(ee.responseText);
|
|
34391
|
-
Array.isArray(Y) ? X(j, Y, ie, W,
|
|
34390
|
+
Array.isArray(Y) ? X(j, Y, ie, W, K) : typeof Y == "object" && Y !== null && Y.Version == "2.0" && re(j, Y, ie, W, K);
|
|
34392
34391
|
}
|
|
34393
|
-
}, ee.open("GET",
|
|
34392
|
+
}, ee.open("GET", q, !0), ee.send();
|
|
34394
34393
|
};
|
|
34395
34394
|
};
|
|
34396
34395
|
},
|
|
@@ -34607,14 +34606,14 @@ void main() {
|
|
|
34607
34606
|
z.push(X);
|
|
34608
34607
|
}
|
|
34609
34608
|
for (var re = z[0], j = 1, k = z.length - 1; j < k; j++) {
|
|
34610
|
-
var W = z[j],
|
|
34611
|
-
x.addFace(re[0], W[0],
|
|
34609
|
+
var W = z[j], K = z[j + 1];
|
|
34610
|
+
x.addFace(re[0], W[0], K[0], re[1], W[1], K[1], re[2], W[2], K[2]);
|
|
34612
34611
|
}
|
|
34613
34612
|
} else if (T === "l") {
|
|
34614
|
-
var ee = P.substring(1).trim().split(" "),
|
|
34615
|
-
if (P.indexOf("/") === -1)
|
|
34616
|
-
else for (var Y, te = 0, B = ee.length; te < B; te++) Y = ee[te].split("/"), Y[0] !== "" &&
|
|
34617
|
-
x.addLineGeometry(
|
|
34613
|
+
var ee = P.substring(1).trim().split(" "), q = [], ie = [];
|
|
34614
|
+
if (P.indexOf("/") === -1) q = ee;
|
|
34615
|
+
else for (var Y, te = 0, B = ee.length; te < B; te++) Y = ee[te].split("/"), Y[0] !== "" && q.push(Y[0]), Y[1] !== "" && ie.push(Y[1]);
|
|
34616
|
+
x.addLineGeometry(q, ie);
|
|
34618
34617
|
} else if (T === "p") {
|
|
34619
34618
|
var $ = P.substr(1).trim(), Q = $.split(" ");
|
|
34620
34619
|
x.addPointGeometry(Q);
|
|
@@ -34981,15 +34980,15 @@ void main() {
|
|
|
34981
34980
|
if (0 < j.length && (V.extensionsUsed = j), V.buffers && 0 < V.buffers.length && (V.buffers[0].byteLength = re.size), H.binary === !0) {
|
|
34982
34981
|
var k = new window.FileReader();
|
|
34983
34982
|
k.readAsArrayBuffer(re), k.onloadend = function() {
|
|
34984
|
-
var
|
|
34985
|
-
ee.setUint32(0,
|
|
34986
|
-
var
|
|
34987
|
-
ie.setUint32(0,
|
|
34983
|
+
var K = P(k.result), ee = new DataView(new ArrayBuffer(v));
|
|
34984
|
+
ee.setUint32(0, K.byteLength, !0), ee.setUint32(4, w, !0);
|
|
34985
|
+
var q = P(S(JSON.stringify(V)), 32), ie = new DataView(new ArrayBuffer(v));
|
|
34986
|
+
ie.setUint32(0, q.byteLength, !0), ie.setUint32(4, m, !0);
|
|
34988
34987
|
var Y = new ArrayBuffer(p), te = new DataView(Y);
|
|
34989
34988
|
te.setUint32(0, u, !0), te.setUint32(4, y, !0);
|
|
34990
|
-
var B = p + ie.byteLength +
|
|
34989
|
+
var B = p + ie.byteLength + q.byteLength + ee.byteLength + K.byteLength;
|
|
34991
34990
|
te.setUint32(8, B, !0);
|
|
34992
|
-
var $ = new Blob([Y, ie,
|
|
34991
|
+
var $ = new Blob([Y, ie, q, ee, K], { type: "application/octet-stream" }), Q = new window.FileReader();
|
|
34993
34992
|
Q.readAsArrayBuffer($), Q.onloadend = function() {
|
|
34994
34993
|
I(Q.result);
|
|
34995
34994
|
};
|
|
@@ -34997,8 +34996,8 @@ void main() {
|
|
|
34997
34996
|
} else if (V.buffers && 0 < V.buffers.length) {
|
|
34998
34997
|
var W = new window.FileReader();
|
|
34999
34998
|
W.readAsDataURL(re), W.onloadend = function() {
|
|
35000
|
-
var
|
|
35001
|
-
V.buffers[0].uri =
|
|
34999
|
+
var K = W.result;
|
|
35000
|
+
V.buffers[0].uri = K, I(V);
|
|
35002
35001
|
};
|
|
35003
35002
|
} else I(V);
|
|
35004
35003
|
});
|
|
@@ -35091,11 +35090,11 @@ void main() {
|
|
|
35091
35090
|
processBufferView(b, I, N, D, z) {
|
|
35092
35091
|
var V = this.json;
|
|
35093
35092
|
V.bufferViews || (V.bufferViews = []);
|
|
35094
|
-
for (var H = I === h.UNSIGNED_BYTE ? 1 : I === h.UNSIGNED_SHORT ? 2 : 4, X = A(D * b.itemSize * H), re = new DataView(new ArrayBuffer(X)), j = 0, k = N; k < N + D; k++) for (var W,
|
|
35093
|
+
for (var H = I === h.UNSIGNED_BYTE ? 1 : I === h.UNSIGNED_SHORT ? 2 : 4, X = A(D * b.itemSize * H), re = new DataView(new ArrayBuffer(X)), j = 0, k = N; k < N + D; k++) for (var W, K = 0; K < b.itemSize; K++) W = void 0, 4 < b.itemSize ? W = b.array[k * b.itemSize + K] : K === 0 ? W = b.getX(k) : K === 1 ? W = b.getY(k) : K === 2 ? W = b.getZ(k) : K == 3 && (W = b.getW(k)), I === h.FLOAT ? re.setFloat32(j, W, !0) : I === h.UNSIGNED_INT ? re.setUint32(j, W, !0) : I === h.UNSIGNED_SHORT ? re.setUint16(j, W, !0) : I === h.UNSIGNED_BYTE && re.setUint8(j, W), j += H;
|
|
35095
35094
|
var ee = { buffer: this.processBuffer(re.buffer), byteOffset: this.byteOffset, byteLength: X };
|
|
35096
35095
|
z !== void 0 && (ee.target = z), z === h.ARRAY_BUFFER && (ee.byteStride = b.itemSize * H), this.byteOffset += X, V.bufferViews.push(ee);
|
|
35097
|
-
var
|
|
35098
|
-
return
|
|
35096
|
+
var q = { id: V.bufferViews.length - 1, byteLength: 0 };
|
|
35097
|
+
return q;
|
|
35099
35098
|
}
|
|
35100
35099
|
/**
|
|
35101
35100
|
* Process and generate a BufferView from an image Blob.
|
|
@@ -35134,8 +35133,8 @@ void main() {
|
|
|
35134
35133
|
if (D === 0) return null;
|
|
35135
35134
|
var j, k = x(b, N, D);
|
|
35136
35135
|
I !== void 0 && (j = b === I.index ? h.ELEMENT_ARRAY_BUFFER : h.ARRAY_BUFFER);
|
|
35137
|
-
var W = this.processBufferView(b, z, N, D, j),
|
|
35138
|
-
return b.normalized === !0 && (
|
|
35136
|
+
var W = this.processBufferView(b, z, N, D, j), K = { bufferView: W.id, byteOffset: W.byteOffset, componentType: z, count: D, max: k.max, min: k.min, type: { 1: "SCALAR", 2: "VEC2", 3: "VEC3", 4: "VEC4", 16: "MAT4" }[b.itemSize] };
|
|
35137
|
+
return b.normalized === !0 && (K.normalized = !0), H.accessors || (H.accessors = []), H.accessors.push(K) - 1;
|
|
35139
35138
|
}
|
|
35140
35139
|
/**
|
|
35141
35140
|
* Process image
|
|
@@ -35152,24 +35151,24 @@ void main() {
|
|
|
35152
35151
|
V.images || (V.images = []);
|
|
35153
35152
|
var W = { mimeType: j };
|
|
35154
35153
|
if (H.embedImages) {
|
|
35155
|
-
var
|
|
35156
|
-
|
|
35157
|
-
var ee =
|
|
35158
|
-
if (N === !0 && (ee.translate(0,
|
|
35154
|
+
var K = T = T || document.createElement("canvas");
|
|
35155
|
+
K.width = Math.min(b.width, H.maxTextureSize), K.height = Math.min(b.height, H.maxTextureSize);
|
|
35156
|
+
var ee = K.getContext("2d");
|
|
35157
|
+
if (N === !0 && (ee.translate(0, K.height), ee.scale(1, -1)), typeof HTMLImageElement < "u" && b instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && b instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && b instanceof OffscreenCanvas || typeof ImageBitmap < "u" && b instanceof ImageBitmap) ee.drawImage(b, 0, 0, K.width, K.height);
|
|
35159
35158
|
else {
|
|
35160
35159
|
I !== l.RGBAFormat && I !== l.RGBFormat && console.error("GLTFExporter: Only RGB and RGBA formats are supported."), (b.width > H.maxTextureSize || b.height > H.maxTextureSize) && console.warn("GLTFExporter: Image size is bigger than maxTextureSize", b);
|
|
35161
|
-
var
|
|
35162
|
-
if (I === l.RGBAFormat) for (var ie = 0; ie <
|
|
35163
|
-
else for (var Y = 0, te = 0; Y <
|
|
35164
|
-
ee.putImageData(new ImageData(
|
|
35160
|
+
var q = new Uint8ClampedArray(4 * (b.height * b.width));
|
|
35161
|
+
if (I === l.RGBAFormat) for (var ie = 0; ie < q.length; ie += 4) q[ie + 0] = b.data[ie + 0], q[ie + 1] = b.data[ie + 1], q[ie + 2] = b.data[ie + 2], q[ie + 3] = b.data[ie + 3];
|
|
35162
|
+
else for (var Y = 0, te = 0; Y < q.length; Y += 4, te += 3) q[Y + 0] = b.data[te + 0], q[Y + 1] = b.data[te + 1], q[Y + 2] = b.data[te + 2], q[Y + 3] = 255;
|
|
35163
|
+
ee.putImageData(new ImageData(q, b.width, b.height), 0, 0);
|
|
35165
35164
|
}
|
|
35166
35165
|
H.binary === !0 ? X.push(new Promise(function($) {
|
|
35167
|
-
|
|
35166
|
+
K.toBlob(function(Q) {
|
|
35168
35167
|
D.processBufferViewImage(Q).then(function(F) {
|
|
35169
35168
|
W.bufferView = F, $();
|
|
35170
35169
|
});
|
|
35171
35170
|
}, j);
|
|
35172
|
-
})) : W.uri =
|
|
35171
|
+
})) : W.uri = K.toDataURL(j);
|
|
35173
35172
|
} else W.uri = b.src;
|
|
35174
35173
|
var B = V.images.push(W) - 1;
|
|
35175
35174
|
return re[k] = B, B;
|
|
@@ -35240,8 +35239,8 @@ void main() {
|
|
|
35240
35239
|
b.transparent ? D.alphaMode = "BLEND" : 0 < b.alphaTest && (D.alphaMode = "MASK", D.alphaCutoff = b.alphaTest), b.side === l.DoubleSide && (D.doubleSided = !0), b.name !== "" && (D.name = b.name), this.serializeUserData(b, D), this._invokeAll(function(ee) {
|
|
35241
35240
|
ee.writeMaterial && ee.writeMaterial(b, D);
|
|
35242
35241
|
});
|
|
35243
|
-
var
|
|
35244
|
-
return I.materials.set(b,
|
|
35242
|
+
var K = N.materials.push(D) - 1;
|
|
35243
|
+
return I.materials.set(b, K), K;
|
|
35245
35244
|
}
|
|
35246
35245
|
/**
|
|
35247
35246
|
* Process mesh
|
|
@@ -35256,8 +35255,8 @@ void main() {
|
|
|
35256
35255
|
if (I.meshes.has(H)) return I.meshes.get(H);
|
|
35257
35256
|
var X, re = b.geometry;
|
|
35258
35257
|
if (X = b.isLineSegments ? h.LINES : b.isLineLoop ? h.LINE_LOOP : b.isLine ? h.LINE_STRIP : b.isPoints ? h.POINTS : b.material.wireframe ? h.LINES : h.TRIANGLES, re.isBufferGeometry !== !0) throw new Error("THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.");
|
|
35259
|
-
var j = {}, k = {}, W = [],
|
|
35260
|
-
|
|
35258
|
+
var j = {}, k = {}, W = [], K = [], ee = { uv: "TEXCOORD_0", uv2: "TEXCOORD_1", color: "COLOR_0", skinWeight: "WEIGHTS_0", skinIndex: "JOINTS_0" }, q = re.getAttribute("normal");
|
|
35259
|
+
q === void 0 || this.isNormalizedNormalAttribute(q) || (console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."), re.setAttribute("normal", this.createNormalizedNormalAttribute(q)));
|
|
35261
35260
|
var ie = null;
|
|
35262
35261
|
for (var Y in re.attributes)
|
|
35263
35262
|
if (Y.substr(0, 5) !== "morph") {
|
|
@@ -35274,7 +35273,7 @@ void main() {
|
|
|
35274
35273
|
var Q = this.processAccessor(ie || te, re);
|
|
35275
35274
|
Q !== null && (k[Y] = Q, I.attributes.set(this.getUID(te), Q));
|
|
35276
35275
|
}
|
|
35277
|
-
if (
|
|
35276
|
+
if (q !== void 0 && re.setAttribute("normal", q), Object.keys(k).length === 0) return null;
|
|
35278
35277
|
if (b.morphTargetInfluences !== void 0 && 0 < b.morphTargetInfluences.length) {
|
|
35279
35278
|
var F = [], U = [], oe = {};
|
|
35280
35279
|
if (b.morphTargetDictionary !== void 0) for (var le in b.morphTargetDictionary) oe[b.morphTargetDictionary[le]] = le;
|
|
@@ -35297,14 +35296,14 @@ void main() {
|
|
|
35297
35296
|
else for (var Ie = 0, et = pe.count; Ie < et; Ie++) Te.setXYZ(Ie, 0, 0, 0);
|
|
35298
35297
|
ve[Me] = this.processAccessor(Te, re), I.attributes.set(this.getUID(se), ve[Me]);
|
|
35299
35298
|
}
|
|
35300
|
-
|
|
35299
|
+
K.push(ve), F.push(b.morphTargetInfluences[ue]), b.morphTargetDictionary !== void 0 && U.push(oe[ue]);
|
|
35301
35300
|
}
|
|
35302
35301
|
j.weights = F, 0 < U.length && (j.extras = {}, j.extras.targetNames = U);
|
|
35303
35302
|
}
|
|
35304
35303
|
var mt = Array.isArray(b.material);
|
|
35305
35304
|
if (mt && re.groups.length === 0) return null;
|
|
35306
35305
|
for (var ke, bt = mt ? b.material : [b.material], ze = mt ? re.groups : [{ materialIndex: 0, start: void 0, count: void 0 }], at = 0, tt = ze.length; at < tt; at++) {
|
|
35307
|
-
if (ke = { mode: X, attributes: k }, this.serializeUserData(re, ke), 0 <
|
|
35306
|
+
if (ke = { mode: X, attributes: k }, this.serializeUserData(re, ke), 0 < K.length && (ke.targets = K), re.index !== null) {
|
|
35308
35307
|
var yt = this.getUID(re.index);
|
|
35309
35308
|
(ze[at].start !== void 0 || ze[at].count !== void 0) && (yt += ":" + ze[at].start + ":" + ze[at].count), I.attributes.has(yt) ? ke.indices = I.attributes.get(yt) : (ke.indices = this.processAccessor(re.index, re, ze[at].start, ze[at].count), I.attributes.set(yt, ke.indices)), ke.indices === null && delete ke.indices;
|
|
35310
35309
|
}
|
|
@@ -35344,10 +35343,10 @@ void main() {
|
|
|
35344
35343
|
for (var z = b.tracks, V = [], H = [], X = 0; X < z.length; ++X) {
|
|
35345
35344
|
var re = z[X], j = l.PropertyBinding.parseTrackName(re.name), k = l.PropertyBinding.findNode(I, j.nodeName), W = g[j.propertyName];
|
|
35346
35345
|
if (j.objectName === "bones" && (k.isSkinnedMesh === !0 ? k = k.skeleton.getBoneByName(j.objectIndex) : k = void 0), !k || !W) return console.warn('THREE.GLTFExporter: Could not export animation track "%s".', re.name), null;
|
|
35347
|
-
var
|
|
35346
|
+
var K = 1, ee = re.values.length / re.times.length;
|
|
35348
35347
|
W === g.morphTargetInfluences && (ee /= k.morphTargetInfluences.length);
|
|
35349
|
-
var
|
|
35350
|
-
re.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (
|
|
35348
|
+
var q = void 0;
|
|
35349
|
+
re.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (q = "CUBICSPLINE", ee /= 3) : re.getInterpolation() === l.InterpolateDiscrete ? q = "STEP" : q = "LINEAR", H.push({ input: this.processAccessor(new l.BufferAttribute(re.times, K)), output: this.processAccessor(new l.BufferAttribute(re.values, ee)), interpolation: q }), V.push({ sampler: H.length - 1, target: { node: D.get(k), path: W } });
|
|
35351
35350
|
}
|
|
35352
35351
|
return N.animations.push({ name: b.name || "clip_" + N.animations.length, samplers: H, channels: V }), N.animations.length - 1;
|
|
35353
35352
|
}
|
|
@@ -35383,7 +35382,7 @@ void main() {
|
|
|
35383
35382
|
re !== null && (z.mesh = re);
|
|
35384
35383
|
} else b.isCamera && (z.camera = this.processCamera(b));
|
|
35385
35384
|
if (b.isSkinnedMesh && this.skins.push(b), 0 < b.children.length) {
|
|
35386
|
-
for (var j, k = [], W = 0,
|
|
35385
|
+
for (var j, k = [], W = 0, K = b.children.length; W < K; W++) if (j = b.children[W], j.visible || N.onlyVisible === !1) {
|
|
35387
35386
|
var ee = this.processNode(j);
|
|
35388
35387
|
ee !== null && k.push(ee);
|
|
35389
35388
|
}
|
|
@@ -35392,8 +35391,8 @@ void main() {
|
|
|
35392
35391
|
this._invokeAll(function(ie) {
|
|
35393
35392
|
ie.writeNode && ie.writeNode(b, z);
|
|
35394
35393
|
});
|
|
35395
|
-
var
|
|
35396
|
-
return D.set(b,
|
|
35394
|
+
var q = I.nodes.push(z) - 1;
|
|
35395
|
+
return D.set(b, q), q;
|
|
35397
35396
|
}
|
|
35398
35397
|
/**
|
|
35399
35398
|
* Process Scene
|
|
@@ -35520,13 +35519,13 @@ void main() {
|
|
|
35520
35519
|
var W = void 0;
|
|
35521
35520
|
if (D[re.uuid] === void 0) {
|
|
35522
35521
|
W = H.clone();
|
|
35523
|
-
for (var
|
|
35524
|
-
W.name = (X.nodeName || "") + ".morphTargetInfluences", W.values =
|
|
35522
|
+
for (var K = new W.ValueBufferType(j * W.times.length), ee = 0; ee < W.times.length; ee++) K[ee * j + k] = W.values[ee];
|
|
35523
|
+
W.name = (X.nodeName || "") + ".morphTargetInfluences", W.values = K, D[re.uuid] = W, N.push(W);
|
|
35525
35524
|
continue;
|
|
35526
35525
|
}
|
|
35527
|
-
var
|
|
35526
|
+
var q = H.createInterpolant(new H.ValueBufferType(1));
|
|
35528
35527
|
W = D[re.uuid];
|
|
35529
|
-
for (var ie = 0; ie < W.times.length; ie++) W.values[ie * j + k] =
|
|
35528
|
+
for (var ie = 0; ie < W.times.length; ie++) W.values[ie * j + k] = q.evaluate(W.times[ie]);
|
|
35530
35529
|
for (var Y, te = 0; te < H.times.length; te++) Y = this.insertKeyframe(W, H.times[te]), W.values[Y * j + k] = H.values[te];
|
|
35531
35530
|
}
|
|
35532
35531
|
return b.tracks = N, b;
|
|
@@ -35545,37 +35544,37 @@ void main() {
|
|
|
35545
35544
|
}, f = function(S, M, x, A) {
|
|
35546
35545
|
var P = { NONE: -1, DEFAULT: 0, PATH: 1, SMOOTH_CAMERA_TRANSITION: 2, AUTO_TUMBLE: 3, ROTATE_TRANSITION: 4, MINIMAP: 5, SYNC_CONTROL: 6 }, T = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5, SCROLL: 6, KEYBOARD_ZOOM: 7, KEYBOARD_ROTATE: 8, KEYBOARD_PAN: 9 }, R = { NONE: -1, FREE: 1, HORIZONTAL: 2, VERTICAL: 3 }, E = { ARROWLEFT: 37, ARROWUP: 38, ARROWRIGHT: 39, ARROWDOWN: 40, NUMPADADD: 107, NUMPADSUBTRACT: 109, EQUAL: 187, MINUS: 189 }, C = {};
|
|
35547
35546
|
C.MAIN = T.ROTATE, C.AUXILIARY = T.ZOOM, C.SECONDARY = T.PAN, this.cameraObject = S, this.domElement = M === void 0 ? document : M, this.renderer = x, this.scene = A, this.tumble_rate = 1.5, this.pointer_x = 0, this.pointer_y = 0, this.pointer_x_start = 0, this.pointer_y_start = 0, this.previous_pointer_x = 0, this.previous_pointer_y = 0, this.near_plane_fly_debt = 0, this.touchZoomDistanceStart = 0, this.touchZoomDistanceEnd = 0, this.directionalLight = 0, this.zoomRate = 50, this.rotateRate = 50, this.panRate = 100, this.pixelHeight = 1;
|
|
35548
|
-
var L = 6e3, O = !0, b = 0, I = void 0, N = void 0, D = !1, z = 500, V = void 0, H = "default", X = P.DEFAULT, re = void 0, j = void 0, k = void 0, W = 0,
|
|
35547
|
+
var L = 6e3, O = !0, b = 0, I = void 0, N = void 0, D = !1, z = 500, V = void 0, H = "default", X = P.DEFAULT, re = void 0, j = void 0, k = void 0, W = 0, K = R.FREE;
|
|
35549
35548
|
this._state = T.NONE;
|
|
35550
35549
|
var ee;
|
|
35551
35550
|
this.targetTouchId = -1;
|
|
35552
|
-
var
|
|
35551
|
+
var q = void 0, ie = new l.Vector3(), Y = new l.Vector3(), te = new l.Vector3(), B = new l.Vector3(), $ = new l.Vector3(), Q = new l.Vector3(), F = new l.Vector3(), U = new l.Vector3(), oe = new l.Sphere(), le = new l.Vector3(), ue = !1, ve = void 0, _e = 0, we = { default: new h() };
|
|
35553
35552
|
we.default.nearPlane = 0.1, we.default.farPlane = 2e3, we.default.eyePosition = [0, 0, 0], we.default.targetPosition = [0, 0, -1], we.default.upVector = [0, 1, 0], this.cameraObject.target === void 0 && (this.cameraObject.target = new l.Vector3(...we.default.targetPosition)), this.calculateMaxAllowedDistance = (ne) => {
|
|
35554
35553
|
var Ee = ne.getBoundingBox();
|
|
35555
35554
|
if (Ee) {
|
|
35556
35555
|
Ee.getBoundingSphere(oe), _e = 6 * oe.radius;
|
|
35557
35556
|
var Ne = 0;
|
|
35558
|
-
this.cameraObject && (Ne = this.cameraObject.position.distanceTo(oe.center)), _e = Ne > _e ? Ne : _e;
|
|
35557
|
+
this.cameraObject && (Ne = this.cameraObject.position.distanceTo(oe.center)), _e = Ne > _e ? 1.5 * Ne : _e;
|
|
35559
35558
|
} else _e = 0;
|
|
35560
35559
|
}, this.addViewport = (ne, Ee) => {
|
|
35561
35560
|
ne && Ee && (we[ne] = Ee);
|
|
35562
35561
|
}, this.setDefaultViewport = (ne) => !!(ne && ne in we) && (H = ne, !0), this.getDefaultViewport = () => H, this.getViewportOfName = (ne) => we[ne], this.setCurrentViewport = (ne) => ne in we && (this.setCurrentCameraSettings(we[ne]), !0), this.setRotationMode = (ne) => {
|
|
35563
35562
|
switch (ne) {
|
|
35564
35563
|
case "none":
|
|
35565
|
-
|
|
35564
|
+
K = R.NONE;
|
|
35566
35565
|
break;
|
|
35567
35566
|
case "horizontal":
|
|
35568
|
-
|
|
35567
|
+
K = R.HORIZONTAL;
|
|
35569
35568
|
break;
|
|
35570
35569
|
case "vertical":
|
|
35571
|
-
|
|
35570
|
+
K = R.VERTICAL;
|
|
35572
35571
|
break;
|
|
35573
35572
|
case "free":
|
|
35574
35573
|
default:
|
|
35575
|
-
|
|
35574
|
+
K = R.FREE;
|
|
35576
35575
|
}
|
|
35577
35576
|
}, this.onResize = () => {
|
|
35578
|
-
|
|
35577
|
+
q && (q = void 0), ve && ve.setCurrentCameraSettings(this.cameraObject, we[H]);
|
|
35579
35578
|
}, this.getVisibleHeightAtZDepth = (ne) => {
|
|
35580
35579
|
var Ee = this.cameraObject.position.distanceTo(this.cameraObject.target);
|
|
35581
35580
|
ne < Ee ? ne -= Ee : ne += Ee;
|
|
@@ -35586,12 +35585,12 @@ void main() {
|
|
|
35586
35585
|
return this.pixelHeight = Ee / ne, this.pixelHeight;
|
|
35587
35586
|
}, this.getNDCFromDocumentCoords = (ne, Ee, Ne) => {
|
|
35588
35587
|
ze(!1);
|
|
35589
|
-
var $e = Ne || new l.Vector2(), lt = 2 * ((ne -
|
|
35588
|
+
var $e = Ne || new l.Vector2(), lt = 2 * ((ne - q.left) / q.width) - 1, Z = 2 * -((Ee - q.top) / q.height) + 1;
|
|
35590
35589
|
return $e.set(lt, Z);
|
|
35591
35590
|
}, this.getRelativeCoordsFromNDC = (ne, Ee, Ne) => {
|
|
35592
35591
|
ze(!1);
|
|
35593
35592
|
var $e = Ne || new l.Vector2();
|
|
35594
|
-
return $e.x = (ne + 1) *
|
|
35593
|
+
return $e.x = (ne + 1) * q.width / 2, $e.y = (1 - Ee) * q.height / 2, $e;
|
|
35595
35594
|
}, this.setMouseButtonAction = (ne, Ee) => {
|
|
35596
35595
|
C[ne] = T[Ee];
|
|
35597
35596
|
};
|
|
@@ -35608,14 +35607,14 @@ void main() {
|
|
|
35608
35607
|
}, Te = (ne) => {
|
|
35609
35608
|
ze(!1);
|
|
35610
35609
|
var Ee;
|
|
35611
|
-
if (X === P.DEFAULT && (Ee = this.scene.getNormalisedMinimapCoordinates(this.renderer, ne)), !Ee) ne.button == 0 ? ne.ctrlKey ? this._state = C.AUXILIARY : ne.shiftKey ? this._state = C.SECONDARY : this._state = C.MAIN : ne.button == 1 ? (ne.preventDefault(), this._state = C.AUXILIARY) : ne.button == 2 && (this._state = C.SECONDARY), this.pointer_x = ne.clientX -
|
|
35610
|
+
if (X === P.DEFAULT && (Ee = this.scene.getNormalisedMinimapCoordinates(this.renderer, ne)), !Ee) ne.button == 0 ? ne.ctrlKey ? this._state = C.AUXILIARY : ne.shiftKey ? this._state = C.SECONDARY : this._state = C.MAIN : ne.button == 1 ? (ne.preventDefault(), this._state = C.AUXILIARY) : ne.button == 2 && (this._state = C.SECONDARY), this.pointer_x = ne.clientX - q.left, this.pointer_y = ne.clientY - q.top, this.pointer_x_start = this.pointer_x, this.pointer_y_start = this.pointer_y, this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y;
|
|
35612
35611
|
else {
|
|
35613
35612
|
X = P.MINIMAP;
|
|
35614
35613
|
var Ne = this.scene.getMinimapDiffFromNormalised(Ee.x, Ee.y);
|
|
35615
35614
|
se(Ne);
|
|
35616
35615
|
}
|
|
35617
35616
|
}, ye = (ne) => {
|
|
35618
|
-
if (ze(!1),
|
|
35617
|
+
if (ze(!1), q) if (this.pointer_x = ne.clientX - q.left, this.pointer_y = ne.clientY - q.top, X === P.MINIMAP) {
|
|
35619
35618
|
var Ee = this.scene.getNormalisedMinimapCoordinates(this.renderer, ne);
|
|
35620
35619
|
if (Ee) {
|
|
35621
35620
|
var Ne = this.scene.getMinimapDiffFromNormalised(Ee.x, Ee.y);
|
|
@@ -35623,7 +35622,7 @@ void main() {
|
|
|
35623
35622
|
}
|
|
35624
35623
|
} else this._state === T.NONE && ee !== void 0 && ee.move(this, ne.clientX, ne.clientY, this.renderer);
|
|
35625
35624
|
}, xe = (ne) => {
|
|
35626
|
-
this._state = T.NONE, X == P.MINIMAP && (X = P.DEFAULT), ee !== void 0 && this.pointer_x_start == ne.clientX -
|
|
35625
|
+
this._state = T.NONE, X == P.MINIMAP && (X = P.DEFAULT), ee !== void 0 && this.pointer_x_start == ne.clientX - q.left && this.pointer_y_start == ne.clientY - q.top && ee.pick(this, ne.clientX, ne.clientY, this.renderer);
|
|
35627
35626
|
}, Ie = (ne) => {
|
|
35628
35627
|
this._state = T.NONE;
|
|
35629
35628
|
}, et = (ne) => {
|
|
@@ -35631,34 +35630,34 @@ void main() {
|
|
|
35631
35630
|
var Ee = ne.touches.length;
|
|
35632
35631
|
if (Ee == 1) {
|
|
35633
35632
|
var Ne, $e;
|
|
35634
|
-
this._state = T.TOUCH_ROTATE, this.pointer_x = ne.touches[0].clientX - ((Ne =
|
|
35633
|
+
this._state = T.TOUCH_ROTATE, this.pointer_x = ne.touches[0].clientX - ((Ne = q) === null || Ne === void 0 ? void 0 : Ne.left), this.pointer_y = ne.touches[0].clientY - (($e = q) === null || $e === void 0 ? void 0 : $e.top), this.pointer_x_start = this.pointer_x, this.pointer_y_start = this.pointer_y, this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y;
|
|
35635
35634
|
} else if (Ee == 2) {
|
|
35636
35635
|
this._state = T.TOUCH_ZOOM;
|
|
35637
35636
|
var lt = ne.touches[0].clientX - ne.touches[1].clientX, Z = ne.touches[0].clientY - ne.touches[1].clientY;
|
|
35638
35637
|
this.touchZoomDistanceEnd = this.touchZoomDistanceStart = Math.sqrt(lt * lt + Z * Z);
|
|
35639
35638
|
} else if (Ee == 3) {
|
|
35640
35639
|
var fe, he;
|
|
35641
|
-
this._state = T.TOUCH_PAN, this.targetTouchId = ne.touches[0].identifier, this.pointer_x = ne.touches[0].clientX - ((fe =
|
|
35640
|
+
this._state = T.TOUCH_PAN, this.targetTouchId = ne.touches[0].identifier, this.pointer_x = ne.touches[0].clientX - ((fe = q) === null || fe === void 0 ? void 0 : fe.left), this.pointer_y = ne.touches[0].clientY - ((he = q) === null || he === void 0 ? void 0 : he.top), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y;
|
|
35642
35641
|
}
|
|
35643
35642
|
}, mt = (ne) => {
|
|
35644
35643
|
ne.preventDefault(), ne.stopPropagation();
|
|
35645
35644
|
var Ee = ne.touches.length;
|
|
35646
|
-
if (Ee == 1) this.pointer_x = ne.touches[0].clientX -
|
|
35645
|
+
if (Ee == 1) this.pointer_x = ne.touches[0].clientX - q.left, this.pointer_y = ne.touches[0].clientY - q.top;
|
|
35647
35646
|
else if (Ee == 2) {
|
|
35648
35647
|
if (this._state === T.TOUCH_ZOOM) {
|
|
35649
35648
|
var Ne = ne.touches[0].clientX - ne.touches[1].clientX, $e = ne.touches[0].clientY - ne.touches[1].clientY;
|
|
35650
35649
|
this.touchZoomDistanceEnd = Math.sqrt(Ne * Ne + $e * $e);
|
|
35651
35650
|
}
|
|
35652
|
-
} else if (Ee == 3 && this._state === T.TOUCH_PAN) for (var lt = 0; 3 > lt; lt++) ne.touches[lt].identifier == this.targetTouchId && (this.pointer_x = ne.touches[0].clientX -
|
|
35651
|
+
} else if (Ee == 3 && this._state === T.TOUCH_PAN) for (var lt = 0; 3 > lt; lt++) ne.touches[lt].identifier == this.targetTouchId && (this.pointer_x = ne.touches[0].clientX - q.left, this.pointer_y = ne.touches[0].clientY - q.top);
|
|
35653
35652
|
}, ke = (ne) => {
|
|
35654
35653
|
var Ee = ne.touches.length;
|
|
35655
|
-
this.touchZoomDistanceStart = this.touchZoomDistanceEnd = 0, this.targetTouchId = -1, this._state = T.NONE, Ee == 1 && ee !== void 0 && this.pointer_x_start == ne.touches[0].clientX -
|
|
35654
|
+
this.touchZoomDistanceStart = this.touchZoomDistanceEnd = 0, this.targetTouchId = -1, this._state = T.NONE, Ee == 1 && ee !== void 0 && this.pointer_x_start == ne.touches[0].clientX - q.left && this.pointer_y_start == ne.touches[0].clientY - q.top && ee.pick(this.cameraObject, ne.touches[0].clientX, ne.touches[0].clientY, this.renderer);
|
|
35656
35655
|
}, bt = () => {
|
|
35657
35656
|
ze(!0);
|
|
35658
35657
|
}, ze = (ne) => {
|
|
35659
|
-
if (ne ||
|
|
35658
|
+
if (ne || q === void 0) {
|
|
35660
35659
|
var Ee = new IntersectionObserver((Ne) => {
|
|
35661
|
-
for (var $e of Ne)
|
|
35660
|
+
for (var $e of Ne) q = $e.boundingClientRect;
|
|
35662
35661
|
Ee.disconnect();
|
|
35663
35662
|
});
|
|
35664
35663
|
Ee.observe(this.domElement);
|
|
@@ -35674,12 +35673,13 @@ void main() {
|
|
|
35674
35673
|
this._state = T.KEYBOARD_ZOOM;
|
|
35675
35674
|
var Ne = 1;
|
|
35676
35675
|
ne.shiftKey && (Ne *= 2), ne.keyCode === E.EQUAL || ne.keyCode === E.NUMPADADD ? Ee = -1 * (this.zoomRate * Ne) : (ne.keyCode === E.MINUS || ne.keyCode === E.NUMPADSUBTRACT) && (Ee = this.zoomRate * Ne), W += Ee;
|
|
35677
|
-
} else (ne.keyCode === E.ARROWLEFT || ne.keyCode === E.ARROWUP || ne.keyCode === E.ARROWRIGHT || ne.keyCode === E.ARROWDOWN) && (ne.shiftKey ? (this._state = T.KEYBOARD_ROTATE, this.pointer_x_start = this.pointer_x, this.pointer_y_start = this.pointer_y, Ee = this.rotateRate) : (this._state = T.KEYBOARD_PAN, Ee = this.panRate), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y, ne.keyCode === E.ARROWLEFT ? this.pointer_x
|
|
35676
|
+
} else (ne.keyCode === E.ARROWLEFT || ne.keyCode === E.ARROWUP || ne.keyCode === E.ARROWRIGHT || ne.keyCode === E.ARROWDOWN) && (ne.shiftKey ? (this._state = T.KEYBOARD_ROTATE, this.pointer_x_start = this.pointer_x, this.pointer_y_start = this.pointer_y, Ee = this.rotateRate) : (this._state = T.KEYBOARD_PAN, Ee = this.panRate), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y, ne.keyCode === E.ARROWLEFT ? this.pointer_x -= Ee : ne.keyCode === E.ARROWUP ? this.pointer_y -= Ee : ne.keyCode === E.ARROWRIGHT ? this.pointer_x += Ee : ne.keyCode === E.ARROWDOWN && (this.pointer_y += Ee));
|
|
35677
|
+
ne.preventDefault();
|
|
35678
35678
|
}, yt = (ne) => {
|
|
35679
35679
|
this._state = T.NONE;
|
|
35680
35680
|
}, ft = () => {
|
|
35681
35681
|
if (typeof this.cameraObject < "u") {
|
|
35682
|
-
var ne =
|
|
35682
|
+
var ne = q.height, Ee = this.cameraObject.position.distanceTo(this.cameraObject.target), Ne = 0;
|
|
35683
35683
|
this.cameraObject.far > this.cameraObject.near && Ee >= this.cameraObject.near && Ee <= this.cameraObject.far && (Ne = (Ee - this.cameraObject.near) / (this.cameraObject.far - this.cameraObject.near)), Y.set(this.previous_pointer_x, ne - this.previous_pointer_y, 0), te.set(this.previous_pointer_x, ne - this.previous_pointer_y, 1), B.set(this.pointer_x, ne - this.pointer_y, 0), $.set(this.pointer_x, ne - this.pointer_y, 1), Y.unproject(this.cameraObject), te.unproject(this.cameraObject), B.unproject(this.cameraObject), $.unproject(this.cameraObject);
|
|
35684
35684
|
var $e = -2e-3;
|
|
35685
35685
|
B.sub(Y).multiplyScalar(1 - Ne), $.sub(te).multiplyScalar(Ne), B.add($).multiplyScalar($e), se(B);
|
|
@@ -35696,14 +35696,14 @@ void main() {
|
|
|
35696
35696
|
};
|
|
35697
35697
|
var Ft = () => {
|
|
35698
35698
|
if (typeof this.cameraObject < "u") {
|
|
35699
|
-
var ne, Ee, Ne = (ne =
|
|
35699
|
+
var ne, Ee, Ne = (ne = q) === null || ne === void 0 ? void 0 : ne.width, $e = (Ee = q) === null || Ee === void 0 ? void 0 : Ee.height;
|
|
35700
35700
|
if (0 < Ne && 0 < $e) {
|
|
35701
35701
|
var lt = 0.25 * (Ne + $e), Z = 0, fe = 0;
|
|
35702
|
-
(
|
|
35702
|
+
(K === R.FREE || K === R.HORIZONTAL) && (Z = this.pointer_x - this.previous_pointer_x), (K === R.FREE || K === R.VERTICAL) && (fe = this.previous_pointer_y - this.pointer_y);
|
|
35703
35703
|
var he = Math.sqrt(Z * Z + fe * fe);
|
|
35704
35704
|
if (0 < he) {
|
|
35705
35705
|
var be = 1 * -fe / he, Ce = 1 * Z / he, de = 0;
|
|
35706
|
-
|
|
35706
|
+
K === R.FREE && be * (this.pointer_x - 0.5 * (Ne - 1)) + Ce * (0.5 * ($e - 1) - this.pointer_y);
|
|
35707
35707
|
var Se = Math.acos(de / lt) - 0.5 * Math.PI, Oe = this.tumble_rate * he / lt;
|
|
35708
35708
|
ie.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize(), Y.copy(this.cameraObject.up).normalize(), te.copy(Y).cross(ie).normalize().multiplyScalar(be), Y.multiplyScalar(Ce), Q.addVectors(te, Y).multiplyScalar(Math.cos(Se)), ie.multiplyScalar(Math.sin(Se)), Q.add(ie), this.rotateAboutLookAtpoint(Q, -Oe);
|
|
35709
35709
|
}
|
|
@@ -35719,7 +35719,7 @@ void main() {
|
|
|
35719
35719
|
this.changeZoomByValue(Ee);
|
|
35720
35720
|
}, this.changeZoomByValue = (ne) => {
|
|
35721
35721
|
if (typeof this.cameraObject < "u") {
|
|
35722
|
-
var Ee =
|
|
35722
|
+
var Ee = q.height, Ne = this.cameraObject.position.clone();
|
|
35723
35723
|
Ne.sub(this.cameraObject.target);
|
|
35724
35724
|
var $e = Ne.length(), lt = 1.5 * ne / Ee;
|
|
35725
35725
|
if (0.01 < $e + lt * $e && (Ne.normalize(), le.copy(this.cameraObject.position), le.x += Ne.x * lt * $e, le.y += Ne.y * lt * $e, le.z += Ne.z * lt * $e, Me())) {
|
|
@@ -35746,7 +35746,7 @@ void main() {
|
|
|
35746
35746
|
}, this.updateDirectionalLight = () => {
|
|
35747
35747
|
this.directionalLight != 0 && this.directionalLight.position.set(this.cameraObject.position.x, this.cameraObject.position.y, this.cameraObject.position.z);
|
|
35748
35748
|
}, this.enable = function() {
|
|
35749
|
-
O = !0, this.domElement && this.domElement.addEventListener && (pe(this.domElement,
|
|
35749
|
+
O = !0, this.domElement && this.domElement.addEventListener && (pe(this.domElement, 0), this.domElement.addEventListener("mousedown", Te, !1), this.domElement.addEventListener("mousemove", ye, !1), this.domElement.addEventListener("mouseup", xe, !1), this.domElement.addEventListener("mouseleave", Ie, !1), this.domElement.addEventListener("touchstart", et, !1), this.domElement.addEventListener("touchmove", mt, !1), this.domElement.addEventListener("touchend", ke, !1), this.domElement.addEventListener("wheel", at, !1), this.domElement.addEventListener("mouseenter", bt, !1), this.domElement.addEventListener("contextmenu", (ne) => {
|
|
35750
35750
|
ne.preventDefault();
|
|
35751
35751
|
}, !1), this.domElement.addEventListener("keydown", tt, !1), this.domElement.addEventListener("keyup", yt, !1));
|
|
35752
35752
|
}, this.disable = function() {
|
|
@@ -35892,34 +35892,34 @@ void main() {
|
|
|
35892
35892
|
enable = !1;
|
|
35893
35893
|
}, this.getIntersectsObject = (W) => {
|
|
35894
35894
|
if (E !== R) {
|
|
35895
|
-
var
|
|
35896
|
-
C.render(
|
|
35895
|
+
var K = R.getThreeJSScene();
|
|
35896
|
+
C.render(K, W.cameraObject);
|
|
35897
35897
|
}
|
|
35898
35898
|
var ee = re || R.getPickableThreeJSObjects();
|
|
35899
35899
|
return H.length = 0, b.intersectObjects(ee, !0, H);
|
|
35900
35900
|
}, this.setPickableObjects = (W) => {
|
|
35901
|
-
W === void 0 ? re = void 0 : (re = [], W.forEach((
|
|
35902
|
-
|
|
35901
|
+
W === void 0 ? re = void 0 : (re = [], W.forEach((K) => {
|
|
35902
|
+
K.getGroup() && K.getGroup().visible && re.push(K.getGroup());
|
|
35903
35903
|
}));
|
|
35904
|
-
}, this.getIntersectsObjectWithOrigin = (W,
|
|
35904
|
+
}, this.getIntersectsObjectWithOrigin = (W, K, ee) => (b.set(K, ee), this.getIntersectsObject(W)), this.getIntersectsObjectWithCamera = (W, K, ee) => (W.getNDCFromDocumentCoords(K, ee, I), b.setFromCamera(I, W.cameraObject), this.getIntersectsObject(W)), this.pick = (W, K, ee) => {
|
|
35905
35905
|
if (C && R && W && L) {
|
|
35906
|
-
this.getIntersectsObjectWithCamera(W,
|
|
35907
|
-
for (var
|
|
35906
|
+
this.getIntersectsObjectWithCamera(W, K, ee);
|
|
35907
|
+
for (var q, ie = H.length, Y = 0; Y < ie; Y++) if (q = H[Y].object ? H[Y].object.userData : void 0, q && q.isMarkerCluster && q.visible && q.clusterIsVisible(H[Y].object.clusterIndex) && q.zoomToCluster(H[Y].object.clusterIndex))
|
|
35908
35908
|
return;
|
|
35909
|
-
L(H,
|
|
35909
|
+
L(H, K, ee);
|
|
35910
35910
|
}
|
|
35911
35911
|
};
|
|
35912
|
-
var j = (W,
|
|
35912
|
+
var j = (W, K, ee) => {
|
|
35913
35913
|
if (C && R && W && O) {
|
|
35914
|
-
if (this.getIntersectsObjectWithCamera(W,
|
|
35914
|
+
if (this.getIntersectsObjectWithCamera(W, K, ee), D.setTime(Date.now()), H.length === 0) {
|
|
35915
35915
|
if (z) return;
|
|
35916
35916
|
z = !0;
|
|
35917
35917
|
} else z = !1;
|
|
35918
|
-
O(H,
|
|
35918
|
+
O(H, K, ee);
|
|
35919
35919
|
}
|
|
35920
35920
|
};
|
|
35921
|
-
this.move = (W,
|
|
35922
|
-
C && R && W && O && (R.displayMarkers ? j(W,
|
|
35921
|
+
this.move = (W, K, ee) => {
|
|
35922
|
+
C && R && W && O && (R.displayMarkers ? j(W, K, ee) : (X.zincCamera = W, X.x = K, X.y = ee, !N && (V = D ? Date.now() - D.getTime() : 250, 250 <= V ? j(W, K, ee) : (N = !0, setTimeout(k(X), V)))));
|
|
35923
35923
|
};
|
|
35924
35924
|
var k = (W) => function() {
|
|
35925
35925
|
N = !1, j(W.zincCamera, W.x, W.y);
|
|
@@ -36290,10 +36290,10 @@ void main() {
|
|
|
36290
36290
|
I.boundingBox === null && I.computeBoundingBox(), S.copy(I.boundingBox).applyMatrix4(b);
|
|
36291
36291
|
var W = Math.max(L.near, S.distanceToPoint(C.origin));
|
|
36292
36292
|
x.set(0, 0, -W, 1).applyMatrix4(L.projectionMatrix), x.multiplyScalar(1 / x.w), x.applyMatrix4(L.projectionMatrixInverse);
|
|
36293
|
-
var
|
|
36294
|
-
if (S.max.x +=
|
|
36293
|
+
var K = 0.5 * Math.abs(re / x.w);
|
|
36294
|
+
if (S.max.x += K, S.max.y += K, S.max.z += K, S.min.x -= K, S.min.y -= K, S.min.z -= K, T.ray.intersectsBox(S) !== !1) {
|
|
36295
36295
|
C.at(1, y), y.w = 1, y.applyMatrix4(L.matrixWorldInverse), y.applyMatrix4(O), y.multiplyScalar(1 / y.w), y.x *= D.x / 2, y.y *= D.y / 2, y.z = 0, v.copy(y), m.multiplyMatrices(L.matrixWorldInverse, b);
|
|
36296
|
-
for (var ee = 0,
|
|
36296
|
+
for (var ee = 0, q = V.count; ee < q; ee++) {
|
|
36297
36297
|
p.fromBufferAttribute(V, ee), u.fromBufferAttribute(H, ee), p.w = 1, u.w = 1, p.applyMatrix4(m), u.applyMatrix4(m);
|
|
36298
36298
|
var ie = p.z > X && u.z > X;
|
|
36299
36299
|
if (!ie) {
|
|
@@ -43129,7 +43129,7 @@ const WU = {
|
|
|
43129
43129
|
this.setMarkerModeForObjectsWithName(n, e, "on");
|
|
43130
43130
|
}
|
|
43131
43131
|
}
|
|
43132
|
-
}, kp = (n) => (p1("data-v-
|
|
43132
|
+
}, kp = (n) => (p1("data-v-3f6a68de"), n = n(), m1(), n), jU = {
|
|
43133
43133
|
ref: "scaffoldContainer",
|
|
43134
43134
|
class: "scaffold-container",
|
|
43135
43135
|
"element-loading-text": "Loading...",
|
|
@@ -43586,7 +43586,7 @@ function o4(n, e, t, i, r, s) {
|
|
|
43586
43586
|
[M, n.loading]
|
|
43587
43587
|
]);
|
|
43588
43588
|
}
|
|
43589
|
-
const u4 = /* @__PURE__ */ xr(WU, [["render", o4], ["__scopeId", "data-v-
|
|
43589
|
+
const u4 = /* @__PURE__ */ xr(WU, [["render", o4], ["__scopeId", "data-v-3f6a68de"]]);
|
|
43590
43590
|
export {
|
|
43591
43591
|
u4 as ScaffoldVuer
|
|
43592
43592
|
};
|