@abi-software/scaffoldvuer 1.9.1-beta.1 → 1.9.1-beta.3
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 +384 -376
- package/dist/scaffoldvuer.umd.cjs +9 -9
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ScaffoldVuer.vue +7 -0
- package/vite.web-component.js +36 -0
package/dist/scaffoldvuer.js
CHANGED
|
@@ -2162,7 +2162,7 @@ function WE(n) {
|
|
|
2162
2162
|
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 = Ba(e, { boundary: c, rootBoundary: l, padding: h, altBoundary: d }), v = Ai(e.placement), m = So(e.placement), x = !m, M = Jd(v), _ = HE(M), w = e.modifiersData.popperOffsets, A = e.rects.reference, S = e.rects.popper, R = typeof u == "function" ? u(Object.assign({}, e.rects, { placement: e.placement })) : u, T = typeof R == "number" ? { mainAxis: R, altAxis: R } : Object.assign({ mainAxis: 0, altAxis: 0 }, R), I = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, E = { x: 0, y: 0 };
|
|
2163
2163
|
if (w) {
|
|
2164
2164
|
if (s) {
|
|
2165
|
-
var L, C = M === "y" ? Dn : Nn, O = M === "y" ? qn : Qn, b = M === "y" ? "height" : "width", P = w[M], N = P + y[C], B = P - y[O], F = g ? -S[b] / 2 : 0, z = m === bo ? A[b] : S[b], G = m === bo ? -S[b] : -A[b], J = e.elements.arrow, ne = g && J ? Yd(J) : { width: 0, height: 0 }, ae = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : f0(), ie = ae[C], oe = ae[O], W = Ea(0, A[b], ne[b]),
|
|
2165
|
+
var L, C = M === "y" ? Dn : Nn, O = M === "y" ? qn : Qn, b = M === "y" ? "height" : "width", P = w[M], N = P + y[C], B = P - y[O], F = g ? -S[b] / 2 : 0, z = m === bo ? A[b] : S[b], G = m === bo ? -S[b] : -A[b], J = e.elements.arrow, ne = g && J ? Yd(J) : { width: 0, height: 0 }, ae = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : f0(), ie = ae[C], oe = ae[O], W = Ea(0, A[b], ne[b]), Z = x ? A[b] / 2 - F - W - ie - T.mainAxis : z - W - ie - T.mainAxis, j = x ? -A[b] / 2 + F + W + oe + T.mainAxis : G + W + oe + T.mainAxis, re = e.elements.arrow && tl(e.elements.arrow), U = re ? M === "y" ? re.clientTop || 0 : re.clientLeft || 0 : 0, H = (L = I == null ? void 0 : I[M]) != null ? L : 0, K = P + Z - H - U, le = P + j - H, se = Ea(g ? Oc(N, K) : N, P, g ? gs(B, le) : B);
|
|
2166
2166
|
w[M] = se, E[M] = se - P;
|
|
2167
2167
|
}
|
|
2168
2168
|
if (a) {
|
|
@@ -2943,7 +2943,7 @@ const OA = ft({
|
|
|
2943
2943
|
{ resize: i.resize }
|
|
2944
2944
|
]), N = de(() => qi(i.modelValue) ? "" : String(i.modelValue)), B = de(() => i.clearable && !p.value && !i.readonly && !!N.value && (R.value || x.value)), F = de(() => i.showPassword && !p.value && !i.readonly && !!N.value && (!!N.value || R.value)), z = de(() => i.showWordLimit && !!i.maxlength && (i.type === "text" || i.type === "textarea") && !p.value && !i.readonly && !i.showPassword), G = de(() => N.value.length), J = de(() => !!z.value && G.value > Number(i.maxlength)), ne = de(() => !!s.suffix || !!i.suffixIcon || B.value || i.showPassword || z.value || !!L.value && E.value), [ae, ie] = fA(v);
|
|
2945
2945
|
Xn(m, (he) => {
|
|
2946
|
-
if (
|
|
2946
|
+
if (Z(), !z.value || i.resize !== "both")
|
|
2947
2947
|
return;
|
|
2948
2948
|
const be = he[0], { width: te } = be.contentRect;
|
|
2949
2949
|
_.value = {
|
|
@@ -2965,7 +2965,7 @@ const OA = ft({
|
|
|
2965
2965
|
w.value = {
|
|
2966
2966
|
minHeight: gm(m.value).minHeight
|
|
2967
2967
|
};
|
|
2968
|
-
},
|
|
2968
|
+
}, Z = ((he) => {
|
|
2969
2969
|
let be = !1;
|
|
2970
2970
|
return () => {
|
|
2971
2971
|
var te;
|
|
@@ -6630,7 +6630,7 @@ const UL = 11, VL = (n, e) => {
|
|
|
6630
6630
|
}), oe = de(() => Array.from(o.cachedOptions.values())), W = de(() => {
|
|
6631
6631
|
const me = ie.value.filter((_e) => !_e.created).some((_e) => _e.currentLabel === o.inputValue);
|
|
6632
6632
|
return n.filterable && n.allowCreate && o.inputValue !== "" && !me;
|
|
6633
|
-
}),
|
|
6633
|
+
}), Z = () => {
|
|
6634
6634
|
n.filterable && Sn(n.filterMethod) || n.filterable && n.remote && Sn(n.remoteMethod) || ie.value.forEach((me) => {
|
|
6635
6635
|
var _e;
|
|
6636
6636
|
(_e = me.updateOption) == null || _e.call(me, o.inputValue);
|
|
@@ -6672,7 +6672,7 @@ const UL = 11, VL = (n, e) => {
|
|
|
6672
6672
|
_e.hover = T.value === _e;
|
|
6673
6673
|
});
|
|
6674
6674
|
}), Lv(() => {
|
|
6675
|
-
o.isBeforeHide ||
|
|
6675
|
+
o.isBeforeHide || Z();
|
|
6676
6676
|
});
|
|
6677
6677
|
const se = (me) => {
|
|
6678
6678
|
o.previousQuery === me || x.value || (o.previousQuery = me, n.filterable && Sn(n.filterMethod) ? n.filterMethod(me) : n.filterable && n.remote && Sn(n.remoteMethod) && n.remoteMethod(me), n.defaultFirstOption && (n.filterable || n.remote) && ae.value ? Mt(V) : Mt(Y));
|
|
@@ -6815,7 +6815,7 @@ const UL = 11, VL = (n, e) => {
|
|
|
6815
6815
|
b.value || (Nh && (o.inputHovering = !0), o.menuVisibleOnFocus ? o.menuVisibleOnFocus = !1 : R.value = !R.value);
|
|
6816
6816
|
}, Q = () => {
|
|
6817
6817
|
R.value ? ie.value[o.hoveringIndex] && qe(ie.value[o.hoveringIndex]) : Kr();
|
|
6818
|
-
}, Te = (me) => Tn(me.value) ? Zi(me.value, n.valueKey) : me.value, De = de(() => ie.value.filter((me) => me.visible).every((me) => me.disabled)), $e = de(() => n.multiple ? n.collapseTags ? o.selected.slice(0, n.maxCollapseTags) : o.selected : []), ct = de(() => n.multiple ? n.collapseTags ? o.selected.slice(n.maxCollapseTags) : [] : []),
|
|
6818
|
+
}, Te = (me) => Tn(me.value) ? Zi(me.value, n.valueKey) : me.value, De = de(() => ie.value.filter((me) => me.visible).every((me) => me.disabled)), $e = de(() => n.multiple ? n.collapseTags ? o.selected.slice(0, n.maxCollapseTags) : o.selected : []), ct = de(() => n.multiple ? n.collapseTags ? o.selected.slice(n.maxCollapseTags) : [] : []), X = (me) => {
|
|
6819
6819
|
if (!R.value) {
|
|
6820
6820
|
R.value = !0;
|
|
6821
6821
|
return;
|
|
@@ -6823,7 +6823,7 @@ const UL = 11, VL = (n, e) => {
|
|
|
6823
6823
|
if (!(o.options.size === 0 || o.filteredOptionsCount === 0 || x.value) && !De.value) {
|
|
6824
6824
|
me === "next" ? (o.hoveringIndex++, o.hoveringIndex === o.options.size && (o.hoveringIndex = 0)) : me === "prev" && (o.hoveringIndex--, o.hoveringIndex < 0 && (o.hoveringIndex = o.options.size - 1));
|
|
6825
6825
|
const _e = ie.value[o.hoveringIndex];
|
|
6826
|
-
(_e.disabled === !0 || _e.states.groupDisabled === !0 || !_e.visible) &&
|
|
6826
|
+
(_e.disabled === !0 || _e.states.groupDisabled === !0 || !_e.visible) && X(me), Mt(() => Be(T.value));
|
|
6827
6827
|
}
|
|
6828
6828
|
}, ge = () => {
|
|
6829
6829
|
if (!c.value)
|
|
@@ -6870,7 +6870,7 @@ const UL = 11, VL = (n, e) => {
|
|
|
6870
6870
|
validateState: z,
|
|
6871
6871
|
validateIcon: G,
|
|
6872
6872
|
showNewOption: W,
|
|
6873
|
-
updateOptions:
|
|
6873
|
+
updateOptions: Z,
|
|
6874
6874
|
collapseTagSize: re,
|
|
6875
6875
|
setSelected: D,
|
|
6876
6876
|
selectDisabled: b,
|
|
@@ -6889,7 +6889,7 @@ const UL = 11, VL = (n, e) => {
|
|
|
6889
6889
|
toggleMenu: Kr,
|
|
6890
6890
|
selectOption: Q,
|
|
6891
6891
|
getValueKey: Te,
|
|
6892
|
-
navigateOptions:
|
|
6892
|
+
navigateOptions: X,
|
|
6893
6893
|
dropdownMenuVisible: U,
|
|
6894
6894
|
showTagList: $e,
|
|
6895
6895
|
collapseTagList: ct,
|
|
@@ -8051,8 +8051,8 @@ const ER = Oe({
|
|
|
8051
8051
|
bR(i, o, f, g, t, a);
|
|
8052
8052
|
const z = de(() => {
|
|
8053
8053
|
const oe = [i.min, i.max, i.step].map((W) => {
|
|
8054
|
-
const
|
|
8055
|
-
return
|
|
8054
|
+
const Z = `${W}`.split(".")[1];
|
|
8055
|
+
return Z ? Z.length : 0;
|
|
8056
8056
|
});
|
|
8057
8057
|
return Math.max.apply(null, oe);
|
|
8058
8058
|
}), { sliderWrapper: G } = sR(i, o, y), { firstValue: J, secondValue: ne, sliderSize: ae } = ws(o), ie = (oe) => {
|
|
@@ -8073,7 +8073,7 @@ const ER = Oe({
|
|
|
8073
8073
|
}), e({
|
|
8074
8074
|
onSliderClick: x
|
|
8075
8075
|
}), (oe, W) => {
|
|
8076
|
-
var
|
|
8076
|
+
var Z, j;
|
|
8077
8077
|
return ye(), Le("div", {
|
|
8078
8078
|
id: oe.range ? k(T) : void 0,
|
|
8079
8079
|
ref_key: "sliderWrapper",
|
|
@@ -8081,7 +8081,7 @@ const ER = Oe({
|
|
|
8081
8081
|
class: Ce(k(B)),
|
|
8082
8082
|
role: oe.range ? "group" : void 0,
|
|
8083
8083
|
"aria-label": oe.range && !k(I) ? k(C) : void 0,
|
|
8084
|
-
"aria-labelledby": oe.range && k(I) ? (
|
|
8084
|
+
"aria-labelledby": oe.range && k(I) ? (Z = k(a)) == null ? void 0 : Z.labelId : void 0
|
|
8085
8085
|
}, [
|
|
8086
8086
|
ze("div", {
|
|
8087
8087
|
ref_key: "slider",
|
|
@@ -16706,8 +16706,8 @@ function S3(n, e, t, i) {
|
|
|
16706
16706
|
if (ae === void 0) continue;
|
|
16707
16707
|
const ie = ae.buffer, oe = ae.type, W = ae.bytesPerElement;
|
|
16708
16708
|
if (G.isInterleavedBufferAttribute) {
|
|
16709
|
-
const
|
|
16710
|
-
|
|
16709
|
+
const Z = G.data, j = Z.stride, re = G.offset;
|
|
16710
|
+
Z && Z.isInstancedInterleavedBuffer ? (M(z, Z.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = Z.meshPerAttribute * Z.count)) : x(z), n.bindBuffer(34962, ie), w(z, ne, oe, J, j * W, re * W);
|
|
16711
16711
|
} else
|
|
16712
16712
|
G.isInstancedBufferAttribute ? (M(z, G.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = G.meshPerAttribute * G.count)) : x(z), n.bindBuffer(34962, ie), w(z, ne, oe, J, 0, 0);
|
|
16713
16713
|
} else if (F === "instanceMatrix") {
|
|
@@ -18886,16 +18886,16 @@ function QD(n, e, t) {
|
|
|
18886
18886
|
function W(te) {
|
|
18887
18887
|
return g !== te ? (n.useProgram(te), g = te, !0) : !1;
|
|
18888
18888
|
}
|
|
18889
|
-
const
|
|
18889
|
+
const Z = {
|
|
18890
18890
|
[us]: 32774,
|
|
18891
18891
|
[uy]: 32778,
|
|
18892
18892
|
[hy]: 32779
|
|
18893
18893
|
};
|
|
18894
18894
|
if (i)
|
|
18895
|
-
|
|
18895
|
+
Z[nd] = 32775, Z[id] = 32776;
|
|
18896
18896
|
else {
|
|
18897
18897
|
const te = e.get("EXT_blend_minmax");
|
|
18898
|
-
te !== null && (
|
|
18898
|
+
te !== null && (Z[nd] = te.MIN_EXT, Z[id] = te.MAX_EXT);
|
|
18899
18899
|
}
|
|
18900
18900
|
const j = {
|
|
18901
18901
|
[dy]: 0,
|
|
@@ -18957,7 +18957,7 @@ function QD(n, e, t) {
|
|
|
18957
18957
|
}
|
|
18958
18958
|
return;
|
|
18959
18959
|
}
|
|
18960
|
-
Ie = Ie || pe, je = je || xe, st = st || Ne, (pe !== y || Ie !== x) && (n.blendEquationSeparate(
|
|
18960
|
+
Ie = Ie || pe, je = je || xe, st = st || Ne, (pe !== y || Ie !== x) && (n.blendEquationSeparate(Z[pe], Z[Ie]), y = pe, x = Ie), (xe !== v || Ne !== m || je !== M || st !== _) && (n.blendFuncSeparate(j[xe], j[Ne], j[je], j[st]), v = xe, m = Ne, M = je, _ = st), u = te, w = null;
|
|
18961
18961
|
}
|
|
18962
18962
|
function U(te, pe) {
|
|
18963
18963
|
te.side === Vr ? ae(2884) : ne(2884);
|
|
@@ -19368,7 +19368,7 @@ function eN(n, e, t, i, r, s, o) {
|
|
|
19368
19368
|
}
|
|
19369
19369
|
V.depthBuffer && oe(V);
|
|
19370
19370
|
}
|
|
19371
|
-
function
|
|
19371
|
+
function Z(V) {
|
|
19372
19372
|
const D = v(V) || a, $ = V.isWebGLMultipleRenderTargets === !0 ? V.texture : [V.texture];
|
|
19373
19373
|
for (let Y = 0, ee = $.length; Y < ee; Y++) {
|
|
19374
19374
|
const ue = $[Y];
|
|
@@ -19403,7 +19403,7 @@ function eN(n, e, t, i, r, s, o) {
|
|
|
19403
19403
|
function se(V, D) {
|
|
19404
19404
|
V && V.isWebGLCubeRenderTarget && (K === !1 && (console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."), K = !0), V = V.texture), P(V, D);
|
|
19405
19405
|
}
|
|
19406
|
-
this.allocateTextureUnit = L, this.resetTextureUnits = E, this.setTexture2D = C, this.setTexture2DArray = O, this.setTexture3D = b, this.setTextureCube = P, this.setupRenderTarget = W, this.updateRenderTargetMipmap =
|
|
19406
|
+
this.allocateTextureUnit = L, this.resetTextureUnits = E, this.setTexture2D = C, this.setTexture2DArray = O, this.setTexture3D = b, this.setTextureCube = P, this.setupRenderTarget = W, this.updateRenderTargetMipmap = Z, this.updateMultisampleRenderTarget = j, this.safeSetTexture2D = le, this.safeSetTextureCube = se;
|
|
19407
19407
|
}
|
|
19408
19408
|
function sx(n, e, t) {
|
|
19409
19409
|
const i = t.isWebGL2;
|
|
@@ -19608,9 +19608,9 @@ class nN extends Zr {
|
|
|
19608
19608
|
const S = new q(), R = new q();
|
|
19609
19609
|
function T(O, b, P) {
|
|
19610
19610
|
S.setFromMatrixPosition(b.matrixWorld), R.setFromMatrixPosition(P.matrixWorld);
|
|
19611
|
-
const N = S.distanceTo(R), B = b.projectionMatrix.elements, F = P.projectionMatrix.elements, z = B[14] / (B[10] - 1), G = B[14] / (B[10] + 1), J = (B[9] + 1) / B[5], ne = (B[9] - 1) / B[5], ae = (B[8] - 1) / B[0], ie = (F[8] + 1) / F[0], oe = z * ae, W = z * ie,
|
|
19612
|
-
b.matrixWorld.decompose(O.position, O.quaternion, O.scale), O.translateX(j), O.translateZ(
|
|
19613
|
-
const re = z +
|
|
19611
|
+
const N = S.distanceTo(R), B = b.projectionMatrix.elements, F = P.projectionMatrix.elements, z = B[14] / (B[10] - 1), G = B[14] / (B[10] + 1), J = (B[9] + 1) / B[5], ne = (B[9] - 1) / B[5], ae = (B[8] - 1) / B[0], ie = (F[8] + 1) / F[0], oe = z * ae, W = z * ie, Z = N / (-ae + ie), j = Z * -ae;
|
|
19612
|
+
b.matrixWorld.decompose(O.position, O.quaternion, O.scale), O.translateX(j), O.translateZ(Z), O.matrixWorld.compose(O.position, O.quaternion, O.scale), O.matrixWorldInverse.copy(O.matrixWorld).invert();
|
|
19613
|
+
const re = z + Z, U = G + Z, H = oe - j, K = W + (N - j), le = J * G / U * re, se = ne * G / U * re;
|
|
19614
19614
|
O.projectionMatrix.makePerspective(H, K, le, se, re, U);
|
|
19615
19615
|
}
|
|
19616
19616
|
function I(O, b) {
|
|
@@ -19765,15 +19765,15 @@ function wt(n = {}) {
|
|
|
19765
19765
|
return x === null ? I : 1;
|
|
19766
19766
|
}
|
|
19767
19767
|
let ie = t;
|
|
19768
|
-
function oe(
|
|
19769
|
-
for (let fe = 0; fe <
|
|
19770
|
-
const we =
|
|
19768
|
+
function oe(X, ge) {
|
|
19769
|
+
for (let fe = 0; fe < X.length; fe++) {
|
|
19770
|
+
const we = X[fe], Ae = e.getContext(we, ge);
|
|
19771
19771
|
if (Ae !== null) return Ae;
|
|
19772
19772
|
}
|
|
19773
19773
|
return null;
|
|
19774
19774
|
}
|
|
19775
19775
|
try {
|
|
19776
|
-
const
|
|
19776
|
+
const X = {
|
|
19777
19777
|
alpha: i,
|
|
19778
19778
|
depth: r,
|
|
19779
19779
|
stencil: s,
|
|
@@ -19785,18 +19785,18 @@ function wt(n = {}) {
|
|
|
19785
19785
|
};
|
|
19786
19786
|
if (e.addEventListener("webglcontextlost", je, !1), e.addEventListener("webglcontextrestored", st, !1), ie === null) {
|
|
19787
19787
|
const ge = ["webgl2", "webgl", "experimental-webgl"];
|
|
19788
|
-
if (u.isWebGL1Renderer === !0 && ge.shift(), ie = oe(ge,
|
|
19788
|
+
if (u.isWebGL1Renderer === !0 && ge.shift(), ie = oe(ge, X), ie === null)
|
|
19789
19789
|
throw oe(ge) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
|
|
19790
19790
|
}
|
|
19791
19791
|
ie.getShaderPrecisionFormat === void 0 && (ie.getShaderPrecisionFormat = function() {
|
|
19792
19792
|
return { rangeMin: 1, rangeMax: 1, precision: 1 };
|
|
19793
19793
|
});
|
|
19794
|
-
} catch (
|
|
19795
|
-
throw console.error("THREE.WebGLRenderer: " +
|
|
19794
|
+
} catch (X) {
|
|
19795
|
+
throw console.error("THREE.WebGLRenderer: " + X.message), X;
|
|
19796
19796
|
}
|
|
19797
|
-
let W,
|
|
19797
|
+
let W, Z, j, re, U, H, K, le, se, V, D, $, Y, ee, ue, Me, Se, he, be, te, pe, xe;
|
|
19798
19798
|
function Ne() {
|
|
19799
|
-
W = new C3(ie),
|
|
19799
|
+
W = new C3(ie), Z = new T3(ie, W, n), W.init(Z), pe = new sx(ie, W, Z), j = new QD(ie, W, Z), P[0] = 1029, re = new P3(), U = new GD(), H = new eN(ie, W, j, U, Z, pe, re), K = new A3(u), le = new eI(ie, Z), xe = new S3(ie, W, le, Z), se = new L3(ie, le, re, xe), V = new N3(ie, se, le, re), he = new D3(ie), ue = new E3(U), D = new kD(u, K, W, Z, xe, ue), $ = new iN(U), Y = new WD(U), ee = new JD(W, Z), Se = new M3(u, K, j, V, a), Me = new rx(u, V, Z), be = new _3(ie, W, re, Z), te = new R3(ie, W, re, Z), re.programs = D.programs, u.capabilities = Z, u.extensions = W, u.properties = U, u.renderLists = Y, u.shadowMap = Me, u.state = j, u.info = re;
|
|
19800
19800
|
}
|
|
19801
19801
|
Ne();
|
|
19802
19802
|
const Ie = new nN(u, ie);
|
|
@@ -19805,56 +19805,56 @@ function wt(n = {}) {
|
|
|
19805
19805
|
}, this.getContextAttributes = function() {
|
|
19806
19806
|
return ie.getContextAttributes();
|
|
19807
19807
|
}, this.forceContextLoss = function() {
|
|
19808
|
-
const
|
|
19809
|
-
|
|
19808
|
+
const X = W.get("WEBGL_lose_context");
|
|
19809
|
+
X && X.loseContext();
|
|
19810
19810
|
}, this.forceContextRestore = function() {
|
|
19811
|
-
const
|
|
19812
|
-
|
|
19811
|
+
const X = W.get("WEBGL_lose_context");
|
|
19812
|
+
X && X.restoreContext();
|
|
19813
19813
|
}, this.getPixelRatio = function() {
|
|
19814
19814
|
return I;
|
|
19815
|
-
}, this.setPixelRatio = function(
|
|
19816
|
-
|
|
19817
|
-
}, this.getSize = function(
|
|
19818
|
-
return
|
|
19819
|
-
}, this.setSize = function(
|
|
19815
|
+
}, this.setPixelRatio = function(X) {
|
|
19816
|
+
X !== void 0 && (I = X, this.setSize(R, T, !1));
|
|
19817
|
+
}, this.getSize = function(X) {
|
|
19818
|
+
return X.set(R, T);
|
|
19819
|
+
}, this.setSize = function(X, ge, fe) {
|
|
19820
19820
|
if (Ie.isPresenting) {
|
|
19821
19821
|
console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");
|
|
19822
19822
|
return;
|
|
19823
19823
|
}
|
|
19824
|
-
R =
|
|
19825
|
-
}, this.getDrawingBufferSize = function(
|
|
19826
|
-
return
|
|
19827
|
-
}, this.setDrawingBufferSize = function(
|
|
19828
|
-
R =
|
|
19829
|
-
}, this.getCurrentViewport = function(
|
|
19830
|
-
return
|
|
19831
|
-
}, this.getViewport = function(
|
|
19832
|
-
return
|
|
19833
|
-
}, this.setViewport = function(
|
|
19834
|
-
|
|
19835
|
-
}, this.getScissor = function(
|
|
19836
|
-
return
|
|
19837
|
-
}, this.setScissor = function(
|
|
19838
|
-
|
|
19824
|
+
R = X, T = ge, e.width = Math.floor(X * I), e.height = Math.floor(ge * I), fe !== !1 && (e.style.width = X + "px", e.style.height = ge + "px"), this.setViewport(0, 0, X, ge);
|
|
19825
|
+
}, this.getDrawingBufferSize = function(X) {
|
|
19826
|
+
return X.set(R * I, T * I).floor();
|
|
19827
|
+
}, this.setDrawingBufferSize = function(X, ge, fe) {
|
|
19828
|
+
R = X, T = ge, I = fe, e.width = Math.floor(X * fe), e.height = Math.floor(ge * fe), this.setViewport(0, 0, X, ge);
|
|
19829
|
+
}, this.getCurrentViewport = function(X) {
|
|
19830
|
+
return X.copy(w);
|
|
19831
|
+
}, this.getViewport = function(X) {
|
|
19832
|
+
return X.copy(C);
|
|
19833
|
+
}, this.setViewport = function(X, ge, fe, we) {
|
|
19834
|
+
X.isVector4 ? C.set(X.x, X.y, X.z, X.w) : C.set(X, ge, fe, we), j.viewport(w.copy(C).multiplyScalar(I).floor());
|
|
19835
|
+
}, this.getScissor = function(X) {
|
|
19836
|
+
return X.copy(O);
|
|
19837
|
+
}, this.setScissor = function(X, ge, fe, we) {
|
|
19838
|
+
X.isVector4 ? O.set(X.x, X.y, X.z, X.w) : O.set(X, ge, fe, we), j.scissor(A.copy(O).multiplyScalar(I).floor());
|
|
19839
19839
|
}, this.getScissorTest = function() {
|
|
19840
19840
|
return b;
|
|
19841
|
-
}, this.setScissorTest = function(
|
|
19842
|
-
j.setScissorTest(b =
|
|
19843
|
-
}, this.setOpaqueSort = function(
|
|
19844
|
-
E =
|
|
19845
|
-
}, this.setTransparentSort = function(
|
|
19846
|
-
L =
|
|
19847
|
-
}, this.getClearColor = function(
|
|
19848
|
-
return
|
|
19841
|
+
}, this.setScissorTest = function(X) {
|
|
19842
|
+
j.setScissorTest(b = X);
|
|
19843
|
+
}, this.setOpaqueSort = function(X) {
|
|
19844
|
+
E = X;
|
|
19845
|
+
}, this.setTransparentSort = function(X) {
|
|
19846
|
+
L = X;
|
|
19847
|
+
}, this.getClearColor = function(X) {
|
|
19848
|
+
return X.copy(Se.getClearColor());
|
|
19849
19849
|
}, this.setClearColor = function() {
|
|
19850
19850
|
Se.setClearColor.apply(Se, arguments);
|
|
19851
19851
|
}, this.getClearAlpha = function() {
|
|
19852
19852
|
return Se.getClearAlpha();
|
|
19853
19853
|
}, this.setClearAlpha = function() {
|
|
19854
19854
|
Se.setClearAlpha.apply(Se, arguments);
|
|
19855
|
-
}, this.clear = function(
|
|
19855
|
+
}, this.clear = function(X, ge, fe) {
|
|
19856
19856
|
let we = 0;
|
|
19857
|
-
(
|
|
19857
|
+
(X === void 0 || X) && (we |= 16384), (ge === void 0 || ge) && (we |= 256), (fe === void 0 || fe) && (we |= 1024), ie.clear(we);
|
|
19858
19858
|
}, this.clearColor = function() {
|
|
19859
19859
|
this.clear(!0, !1, !1);
|
|
19860
19860
|
}, this.clearDepth = function() {
|
|
@@ -19864,41 +19864,41 @@ function wt(n = {}) {
|
|
|
19864
19864
|
}, this.dispose = function() {
|
|
19865
19865
|
e.removeEventListener("webglcontextlost", je, !1), e.removeEventListener("webglcontextrestored", st, !1), Y.dispose(), ee.dispose(), U.dispose(), K.dispose(), V.dispose(), xe.dispose(), Ie.dispose(), Ie.removeEventListener("sessionstart", Kt), Ie.removeEventListener("sessionend", Rt), z && (z.dispose(), z = null), Nt.stop();
|
|
19866
19866
|
};
|
|
19867
|
-
function je(
|
|
19868
|
-
|
|
19867
|
+
function je(X) {
|
|
19868
|
+
X.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), y = !0;
|
|
19869
19869
|
}
|
|
19870
19870
|
function st() {
|
|
19871
19871
|
console.log("THREE.WebGLRenderer: Context Restored."), y = !1;
|
|
19872
|
-
const
|
|
19873
|
-
Ne(), re.autoReset =
|
|
19872
|
+
const X = re.autoReset, ge = Me.enabled, fe = Me.autoUpdate, we = Me.needsUpdate, Ae = Me.type;
|
|
19873
|
+
Ne(), re.autoReset = X, Me.enabled = ge, Me.autoUpdate = fe, Me.needsUpdate = we, Me.type = Ae;
|
|
19874
19874
|
}
|
|
19875
|
-
function qe(
|
|
19876
|
-
const ge =
|
|
19875
|
+
function qe(X) {
|
|
19876
|
+
const ge = X.target;
|
|
19877
19877
|
ge.removeEventListener("dispose", qe), xt(ge);
|
|
19878
19878
|
}
|
|
19879
|
-
function xt(
|
|
19880
|
-
Be(
|
|
19879
|
+
function xt(X) {
|
|
19880
|
+
Be(X), U.remove(X);
|
|
19881
19881
|
}
|
|
19882
|
-
function Be(
|
|
19883
|
-
const ge = U.get(
|
|
19882
|
+
function Be(X) {
|
|
19883
|
+
const ge = U.get(X).programs;
|
|
19884
19884
|
ge !== void 0 && ge.forEach(function(fe) {
|
|
19885
19885
|
D.releaseProgram(fe);
|
|
19886
19886
|
});
|
|
19887
19887
|
}
|
|
19888
|
-
function nt(
|
|
19889
|
-
|
|
19888
|
+
function nt(X, ge) {
|
|
19889
|
+
X.render(function(fe) {
|
|
19890
19890
|
u.renderBufferImmediate(fe, ge);
|
|
19891
19891
|
});
|
|
19892
19892
|
}
|
|
19893
|
-
this.renderBufferImmediate = function(
|
|
19893
|
+
this.renderBufferImmediate = function(X, ge) {
|
|
19894
19894
|
xe.initAttributes();
|
|
19895
|
-
const fe = U.get(
|
|
19896
|
-
|
|
19895
|
+
const fe = U.get(X);
|
|
19896
|
+
X.hasPositions && !fe.position && (fe.position = ie.createBuffer()), X.hasNormals && !fe.normal && (fe.normal = ie.createBuffer()), X.hasUvs && !fe.uv && (fe.uv = ie.createBuffer()), X.hasColors && !fe.color && (fe.color = ie.createBuffer());
|
|
19897
19897
|
const we = ge.getAttributes();
|
|
19898
|
-
|
|
19899
|
-
}, this.renderBufferDirect = function(
|
|
19898
|
+
X.hasPositions && (ie.bindBuffer(34962, fe.position), ie.bufferData(34962, X.positionArray, 35048), xe.enableAttribute(we.position), ie.vertexAttribPointer(we.position, 3, 5126, !1, 0, 0)), X.hasNormals && (ie.bindBuffer(34962, fe.normal), ie.bufferData(34962, X.normalArray, 35048), xe.enableAttribute(we.normal), ie.vertexAttribPointer(we.normal, 3, 5126, !1, 0, 0)), X.hasUvs && (ie.bindBuffer(34962, fe.uv), ie.bufferData(34962, X.uvArray, 35048), xe.enableAttribute(we.uv), ie.vertexAttribPointer(we.uv, 2, 5126, !1, 0, 0)), X.hasColors && (ie.bindBuffer(34962, fe.color), ie.bufferData(34962, X.colorArray, 35048), xe.enableAttribute(we.color), ie.vertexAttribPointer(we.color, 3, 5126, !1, 0, 0)), xe.disableUnusedAttributes(), ie.drawArrays(4, 0, X.count), X.count = 0;
|
|
19899
|
+
}, this.renderBufferDirect = function(X, ge, fe, we, Ae, me) {
|
|
19900
19900
|
ge === null && (ge = ne);
|
|
19901
|
-
const _e = Ae.isMesh && Ae.matrixWorld.determinant() < 0, Pe = De(
|
|
19901
|
+
const _e = Ae.isMesh && Ae.matrixWorld.determinant() < 0, Pe = De(X, ge, we, Ae);
|
|
19902
19902
|
j.setMaterial(we, _e);
|
|
19903
19903
|
let Ge = fe.index;
|
|
19904
19904
|
const We = fe.attributes.position;
|
|
@@ -19926,24 +19926,24 @@ function wt(n = {}) {
|
|
|
19926
19926
|
} else
|
|
19927
19927
|
ht.render(xn, xl);
|
|
19928
19928
|
}
|
|
19929
|
-
}, this.compile = function(
|
|
19930
|
-
f = ee.get(
|
|
19929
|
+
}, this.compile = function(X, ge) {
|
|
19930
|
+
f = ee.get(X), f.init(), X.traverseVisible(function(fe) {
|
|
19931
19931
|
fe.isLight && fe.layers.test(ge.layers) && (f.pushLight(fe), fe.castShadow && f.pushShadow(fe));
|
|
19932
|
-
}), f.setupLights(),
|
|
19932
|
+
}), f.setupLights(), X.traverse(function(fe) {
|
|
19933
19933
|
const we = fe.material;
|
|
19934
19934
|
if (we)
|
|
19935
19935
|
if (Array.isArray(we))
|
|
19936
19936
|
for (let Ae = 0; Ae < we.length; Ae++) {
|
|
19937
19937
|
const me = we[Ae];
|
|
19938
|
-
Q(me,
|
|
19938
|
+
Q(me, X, fe);
|
|
19939
19939
|
}
|
|
19940
19940
|
else
|
|
19941
|
-
Q(we,
|
|
19941
|
+
Q(we, X, fe);
|
|
19942
19942
|
});
|
|
19943
19943
|
};
|
|
19944
19944
|
let tt = null;
|
|
19945
|
-
function Jt(
|
|
19946
|
-
tt && tt(
|
|
19945
|
+
function Jt(X) {
|
|
19946
|
+
tt && tt(X);
|
|
19947
19947
|
}
|
|
19948
19948
|
function Kt() {
|
|
19949
19949
|
Nt.stop();
|
|
@@ -19952,56 +19952,56 @@ function wt(n = {}) {
|
|
|
19952
19952
|
Nt.start();
|
|
19953
19953
|
}
|
|
19954
19954
|
const Nt = new Jb();
|
|
19955
|
-
Nt.setAnimationLoop(Jt), typeof window < "u" && Nt.setContext(window), this.setAnimationLoop = function(
|
|
19956
|
-
tt =
|
|
19957
|
-
}, Ie.addEventListener("sessionstart", Kt), Ie.addEventListener("sessionend", Rt), this.render = function(
|
|
19955
|
+
Nt.setAnimationLoop(Jt), typeof window < "u" && Nt.setContext(window), this.setAnimationLoop = function(X) {
|
|
19956
|
+
tt = X, Ie.setAnimationLoop(X), X === null ? Nt.stop() : Nt.start();
|
|
19957
|
+
}, Ie.addEventListener("sessionstart", Kt), Ie.addEventListener("sessionend", Rt), this.render = function(X, ge) {
|
|
19958
19958
|
if (ge !== void 0 && ge.isCamera !== !0) {
|
|
19959
19959
|
console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");
|
|
19960
19960
|
return;
|
|
19961
19961
|
}
|
|
19962
19962
|
if (y === !0) return;
|
|
19963
|
-
|
|
19963
|
+
X.autoUpdate === !0 && X.updateMatrixWorld(), ge.parent === null && ge.updateMatrixWorld(), Ie.enabled === !0 && Ie.isPresenting === !0 && (Ie.cameraAutoUpdate === !0 && Ie.updateCamera(ge), ge = Ie.getCamera()), X.isScene === !0 && X.onBeforeRender(u, X, ge, x), f = ee.get(X, p.length), f.init(), p.push(f), G.multiplyMatrices(ge.projectionMatrix, ge.matrixWorldInverse), N.setFromProjectionMatrix(G), F = this.localClippingEnabled, B = ue.init(this.clippingPlanes, F, ge), h = Y.get(X, g.length), h.init(), g.push(h), Fi(X, ge, 0, u.sortObjects), h.finish(), u.sortObjects === !0 && h.sort(E, L), B === !0 && ue.beginShadows();
|
|
19964
19964
|
const fe = f.state.shadowsArray;
|
|
19965
|
-
Me.render(fe,
|
|
19965
|
+
Me.render(fe, X, ge), f.setupLights(), f.setupLightsView(ge), B === !0 && ue.endShadows(), this.info.autoReset === !0 && this.info.reset(), Se.render(h, X);
|
|
19966
19966
|
const we = h.opaque, Ae = h.transmissive, me = h.transparent;
|
|
19967
|
-
we.length > 0 && ni(we,
|
|
19967
|
+
we.length > 0 && ni(we, X, ge), Ae.length > 0 && zi(we, Ae, X, ge), me.length > 0 && ni(me, X, ge), x !== null && (H.updateMultisampleRenderTarget(x), H.updateRenderTargetMipmap(x)), X.isScene === !0 && X.onAfterRender(u, X, ge), j.buffers.depth.setTest(!0), j.buffers.depth.setMask(!0), j.buffers.color.setMask(!0), j.setPolygonOffset(!1), xe.resetDefaultState(), M = -1, _ = 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;
|
|
19968
19968
|
};
|
|
19969
|
-
function Fi(
|
|
19970
|
-
if (
|
|
19971
|
-
if (
|
|
19972
|
-
if (
|
|
19973
|
-
fe =
|
|
19974
|
-
else if (
|
|
19975
|
-
|
|
19976
|
-
else if (
|
|
19977
|
-
f.pushLight(
|
|
19978
|
-
else if (
|
|
19979
|
-
if (!
|
|
19980
|
-
we && J.setFromMatrixPosition(
|
|
19981
|
-
const _e = V.update(
|
|
19982
|
-
Pe.visible && h.push(
|
|
19969
|
+
function Fi(X, ge, fe, we) {
|
|
19970
|
+
if (X.visible === !1) return;
|
|
19971
|
+
if (X.layers.test(ge.layers)) {
|
|
19972
|
+
if (X.isGroup)
|
|
19973
|
+
fe = X.renderOrder;
|
|
19974
|
+
else if (X.isLOD)
|
|
19975
|
+
X.autoUpdate === !0 && X.update(ge);
|
|
19976
|
+
else if (X.isLight)
|
|
19977
|
+
f.pushLight(X), X.castShadow && f.pushShadow(X);
|
|
19978
|
+
else if (X.isSprite) {
|
|
19979
|
+
if (!X.frustumCulled || N.intersectsSprite(X)) {
|
|
19980
|
+
we && J.setFromMatrixPosition(X.matrixWorld).applyMatrix4(G);
|
|
19981
|
+
const _e = V.update(X), Pe = X.material;
|
|
19982
|
+
Pe.visible && h.push(X, _e, Pe, fe, J.z, null);
|
|
19983
19983
|
}
|
|
19984
|
-
} else if (
|
|
19985
|
-
we && J.setFromMatrixPosition(
|
|
19986
|
-
else if ((
|
|
19987
|
-
we && J.setFromMatrixPosition(
|
|
19988
|
-
const _e = V.update(
|
|
19984
|
+
} else if (X.isImmediateRenderObject)
|
|
19985
|
+
we && J.setFromMatrixPosition(X.matrixWorld).applyMatrix4(G), h.push(X, null, X.material, fe, J.z, null);
|
|
19986
|
+
else if ((X.isMesh || X.isLine || X.isPoints) && (X.isSkinnedMesh && X.skeleton.frame !== re.render.frame && (X.skeleton.update(), X.skeleton.frame = re.render.frame), !X.frustumCulled || N.intersectsObject(X))) {
|
|
19987
|
+
we && J.setFromMatrixPosition(X.matrixWorld).applyMatrix4(G);
|
|
19988
|
+
const _e = V.update(X), Pe = X.material;
|
|
19989
19989
|
if (Array.isArray(Pe)) {
|
|
19990
19990
|
const Ge = _e.groups;
|
|
19991
19991
|
for (let We = 0, et = Ge.length; We < et; We++) {
|
|
19992
19992
|
const Ye = Ge[We], ht = Pe[Ye.materialIndex];
|
|
19993
|
-
ht && ht.visible && h.push(
|
|
19993
|
+
ht && ht.visible && h.push(X, _e, ht, fe, J.z, Ye);
|
|
19994
19994
|
}
|
|
19995
|
-
} else Pe.visible && h.push(
|
|
19995
|
+
} else Pe.visible && h.push(X, _e, Pe, fe, J.z, null);
|
|
19996
19996
|
}
|
|
19997
19997
|
}
|
|
19998
|
-
const me =
|
|
19998
|
+
const me = X.children;
|
|
19999
19999
|
for (let _e = 0, Pe = me.length; _e < Pe; _e++)
|
|
20000
20000
|
Fi(me[_e], ge, fe, we);
|
|
20001
20001
|
}
|
|
20002
|
-
function zi(
|
|
20002
|
+
function zi(X, ge, fe, we) {
|
|
20003
20003
|
if (z === null) {
|
|
20004
|
-
const Pe = o === !0 &&
|
|
20004
|
+
const Pe = o === !0 && Z.isWebGL2 === !0 ? _f : fi;
|
|
20005
20005
|
z = new Pe(1024, 1024, {
|
|
20006
20006
|
generateMipmaps: !0,
|
|
20007
20007
|
type: pe.convert(vs) !== null ? vs : Ss,
|
|
@@ -20014,12 +20014,12 @@ function wt(n = {}) {
|
|
|
20014
20014
|
const Ae = u.getRenderTarget();
|
|
20015
20015
|
u.setRenderTarget(z), u.clear();
|
|
20016
20016
|
const me = u.toneMapping;
|
|
20017
|
-
u.toneMapping = Pr, ni(
|
|
20017
|
+
u.toneMapping = Pr, ni(X, fe, we), u.toneMapping = me, H.updateMultisampleRenderTarget(z), H.updateRenderTargetMipmap(z), u.setRenderTarget(Ae), ni(ge, fe, we);
|
|
20018
20018
|
}
|
|
20019
|
-
function ni(
|
|
20019
|
+
function ni(X, ge, fe) {
|
|
20020
20020
|
const we = ge.isScene === !0 ? ge.overrideMaterial : null;
|
|
20021
|
-
for (let Ae = 0, me =
|
|
20022
|
-
const _e =
|
|
20021
|
+
for (let Ae = 0, me = X.length; Ae < me; Ae++) {
|
|
20022
|
+
const _e = X[Ae], Pe = _e.object, Ge = _e.geometry, We = we === null ? _e.material : we, et = _e.group;
|
|
20023
20023
|
if (fe.isArrayCamera) {
|
|
20024
20024
|
const Ye = fe.cameras;
|
|
20025
20025
|
for (let ht = 0, Vt = Ye.length; ht < Vt; ht++) {
|
|
@@ -20030,40 +20030,40 @@ function wt(n = {}) {
|
|
|
20030
20030
|
Kr(Pe, ge, fe, Ge, We, et);
|
|
20031
20031
|
}
|
|
20032
20032
|
}
|
|
20033
|
-
function Kr(
|
|
20034
|
-
if (
|
|
20035
|
-
const _e = De(fe, ge, Ae,
|
|
20036
|
-
j.setMaterial(Ae), xe.reset(), nt(
|
|
20033
|
+
function Kr(X, ge, fe, we, Ae, me) {
|
|
20034
|
+
if (X.onBeforeRender(u, ge, fe, we, Ae, me), X.modelViewMatrix.multiplyMatrices(fe.matrixWorldInverse, X.matrixWorld), X.normalMatrix.getNormalMatrix(X.modelViewMatrix), X.isImmediateRenderObject) {
|
|
20035
|
+
const _e = De(fe, ge, Ae, X);
|
|
20036
|
+
j.setMaterial(Ae), xe.reset(), nt(X, _e);
|
|
20037
20037
|
} else
|
|
20038
|
-
Ae.transparent === !0 && Ae.side === Vr ? (Ae.side = Wt, Ae.needsUpdate = !0, u.renderBufferDirect(fe, ge, we, Ae,
|
|
20039
|
-
|
|
20038
|
+
Ae.transparent === !0 && Ae.side === Vr ? (Ae.side = Wt, Ae.needsUpdate = !0, u.renderBufferDirect(fe, ge, we, Ae, X, me), Ae.side = Ur, Ae.needsUpdate = !0, u.renderBufferDirect(fe, ge, we, Ae, X, me), Ae.side = Vr) : u.renderBufferDirect(fe, ge, we, Ae, X, me);
|
|
20039
|
+
X.onAfterRender(u, ge, fe, we, Ae, me);
|
|
20040
20040
|
}
|
|
20041
|
-
function Q(
|
|
20041
|
+
function Q(X, ge, fe) {
|
|
20042
20042
|
ge.isScene !== !0 && (ge = ne);
|
|
20043
|
-
const we = U.get(
|
|
20043
|
+
const we = U.get(X), Ae = f.state.lights, me = f.state.shadowsArray, _e = Ae.state.version, Pe = D.getParameters(X, Ae.state, me, ge, fe), Ge = D.getProgramCacheKey(Pe);
|
|
20044
20044
|
let We = we.programs;
|
|
20045
|
-
we.environment =
|
|
20045
|
+
we.environment = X.isMeshStandardMaterial ? ge.environment : null, we.fog = ge.fog, we.envMap = K.get(X.envMap || we.environment), We === void 0 && (X.addEventListener("dispose", qe), We = /* @__PURE__ */ new Map(), we.programs = We);
|
|
20046
20046
|
let et = We.get(Ge);
|
|
20047
20047
|
if (et !== void 0) {
|
|
20048
20048
|
if (we.currentProgram === et && we.lightsStateVersion === _e)
|
|
20049
|
-
return Te(
|
|
20049
|
+
return Te(X, Pe), et;
|
|
20050
20050
|
} else
|
|
20051
|
-
Pe.uniforms = D.getUniforms(
|
|
20051
|
+
Pe.uniforms = D.getUniforms(X), X.onBuild(Pe, u), X.onBeforeCompile(Pe, u), et = D.acquireProgram(Pe, Ge), We.set(Ge, et), we.uniforms = Pe.uniforms;
|
|
20052
20052
|
const Ye = we.uniforms;
|
|
20053
|
-
(!
|
|
20053
|
+
(!X.isShaderMaterial && !X.isRawShaderMaterial || X.clipping === !0) && (Ye.clippingPlanes = ue.uniform), Te(X, Pe), we.needsLights = ct(X), we.lightsStateVersion = _e, we.needsLights && (Ye.ambientLightColor.value = Ae.state.ambient, Ye.lightProbe.value = Ae.state.probe, Ye.directionalLights.value = Ae.state.directional, Ye.directionalLightShadows.value = Ae.state.directionalShadow, Ye.spotLights.value = Ae.state.spot, Ye.spotLightShadows.value = Ae.state.spotShadow, Ye.rectAreaLights.value = Ae.state.rectArea, Ye.ltc_1.value = Ae.state.rectAreaLTC1, Ye.ltc_2.value = Ae.state.rectAreaLTC2, Ye.pointLights.value = Ae.state.point, Ye.pointLightShadows.value = Ae.state.pointShadow, Ye.hemisphereLights.value = Ae.state.hemi, Ye.directionalShadowMap.value = Ae.state.directionalShadowMap, Ye.directionalShadowMatrix.value = Ae.state.directionalShadowMatrix, Ye.spotShadowMap.value = Ae.state.spotShadowMap, Ye.spotShadowMatrix.value = Ae.state.spotShadowMatrix, Ye.pointShadowMap.value = Ae.state.pointShadowMap, Ye.pointShadowMatrix.value = Ae.state.pointShadowMatrix);
|
|
20054
20054
|
const ht = et.getUniforms(), Vt = Ir.seqWithValue(ht.seq, Ye);
|
|
20055
20055
|
return we.currentProgram = et, we.uniformsList = Vt, et;
|
|
20056
20056
|
}
|
|
20057
|
-
function Te(
|
|
20058
|
-
const fe = U.get(
|
|
20057
|
+
function Te(X, ge) {
|
|
20058
|
+
const fe = U.get(X);
|
|
20059
20059
|
fe.outputEncoding = ge.outputEncoding, fe.instancing = ge.instancing, fe.skinning = ge.skinning, fe.numClippingPlanes = ge.numClippingPlanes, fe.numIntersection = ge.numClipIntersection, fe.vertexAlphas = ge.vertexAlphas;
|
|
20060
20060
|
}
|
|
20061
|
-
function De(
|
|
20061
|
+
function De(X, ge, fe, we) {
|
|
20062
20062
|
ge.isScene !== !0 && (ge = ne), H.resetTextureUnits();
|
|
20063
20063
|
const Ae = ge.fog, me = fe.isMeshStandardMaterial ? ge.environment : null, _e = x === null ? u.outputEncoding : x.texture.encoding, Pe = K.get(fe.envMap || me), Ge = fe.vertexColors === !0 && we.geometry && we.geometry.attributes.color && we.geometry.attributes.color.itemSize === 4, We = U.get(fe), et = f.state.lights;
|
|
20064
|
-
if (B === !0 && (F === !0 ||
|
|
20065
|
-
const xn =
|
|
20066
|
-
ue.setState(fe,
|
|
20064
|
+
if (B === !0 && (F === !0 || X !== _)) {
|
|
20065
|
+
const xn = X === _ && fe.id === M;
|
|
20066
|
+
ue.setState(fe, X, xn);
|
|
20067
20067
|
}
|
|
20068
20068
|
let Ye = !1;
|
|
20069
20069
|
fe.version === We.__version ? (We.needsLights && We.lightsStateVersion !== et.state.version || We.outputEncoding !== _e || we.isInstancedMesh && We.instancing === !1 || !we.isInstancedMesh && We.instancing === !0 || we.isSkinnedMesh && We.skinning === !1 || !we.isSkinnedMesh && We.skinning === !0 || We.envMap !== Pe || fe.fog && We.fog !== Ae || We.numClippingPlanes !== void 0 && (We.numClippingPlanes !== ue.numPlanes || We.numIntersection !== ue.numIntersection) || We.vertexAlphas !== Ge) && (Ye = !0) : (Ye = !0, We.__version = fe.version);
|
|
@@ -20071,32 +20071,32 @@ function wt(n = {}) {
|
|
|
20071
20071
|
Ye === !0 && (ht = Q(fe, ge, we));
|
|
20072
20072
|
let Vt = !1, sn = !1, qr = !1;
|
|
20073
20073
|
const Tt = ht.getUniforms(), Qr = We.uniforms;
|
|
20074
|
-
if (j.useProgram(ht.program) && (Vt = !0, sn = !0, qr = !0), fe.id !== M && (M = fe.id, sn = !0), Vt || _ !==
|
|
20075
|
-
if (Tt.setValue(ie, "projectionMatrix",
|
|
20074
|
+
if (j.useProgram(ht.program) && (Vt = !0, sn = !0, qr = !0), fe.id !== M && (M = fe.id, sn = !0), Vt || _ !== X) {
|
|
20075
|
+
if (Tt.setValue(ie, "projectionMatrix", X.projectionMatrix), Z.logarithmicDepthBuffer && Tt.setValue(
|
|
20076
20076
|
ie,
|
|
20077
20077
|
"logDepthBufFC",
|
|
20078
|
-
2 / (Math.log(
|
|
20079
|
-
), _ !==
|
|
20078
|
+
2 / (Math.log(X.far + 1) / Math.LN2)
|
|
20079
|
+
), _ !== X && (_ = X, sn = !0, qr = !0), fe.isShaderMaterial || fe.isMeshPhongMaterial || fe.isMeshToonMaterial || fe.isMeshStandardMaterial || fe.envMap) {
|
|
20080
20080
|
const xn = Tt.map.cameraPosition;
|
|
20081
20081
|
xn !== void 0 && xn.setValue(
|
|
20082
20082
|
ie,
|
|
20083
|
-
J.setFromMatrixPosition(
|
|
20083
|
+
J.setFromMatrixPosition(X.matrixWorld)
|
|
20084
20084
|
);
|
|
20085
20085
|
}
|
|
20086
|
-
(fe.isMeshPhongMaterial || fe.isMeshToonMaterial || fe.isMeshLambertMaterial || fe.isMeshBasicMaterial || fe.isMeshStandardMaterial || fe.isShaderMaterial) && Tt.setValue(ie, "isOrthographic",
|
|
20086
|
+
(fe.isMeshPhongMaterial || fe.isMeshToonMaterial || fe.isMeshLambertMaterial || fe.isMeshBasicMaterial || fe.isMeshStandardMaterial || fe.isShaderMaterial) && Tt.setValue(ie, "isOrthographic", X.isOrthographicCamera === !0), (fe.isMeshPhongMaterial || fe.isMeshToonMaterial || fe.isMeshLambertMaterial || fe.isMeshBasicMaterial || fe.isMeshStandardMaterial || fe.isShaderMaterial || fe.isShadowMaterial || we.isSkinnedMesh) && Tt.setValue(ie, "viewMatrix", X.matrixWorldInverse);
|
|
20087
20087
|
}
|
|
20088
20088
|
if (we.isSkinnedMesh) {
|
|
20089
20089
|
Tt.setOptional(ie, we, "bindMatrix"), Tt.setOptional(ie, we, "bindMatrixInverse");
|
|
20090
20090
|
const xn = we.skeleton;
|
|
20091
|
-
xn && (
|
|
20091
|
+
xn && (Z.floatVertexTextures ? (xn.boneTexture === null && xn.computeBoneTexture(), Tt.setValue(ie, "boneTexture", xn.boneTexture, H), Tt.setValue(ie, "boneTextureSize", xn.boneTextureSize)) : Tt.setOptional(ie, xn, "boneMatrices"));
|
|
20092
20092
|
}
|
|
20093
20093
|
return (sn || We.receiveShadow !== we.receiveShadow) && (We.receiveShadow = we.receiveShadow, Tt.setValue(ie, "receiveShadow", we.receiveShadow)), sn && (Tt.setValue(ie, "toneMappingExposure", u.toneMappingExposure), We.needsLights && $e(Qr, qr), Ae && fe.fog && $.refreshFogUniforms(Qr, Ae), $.refreshMaterialUniforms(Qr, fe, I, T, z), Ir.upload(ie, We.uniformsList, Qr, H)), fe.isShaderMaterial && fe.uniformsNeedUpdate === !0 && (Ir.upload(ie, We.uniformsList, Qr, H), fe.uniformsNeedUpdate = !1), fe.isSpriteMaterial && Tt.setValue(ie, "center", we.center), Tt.setValue(ie, "modelViewMatrix", we.modelViewMatrix), Tt.setValue(ie, "normalMatrix", we.normalMatrix), Tt.setValue(ie, "modelMatrix", we.matrixWorld), ht;
|
|
20094
20094
|
}
|
|
20095
|
-
function $e(
|
|
20096
|
-
|
|
20095
|
+
function $e(X, ge) {
|
|
20096
|
+
X.ambientLightColor.needsUpdate = ge, X.lightProbe.needsUpdate = ge, X.directionalLights.needsUpdate = ge, X.directionalLightShadows.needsUpdate = ge, X.pointLights.needsUpdate = ge, X.pointLightShadows.needsUpdate = ge, X.spotLights.needsUpdate = ge, X.spotLightShadows.needsUpdate = ge, X.rectAreaLights.needsUpdate = ge, X.hemisphereLights.needsUpdate = ge;
|
|
20097
20097
|
}
|
|
20098
|
-
function ct(
|
|
20099
|
-
return
|
|
20098
|
+
function ct(X) {
|
|
20099
|
+
return X.isMeshLambertMaterial || X.isMeshToonMaterial || X.isMeshPhongMaterial || X.isMeshStandardMaterial || X.isShadowMaterial || X.isShaderMaterial && X.lights === !0;
|
|
20100
20100
|
}
|
|
20101
20101
|
this.getActiveCubeFace = function() {
|
|
20102
20102
|
return v;
|
|
@@ -20104,21 +20104,21 @@ function wt(n = {}) {
|
|
|
20104
20104
|
return m;
|
|
20105
20105
|
}, this.getRenderTarget = function() {
|
|
20106
20106
|
return x;
|
|
20107
|
-
}, this.setRenderTarget = function(
|
|
20108
|
-
x =
|
|
20107
|
+
}, this.setRenderTarget = function(X, ge = 0, fe = 0) {
|
|
20108
|
+
x = X, v = ge, m = fe, X && U.get(X).__webglFramebuffer === void 0 && H.setupRenderTarget(X);
|
|
20109
20109
|
let we = null, Ae = !1, me = !1;
|
|
20110
|
-
if (
|
|
20111
|
-
const Pe =
|
|
20110
|
+
if (X) {
|
|
20111
|
+
const Pe = X.texture;
|
|
20112
20112
|
(Pe.isDataTexture3D || Pe.isDataTexture2DArray) && (me = !0);
|
|
20113
|
-
const Ge = U.get(
|
|
20114
|
-
|
|
20113
|
+
const Ge = U.get(X).__webglFramebuffer;
|
|
20114
|
+
X.isWebGLCubeRenderTarget ? (we = Ge[ge], Ae = !0) : X.isWebGLMultisampleRenderTarget ? we = U.get(X).__webglMultisampledFramebuffer : we = Ge, w.copy(X.viewport), A.copy(X.scissor), S = X.scissorTest;
|
|
20115
20115
|
} else
|
|
20116
20116
|
w.copy(C).multiplyScalar(I).floor(), A.copy(O).multiplyScalar(I).floor(), S = b;
|
|
20117
|
-
if (j.bindFramebuffer(36160, we) &&
|
|
20117
|
+
if (j.bindFramebuffer(36160, we) && Z.drawBuffers) {
|
|
20118
20118
|
let Pe = !1;
|
|
20119
|
-
if (
|
|
20120
|
-
if (
|
|
20121
|
-
const Ge =
|
|
20119
|
+
if (X)
|
|
20120
|
+
if (X.isWebGLMultipleRenderTargets) {
|
|
20121
|
+
const Ge = X.texture;
|
|
20122
20122
|
if (P.length !== Ge.length || P[0] !== 36064) {
|
|
20123
20123
|
for (let We = 0, et = Ge.length; We < et; We++)
|
|
20124
20124
|
P[We] = 36064 + We;
|
|
@@ -20128,55 +20128,55 @@ function wt(n = {}) {
|
|
|
20128
20128
|
(P.length !== 1 || P[0] !== 36064) && (P[0] = 36064, P.length = 1, Pe = !0);
|
|
20129
20129
|
else
|
|
20130
20130
|
(P.length !== 1 || P[0] !== 1029) && (P[0] = 1029, P.length = 1, Pe = !0);
|
|
20131
|
-
Pe && (
|
|
20131
|
+
Pe && (Z.isWebGL2 ? ie.drawBuffers(P) : W.get("WEBGL_draw_buffers").drawBuffersWEBGL(P));
|
|
20132
20132
|
}
|
|
20133
20133
|
if (j.viewport(w), j.scissor(A), j.setScissorTest(S), Ae) {
|
|
20134
|
-
const Pe = U.get(
|
|
20134
|
+
const Pe = U.get(X.texture);
|
|
20135
20135
|
ie.framebufferTexture2D(36160, 36064, 34069 + ge, Pe.__webglTexture, fe);
|
|
20136
20136
|
} else if (me) {
|
|
20137
|
-
const Pe = U.get(
|
|
20137
|
+
const Pe = U.get(X.texture), Ge = ge || 0;
|
|
20138
20138
|
ie.framebufferTextureLayer(36160, 36064, Pe.__webglTexture, fe || 0, Ge);
|
|
20139
20139
|
}
|
|
20140
|
-
}, this.readRenderTargetPixels = function(
|
|
20141
|
-
if (!(
|
|
20140
|
+
}, this.readRenderTargetPixels = function(X, ge, fe, we, Ae, me, _e) {
|
|
20141
|
+
if (!(X && X.isWebGLRenderTarget)) {
|
|
20142
20142
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
20143
20143
|
return;
|
|
20144
20144
|
}
|
|
20145
|
-
let Pe = U.get(
|
|
20146
|
-
if (
|
|
20145
|
+
let Pe = U.get(X).__webglFramebuffer;
|
|
20146
|
+
if (X.isWebGLCubeRenderTarget && _e !== void 0 && (Pe = Pe[_e]), Pe) {
|
|
20147
20147
|
j.bindFramebuffer(36160, Pe);
|
|
20148
20148
|
try {
|
|
20149
|
-
const Ge =
|
|
20149
|
+
const Ge = X.texture, We = Ge.format, et = Ge.type;
|
|
20150
20150
|
if (We !== Gn && pe.convert(We) !== ie.getParameter(35739)) {
|
|
20151
20151
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
|
|
20152
20152
|
return;
|
|
20153
20153
|
}
|
|
20154
|
-
const Ye = et === vs && (W.has("EXT_color_buffer_half_float") ||
|
|
20154
|
+
const Ye = et === vs && (W.has("EXT_color_buffer_half_float") || Z.isWebGL2 && W.has("EXT_color_buffer_float"));
|
|
20155
20155
|
if (et !== Ss && pe.convert(et) !== ie.getParameter(35738) && // Edge and Chrome Mac < 52 (#9513)
|
|
20156
|
-
!(et === Yi && (
|
|
20156
|
+
!(et === Yi && (Z.isWebGL2 || W.has("OES_texture_float") || W.has("WEBGL_color_buffer_float"))) && // Chrome Mac >= 52 and Firefox
|
|
20157
20157
|
!Ye) {
|
|
20158
20158
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
20159
20159
|
return;
|
|
20160
20160
|
}
|
|
20161
|
-
ie.checkFramebufferStatus(36160) === 36053 ? ge >= 0 && ge <=
|
|
20161
|
+
ie.checkFramebufferStatus(36160) === 36053 ? ge >= 0 && ge <= X.width - we && fe >= 0 && fe <= X.height - Ae && ie.readPixels(ge, fe, we, Ae, pe.convert(We), pe.convert(et), me) : console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");
|
|
20162
20162
|
} finally {
|
|
20163
20163
|
const Ge = x !== null ? U.get(x).__webglFramebuffer : null;
|
|
20164
20164
|
j.bindFramebuffer(36160, Ge);
|
|
20165
20165
|
}
|
|
20166
20166
|
}
|
|
20167
|
-
}, this.copyFramebufferToTexture = function(
|
|
20167
|
+
}, this.copyFramebufferToTexture = function(X, ge, fe = 0) {
|
|
20168
20168
|
const we = Math.pow(2, -fe), Ae = Math.floor(ge.image.width * we), me = Math.floor(ge.image.height * we);
|
|
20169
20169
|
let _e = pe.convert(ge.format);
|
|
20170
|
-
|
|
20171
|
-
}, this.copyTextureToTexture = function(
|
|
20170
|
+
Z.isWebGL2 && (_e === 6407 && (_e = 32849), _e === 6408 && (_e = 32856)), H.setTexture2D(ge, 0), ie.copyTexImage2D(3553, fe, _e, X.x, X.y, Ae, me, 0), j.unbindTexture();
|
|
20171
|
+
}, this.copyTextureToTexture = function(X, ge, fe, we = 0) {
|
|
20172
20172
|
const Ae = ge.image.width, me = ge.image.height, _e = pe.convert(fe.format), Pe = pe.convert(fe.type);
|
|
20173
|
-
H.setTexture2D(fe, 0), ie.pixelStorei(37440, fe.flipY), ie.pixelStorei(37441, fe.premultiplyAlpha), ie.pixelStorei(3317, fe.unpackAlignment), ge.isDataTexture ? ie.texSubImage2D(3553, we,
|
|
20174
|
-
}, this.copyTextureToTexture3D = function(
|
|
20173
|
+
H.setTexture2D(fe, 0), ie.pixelStorei(37440, fe.flipY), ie.pixelStorei(37441, fe.premultiplyAlpha), ie.pixelStorei(3317, fe.unpackAlignment), ge.isDataTexture ? ie.texSubImage2D(3553, we, X.x, X.y, Ae, me, _e, Pe, ge.image.data) : ge.isCompressedTexture ? ie.compressedTexSubImage2D(3553, we, X.x, X.y, ge.mipmaps[0].width, ge.mipmaps[0].height, _e, ge.mipmaps[0].data) : ie.texSubImage2D(3553, we, X.x, X.y, _e, Pe, ge.image), we === 0 && fe.generateMipmaps && ie.generateMipmap(3553), j.unbindTexture();
|
|
20174
|
+
}, this.copyTextureToTexture3D = function(X, ge, fe, we, Ae = 0) {
|
|
20175
20175
|
if (u.isWebGL1Renderer) {
|
|
20176
20176
|
console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");
|
|
20177
20177
|
return;
|
|
20178
20178
|
}
|
|
20179
|
-
const me =
|
|
20179
|
+
const me = X.max.x - X.min.x + 1, _e = X.max.y - X.min.y + 1, Pe = X.max.z - X.min.z + 1, Ge = pe.convert(we.format), We = pe.convert(we.type);
|
|
20180
20180
|
let et;
|
|
20181
20181
|
if (we.isDataTexture3D)
|
|
20182
20182
|
H.setTexture3D(we, 0), et = 32879;
|
|
@@ -20188,9 +20188,9 @@ function wt(n = {}) {
|
|
|
20188
20188
|
}
|
|
20189
20189
|
ie.pixelStorei(37440, we.flipY), ie.pixelStorei(37441, we.premultiplyAlpha), ie.pixelStorei(3317, we.unpackAlignment);
|
|
20190
20190
|
const Ye = ie.getParameter(3314), ht = ie.getParameter(32878), Vt = ie.getParameter(3316), sn = ie.getParameter(3315), qr = ie.getParameter(32877), Tt = fe.isCompressedTexture ? fe.mipmaps[0] : fe.image;
|
|
20191
|
-
ie.pixelStorei(3314, Tt.width), ie.pixelStorei(32878, Tt.height), ie.pixelStorei(3316,
|
|
20192
|
-
}, this.initTexture = function(
|
|
20193
|
-
H.setTexture2D(
|
|
20191
|
+
ie.pixelStorei(3314, Tt.width), ie.pixelStorei(32878, Tt.height), ie.pixelStorei(3316, X.min.x), ie.pixelStorei(3315, X.min.y), ie.pixelStorei(32877, X.min.z), fe.isDataTexture || fe.isDataTexture3D ? ie.texSubImage3D(et, Ae, ge.x, ge.y, ge.z, me, _e, Pe, Ge, We, Tt.data) : fe.isCompressedTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), ie.compressedTexSubImage3D(et, Ae, ge.x, ge.y, ge.z, me, _e, Pe, Ge, Tt.data)) : ie.texSubImage3D(et, Ae, ge.x, ge.y, ge.z, me, _e, Pe, Ge, We, Tt), ie.pixelStorei(3314, Ye), ie.pixelStorei(32878, ht), ie.pixelStorei(3316, Vt), ie.pixelStorei(3315, sn), ie.pixelStorei(32877, qr), Ae === 0 && we.generateMipmaps && ie.generateMipmap(et), j.unbindTexture();
|
|
20192
|
+
}, this.initTexture = function(X) {
|
|
20193
|
+
H.setTexture2D(X, 0), j.unbindTexture();
|
|
20194
20194
|
}, this.resetState = function() {
|
|
20195
20195
|
v = 0, m = 0, x = null, j.reset(), xe.reset();
|
|
20196
20196
|
}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
@@ -22243,7 +22243,7 @@ class mi extends Ke {
|
|
|
22243
22243
|
se < 0 && (se = U.length - 1);
|
|
22244
22244
|
for (let V = 0, D = d + y * 2; V < D; V++) {
|
|
22245
22245
|
const $ = b * V, Y = b * (V + 1), ee = H + le + $, ue = H + se + $, Me = H + se + Y, Se = H + le + Y;
|
|
22246
|
-
|
|
22246
|
+
Z(ee, ue, Me, Se);
|
|
22247
22247
|
}
|
|
22248
22248
|
}
|
|
22249
22249
|
}
|
|
@@ -22255,7 +22255,7 @@ class mi extends Ke {
|
|
|
22255
22255
|
const le = r.length / 3, se = m.generateTopUV(i, r, le - 3, le - 2, le - 1);
|
|
22256
22256
|
re(se[0]), re(se[1]), re(se[2]);
|
|
22257
22257
|
}
|
|
22258
|
-
function
|
|
22258
|
+
function Z(U, H, K, le) {
|
|
22259
22259
|
j(U), j(H), j(le), j(H), j(K), j(le);
|
|
22260
22260
|
const se = r.length / 3, V = m.generateSideWallUV(i, r, se - 6, se - 3, se - 2, se - 1);
|
|
22261
22261
|
re(V[0]), re(V[1]), re(V[3]), re(V[1]), re(V[2]), re(V[3]);
|
|
@@ -31413,7 +31413,7 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31413
31413
|
/* 2 */
|
|
31414
31414
|
/***/
|
|
31415
31415
|
(o) => {
|
|
31416
|
-
o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.13.
|
|
31416
|
+
o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.13.2","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"}}');
|
|
31417
31417
|
},
|
|
31418
31418
|
/* 3 */
|
|
31419
31419
|
/***/
|
|
@@ -31567,11 +31567,11 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31567
31567
|
G && (N[T] = Array(G.length).fill().map(() => []));
|
|
31568
31568
|
}
|
|
31569
31569
|
for (var J = Math.log10(1 / R), ne = Math.pow(10, J), F = 0; F < C; F++) {
|
|
31570
|
-
for (var ae = E ? E.getX(F) : F, ie = "", oe = 0, z = b.length; oe < z; oe++) for (var T = b[oe], W = S.getAttribute(T),
|
|
31570
|
+
for (var ae = E ? E.getX(F) : F, ie = "", oe = 0, z = b.length; oe < z; oe++) for (var T = b[oe], W = S.getAttribute(T), Z = W.itemSize, j = 0; j < Z; j++)
|
|
31571
31571
|
ie += "".concat(~~(W[B[j]](ae) * ne), ",");
|
|
31572
31572
|
if (ie in I) ue.push(I[ie]);
|
|
31573
31573
|
else {
|
|
31574
|
-
for (var oe = 0, z = b.length; oe < z; oe++) for (var re, T = b[oe], W = S.getAttribute(T), G = S.morphAttributes[T],
|
|
31574
|
+
for (var oe = 0, z = b.length; oe < z; oe++) for (var re, T = b[oe], W = S.getAttribute(T), G = S.morphAttributes[T], Z = W.itemSize, U = P[T], H = N[T], j = 0; j < Z; j++) if (re = B[j], U.push(W[re](ae)), G) for (var K = 0, le = G.length; K < le; K++) H[K].push(G[K][re](ae));
|
|
31575
31575
|
I[ie] = O, ue.push(O), O++;
|
|
31576
31576
|
}
|
|
31577
31577
|
}
|
|
@@ -31787,7 +31787,7 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31787
31787
|
for (var z = 0, G = I.length; z < G; z++) {
|
|
31788
31788
|
var J = I[z], ne = void 0, ae = void 0, ie = J.vertexNormals, oe = J.vertexColors, W = new y(J.a + w, J.b + w, J.c + w);
|
|
31789
31789
|
W.normal.copy(J.normal), _ !== void 0 && W.normal.applyMatrix3(_).normalize();
|
|
31790
|
-
for (var
|
|
31790
|
+
for (var Z = 0, j = ie.length; Z < j; Z++) ne = ie[Z].clone(), _ !== void 0 && ne.applyMatrix3(_).normalize(), W.vertexNormals.push(ne);
|
|
31791
31791
|
W.color.copy(J.color);
|
|
31792
31792
|
for (var re = 0, U = oe.length; re < U; re++) ae = oe[re], W.vertexColors.push(ae.clone());
|
|
31793
31793
|
W.materialIndex = J.materialIndex + M, T.push(W);
|
|
@@ -31869,8 +31869,8 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31869
31869
|
for (var E = [], L = [], C = {}, O = [], b = {}, P = [], N = {}, B = 0; B < this.faces.length; B++) {
|
|
31870
31870
|
var F = this.faces[B], z = !0, G = !1, J = this.faceVertexUvs[0][B] !== void 0, ne = 0 < F.normal.length(), ae = 0 < F.vertexNormals.length, ie = F.color.r !== 1 || F.color.g !== 1 || F.color.b !== 1, oe = 0 < F.vertexColors.length, W = 0;
|
|
31871
31871
|
if (W = m(W, 0, 0), W = m(W, 1, z), W = m(W, 2, G), W = m(W, 3, J), W = m(W, 4, ne), W = m(W, 5, ae), W = m(W, 6, ie), W = m(W, 7, oe), E.push(W), E.push(F.a, F.b, F.c), E.push(F.materialIndex), J) {
|
|
31872
|
-
var
|
|
31873
|
-
E.push(_(
|
|
31872
|
+
var Z = this.faceVertexUvs[0][B];
|
|
31873
|
+
E.push(_(Z[0]), _(Z[1]), _(Z[2]));
|
|
31874
31874
|
}
|
|
31875
31875
|
if (ne && E.push(x(F.normal)), ae) {
|
|
31876
31876
|
var j = F.vertexNormals;
|
|
@@ -31905,7 +31905,7 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31905
31905
|
}
|
|
31906
31906
|
if (J[ne].normals !== void 0) {
|
|
31907
31907
|
G.normals = [];
|
|
31908
|
-
for (var W = 0,
|
|
31908
|
+
for (var W = 0, Z = J[ne].normals.length; W < Z; W++) G.normals.push(J[ne].normals[W].clone());
|
|
31909
31909
|
}
|
|
31910
31910
|
this.morphTargets.push(G);
|
|
31911
31911
|
}
|
|
@@ -32101,7 +32101,7 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32101
32101
|
var oe = w[1][z];
|
|
32102
32102
|
oe === void 0 ? (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", z), this.uvs2.push(new l.Vector2(), new l.Vector2(), new l.Vector2())) : this.uvs2.push(oe[0], oe[1], oe[2]);
|
|
32103
32103
|
}
|
|
32104
|
-
for (var W,
|
|
32104
|
+
for (var W, Z = 0; Z < T; Z++) W = R[Z].vertices, x[Z].data.push(W[F.a], W[F.b], W[F.c]);
|
|
32105
32105
|
for (var j, re = 0; re < C; re++) j = L[re].vertexNormals[z], E[re].data.push(j.a, j.b, j.c);
|
|
32106
32106
|
N && this.skinIndices.push(b[F.a], b[F.b], b[F.c]), B && this.skinWeights.push(P[F.a], P[F.b], P[F.c]);
|
|
32107
32107
|
}
|
|
@@ -32469,9 +32469,9 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32469
32469
|
var W = g.distanceSqToSegment(O, b, N, P);
|
|
32470
32470
|
if (!(W > C)) {
|
|
32471
32471
|
N.applyMatrix4(this.matrixWorld);
|
|
32472
|
-
var
|
|
32473
|
-
|
|
32474
|
-
distance:
|
|
32472
|
+
var Z = w.ray.origin.distanceTo(N);
|
|
32473
|
+
Z < w.near || Z > w.far || A.push({
|
|
32474
|
+
distance: Z,
|
|
32475
32475
|
// What do we want? intersection point on the ray or on the segment??
|
|
32476
32476
|
// point: raycaster.ray.at( distance ),
|
|
32477
32477
|
point: P.clone().applyMatrix4(this.matrixWorld),
|
|
@@ -32708,7 +32708,7 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32708
32708
|
}
|
|
32709
32709
|
}
|
|
32710
32710
|
this.morph.instanceColor.needsUpdate = !0;
|
|
32711
|
-
},
|
|
32711
|
+
}, Z = () => {
|
|
32712
32712
|
var U = N, H = B, K = F, le = z, se = G, V = J, D = this.inbuildTime / this.duration * (M - 1), $ = Math.floor(D), Y = 1 - (D - $), ee = Math.ceil(D);
|
|
32713
32713
|
if (I) {
|
|
32714
32714
|
var ue = y[$.toString()], Me = y[ee.toString()], Se = g[$.toString()], he = g[ee.toString()], be = p[$.toString()], te = p[ee.toString()], pe = u[$.toString()], xe = u[ee.toString()], Ne = v[$.toString()], Ie = v[ee.toString()];
|
|
@@ -32773,16 +32773,16 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32773
32773
|
return this.cachedBoundingBox;
|
|
32774
32774
|
}
|
|
32775
32775
|
}, this.setMorphTime = (U) => {
|
|
32776
|
-
this.inbuildTime = U > this.duration ? this.duration : 0 > U ? 0 : U, (T || I) && (
|
|
32776
|
+
this.inbuildTime = U > this.duration ? this.duration : 0 > U ? 0 : U, (T || I) && (Z(), I && (this.markerUpdateRequired = !0));
|
|
32777
32777
|
}, this.isTimeVarying = () => !!((this.ready === !1 || 0 < M) && (T || I)), this.getCurrentTime = () => this.inbuildTime, this.setScaleAll = function(U) {
|
|
32778
|
-
this.globalScale = U,
|
|
32778
|
+
this.globalScale = U, Z();
|
|
32779
32779
|
}, this.dispose = () => {
|
|
32780
32780
|
for (var U = f.length - 1; 0 <= U; U--) f[U].dispose();
|
|
32781
32781
|
this.geometry && this.geometry.dispose(), this.morph && this.morph.material.dispose(), g = void 0, p = void 0, u = void 0, y = void 0, v = void 0, m = void 0, this.ready = !1, this.groupName = void 0;
|
|
32782
32782
|
}, this.render = (U, H, K) => {
|
|
32783
32783
|
if (H == !0) {
|
|
32784
32784
|
var le = this.inbuildTime + U;
|
|
32785
|
-
le > this.duration && (le -= this.duration), this.inbuildTime = le, (T || I) &&
|
|
32785
|
+
le > this.duration && (le -= this.duration), this.inbuildTime = le, (T || I) && Z();
|
|
32786
32786
|
}
|
|
32787
32787
|
this.updateMarker(H, K);
|
|
32788
32788
|
};
|
|
@@ -32818,9 +32818,11 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32818
32818
|
var N = P.type;
|
|
32819
32819
|
if (N !== void 0 && N.toLowerCase() === "object") return void console.error("THREE.JSONLoader: " + S + " should be loaded with THREE.ObjectLoader instead.");
|
|
32820
32820
|
}
|
|
32821
|
-
if (E && E.parse) {
|
|
32821
|
+
if (E && E.parse) try {
|
|
32822
32822
|
var B = E.parse(b, L);
|
|
32823
32823
|
R(B.geometry, B.materials);
|
|
32824
|
+
} catch (F) {
|
|
32825
|
+
if (console.error("The loader has encountered aon loading the geometry"), console.error(F), I) return void I({ responseURL: S });
|
|
32824
32826
|
}
|
|
32825
32827
|
}, T, I);
|
|
32826
32828
|
}, setTexturePath: function(S) {
|
|
@@ -32830,7 +32832,7 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32830
32832
|
function L(pe, xe) {
|
|
32831
32833
|
return pe & 1 << xe;
|
|
32832
32834
|
}
|
|
32833
|
-
var C, O, b, P, N, B, F, z, G, J, ne, ae, ie, oe, W,
|
|
32835
|
+
var C, O, b, P, N, B, F, z, G, J, ne, ae, ie, oe, W, Z, j, re, U, H, K, le, se, V, D, $, Y, ee = I.faces, ue = I.vertices, Me = I.normals, Se = I.colors, he = I.scale, be = 0;
|
|
32834
32836
|
if (I.uvs !== void 0) {
|
|
32835
32837
|
for (C = 0; C < I.uvs.length; C++) I.uvs[C].length && be++;
|
|
32836
32838
|
for (C = 0; C < be; C++) E.faceVertexUvs[C] = [];
|
|
@@ -32843,15 +32845,15 @@ const iz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32843
32845
|
if (Me) for (C = 0; C < Me.length; C++) E.normals[C] = Me[C];
|
|
32844
32846
|
if (Se) for (C = 0; C < Se.length; C++) E.colors[C] = Se[C];
|
|
32845
32847
|
for (; P < N; )
|
|
32846
|
-
if (J = ee[P++], ne = L(J, 0), ae = L(J, 1), ie = L(J, 3), oe = L(J, 4), W = L(J, 5),
|
|
32848
|
+
if (J = ee[P++], ne = L(J, 0), ae = L(J, 1), ie = L(J, 3), oe = L(J, 4), W = L(J, 5), Z = L(J, 6), j = L(J, 7), ne) {
|
|
32847
32849
|
if (H = new v(), H.a = ee[P], H.b = ee[P + 1], H.c = ee[P + 3], K = new v(), K.a = ee[P + 1], K.b = ee[P + 2], K.c = ee[P + 3], P += 4, ae && (G = ee[P++], H.materialIndex = G, K.materialIndex = G), b = E.faces.length, ie) for (C = 0; C < be; C++) for (V = I.uvs[C], E.faceVertexUvs[C][b] = [], E.faceVertexUvs[C][b + 1] = [], O = 0; 4 > O; O++) z = ee[P++], $ = V[2 * z], Y = V[2 * z + 1], D = new y($, Y), O !== 2 && E.faceVertexUvs[C][b].push(D), O !== 0 && E.faceVertexUvs[C][b + 1].push(D);
|
|
32848
32850
|
if (oe && (F = 3 * ee[P++], H.normal.set(Me[F++], Me[F++], Me[F]), K.normal.copy(H.normal)), W) for (C = 0; 4 > C; C++) F = 3 * ee[P++], se = new g(Me[F++], Me[F++], Me[F]), C !== 2 && H.vertexNormals.push(se), C !== 0 && K.vertexNormals.push(se);
|
|
32849
|
-
if (
|
|
32851
|
+
if (Z && (B = ee[P++], le = Se[B], H.color.setHex(le), K.color.setHex(le)), j) for (C = 0; 4 > C; C++) B = ee[P++], le = Se[B], C !== 2 && H.vertexColors.push(new u(le)), C !== 0 && K.vertexColors.push(new u(le));
|
|
32850
32852
|
E.faces.push(H), E.faces.push(K);
|
|
32851
32853
|
} else {
|
|
32852
32854
|
if (U = new v(), U.a = ee[P++], U.b = ee[P++], U.c = ee[P++], ae && (G = ee[P++], U.materialIndex = G), b = E.faces.length, ie) for (C = 0; C < be; C++) for (V = I.uvs[C], E.faceVertexUvs[C][b] = [], O = 0; 3 > O; O++) z = ee[P++], $ = V[2 * z], Y = V[2 * z + 1], D = new y($, Y), E.faceVertexUvs[C][b].push(D);
|
|
32853
32855
|
if (oe && (F = 3 * ee[P++], U.normal.set(Me[F++], Me[F++], Me[F])), W) for (C = 0; 3 > C; C++) F = 3 * ee[P++], se = new g(Me[F++], Me[F++], Me[F]), U.vertexNormals.push(se);
|
|
32854
|
-
if (
|
|
32856
|
+
if (Z && (B = ee[P++], U.color.setHex(Se[B])), j) for (C = 0; 3 > C; C++) B = ee[P++], U.vertexColors.push(new u(Se[B]));
|
|
32855
32857
|
E.faces.push(U);
|
|
32856
32858
|
}
|
|
32857
32859
|
}
|
|
@@ -33769,7 +33771,7 @@ void main() {
|
|
|
33769
33771
|
this.forcePickableObjectsUpdate = !1, this.uuid = m();
|
|
33770
33772
|
var W = new d(this);
|
|
33771
33773
|
W.disable(), b.add(W.group);
|
|
33772
|
-
var
|
|
33774
|
+
var Z = { main: [], mini: [] }, j = new l.Vector3(0, 0, 0), re = () => S ? typeof S.clientWidth > "u" ? S.width : S.clientWidth : 0, U = () => S ? typeof S.clientHeight > "u" ? S.height : S.clientHeight : 0;
|
|
33773
33775
|
this.getDownloadProgress = () => T.getDownloadProgress(), this.onWindowResize = () => {
|
|
33774
33776
|
var D = U();
|
|
33775
33777
|
this.camera.aspect = re() / D, this.camera.updateProjectionMatrix(), this.minimapScissor.updateRequired = !0, z.onResize(), z.calculateHeightPerPixelAtZeroDepth(D);
|
|
@@ -34016,28 +34018,28 @@ void main() {
|
|
|
34016
34018
|
}, this.enableMarkerCluster = (D) => {
|
|
34017
34019
|
D ? (W.markerUpdateRequired = !0, W.enable()) : (W.markerUpdateRequired = !1, W.disable()), this.forcePickableObjectsUpdate = !0;
|
|
34018
34020
|
}, this.destroyAxisDisplay = () => {
|
|
34019
|
-
this.displayMiniAxes = !1,
|
|
34021
|
+
this.displayMiniAxes = !1, Z.main && (this.enableAxisDisplay(!1, !1), Z.main.forEach((D) => {
|
|
34020
34022
|
D.dispose && D.dispose();
|
|
34021
|
-
})),
|
|
34023
|
+
})), Z.mini && (this.enableAxisDisplay(!1, !0), Z.mini.forEach((D) => {
|
|
34022
34024
|
D.dispose && D.dispose();
|
|
34023
|
-
})),
|
|
34025
|
+
})), Z = { main: [], mini: [] };
|
|
34024
34026
|
}, this.createAxisDisplay = function() {
|
|
34025
34027
|
var D = 0 < arguments.length && arguments[0] !== void 0 && arguments[0];
|
|
34026
34028
|
A.destroyAxisDisplay();
|
|
34027
34029
|
var $ = [{ name: "x", dir: new l.Vector3(1, 0, 0), colour: "red", hex: 16733525 }, { name: "y", dir: new l.Vector3(0, 1, 0), colour: "green", hex: 5635925 }, { name: "z", dir: new l.Vector3(0, 0, 1), colour: "blue", hex: 5592575 }], Y = A.getBoundingBox(), ee = Y.min.distanceTo(Y.max), ue = new l.Vector3(0, 0, 0);
|
|
34028
34030
|
D && ue.copy(Y.min), $.forEach((Me) => {
|
|
34029
34031
|
var Se = new l.ArrowHelper(Me.dir, ue, ee, Me.hex);
|
|
34030
|
-
|
|
34032
|
+
Z.main.push(Se);
|
|
34031
34033
|
var he = new l.ArrowHelper(Me.dir, Y.getCenter(j), ee / 2, Me.hex);
|
|
34032
|
-
|
|
34034
|
+
Z.mini.push(he);
|
|
34033
34035
|
var be = y(Me.name, 0.036, Me.colour, "Asap", 120, 700), te = Me.dir.clone().multiplyScalar(ee).add(ue);
|
|
34034
|
-
be.position.set(te.x, te.y, te.z),
|
|
34036
|
+
be.position.set(te.x, te.y, te.z), Z.main.push(be);
|
|
34035
34037
|
});
|
|
34036
34038
|
}, this.enableAxisDisplay = function(D) {
|
|
34037
34039
|
var $, Y = 1 < arguments.length && arguments[1] !== void 0 && arguments[1];
|
|
34038
|
-
Y && ($ =
|
|
34040
|
+
Y && ($ = Z) !== null && $ !== void 0 && ($ = $.mini) !== null && $ !== void 0 && $.length ? (A.displayMiniAxes = D, Z.mini.forEach((ee) => {
|
|
34039
34041
|
D ? P.add(ee) : P.remove(ee);
|
|
34040
|
-
})) : !Y &&
|
|
34042
|
+
})) : !Y && Z.main && Z.main.forEach((ee) => {
|
|
34041
34043
|
D ? b.add(ee) : b.remove(ee);
|
|
34042
34044
|
});
|
|
34043
34045
|
};
|
|
@@ -34156,27 +34158,27 @@ void main() {
|
|
|
34156
34158
|
this.toBeDownloaded = 0, this.progressMap = {};
|
|
34157
34159
|
var m = !1, x = !1, M = new u();
|
|
34158
34160
|
this.getDownloadProgress = () => {
|
|
34159
|
-
var W = 0,
|
|
34161
|
+
var W = 0, Z = 0, j = !1;
|
|
34160
34162
|
for (var re in this.progressMap) {
|
|
34161
34163
|
var U = this.progressMap[re];
|
|
34162
|
-
W += U[1],
|
|
34164
|
+
W += U[1], Z += U[0], U[1] == 0 && (j = !0);
|
|
34163
34165
|
}
|
|
34164
|
-
return j && (W = 0), [W,
|
|
34165
|
-
}, this.onProgress = (W) => (
|
|
34166
|
-
this.progressMap[W] = [
|
|
34167
|
-
}, this.onError = (W) => (
|
|
34168
|
-
--this.toBeDownloaded, x = !0, console.error("There is an issue with external resource
|
|
34166
|
+
return j && (W = 0), [W, Z, x];
|
|
34167
|
+
}, this.onProgress = (W) => (Z) => {
|
|
34168
|
+
this.progressMap[W] = [Z.loaded, Z.total];
|
|
34169
|
+
}, this.onError = (W) => (Z) => {
|
|
34170
|
+
--this.toBeDownloaded, x = !0, console.error("There is an issue with external resource ".concat(Z != null && Z.responseURL ? ": " + (Z == null ? void 0 : Z.responseURL) : "", ".")), W && W({ type: "Error", xhr: Z });
|
|
34169
34171
|
};
|
|
34170
|
-
var _ = (W,
|
|
34171
|
-
var j =
|
|
34172
|
-
if (
|
|
34172
|
+
var _ = (W, Z) => {
|
|
34173
|
+
var j = Z.Default;
|
|
34174
|
+
if (Z.Inline) v.setupMultipleViews(j, Z.Entries);
|
|
34173
34175
|
else {
|
|
34174
34176
|
var re = [], U = function(se) {
|
|
34175
34177
|
W && (newURL = h(K, W), re.push(new Promise((V, D) => {
|
|
34176
34178
|
fetch(newURL).then(($) => $.json()).then(($) => V({ key: se, data: $ })).catch(($) => D($));
|
|
34177
34179
|
})));
|
|
34178
34180
|
};
|
|
34179
|
-
for (var [H, K] of Object.entries(
|
|
34181
|
+
for (var [H, K] of Object.entries(Z.Entries)) U(H);
|
|
34180
34182
|
Promise.all(re).then((le) => {
|
|
34181
34183
|
var se = {};
|
|
34182
34184
|
le.forEach((D) => {
|
|
@@ -34187,87 +34189,87 @@ void main() {
|
|
|
34187
34189
|
});
|
|
34188
34190
|
}
|
|
34189
34191
|
};
|
|
34190
|
-
this.loadViewURL = (W,
|
|
34192
|
+
this.loadViewURL = (W, Z) => {
|
|
34191
34193
|
this.toBeDownloaded += 1;
|
|
34192
34194
|
var j = new XMLHttpRequest();
|
|
34193
34195
|
j.onreadystatechange = () => {
|
|
34194
34196
|
if (j.readyState == 4) if (j.status == 200) {
|
|
34195
34197
|
var U = JSON.parse(j.responseText);
|
|
34196
|
-
v.setupMultipleViews("default", { default: U }), v.resetView(), m = !0, --this.toBeDownloaded,
|
|
34197
|
-
} else this.onError();
|
|
34198
|
+
v.setupMultipleViews("default", { default: U }), v.resetView(), m = !0, --this.toBeDownloaded, Z != null && typeof Z == "function" && Z();
|
|
34199
|
+
} else this.onError(Z)({ responseURL: W });
|
|
34198
34200
|
};
|
|
34199
34201
|
var re = d(W);
|
|
34200
34202
|
j.open("GET", re, !0), j.send();
|
|
34201
|
-
}, this.loadModelsURL = (W,
|
|
34202
|
-
var le =
|
|
34203
|
+
}, this.loadModelsURL = (W, Z, j, re, U, H, K) => {
|
|
34204
|
+
var le = Z.length;
|
|
34203
34205
|
this.toBeDownloaded += le;
|
|
34204
34206
|
for (var se = 0; se < le; se++) {
|
|
34205
|
-
var V =
|
|
34207
|
+
var V = Z[se], D = c(0).defaultMaterialColor, $ = c(0).defaultOpacity;
|
|
34206
34208
|
j != null && j[se] != null && (D = !!j[se]), re != null && re[se] != null && ($ = re[se]);
|
|
34207
34209
|
var Y = 0;
|
|
34208
34210
|
U != null && U[se] != null && (Y = !!U[se]);
|
|
34209
34211
|
var ee = 0;
|
|
34210
34212
|
H != null && H[se] != null && (ee = !!H[se]), M.load(d(V), O(W, D, $, Y, ee, void 0, void 0, void 0, void 0, K), this.onProgress(V), this.onError(K));
|
|
34211
34213
|
}
|
|
34212
|
-
}, this.loadFromViewURL = (W,
|
|
34214
|
+
}, this.loadFromViewURL = (W, Z, j) => {
|
|
34213
34215
|
var re = new XMLHttpRequest();
|
|
34214
34216
|
re.onreadystatechange = () => {
|
|
34215
34217
|
if (re.readyState == 4 && re.status == 200) {
|
|
34216
34218
|
var H = JSON.parse(re.responseText);
|
|
34217
34219
|
v.loadView(H);
|
|
34218
|
-
for (var K, le = [], se =
|
|
34220
|
+
for (var K, le = [], se = Z + "_", V = 0; V < H.numberOfResources; V++) K = se + (V + 1) + ".json", le.push(K);
|
|
34219
34221
|
this.loadModelsURL(W, le, H.colour, H.opacity, H.timeEnabled, H.morphColour, j);
|
|
34220
34222
|
}
|
|
34221
34223
|
};
|
|
34222
|
-
var U = d(
|
|
34224
|
+
var U = d(Z + "_view.json");
|
|
34223
34225
|
re.open("GET", U, !0), re.send();
|
|
34224
34226
|
};
|
|
34225
|
-
var w = (W,
|
|
34227
|
+
var w = (W, Z, j, re, U, H, K, le) => (se, V) => {
|
|
34226
34228
|
var D = new (c(24)).Lines(), $ = void 0;
|
|
34227
|
-
V && V[0] && ($ = new l.LineBasicMaterial({ color: V[0].color.clone() }), 1 > V[0].opacity && ($.transparent = !0), $.opacity = V[0].opacity, $.morphTargets =
|
|
34228
|
-
var Y = { localTimeEnabled:
|
|
34229
|
+
V && V[0] && ($ = new l.LineBasicMaterial({ color: V[0].color.clone() }), 1 > V[0].opacity && ($.transparent = !0), $.opacity = V[0].opacity, $.morphTargets = Z, $.vertexColors = V[0].vertexColors);
|
|
34230
|
+
var Y = { localTimeEnabled: Z, localMorphColour: j };
|
|
34229
34231
|
if (D && (D.createLineSegment(se, $, Y), D.setName(re), D.anatomicalId = U, D.setRenderOrder(H), W.addZincObject(D), D.setDuration(v.getDuration()), K && K.levels)) for (var [ee, ue] of Object.entries(K.levels)) D.addLOD(M, ee, ue.URL, ue.Index, K.preload);
|
|
34230
34232
|
--this.toBeDownloaded, se.dispose(), le != null && typeof le == "function" && le(D);
|
|
34231
34233
|
};
|
|
34232
|
-
this.loadLinesURL = (W,
|
|
34234
|
+
this.loadLinesURL = (W, Z, j, re, U, H, K) => {
|
|
34233
34235
|
var le = 0;
|
|
34234
34236
|
this.toBeDownloaded += 1;
|
|
34235
34237
|
var se = !!(K && K.isInline) && K.isInline, V = K && K.anatomicalId ? K.anatomicalId : void 0, D = K && K.renderOrder ? K.renderOrder : void 0;
|
|
34236
34238
|
j != null && (le = !!j);
|
|
34237
34239
|
var $ = 0;
|
|
34238
34240
|
if (re != null && ($ = !!re), se) {
|
|
34239
|
-
var Y = M.parse(
|
|
34241
|
+
var Y = M.parse(Z);
|
|
34240
34242
|
w(W, le, $, U, V, D, K.lod, H)(Y.geometry, Y.materials);
|
|
34241
|
-
} else M.load(
|
|
34243
|
+
} else M.load(Z, w(W, le, $, U, V, D, K.lod, H), this.onProgress(Z), this.onError(H), K.loaderOptions);
|
|
34242
34244
|
};
|
|
34243
|
-
var A = (W,
|
|
34245
|
+
var A = (W, Z, j, re, U, H) => {
|
|
34244
34246
|
var K = H && H.isInline ? H.isInline : void 0, le = H && H.anatomicalId ? H.anatomicalId : void 0, se = H && H.displayLabels ? H.displayLabels : void 0, V = H && H.renderOrder ? H.renderOrder : void 0, D = new (c(18)).Glyphset();
|
|
34245
34247
|
D.setDuration(v.getDuration()), D.groupName = re;
|
|
34246
34248
|
var $ = () => {
|
|
34247
34249
|
--this.toBeDownloaded, U != null && typeof U == "function" && U(D);
|
|
34248
34250
|
};
|
|
34249
|
-
++this.toBeDownloaded, K ? D.load(
|
|
34250
|
-
}, S = (W,
|
|
34251
|
-
if (
|
|
34252
|
-
var K = JSON.parse(
|
|
34251
|
+
++this.toBeDownloaded, K ? D.load(Z, j, $, K, se) : D.load(Z, d(j), $, K, se), D.anatomicalId = le, D.setRenderOrder(V), W.addZincObject(D);
|
|
34252
|
+
}, S = (W, Z, j, re, U, H) => () => {
|
|
34253
|
+
if (Z.readyState == 4 && Z.status == 200) {
|
|
34254
|
+
var K = JSON.parse(Z.responseText);
|
|
34253
34255
|
A(W, K, j, re, U, H);
|
|
34254
34256
|
}
|
|
34255
|
-
}, R = (W,
|
|
34257
|
+
}, R = (W, Z, j, re, U, H, K) => (le, se) => {
|
|
34256
34258
|
var V = new (c(22)).Pointset(), D = new l.PointsMaterial({ alphaTest: 0.5, size: 10, sizeAttenuation: !1 });
|
|
34257
|
-
se && se[0] && (1 > se[0].opacity && (D.transparent = !0), D.opacity = se[0].opacity, D.color = se[0].color, D.morphTargets =
|
|
34259
|
+
se && se[0] && (1 > se[0].opacity && (D.transparent = !0), D.opacity = se[0].opacity, D.color = se[0].color, D.morphTargets = Z, D.vertexColors = se[0].vertexColors);
|
|
34258
34260
|
var $ = {};
|
|
34259
|
-
$.localTimeEnabled =
|
|
34261
|
+
$.localTimeEnabled = Z, $.localMorphColour = j, V && (V.createMesh(le, D, $), V.setName(re), V.anatomicalId = U, W.addZincObject(V), V.setDuration(v.getDuration()), V.setRenderOrder(H)), le.dispose(), --this.toBeDownloaded, K != null && typeof K == "function" && K(V);
|
|
34260
34262
|
};
|
|
34261
|
-
this.loadSTL = (W,
|
|
34263
|
+
this.loadSTL = (W, Z, j, re) => {
|
|
34262
34264
|
this.toBeDownloaded += 1;
|
|
34263
34265
|
var U = c(0).defaultMaterialColor, H = c(0).defaultOpacity, K = new g();
|
|
34264
|
-
K.crossOrigin = "Anonymous", K.load(d(
|
|
34265
|
-
}, this.loadOBJ = (W,
|
|
34266
|
+
K.crossOrigin = "Anonymous", K.load(d(Z), O(W, U, H, !1, !1, j, void 0, void 0, void 0, re));
|
|
34267
|
+
}, this.loadOBJ = (W, Z, j, re) => {
|
|
34266
34268
|
this.toBeDownloaded += 1;
|
|
34267
34269
|
var U = c(0).defaultMaterialColor, H = c(0).defaultOpacity, K = new p();
|
|
34268
|
-
K.crossOrigin = "Anonymous", K.load(d(
|
|
34270
|
+
K.crossOrigin = "Anonymous", K.load(d(Z), O(W, U, H, !1, !1, j, void 0, void 0, void 0, re));
|
|
34269
34271
|
};
|
|
34270
|
-
var T = (W,
|
|
34272
|
+
var T = (W, Z, j, re, U, H, K) => {
|
|
34271
34273
|
this.toBeDownloaded += 1;
|
|
34272
34274
|
var le = c(0).defaultMaterialColor, se = c(0).defaultOpacity, V = 0, D = !!(K && K.isInline) && K.isInline, $ = K && K.fileFormat ? K.fileFormat : void 0, Y = K && K.anatomicalId ? K.anatomicalId : void 0, ee = K && K.renderOrder ? K.renderOrder : void 0;
|
|
34273
34275
|
j != null && (V = !!j);
|
|
@@ -34276,37 +34278,37 @@ void main() {
|
|
|
34276
34278
|
var Me = M;
|
|
34277
34279
|
if ($ !== void 0) {
|
|
34278
34280
|
if ($ == "STL") Me = new g();
|
|
34279
|
-
else if ($ == "OBJ") return Me = new p(), Me.crossOrigin = "Anonymous", void Me.load(
|
|
34281
|
+
else if ($ == "OBJ") return Me = new p(), Me.crossOrigin = "Anonymous", void Me.load(Z, objloader(W, le, se, V, ue, U, Y, H), this.onProgress(Z), this.onError, K.loaderOptions);
|
|
34280
34282
|
}
|
|
34281
34283
|
if (D) {
|
|
34282
|
-
var Se = M.parse(
|
|
34284
|
+
var Se = M.parse(Z);
|
|
34283
34285
|
O(W, le, se, V, ue, U, Y, ee, K, H)(Se.geometry, Se.materials);
|
|
34284
|
-
} else Me.crossOrigin = "Anonymous", M.load(
|
|
34285
|
-
}, I = function(
|
|
34286
|
+
} else Me.crossOrigin = "Anonymous", M.load(Z, O(W, le, se, V, ue, U, Y, ee, K, H), this.onProgress(Z), this.onError(H), K.loaderOptions);
|
|
34287
|
+
}, I = function(Z, j, re) {
|
|
34286
34288
|
var U = 0;
|
|
34287
34289
|
return (H) => {
|
|
34288
|
-
if (++U, H && j != null && typeof j == "function" && j(H), U ==
|
|
34290
|
+
if (++U, H && j != null && typeof j == "function" && j(H), U == Z && (m == !1 && v.viewAll(), re != null && typeof re == "function")) {
|
|
34289
34291
|
re();
|
|
34290
34292
|
var K = v.getZincCameraControls();
|
|
34291
34293
|
K && K.calculateMaxAllowedDistance(v);
|
|
34292
34294
|
}
|
|
34293
34295
|
};
|
|
34294
34296
|
};
|
|
34295
|
-
this.loadPointsetURL = (W,
|
|
34297
|
+
this.loadPointsetURL = (W, Z, j, re, U, H, K) => {
|
|
34296
34298
|
var le = 0;
|
|
34297
34299
|
this.toBeDownloaded += 1, j != null && (le = !!j);
|
|
34298
34300
|
var se = 0;
|
|
34299
34301
|
re != null && (se = !!re);
|
|
34300
34302
|
var V = !!(K && K.isInline) && K.isInline, D = K && K.anatomicalId ? K.anatomicalId : void 0, $ = K && K.renderOrder ? K.renderOrder : void 0;
|
|
34301
34303
|
if (V) {
|
|
34302
|
-
var Y = M.parse(
|
|
34304
|
+
var Y = M.parse(Z);
|
|
34303
34305
|
R(W, le, se, U, D, $, H)(Y.geometry, Y.materials);
|
|
34304
|
-
} else M.load(
|
|
34306
|
+
} else M.load(Z, R(W, le, se, U, D, $, H), this.onProgress(Z), this.onError(H), K.loaderOptions);
|
|
34305
34307
|
};
|
|
34306
|
-
var E = (W,
|
|
34308
|
+
var E = (W, Z, j, re, U, H) => {
|
|
34307
34309
|
var K = H && H.isInline ? H.isInline : void 0, le = H && H.anatomicalId ? H.anatomicalId : void 0, se = H && H.renderOrder ? H.renderOrder : void 0, V = void 0;
|
|
34308
34310
|
if (j) {
|
|
34309
|
-
if (
|
|
34311
|
+
if (Z && j.images && j.images.source) for (var D, $ = j.images.source, Y = 0; Y < $.length; Y++) D = h($[Y], Z), j.images.source[Y] = D;
|
|
34310
34312
|
if (j.type === "slides" && (V = new (c(27)).TextureSlides()), V) {
|
|
34311
34313
|
V.groupName = re;
|
|
34312
34314
|
var ee = () => {
|
|
@@ -34315,45 +34317,45 @@ void main() {
|
|
|
34315
34317
|
++this.toBeDownloaded, V.load(j, ee, K), V.anatomicalId = le, V.setRenderOrder(se), W.addZincObject(V);
|
|
34316
34318
|
}
|
|
34317
34319
|
}
|
|
34318
|
-
}, L = (W,
|
|
34319
|
-
if (
|
|
34320
|
-
var H = JSON.parse(
|
|
34321
|
-
E(W,
|
|
34320
|
+
}, L = (W, Z, j, re, U) => () => {
|
|
34321
|
+
if (Z.readyState == 4 && Z.status == 200) {
|
|
34322
|
+
var H = JSON.parse(Z.responseText);
|
|
34323
|
+
E(W, Z.responseURL, H, j, re, U);
|
|
34322
34324
|
}
|
|
34323
34325
|
};
|
|
34324
|
-
this.loadTextureURL = (W,
|
|
34326
|
+
this.loadTextureURL = (W, Z, j, re, U) => {
|
|
34325
34327
|
var H = !!(U && U.isInline) && U.isInline;
|
|
34326
|
-
if (H) E(W, void 0,
|
|
34328
|
+
if (H) E(W, void 0, Z, j, re, U);
|
|
34327
34329
|
else {
|
|
34328
34330
|
var K = new XMLHttpRequest();
|
|
34329
|
-
K.onreadystatechange = L(W, K, j, re, U), K.open("GET", d(
|
|
34331
|
+
K.onreadystatechange = L(W, K, j, re, U), K.open("GET", d(Z), !0), K.send();
|
|
34330
34332
|
}
|
|
34331
|
-
}, this.loadGlyphsetURL = (W,
|
|
34333
|
+
}, this.loadGlyphsetURL = (W, Z, j, re, U, H) => {
|
|
34332
34334
|
var K = !!(H && H.isInline) && H.isInline;
|
|
34333
|
-
if (K) A(W,
|
|
34335
|
+
if (K) A(W, Z, j, re, U, H);
|
|
34334
34336
|
else {
|
|
34335
34337
|
var le = new XMLHttpRequest();
|
|
34336
|
-
le.onreadystatechange = S(W, le, j, re, U, H), le.open("GET", d(
|
|
34338
|
+
le.onreadystatechange = S(W, le, j, re, U, H), le.open("GET", d(Z), !0), le.send();
|
|
34337
34339
|
}
|
|
34338
34340
|
};
|
|
34339
|
-
var C = (W,
|
|
34341
|
+
var C = (W, Z, j, re, U, H, K, le, se) => {
|
|
34340
34342
|
var V = { colour: j, opacity: re, localTimeEnabled: U, localMorphColour: H }, D = new (c(3)).Geometry();
|
|
34341
|
-
return D.createMesh(
|
|
34342
|
-
}, O = (W,
|
|
34343
|
+
return D.createMesh(Z, le, V), D.getMorph() ? (D.setName(se), W && W.addZincObject(D), D.setDuration(v.getDuration()), D.videoHandler && v.setVideoHandler(D.videoHandler), D) : void 0;
|
|
34344
|
+
}, O = (W, Z, j, re, U, H, K, le, se, V) => (D, $) => {
|
|
34343
34345
|
var Y;
|
|
34344
34346
|
$ && $[0] && (Y = $[0]);
|
|
34345
|
-
var ee = C(W, D,
|
|
34347
|
+
var ee = C(W, D, Z, j, re, U, void 0, Y, H);
|
|
34346
34348
|
if (ee.anatomicalId = K, ee.setRenderOrder(le), se.lod && se.lod.levels) for (var [ue, Me] of Object.entries(se.lod.levels)) ee.addLOD(M, ue, Me.URL, Me.Index, se.lod.preload);
|
|
34347
34349
|
--this.toBeDownloaded, D.dispose(), V != null && typeof V == "function" && V(ee);
|
|
34348
34350
|
}, b = (W) => {
|
|
34349
|
-
var
|
|
34351
|
+
var Z = /P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/, [, j, re, U, H, K, le, se] = W.match(Z);
|
|
34350
34352
|
return { years: j, months: re, weeks: U, days: H, hours: K, mins: le, secs: se };
|
|
34351
34353
|
};
|
|
34352
34354
|
this.loadSettings = (W) => {
|
|
34353
34355
|
if (W) {
|
|
34354
34356
|
if (W.Duration) {
|
|
34355
|
-
var
|
|
34356
|
-
v.setDurationFromObject(
|
|
34357
|
+
var Z = b(W.Duration);
|
|
34358
|
+
v.setDurationFromObject(Z);
|
|
34357
34359
|
}
|
|
34358
34360
|
if (W.OriginalDuration) {
|
|
34359
34361
|
var j = b(W.OriginalDuration);
|
|
@@ -34365,14 +34367,14 @@ void main() {
|
|
|
34365
34367
|
}
|
|
34366
34368
|
}
|
|
34367
34369
|
};
|
|
34368
|
-
var P = (W,
|
|
34370
|
+
var P = (W, Z, j, re, U) => {
|
|
34369
34371
|
if (j) {
|
|
34370
34372
|
var H = void 0, K = !1;
|
|
34371
|
-
j.URL ? (H = j.URL,
|
|
34373
|
+
j.URL ? (H = j.URL, Z && (H = h(H, Z))) : j.Inline && (H = j.Inline.URL, K = !0);
|
|
34372
34374
|
var le = {};
|
|
34373
34375
|
if (j.LOD && j.LOD.Levels) {
|
|
34374
34376
|
le.preload = !!j.LOD.Preload, le.levels = {};
|
|
34375
|
-
for (var [se, V] of Object.entries(j.LOD.Levels)) le.levels[se] = {}, le.levels[se].URL = h(V.URL,
|
|
34377
|
+
for (var [se, V] of Object.entries(j.LOD.Levels)) le.levels[se] = {}, le.levels[se].URL = h(V.URL, Z), le.levels[se].Index = V.Index;
|
|
34376
34378
|
}
|
|
34377
34379
|
var D = j.GroupName;
|
|
34378
34380
|
(D === void 0 || D === "") && (D = "_Unnamed");
|
|
@@ -34383,7 +34385,7 @@ void main() {
|
|
|
34383
34385
|
break;
|
|
34384
34386
|
case "Glyph":
|
|
34385
34387
|
var Y;
|
|
34386
|
-
K ? Y = j.Inline.GlyphGeometriesURL : (Y = j.GlyphGeometriesURL, Y = h(j.GlyphGeometriesURL,
|
|
34388
|
+
K ? Y = j.Inline.GlyphGeometriesURL : (Y = j.GlyphGeometriesURL, Y = h(j.GlyphGeometriesURL, Z)), j.DisplayLabels && ($.displayLabels = !0), this.loadGlyphsetURL(W, H, Y, D, U, $);
|
|
34387
34389
|
break;
|
|
34388
34390
|
case "Points":
|
|
34389
34391
|
this.loadPointsetURL(W, H, j.MorphVertices, j.MorphColours, D, U, $);
|
|
@@ -34396,33 +34398,33 @@ void main() {
|
|
|
34396
34398
|
break;
|
|
34397
34399
|
}
|
|
34398
34400
|
}
|
|
34399
|
-
}, N = (W,
|
|
34400
|
-
if (
|
|
34401
|
+
}, N = (W, Z, j) => {
|
|
34402
|
+
if (Z) {
|
|
34401
34403
|
var re = void 0, U = !1;
|
|
34402
|
-
switch (
|
|
34404
|
+
switch (Z.URL ? (re = Z.URL, W && (re = h(Z.URL, W))) : Z.Inline && (re = Z.Inline.URL, U = !0), Z.Type) {
|
|
34403
34405
|
case "View":
|
|
34404
34406
|
U ? (v.setupMultipleViews("default", { default: re }), m = !0, j != null && typeof j == "function" && j()) : this.loadViewURL(re, j);
|
|
34405
34407
|
break;
|
|
34406
34408
|
case "Settings":
|
|
34407
|
-
this.loadSettings(
|
|
34409
|
+
this.loadSettings(Z);
|
|
34408
34410
|
break;
|
|
34409
34411
|
}
|
|
34410
34412
|
}
|
|
34411
34413
|
};
|
|
34412
|
-
this.loadGLTF = (W,
|
|
34414
|
+
this.loadGLTF = (W, Z, j, re, U) => {
|
|
34413
34415
|
var H = new (c(39)).GLTFToZincJSLoader();
|
|
34414
|
-
H.load(v, W,
|
|
34416
|
+
H.load(v, W, Z, j, re, U);
|
|
34415
34417
|
};
|
|
34416
|
-
var B = (W,
|
|
34418
|
+
var B = (W, Z, j, re) => {
|
|
34417
34419
|
if (j.Primitives && j.Primitives.forEach((le) => {
|
|
34418
34420
|
var se = 1;
|
|
34419
|
-
le.Order && (se = le.Order), P(W,
|
|
34421
|
+
le.Order && (se = le.Order), P(W, Z, le, se, re);
|
|
34420
34422
|
}), j.Transformation && W.setTransformation(j.Transformation), j.Children) for (var [U, H] of Object.entries(j.Children)) {
|
|
34421
34423
|
var K = W.findOrCreateChildFromPath(U);
|
|
34422
|
-
K && B(K,
|
|
34424
|
+
K && B(K, Z, H, re);
|
|
34423
34425
|
}
|
|
34424
|
-
}, F = (W,
|
|
34425
|
-
var j, re, U = W, H =
|
|
34426
|
+
}, F = (W, Z) => {
|
|
34427
|
+
var j, re, U = W, H = Z == null || (j = Z.enabled) === null || j === void 0 ? void 0 : j.include, K = Z == null || (re = Z.enabled) === null || re === void 0 ? void 0 : re.exclude;
|
|
34426
34428
|
return (H != null && H.length || K != null && K.length) && (H && (U = W.filter((le) => {
|
|
34427
34429
|
if (le.Type === "View") return !0;
|
|
34428
34430
|
for (var se = 0; se < H.length; se++) if (f(le.RegionPath, le.GroupName, H[se])) return !0;
|
|
@@ -34432,29 +34434,29 @@ void main() {
|
|
|
34432
34434
|
for (var se = 0; se < K.length; se++) if (f(le.RegionPath, le.GroupName, K[se])) return !1;
|
|
34433
34435
|
return !0;
|
|
34434
34436
|
}))), U;
|
|
34435
|
-
}, z = (W,
|
|
34437
|
+
}, z = (W, Z) => Array.isArray(W) ? F(W, Z) : W, G = (W, Z) => {
|
|
34436
34438
|
if (Array.isArray(W)) {
|
|
34437
|
-
for (var j = 0, re = 0; re < W.length; re++) W[re].Type && (
|
|
34439
|
+
for (var j = 0, re = 0; re < W.length; re++) W[re].Type && (Z && W[re].Type === "View" || W[re].Type === "Surfaces" || W[re].Type === "Glyph" || W[re].Type === "Points" || W[re].Type === "Lines" || W[re].Type === "Texture") && j++;
|
|
34438
34440
|
return j;
|
|
34439
34441
|
}
|
|
34440
34442
|
return 0;
|
|
34441
34443
|
}, J = (W) => {
|
|
34442
|
-
var
|
|
34444
|
+
var Z = W.Primitives ? G(W.Primitives, !1) : 0;
|
|
34443
34445
|
return W.Children && Object.values(W.Children).forEach((j) => {
|
|
34444
|
-
|
|
34445
|
-
}),
|
|
34446
|
-
}, ne = (W) => Array.isArray(W) ? G(W, !0) : typeof W == "object" && W !== null && W.Version === "2.0" ? J(W.Regions) : void 0, ae = (W,
|
|
34446
|
+
Z += J(j);
|
|
34447
|
+
}), Z;
|
|
34448
|
+
}, ne = (W) => Array.isArray(W) ? G(W, !0) : typeof W == "object" && W !== null && W.Version === "2.0" ? J(W.Regions) : void 0, ae = (W, Z, j, re, U) => {
|
|
34447
34449
|
var H = W;
|
|
34448
|
-
j.RegionPath && j.RegionPath !== "" && (H = W.findOrCreateChildFromPath(j.RegionPath)), P(H,
|
|
34449
|
-
}, ie = (W,
|
|
34450
|
-
for (var K = z(
|
|
34451
|
-
for (var D = 0; D <
|
|
34452
|
-
}, oe = (W,
|
|
34453
|
-
var H = ne(
|
|
34454
|
-
|
|
34450
|
+
j.RegionPath && j.RegionPath !== "" && (H = W.findOrCreateChildFromPath(j.RegionPath)), P(H, Z, j, 2 * re, U);
|
|
34451
|
+
}, ie = (W, Z, j, re, U, H) => {
|
|
34452
|
+
for (var K = z(Z, H), le = ne(K), se = new I(le, re, U), V = 0; V < Z.length; V++) N(j, K[V], se);
|
|
34453
|
+
for (var D = 0; D < Z.length; D++) ae(W, j, K[D], D, se);
|
|
34454
|
+
}, oe = (W, Z, j, re, U) => {
|
|
34455
|
+
var H = ne(Z), K = new I(H, re, U);
|
|
34456
|
+
Z.Settings && this.loadSettings(Z.Settings), Z.Views && _(j, Z.Views), Z.Regions && B(W, j, Z.Regions, K);
|
|
34455
34457
|
};
|
|
34456
|
-
this.loadMetadataURL = (W,
|
|
34457
|
-
var H = new XMLHttpRequest(), K = d(
|
|
34458
|
+
this.loadMetadataURL = (W, Z, j, re, U) => {
|
|
34459
|
+
var H = new XMLHttpRequest(), K = d(Z);
|
|
34458
34460
|
H.onreadystatechange = () => {
|
|
34459
34461
|
if (H.readyState == 4 && H.status == 200) {
|
|
34460
34462
|
v.resetMetadata(), v.resetDuration(), m = !1;
|
|
@@ -34684,9 +34686,9 @@ void main() {
|
|
|
34684
34686
|
A.addFace(ne[0], oe[0], W[0], ne[1], oe[1], W[1], ne[2], oe[2], W[2]);
|
|
34685
34687
|
}
|
|
34686
34688
|
} else if (T === "l") {
|
|
34687
|
-
var
|
|
34688
|
-
if (R.indexOf("/") === -1) j =
|
|
34689
|
-
else for (var U, H = 0, K =
|
|
34689
|
+
var Z = R.substring(1).trim().split(" "), j = [], re = [];
|
|
34690
|
+
if (R.indexOf("/") === -1) j = Z;
|
|
34691
|
+
else for (var U, H = 0, K = Z.length; H < K; H++) U = Z[H].split("/"), U[0] !== "" && j.push(U[0]), U[1] !== "" && re.push(U[1]);
|
|
34690
34692
|
A.addLineGeometry(j, re);
|
|
34691
34693
|
} else if (T === "p") {
|
|
34692
34694
|
var le = R.substr(1).trim(), se = le.split(" ");
|
|
@@ -35054,15 +35056,15 @@ void main() {
|
|
|
35054
35056
|
if (0 < ae.length && (z.extensionsUsed = ae), z.buffers && 0 < z.buffers.length && (z.buffers[0].byteLength = ne.size), G.binary === !0) {
|
|
35055
35057
|
var ie = new window.FileReader();
|
|
35056
35058
|
ie.readAsArrayBuffer(ne), ie.onloadend = function() {
|
|
35057
|
-
var W = R(ie.result),
|
|
35058
|
-
|
|
35059
|
+
var W = R(ie.result), Z = new DataView(new ArrayBuffer(v));
|
|
35060
|
+
Z.setUint32(0, W.byteLength, !0), Z.setUint32(4, x, !0);
|
|
35059
35061
|
var j = R(_(JSON.stringify(z)), 32), re = new DataView(new ArrayBuffer(v));
|
|
35060
35062
|
re.setUint32(0, j.byteLength, !0), re.setUint32(4, m, !0);
|
|
35061
35063
|
var U = new ArrayBuffer(p), H = new DataView(U);
|
|
35062
35064
|
H.setUint32(0, u, !0), H.setUint32(4, y, !0);
|
|
35063
|
-
var K = p + re.byteLength + j.byteLength +
|
|
35065
|
+
var K = p + re.byteLength + j.byteLength + Z.byteLength + W.byteLength;
|
|
35064
35066
|
H.setUint32(8, K, !0);
|
|
35065
|
-
var le = new Blob([U, re, j,
|
|
35067
|
+
var le = new Blob([U, re, j, Z, W], { type: "application/octet-stream" }), se = new window.FileReader();
|
|
35066
35068
|
se.readAsArrayBuffer(le), se.onloadend = function() {
|
|
35067
35069
|
P(se.result);
|
|
35068
35070
|
};
|
|
@@ -35165,8 +35167,8 @@ void main() {
|
|
|
35165
35167
|
var z = this.json;
|
|
35166
35168
|
z.bufferViews || (z.bufferViews = []);
|
|
35167
35169
|
for (var G = P === h.UNSIGNED_BYTE ? 1 : P === h.UNSIGNED_SHORT ? 2 : 4, J = S(B * b.itemSize * G), ne = new DataView(new ArrayBuffer(J)), ae = 0, ie = N; ie < N + B; ie++) for (var oe, W = 0; W < b.itemSize; W++) oe = void 0, 4 < b.itemSize ? oe = b.array[ie * b.itemSize + W] : W === 0 ? oe = b.getX(ie) : W === 1 ? oe = b.getY(ie) : W === 2 ? oe = b.getZ(ie) : W == 3 && (oe = b.getW(ie)), P === h.FLOAT ? ne.setFloat32(ae, oe, !0) : P === h.UNSIGNED_INT ? ne.setUint32(ae, oe, !0) : P === h.UNSIGNED_SHORT ? ne.setUint16(ae, oe, !0) : P === h.UNSIGNED_BYTE && ne.setUint8(ae, oe), ae += G;
|
|
35168
|
-
var
|
|
35169
|
-
F !== void 0 && (
|
|
35170
|
+
var Z = { buffer: this.processBuffer(ne.buffer), byteOffset: this.byteOffset, byteLength: J };
|
|
35171
|
+
F !== void 0 && (Z.target = F), F === h.ARRAY_BUFFER && (Z.byteStride = b.itemSize * G), this.byteOffset += J, z.bufferViews.push(Z);
|
|
35170
35172
|
var j = { id: z.bufferViews.length - 1, byteLength: 0 };
|
|
35171
35173
|
return j;
|
|
35172
35174
|
}
|
|
@@ -35227,14 +35229,14 @@ void main() {
|
|
|
35227
35229
|
if (G.embedImages) {
|
|
35228
35230
|
var W = T = T || document.createElement("canvas");
|
|
35229
35231
|
W.width = Math.min(b.width, G.maxTextureSize), W.height = Math.min(b.height, G.maxTextureSize);
|
|
35230
|
-
var
|
|
35231
|
-
if (N === !0 && (
|
|
35232
|
+
var Z = W.getContext("2d");
|
|
35233
|
+
if (N === !0 && (Z.translate(0, W.height), Z.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) Z.drawImage(b, 0, 0, W.width, W.height);
|
|
35232
35234
|
else {
|
|
35233
35235
|
P !== l.RGBAFormat && P !== l.RGBFormat && console.error("GLTFExporter: Only RGB and RGBA formats are supported."), (b.width > G.maxTextureSize || b.height > G.maxTextureSize) && console.warn("GLTFExporter: Image size is bigger than maxTextureSize", b);
|
|
35234
35236
|
var j = new Uint8ClampedArray(4 * (b.height * b.width));
|
|
35235
35237
|
if (P === l.RGBAFormat) for (var re = 0; re < j.length; re += 4) j[re + 0] = b.data[re + 0], j[re + 1] = b.data[re + 1], j[re + 2] = b.data[re + 2], j[re + 3] = b.data[re + 3];
|
|
35236
35238
|
else for (var U = 0, H = 0; U < j.length; U += 4, H += 3) j[U + 0] = b.data[H + 0], j[U + 1] = b.data[H + 1], j[U + 2] = b.data[H + 2], j[U + 3] = 255;
|
|
35237
|
-
|
|
35239
|
+
Z.putImageData(new ImageData(j, b.width, b.height), 0, 0);
|
|
35238
35240
|
}
|
|
35239
35241
|
G.binary === !0 ? J.push(new Promise(function(le) {
|
|
35240
35242
|
W.toBlob(function(se) {
|
|
@@ -35310,8 +35312,8 @@ void main() {
|
|
|
35310
35312
|
var oe = { index: this.processTexture(b.aoMap), texCoord: 1 };
|
|
35311
35313
|
b.aoMapIntensity !== 1 && (oe.strength = b.aoMapIntensity), this.applyTextureTransform(oe, b.aoMap), B.occlusionTexture = oe;
|
|
35312
35314
|
}
|
|
35313
|
-
b.transparent ? B.alphaMode = "BLEND" : 0 < b.alphaTest && (B.alphaMode = "MASK", B.alphaCutoff = b.alphaTest), b.side === l.DoubleSide && (B.doubleSided = !0), b.name !== "" && (B.name = b.name), this.serializeUserData(b, B), this._invokeAll(function(
|
|
35314
|
-
|
|
35315
|
+
b.transparent ? B.alphaMode = "BLEND" : 0 < b.alphaTest && (B.alphaMode = "MASK", B.alphaCutoff = b.alphaTest), b.side === l.DoubleSide && (B.doubleSided = !0), b.name !== "" && (B.name = b.name), this.serializeUserData(b, B), this._invokeAll(function(Z) {
|
|
35316
|
+
Z.writeMaterial && Z.writeMaterial(b, B);
|
|
35315
35317
|
});
|
|
35316
35318
|
var W = N.materials.push(B) - 1;
|
|
35317
35319
|
return P.materials.set(b, W), W;
|
|
@@ -35329,13 +35331,13 @@ void main() {
|
|
|
35329
35331
|
if (P.meshes.has(G)) return P.meshes.get(G);
|
|
35330
35332
|
var J, ne = b.geometry;
|
|
35331
35333
|
if (J = 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, ne.isBufferGeometry !== !0) throw new Error("THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.");
|
|
35332
|
-
var ae = {}, ie = {}, oe = [], W = [],
|
|
35334
|
+
var ae = {}, ie = {}, oe = [], W = [], Z = { uv: "TEXCOORD_0", uv2: "TEXCOORD_1", color: "COLOR_0", skinWeight: "WEIGHTS_0", skinIndex: "JOINTS_0" }, j = ne.getAttribute("normal");
|
|
35333
35335
|
j === void 0 || this.isNormalizedNormalAttribute(j) || (console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."), ne.setAttribute("normal", this.createNormalizedNormalAttribute(j)));
|
|
35334
35336
|
var re = null;
|
|
35335
35337
|
for (var U in ne.attributes)
|
|
35336
35338
|
if (U.substr(0, 5) !== "morph") {
|
|
35337
35339
|
var H = ne.attributes[U];
|
|
35338
|
-
U =
|
|
35340
|
+
U = Z[U] || U.toUpperCase();
|
|
35339
35341
|
var K = /^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/;
|
|
35340
35342
|
if (K.test(U) || (U = "_" + U), P.attributes.has(this.getUID(H))) {
|
|
35341
35343
|
ie[U] = P.attributes.get(this.getUID(H));
|
|
@@ -35359,7 +35361,7 @@ void main() {
|
|
|
35359
35361
|
continue;
|
|
35360
35362
|
}
|
|
35361
35363
|
var he = ne.morphAttributes[Se][ee], be = Se.toUpperCase();
|
|
35362
|
-
|
|
35364
|
+
Z[Se] && (be = Z[Se]);
|
|
35363
35365
|
var te = ne.attributes[Se];
|
|
35364
35366
|
if (P.attributes.has(this.getUID(he))) {
|
|
35365
35367
|
ue[be] = P.attributes.get(this.getUID(he));
|
|
@@ -35417,10 +35419,10 @@ void main() {
|
|
|
35417
35419
|
for (var F = b.tracks, z = [], G = [], J = 0; J < F.length; ++J) {
|
|
35418
35420
|
var ne = F[J], ae = l.PropertyBinding.parseTrackName(ne.name), ie = l.PropertyBinding.findNode(P, ae.nodeName), oe = g[ae.propertyName];
|
|
35419
35421
|
if (ae.objectName === "bones" && (ie.isSkinnedMesh === !0 ? ie = ie.skeleton.getBoneByName(ae.objectIndex) : ie = void 0), !ie || !oe) return console.warn('THREE.GLTFExporter: Could not export animation track "%s".', ne.name), null;
|
|
35420
|
-
var W = 1,
|
|
35421
|
-
oe === g.morphTargetInfluences && (
|
|
35422
|
+
var W = 1, Z = ne.values.length / ne.times.length;
|
|
35423
|
+
oe === g.morphTargetInfluences && (Z /= ie.morphTargetInfluences.length);
|
|
35422
35424
|
var j = void 0;
|
|
35423
|
-
ne.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (j = "CUBICSPLINE",
|
|
35425
|
+
ne.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (j = "CUBICSPLINE", Z /= 3) : ne.getInterpolation() === l.InterpolateDiscrete ? j = "STEP" : j = "LINEAR", G.push({ input: this.processAccessor(new l.BufferAttribute(ne.times, W)), output: this.processAccessor(new l.BufferAttribute(ne.values, Z)), interpolation: j }), z.push({ sampler: G.length - 1, target: { node: B.get(ie), path: oe } });
|
|
35424
35426
|
}
|
|
35425
35427
|
return N.animations.push({ name: b.name || "clip_" + N.animations.length, samplers: G, channels: z }), N.animations.length - 1;
|
|
35426
35428
|
}
|
|
@@ -35457,8 +35459,8 @@ void main() {
|
|
|
35457
35459
|
} else b.isCamera && (F.camera = this.processCamera(b));
|
|
35458
35460
|
if (b.isSkinnedMesh && this.skins.push(b), 0 < b.children.length) {
|
|
35459
35461
|
for (var ae, ie = [], oe = 0, W = b.children.length; oe < W; oe++) if (ae = b.children[oe], ae.visible || N.onlyVisible === !1) {
|
|
35460
|
-
var
|
|
35461
|
-
|
|
35462
|
+
var Z = this.processNode(ae);
|
|
35463
|
+
Z !== null && ie.push(Z);
|
|
35462
35464
|
}
|
|
35463
35465
|
0 < ie.length && (F.children = ie);
|
|
35464
35466
|
}
|
|
@@ -35593,7 +35595,7 @@ void main() {
|
|
|
35593
35595
|
var oe = void 0;
|
|
35594
35596
|
if (B[ne.uuid] === void 0) {
|
|
35595
35597
|
oe = G.clone();
|
|
35596
|
-
for (var W = new oe.ValueBufferType(ae * oe.times.length),
|
|
35598
|
+
for (var W = new oe.ValueBufferType(ae * oe.times.length), Z = 0; Z < oe.times.length; Z++) W[Z * ae + ie] = oe.values[Z];
|
|
35597
35599
|
oe.name = (J.nodeName || "") + ".morphTargetInfluences", oe.values = W, B[ne.uuid] = oe, N.push(oe);
|
|
35598
35600
|
continue;
|
|
35599
35601
|
}
|
|
@@ -35620,7 +35622,7 @@ void main() {
|
|
|
35620
35622
|
L.MAIN = T.ROTATE, L.AUXILIARY = T.ZOOM, L.SECONDARY = T.PAN, this.cameraObject = _, this.domElement = w === void 0 ? document : w, this.renderer = A, this.scene = S, 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;
|
|
35621
35623
|
var C = 6e3, O = !0, b = 0, P = void 0, N = void 0, B = !1, F = 500, z = void 0, G = "default", J = R.DEFAULT, ne = void 0, ae = void 0, ie = void 0, oe = 0, W = I.FREE;
|
|
35622
35624
|
this._state = T.NONE;
|
|
35623
|
-
var
|
|
35625
|
+
var Z;
|
|
35624
35626
|
this.targetTouchId = -1;
|
|
35625
35627
|
var j = void 0, re = new l.Vector3(), U = new l.Vector3(), H = new l.Vector3(), K = new l.Vector3(), le = new l.Vector3(), se = new l.Vector3(), V = new l.Vector3(), D = new l.Vector3(), $ = new l.Sphere(), Y = new l.Vector3(), ee = !1, ue = void 0, Me = 0, Se = { default: new h() };
|
|
35626
35628
|
Se.default.nearPlane = 0.1, Se.default.farPlane = 2e3, Se.default.eyePosition = [0, 0, 0], Se.default.targetPosition = [0, 0, -1], Se.default.upVector = [0, 1, 0], this.cameraObject.target === void 0 && (this.cameraObject.target = new l.Vector3(...Se.default.targetPosition)), this.calculateMaxAllowedDistance = (Q) => {
|
|
@@ -35659,8 +35661,8 @@ void main() {
|
|
|
35659
35661
|
return this.pixelHeight = Te / Q, this.pixelHeight;
|
|
35660
35662
|
}, this.getNDCFromDocumentCoords = (Q, Te, De) => {
|
|
35661
35663
|
Be(!1);
|
|
35662
|
-
var $e = De || new l.Vector2(), ct = 2 * ((Q - j.left) / j.width) - 1,
|
|
35663
|
-
return $e.set(ct,
|
|
35664
|
+
var $e = De || new l.Vector2(), ct = 2 * ((Q - j.left) / j.width) - 1, X = 2 * -((Te - j.top) / j.height) + 1;
|
|
35665
|
+
return $e.set(ct, X);
|
|
35664
35666
|
}, this.getRelativeCoordsFromNDC = (Q, Te, De) => {
|
|
35665
35667
|
Be(!1);
|
|
35666
35668
|
var $e = De || new l.Vector2();
|
|
@@ -35694,9 +35696,9 @@ void main() {
|
|
|
35694
35696
|
var De = this.scene.getMinimapDiffFromNormalised(Te.x, Te.y);
|
|
35695
35697
|
te(De);
|
|
35696
35698
|
}
|
|
35697
|
-
} else this._state === T.NONE &&
|
|
35699
|
+
} else this._state === T.NONE && Z !== void 0 && Z.move(this, Q.clientX, Q.clientY, this.renderer);
|
|
35698
35700
|
}, Ne = (Q) => {
|
|
35699
|
-
this._state = T.NONE, J == R.MINIMAP && (J = R.DEFAULT),
|
|
35701
|
+
this._state = T.NONE, J == R.MINIMAP && (J = R.DEFAULT), Z !== void 0 && this.pointer_x_start == Q.clientX - j.left && this.pointer_y_start == Q.clientY - j.top && Z.pick(this, Q.clientX, Q.clientY, this.renderer);
|
|
35700
35702
|
}, Ie = (Q) => {
|
|
35701
35703
|
this._state = T.NONE;
|
|
35702
35704
|
}, je = (Q) => {
|
|
@@ -35707,8 +35709,8 @@ void main() {
|
|
|
35707
35709
|
this._state = T.TOUCH_ROTATE, this.pointer_x = Q.touches[0].clientX - ((De = j) === null || De === void 0 ? void 0 : De.left), this.pointer_y = Q.touches[0].clientY - (($e = j) === 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;
|
|
35708
35710
|
} else if (Te == 2) {
|
|
35709
35711
|
this._state = T.TOUCH_ZOOM;
|
|
35710
|
-
var ct = Q.touches[0].clientX - Q.touches[1].clientX,
|
|
35711
|
-
this.touchZoomDistanceEnd = this.touchZoomDistanceStart = Math.sqrt(ct * ct +
|
|
35712
|
+
var ct = Q.touches[0].clientX - Q.touches[1].clientX, X = Q.touches[0].clientY - Q.touches[1].clientY;
|
|
35713
|
+
this.touchZoomDistanceEnd = this.touchZoomDistanceStart = Math.sqrt(ct * ct + X * X);
|
|
35712
35714
|
} else if (Te == 3) {
|
|
35713
35715
|
var ge, fe;
|
|
35714
35716
|
this._state = T.TOUCH_PAN, this.targetTouchId = Q.touches[0].identifier, this.pointer_x = Q.touches[0].clientX - ((ge = j) === null || ge === void 0 ? void 0 : ge.left), this.pointer_y = Q.touches[0].clientY - ((fe = j) === null || fe === void 0 ? void 0 : fe.top), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y;
|
|
@@ -35725,7 +35727,7 @@ void main() {
|
|
|
35725
35727
|
} else if (Te == 3 && this._state === T.TOUCH_PAN) for (var ct = 0; 3 > ct; ct++) Q.touches[ct].identifier == this.targetTouchId && (this.pointer_x = Q.touches[0].clientX - j.left, this.pointer_y = Q.touches[0].clientY - j.top);
|
|
35726
35728
|
}, qe = (Q) => {
|
|
35727
35729
|
var Te = Q.touches.length;
|
|
35728
|
-
this.touchZoomDistanceStart = this.touchZoomDistanceEnd = 0, this.targetTouchId = -1, this._state = T.NONE, Te == 1 &&
|
|
35730
|
+
this.touchZoomDistanceStart = this.touchZoomDistanceEnd = 0, this.targetTouchId = -1, this._state = T.NONE, Te == 1 && Z !== void 0 && this.pointer_x_start == Q.touches[0].clientX - j.left && this.pointer_y_start == Q.touches[0].clientY - j.top && Z.pick(this.cameraObject, Q.touches[0].clientX, Q.touches[0].clientY, this.renderer);
|
|
35729
35731
|
}, xt = () => {
|
|
35730
35732
|
Be(!0);
|
|
35731
35733
|
}, Be = (Q) => {
|
|
@@ -35762,8 +35764,8 @@ void main() {
|
|
|
35762
35764
|
};
|
|
35763
35765
|
this.getVectorsFromRotateAboutLookAtPoints = (Q, Te) => {
|
|
35764
35766
|
Q.normalize(), V.copy(this.cameraObject.position).sub(this.cameraObject.target), D.copy(V), V.normalize(), 0.8 < Math.abs(V.dot(Q)) && V.copy(this.cameraObject.up), U.crossVectors(Q, V).normalize(), H.crossVectors(Q, U);
|
|
35765
|
-
var De = Q.dot(D), $e = U.dot(D), ct = H.dot(D),
|
|
35766
|
-
return K.set(we * U.x + Ae * H.x, we * U.y + Ae * H.y, we * U.z + Ae * H.z), le.set(we * H.x - Ae * U.x, we * H.y - Ae * U.y, we * H.z - Ae * U.z), V.copy(this.cameraObject.target), V.x = V.x + Q.x * De + K.x * $e + le.x * ct, V.y = V.y + Q.y * De + K.y * $e + le.y * ct, V.z = V.z + Q.z * De + K.z * $e + le.z * ct, re.set(Q.x *
|
|
35767
|
+
var De = Q.dot(D), $e = U.dot(D), ct = H.dot(D), X = Q.dot(this.cameraObject.up), ge = U.dot(this.cameraObject.up), fe = H.dot(this.cameraObject.up), we = Math.cos(Te), Ae = Math.sin(Te);
|
|
35768
|
+
return K.set(we * U.x + Ae * H.x, we * U.y + Ae * H.y, we * U.z + Ae * H.z), le.set(we * H.x - Ae * U.x, we * H.y - Ae * U.y, we * H.z - Ae * U.z), V.copy(this.cameraObject.target), V.x = V.x + Q.x * De + K.x * $e + le.x * ct, V.y = V.y + Q.y * De + K.y * $e + le.y * ct, V.z = V.z + Q.z * De + K.z * $e + le.z * ct, re.set(Q.x * X + K.x * ge + le.x * fe, Q.y * X + K.y * ge + le.y * fe, Q.z * X + K.z * ge + le.z * fe), { position: V, up: re };
|
|
35767
35769
|
}, this.rotateAboutLookAtpoint = (Q, Te) => {
|
|
35768
35770
|
var De = this.getVectorsFromRotateAboutLookAtPoints(Q, Te);
|
|
35769
35771
|
this.cameraObject.position.copy(De.position), this.updateDirectionalLight(), this.cameraObject.up.copy(De.up);
|
|
@@ -35772,11 +35774,11 @@ void main() {
|
|
|
35772
35774
|
if (typeof this.cameraObject < "u") {
|
|
35773
35775
|
var Q, Te, De = (Q = j) === null || Q === void 0 ? void 0 : Q.width, $e = (Te = j) === null || Te === void 0 ? void 0 : Te.height;
|
|
35774
35776
|
if (0 < De && 0 < $e) {
|
|
35775
|
-
var ct = 0.25 * (De + $e),
|
|
35776
|
-
(W === I.FREE || W === I.HORIZONTAL) && (
|
|
35777
|
-
var fe = Math.sqrt(
|
|
35777
|
+
var ct = 0.25 * (De + $e), X = 0, ge = 0;
|
|
35778
|
+
(W === I.FREE || W === I.HORIZONTAL) && (X = this.pointer_x - this.previous_pointer_x), (W === I.FREE || W === I.VERTICAL) && (ge = this.previous_pointer_y - this.pointer_y);
|
|
35779
|
+
var fe = Math.sqrt(X * X + ge * ge);
|
|
35778
35780
|
if (0 < fe) {
|
|
35779
|
-
var we = 1 * -ge / fe, Ae = 1 *
|
|
35781
|
+
var we = 1 * -ge / fe, Ae = 1 * X / fe, me = 0;
|
|
35780
35782
|
W === I.FREE && we * (this.pointer_x - 0.5 * (De - 1)) + Ae * (0.5 * ($e - 1) - this.pointer_y);
|
|
35781
35783
|
var _e = Math.acos(me / ct) - 0.5 * Math.PI, Pe = this.tumble_rate * fe / ct;
|
|
35782
35784
|
re.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize(), U.copy(this.cameraObject.up).normalize(), H.copy(U).cross(re).normalize().multiplyScalar(we), U.multiplyScalar(Ae), se.addVectors(H, U).multiplyScalar(Math.cos(_e)), re.multiplyScalar(Math.sin(_e)), se.add(re), this.rotateAboutLookAtpoint(se, -Pe);
|
|
@@ -35798,12 +35800,12 @@ void main() {
|
|
|
35798
35800
|
var $e = De.length(), ct = 1.5 * Q / Te;
|
|
35799
35801
|
if (0.01 < $e + ct * $e && (De.normalize(), Y.copy(this.cameraObject.position), Y.x += De.x * ct * $e, Y.y += De.y * ct * $e, Y.z += De.z * ct * $e, be())) {
|
|
35800
35802
|
this.cameraObject.position.copy(Y), this.updateDirectionalLight();
|
|
35801
|
-
var
|
|
35802
|
-
if (
|
|
35803
|
+
var X = 1e-5;
|
|
35804
|
+
if (X * this.cameraObject.far < this.cameraObject.near + ct * $e + this.near_plane_fly_debt) this.near_plane_fly_debt != 0 && (this.near_plane_fly_debt += ct * $e, 0 < this.near_plane_fly_debt ? (this.cameraObject.near += this.near_plane_fly_debt, this.cameraObject.far += this.near_plane_fly_debt, this.near_plane_fly_debt = 0) : (this.cameraObject.near += ct * $e, this.cameraObject.far += ct * $e));
|
|
35803
35805
|
else {
|
|
35804
35806
|
if (this.near_plane_fly_debt == 0) {
|
|
35805
|
-
var ge = this.cameraObject.near -
|
|
35806
|
-
this.cameraObject.near =
|
|
35807
|
+
var ge = this.cameraObject.near - X * this.cameraObject.far;
|
|
35808
|
+
this.cameraObject.near = X * this.cameraObject.far, this.cameraObject.far -= ge, this.near_plane_fly_debt -= X * this.cameraObject.far;
|
|
35807
35809
|
}
|
|
35808
35810
|
this.near_plane_fly_debt += ct * $e;
|
|
35809
35811
|
}
|
|
@@ -35861,7 +35863,7 @@ void main() {
|
|
|
35861
35863
|
};
|
|
35862
35864
|
var ni = (Q) => {
|
|
35863
35865
|
if (J === R.PATH && (zi(Q), P)) {
|
|
35864
|
-
for (var Te = this.getCurrentTimeFrame(), De = Te[0], $e = Te[1], ct = Te[2],
|
|
35866
|
+
for (var Te = this.getCurrentTimeFrame(), De = Te[0], $e = Te[1], ct = Te[2], X = [P[3 * De], P[3 * De + 1], P[3 * De + 2]], ge = [P[3 * $e], P[3 * $e + 1], P[3 * $e + 2]], fe = [], we = 0; we < X.length; we++) fe.push(ct * X[we] + (1 - ct) * ge[we]);
|
|
35865
35867
|
this.cameraObject.position.set(fe[0], fe[1], fe[2]), this.cameraObject.target.set(ge[0], ge[1], ge[2]), z && this.cameraObject.lookAt(this.cameraObject.target), B && (this.directionalLight.position.set(fe[0], fe[1], fe[2]), this.directionalLight.target.position.set(ge[0], ge[1], ge[2]));
|
|
35866
35868
|
}
|
|
35867
35869
|
};
|
|
@@ -35889,15 +35891,15 @@ void main() {
|
|
|
35889
35891
|
this.cameraObject.near = Q.nearPlane, this.cameraObject.far = Q.farPlane, this.cameraObject.position.set(Q.eyePosition[0], Q.eyePosition[1], Q.eyePosition[2]), this.cameraObject.target.set(Q.targetPosition[0], Q.targetPosition[1], Q.targetPosition[2]), this.cameraObject.up.set(Q.upVector[0], Q.upVector[1], Q.upVector[2]), this.cameraObject.updateProjectionMatrix(), this.updateDirectionalLight();
|
|
35890
35892
|
}, this.setCurrentCameraSettings = (Q) => {
|
|
35891
35893
|
Q.nearPlane && (this.cameraObject.near = Q.nearPlane), Q.farPlane && (this.cameraObject.far = Q.farPlane), Q.eyePosition && this.cameraObject.position.set(Q.eyePosition[0], Q.eyePosition[1], Q.eyePosition[2]), Q.targetPosition && this.cameraObject.target.set(Q.targetPosition[0], Q.targetPosition[1], Q.targetPosition[2]), Q.upVector && this.cameraObject.up.set(Q.upVector[0], Q.upVector[1], Q.upVector[2]), this.cameraObject.updateProjectionMatrix(), this.updateDirectionalLight(), ee = !0;
|
|
35892
|
-
}, this.getViewportFromCentreAndRadius = (Q, Te, De, $e, ct,
|
|
35894
|
+
}, this.getViewportFromCentreAndRadius = (Q, Te, De, $e, ct, X) => {
|
|
35893
35895
|
var ge = this.cameraObject.position.x - this.cameraObject.target.x, fe = this.cameraObject.position.y - this.cameraObject.target.y, we = this.cameraObject.position.z - this.cameraObject.target.z, Ae = 1 / Math.sqrt(ge * ge + fe * fe + we * we);
|
|
35894
35896
|
ge *= Ae, fe *= Ae, we *= Ae;
|
|
35895
|
-
var me = [Q, Te, De], _e = $e / Math.tan(ct * Math.PI / 360), Pe = [Q + ge * _e, Te + fe * _e, De + we * _e], Ge = _e +
|
|
35896
|
-
We =
|
|
35897
|
+
var me = [Q, Te, De], _e = $e / Math.tan(ct * Math.PI / 360), Pe = [Q + ge * _e, Te + fe * _e, De + we * _e], Ge = _e + X, We = 0, et = 0.95;
|
|
35898
|
+
We = X > et * _e ? (1 - et) * _e : _e - X;
|
|
35897
35899
|
var Ye = new h();
|
|
35898
35900
|
return Ye.nearPlane = We, Ye.farPlane = Ge, Ye.eyePosition = Pe, Ye.targetPosition = me, Ye.upVector = [this.cameraObject.up.x, this.cameraObject.up.y, this.cameraObject.up.z], Ye;
|
|
35899
35901
|
}, this.getViewportFromBoundingBox = (Q, Te) => {
|
|
35900
|
-
var De = Q.min.distanceTo(Q.max) / 2 * Te, $e = (Q.min.x + Q.max.x) / 2, ct = (Q.min.y + Q.max.y) / 2,
|
|
35902
|
+
var De = Q.min.distanceTo(Q.max) / 2 * Te, $e = (Q.min.x + Q.max.x) / 2, ct = (Q.min.y + Q.max.y) / 2, X = (Q.min.z + Q.max.z) / 2, ge = 4, fe = this.getViewportFromCentreAndRadius($e, ct, X, De, 40, De * ge);
|
|
35901
35903
|
return fe;
|
|
35902
35904
|
}, this.getCurrentViewport = () => {
|
|
35903
35905
|
var Q = new h();
|
|
@@ -35921,9 +35923,9 @@ void main() {
|
|
|
35921
35923
|
}, this.updateAutoTumble = () => {
|
|
35922
35924
|
ie && (ie.requireUpdate = !0);
|
|
35923
35925
|
}, this.isAutoTumble = () => J === R.AUTO_TUMBLE, this.enableRaycaster = (Q, Te, De) => {
|
|
35924
|
-
|
|
35926
|
+
Z == null && (Z = new u(Q, this.scene, Te, De, this.renderer));
|
|
35925
35927
|
}, this.disableRaycaster = () => {
|
|
35926
|
-
|
|
35928
|
+
Z.disable(), Z = void 0;
|
|
35927
35929
|
}, this.isSyncControl = () => currentMpde === R.SYNC_CONTROL, this.enableSyncControl = () => (J = R.SYNC_CONTROL, ue || (ue = new M()), ue.setCurrentCameraSettings(this.cameraObject, Se[G]), ue), this.disableSyncControl = () => {
|
|
35928
35930
|
J = R.DEFAULT, this.cameraObject.zoom = 1, this.cameraObject.updateProjectionMatrix();
|
|
35929
35931
|
}, this.enable();
|
|
@@ -35969,31 +35971,31 @@ void main() {
|
|
|
35969
35971
|
var W = I.getThreeJSScene();
|
|
35970
35972
|
L.render(W, oe.cameraObject);
|
|
35971
35973
|
}
|
|
35972
|
-
var
|
|
35973
|
-
return G.length = 0, b.intersectObjects(
|
|
35974
|
+
var Z = ne || I.getPickableThreeJSObjects();
|
|
35975
|
+
return G.length = 0, b.intersectObjects(Z, !0, G);
|
|
35974
35976
|
}, this.setPickableObjects = (oe) => {
|
|
35975
35977
|
oe === void 0 ? ne = void 0 : (ne = [], oe.forEach((W) => {
|
|
35976
35978
|
W.getGroup() && W.getGroup().visible && ne.push(W.getGroup());
|
|
35977
35979
|
}));
|
|
35978
|
-
}, this.getIntersectsObjectWithOrigin = (oe, W,
|
|
35980
|
+
}, this.getIntersectsObjectWithOrigin = (oe, W, Z) => (b.set(W, Z), this.getIntersectsObject(oe)), this.getIntersectsObjectWithCamera = (oe, W, Z) => (oe.getNDCFromDocumentCoords(W, Z, P), b.setFromCamera(P, oe.cameraObject), this.getIntersectsObject(oe)), this.pick = (oe, W, Z) => {
|
|
35979
35981
|
if (L && I && oe && C) {
|
|
35980
|
-
this.getIntersectsObjectWithCamera(oe, W,
|
|
35982
|
+
this.getIntersectsObjectWithCamera(oe, W, Z);
|
|
35981
35983
|
for (var j, re = G.length, U = 0; U < re; U++) if (j = G[U].object ? G[U].object.userData : void 0, j && j.isMarkerCluster && j.visible && j.clusterIsVisible(G[U].object.clusterIndex) && j.zoomToCluster(G[U].object.clusterIndex))
|
|
35982
35984
|
return;
|
|
35983
|
-
C(G, W,
|
|
35985
|
+
C(G, W, Z);
|
|
35984
35986
|
}
|
|
35985
35987
|
};
|
|
35986
|
-
var ae = (oe, W,
|
|
35988
|
+
var ae = (oe, W, Z) => {
|
|
35987
35989
|
if (L && I && oe && O) {
|
|
35988
|
-
if (this.getIntersectsObjectWithCamera(oe, W,
|
|
35990
|
+
if (this.getIntersectsObjectWithCamera(oe, W, Z), B.setTime(Date.now()), G.length === 0) {
|
|
35989
35991
|
if (F) return;
|
|
35990
35992
|
F = !0;
|
|
35991
35993
|
} else F = !1;
|
|
35992
|
-
O(G, W,
|
|
35994
|
+
O(G, W, Z);
|
|
35993
35995
|
}
|
|
35994
35996
|
};
|
|
35995
|
-
this.move = (oe, W,
|
|
35996
|
-
L && I && oe && O && (I.displayMarkers ? ae(oe, W,
|
|
35997
|
+
this.move = (oe, W, Z) => {
|
|
35998
|
+
L && I && oe && O && (I.displayMarkers ? ae(oe, W, Z) : (J.zincCamera = oe, J.x = W, J.y = Z, !N && (z = B ? Date.now() - B.getTime() : 250, 250 <= z ? ae(oe, W, Z) : (N = !0, setTimeout(ie(J), z)))));
|
|
35997
35999
|
};
|
|
35998
36000
|
var ie = (oe) => function() {
|
|
35999
36001
|
N = !1, ae(oe.zincCamera, oe.x, oe.y);
|
|
@@ -36367,8 +36369,8 @@ void main() {
|
|
|
36367
36369
|
var W = 0.5 * Math.abs(ne / A.w);
|
|
36368
36370
|
if (_.max.x += W, _.max.y += W, _.max.z += W, _.min.x -= W, _.min.y -= W, _.min.z -= W, T.ray.intersectsBox(_) !== !1) {
|
|
36369
36371
|
L.at(1, y), y.w = 1, y.applyMatrix4(C.matrixWorldInverse), y.applyMatrix4(O), y.multiplyScalar(1 / y.w), y.x *= B.x / 2, y.y *= B.y / 2, y.z = 0, v.copy(y), m.multiplyMatrices(C.matrixWorldInverse, b);
|
|
36370
|
-
for (var
|
|
36371
|
-
p.fromBufferAttribute(z,
|
|
36372
|
+
for (var Z = 0, j = z.count; Z < j; Z++) {
|
|
36373
|
+
p.fromBufferAttribute(z, Z), u.fromBufferAttribute(G, Z), p.w = 1, u.w = 1, p.applyMatrix4(m), u.applyMatrix4(m);
|
|
36372
36374
|
var re = p.z > J && u.z > J;
|
|
36373
36375
|
if (!re) {
|
|
36374
36376
|
if (p.z > J) {
|
|
@@ -36383,9 +36385,9 @@ void main() {
|
|
|
36383
36385
|
x.at(se, M);
|
|
36384
36386
|
var V = l.MathUtils.lerp(p.z, u.z, se), D = -1 <= V && 1 >= V, $ = v.distanceTo(M) < 0.5 * F;
|
|
36385
36387
|
if (D && $) {
|
|
36386
|
-
x.start.fromBufferAttribute(z,
|
|
36388
|
+
x.start.fromBufferAttribute(z, Z), x.end.fromBufferAttribute(G, Z), x.start.applyMatrix4(b), x.end.applyMatrix4(b);
|
|
36387
36389
|
var Y = new l.Vector3(), ee = new l.Vector3();
|
|
36388
|
-
L.distanceSqToSegment(x.start, x.end, ee, Y), I.push({ point: ee, pointOnLine: Y, distance: L.origin.distanceTo(ee), object: this, face: null, faceIndex:
|
|
36390
|
+
L.distanceSqToSegment(x.start, x.end, ee, Y), I.push({ point: ee, pointOnLine: Y, distance: L.origin.distanceTo(ee), object: this, face: null, faceIndex: Z, uv: null, uv2: null });
|
|
36389
36391
|
}
|
|
36390
36392
|
}
|
|
36391
36393
|
}
|
|
@@ -42382,9 +42384,15 @@ const rU = {
|
|
|
42382
42384
|
*/
|
|
42383
42385
|
changeViewingMode: function(n) {
|
|
42384
42386
|
this.$module && (n && (this.viewingMode = n), this.clearAnnotationFeature(), this.viewingMode === "Annotation" ? (this.loading = !0, this.annotator.authenticate(this.userToken).then((e) => {
|
|
42385
|
-
e.name && e.email && e.canUpdate ? (this.authorisedUser = e, this.offlineAnnotationEnabled = !1) : (this.authorisedUser = void 0, this.offlineAnnotationEnabled = !0), this.addAnnotationFeature(), this.loading = !1;
|
|
42387
|
+
e.name && e.email && e.canUpdate ? (this.authorisedUser = e, this.offlineAnnotationEnabled = !1) : (this.authorisedUser = void 0, this.offlineAnnotationEnabled = !0), this.emitOfflineAnnotationUpdate(), this.addAnnotationFeature(), this.loading = !1;
|
|
42386
42388
|
})) : this.viewingMode === "Exploration" && (this.activeDrawTool = void 0, this.activeDrawMode = void 0, this.createData.shape = ""), this.viewingMode === "Exploration" || this.viewingMode === "Annotation" && this.createData.shape === "" ? this.$module.selectObjectOnPick = !0 : this.$module.selectObjectOnPick = !1, this.cancelCreate());
|
|
42387
42389
|
},
|
|
42390
|
+
/**
|
|
42391
|
+
* Function to emit offline annotation enabled status
|
|
42392
|
+
*/
|
|
42393
|
+
emitOfflineAnnotationUpdate: function() {
|
|
42394
|
+
this.$emit("update-offline-annotation-enabled", this.offlineAnnotationEnabled);
|
|
42395
|
+
},
|
|
42388
42396
|
/**
|
|
42389
42397
|
* @public
|
|
42390
42398
|
* Hide the tooltip
|
|
@@ -43179,7 +43187,7 @@ function vU(n, e, t, i, r, s) {
|
|
|
43179
43187
|
[w, n.loading]
|
|
43180
43188
|
]);
|
|
43181
43189
|
}
|
|
43182
|
-
const SU = /* @__PURE__ */ fr(rU, [["render", vU], ["__scopeId", "data-v-
|
|
43190
|
+
const SU = /* @__PURE__ */ fr(rU, [["render", vU], ["__scopeId", "data-v-e4742c36"]]);
|
|
43183
43191
|
export {
|
|
43184
43192
|
SU as ScaffoldVuer
|
|
43185
43193
|
};
|