@realsee/five 6.5.0-alpha.13 → 6.5.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Five.html +20 -20
- package/docs/classes/five.Model.html +12 -12
- package/docs/classes/five.Parameter.html +5 -5
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3DModel.html +21 -23
- package/docs/interfaces/five.ParameterTilesetValue.html +4 -4
- package/docs/interfaces/five.ParameterValue.html +6 -6
- package/docs/interfaces/five.ResolvedParameterValue.html +6 -6
- package/docs/interfaces/five.ViewLayer.html +22 -24
- package/docs/types/five.TilesetFrameState.html +1 -1
- package/five/index.d.ts +3 -9
- package/five/index.js +35 -35
- package/five/index.mjs +1099 -1119
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +1 -1
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +2 -2
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +35 -35
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
package/five/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 7/
|
|
5
|
-
* Version: 6.5.0-alpha.
|
|
4
|
+
* Generated: 7/30/2025
|
|
5
|
+
* Version: 6.5.0-alpha.14
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -758,9 +758,9 @@ CryptoJS.lib.Cipher || function(n) {
|
|
|
758
758
|
C[w + 1] = C[w + 3], C[w + 3] = L, this._doCryptBlock(C, w, this._invKeySchedule, c, d, f, h, r), L = C[w + 1], C[w + 1] = C[w + 3], C[w + 3] = L;
|
|
759
759
|
},
|
|
760
760
|
_doCryptBlock: function(C, w, L, H, M, P, B, O) {
|
|
761
|
-
for (var _ = this._nRounds,
|
|
762
|
-
var
|
|
763
|
-
|
|
761
|
+
for (var _ = this._nRounds, U = C[w] ^ L[0], X = C[w + 1] ^ L[1], j = C[w + 2] ^ L[2], Q = C[w + 3] ^ L[3], N = 4, D = 1; D < _; D++)
|
|
762
|
+
var G = H[U >>> 24] ^ M[X >>> 16 & 255] ^ P[j >>> 8 & 255] ^ B[Q & 255] ^ L[N++], K = H[X >>> 24] ^ M[j >>> 16 & 255] ^ P[Q >>> 8 & 255] ^ B[U & 255] ^ L[N++], J = H[j >>> 24] ^ M[Q >>> 16 & 255] ^ P[U >>> 8 & 255] ^ B[X & 255] ^ L[N++], Q = H[Q >>> 24] ^ M[U >>> 16 & 255] ^ P[X >>> 8 & 255] ^ B[j & 255] ^ L[N++], U = G, X = K, j = J;
|
|
763
|
+
G = (O[U >>> 24] << 24 | O[X >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[Q & 255]) ^ L[N++], K = (O[X >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[Q >>> 8 & 255] << 8 | O[U & 255]) ^ L[N++], J = (O[j >>> 24] << 24 | O[Q >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[X & 255]) ^ L[N++], Q = (O[Q >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[X >>> 8 & 255] << 8 | O[j & 255]) ^ L[N++], C[w] = G, C[w + 1] = K, C[w + 2] = J, C[w + 3] = Q;
|
|
764
764
|
},
|
|
765
765
|
keySize: 8
|
|
766
766
|
});
|
|
@@ -3187,41 +3187,41 @@ function X509(n) {
|
|
|
3187
3187
|
return y(T).replace(/\//, "\\/");
|
|
3188
3188
|
}).join("/");
|
|
3189
3189
|
}, this.getInfo = function() {
|
|
3190
|
-
var v = function(
|
|
3191
|
-
var K = JSON.stringify(
|
|
3190
|
+
var v = function(G) {
|
|
3191
|
+
var K = JSON.stringify(G.array).replace(/[\[\]\{\}\"]/g, "");
|
|
3192
3192
|
return K;
|
|
3193
|
-
}, y = function(
|
|
3194
|
-
for (var K = "",
|
|
3195
|
-
var
|
|
3196
|
-
if (K += " policy oid: " +
|
|
3197
|
-
`,
|
|
3198
|
-
for (var X = 0; X <
|
|
3199
|
-
var
|
|
3200
|
-
|
|
3193
|
+
}, y = function(G) {
|
|
3194
|
+
for (var K = "", J = G.array, Q = 0; Q < J.length; Q++) {
|
|
3195
|
+
var U = J[Q];
|
|
3196
|
+
if (K += " policy oid: " + U.policyoid + `
|
|
3197
|
+
`, U.array !== void 0)
|
|
3198
|
+
for (var X = 0; X < U.array.length; X++) {
|
|
3199
|
+
var j = U.array[X];
|
|
3200
|
+
j.cps !== void 0 && (K += " cps: " + j.cps + `
|
|
3201
3201
|
`);
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
3204
|
return K;
|
|
3205
|
-
}, b = function(
|
|
3206
|
-
for (var K = "",
|
|
3207
|
-
var
|
|
3205
|
+
}, b = function(G) {
|
|
3206
|
+
for (var K = "", J = G.array, Q = 0; Q < J.length; Q++) {
|
|
3207
|
+
var U = J[Q];
|
|
3208
3208
|
try {
|
|
3209
|
-
|
|
3209
|
+
U.dpname.full[0].uri !== void 0 && (K += " " + U.dpname.full[0].uri + `
|
|
3210
3210
|
`);
|
|
3211
3211
|
} catch (X) {
|
|
3212
3212
|
}
|
|
3213
3213
|
try {
|
|
3214
|
-
|
|
3214
|
+
U.dname.full[0].dn.hex !== void 0 && (K += " " + X509.hex2dn(U.dpname.full[0].dn.hex) + `
|
|
3215
3215
|
`);
|
|
3216
3216
|
} catch (X) {
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
return K;
|
|
3220
|
-
}, T = function(
|
|
3221
|
-
for (var K = "",
|
|
3222
|
-
var
|
|
3223
|
-
|
|
3224
|
-
`),
|
|
3220
|
+
}, T = function(G) {
|
|
3221
|
+
for (var K = "", J = G.array, Q = 0; Q < J.length; Q++) {
|
|
3222
|
+
var U = J[Q];
|
|
3223
|
+
U.caissuer !== void 0 && (K += " caissuer: " + U.caissuer + `
|
|
3224
|
+
`), U.ocsp !== void 0 && (K += " ocsp: " + U.ocsp + `
|
|
3225
3225
|
`);
|
|
3226
3226
|
}
|
|
3227
3227
|
return K;
|
|
@@ -3876,8 +3876,8 @@ var PBMCustomShader = (
|
|
|
3876
3876
|
var M = H[L];
|
|
3877
3877
|
M in uniformsLib$1 || delete l[M];
|
|
3878
3878
|
}
|
|
3879
|
-
for (var P = r.customShaders.filter(function(
|
|
3880
|
-
return
|
|
3879
|
+
for (var P = r.customShaders.filter(function(U) {
|
|
3880
|
+
return U.type.includes(S);
|
|
3881
3881
|
}), B = 0, O = P; B < O.length; B++) {
|
|
3882
3882
|
var _ = O[B];
|
|
3883
3883
|
for (var N in _.defines)
|
|
@@ -3885,47 +3885,47 @@ var PBMCustomShader = (
|
|
|
3885
3885
|
for (var D in _.uniforms)
|
|
3886
3886
|
D in l || Object.assign(l, (T = {}, T[D] = _.uniforms[D], T));
|
|
3887
3887
|
}
|
|
3888
|
-
v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, P.map(function(
|
|
3889
|
-
return
|
|
3890
|
-
}).filter(function(
|
|
3891
|
-
return !!
|
|
3888
|
+
v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, P.map(function(U) {
|
|
3889
|
+
return U.vertex.mainBefore;
|
|
3890
|
+
}).filter(function(U) {
|
|
3891
|
+
return !!U;
|
|
3892
3892
|
}).join(`
|
|
3893
|
-
`)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, P.map(function(
|
|
3894
|
-
return
|
|
3895
|
-
}).filter(function(
|
|
3896
|
-
return !!
|
|
3893
|
+
`)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, P.map(function(U) {
|
|
3894
|
+
return U.vertex.mainStart;
|
|
3895
|
+
}).filter(function(U) {
|
|
3896
|
+
return !!U;
|
|
3897
3897
|
}).join(`
|
|
3898
|
-
`)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, P.map(function(
|
|
3899
|
-
return
|
|
3900
|
-
}).filter(function(
|
|
3901
|
-
return !!
|
|
3898
|
+
`)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, P.map(function(U) {
|
|
3899
|
+
return U.vertex.mainEnd;
|
|
3900
|
+
}).filter(function(U) {
|
|
3901
|
+
return !!U;
|
|
3902
3902
|
}).join(`
|
|
3903
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, P.map(function(
|
|
3904
|
-
return
|
|
3905
|
-
}).filter(function(
|
|
3906
|
-
return !!
|
|
3903
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, P.map(function(U) {
|
|
3904
|
+
return U.fragment.mainBefore;
|
|
3905
|
+
}).filter(function(U) {
|
|
3906
|
+
return !!U;
|
|
3907
3907
|
}).join(`
|
|
3908
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, P.map(function(
|
|
3909
|
-
return
|
|
3910
|
-
}).filter(function(
|
|
3911
|
-
return !!
|
|
3908
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, P.map(function(U) {
|
|
3909
|
+
return U.fragment.mainStart;
|
|
3910
|
+
}).filter(function(U) {
|
|
3911
|
+
return !!U;
|
|
3912
3912
|
}).join(`
|
|
3913
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, P.map(function(
|
|
3914
|
-
return
|
|
3915
|
-
}).filter(function(
|
|
3916
|
-
return !!
|
|
3913
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, P.map(function(U) {
|
|
3914
|
+
return U.fragment.mainEnd;
|
|
3915
|
+
}).filter(function(U) {
|
|
3916
|
+
return !!U;
|
|
3917
3917
|
}).join(`
|
|
3918
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, P.map(function(
|
|
3919
|
-
return
|
|
3920
|
-
}).filter(function(
|
|
3921
|
-
return !!
|
|
3918
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, P.map(function(U) {
|
|
3919
|
+
return U.fragment.mainModelColor;
|
|
3920
|
+
}).filter(function(U) {
|
|
3921
|
+
return !!U;
|
|
3922
3922
|
}).join(`
|
|
3923
3923
|
`));
|
|
3924
|
-
var
|
|
3925
|
-
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g,
|
|
3926
|
-
for (var K = 0,
|
|
3927
|
-
var
|
|
3928
|
-
|
|
3924
|
+
var G = String(r.clippers.length);
|
|
3925
|
+
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, G), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, G);
|
|
3926
|
+
for (var K = 0, J = P; K < J.length; K++) {
|
|
3927
|
+
var Q = J[K];
|
|
3928
|
+
Q.onBeforeCompile && Q.onBeforeCompile(v, y);
|
|
3929
3929
|
}
|
|
3930
3930
|
};
|
|
3931
3931
|
var c = "";
|
|
@@ -4722,7 +4722,7 @@ var parameterValueEqualFn = {
|
|
|
4722
4722
|
skipLevelOfDetail: valueEqual,
|
|
4723
4723
|
mostDetail: valueEqual,
|
|
4724
4724
|
loadSiblings: valueEqual,
|
|
4725
|
-
|
|
4725
|
+
cameraCulling: valueEqual,
|
|
4726
4726
|
maxMemoryUsage: valueEqual,
|
|
4727
4727
|
maxRequests: valueEqual,
|
|
4728
4728
|
requestOrder: valueEqual,
|
|
@@ -4804,7 +4804,7 @@ var defaultGradientTexture = function() {
|
|
|
4804
4804
|
skipLevelOfDetail: !1,
|
|
4805
4805
|
mostDetail: !1,
|
|
4806
4806
|
loadSiblings: !1,
|
|
4807
|
-
|
|
4807
|
+
cameraCulling: !0,
|
|
4808
4808
|
maxMemoryUsage: 256,
|
|
4809
4809
|
// MB
|
|
4810
4810
|
maxRequests: 6,
|
|
@@ -5180,21 +5180,21 @@ function ajax(n, t, e, r, o) {
|
|
|
5180
5180
|
var O, _, N = now(), D = N - s;
|
|
5181
5181
|
if (delete E[g], b.parentNode && b.parentNode.removeChild(b), v !== null && (window.clearTimeout(v), v = null), y !== !0) {
|
|
5182
5182
|
if (B.indexOf("data:") !== 0) {
|
|
5183
|
-
var
|
|
5184
|
-
r(
|
|
5183
|
+
var G = new NetworkResponseError(l, "Script", 500);
|
|
5184
|
+
r(G), d(G), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "Script", "error", G.message);
|
|
5185
5185
|
return;
|
|
5186
5186
|
}
|
|
5187
|
-
var K = B.split(","),
|
|
5187
|
+
var K = B.split(","), J = (K[0].match(/:(.*?);/) || [])[1], Q = K[1];
|
|
5188
5188
|
if (t.responseType === "arraybuffer" || t.responseType === "blob") {
|
|
5189
|
-
for (var
|
|
5190
|
-
|
|
5191
|
-
t.responseType === "arraybuffer" ?
|
|
5189
|
+
for (var U = atob(K[1]), X = U.length, j = new Uint8Array(X), $ = 0; $ < X; $++)
|
|
5190
|
+
j[$] = U.charCodeAt($);
|
|
5191
|
+
t.responseType === "arraybuffer" ? Q = j.buffer : Q = new Blob([j], { type: J });
|
|
5192
5192
|
}
|
|
5193
|
-
var
|
|
5194
|
-
body:
|
|
5195
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers:
|
|
5193
|
+
var q = {}, re = {
|
|
5194
|
+
body: Q,
|
|
5195
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers: q }
|
|
5196
5196
|
};
|
|
5197
|
-
e(
|
|
5197
|
+
e(re), c(re), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "Script", "ok", JSON.stringify(re.meta)), y = !0;
|
|
5198
5198
|
}
|
|
5199
5199
|
};
|
|
5200
5200
|
E[g] = S, b.src = l, document.body.appendChild(b), typeof t.timeout == "number" && (v = window.setTimeout(T, t.timeout));
|
|
@@ -5216,11 +5216,11 @@ function ajax(n, t, e, r, o) {
|
|
|
5216
5216
|
var _ = this.status;
|
|
5217
5217
|
if (_ === 0 || _ >= 200 && _ < 400) {
|
|
5218
5218
|
R = !0, w();
|
|
5219
|
-
var N = now(), D = N - s,
|
|
5219
|
+
var N = now(), D = N - s, G = parseHeaders(this.getAllResponseHeaders()), K = B.total, J = {
|
|
5220
5220
|
body: this.response,
|
|
5221
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers:
|
|
5221
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers: G, size: K }
|
|
5222
5222
|
};
|
|
5223
|
-
e(
|
|
5223
|
+
e(J), c(J), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(J.meta));
|
|
5224
5224
|
} else
|
|
5225
5225
|
P.call(this);
|
|
5226
5226
|
}
|
|
@@ -5901,8 +5901,8 @@ var FACE_ORDER$1 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
5901
5901
|
t[FACE_ORDER$1[5]]
|
|
5902
5902
|
], E = [], v = [0, 0, 0, 0, 0, 0], y = [], b = function(S) {
|
|
5903
5903
|
var R = (h = (f = e.imageURL) === null || f === void 0 ? void 0 : f.options) !== null && h !== void 0 ? h : { key: "unknown" }, C = applyImageURLOptions(m[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$1[S] })), w = getProtocol(C), L = function(N) {
|
|
5904
|
-
v[S] = N, s(v.reduce(function(D,
|
|
5905
|
-
return D +
|
|
5904
|
+
v[S] = N, s(v.reduce(function(D, G) {
|
|
5905
|
+
return D + G;
|
|
5906
5906
|
}, 0) / 6);
|
|
5907
5907
|
}, H = (g = e.viaAjax) !== null && g !== void 0 ? g : !1, M = /^https?:$/.test(w), P = isJsonpSource(C);
|
|
5908
5908
|
if (P ? H = !0 : M || (H = !1), H) {
|
|
@@ -7387,8 +7387,8 @@ function parsePBMModel(n) {
|
|
|
7387
7387
|
break;
|
|
7388
7388
|
}
|
|
7389
7389
|
}
|
|
7390
|
-
for (var A = n.chunks.sort(function(
|
|
7391
|
-
return chunkOrder(
|
|
7390
|
+
for (var A = n.chunks.sort(function(ae, fe) {
|
|
7391
|
+
return chunkOrder(ae) - chunkOrder(fe);
|
|
7392
7392
|
}), m = [], E = 0, v = A; E < v.length; E++) {
|
|
7393
7393
|
var h = v[E], y = parseFloorName(h.name);
|
|
7394
7394
|
m[y] || (m[y] = []), m[y].push(h);
|
|
@@ -7402,11 +7402,11 @@ function parsePBMModel(n) {
|
|
|
7402
7402
|
S += h.faces.indices.length;
|
|
7403
7403
|
}
|
|
7404
7404
|
for (var C = new Float32Array(S * 3), w = new Float32Array(S * 2), L = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], B = 0, O = 0; O < T.length; O++) {
|
|
7405
|
-
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs,
|
|
7406
|
-
var
|
|
7407
|
-
H && (H[B + R] =
|
|
7408
|
-
var
|
|
7409
|
-
L[B * 3 + R * 3] = K[
|
|
7405
|
+
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, G = h.faces.indices, K = h.faces.normals, J = h.vertices.marks, Q = G.length, R = 0; R < Q; R++) {
|
|
7406
|
+
var U = G[R], X = C[B * 3 + R * 3] = N[U * 3], j = C[B * 3 + R * 3 + 1] = N[U * 3 + 1], $ = C[B * 3 + R * 3 + 2] = N[U * 3 + 2];
|
|
7407
|
+
H && (H[B + R] = J[U]), w[B * 2 + R * 2] = D[U * 2], w[B * 2 + R * 2 + 1] = D[U * 2 + 1];
|
|
7408
|
+
var q = Math.floor(R / 3) * 3;
|
|
7409
|
+
L[B * 3 + R * 3] = K[q], L[B * 3 + R * 3 + 1] = K[q + 1], L[B * 3 + R * 3 + 2] = K[q + 2], X < _[0] && (_[0] = X), j < _[1] && (_[1] = j), $ < _[2] && (_[2] = $), X > _[3] && (_[3] = X), j > _[4] && (_[4] = j), $ > _[5] && (_[5] = $);
|
|
7410
7410
|
}
|
|
7411
7411
|
_[0] < P[0] && (P[0] = _[0]), _[1] < P[1] && (P[1] = _[1]), _[2] < P[2] && (P[2] = _[2]), _[3] > P[3] && (P[3] = _[3]), _[4] > P[4] && (P[4] = _[4]), _[5] > P[5] && (P[5] = _[5]), M.push({
|
|
7412
7412
|
materialIndex: O,
|
|
@@ -7415,9 +7415,9 @@ function parsePBMModel(n) {
|
|
|
7415
7415
|
start: B,
|
|
7416
7416
|
count: h.faces.indices.length,
|
|
7417
7417
|
texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
|
|
7418
|
-
}), B +=
|
|
7418
|
+
}), B += Q;
|
|
7419
7419
|
}
|
|
7420
|
-
var
|
|
7420
|
+
var re = {
|
|
7421
7421
|
createAt: o,
|
|
7422
7422
|
description: s,
|
|
7423
7423
|
vertices: C,
|
|
@@ -7429,20 +7429,20 @@ function parsePBMModel(n) {
|
|
|
7429
7429
|
groups: M,
|
|
7430
7430
|
extents: P
|
|
7431
7431
|
};
|
|
7432
|
-
u.push(
|
|
7432
|
+
u.push(re);
|
|
7433
7433
|
} else {
|
|
7434
|
-
for (var S = 0,
|
|
7434
|
+
for (var S = 0, Y = 0, R = 0; R < T.length; R++) {
|
|
7435
7435
|
var h = T[R];
|
|
7436
|
-
|
|
7436
|
+
Y += h.vertices.xyz.length / 3, S += h.faces.indices.length;
|
|
7437
7437
|
}
|
|
7438
|
-
for (var C = new Float32Array(
|
|
7439
|
-
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ie = h.vertices.marks, D = h.vertices.uvs,
|
|
7440
|
-
var X = C[B * 3 + R * 3] = N[R * 3],
|
|
7441
|
-
H && (H[B + R] = ie[R]), w[B * 2 + R * 2] = D[R * 2], w[B * 2 + R * 2 + 1] = D[R * 2 + 1], ee[B + R] = b, X < _[0] && (_[0] = X),
|
|
7438
|
+
for (var C = new Float32Array(Y * 3), w = new Float32Array(Y * 2), L = void 0, ee = new Float32Array(Y), ne = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], le = 0, B = 0, O = 0; O < T.length; O++) {
|
|
7439
|
+
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ie = h.vertices.marks, D = h.vertices.uvs, G = h.faces.indices, se = N.length / 3, Q = G.length, R = 0; R < se; R++) {
|
|
7440
|
+
var X = C[B * 3 + R * 3] = N[R * 3], j = C[B * 3 + R * 3 + 1] = N[R * 3 + 1], $ = C[B * 3 + R * 3 + 2] = N[R * 3 + 2];
|
|
7441
|
+
H && (H[B + R] = ie[R]), w[B * 2 + R * 2] = D[R * 2], w[B * 2 + R * 2 + 1] = D[R * 2 + 1], ee[B + R] = b, X < _[0] && (_[0] = X), j < _[1] && (_[1] = j), $ < _[2] && (_[2] = $), X > _[3] && (_[3] = X), j > _[4] && (_[4] = j), $ > _[5] && (_[5] = $);
|
|
7442
7442
|
}
|
|
7443
7443
|
_[0] < P[0] && (P[0] = _[0]), _[1] < P[1] && (P[1] = _[1]), _[2] < P[2] && (P[2] = _[2]), _[3] > P[3] && (P[3] = _[3]), _[4] > P[4] && (P[4] = _[4]), _[5] > P[5] && (P[5] = _[5]);
|
|
7444
|
-
for (var R = 0; R <
|
|
7445
|
-
|
|
7444
|
+
for (var R = 0; R < Q; R++)
|
|
7445
|
+
ne[le + R] = B + G[R];
|
|
7446
7446
|
M.push({
|
|
7447
7447
|
materialIndex: O,
|
|
7448
7448
|
name: h.name,
|
|
@@ -7450,21 +7450,21 @@ function parsePBMModel(n) {
|
|
|
7450
7450
|
start: le,
|
|
7451
7451
|
count: h.faces.indices.length,
|
|
7452
7452
|
texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
|
|
7453
|
-
}), B +=
|
|
7453
|
+
}), B += se, le += Q;
|
|
7454
7454
|
}
|
|
7455
|
-
var
|
|
7455
|
+
var re = {
|
|
7456
7456
|
createAt: o,
|
|
7457
7457
|
description: s,
|
|
7458
7458
|
vertices: C,
|
|
7459
7459
|
uvs: w,
|
|
7460
7460
|
normals: L,
|
|
7461
7461
|
masks: H,
|
|
7462
|
-
indices:
|
|
7462
|
+
indices: ne,
|
|
7463
7463
|
floorIndex: b,
|
|
7464
7464
|
groups: M,
|
|
7465
7465
|
extents: P
|
|
7466
7466
|
};
|
|
7467
|
-
u.push(
|
|
7467
|
+
u.push(re);
|
|
7468
7468
|
}
|
|
7469
7469
|
}
|
|
7470
7470
|
return u;
|
|
@@ -7499,51 +7499,51 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7499
7499
|
P.addGroup(_.start, _.count, _.materialIndex);
|
|
7500
7500
|
}
|
|
7501
7501
|
p.add(P);
|
|
7502
|
-
for (var N = [], D = 0,
|
|
7503
|
-
var _ =
|
|
7504
|
-
|
|
7502
|
+
for (var N = [], D = 0, G = L; D < G.length; D++) {
|
|
7503
|
+
var _ = G[D], K = r[_.chunkName] || (_.texture ? pathJoin(e || "", _.texture) : void 0), J = new PBMMeshMaterial(t ? "phong" : "basic");
|
|
7504
|
+
J.floorIndex = w, P.attributes.normal === void 0 && (J.flatShading = !0), P.attributes._feature_id_rsmask && (J.defines.USE_VERTEX_MARK = !0), N.push(J), K ? (g++, h[K] ? h[K].push(J) : h[K] = [J]) : J.color = new THREE.Color(16777215), p.add(J);
|
|
7505
7505
|
}
|
|
7506
|
-
var
|
|
7507
|
-
|
|
7506
|
+
var Q = new PBMMesh(P, N);
|
|
7507
|
+
Q.name = "model_floor_" + w, Q.userData.createAt = v, Q.userData.description = y, Q.matrix.compose(Q.position, Q.quaternion, Q.scale), Q.matrixAutoUpdate = !1, Q.frustumCulled = !1, c = v, d = y, f.push(Q);
|
|
7508
7508
|
}
|
|
7509
|
-
var
|
|
7509
|
+
var U = function(X) {
|
|
7510
7510
|
X = autoRestImageOptionsByTextureLength(X, g);
|
|
7511
|
-
for (var
|
|
7512
|
-
var
|
|
7513
|
-
ee in s && (
|
|
7514
|
-
for (var ie = 0,
|
|
7515
|
-
var
|
|
7516
|
-
|
|
7511
|
+
for (var j = [], $ = function(ee) {
|
|
7512
|
+
var ne = null;
|
|
7513
|
+
ee in s && (ne = s[ee]), ne || (ne = loadTexture$1(ee, X, u)), j.push(ne.then(function(le) {
|
|
7514
|
+
for (var ie = 0, se = h[ee]; ie < se.length; ie++) {
|
|
7515
|
+
var ae = se[ie];
|
|
7516
|
+
ae.map && (p.delete(ae.map), ae.map.dispose()), ae.map = le, p.add(le);
|
|
7517
7517
|
}
|
|
7518
7518
|
return le;
|
|
7519
7519
|
}).catch(function() {
|
|
7520
7520
|
for (var le = 0, ie = h[ee]; le < ie.length; le++) {
|
|
7521
|
-
var
|
|
7522
|
-
|
|
7521
|
+
var se = ie[le];
|
|
7522
|
+
se.map && (p.delete(se.map), se.map.dispose()), se.map = null, se.color = new THREE.Color(16777215);
|
|
7523
7523
|
}
|
|
7524
7524
|
return null;
|
|
7525
7525
|
}));
|
|
7526
|
-
},
|
|
7527
|
-
var
|
|
7528
|
-
|
|
7529
|
-
}
|
|
7530
|
-
for (var
|
|
7531
|
-
delete s[
|
|
7532
|
-
return Promise.all(
|
|
7533
|
-
return ee.filter(function(
|
|
7534
|
-
return
|
|
7526
|
+
}, q = 0, re = Object.keys(h); q < re.length; q++) {
|
|
7527
|
+
var Y = re[q];
|
|
7528
|
+
$(Y);
|
|
7529
|
+
}
|
|
7530
|
+
for (var Y in s)
|
|
7531
|
+
delete s[Y];
|
|
7532
|
+
return Promise.all(j).then(function(ee) {
|
|
7533
|
+
return ee.filter(function(ne) {
|
|
7534
|
+
return ne;
|
|
7535
7535
|
});
|
|
7536
7536
|
});
|
|
7537
7537
|
};
|
|
7538
|
-
return
|
|
7538
|
+
return U(o).then(function(X) {
|
|
7539
7539
|
return {
|
|
7540
7540
|
createAt: c,
|
|
7541
7541
|
description: d,
|
|
7542
7542
|
objects: f,
|
|
7543
7543
|
textures: X,
|
|
7544
7544
|
dispose: function() {
|
|
7545
|
-
p.forEach(function(
|
|
7546
|
-
|
|
7545
|
+
p.forEach(function(j) {
|
|
7546
|
+
j.dispose();
|
|
7547
7547
|
}), p.clear();
|
|
7548
7548
|
}
|
|
7549
7549
|
};
|
|
@@ -8497,8 +8497,8 @@ function parse$3(n, t, e, r, o) {
|
|
|
8497
8497
|
var M = parseGeometry(T[H].geometry);
|
|
8498
8498
|
M.applyMatrix4(f), f.decompose(h, p, g), g.x * g.y * g.z < 0 && M.attributes.normal && M.attributes.position && M.attributes.uv && flipBufferGeometryNormals(M), l.add(M);
|
|
8499
8499
|
for (var P = [], B = 0, O = T[H].material; B < O.length; B++) {
|
|
8500
|
-
var _ = O[B], N = parseMaterial(_, t, e || "", r, d, o, A, l, m), D = N.material,
|
|
8501
|
-
u.push(
|
|
8500
|
+
var _ = O[B], N = parseMaterial(_, t, e || "", r, d, o, A, l, m), D = N.material, G = N.textureReady;
|
|
8501
|
+
u.push(G), P.push(D);
|
|
8502
8502
|
}
|
|
8503
8503
|
var K = new PBMMesh(M, P);
|
|
8504
8504
|
K.name = "chunk_" + H, K.matrix.compose(K.position, K.quaternion, K.scale), K.matrixAutoUpdate = !1, K.frustumCulled = !1, L.add(K);
|
|
@@ -8513,8 +8513,8 @@ function parse$3(n, t, e, r, o) {
|
|
|
8513
8513
|
objects: s,
|
|
8514
8514
|
textures: Array.from(m),
|
|
8515
8515
|
dispose: function() {
|
|
8516
|
-
l.forEach(function(
|
|
8517
|
-
|
|
8516
|
+
l.forEach(function(J) {
|
|
8517
|
+
J.dispose();
|
|
8518
8518
|
}), l.clear();
|
|
8519
8519
|
}
|
|
8520
8520
|
};
|
|
@@ -8938,38 +8938,38 @@ var Parser = (
|
|
|
8938
8938
|
Promise.all(g),
|
|
8939
8939
|
Promise.all(A)
|
|
8940
8940
|
]).then(function(C) {
|
|
8941
|
-
for (var w = C[0], L = C[1], H = C[2], M = C[3], P = C[4], B = [], O = function(
|
|
8942
|
-
var
|
|
8943
|
-
if (
|
|
8941
|
+
for (var w = C[0], L = C[1], H = C[2], M = C[3], P = C[4], B = [], O = function(G, K) {
|
|
8942
|
+
var J = w[G], Q = L[G], U = H[G], X = M[G], j = P[G];
|
|
8943
|
+
if (J === void 0)
|
|
8944
8944
|
return "continue";
|
|
8945
|
-
|
|
8946
|
-
var
|
|
8947
|
-
switch (PATH_PROPERTIES[
|
|
8945
|
+
J.updateMatrix(), J.matrixAutoUpdate = !0;
|
|
8946
|
+
var $ = void 0;
|
|
8947
|
+
switch (PATH_PROPERTIES[j.path]) {
|
|
8948
8948
|
case PATH_PROPERTIES.weights:
|
|
8949
|
-
|
|
8949
|
+
$ = THREE.NumberKeyframeTrack;
|
|
8950
8950
|
break;
|
|
8951
8951
|
case PATH_PROPERTIES.rotation:
|
|
8952
|
-
|
|
8952
|
+
$ = THREE.QuaternionKeyframeTrack;
|
|
8953
8953
|
break;
|
|
8954
8954
|
case PATH_PROPERTIES.position:
|
|
8955
8955
|
case PATH_PROPERTIES.scale:
|
|
8956
8956
|
default:
|
|
8957
|
-
|
|
8957
|
+
$ = THREE.VectorKeyframeTrack;
|
|
8958
8958
|
break;
|
|
8959
8959
|
}
|
|
8960
|
-
var
|
|
8961
|
-
PATH_PROPERTIES[
|
|
8962
|
-
|
|
8963
|
-
}) :
|
|
8964
|
-
var ee =
|
|
8965
|
-
if (
|
|
8966
|
-
for (var
|
|
8967
|
-
le[ie] = ee[ie] *
|
|
8960
|
+
var q = J.name ? J.name : J.uuid, re = X.interpolation !== void 0 ? INTERPOLATION[X.interpolation] : THREE.InterpolateLinear, Y = [];
|
|
8961
|
+
PATH_PROPERTIES[j.path] === PATH_PROPERTIES.weights ? J.traverse(function(fe) {
|
|
8962
|
+
fe.morphTargetInfluences && Y.push(fe.name ? fe.name : fe.uuid);
|
|
8963
|
+
}) : Y.push(q);
|
|
8964
|
+
var ee = U.array;
|
|
8965
|
+
if (U.normalized) {
|
|
8966
|
+
for (var ne = getNormalizedComponentScale(ee.constructor), le = new Float32Array(ee.length), ie = 0, se = ee.length; ie < se; ie++)
|
|
8967
|
+
le[ie] = ee[ie] * ne;
|
|
8968
8968
|
ee = le;
|
|
8969
8969
|
}
|
|
8970
|
-
for (var ie = 0,
|
|
8971
|
-
var
|
|
8972
|
-
B.push(
|
|
8970
|
+
for (var ie = 0, se = Y.length; ie < se; ie++) {
|
|
8971
|
+
var ae = new $(Y[ie] + "." + PATH_PROPERTIES[j.path], Q.array, ee, re);
|
|
8972
|
+
B.push(ae);
|
|
8973
8973
|
}
|
|
8974
8974
|
}, _ = 0, N = w.length; _ < N; _++)
|
|
8975
8975
|
O(_);
|
|
@@ -11626,8 +11626,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11626
11626
|
var d = function(le) {
|
|
11627
11627
|
var ie = e.length;
|
|
11628
11628
|
if (le > ie) {
|
|
11629
|
-
var
|
|
11630
|
-
|
|
11629
|
+
var se = new u8(Math.max(ie * 2, le));
|
|
11630
|
+
se.set(e), e = se;
|
|
11631
11631
|
}
|
|
11632
11632
|
}, f = t.f || 0, h = t.p || 0, p = t.b || 0, g = t.l, A = t.d, m = t.m, E = t.n, v = o * 8;
|
|
11633
11633
|
do {
|
|
@@ -11655,8 +11655,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11655
11655
|
L[M++] = N;
|
|
11656
11656
|
}
|
|
11657
11657
|
}
|
|
11658
|
-
var
|
|
11659
|
-
m = max(
|
|
11658
|
+
var G = L.subarray(0, R), K = L.subarray(R);
|
|
11659
|
+
m = max(G), E = max(K), g = hMap(G, m, 1), A = hMap(K, E, 1);
|
|
11660
11660
|
} else
|
|
11661
11661
|
err(1);
|
|
11662
11662
|
else {
|
|
@@ -11674,8 +11674,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11674
11674
|
}
|
|
11675
11675
|
}
|
|
11676
11676
|
l && d(p + 131072);
|
|
11677
|
-
for (var
|
|
11678
|
-
var N = g[bits16(n, h) &
|
|
11677
|
+
for (var J = (1 << m) - 1, Q = (1 << E) - 1, U = h; ; U = h) {
|
|
11678
|
+
var N = g[bits16(n, h) & J], X = N >> 4;
|
|
11679
11679
|
if (h += N & 15, h > v) {
|
|
11680
11680
|
c && err(0);
|
|
11681
11681
|
break;
|
|
@@ -11683,37 +11683,37 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11683
11683
|
if (N || err(2), X < 256)
|
|
11684
11684
|
e[p++] = X;
|
|
11685
11685
|
else if (X == 256) {
|
|
11686
|
-
|
|
11686
|
+
U = h, g = null;
|
|
11687
11687
|
break;
|
|
11688
11688
|
} else {
|
|
11689
|
-
var
|
|
11689
|
+
var j = X - 254;
|
|
11690
11690
|
if (X > 264) {
|
|
11691
|
-
var M = X - 257,
|
|
11692
|
-
|
|
11691
|
+
var M = X - 257, $ = fleb[M];
|
|
11692
|
+
j = bits(n, h, (1 << $) - 1) + fl[M], h += $;
|
|
11693
11693
|
}
|
|
11694
|
-
var
|
|
11695
|
-
|
|
11696
|
-
var K = fd[
|
|
11697
|
-
if (
|
|
11698
|
-
var
|
|
11699
|
-
K += bits16(n, h) & (1 <<
|
|
11694
|
+
var q = A[bits16(n, h) & Q], re = q >> 4;
|
|
11695
|
+
q || err(3), h += q & 15;
|
|
11696
|
+
var K = fd[re];
|
|
11697
|
+
if (re > 3) {
|
|
11698
|
+
var $ = fdeb[re];
|
|
11699
|
+
K += bits16(n, h) & (1 << $) - 1, h += $;
|
|
11700
11700
|
}
|
|
11701
11701
|
if (h > v) {
|
|
11702
11702
|
c && err(0);
|
|
11703
11703
|
break;
|
|
11704
11704
|
}
|
|
11705
11705
|
l && d(p + 131072);
|
|
11706
|
-
var
|
|
11706
|
+
var Y = p + j;
|
|
11707
11707
|
if (p < K) {
|
|
11708
|
-
var ee = s - K,
|
|
11709
|
-
for (ee + p < 0 && err(3); p <
|
|
11708
|
+
var ee = s - K, ne = Math.min(K, Y);
|
|
11709
|
+
for (ee + p < 0 && err(3); p < ne; ++p)
|
|
11710
11710
|
e[p] = r[ee + p];
|
|
11711
11711
|
}
|
|
11712
|
-
for (; p <
|
|
11712
|
+
for (; p < Y; ++p)
|
|
11713
11713
|
e[p] = e[p - K];
|
|
11714
11714
|
}
|
|
11715
11715
|
}
|
|
11716
|
-
t.l = g, t.p =
|
|
11716
|
+
t.l = g, t.p = U, t.b = p, t.f = f, g && (f = 1, t.m = m, t.d = A, t.n = E);
|
|
11717
11717
|
} while (!f);
|
|
11718
11718
|
return p != e.length && u ? slc(e, 0, p) : e.subarray(0, p);
|
|
11719
11719
|
}, et = /* @__PURE__ */ new u8(0), b2 = function(n, t) {
|
|
@@ -13393,50 +13393,50 @@ function loadX3p(n, t) {
|
|
|
13393
13393
|
});
|
|
13394
13394
|
}
|
|
13395
13395
|
function parse$1(n, t) {
|
|
13396
|
-
for (var e, r, o, s, u, l, c, d, f, h, p, g, A, m, E, v, y, b, T, S, R, C, w, L, H, M, P, B, O, _, N, D,
|
|
13397
|
-
var ve =
|
|
13398
|
-
/(^|\/)main\.xml$/i.test(ve) && (
|
|
13396
|
+
for (var e, r, o, s, u, l, c, d, f, h, p, g, A, m, E, v, y, b, T, S, R, C, w, L, H, M, P, B, O, _, N, D, G, K, J, Q, U, X, j, $, q, re, Y, ee, ne, le, ie, se, ae, fe, he, xe, de, Re, te = unzipSync(n), W = "", z = null, Ce = 0, ce = Object.keys(te); Ce < ce.length; Ce++) {
|
|
13397
|
+
var ve = ce[Ce];
|
|
13398
|
+
/(^|\/)main\.xml$/i.test(ve) && (z = te[ve], W = ve.slice(0, ve.lastIndexOf("/") + 1));
|
|
13399
13399
|
}
|
|
13400
|
-
if (!
|
|
13400
|
+
if (!z)
|
|
13401
13401
|
throw new Error("X3p: main.xml not found.");
|
|
13402
13402
|
if (typeof DOMParser == "undefined")
|
|
13403
13403
|
throw new Error("X3p: DOMParser not found.");
|
|
13404
|
-
var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), rt = new DOMParser(), We = decodeText(
|
|
13404
|
+
var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), rt = new DOMParser(), We = decodeText(z), me = rt.parseFromString(We, "text/xml"), oe = me.querySelector("Record1 Axes"), pe = {
|
|
13405
13405
|
x: {
|
|
13406
|
-
type: (s = (o = (r =
|
|
13407
|
-
dataType: (c = (l = (u =
|
|
13408
|
-
increment: Number((f = (d =
|
|
13409
|
-
offset: Number((p = (h =
|
|
13406
|
+
type: (s = (o = (r = oe == null ? void 0 : oe.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
|
|
13407
|
+
dataType: (c = (l = (u = oe == null ? void 0 : oe.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
|
|
13408
|
+
increment: Number((f = (d = oe == null ? void 0 : oe.querySelector("CX Increment")) === null || d === void 0 ? void 0 : d.textContent) !== null && f !== void 0 ? f : "1"),
|
|
13409
|
+
offset: Number((p = (h = oe == null ? void 0 : oe.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
|
|
13410
13410
|
},
|
|
13411
13411
|
y: {
|
|
13412
|
-
type: (m = (A = (g =
|
|
13413
|
-
dataType: (y = (v = (E =
|
|
13414
|
-
increment: Number((T = (b =
|
|
13415
|
-
offset: Number((R = (S =
|
|
13412
|
+
type: (m = (A = (g = oe == null ? void 0 : oe.querySelector("CY AxisType")) === null || g === void 0 ? void 0 : g.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && m !== void 0 ? m : "I",
|
|
13413
|
+
dataType: (y = (v = (E = oe == null ? void 0 : oe.querySelector("CY DataType")) === null || E === void 0 ? void 0 : E.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && y !== void 0 ? y : "D",
|
|
13414
|
+
increment: Number((T = (b = oe == null ? void 0 : oe.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
|
|
13415
|
+
offset: Number((R = (S = oe == null ? void 0 : oe.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
|
|
13416
13416
|
},
|
|
13417
13417
|
z: {
|
|
13418
|
-
type: (L = (w = (C =
|
|
13419
|
-
dataType: (P = (M = (H =
|
|
13420
|
-
increment: Number((O = (B =
|
|
13421
|
-
offset: Number((N = (_ =
|
|
13422
|
-
}
|
|
13423
|
-
}, Me = null,
|
|
13424
|
-
|
|
13425
|
-
var Pe = (
|
|
13418
|
+
type: (L = (w = (C = oe == null ? void 0 : oe.querySelector("CZ AxisType")) === null || C === void 0 ? void 0 : C.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && L !== void 0 ? L : "A",
|
|
13419
|
+
dataType: (P = (M = (H = oe == null ? void 0 : oe.querySelector("CZ DataType")) === null || H === void 0 ? void 0 : H.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && P !== void 0 ? P : "D",
|
|
13420
|
+
increment: Number((O = (B = oe == null ? void 0 : oe.querySelector("CZ Increment")) === null || B === void 0 ? void 0 : B.textContent) !== null && O !== void 0 ? O : "1"),
|
|
13421
|
+
offset: Number((N = (_ = oe == null ? void 0 : oe.querySelector("CZ Offset")) === null || _ === void 0 ? void 0 : _.textContent) !== null && N !== void 0 ? N : "0")
|
|
13422
|
+
}
|
|
13423
|
+
}, Me = null, Te = me.querySelector("Record1 Axes Rotation");
|
|
13424
|
+
Te && (Me = new THREE.Matrix3(), Me.set(Number((G = (D = Te.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && G !== void 0 ? G : 0), Number((J = (K = Te.querySelector("r12")) === null || K === void 0 ? void 0 : K.textContent) !== null && J !== void 0 ? J : 0), Number((U = (Q = Te.querySelector("r13")) === null || Q === void 0 ? void 0 : Q.textContent) !== null && U !== void 0 ? U : 0), Number((j = (X = Te.querySelector("r21")) === null || X === void 0 ? void 0 : X.textContent) !== null && j !== void 0 ? j : 0), Number((q = ($ = Te.querySelector("r22")) === null || $ === void 0 ? void 0 : $.textContent) !== null && q !== void 0 ? q : 0), Number((Y = (re = Te.querySelector("r23")) === null || re === void 0 ? void 0 : re.textContent) !== null && Y !== void 0 ? Y : 0), Number((ne = (ee = Te.querySelector("r31")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && ne !== void 0 ? ne : 0), Number((ie = (le = Te.querySelector("r32")) === null || le === void 0 ? void 0 : le.textContent) !== null && ie !== void 0 ? ie : 0), Number((ae = (se = Te.querySelector("r33")) === null || se === void 0 ? void 0 : se.textContent) !== null && ae !== void 0 ? ae : 0)));
|
|
13425
|
+
var Pe = (fe = me.querySelector("Record3 DataLink PointDataLink")) === null || fe === void 0 ? void 0 : fe.textContent;
|
|
13426
13426
|
if (typeof Pe != "string")
|
|
13427
13427
|
throw new Error("X3p: PointDataLink not found.");
|
|
13428
|
-
Pe = pathJoin(
|
|
13429
|
-
var Fe =
|
|
13428
|
+
Pe = pathJoin(W, Pe);
|
|
13429
|
+
var Fe = te[Pe];
|
|
13430
13430
|
if (!Fe)
|
|
13431
13431
|
throw new Error("X3p: ".concat(Fe, " not found."));
|
|
13432
|
-
for (var Ae = getPointArray(Fe.buffer, pe.z.dataType),
|
|
13433
|
-
for (var Oe =
|
|
13434
|
-
var Le =
|
|
13435
|
-
_vector.set(He, -Oe, Ye), Me && _vector.applyMatrix3(Me), Ze && je.expandByPoint(_vector), _e[Le * 3 + 0] = _vector.x, _e[Le * 3 + 1] = _vector.y, _e[Le * 3 + 2] = _vector.z, Ue[Le * 2 + 0] = we / Be, Ue[Le * 2 + 1] = 1 -
|
|
13432
|
+
for (var Ae = getPointArray(Fe.buffer, pe.z.dataType), be = Number((xe = (he = me.querySelector("Record3 MatrixDimension SizeX")) === null || he === void 0 ? void 0 : he.textContent) !== null && xe !== void 0 ? xe : "0"), Ie = Number((Re = (de = me.querySelector("Record3 MatrixDimension SizeY")) === null || de === void 0 ? void 0 : de.textContent) !== null && Re !== void 0 ? Re : "0"), Be = Math.floor(be - 1), qe = Math.floor(Ie - 1), ke = Be + 1, Ne = qe + 1, _e = new Float32Array(ke * Ne * 3), Ue = new Float32Array(ke * Ne * 2), De = new Uint32Array(Be * qe * 6), je = new THREE.Box3(), Se = 0; Se < Ne; Se++)
|
|
13433
|
+
for (var Oe = Se * pe.y.increment + pe.y.offset, we = 0; we < ke; we++) {
|
|
13434
|
+
var Le = Se * ke + we, He = we * pe.x.increment + pe.x.offset, Ge = Ae[Le], Ze = !isNaN(Ge), Ye = Ze ? Ge : NaN;
|
|
13435
|
+
_vector.set(He, -Oe, Ye), Me && _vector.applyMatrix3(Me), Ze && je.expandByPoint(_vector), _e[Le * 3 + 0] = _vector.x, _e[Le * 3 + 1] = _vector.y, _e[Le * 3 + 2] = _vector.z, Ue[Le * 2 + 0] = we / Be, Ue[Le * 2 + 1] = 1 - Se / qe;
|
|
13436
13436
|
}
|
|
13437
|
-
for (var
|
|
13437
|
+
for (var Se = 0; Se < qe; Se++)
|
|
13438
13438
|
for (var we = 0; we < Be; we++) {
|
|
13439
|
-
var Qe = we + ke *
|
|
13439
|
+
var Qe = we + ke * Se, ye = we + ke * (Se + 1), Mt = we + 1 + ke * (Se + 1), vt = we + 1 + ke * Se, at = (Se * Be + we) * 6;
|
|
13440
13440
|
De[at + 0] = Qe, De[at + 1] = ye, De[at + 2] = vt, De[at + 3] = ye, De[at + 4] = Mt, De[at + 5] = vt;
|
|
13441
13441
|
}
|
|
13442
13442
|
var Je = new THREE.BufferGeometry();
|
|
@@ -13804,7 +13804,7 @@ var scratchVector3$7 = new THREE.Vector3(), scratchPlane = new THREE.Plane(), sc
|
|
|
13804
13804
|
var o = r.getCenter(scratchVector3$7).sub(t.camera.position);
|
|
13805
13805
|
this.state.centerZDepth = t.camera.direction.dot(o), this.state.centerScreenY = t.camera.up.dot(o);
|
|
13806
13806
|
var s = this.parent ? this.parent.state.visibilityPlaneMask : CullingVolume.MASK_INDETERMINATE;
|
|
13807
|
-
this.state.visibilityPlaneMask = t.cullingVolume.computeVisibilityWithPlaneMask(r, s), this.state.visible = this.state.visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE;
|
|
13807
|
+
this.state.visibilityPlaneMask = t.cullingVolume.computeVisibilityWithPlaneMask(r, s), this.state.visible = this.state.visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE, t.cameraCulling || (this.state.visible = !0);
|
|
13808
13808
|
} else
|
|
13809
13809
|
this.state.distanceToCamera = 0, this.state.centerZDepth = 0, this.state.visibilityPlaneMask = CullingVolume.MASK_INDETERMINATE, this.state.visible = !0;
|
|
13810
13810
|
if ((this.levelOfContent <= t.minLevelOfDetail || this.geometricError >= t.maxGeometricError) && (this.state.visible = !0), this.viewerRequestVolume) {
|
|
@@ -14018,16 +14018,16 @@ var BVHVector3 = (
|
|
|
14018
14018
|
return P[D] - P[N];
|
|
14019
14019
|
};
|
|
14020
14020
|
function _(N) {
|
|
14021
|
-
var D = N.startIndex,
|
|
14021
|
+
var D = N.startIndex, G = N.endIndex, K = N.extents;
|
|
14022
14022
|
P[0] = K[3] - K[0], P[1] = K[4] - K[1], P[2] = K[5] - K[2], B.sort(O);
|
|
14023
|
-
for (var
|
|
14024
|
-
for (var
|
|
14025
|
-
|
|
14026
|
-
if (X > D && X <
|
|
14027
|
-
var
|
|
14028
|
-
|
|
14029
|
-
var
|
|
14030
|
-
|
|
14023
|
+
for (var J = 0; J < 3; J++) {
|
|
14024
|
+
for (var Q = B[J], U = K[Q] + K[Q + 3], X = D, j = G - 1, $ = -1, q = void 0; X <= j; )
|
|
14025
|
+
$ === -1 ? (q = u[X], l[q * 6 + Q] + l[q * 6 + Q + 3] < U ? X++ : $ = q) : (q = u[j], l[q * 6 + Q] + l[q * 6 + Q + 3] >= U || (u[X] = q, u[j] = $, $ = -1, X++), j--);
|
|
14026
|
+
if (X > D && X < G) {
|
|
14027
|
+
var re = new BVHNode(++f, calcExtents(u, l, D, X, EPSILON$1), D, X, N.deepth + 1);
|
|
14028
|
+
re.deepth < r && re.endIndex - re.startIndex > e && (c[d++] = re);
|
|
14029
|
+
var Y = new BVHNode(++f, calcExtents(u, l, X, G, EPSILON$1), X, G, N.deepth + 1);
|
|
14030
|
+
Y.deepth < r && Y.endIndex - Y.startIndex > e && (c[d++] = Y), N.node0 = re, N.node1 = Y, N.startIndex = 0, N.endIndex = 0;
|
|
14031
14031
|
break;
|
|
14032
14032
|
}
|
|
14033
14033
|
}
|
|
@@ -14053,14 +14053,14 @@ var BVHVector3 = (
|
|
|
14053
14053
|
}, t.prototype.intersectRay = function(e, r, o, s) {
|
|
14054
14054
|
for (var u = this.offsetArray, l = this.rootNodePacked, c = new Float32Array(l), d = new Uint32Array(l), f = new Uint16Array(l), h = new BVHVector3(1 / r.x, 1 / r.y, 1 / r.z), p = [0], g, A, m, E; (g = p.pop()) !== void 0; )
|
|
14055
14055
|
if (E = g * BYTES_PER_NODE / 4, intersectNodeBox(e, h, c[E], c[E + 1], c[E + 2], c[E + 3], c[E + 4], c[E + 5])) {
|
|
14056
|
-
for (var v = d[E + 6], y = d[E + 7], b = void 0, T = void 0, S = void 0, R = e.x, C = e.y, w = e.z, L = r.x, H = r.y, M = r.z, P = void 0, B = void 0, O = void 0, _ = void 0, N = void 0, D = void 0,
|
|
14057
|
-
if (b = u[v], T = b * 3, this.getPositionByIndex(T, scratchVector3$6), P = scratchVector3$6.x, B = scratchVector3$6.y, O = scratchVector3$6.z, this.getPositionByIndex(T + 1, scratchVector3$6), _ = scratchVector3$6.x, N = scratchVector3$6.y, D = scratchVector3$6.z, this.getPositionByIndex(T + 2, scratchVector3$6),
|
|
14058
|
-
|
|
14059
|
-
else if (
|
|
14060
|
-
|
|
14056
|
+
for (var v = d[E + 6], y = d[E + 7], b = void 0, T = void 0, S = void 0, R = e.x, C = e.y, w = e.z, L = r.x, H = r.y, M = r.z, P = void 0, B = void 0, O = void 0, _ = void 0, N = void 0, D = void 0, G = void 0, K = void 0, J = void 0, Q = void 0, U = void 0, X = void 0, j = void 0, $ = void 0, q = void 0, re = void 0, Y = void 0, ee = void 0, ne = void 0, le = void 0, ie = void 0, se = void 0, ae = void 0, fe = void 0, he = void 0, xe = void 0, de = void 0; v < y; v++) {
|
|
14057
|
+
if (b = u[v], T = b * 3, this.getPositionByIndex(T, scratchVector3$6), P = scratchVector3$6.x, B = scratchVector3$6.y, O = scratchVector3$6.z, this.getPositionByIndex(T + 1, scratchVector3$6), _ = scratchVector3$6.x, N = scratchVector3$6.y, D = scratchVector3$6.z, this.getPositionByIndex(T + 2, scratchVector3$6), G = scratchVector3$6.x, K = scratchVector3$6.y, J = scratchVector3$6.z, Q = _ - P, U = N - B, X = D - O, j = G - P, $ = K - B, q = J - O, re = U * q - X * $, Y = X * j - Q * q, ee = Q * $ - U * j, ae = L * re + H * Y + M * ee, ae > 0)
|
|
14058
|
+
se = 1;
|
|
14059
|
+
else if (ae < 0)
|
|
14060
|
+
se = -1, ae = -ae;
|
|
14061
14061
|
else
|
|
14062
14062
|
continue;
|
|
14063
|
-
|
|
14063
|
+
ne = R - P, le = C - B, ie = w - O, fe = se * (L * (le * q - ie * $) + H * (ie * j - ne * q) + M * (ne * $ - le * j)), !(fe < 0) && (he = se * (L * (U * ie - X * le) + H * (X * ne - Q * ie) + M * (Q * le - U * ne)), !(he < 0) && (fe + he > ae || (xe = -se * (ne * re + le * Y + ie * ee), !(xe < 0) && (de = xe / ae, s.push(new BVHIntersect([P, B, O, _, N, D, G, K, J], [R + L * de, C + H * de, w + M * de], b))))));
|
|
14064
14064
|
}
|
|
14065
14065
|
E = g * BYTES_PER_NODE / 2, A = f[E + 16], m = f[E + 17], A && p.push(A), m && p.push(m);
|
|
14066
14066
|
}
|
|
@@ -14112,19 +14112,19 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$5 = new BVHVe
|
|
|
14112
14112
|
function L(H) {
|
|
14113
14113
|
var M = H.startIndex, P = H.endIndex, B = H.extents;
|
|
14114
14114
|
R[0] = B[3] - B[0], R[1] = B[4] - B[1], R[2] = B[5] - B[2];
|
|
14115
|
-
for (var O = C.sort(w)[0], _ = ORDER_AXISES[O], N = (B[O] + B[O + 3]) / 2, D = M,
|
|
14116
|
-
K === -1 ? (
|
|
14115
|
+
for (var O = C.sort(w)[0], _ = ORDER_AXISES[O], N = (B[O] + B[O + 3]) / 2, D = M, G = P - 1, K = -1, J; D <= G; )
|
|
14116
|
+
K === -1 ? (J = l[D], s(J, scratchVector3$5), scratchVector3$5[_] < N ? D++ : K = J) : (J = l[G], s(J, scratchVector3$5), scratchVector3$5[_] >= N || (l[D] = J, l[G] = K, K = -1, D++), G--);
|
|
14117
14117
|
if (D > M) {
|
|
14118
|
-
var
|
|
14119
|
-
|
|
14120
|
-
var
|
|
14121
|
-
|
|
14118
|
+
var Q = B.slice();
|
|
14119
|
+
Q[O + 3] = N + EPSILON;
|
|
14120
|
+
var U = new BVHNode(++f, Q, M, D, H.deepth + 1);
|
|
14121
|
+
U.deepth < r && U.endIndex - U.startIndex > e && (c[d++] = U), H.node0 = U;
|
|
14122
14122
|
}
|
|
14123
14123
|
if (P > D) {
|
|
14124
14124
|
var X = B.slice();
|
|
14125
14125
|
X[O] = N - EPSILON;
|
|
14126
|
-
var
|
|
14127
|
-
|
|
14126
|
+
var j = new BVHNode(++f, X, D, P, H.deepth + 1);
|
|
14127
|
+
j.deepth < r && j.endIndex - j.startIndex > e && (c[d++] = j), H.node1 = j;
|
|
14128
14128
|
}
|
|
14129
14129
|
H.startIndex = 0, H.endIndex = 0;
|
|
14130
14130
|
}
|
|
@@ -14801,16 +14801,6 @@ var TileRequestScheduler = (
|
|
|
14801
14801
|
t.sort(function(e, r) {
|
|
14802
14802
|
return r.state.distanceToCamera === 0 && e.state.distanceToCamera === 0 ? r.state.centerZDepth - e.state.centerZDepth : r.state.distanceToCamera - e.state.distanceToCamera;
|
|
14803
14803
|
});
|
|
14804
|
-
}, n.prototype.loadAllTiles = function(t, e) {
|
|
14805
|
-
var r = this._loadAllTilesTraversalStack;
|
|
14806
|
-
for (r.push(t); r.length > 0; ) {
|
|
14807
|
-
var o = r.pop();
|
|
14808
|
-
o.content && o.content.loadState === "UNLOADED" && o.state.requestedFrameNumber < e.frameNumber && this.tileset.requestedTiles.push(o), this.touchTile(o, e);
|
|
14809
|
-
for (var s = 0, u = o.children; s < u.length; s++) {
|
|
14810
|
-
var l = u[s];
|
|
14811
|
-
r.push(l);
|
|
14812
|
-
}
|
|
14813
|
-
}
|
|
14814
14804
|
}, n;
|
|
14815
14805
|
}()
|
|
14816
14806
|
), TilesetNormalTraverser = (
|
|
@@ -14827,7 +14817,7 @@ var TileRequestScheduler = (
|
|
|
14827
14817
|
var l = u[s];
|
|
14828
14818
|
this._traversalStack.reset(), this._emptyTraversalStack.reset(), l.camera.refine && (this._canSelectTile = l.camera.visible, this.updateTile(e, l), this.executeTraversal(e, l));
|
|
14829
14819
|
}
|
|
14830
|
-
this._traversalStack.reset(), this._emptyTraversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r))
|
|
14820
|
+
this._traversalStack.reset(), this._emptyTraversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r));
|
|
14831
14821
|
}, t.prototype.reset = function() {
|
|
14832
14822
|
n.prototype.reset.call(this), this._traversalStack.reset(), this._emptyTraversalStack.reset();
|
|
14833
14823
|
}, t.prototype.executeTraversal = function(e, r) {
|
|
@@ -14881,7 +14871,7 @@ var TileRequestScheduler = (
|
|
|
14881
14871
|
var l = u[s];
|
|
14882
14872
|
this._traversalStack.reset(), l.camera.refine && (this._canSelectTile = l.camera.visible, this.updateTile(e, l), this.executeTraversal(e, l), this.traverseAndSelect(e, l));
|
|
14883
14873
|
}
|
|
14884
|
-
this.tileset.hasMixedContent = !1, this._traversalStack.reset(), this._descendantTraversalStack.reset(), this._selectionTraversalStack.reset(), this._selectionTraversalancestorStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r), this.traverseAndSelect(e, r))
|
|
14874
|
+
this.tileset.hasMixedContent = !1, this._traversalStack.reset(), this._descendantTraversalStack.reset(), this._selectionTraversalStack.reset(), this._selectionTraversalancestorStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r), this.traverseAndSelect(e, r));
|
|
14885
14875
|
}, t.prototype.reset = function() {
|
|
14886
14876
|
n.prototype.reset.call(this), this._traversalStack.reset(), this._descendantTraversalStack.reset(), this._selectionTraversalStack.reset(), this._selectionTraversalancestorStack.reset();
|
|
14887
14877
|
}, t.prototype.executeTraversal = function(e, r) {
|
|
@@ -14975,7 +14965,7 @@ var TileRequestScheduler = (
|
|
|
14975
14965
|
var l = u[s];
|
|
14976
14966
|
this._traversalStack.reset(), l.camera.refine && (this._canSelectTile = l.camera.visible, e.updateState(l), this.executeTraversal(e, l));
|
|
14977
14967
|
}
|
|
14978
|
-
this._traversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, e.updateState(r), this.executeTraversal(e, r))
|
|
14968
|
+
this._traversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, e.updateState(r), this.executeTraversal(e, r));
|
|
14979
14969
|
}, t.prototype.reset = function() {
|
|
14980
14970
|
n.prototype.reset.call(this), this._traversalStack.reset();
|
|
14981
14971
|
}, t.prototype.executeTraversal = function(e, r) {
|
|
@@ -15421,8 +15411,8 @@ function build(n, t) {
|
|
|
15421
15411
|
M = [D, Promise.resolve([])];
|
|
15422
15412
|
}
|
|
15423
15413
|
H = M[0], H.name = w.name, H.flatShading = !(w.smooth || m.attributes.normal), H.vertexColors = A, n.materials[L] = H;
|
|
15424
|
-
var
|
|
15425
|
-
r.push(
|
|
15414
|
+
var G = M[1];
|
|
15415
|
+
r.push(G), o.push(function() {
|
|
15426
15416
|
return H.dispose();
|
|
15427
15417
|
});
|
|
15428
15418
|
}
|
|
@@ -16234,7 +16224,9 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16234
16224
|
(S === "Panorama" || S === "VRPanorama" || S === "XRPanorama") && E.modelAlpha < 0.1 && (T = E.panoramaMinGeometricError);
|
|
16235
16225
|
var R = E.maxGeometricError;
|
|
16236
16226
|
R = Math.max(T, R);
|
|
16237
|
-
var C =
|
|
16227
|
+
var C = E.maxRequests;
|
|
16228
|
+
E.progress > 0.01 && E.progress < 0.99 && (C = 0);
|
|
16229
|
+
var w = {
|
|
16238
16230
|
debug: E.tileDebug,
|
|
16239
16231
|
time: now(),
|
|
16240
16232
|
camera: {
|
|
@@ -16258,28 +16250,28 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16258
16250
|
skipLevelOfDetail: E.skipLevelOfDetail,
|
|
16259
16251
|
mostDetail: E.mostDetail,
|
|
16260
16252
|
loadSiblings: E.loadSiblings,
|
|
16261
|
-
|
|
16253
|
+
cameraCulling: E.cameraCulling,
|
|
16262
16254
|
maxMemoryUsage: E.maxMemoryUsage,
|
|
16263
|
-
maxRequests:
|
|
16255
|
+
maxRequests: C,
|
|
16264
16256
|
requestOrder: E.requestOrder,
|
|
16265
16257
|
maxScreenSpaceError: E.maxScreenSpaceError,
|
|
16266
16258
|
memoryAdjustedOverflow: E.memoryAdjustedOverflow,
|
|
16267
16259
|
memoryAdjustedScreenSpaceError: E.memoryAdjustedScreenSpaceError
|
|
16268
|
-
},
|
|
16269
|
-
return
|
|
16260
|
+
}, L = E.cacheCameras.map(function(W) {
|
|
16261
|
+
return W.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
|
|
16270
16262
|
type: r.type,
|
|
16271
|
-
position: new THREE.Vector3().copy(
|
|
16272
|
-
direction:
|
|
16273
|
-
up: new THREE.Vector3().copy(
|
|
16274
|
-
projectionMatrix:
|
|
16275
|
-
visible:
|
|
16263
|
+
position: new THREE.Vector3().copy(W.position),
|
|
16264
|
+
direction: W.getWorldDirection(new THREE.Vector3()),
|
|
16265
|
+
up: new THREE.Vector3().copy(W.up),
|
|
16266
|
+
projectionMatrix: W.projectionMatrix.clone(),
|
|
16267
|
+
visible: W.visible,
|
|
16276
16268
|
refine: !0
|
|
16277
|
-
}, cullingVolume: new CullingVolume().setFromCamera(
|
|
16269
|
+
}, cullingVolume: new CullingVolume().setFromCamera(W) });
|
|
16278
16270
|
});
|
|
16279
|
-
if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0), this.autoRefine && this.tileset.update(
|
|
16280
|
-
if (d.refineProgress[1]++,
|
|
16281
|
-
var
|
|
16282
|
-
if (
|
|
16271
|
+
if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0), this.autoRefine && this.tileset.update(w, L), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(W) {
|
|
16272
|
+
if (d.refineProgress[1]++, W.content) {
|
|
16273
|
+
var z = W.content.loadState;
|
|
16274
|
+
if (z === "UNLOADED" || z === "LOADING") {
|
|
16283
16275
|
d.refined = !1;
|
|
16284
16276
|
return;
|
|
16285
16277
|
}
|
|
@@ -16287,65 +16279,65 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16287
16279
|
d.refineProgress[0]++;
|
|
16288
16280
|
}), this.loaded === !1 && this.autoRefine) {
|
|
16289
16281
|
this.loaded = !0;
|
|
16290
|
-
var
|
|
16291
|
-
this.tileset.needsRefinedTiles.forEach(function(
|
|
16292
|
-
if (d.loaded !== !1 &&
|
|
16293
|
-
if (
|
|
16294
|
-
if (
|
|
16295
|
-
var
|
|
16296
|
-
(
|
|
16282
|
+
var H = !1;
|
|
16283
|
+
this.tileset.needsRefinedTiles.forEach(function(W) {
|
|
16284
|
+
if (d.loaded !== !1 && W.content) {
|
|
16285
|
+
if (W.state.visible && (H = !0), w.skipLevelOfDetail) {
|
|
16286
|
+
if (W.state.finalResolution) {
|
|
16287
|
+
var z = W.state.ancestorWithContentAvailable, Ce = z && z.content ? z.content : W.content, ce = Ce.loadState;
|
|
16288
|
+
(ce === "UNLOADED" || ce === "LOADING") && (d.loaded = !1);
|
|
16297
16289
|
}
|
|
16298
|
-
} else if (
|
|
16299
|
-
var
|
|
16300
|
-
(
|
|
16290
|
+
} else if (W.state.visible && W.levelOfContent <= 0) {
|
|
16291
|
+
var ce = W.content.loadState;
|
|
16292
|
+
(ce === "UNLOADED" || ce === "LOADING") && (d.loaded = !1);
|
|
16301
16293
|
}
|
|
16302
16294
|
}
|
|
16303
|
-
}),
|
|
16304
|
-
}
|
|
16305
|
-
this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.debugObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children),
|
|
16306
|
-
return
|
|
16307
|
-
}),
|
|
16308
|
-
for (var
|
|
16309
|
-
var
|
|
16310
|
-
|
|
16311
|
-
var
|
|
16312
|
-
if (
|
|
16313
|
-
var
|
|
16314
|
-
if (
|
|
16315
|
-
if (!
|
|
16316
|
-
var
|
|
16317
|
-
this.backfaceObjects.push(
|
|
16295
|
+
}), H && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
|
|
16296
|
+
}
|
|
16297
|
+
this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.debugObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(W, z) {
|
|
16298
|
+
return W.floor !== z.floor ? W.floor - z.floor : W.levelOfContent !== z.levelOfContent ? z.levelOfContent - W.levelOfContent : W.state.distanceToCamera !== z.state.distanceToCamera ? W.state.distanceToCamera - z.state.distanceToCamera : W.state.centerZDepth - z.state.centerZDepth;
|
|
16299
|
+
}), w.debug === "root-bounding-volume" && this.tileset.root.boundingVolumeDebugObject && this.debugObjects.push(this.tileset.root.boundingVolumeDebugObject);
|
|
16300
|
+
for (var M = [], P = 0, B = this.tileset.selectedTiles; P < B.length; P++) {
|
|
16301
|
+
var O = B[P];
|
|
16302
|
+
w.debug === "selected-bounding-volume" && O.boundingVolumeDebugObject && this.debugObjects.push(O.boundingVolumeDebugObject);
|
|
16303
|
+
var _ = (h = (f = O.content) === null || f === void 0 ? void 0 : f.data) === null || h === void 0 ? void 0 : h.object;
|
|
16304
|
+
if (_) {
|
|
16305
|
+
var N = _.update(e, r, o, this, O, E);
|
|
16306
|
+
if (M.push(O.id), N && (m = !0), this.tileset.hasMixedContent && w.skipLevelOfDetail) {
|
|
16307
|
+
if (!O.state.finalResolution) {
|
|
16308
|
+
var D = this.cloneSkipBackfaceObject(_);
|
|
16309
|
+
this.backfaceObjects.push(D);
|
|
16318
16310
|
}
|
|
16319
|
-
for (var
|
|
16320
|
-
var
|
|
16321
|
-
|
|
16311
|
+
for (var G = O.state.selectionDepth, K = STENCIL_CONSTANT.TILE_MASK | G << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, J = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, X = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, j = 0, $ = _.materials; j < $.length; j++) {
|
|
16312
|
+
var q = $[j];
|
|
16313
|
+
q.stencilWrite = !0, q.stencilRef = K, q.stencilFunc = J, q.stencilFuncMask = Q, q.stencilZPass = U, q.stencilWriteMask = X;
|
|
16322
16314
|
}
|
|
16323
16315
|
} else
|
|
16324
|
-
for (var
|
|
16325
|
-
var
|
|
16326
|
-
|
|
16316
|
+
for (var re = 0, Y = _.materials; re < Y.length; re++) {
|
|
16317
|
+
var q = Y[re];
|
|
16318
|
+
q.stencilWrite = !1, q.stencilRef = STENCIL_CONSTANT.TILE_MASK, q.stencilFunc = THREE.AlwaysStencilFunc, q.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, q.stencilZPass = THREE.ReplaceStencilOp, q.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
|
|
16327
16319
|
}
|
|
16328
|
-
this.tileObjects.push(
|
|
16329
|
-
}
|
|
16330
|
-
}
|
|
16331
|
-
var
|
|
16332
|
-
tileVersionMap.get(this) !==
|
|
16333
|
-
for (var
|
|
16334
|
-
var
|
|
16335
|
-
if (
|
|
16336
|
-
var
|
|
16337
|
-
|
|
16338
|
-
}
|
|
16339
|
-
}
|
|
16340
|
-
var
|
|
16341
|
-
trajectoryVersionMap.get(this) !==
|
|
16342
|
-
for (var
|
|
16343
|
-
var
|
|
16344
|
-
|
|
16345
|
-
(
|
|
16346
|
-
}),
|
|
16347
|
-
},
|
|
16348
|
-
|
|
16320
|
+
this.tileObjects.push(_);
|
|
16321
|
+
}
|
|
16322
|
+
}
|
|
16323
|
+
var ee = M.toString();
|
|
16324
|
+
tileVersionMap.get(this) !== ee && (tileVersionMap.set(this, ee), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), w.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
|
|
16325
|
+
for (var ne = [], le = 0, ie = this.tileset.selectedTrajectories; le < ie.length; le++) {
|
|
16326
|
+
var se = ie[le], ae = (p = se.content.data) === null || p === void 0 ? void 0 : p.object;
|
|
16327
|
+
if (ae) {
|
|
16328
|
+
var N = ae.update(e, r, o, this, se, E);
|
|
16329
|
+
ne.push(se.id), N && (m = !0), this.renderObjects.push(ae);
|
|
16330
|
+
}
|
|
16331
|
+
}
|
|
16332
|
+
var fe = ne.toString();
|
|
16333
|
+
trajectoryVersionMap.get(this) !== fe && (trajectoryVersionMap.set(this, fe), m = !0), w.debug && (c = this.renderObjects).push.apply(c, this.debugObjects);
|
|
16334
|
+
for (var he = Math.min(0, ((A = (g = this.parent) === null || g === void 0 ? void 0 : g.children) !== null && A !== void 0 ? A : []).indexOf(this)), xe = he * 1e4, de = function(W) {
|
|
16335
|
+
var z = Re.renderObjects[W], Ce = W + xe;
|
|
16336
|
+
z.traverse(function(ce) {
|
|
16337
|
+
(ce instanceof THREE.Mesh || ce instanceof THREE.Line || ce instanceof THREE.Points) && (ce.renderOrder = Ce);
|
|
16338
|
+
}), Re.add(z);
|
|
16339
|
+
}, Re = this, te = 0; te < this.renderObjects.length; te++)
|
|
16340
|
+
de(te);
|
|
16349
16341
|
return m;
|
|
16350
16342
|
}, t.prototype.dispose = function() {
|
|
16351
16343
|
this.disposed = !0, this.tileset.reset(), /^blob\:/.test(this.tileset.id) && URL.revokeObjectURL(this.tileset.id), this.remove.apply(this, this.children), this.refined = !1, this.loaded = !1, this.refineProgress[0] = this.refineProgress[1] = 0;
|
|
@@ -16547,19 +16539,6 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16547
16539
|
},
|
|
16548
16540
|
enumerable: !1,
|
|
16549
16541
|
configurable: !0
|
|
16550
|
-
}), Object.defineProperty(t.prototype, "loadAll", {
|
|
16551
|
-
/**
|
|
16552
|
-
* @deprecated
|
|
16553
|
-
* use `.parameter.loadAll` `.parameter.set('loadAll', loadAll)` instend
|
|
16554
|
-
*/
|
|
16555
|
-
get: function() {
|
|
16556
|
-
return this.parameter.resolveValue().loadAll;
|
|
16557
|
-
},
|
|
16558
|
-
set: function(e) {
|
|
16559
|
-
this.parameter.set("loadAll", e);
|
|
16560
|
-
},
|
|
16561
|
-
enumerable: !1,
|
|
16562
|
-
configurable: !0
|
|
16563
16542
|
}), Object.defineProperty(t.prototype, "maxMemoryUsage", {
|
|
16564
16543
|
/**
|
|
16565
16544
|
* @deprecated
|
|
@@ -16909,10 +16888,10 @@ function parse(n, t, e) {
|
|
|
16909
16888
|
var P = verify(w);
|
|
16910
16889
|
if (P instanceof Error)
|
|
16911
16890
|
return P;
|
|
16912
|
-
Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = w.map(function(
|
|
16913
|
-
return JSON.parse(
|
|
16914
|
-
}).reduce(function(
|
|
16915
|
-
return deepMerge(
|
|
16891
|
+
Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = w.map(function(te) {
|
|
16892
|
+
return JSON.parse(te);
|
|
16893
|
+
}).reduce(function(te, W) {
|
|
16894
|
+
return deepMerge(te, W);
|
|
16916
16895
|
}), defineProperty(e, "raw", {
|
|
16917
16896
|
configurable: !1,
|
|
16918
16897
|
get: function() {
|
|
@@ -16971,31 +16950,31 @@ function parse(n, t, e) {
|
|
|
16971
16950
|
return D;
|
|
16972
16951
|
}
|
|
16973
16952
|
});
|
|
16974
|
-
var
|
|
16975
|
-
n.model.textureBase ?
|
|
16953
|
+
var G;
|
|
16954
|
+
n.model.textureBase ? G = textureURL$1(_, "", n.model.textureBase, t) : n.model.material_base_url ? G = textureURL$1(_, "", n.model.material_base_url, t) : N.file && (G = N.file.split("/").slice(0, -1).join("/").replace("/model/", "/materials/")), defineProperty(N, "textureBase", {
|
|
16976
16955
|
configurable: !1,
|
|
16977
16956
|
get: function() {
|
|
16978
|
-
return
|
|
16957
|
+
return G;
|
|
16979
16958
|
}
|
|
16980
16959
|
});
|
|
16981
16960
|
var K;
|
|
16982
|
-
Array.isArray(n.model.textures) ? (K = n.model.textures.map(function(
|
|
16983
|
-
var
|
|
16984
|
-
return textureURL$1(_,
|
|
16985
|
-
}), Object.freeze(K)) : Array.isArray(n.model.material_textures) && (K = n.model.material_textures.map(function(
|
|
16986
|
-
var
|
|
16987
|
-
return textureURL$1(_,
|
|
16961
|
+
Array.isArray(n.model.textures) ? (K = n.model.textures.map(function(te) {
|
|
16962
|
+
var W, z;
|
|
16963
|
+
return textureURL$1(_, te, (z = (W = n.model.textureBase) !== null && W !== void 0 ? W : n.model.material_base_url) !== null && z !== void 0 ? z : "", t);
|
|
16964
|
+
}), Object.freeze(K)) : Array.isArray(n.model.material_textures) && (K = n.model.material_textures.map(function(te) {
|
|
16965
|
+
var W, z;
|
|
16966
|
+
return textureURL$1(_, te, (z = (W = n.model.textureBase) !== null && W !== void 0 ? W : n.model.material_base_url) !== null && z !== void 0 ? z : "", t);
|
|
16988
16967
|
}), Object.freeze(K)), defineProperty(N, "textures", {
|
|
16989
16968
|
configurable: !1,
|
|
16990
16969
|
get: function() {
|
|
16991
16970
|
return K;
|
|
16992
16971
|
}
|
|
16993
16972
|
});
|
|
16994
|
-
var
|
|
16973
|
+
var J = [];
|
|
16995
16974
|
if (Array.isArray(n.model.tiles))
|
|
16996
|
-
for (var
|
|
16997
|
-
var X =
|
|
16998
|
-
X && (X.tileset || X.tileset_url) &&
|
|
16975
|
+
for (var Q = 0, U = n.model.tiles; Q < U.length; Q++) {
|
|
16976
|
+
var X = U[Q];
|
|
16977
|
+
X && (X.tileset || X.tileset_url) && J.push(Object.freeze({
|
|
16999
16978
|
type: (s = X.type) !== null && s !== void 0 ? s : "mesh",
|
|
17000
16979
|
name: (u = X.name) !== null && u !== void 0 ? u : "",
|
|
17001
16980
|
upAxis: (c = (l = X.upAxis) !== null && l !== void 0 ? l : X.up_axis) !== null && c !== void 0 ? c : "-Y",
|
|
@@ -17003,26 +16982,26 @@ function parse(n, t, e) {
|
|
|
17003
16982
|
}));
|
|
17004
16983
|
}
|
|
17005
16984
|
else
|
|
17006
|
-
n.model.tiles && (n.model.tiles.tileset || n.model.tiles.tileset_url) &&
|
|
16985
|
+
n.model.tiles && (n.model.tiles.tileset || n.model.tiles.tileset_url) && J.push(Object.freeze({
|
|
17007
16986
|
type: (d = n.model.tiles.type) !== null && d !== void 0 ? d : "mesh",
|
|
17008
16987
|
name: (f = n.model.tiles.name) !== null && f !== void 0 ? f : "lod",
|
|
17009
16988
|
upAxis: (p = (h = n.model.tiles.upAxis) !== null && h !== void 0 ? h : n.model.tiles.up_axis) !== null && p !== void 0 ? p : "-Y",
|
|
17010
16989
|
tileset: fileURL(_, n.model.tiles.tileset || n.model.tiles.tileset_url, t)
|
|
17011
16990
|
}));
|
|
17012
16991
|
if (Array.isArray(n.model.layers))
|
|
17013
|
-
for (var
|
|
17014
|
-
var
|
|
17015
|
-
|
|
17016
|
-
type: (g =
|
|
17017
|
-
name: (A =
|
|
17018
|
-
upAxis: (m =
|
|
17019
|
-
tileset: fileURL(_,
|
|
16992
|
+
for (var j = 0, $ = n.model.layers; j < $.length; j++) {
|
|
16993
|
+
var q = $[j];
|
|
16994
|
+
q && (q.tileset || q.tileset_url) && J.push(Object.freeze({
|
|
16995
|
+
type: (g = q.type) !== null && g !== void 0 ? g : "mesh",
|
|
16996
|
+
name: (A = q.name) !== null && A !== void 0 ? A : "",
|
|
16997
|
+
upAxis: (m = q.upAxis) !== null && m !== void 0 ? m : q.up_axis,
|
|
16998
|
+
tileset: fileURL(_, q.tileset || q.tileset_url, t)
|
|
17020
16999
|
}));
|
|
17021
17000
|
}
|
|
17022
|
-
Object.freeze(
|
|
17001
|
+
Object.freeze(J), defineProperty(N, "layers", {
|
|
17023
17002
|
configurable: !1,
|
|
17024
17003
|
get: function() {
|
|
17025
|
-
return
|
|
17004
|
+
return J;
|
|
17026
17005
|
}
|
|
17027
17006
|
}), defineProperty(e, "model", {
|
|
17028
17007
|
configurable: !1,
|
|
@@ -17034,14 +17013,14 @@ function parse(n, t, e) {
|
|
|
17034
17013
|
}
|
|
17035
17014
|
if (P instanceof Error)
|
|
17036
17015
|
return P;
|
|
17037
|
-
var
|
|
17016
|
+
var re = /* @__PURE__ */ new Set(), Y = /* @__PURE__ */ new Set();
|
|
17038
17017
|
{
|
|
17039
17018
|
var ee = [];
|
|
17040
17019
|
if (n.observers && Array.isArray(n.observers)) {
|
|
17041
|
-
var
|
|
17042
|
-
n.panorama && (Array.isArray(n.panorama) ?
|
|
17043
|
-
for (var le = function(
|
|
17044
|
-
var
|
|
17020
|
+
var ne = [];
|
|
17021
|
+
n.panorama && (Array.isArray(n.panorama) ? ne = n.panorama : Array.isArray(n.panorama.list) ? ne = n.panorama.list : Array.isArray(n.panorama.info) && (ne = n.panorama.info));
|
|
17022
|
+
for (var le = function(te) {
|
|
17023
|
+
var W = {
|
|
17045
17024
|
getResolvedPosition: function(Ee) {
|
|
17046
17025
|
return Ee.copy(this.position).applyMatrix4(this.work.transform), Ee;
|
|
17047
17026
|
},
|
|
@@ -17054,107 +17033,107 @@ function parse(n, t, e) {
|
|
|
17054
17033
|
getResolvedMatrix: function(Ee) {
|
|
17055
17034
|
return Ee.copy(this.matrix).premultiply(this.work.transform), Ee;
|
|
17056
17035
|
}
|
|
17057
|
-
},
|
|
17058
|
-
if (!
|
|
17036
|
+
}, z = n.observers[te];
|
|
17037
|
+
if (!z)
|
|
17059
17038
|
return "break";
|
|
17060
|
-
var
|
|
17061
|
-
if (!
|
|
17039
|
+
var Ce = ne[te];
|
|
17040
|
+
if (!Ce)
|
|
17062
17041
|
return "break";
|
|
17063
|
-
|
|
17042
|
+
z = Object.assign({}, z, Ce, {
|
|
17064
17043
|
// 处理 active
|
|
17065
17044
|
// observer.active | panorama.active 有一个 false 则为 false
|
|
17066
|
-
active:
|
|
17067
|
-
}), defineProperty(
|
|
17045
|
+
active: z.active !== !1 && Ce.active !== !1
|
|
17046
|
+
}), defineProperty(W, "work", {
|
|
17068
17047
|
configurable: !1,
|
|
17069
17048
|
get: function() {
|
|
17070
17049
|
return e;
|
|
17071
17050
|
}
|
|
17072
|
-
}), defineProperty(
|
|
17051
|
+
}), defineProperty(W, "index", {
|
|
17073
17052
|
configurable: !1,
|
|
17074
17053
|
get: function() {
|
|
17075
|
-
return
|
|
17054
|
+
return te;
|
|
17076
17055
|
}
|
|
17077
|
-
}),
|
|
17056
|
+
}), Y.add(te), defineProperty(W, "panoIndex", {
|
|
17078
17057
|
configurable: !1,
|
|
17079
17058
|
get: function() {
|
|
17080
|
-
return
|
|
17059
|
+
return te;
|
|
17081
17060
|
}
|
|
17082
17061
|
});
|
|
17083
|
-
var
|
|
17062
|
+
var ce = panoStringify({
|
|
17084
17063
|
workCode: e.workCode,
|
|
17085
|
-
panoIndex:
|
|
17064
|
+
panoIndex: te
|
|
17086
17065
|
});
|
|
17087
|
-
|
|
17066
|
+
re.add(ce), defineProperty(W, "panoId", {
|
|
17088
17067
|
configurable: !1,
|
|
17089
17068
|
get: function() {
|
|
17090
|
-
return
|
|
17069
|
+
return ce;
|
|
17091
17070
|
}
|
|
17092
17071
|
});
|
|
17093
17072
|
var ve = Object.freeze({
|
|
17094
17073
|
workCode: e.workCode,
|
|
17095
|
-
panoIndex:
|
|
17074
|
+
panoIndex: te
|
|
17096
17075
|
});
|
|
17097
|
-
defineProperty(
|
|
17076
|
+
defineProperty(W, "pano", {
|
|
17098
17077
|
configurable: !1,
|
|
17099
17078
|
get: function() {
|
|
17100
17079
|
return ve;
|
|
17101
17080
|
}
|
|
17102
17081
|
});
|
|
17103
|
-
var Ve =
|
|
17104
|
-
defineProperty(
|
|
17082
|
+
var Ve = z.active !== !1;
|
|
17083
|
+
defineProperty(W, "active", {
|
|
17105
17084
|
configurable: !1,
|
|
17106
17085
|
get: function() {
|
|
17107
17086
|
return Ve;
|
|
17108
17087
|
}
|
|
17109
17088
|
});
|
|
17110
|
-
var rt =
|
|
17111
|
-
defineProperty(
|
|
17089
|
+
var rt = z.loadable === !0;
|
|
17090
|
+
defineProperty(W, "loadable", {
|
|
17112
17091
|
configurable: !1,
|
|
17113
17092
|
get: function() {
|
|
17114
17093
|
return rt;
|
|
17115
17094
|
}
|
|
17116
17095
|
});
|
|
17117
|
-
var We =
|
|
17118
|
-
defineProperty(
|
|
17096
|
+
var We = z.derived_id;
|
|
17097
|
+
defineProperty(W, "derivedId", {
|
|
17119
17098
|
configurable: !1,
|
|
17120
17099
|
get: function() {
|
|
17121
17100
|
return We;
|
|
17122
17101
|
}
|
|
17123
17102
|
});
|
|
17124
|
-
var me =
|
|
17125
|
-
defineProperty(
|
|
17103
|
+
var me = z.derived_id_str;
|
|
17104
|
+
defineProperty(W, "derivedIdStr", {
|
|
17126
17105
|
configurable: !1,
|
|
17127
17106
|
get: function() {
|
|
17128
17107
|
return me;
|
|
17129
17108
|
}
|
|
17130
17109
|
});
|
|
17131
|
-
var
|
|
17132
|
-
up: panoURL(_,
|
|
17133
|
-
down: panoURL(_,
|
|
17134
|
-
right: panoURL(_,
|
|
17135
|
-
left: panoURL(_,
|
|
17136
|
-
front: panoURL(_,
|
|
17137
|
-
back: panoURL(_,
|
|
17110
|
+
var oe = (S = (b = (v = (E = n.panorama) === null || E === void 0 ? void 0 : E.pano_high_cube_base_url) !== null && v !== void 0 ? v : (y = n.panorama) === null || y === void 0 ? void 0 : y.pano_cube_base_url) !== null && b !== void 0 ? b : (T = n.panorama) === null || T === void 0 ? void 0 : T.base_url) !== null && S !== void 0 ? S : "", pe = {
|
|
17111
|
+
up: panoURL(_, oe, z.images ? z.images.up : z.up, te, t),
|
|
17112
|
+
down: panoURL(_, oe, z.images ? z.images.down : z.down, te, t),
|
|
17113
|
+
right: panoURL(_, oe, z.images ? z.images.right : z.right, te, t),
|
|
17114
|
+
left: panoURL(_, oe, z.images ? z.images.left : z.left, te, t),
|
|
17115
|
+
front: panoURL(_, oe, z.images ? z.images.front : z.front, te, t),
|
|
17116
|
+
back: panoURL(_, oe, z.images ? z.images.back : z.back, te, t)
|
|
17138
17117
|
};
|
|
17139
|
-
if (
|
|
17140
|
-
pe.sizeList =
|
|
17118
|
+
if (z.size_list)
|
|
17119
|
+
pe.sizeList = z.size_list.slice();
|
|
17141
17120
|
else {
|
|
17142
17121
|
var Me = getImageSizeFromURL(pe.up);
|
|
17143
|
-
if (Me && (pe.sizeList = [Me],
|
|
17144
|
-
for (var
|
|
17122
|
+
if (Me && (pe.sizeList = [Me], z.tiles))
|
|
17123
|
+
for (var Te = z.tiles.slice().sort(function(Ee, $e) {
|
|
17145
17124
|
return Ee - $e;
|
|
17146
17125
|
}).map(function(Ee) {
|
|
17147
17126
|
return 512 * Math.pow(2, Ee);
|
|
17148
|
-
}), Pe = 0, Fe =
|
|
17127
|
+
}), Pe = 0, Fe = Te; Pe < Fe.length; Pe++) {
|
|
17149
17128
|
var Ae = Fe[Pe];
|
|
17150
17129
|
Ae > Me && pe.sizeList.push(Ae);
|
|
17151
17130
|
}
|
|
17152
17131
|
}
|
|
17153
|
-
var
|
|
17154
|
-
if (
|
|
17155
|
-
|
|
17156
|
-
else if (Array.isArray(
|
|
17157
|
-
var Ie =
|
|
17132
|
+
var be = void 0;
|
|
17133
|
+
if (z.images)
|
|
17134
|
+
be = z.images.tiles;
|
|
17135
|
+
else if (Array.isArray(z.size_list)) {
|
|
17136
|
+
var Ie = z.size_list.slice().sort(function(Ee, $e) {
|
|
17158
17137
|
return Ee - $e;
|
|
17159
17138
|
});
|
|
17160
17139
|
if (Ie[0]) {
|
|
@@ -17162,13 +17141,13 @@ function parse(n, t, e) {
|
|
|
17162
17141
|
if (Be)
|
|
17163
17142
|
for (var qe = Be - 1; qe >= 0; qe--)
|
|
17164
17143
|
Ie.unshift(512 * Math.pow(2, qe));
|
|
17165
|
-
|
|
17144
|
+
be = Ie;
|
|
17166
17145
|
}
|
|
17167
|
-
} else if (Array.isArray(
|
|
17168
|
-
if (
|
|
17169
|
-
for (var ke =
|
|
17170
|
-
|
|
17171
|
-
|
|
17146
|
+
} else if (Array.isArray(z.tiles)) {
|
|
17147
|
+
if (be = z.tiles.slice(), typeof be[0] == "number") {
|
|
17148
|
+
for (var ke = be[0]; --ke >= 0; )
|
|
17149
|
+
be.unshift(ke);
|
|
17150
|
+
be = be.sort(function(Ee, $e) {
|
|
17172
17151
|
return Ee - $e;
|
|
17173
17152
|
}).map(function(Ee) {
|
|
17174
17153
|
return 512 * Math.pow(2, Ee);
|
|
@@ -17183,11 +17162,11 @@ function parse(n, t, e) {
|
|
|
17183
17162
|
if (Be)
|
|
17184
17163
|
for (var qe = Be - 1; qe >= 0; qe--)
|
|
17185
17164
|
Ie.unshift(512 * Math.pow(2, qe));
|
|
17186
|
-
|
|
17165
|
+
be = Ie;
|
|
17187
17166
|
}
|
|
17188
17167
|
}
|
|
17189
|
-
if (
|
|
17190
|
-
for (var Ne = [], _e = 0, Ue =
|
|
17168
|
+
if (be) {
|
|
17169
|
+
for (var Ne = [], _e = 0, Ue = be; _e < Ue.length; _e++) {
|
|
17191
17170
|
var Ae = Ue[_e];
|
|
17192
17171
|
if (typeof Ae == "number") {
|
|
17193
17172
|
var De = getTileLevel(Ae);
|
|
@@ -17197,11 +17176,11 @@ function parse(n, t, e) {
|
|
|
17197
17176
|
if (!je)
|
|
17198
17177
|
continue;
|
|
17199
17178
|
if (Ae > je) {
|
|
17200
|
-
var
|
|
17201
|
-
Ne.push(Object.freeze({ level: De, size: Ae, scale: 1, up:
|
|
17179
|
+
var Se = replaceImageSize(pe.up, Ae), Oe = replaceImageSize(pe.down, Ae), we = replaceImageSize(pe.right, Ae), Le = replaceImageSize(pe.left, Ae), He = replaceImageSize(pe.front, Ae), Ge = replaceImageSize(pe.back, Ae);
|
|
17180
|
+
Ne.push(Object.freeze({ level: De, size: Ae, scale: 1, up: Se, down: Oe, right: we, left: Le, front: He, back: Ge }));
|
|
17202
17181
|
} else {
|
|
17203
|
-
var
|
|
17204
|
-
Ne.push(Object.freeze({ level: De, size: je, scale: Ae / je, up:
|
|
17182
|
+
var Se = pe.up, Oe = pe.down, we = pe.right, Le = pe.left, He = pe.front, Ge = pe.back;
|
|
17183
|
+
Ne.push(Object.freeze({ level: De, size: je, scale: Ae / je, up: Se, down: Oe, right: we, left: Le, front: He, back: Ge }));
|
|
17205
17184
|
}
|
|
17206
17185
|
} else {
|
|
17207
17186
|
var De = Ae.level;
|
|
@@ -17210,8 +17189,8 @@ function parse(n, t, e) {
|
|
|
17210
17189
|
var Me = Ae.size;
|
|
17211
17190
|
if (typeof Me != "number")
|
|
17212
17191
|
continue;
|
|
17213
|
-
var
|
|
17214
|
-
Ne.push(Object.freeze({ level: De, size: Me, scale: (R = Ae.scale) !== null && R !== void 0 ? R : 1, up:
|
|
17192
|
+
var Se = panoURL(_, oe, Ae.up, te, t), Oe = panoURL(_, oe, Ae.down, te, t), we = panoURL(_, oe, Ae.right, te, t), Le = panoURL(_, oe, Ae.left, te, t), He = panoURL(_, oe, Ae.front, te, t), Ge = panoURL(_, oe, Ae.back, te, t);
|
|
17193
|
+
Ne.push(Object.freeze({ level: De, size: Me, scale: (R = Ae.scale) !== null && R !== void 0 ? R : 1, up: Se, down: Oe, right: we, left: Le, front: He, back: Ge }));
|
|
17215
17194
|
}
|
|
17216
17195
|
}
|
|
17217
17196
|
Ne = sortTile(Ne), Object.freeze(Ne), defineProperty(pe, "tiles", {
|
|
@@ -17221,191 +17200,191 @@ function parse(n, t, e) {
|
|
|
17221
17200
|
}
|
|
17222
17201
|
});
|
|
17223
17202
|
}
|
|
17224
|
-
Object.freeze(pe), defineProperty(
|
|
17203
|
+
Object.freeze(pe), defineProperty(W, "images", {
|
|
17225
17204
|
configurable: !1,
|
|
17226
17205
|
get: function() {
|
|
17227
17206
|
return pe;
|
|
17228
17207
|
}
|
|
17229
17208
|
});
|
|
17230
17209
|
var Ze = new THREE.Vector3();
|
|
17231
|
-
if (
|
|
17232
|
-
Ze.copy(
|
|
17233
|
-
else if (Array.isArray(
|
|
17234
|
-
Ze.fromArray(
|
|
17210
|
+
if (z.position instanceof THREE.Vector3)
|
|
17211
|
+
Ze.copy(z.position);
|
|
17212
|
+
else if (Array.isArray(z.position))
|
|
17213
|
+
Ze.fromArray(z.position);
|
|
17235
17214
|
else
|
|
17236
17215
|
return "break";
|
|
17237
|
-
Object.freeze(Ze), e.observerBox.expandByPoint(Ze), defineProperty(
|
|
17216
|
+
Object.freeze(Ze), e.observerBox.expandByPoint(Ze), defineProperty(W, "position", {
|
|
17238
17217
|
configurable: !1,
|
|
17239
17218
|
get: function() {
|
|
17240
17219
|
return Ze;
|
|
17241
17220
|
}
|
|
17242
17221
|
});
|
|
17243
17222
|
var Ye = new THREE.Vector3();
|
|
17244
|
-
if (
|
|
17245
|
-
Ye.copy(
|
|
17246
|
-
else if (Array.isArray(
|
|
17247
|
-
Ye.fromArray(
|
|
17248
|
-
else if (
|
|
17249
|
-
Ye.copy(
|
|
17250
|
-
else if (Array.isArray(
|
|
17251
|
-
Ye.fromArray(
|
|
17223
|
+
if (z.standingPosition instanceof THREE.Vector3)
|
|
17224
|
+
Ye.copy(z.standingPosition);
|
|
17225
|
+
else if (Array.isArray(z.standingPosition))
|
|
17226
|
+
Ye.fromArray(z.standingPosition);
|
|
17227
|
+
else if (z.standing_position instanceof THREE.Vector3)
|
|
17228
|
+
Ye.copy(z.standing_position);
|
|
17229
|
+
else if (Array.isArray(z.standing_position))
|
|
17230
|
+
Ye.fromArray(z.standing_position);
|
|
17252
17231
|
else
|
|
17253
17232
|
return "break";
|
|
17254
|
-
Object.freeze(Ye), e.observerBox.expandByPoint(Ye), defineProperty(
|
|
17233
|
+
Object.freeze(Ye), e.observerBox.expandByPoint(Ye), defineProperty(W, "standingPosition", {
|
|
17255
17234
|
configurable: !1,
|
|
17256
17235
|
get: function() {
|
|
17257
17236
|
return Ye;
|
|
17258
17237
|
}
|
|
17259
17238
|
});
|
|
17260
17239
|
var Qe = new THREE.Quaternion();
|
|
17261
|
-
if (
|
|
17262
|
-
Qe.copy(
|
|
17263
|
-
else if (Array.isArray(
|
|
17264
|
-
Qe.fromArray(
|
|
17265
|
-
else if (
|
|
17266
|
-
var ye =
|
|
17240
|
+
if (z.quaternion instanceof THREE.Quaternion)
|
|
17241
|
+
Qe.copy(z.quaternion);
|
|
17242
|
+
else if (Array.isArray(z.quaternion))
|
|
17243
|
+
Qe.fromArray(z.quaternion);
|
|
17244
|
+
else if (z.quaternion) {
|
|
17245
|
+
var ye = z.quaternion, Mt = ye.x, vt = ye.y, at = ye.z, Je = ye.w;
|
|
17267
17246
|
Qe.set(Mt, vt, at, Je);
|
|
17268
17247
|
} else
|
|
17269
17248
|
return "break";
|
|
17270
|
-
Object.freeze(Qe), defineProperty(
|
|
17249
|
+
Object.freeze(Qe), defineProperty(W, "quaternion", {
|
|
17271
17250
|
configurable: !1,
|
|
17272
17251
|
get: function() {
|
|
17273
17252
|
return Qe;
|
|
17274
17253
|
}
|
|
17275
17254
|
});
|
|
17276
17255
|
var dt = new THREE.Matrix4().compose(Ze, Qe, PANO_TEXTURE_SCALE);
|
|
17277
|
-
Object.freeze(dt), defineProperty(
|
|
17256
|
+
Object.freeze(dt), defineProperty(W, "matrix", {
|
|
17278
17257
|
configurable: !1,
|
|
17279
17258
|
get: function() {
|
|
17280
17259
|
return dt;
|
|
17281
17260
|
}
|
|
17282
17261
|
});
|
|
17283
17262
|
var nt = 0;
|
|
17284
|
-
isNumber(
|
|
17263
|
+
isNumber(z.floorIndex) ? nt = z.floorIndex : isNumber(z.floor_index) ? nt = z.floor_index : isNumber(z.floor) && (nt = z.floor), defineProperty(W, "floorIndex", {
|
|
17285
17264
|
configurable: !1,
|
|
17286
17265
|
get: function() {
|
|
17287
17266
|
return nt;
|
|
17288
17267
|
}
|
|
17289
17268
|
});
|
|
17290
17269
|
var Ke;
|
|
17291
|
-
|
|
17270
|
+
z.video && (Ke = {
|
|
17292
17271
|
source: "",
|
|
17293
17272
|
matrix: new THREE.Matrix4(),
|
|
17294
17273
|
size: new THREE.Vector2()
|
|
17295
|
-
}, typeof
|
|
17274
|
+
}, typeof z.video.source == "string" && (Ke.source = z.video.source), z.video.matrix instanceof THREE.Matrix4 ? Ke.matrix.copy(z.video.matrix) : Array.isArray(z.video.matrix) && Ke.matrix.fromArray(z.video.matrix), z.video.size instanceof THREE.Vector2 ? Ke.size.copy(z.video.size) : Array.isArray(z.video.size) && Ke.size.fromArray(z.video.size), Object.freeze(Ke)), defineProperty(W, "video", {
|
|
17296
17275
|
configurable: !1,
|
|
17297
17276
|
get: function() {
|
|
17298
17277
|
return Ke;
|
|
17299
17278
|
}
|
|
17300
|
-
}), Array.isArray(
|
|
17279
|
+
}), Array.isArray(z.accessibleNodes) ? (W.accessibleNodes = z.accessibleNodes.slice(), W.accessibleIds = z.accessibleNodes.map(function(Ee) {
|
|
17301
17280
|
return panoStringify({
|
|
17302
17281
|
workCode: e.workCode,
|
|
17303
17282
|
panoIndex: Ee
|
|
17304
17283
|
});
|
|
17305
|
-
})) : Array.isArray(
|
|
17284
|
+
})) : Array.isArray(z.accessible_nodes) && (W.accessibleNodes = z.accessible_nodes.slice(), W.accessibleIds = z.accessible_nodes.map(function(Ee) {
|
|
17306
17285
|
return panoStringify({
|
|
17307
17286
|
workCode: e.workCode,
|
|
17308
17287
|
panoIndex: Ee
|
|
17309
17288
|
});
|
|
17310
|
-
})), Array.isArray(
|
|
17289
|
+
})), Array.isArray(z.visibleNodes) ? (W.visibleNodes = z.visibleNodes.slice(), W.visibleIds = z.visibleNodes.map(function(Ee) {
|
|
17311
17290
|
return panoStringify({
|
|
17312
17291
|
workCode: e.workCode,
|
|
17313
17292
|
panoIndex: Ee
|
|
17314
17293
|
});
|
|
17315
|
-
})) : Array.isArray(
|
|
17294
|
+
})) : Array.isArray(z.visible_nodes) && (W.visibleNodes = z.visible_nodes.slice(), W.visibleIds = z.visible_nodes.map(function(Ee) {
|
|
17316
17295
|
return panoStringify({
|
|
17317
17296
|
workCode: e.workCode,
|
|
17318
17297
|
panoIndex: Ee
|
|
17319
17298
|
});
|
|
17320
|
-
})), ee[
|
|
17299
|
+
})), ee[te] = W;
|
|
17321
17300
|
}, ie = 0; ie < n.observers.length; ie++) {
|
|
17322
|
-
var
|
|
17323
|
-
if (
|
|
17301
|
+
var se = le(ie);
|
|
17302
|
+
if (se === "break")
|
|
17324
17303
|
break;
|
|
17325
17304
|
}
|
|
17326
17305
|
}
|
|
17327
|
-
for (var
|
|
17328
|
-
if (
|
|
17329
|
-
var
|
|
17330
|
-
return
|
|
17306
|
+
for (var ae = function(te) {
|
|
17307
|
+
if (te.accessibleIds) {
|
|
17308
|
+
var Ce = te.accessibleIds.filter(function(oe) {
|
|
17309
|
+
return re.has(oe);
|
|
17331
17310
|
});
|
|
17332
|
-
Object.freeze(
|
|
17311
|
+
Object.freeze(Ce), defineProperty(te, "accessibleIds", {
|
|
17333
17312
|
configurable: !1,
|
|
17334
17313
|
get: function() {
|
|
17335
|
-
return
|
|
17314
|
+
return Ce;
|
|
17336
17315
|
}
|
|
17337
17316
|
});
|
|
17338
17317
|
} else {
|
|
17339
|
-
for (var
|
|
17340
|
-
ee[
|
|
17341
|
-
Object.freeze(
|
|
17318
|
+
for (var W = [], z = 0; z < ee.length; z++)
|
|
17319
|
+
ee[z] !== te && (Math.abs(ee[z].position.y - te.position.y) > 3 || ee[z].position.distanceTo(te.position) > 10 || W.push(ee[z].panoId));
|
|
17320
|
+
Object.freeze(W), defineProperty(te, "accessibleIds", {
|
|
17342
17321
|
configurable: !1,
|
|
17343
17322
|
get: function() {
|
|
17344
|
-
return
|
|
17323
|
+
return W;
|
|
17345
17324
|
}
|
|
17346
17325
|
});
|
|
17347
17326
|
}
|
|
17348
|
-
if (
|
|
17349
|
-
var ve =
|
|
17350
|
-
return
|
|
17327
|
+
if (te.accessibleNodes) {
|
|
17328
|
+
var ve = te.accessibleNodes.filter(function(oe) {
|
|
17329
|
+
return Y.has(oe);
|
|
17351
17330
|
});
|
|
17352
|
-
Object.freeze(ve), defineProperty(
|
|
17331
|
+
Object.freeze(ve), defineProperty(te, "accessibleNodes", {
|
|
17353
17332
|
configurable: !1,
|
|
17354
17333
|
get: function() {
|
|
17355
17334
|
return ve;
|
|
17356
17335
|
}
|
|
17357
17336
|
});
|
|
17358
17337
|
} else {
|
|
17359
|
-
for (var
|
|
17360
|
-
ee[
|
|
17361
|
-
Object.freeze(
|
|
17338
|
+
for (var ce = [], z = 0; z < ee.length; z++)
|
|
17339
|
+
ee[z] !== te && (Math.abs(ee[z].position.y - te.position.y) > 3 || ee[z].position.distanceTo(te.position) > 10 || ce.push(ee[z].panoIndex));
|
|
17340
|
+
Object.freeze(ce), defineProperty(te, "accessibleNodes", {
|
|
17362
17341
|
configurable: !1,
|
|
17363
17342
|
get: function() {
|
|
17364
|
-
return
|
|
17343
|
+
return ce;
|
|
17365
17344
|
}
|
|
17366
17345
|
});
|
|
17367
17346
|
}
|
|
17368
|
-
if (
|
|
17369
|
-
var rt =
|
|
17370
|
-
return
|
|
17347
|
+
if (te.visibleIds) {
|
|
17348
|
+
var rt = te.visibleIds.filter(function(oe) {
|
|
17349
|
+
return re.has(oe);
|
|
17371
17350
|
});
|
|
17372
|
-
Object.freeze(rt), defineProperty(
|
|
17351
|
+
Object.freeze(rt), defineProperty(te, "visibleIds", {
|
|
17373
17352
|
configurable: !1,
|
|
17374
17353
|
get: function() {
|
|
17375
17354
|
return rt;
|
|
17376
17355
|
}
|
|
17377
17356
|
});
|
|
17378
17357
|
} else {
|
|
17379
|
-
var Ve =
|
|
17380
|
-
Object.freeze(Ve), defineProperty(
|
|
17358
|
+
var Ve = te.accessibleIds.slice();
|
|
17359
|
+
Object.freeze(Ve), defineProperty(te, "visibleIds", {
|
|
17381
17360
|
configurable: !1,
|
|
17382
17361
|
get: function() {
|
|
17383
17362
|
return Ve;
|
|
17384
17363
|
}
|
|
17385
17364
|
});
|
|
17386
17365
|
}
|
|
17387
|
-
if (
|
|
17388
|
-
var me =
|
|
17389
|
-
return
|
|
17366
|
+
if (te.visibleNodes) {
|
|
17367
|
+
var me = te.visibleNodes.filter(function(oe) {
|
|
17368
|
+
return Y.has(oe);
|
|
17390
17369
|
});
|
|
17391
|
-
Object.freeze(me), defineProperty(
|
|
17370
|
+
Object.freeze(me), defineProperty(te, "visibleNodes", {
|
|
17392
17371
|
configurable: !1,
|
|
17393
17372
|
get: function() {
|
|
17394
17373
|
return me;
|
|
17395
17374
|
}
|
|
17396
17375
|
});
|
|
17397
17376
|
} else {
|
|
17398
|
-
var We =
|
|
17399
|
-
Object.freeze(We), defineProperty(
|
|
17377
|
+
var We = te.accessibleNodes.slice();
|
|
17378
|
+
Object.freeze(We), defineProperty(te, "visibleNodes", {
|
|
17400
17379
|
configurable: !1,
|
|
17401
17380
|
get: function() {
|
|
17402
17381
|
return We;
|
|
17403
17382
|
}
|
|
17404
17383
|
});
|
|
17405
17384
|
}
|
|
17406
|
-
},
|
|
17407
|
-
var
|
|
17408
|
-
|
|
17385
|
+
}, fe = 0, he = ee; fe < he.length; fe++) {
|
|
17386
|
+
var xe = he[fe];
|
|
17387
|
+
ae(xe);
|
|
17409
17388
|
}
|
|
17410
17389
|
Object.freeze(ee), defineProperty(e, "observers", {
|
|
17411
17390
|
configurable: !1,
|
|
@@ -17418,15 +17397,15 @@ function parse(n, t, e) {
|
|
|
17418
17397
|
return P;
|
|
17419
17398
|
if (n.initial) {
|
|
17420
17399
|
if ((n.initial.mode === "Panorama" && e.observers.length === 0 || n.initial.mode === "Floorplan" || n.initial.mode === "Topview" || n.initial.mode === "Model" || n.initial.mode === "Mapview" || n.initial.mode === "DepthPanorama") && (e.initial.mode = n.initial.mode), isNumber(n.initial.latitude) && (e.initial.latitude = n.initial.latitude), isNumber(n.initial.longitude) ? e.initial.longitude = n.initial.longitude : isNumber(n.initial.heading) && (e.initial.longitude = headingToLongitude(n.initial.heading)), isNumber(n.initial.fov) && (e.initial.fov = n.initial.fov), e.observers.length > 0) {
|
|
17421
|
-
var
|
|
17422
|
-
isNumber(n.initial.panoIndex) ?
|
|
17400
|
+
var de = void 0;
|
|
17401
|
+
isNumber(n.initial.panoIndex) ? de = n.initial.panoIndex : isNumber(n.initial.pano_index) ? de = n.initial.pano_index : isNumber(n.initial.pano) && (de = n.initial.pano), typeof de == "number" && (de = clamp$1(de, 0, e.observers.length - 1), e.initial.panoIndex = de);
|
|
17423
17402
|
}
|
|
17424
17403
|
if (isNumber(n.initial.distance) && (e.initial.distance = n.initial.distance), Array.isArray(n.initial.offset)) {
|
|
17425
|
-
var
|
|
17426
|
-
var
|
|
17427
|
-
return isNaN(
|
|
17404
|
+
var Re = [0, 0, 0].map(function(te, W) {
|
|
17405
|
+
var z = Number(n.initial.offset[W]);
|
|
17406
|
+
return isNaN(z) || !isFinite(z) ? 0 : z;
|
|
17428
17407
|
});
|
|
17429
|
-
e.initial.offset = new THREE.Vector3().fromArray(
|
|
17408
|
+
e.initial.offset = new THREE.Vector3().fromArray(Re);
|
|
17430
17409
|
} else typeof n.initial.offset == "object" && typeof n.initial.offset.x == "number" && typeof n.initial.offset.y == "number" && typeof n.initial.offset.z == "number" && (e.initial.offset = new THREE.Vector3(n.initial.offset.x, n.initial.offset.y, n.initial.offset.z));
|
|
17431
17410
|
!e.initial.mode && typeof e.initial.panoIndex == "number" && (e.initial.mode = "Panorama");
|
|
17432
17411
|
}
|
|
@@ -17940,10 +17919,10 @@ var BufferGeometryUtils = {
|
|
|
17940
17919
|
for (var c = e.tangent.array, d = [], f = [], h = 0; h < l; h++)
|
|
17941
17920
|
d[h] = new THREE.Vector3(), f[h] = new THREE.Vector3();
|
|
17942
17921
|
var p = new THREE.Vector3(), g = new THREE.Vector3(), A = new THREE.Vector3(), m = new THREE.Vector2(), E = new THREE.Vector2(), v = new THREE.Vector2(), y = new THREE.Vector3(), b = new THREE.Vector3();
|
|
17943
|
-
function T(Q, U
|
|
17944
|
-
p.fromArray(o,
|
|
17945
|
-
var X = g.x - p.x,
|
|
17946
|
-
y.set((ie * X - le *
|
|
17922
|
+
function T(J, Q, U) {
|
|
17923
|
+
p.fromArray(o, J * 3), g.fromArray(o, Q * 3), A.fromArray(o, U * 3), m.fromArray(u, J * 2), E.fromArray(u, Q * 2), v.fromArray(u, U * 2);
|
|
17924
|
+
var X = g.x - p.x, j = A.x - p.x, $ = g.y - p.y, q = A.y - p.y, re = g.z - p.z, Y = A.z - p.z, ee = E.x - m.x, ne = v.x - m.x, le = E.y - m.y, ie = v.y - m.y, se = 1 / (ee * ie - ne * le);
|
|
17925
|
+
y.set((ie * X - le * j) * se, (ie * $ - le * q) * se, (ie * re - le * Y) * se), b.set((ee * j - ne * X) * se, (ee * q - ne * $) * se, (ee * Y - ne * re) * se), d[J].add(y), d[Q].add(y), d[U].add(y), f[J].add(b), f[Q].add(b), f[U].add(b);
|
|
17947
17926
|
}
|
|
17948
17927
|
var S = n.groups;
|
|
17949
17928
|
S.length === 0 && (S = [{
|
|
@@ -17953,9 +17932,9 @@ var BufferGeometryUtils = {
|
|
|
17953
17932
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
17954
17933
|
for (var C = S[h], w = C.start, L = C.count, H = w, M = w + L; H < M; H += 3)
|
|
17955
17934
|
T(r[H + 0], r[H + 1], r[H + 2]);
|
|
17956
|
-
var P = new THREE.Vector3(), B = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, D,
|
|
17957
|
-
function K(
|
|
17958
|
-
O.fromArray(s,
|
|
17935
|
+
var P = new THREE.Vector3(), B = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, D, G;
|
|
17936
|
+
function K(J) {
|
|
17937
|
+
O.fromArray(s, J * 3), _.copy(O), D = d[J], P.copy(D), P.sub(O.multiplyScalar(O.dot(D))).normalize(), B.crossVectors(_, D), G = B.dot(f[J]), N = G < 0 ? -1 : 1, c[J * 4] = P.x, c[J * 4 + 1] = P.y, c[J * 4 + 2] = P.z, c[J * 4 + 3] = N;
|
|
17959
17938
|
}
|
|
17960
17939
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
17961
17940
|
for (var C = S[h], w = C.start, L = C.count, H = w, M = w + L; H < M; H += 3)
|
|
@@ -18123,13 +18102,13 @@ function getEdgesBySphere(n, t, e) {
|
|
|
18123
18102
|
var p = (f = (d = c.content) === null || d === void 0 ? void 0 : d.data) === null || f === void 0 ? void 0 : f.object;
|
|
18124
18103
|
if (p && p.visible) {
|
|
18125
18104
|
var g = [];
|
|
18126
|
-
if (p.traverseVisible(function(
|
|
18127
|
-
if (
|
|
18128
|
-
var
|
|
18129
|
-
if (
|
|
18130
|
-
scratchMatrix4.copy(
|
|
18131
|
-
var X =
|
|
18132
|
-
|
|
18105
|
+
if (p.traverseVisible(function(Q) {
|
|
18106
|
+
if (Q instanceof THREE.Mesh) {
|
|
18107
|
+
var U = bvhMeshMap.get(Q);
|
|
18108
|
+
if (U) {
|
|
18109
|
+
scratchMatrix4.copy(Q.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
|
|
18110
|
+
var X = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), j = new THREE.BufferGeometry();
|
|
18111
|
+
j.setAttribute("position", new THREE.BufferAttribute(X, 3)), j.applyMatrix4(Q.matrixWorld), j = BufferGeometryUtils.mergeVertices(j, 0.01), g.push(j);
|
|
18133
18112
|
}
|
|
18134
18113
|
}
|
|
18135
18114
|
}), g.length === 0)
|
|
@@ -18148,10 +18127,10 @@ function getEdgesBySphere(n, t, e) {
|
|
|
18148
18127
|
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: T } : M[D].face2 = T;
|
|
18149
18128
|
}
|
|
18150
18129
|
for (var D in M) {
|
|
18151
|
-
var
|
|
18152
|
-
if (
|
|
18153
|
-
var K = y[
|
|
18154
|
-
o.push(new THREE.Line3(K,
|
|
18130
|
+
var G = M[D];
|
|
18131
|
+
if (G.face2 === void 0 || b[G.face1].normal.dot(b[G.face2].normal) <= r) {
|
|
18132
|
+
var K = y[G.index1], J = y[G.index2];
|
|
18133
|
+
o.push(new THREE.Line3(K, J));
|
|
18155
18134
|
}
|
|
18156
18135
|
}
|
|
18157
18136
|
y.length = 0, b.length = 0;
|
|
@@ -18233,21 +18212,21 @@ var scratchBoundingBox$1 = new THREE.Box3(), scratchViewLayerBox = new THREE.Box
|
|
|
18233
18212
|
}), s;
|
|
18234
18213
|
}, t.prototype.update = function(e, r, o) {
|
|
18235
18214
|
var s = !1;
|
|
18236
|
-
this.needsRender === !0 && (this.needsRender = !1, s = !0);
|
|
18237
|
-
var u = this.
|
|
18215
|
+
this.needsRender === !0 && (this.needsRender = !1, s = !0), this.parameter.resolveValue();
|
|
18216
|
+
var u = this.loaded;
|
|
18238
18217
|
this.refined = !this.metaPending, this.loaded = !this.metaPending, this.refineProgress[0] = this.refineProgress[1] = 0, this.work.transform.equals(this.matrix) || (this.matrix.copy(this.work.transform), this.matrix.decompose(this.position, this.quaternion, this.scale), s = !0);
|
|
18239
|
-
for (var
|
|
18240
|
-
var
|
|
18241
|
-
|
|
18242
|
-
var
|
|
18243
|
-
|
|
18218
|
+
for (var l = 0, c = this.children; l < c.length; l++) {
|
|
18219
|
+
var d = c[l];
|
|
18220
|
+
d.autoRefine = this.autoRefine;
|
|
18221
|
+
var f = d.update(e, r, o, this);
|
|
18222
|
+
f && (s = !0), d.refined === !1 && (this.refined = !1), d.loaded === !1 && (this.loaded = !1), this.refineProgress[0] += d.refineProgress[0], this.refineProgress[1] += d.refineProgress[1];
|
|
18244
18223
|
}
|
|
18245
18224
|
scratchBoundingBox$1.makeEmpty(), scratchObserverBox.copy(this.work.observerBox), scratchObserverBox.isEmpty() || (scratchObserverBox.max.x += 1, scratchObserverBox.max.z += 1, scratchObserverBox.max.y += 1, scratchObserverBox.min.x -= 1, scratchObserverBox.min.z -= 1, scratchBoundingBox$1.union(scratchObserverBox));
|
|
18246
|
-
for (var
|
|
18247
|
-
var
|
|
18248
|
-
|
|
18225
|
+
for (var h = 0, p = this.viewLayers; h < p.length; h++) {
|
|
18226
|
+
var d = p[h];
|
|
18227
|
+
d.boundingBox.isEmpty() || (scratchViewLayerBox.copy(d.boundingBox).applyMatrix4(d.matrix), scratchBoundingBox$1.union(scratchViewLayerBox));
|
|
18249
18228
|
}
|
|
18250
|
-
return this.boundingBox.copy(scratchBoundingBox$1),
|
|
18229
|
+
return this.boundingBox.copy(scratchBoundingBox$1), u === !1 && this.loaded === !0 && this.dispatchEvent({ type: "load" }), s;
|
|
18251
18230
|
}, t.prototype.localToEnu = function(e) {
|
|
18252
18231
|
return e.applyMatrix4(localToEnuMatrix);
|
|
18253
18232
|
}, t.prototype.enuToLocal = function(e) {
|
|
@@ -19603,48 +19582,48 @@ var Hammer = function(n, t, e, r) {
|
|
|
19603
19582
|
return Array.isArray(I) ? (p(I, k[F], k), !0) : !1;
|
|
19604
19583
|
}
|
|
19605
19584
|
function p(I, F, k) {
|
|
19606
|
-
var
|
|
19585
|
+
var V;
|
|
19607
19586
|
if (I)
|
|
19608
19587
|
if (I.forEach)
|
|
19609
19588
|
I.forEach(F, k);
|
|
19610
19589
|
else if (I.length !== r)
|
|
19611
|
-
for (
|
|
19612
|
-
F.call(k, I[
|
|
19590
|
+
for (V = 0; V < I.length; )
|
|
19591
|
+
F.call(k, I[V], V, I), V++;
|
|
19613
19592
|
else
|
|
19614
|
-
for (
|
|
19615
|
-
I.hasOwnProperty(
|
|
19593
|
+
for (V in I)
|
|
19594
|
+
I.hasOwnProperty(V) && F.call(k, I[V], V, I);
|
|
19616
19595
|
}
|
|
19617
19596
|
function g(I, F, k) {
|
|
19618
|
-
var
|
|
19597
|
+
var V = "DEPRECATED METHOD: " + F + `
|
|
19619
19598
|
` + k + ` AT
|
|
19620
19599
|
`;
|
|
19621
19600
|
return function() {
|
|
19622
|
-
var
|
|
19623
|
-
return ge && ge.call(n.console,
|
|
19601
|
+
var Z = new Error("get-stack-trace"), ue = Z && Z.stack ? Z.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", ge = n.console && (n.console.warn || n.console.log);
|
|
19602
|
+
return ge && ge.call(n.console, V, ue), I.apply(this, arguments);
|
|
19624
19603
|
};
|
|
19625
19604
|
}
|
|
19626
19605
|
var A;
|
|
19627
19606
|
typeof Object.assign != "function" ? A = function(F) {
|
|
19628
19607
|
if (F === r || F === null)
|
|
19629
19608
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
19630
|
-
for (var k = Object(F),
|
|
19631
|
-
var
|
|
19632
|
-
if (
|
|
19633
|
-
for (var ue in
|
|
19634
|
-
|
|
19609
|
+
for (var k = Object(F), V = 1; V < arguments.length; V++) {
|
|
19610
|
+
var Z = arguments[V];
|
|
19611
|
+
if (Z !== r && Z !== null)
|
|
19612
|
+
for (var ue in Z)
|
|
19613
|
+
Z.hasOwnProperty(ue) && (k[ue] = Z[ue]);
|
|
19635
19614
|
}
|
|
19636
19615
|
return k;
|
|
19637
19616
|
} : A = Object.assign;
|
|
19638
|
-
var m = g(function(F, k,
|
|
19639
|
-
for (var
|
|
19640
|
-
(!
|
|
19617
|
+
var m = g(function(F, k, V) {
|
|
19618
|
+
for (var Z = Object.keys(k), ue = 0; ue < Z.length; )
|
|
19619
|
+
(!V || V && F[Z[ue]] === r) && (F[Z[ue]] = k[Z[ue]]), ue++;
|
|
19641
19620
|
return F;
|
|
19642
19621
|
}, "extend", "Use `assign`."), E = g(function(F, k) {
|
|
19643
19622
|
return m(F, k, !0);
|
|
19644
19623
|
}, "merge", "Use `assign`.");
|
|
19645
19624
|
function v(I, F, k) {
|
|
19646
|
-
var
|
|
19647
|
-
|
|
19625
|
+
var V = F.prototype, Z;
|
|
19626
|
+
Z = I.prototype = Object.create(V), Z.constructor = I, Z._super = V, k && A(Z, k);
|
|
19648
19627
|
}
|
|
19649
19628
|
function y(I, F) {
|
|
19650
19629
|
return function() {
|
|
@@ -19658,13 +19637,13 @@ var Hammer = function(n, t, e, r) {
|
|
|
19658
19637
|
return I === r ? F : I;
|
|
19659
19638
|
}
|
|
19660
19639
|
function S(I, F, k) {
|
|
19661
|
-
p(L(F), function(
|
|
19662
|
-
I.addEventListener(
|
|
19640
|
+
p(L(F), function(V) {
|
|
19641
|
+
I.addEventListener(V, k, !1);
|
|
19663
19642
|
});
|
|
19664
19643
|
}
|
|
19665
19644
|
function R(I, F, k) {
|
|
19666
|
-
p(L(F), function(
|
|
19667
|
-
I.removeEventListener(
|
|
19645
|
+
p(L(F), function(V) {
|
|
19646
|
+
I.removeEventListener(V, k, !1);
|
|
19668
19647
|
});
|
|
19669
19648
|
}
|
|
19670
19649
|
function C(I, F) {
|
|
@@ -19684,10 +19663,10 @@ var Hammer = function(n, t, e, r) {
|
|
|
19684
19663
|
function H(I, F, k) {
|
|
19685
19664
|
if (I.indexOf && !k)
|
|
19686
19665
|
return I.indexOf(F);
|
|
19687
|
-
for (var
|
|
19688
|
-
if (k && I[
|
|
19689
|
-
return
|
|
19690
|
-
|
|
19666
|
+
for (var V = 0; V < I.length; ) {
|
|
19667
|
+
if (k && I[V][k] == F || !k && I[V] === F)
|
|
19668
|
+
return V;
|
|
19669
|
+
V++;
|
|
19691
19670
|
}
|
|
19692
19671
|
return -1;
|
|
19693
19672
|
}
|
|
@@ -19695,18 +19674,18 @@ var Hammer = function(n, t, e, r) {
|
|
|
19695
19674
|
return Array.prototype.slice.call(I, 0);
|
|
19696
19675
|
}
|
|
19697
19676
|
function P(I, F, k) {
|
|
19698
|
-
for (var
|
|
19677
|
+
for (var V = [], Z = [], ue = 0; ue < I.length; ) {
|
|
19699
19678
|
var ge = I[ue][F];
|
|
19700
|
-
H(
|
|
19679
|
+
H(Z, ge) < 0 && V.push(I[ue]), Z[ue] = ge, ue++;
|
|
19701
19680
|
}
|
|
19702
|
-
return
|
|
19681
|
+
return V = V.sort(function(it, ze) {
|
|
19703
19682
|
return it[F] > ze[F];
|
|
19704
|
-
}),
|
|
19683
|
+
}), V;
|
|
19705
19684
|
}
|
|
19706
19685
|
function B(I, F) {
|
|
19707
|
-
for (var k,
|
|
19708
|
-
if (k = o[ue],
|
|
19709
|
-
return
|
|
19686
|
+
for (var k, V, Z = F[0].toUpperCase() + F.slice(1), ue = 0; ue < o.length; ) {
|
|
19687
|
+
if (k = o[ue], V = k ? k + Z : F, V in I)
|
|
19688
|
+
return V;
|
|
19710
19689
|
ue++;
|
|
19711
19690
|
}
|
|
19712
19691
|
return r;
|
|
@@ -19719,14 +19698,14 @@ var Hammer = function(n, t, e, r) {
|
|
|
19719
19698
|
var F = I.ownerDocument || I;
|
|
19720
19699
|
return F.defaultView || F.parentWindow || n;
|
|
19721
19700
|
}
|
|
19722
|
-
var D = /mobile|tablet|ip(ad|hone|od)|android/i,
|
|
19723
|
-
function
|
|
19701
|
+
var D = /mobile|tablet|ip(ad|hone|od)|android/i, G = "ontouchstart" in n, K = B(n, "PointerEvent") !== r, J = G && D.test(navigator.userAgent), Q = "touch", U = "pen", X = "mouse", j = "kinect", $ = 25, q = 1, re = 2, Y = 4, ee = 8, ne = 1, le = 2, ie = 4, se = 8, ae = 16, fe = le | ie, he = se | ae, xe = fe | he, de = ["x", "y"], Re = ["clientX", "clientY"];
|
|
19702
|
+
function te(I, F) {
|
|
19724
19703
|
var k = this;
|
|
19725
|
-
this.manager = I, this.callback = F, this.element = I.element, this.target = I.options.inputTarget, this.domHandler = function(
|
|
19726
|
-
b(I.options.enable, [I]) && k.handler(
|
|
19704
|
+
this.manager = I, this.callback = F, this.element = I.element, this.target = I.options.inputTarget, this.domHandler = function(V) {
|
|
19705
|
+
b(I.options.enable, [I]) && k.handler(V);
|
|
19727
19706
|
}, this.init();
|
|
19728
19707
|
}
|
|
19729
|
-
|
|
19708
|
+
te.prototype = {
|
|
19730
19709
|
/**
|
|
19731
19710
|
* should handle the inputEvent data and trigger the callback
|
|
19732
19711
|
* @virtual
|
|
@@ -19746,42 +19725,42 @@ var Hammer = function(n, t, e, r) {
|
|
|
19746
19725
|
this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(N(this.element), this.evWin, this.domHandler);
|
|
19747
19726
|
}
|
|
19748
19727
|
};
|
|
19749
|
-
function
|
|
19728
|
+
function W(I) {
|
|
19750
19729
|
var F, k = I.options.inputClass;
|
|
19751
|
-
return k ? F = k : K ? F = Ne :
|
|
19730
|
+
return k ? F = k : K ? F = Ne : J ? F = Le : G ? F = Ye : F = be, new F(I, z);
|
|
19752
19731
|
}
|
|
19753
|
-
function
|
|
19754
|
-
var
|
|
19755
|
-
k.isFirst = !!ue, k.isFinal = !!ge, ue && (I.session = {}), k.eventType = F,
|
|
19732
|
+
function z(I, F, k) {
|
|
19733
|
+
var V = k.pointers.length, Z = k.changedPointers.length, ue = F & q && V - Z === 0, ge = F & (Y | ee) && V - Z === 0;
|
|
19734
|
+
k.isFirst = !!ue, k.isFinal = !!ge, ue && (I.session = {}), k.eventType = F, Ce(I, k), I.emit("hammer.input", k), I.recognize(k), I.session.prevInput = k;
|
|
19756
19735
|
}
|
|
19757
|
-
function
|
|
19758
|
-
var k = I.session,
|
|
19759
|
-
k.firstInput || (k.firstInput = Ve(F)),
|
|
19760
|
-
var ue = k.firstInput, ge = k.firstMultiple, Xe = ge ? ge.center : ue.center, it = F.center = rt(
|
|
19761
|
-
F.timeStamp = d(), F.deltaTime = F.timeStamp - ue.timeStamp, F.angle = pe(Xe, it), F.distance =
|
|
19736
|
+
function Ce(I, F) {
|
|
19737
|
+
var k = I.session, V = F.pointers, Z = V.length;
|
|
19738
|
+
k.firstInput || (k.firstInput = Ve(F)), Z > 1 && !k.firstMultiple ? k.firstMultiple = Ve(F) : Z === 1 && (k.firstMultiple = !1);
|
|
19739
|
+
var ue = k.firstInput, ge = k.firstMultiple, Xe = ge ? ge.center : ue.center, it = F.center = rt(V);
|
|
19740
|
+
F.timeStamp = d(), F.deltaTime = F.timeStamp - ue.timeStamp, F.angle = pe(Xe, it), F.distance = oe(Xe, it), ce(k, F), F.offsetDirection = me(F.deltaX, F.deltaY);
|
|
19762
19741
|
var ze = We(F.deltaTime, F.deltaX, F.deltaY);
|
|
19763
|
-
F.overallVelocityX = ze.x, F.overallVelocityY = ze.y, F.overallVelocity = c(ze.x) > c(ze.y) ? ze.x : ze.y, F.scale = ge ?
|
|
19742
|
+
F.overallVelocityX = ze.x, F.overallVelocityY = ze.y, F.overallVelocity = c(ze.x) > c(ze.y) ? ze.x : ze.y, F.scale = ge ? Te(ge.pointers, V) : 1, F.rotation = ge ? Me(ge.pointers, V) : 0, F.maxPointers = k.prevInput ? F.pointers.length > k.prevInput.maxPointers ? F.pointers.length : k.prevInput.maxPointers : F.pointers.length, ve(k, F);
|
|
19764
19743
|
var Et = I.element;
|
|
19765
19744
|
C(F.srcEvent.target, Et) && (Et = F.srcEvent.target), F.target = Et;
|
|
19766
19745
|
}
|
|
19767
|
-
function
|
|
19768
|
-
var k = F.center,
|
|
19769
|
-
(F.eventType ===
|
|
19746
|
+
function ce(I, F) {
|
|
19747
|
+
var k = F.center, V = I.offsetDelta || {}, Z = I.prevDelta || {}, ue = I.prevInput || {};
|
|
19748
|
+
(F.eventType === q || ue.eventType === Y) && (Z = I.prevDelta = {
|
|
19770
19749
|
x: ue.deltaX || 0,
|
|
19771
19750
|
y: ue.deltaY || 0
|
|
19772
|
-
},
|
|
19751
|
+
}, V = I.offsetDelta = {
|
|
19773
19752
|
x: k.x,
|
|
19774
19753
|
y: k.y
|
|
19775
|
-
}), F.deltaX =
|
|
19754
|
+
}), F.deltaX = Z.x + (k.x - V.x), F.deltaY = Z.y + (k.y - V.y);
|
|
19776
19755
|
}
|
|
19777
19756
|
function ve(I, F) {
|
|
19778
|
-
var k = I.lastInterval || F,
|
|
19779
|
-
if (F.eventType != ee && (
|
|
19780
|
-
var it = F.deltaX - k.deltaX, ze = F.deltaY - k.deltaY, Et = We(
|
|
19781
|
-
ue = Et.x, ge = Et.y,
|
|
19757
|
+
var k = I.lastInterval || F, V = F.timeStamp - k.timeStamp, Z, ue, ge, Xe;
|
|
19758
|
+
if (F.eventType != ee && (V > $ || k.velocity === r)) {
|
|
19759
|
+
var it = F.deltaX - k.deltaX, ze = F.deltaY - k.deltaY, Et = We(V, it, ze);
|
|
19760
|
+
ue = Et.x, ge = Et.y, Z = c(Et.x) > c(Et.y) ? Et.x : Et.y, Xe = me(it, ze), I.lastInterval = F;
|
|
19782
19761
|
} else
|
|
19783
|
-
|
|
19784
|
-
F.velocity =
|
|
19762
|
+
Z = k.velocity, ue = k.velocityX, ge = k.velocityY, Xe = k.direction;
|
|
19763
|
+
F.velocity = Z, F.velocityX = ue, F.velocityY = ge, F.direction = Xe;
|
|
19785
19764
|
}
|
|
19786
19765
|
function Ve(I) {
|
|
19787
19766
|
for (var F = [], k = 0; k < I.pointers.length; )
|
|
@@ -19804,11 +19783,11 @@ var Hammer = function(n, t, e, r) {
|
|
|
19804
19783
|
x: l(I[0].clientX),
|
|
19805
19784
|
y: l(I[0].clientY)
|
|
19806
19785
|
};
|
|
19807
|
-
for (var k = 0,
|
|
19808
|
-
k += I[
|
|
19786
|
+
for (var k = 0, V = 0, Z = 0; Z < F; )
|
|
19787
|
+
k += I[Z].clientX, V += I[Z].clientY, Z++;
|
|
19809
19788
|
return {
|
|
19810
19789
|
x: l(k / F),
|
|
19811
|
-
y: l(
|
|
19790
|
+
y: l(V / F)
|
|
19812
19791
|
};
|
|
19813
19792
|
}
|
|
19814
19793
|
function We(I, F, k) {
|
|
@@ -19818,40 +19797,40 @@ var Hammer = function(n, t, e, r) {
|
|
|
19818
19797
|
};
|
|
19819
19798
|
}
|
|
19820
19799
|
function me(I, F) {
|
|
19821
|
-
return I === F ?
|
|
19800
|
+
return I === F ? ne : c(I) >= c(F) ? I < 0 ? le : ie : F < 0 ? se : ae;
|
|
19822
19801
|
}
|
|
19823
|
-
function
|
|
19824
|
-
k || (k =
|
|
19825
|
-
var
|
|
19826
|
-
return Math.sqrt(
|
|
19802
|
+
function oe(I, F, k) {
|
|
19803
|
+
k || (k = de);
|
|
19804
|
+
var V = F[k[0]] - I[k[0]], Z = F[k[1]] - I[k[1]];
|
|
19805
|
+
return Math.sqrt(V * V + Z * Z);
|
|
19827
19806
|
}
|
|
19828
19807
|
function pe(I, F, k) {
|
|
19829
|
-
k || (k =
|
|
19830
|
-
var
|
|
19831
|
-
return Math.atan2(
|
|
19808
|
+
k || (k = de);
|
|
19809
|
+
var V = F[k[0]] - I[k[0]], Z = F[k[1]] - I[k[1]];
|
|
19810
|
+
return Math.atan2(Z, V) * 180 / Math.PI;
|
|
19832
19811
|
}
|
|
19833
19812
|
function Me(I, F) {
|
|
19834
|
-
return pe(F[1], F[0],
|
|
19813
|
+
return pe(F[1], F[0], Re) + pe(I[1], I[0], Re);
|
|
19835
19814
|
}
|
|
19836
|
-
function
|
|
19837
|
-
return
|
|
19815
|
+
function Te(I, F) {
|
|
19816
|
+
return oe(F[0], F[1], Re) / oe(I[0], I[1], Re);
|
|
19838
19817
|
}
|
|
19839
19818
|
var Pe = {
|
|
19840
|
-
mousedown:
|
|
19841
|
-
mousemove:
|
|
19842
|
-
mouseup:
|
|
19819
|
+
mousedown: q,
|
|
19820
|
+
mousemove: re,
|
|
19821
|
+
mouseup: Y
|
|
19843
19822
|
}, Fe = "mousedown", Ae = "mousemove mouseup";
|
|
19844
|
-
function
|
|
19845
|
-
this.evEl = Fe, this.evWin = Ae, this.pressed = !1,
|
|
19823
|
+
function be() {
|
|
19824
|
+
this.evEl = Fe, this.evWin = Ae, this.pressed = !1, te.apply(this, arguments);
|
|
19846
19825
|
}
|
|
19847
|
-
v(
|
|
19826
|
+
v(be, te, {
|
|
19848
19827
|
/**
|
|
19849
19828
|
* handle mouse events
|
|
19850
19829
|
* @param {Object} ev
|
|
19851
19830
|
*/
|
|
19852
19831
|
handler: function(F) {
|
|
19853
19832
|
var k = Pe[F.type];
|
|
19854
|
-
k &
|
|
19833
|
+
k & q && (F.button === 0 || F.button === 2) && (this.pressed = !0), k & re && F.which !== 1 && (k = Y), this.pressed && (k & Y && (this.pressed = !1), this.callback(this.manager, k, {
|
|
19855
19834
|
pointers: [F],
|
|
19856
19835
|
changedPointers: [F],
|
|
19857
19836
|
pointerType: X,
|
|
@@ -19860,96 +19839,96 @@ var Hammer = function(n, t, e, r) {
|
|
|
19860
19839
|
}
|
|
19861
19840
|
});
|
|
19862
19841
|
var Ie = {
|
|
19863
|
-
pointerdown:
|
|
19864
|
-
pointermove:
|
|
19865
|
-
pointerup:
|
|
19842
|
+
pointerdown: q,
|
|
19843
|
+
pointermove: re,
|
|
19844
|
+
pointerup: Y,
|
|
19866
19845
|
pointercancel: ee,
|
|
19867
19846
|
pointerout: ee
|
|
19868
19847
|
}, Be = {
|
|
19869
|
-
2:
|
|
19870
|
-
3:
|
|
19848
|
+
2: Q,
|
|
19849
|
+
3: U,
|
|
19871
19850
|
4: X,
|
|
19872
|
-
5:
|
|
19851
|
+
5: j
|
|
19873
19852
|
// see https://twitter.com/jacobrossi/status/480596438489890816
|
|
19874
19853
|
}, qe = "pointerdown", ke = "pointermove pointerup pointercancel";
|
|
19875
19854
|
n.MSPointerEvent && !n.PointerEvent && (qe = "MSPointerDown", ke = "MSPointerMove MSPointerUp MSPointerCancel");
|
|
19876
19855
|
function Ne() {
|
|
19877
|
-
this.evEl = qe, this.evWin = ke,
|
|
19856
|
+
this.evEl = qe, this.evWin = ke, te.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
|
|
19878
19857
|
}
|
|
19879
|
-
v(Ne,
|
|
19858
|
+
v(Ne, te, {
|
|
19880
19859
|
/**
|
|
19881
19860
|
* handle mouse events
|
|
19882
19861
|
* @param {Object} ev
|
|
19883
19862
|
*/
|
|
19884
19863
|
handler: function(F) {
|
|
19885
|
-
var k = this.store,
|
|
19886
|
-
ge &
|
|
19864
|
+
var k = this.store, V = !1, Z = !1, ue = F.type.toLowerCase().replace("ms", ""), ge = Ie[ue], Xe = Be[F.pointerType] || F.pointerType, it = Xe == Q, ze = H(k, F.pointerId, "pointerId");
|
|
19865
|
+
ge & q && (F.button === 0 || F.button === 2 || it) ? ze < 0 && (k.push(F), ze = k.length - 1) : ge & (Y | ee) ? V = !0 : !it && F.buttons === 0 && (V = !0, Z = !0, ge = Ie.pointerup), !(ze < 0) && (Z || (k[ze] = F), this.callback(this.manager, ge, {
|
|
19887
19866
|
pointers: k,
|
|
19888
19867
|
changedPointers: [F],
|
|
19889
19868
|
pointerType: Xe,
|
|
19890
19869
|
srcEvent: k[ze]
|
|
19891
|
-
}),
|
|
19870
|
+
}), V && k.splice(ze, 1));
|
|
19892
19871
|
}
|
|
19893
19872
|
});
|
|
19894
19873
|
var _e = {
|
|
19895
|
-
touchstart:
|
|
19896
|
-
touchmove:
|
|
19897
|
-
touchend:
|
|
19874
|
+
touchstart: q,
|
|
19875
|
+
touchmove: re,
|
|
19876
|
+
touchend: Y,
|
|
19898
19877
|
touchcancel: ee
|
|
19899
19878
|
}, Ue = "touchstart", De = "touchstart touchmove touchend touchcancel";
|
|
19900
19879
|
function je() {
|
|
19901
|
-
this.evTarget = Ue, this.evWin = De, this.started = !1,
|
|
19880
|
+
this.evTarget = Ue, this.evWin = De, this.started = !1, te.apply(this, arguments);
|
|
19902
19881
|
}
|
|
19903
|
-
v(je,
|
|
19882
|
+
v(je, te, {
|
|
19904
19883
|
handler: function(F) {
|
|
19905
19884
|
var k = _e[F.type];
|
|
19906
|
-
if (k ===
|
|
19907
|
-
var
|
|
19908
|
-
k & (
|
|
19909
|
-
pointers:
|
|
19910
|
-
changedPointers:
|
|
19911
|
-
pointerType:
|
|
19885
|
+
if (k === q && (this.started = !0), !!this.started) {
|
|
19886
|
+
var V = Se.call(this, F, k);
|
|
19887
|
+
k & (Y | ee) && V[0].length - V[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
|
|
19888
|
+
pointers: V[0],
|
|
19889
|
+
changedPointers: V[1],
|
|
19890
|
+
pointerType: Q,
|
|
19912
19891
|
srcEvent: F
|
|
19913
19892
|
});
|
|
19914
19893
|
}
|
|
19915
19894
|
}
|
|
19916
19895
|
});
|
|
19917
|
-
function
|
|
19918
|
-
var k = M(I.touches),
|
|
19919
|
-
return F & (
|
|
19896
|
+
function Se(I, F) {
|
|
19897
|
+
var k = M(I.touches), V = M(I.changedTouches);
|
|
19898
|
+
return F & (Y | ee) && (k = P(k.concat(V), "identifier")), [k, V];
|
|
19920
19899
|
}
|
|
19921
19900
|
var Oe = {
|
|
19922
|
-
touchstart:
|
|
19923
|
-
touchmove:
|
|
19924
|
-
touchend:
|
|
19901
|
+
touchstart: q,
|
|
19902
|
+
touchmove: re,
|
|
19903
|
+
touchend: Y,
|
|
19925
19904
|
touchcancel: ee
|
|
19926
19905
|
}, we = "touchstart touchmove touchend touchcancel";
|
|
19927
19906
|
function Le() {
|
|
19928
|
-
this.evTarget = we, this.targetIds = {},
|
|
19907
|
+
this.evTarget = we, this.targetIds = {}, te.apply(this, arguments);
|
|
19929
19908
|
}
|
|
19930
|
-
v(Le,
|
|
19909
|
+
v(Le, te, {
|
|
19931
19910
|
handler: function(F) {
|
|
19932
|
-
var k = Oe[F.type],
|
|
19933
|
-
|
|
19934
|
-
pointers:
|
|
19935
|
-
changedPointers:
|
|
19936
|
-
pointerType:
|
|
19911
|
+
var k = Oe[F.type], V = He.call(this, F, k);
|
|
19912
|
+
V && this.callback(this.manager, k, {
|
|
19913
|
+
pointers: V[0],
|
|
19914
|
+
changedPointers: V[1],
|
|
19915
|
+
pointerType: Q,
|
|
19937
19916
|
srcEvent: F
|
|
19938
19917
|
});
|
|
19939
19918
|
}
|
|
19940
19919
|
});
|
|
19941
19920
|
function He(I, F) {
|
|
19942
|
-
var k = M(I.touches),
|
|
19943
|
-
if (F & (
|
|
19944
|
-
return
|
|
19945
|
-
var
|
|
19921
|
+
var k = M(I.touches), V = this.targetIds;
|
|
19922
|
+
if (F & (q | re) && k.length === 1)
|
|
19923
|
+
return V[k[0].identifier] = !0, [k, k];
|
|
19924
|
+
var Z, ue, ge = M(I.changedTouches), Xe = [], it = this.target;
|
|
19946
19925
|
if (ue = k.filter(function(ze) {
|
|
19947
19926
|
return C(ze.target, it);
|
|
19948
|
-
}), F ===
|
|
19949
|
-
for (
|
|
19950
|
-
|
|
19951
|
-
for (
|
|
19952
|
-
|
|
19927
|
+
}), F === q)
|
|
19928
|
+
for (Z = 0; Z < ue.length; )
|
|
19929
|
+
V[ue[Z].identifier] = !0, Z++;
|
|
19930
|
+
for (Z = 0; Z < ge.length; )
|
|
19931
|
+
V[ge[Z].identifier] && Xe.push(ge[Z]), F & (Y | ee) && delete V[ge[Z].identifier], Z++;
|
|
19953
19932
|
if (Xe.length)
|
|
19954
19933
|
return [
|
|
19955
19934
|
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
|
|
@@ -19959,25 +19938,25 @@ var Hammer = function(n, t, e, r) {
|
|
|
19959
19938
|
}
|
|
19960
19939
|
var Ge = 2500, Ze = 25;
|
|
19961
19940
|
function Ye() {
|
|
19962
|
-
|
|
19941
|
+
te.apply(this, arguments);
|
|
19963
19942
|
var I = y(this.handler, this);
|
|
19964
|
-
this.touch = new Le(this.manager, I), this.mouse = new
|
|
19943
|
+
this.touch = new Le(this.manager, I), this.mouse = new be(this.manager, I), this.primaryTouch = null, this.lastTouches = [];
|
|
19965
19944
|
}
|
|
19966
|
-
v(Ye,
|
|
19945
|
+
v(Ye, te, {
|
|
19967
19946
|
/**
|
|
19968
19947
|
* handle mouse and touch events
|
|
19969
19948
|
* @param {Hammer} manager
|
|
19970
19949
|
* @param {String} inputEvent
|
|
19971
19950
|
* @param {Object} inputData
|
|
19972
19951
|
*/
|
|
19973
|
-
handler: function(F, k,
|
|
19974
|
-
var
|
|
19975
|
-
if (!(ue &&
|
|
19976
|
-
if (
|
|
19977
|
-
Qe.call(this, k,
|
|
19978
|
-
else if (ue && Mt.call(this,
|
|
19952
|
+
handler: function(F, k, V) {
|
|
19953
|
+
var Z = V.pointerType == Q, ue = V.pointerType == X;
|
|
19954
|
+
if (!(ue && V.sourceCapabilities && V.sourceCapabilities.firesTouchEvents)) {
|
|
19955
|
+
if (Z)
|
|
19956
|
+
Qe.call(this, k, V);
|
|
19957
|
+
else if (ue && Mt.call(this, V))
|
|
19979
19958
|
return;
|
|
19980
|
-
this.callback(F, k,
|
|
19959
|
+
this.callback(F, k, V);
|
|
19981
19960
|
}
|
|
19982
19961
|
},
|
|
19983
19962
|
/**
|
|
@@ -19988,23 +19967,23 @@ var Hammer = function(n, t, e, r) {
|
|
|
19988
19967
|
}
|
|
19989
19968
|
});
|
|
19990
19969
|
function Qe(I, F) {
|
|
19991
|
-
I &
|
|
19970
|
+
I & q ? (this.primaryTouch = F.changedPointers[0].identifier, ye.call(this, F)) : I & (Y | ee) && ye.call(this, F);
|
|
19992
19971
|
}
|
|
19993
19972
|
function ye(I) {
|
|
19994
19973
|
var F = I.changedPointers[0];
|
|
19995
19974
|
if (F.identifier === this.primaryTouch) {
|
|
19996
19975
|
var k = { x: F.clientX, y: F.clientY };
|
|
19997
19976
|
this.lastTouches.push(k);
|
|
19998
|
-
var
|
|
19999
|
-
var ue =
|
|
20000
|
-
ue > -1 &&
|
|
19977
|
+
var V = this.lastTouches, Z = function() {
|
|
19978
|
+
var ue = V.indexOf(k);
|
|
19979
|
+
ue > -1 && V.splice(ue, 1);
|
|
20001
19980
|
};
|
|
20002
|
-
setTimeout(
|
|
19981
|
+
setTimeout(Z, Ge);
|
|
20003
19982
|
}
|
|
20004
19983
|
}
|
|
20005
19984
|
function Mt(I) {
|
|
20006
|
-
for (var F = I.srcEvent.clientX, k = I.srcEvent.clientY,
|
|
20007
|
-
var
|
|
19985
|
+
for (var F = I.srcEvent.clientX, k = I.srcEvent.clientY, V = 0; V < this.lastTouches.length; V++) {
|
|
19986
|
+
var Z = this.lastTouches[V], ue = Math.abs(F - Z.x), ge = Math.abs(k - Z.y);
|
|
20008
19987
|
if (ue <= Ze && ge <= Ze)
|
|
20009
19988
|
return !0;
|
|
20010
19989
|
}
|
|
@@ -20048,13 +20027,13 @@ var Hammer = function(n, t, e, r) {
|
|
|
20048
20027
|
F.preventDefault();
|
|
20049
20028
|
return;
|
|
20050
20029
|
}
|
|
20051
|
-
var
|
|
20052
|
-
if (
|
|
20030
|
+
var V = this.actions, Z = w(V, Ke) && !bt[Ke], ue = w(V, $e) && !bt[$e], ge = w(V, Ee) && !bt[Ee];
|
|
20031
|
+
if (Z) {
|
|
20053
20032
|
var Xe = I.pointers.length === 1, it = I.distance < 2, ze = I.deltaTime < 250;
|
|
20054
20033
|
if (Xe && it && ze)
|
|
20055
20034
|
return;
|
|
20056
20035
|
}
|
|
20057
|
-
if (!(ge && ue) && (
|
|
20036
|
+
if (!(ge && ue) && (Z || ue && k & fe || ge && k & he))
|
|
20058
20037
|
return this.preventSrc(F);
|
|
20059
20038
|
},
|
|
20060
20039
|
/**
|
|
@@ -20161,10 +20140,10 @@ var Hammer = function(n, t, e, r) {
|
|
|
20161
20140
|
*/
|
|
20162
20141
|
emit: function(I) {
|
|
20163
20142
|
var F = this, k = this.state;
|
|
20164
|
-
function
|
|
20165
|
-
F.manager.emit(
|
|
20143
|
+
function V(Z) {
|
|
20144
|
+
F.manager.emit(Z, I);
|
|
20166
20145
|
}
|
|
20167
|
-
k < gt &&
|
|
20146
|
+
k < gt && V(F.options.event + st(k)), V(F.options.event), I.additionalEvent && V(I.additionalEvent), k >= gt && V(F.options.event + st(k));
|
|
20168
20147
|
},
|
|
20169
20148
|
/**
|
|
20170
20149
|
* Check that all the require failure recognizers has failed,
|
|
@@ -20230,7 +20209,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20230
20209
|
return I & At ? "cancel" : I & gt ? "end" : I & St ? "move" : I & tt ? "start" : "";
|
|
20231
20210
|
}
|
|
20232
20211
|
function ut(I) {
|
|
20233
|
-
return I ==
|
|
20212
|
+
return I == ae ? "down" : I == se ? "up" : I == le ? "left" : I == ie ? "right" : "";
|
|
20234
20213
|
}
|
|
20235
20214
|
function lt(I, F) {
|
|
20236
20215
|
var k = F.manager;
|
|
@@ -20268,8 +20247,8 @@ var Hammer = function(n, t, e, r) {
|
|
|
20268
20247
|
* @returns {*} State
|
|
20269
20248
|
*/
|
|
20270
20249
|
process: function(I) {
|
|
20271
|
-
var F = this.state, k = I.eventType,
|
|
20272
|
-
return
|
|
20250
|
+
var F = this.state, k = I.eventType, V = F & (tt | St), Z = this.attrTest(I);
|
|
20251
|
+
return V && (k & ee || !Z) ? F | At : V || Z ? k & Y ? F | gt : F & tt ? F | St : tt : ht;
|
|
20273
20252
|
}
|
|
20274
20253
|
});
|
|
20275
20254
|
function It() {
|
|
@@ -20284,15 +20263,15 @@ var Hammer = function(n, t, e, r) {
|
|
|
20284
20263
|
event: "pan",
|
|
20285
20264
|
threshold: 10,
|
|
20286
20265
|
pointers: 1,
|
|
20287
|
-
direction:
|
|
20266
|
+
direction: xe
|
|
20288
20267
|
},
|
|
20289
20268
|
getTouchAction: function() {
|
|
20290
20269
|
var I = this.options.direction, F = [];
|
|
20291
|
-
return I &
|
|
20270
|
+
return I & fe && F.push($e), I & he && F.push(Ee), F;
|
|
20292
20271
|
},
|
|
20293
20272
|
directionTest: function(I) {
|
|
20294
|
-
var F = this.options, k = !0,
|
|
20295
|
-
return
|
|
20273
|
+
var F = this.options, k = !0, V = I.distance, Z = I.direction, ue = I.deltaX, ge = I.deltaY;
|
|
20274
|
+
return Z & F.direction || (F.direction & fe ? (Z = ue === 0 ? ne : ue < 0 ? le : ie, k = ue != this.pX, V = Math.abs(I.deltaX)) : (Z = ge === 0 ? ne : ge < 0 ? se : ae, k = ge != this.pY, V = Math.abs(I.deltaY))), I.direction = Z, k && V > F.threshold && Z & F.direction;
|
|
20296
20275
|
},
|
|
20297
20276
|
attrTest: function(I) {
|
|
20298
20277
|
return ct.prototype.attrTest.call(this, I) && (this.state & tt || !(this.state & tt) && this.directionTest(I));
|
|
@@ -20350,14 +20329,14 @@ var Hammer = function(n, t, e, r) {
|
|
|
20350
20329
|
return [dt];
|
|
20351
20330
|
},
|
|
20352
20331
|
process: function(I) {
|
|
20353
|
-
var F = this.options, k = I.pointers.length === F.pointers,
|
|
20354
|
-
if (this._input = I, !
|
|
20332
|
+
var F = this.options, k = I.pointers.length === F.pointers, V = I.distance < F.threshold, Z = I.deltaTime > F.time;
|
|
20333
|
+
if (this._input = I, !V || !k || I.eventType & (Y | ee) && !Z)
|
|
20355
20334
|
this.reset();
|
|
20356
|
-
else if (I.eventType &
|
|
20335
|
+
else if (I.eventType & q)
|
|
20357
20336
|
this.reset(), this._timer = f(function() {
|
|
20358
20337
|
this.state = ft, this.tryEmit();
|
|
20359
20338
|
}, F.time, this);
|
|
20360
|
-
else if (I.eventType &
|
|
20339
|
+
else if (I.eventType & Y)
|
|
20361
20340
|
return ft;
|
|
20362
20341
|
return ht;
|
|
20363
20342
|
},
|
|
@@ -20365,7 +20344,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20365
20344
|
clearTimeout(this._timer);
|
|
20366
20345
|
},
|
|
20367
20346
|
emit: function(I) {
|
|
20368
|
-
this.state === ft && (I && I.eventType &
|
|
20347
|
+
this.state === ft && (I && I.eventType & Y ? this.manager.emit(this.options.event + "up", I) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
|
|
20369
20348
|
}
|
|
20370
20349
|
});
|
|
20371
20350
|
function wt() {
|
|
@@ -20400,7 +20379,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20400
20379
|
event: "swipe",
|
|
20401
20380
|
threshold: 10,
|
|
20402
20381
|
velocity: 0.3,
|
|
20403
|
-
direction:
|
|
20382
|
+
direction: fe | he,
|
|
20404
20383
|
pointers: 1
|
|
20405
20384
|
},
|
|
20406
20385
|
getTouchAction: function() {
|
|
@@ -20408,7 +20387,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20408
20387
|
},
|
|
20409
20388
|
attrTest: function(I) {
|
|
20410
20389
|
var F = this.options.direction, k;
|
|
20411
|
-
return F & (
|
|
20390
|
+
return F & (fe | he) ? k = I.overallVelocity : F & fe ? k = I.overallVelocityX : F & he && (k = I.overallVelocityY), this._super.attrTest.call(this, I) && F & I.offsetDirection && I.distance > this.options.threshold && I.maxPointers == this.options.pointers && c(k) > this.options.velocity && I.eventType & Y;
|
|
20412
20391
|
},
|
|
20413
20392
|
emit: function(I) {
|
|
20414
20393
|
var F = ut(I.offsetDirection);
|
|
@@ -20440,13 +20419,13 @@ var Hammer = function(n, t, e, r) {
|
|
|
20440
20419
|
return [nt];
|
|
20441
20420
|
},
|
|
20442
20421
|
process: function(I) {
|
|
20443
|
-
var F = this.options, k = I.pointers.length === F.pointers,
|
|
20444
|
-
if (this.reset(), I.eventType &
|
|
20422
|
+
var F = this.options, k = I.pointers.length === F.pointers, V = I.distance < F.threshold, Z = I.deltaTime < F.time;
|
|
20423
|
+
if (this.reset(), I.eventType & q && this.count === 0)
|
|
20445
20424
|
return this.failTimeout();
|
|
20446
|
-
if (
|
|
20447
|
-
if (I.eventType !=
|
|
20425
|
+
if (V && Z && k) {
|
|
20426
|
+
if (I.eventType != Y)
|
|
20448
20427
|
return this.failTimeout();
|
|
20449
|
-
var ue = this.pTime ? I.timeStamp - this.pTime < F.interval : !0, ge = !this.pCenter ||
|
|
20428
|
+
var ue = this.pTime ? I.timeStamp - this.pTime < F.interval : !0, ge = !this.pCenter || oe(this.pCenter, I.center) < F.posThreshold;
|
|
20450
20429
|
this.pTime = I.timeStamp, this.pCenter = I.center, !ge || !ue ? this.count = 1 : this.count += 1, this._input = I;
|
|
20451
20430
|
var Xe = this.count % F.taps;
|
|
20452
20431
|
if (Xe === 0)
|
|
@@ -20514,8 +20493,8 @@ var Hammer = function(n, t, e, r) {
|
|
|
20514
20493
|
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
|
|
20515
20494
|
[wt, { enable: !1 }],
|
|
20516
20495
|
[Lt, { enable: !1 }, ["rotate"]],
|
|
20517
|
-
[yt, { direction:
|
|
20518
|
-
[It, { direction:
|
|
20496
|
+
[yt, { direction: fe }],
|
|
20497
|
+
[It, { direction: fe }, ["swipe"]],
|
|
20519
20498
|
[Pt],
|
|
20520
20499
|
[Pt, { event: "doubletap", taps: 2 }, ["tap"]],
|
|
20521
20500
|
[Ft]
|
|
@@ -20569,9 +20548,9 @@ var Hammer = function(n, t, e, r) {
|
|
|
20569
20548
|
};
|
|
20570
20549
|
var Bt = 1, mt = 2;
|
|
20571
20550
|
function Rt(I, F) {
|
|
20572
|
-
this.options = A({}, xt.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || I, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = I, this.input =
|
|
20573
|
-
var
|
|
20574
|
-
k[2] &&
|
|
20551
|
+
this.options = A({}, xt.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || I, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = I, this.input = W(this), this.touchAction = new Tt(this, this.options.touchAction), Ct(this, !0), p(this.options.recognizers, function(k) {
|
|
20552
|
+
var V = this.add(new k[0](k[1]));
|
|
20553
|
+
k[2] && V.recognizeWith(k[2]), k[3] && V.requireFailure(k[3]);
|
|
20575
20554
|
}, this);
|
|
20576
20555
|
}
|
|
20577
20556
|
Rt.prototype = {
|
|
@@ -20602,12 +20581,12 @@ var Hammer = function(n, t, e, r) {
|
|
|
20602
20581
|
var F = this.session;
|
|
20603
20582
|
if (!F.stopped) {
|
|
20604
20583
|
this.touchAction.preventDefaults(I);
|
|
20605
|
-
var k,
|
|
20606
|
-
(!
|
|
20607
|
-
for (var ue = 0; ue <
|
|
20608
|
-
k =
|
|
20609
|
-
(!
|
|
20610
|
-
k.canRecognizeWith(
|
|
20584
|
+
var k, V = this.recognizers, Z = F.curRecognizer;
|
|
20585
|
+
(!Z || Z && Z.state & ft) && (Z = F.curRecognizer = null);
|
|
20586
|
+
for (var ue = 0; ue < V.length; )
|
|
20587
|
+
k = V[ue], F.stopped !== mt && // 1
|
|
20588
|
+
(!Z || k == Z || // 2
|
|
20589
|
+
k.canRecognizeWith(Z)) ? k.recognize(I) : k.reset(), !Z && k.state & (tt | St | gt) && (Z = F.curRecognizer = k), ue++;
|
|
20611
20590
|
}
|
|
20612
20591
|
},
|
|
20613
20592
|
/**
|
|
@@ -20658,8 +20637,8 @@ var Hammer = function(n, t, e, r) {
|
|
|
20658
20637
|
on: function(I, F) {
|
|
20659
20638
|
if (I !== r && F !== r) {
|
|
20660
20639
|
var k = this.handlers;
|
|
20661
|
-
return p(L(I), function(
|
|
20662
|
-
k[
|
|
20640
|
+
return p(L(I), function(V) {
|
|
20641
|
+
k[V] = k[V] || [], k[V].push(F);
|
|
20663
20642
|
}), this;
|
|
20664
20643
|
}
|
|
20665
20644
|
},
|
|
@@ -20672,8 +20651,8 @@ var Hammer = function(n, t, e, r) {
|
|
|
20672
20651
|
off: function(I, F) {
|
|
20673
20652
|
if (I !== r) {
|
|
20674
20653
|
var k = this.handlers;
|
|
20675
|
-
return p(L(I), function(
|
|
20676
|
-
F ? k[
|
|
20654
|
+
return p(L(I), function(V) {
|
|
20655
|
+
F ? k[V] && k[V].splice(H(k[V], F), 1) : delete k[V];
|
|
20677
20656
|
}), this;
|
|
20678
20657
|
}
|
|
20679
20658
|
},
|
|
@@ -20689,8 +20668,8 @@ var Hammer = function(n, t, e, r) {
|
|
|
20689
20668
|
F.type = I, F.preventDefault = function() {
|
|
20690
20669
|
F.srcEvent.preventDefault();
|
|
20691
20670
|
};
|
|
20692
|
-
for (var
|
|
20693
|
-
k[
|
|
20671
|
+
for (var V = 0; V < k.length; )
|
|
20672
|
+
k[V](F), V++;
|
|
20694
20673
|
}
|
|
20695
20674
|
},
|
|
20696
20675
|
/**
|
|
@@ -20704,9 +20683,9 @@ var Hammer = function(n, t, e, r) {
|
|
|
20704
20683
|
function Ct(I, F) {
|
|
20705
20684
|
var k = I.element;
|
|
20706
20685
|
if (k.style) {
|
|
20707
|
-
var
|
|
20708
|
-
p(I.options.cssProps, function(
|
|
20709
|
-
|
|
20686
|
+
var V;
|
|
20687
|
+
p(I.options.cssProps, function(Z, ue) {
|
|
20688
|
+
V = B(k.style, ue), F ? (I.oldCssProps[V] = k.style[V], k.style[V] = Z) : k.style[V] = I.oldCssProps[V] || "";
|
|
20710
20689
|
}), F || (I.oldCssProps = {});
|
|
20711
20690
|
}
|
|
20712
20691
|
}
|
|
@@ -20715,9 +20694,9 @@ var Hammer = function(n, t, e, r) {
|
|
|
20715
20694
|
k.initEvent(I, !0, !0), k.gesture = F, F.target.dispatchEvent(k);
|
|
20716
20695
|
}
|
|
20717
20696
|
return A(xt, {
|
|
20718
|
-
INPUT_START:
|
|
20719
|
-
INPUT_MOVE:
|
|
20720
|
-
INPUT_END:
|
|
20697
|
+
INPUT_START: q,
|
|
20698
|
+
INPUT_MOVE: re,
|
|
20699
|
+
INPUT_END: Y,
|
|
20721
20700
|
INPUT_CANCEL: ee,
|
|
20722
20701
|
STATE_POSSIBLE: ot,
|
|
20723
20702
|
STATE_BEGAN: tt,
|
|
@@ -20726,19 +20705,19 @@ var Hammer = function(n, t, e, r) {
|
|
|
20726
20705
|
STATE_RECOGNIZED: ft,
|
|
20727
20706
|
STATE_CANCELLED: At,
|
|
20728
20707
|
STATE_FAILED: ht,
|
|
20729
|
-
DIRECTION_NONE:
|
|
20708
|
+
DIRECTION_NONE: ne,
|
|
20730
20709
|
DIRECTION_LEFT: le,
|
|
20731
20710
|
DIRECTION_RIGHT: ie,
|
|
20732
|
-
DIRECTION_UP:
|
|
20733
|
-
DIRECTION_DOWN:
|
|
20734
|
-
DIRECTION_HORIZONTAL:
|
|
20711
|
+
DIRECTION_UP: se,
|
|
20712
|
+
DIRECTION_DOWN: ae,
|
|
20713
|
+
DIRECTION_HORIZONTAL: fe,
|
|
20735
20714
|
DIRECTION_VERTICAL: he,
|
|
20736
|
-
DIRECTION_ALL:
|
|
20715
|
+
DIRECTION_ALL: xe,
|
|
20737
20716
|
Manager: Rt,
|
|
20738
|
-
Input:
|
|
20717
|
+
Input: te,
|
|
20739
20718
|
TouchAction: Tt,
|
|
20740
20719
|
TouchInput: Le,
|
|
20741
|
-
MouseInput:
|
|
20720
|
+
MouseInput: be,
|
|
20742
20721
|
PointerEventInput: Ne,
|
|
20743
20722
|
TouchMouseInput: Ye,
|
|
20744
20723
|
SingleTouchInput: je,
|
|
@@ -21100,14 +21079,14 @@ var BaseController = (
|
|
|
21100
21079
|
y: B.clientY
|
|
21101
21080
|
}, _ = r.relativeClientPosition(O), N = new THREE.Raycaster();
|
|
21102
21081
|
N.params.Points = { threshold: 0.1 }, N.setFromCamera(_, r.camera);
|
|
21103
|
-
var D = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: B.buttons, delta: 0 }),
|
|
21082
|
+
var D = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: B.buttons, delta: 0 }), G = M === "pinchend" ? P : P - B.deltaY / 280, K = createEvent("gesture.pinch", {
|
|
21104
21083
|
target: B.target,
|
|
21105
21084
|
pointerType: "mouse",
|
|
21106
21085
|
srcEvent: B,
|
|
21107
21086
|
pointers: [__assign({}, D)],
|
|
21108
21087
|
isFirst: M === "pinchstart",
|
|
21109
21088
|
isFinal: M === "pinchend",
|
|
21110
|
-
scale: clamp$1(
|
|
21089
|
+
scale: clamp$1(G, 0.1, 10),
|
|
21111
21090
|
center: __assign({}, D),
|
|
21112
21091
|
velocityX: 0,
|
|
21113
21092
|
velocityY: 0,
|
|
@@ -21126,26 +21105,26 @@ var BaseController = (
|
|
|
21126
21105
|
firstEvent: _,
|
|
21127
21106
|
prevEvent: _
|
|
21128
21107
|
} : f.prevEvent = _, r.onPinchGesture(_), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
|
|
21129
|
-
var
|
|
21108
|
+
var U;
|
|
21130
21109
|
h = null;
|
|
21131
|
-
var X = (
|
|
21132
|
-
f = null, r.onPinchGesture(
|
|
21110
|
+
var X = (U = f == null ? void 0 : f.prevEvent.scale) !== null && U !== void 0 ? U : 1, j = p("pinchend", X, M);
|
|
21111
|
+
f = null, r.onPinchGesture(j);
|
|
21133
21112
|
}, 200);
|
|
21134
21113
|
} else {
|
|
21135
|
-
var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0,
|
|
21114
|
+
var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, G = {
|
|
21136
21115
|
x: M.clientX,
|
|
21137
21116
|
y: M.clientY
|
|
21138
|
-
}, K = r.relativeClientPosition(
|
|
21139
|
-
|
|
21140
|
-
var
|
|
21117
|
+
}, K = r.relativeClientPosition(G), J = new THREE.Raycaster();
|
|
21118
|
+
J.params.Points = { threshold: 0.1 }, J.setFromCamera(K, r.camera);
|
|
21119
|
+
var Q = __assign(__assign({}, G), { coords: K, raycaster: J, buttons: M.buttons, delta: N }), _ = createEvent("gesture.mousewheel", {
|
|
21141
21120
|
target: M.target,
|
|
21142
21121
|
pointerType: "mouse",
|
|
21143
21122
|
srcEvent: M,
|
|
21144
|
-
pointers: [__assign({},
|
|
21123
|
+
pointers: [__assign({}, Q)],
|
|
21145
21124
|
isFirst: D,
|
|
21146
21125
|
isFinal: !1,
|
|
21147
21126
|
scale: 0,
|
|
21148
|
-
center: __assign({},
|
|
21127
|
+
center: __assign({}, Q),
|
|
21149
21128
|
velocityX: 0,
|
|
21150
21129
|
velocityY: 0,
|
|
21151
21130
|
overallVelocityX: 0,
|
|
@@ -21160,11 +21139,11 @@ var BaseController = (
|
|
|
21160
21139
|
target: M.target,
|
|
21161
21140
|
pointerType: "mouse",
|
|
21162
21141
|
srcEvent: M,
|
|
21163
|
-
pointers: [__assign(__assign({},
|
|
21142
|
+
pointers: [__assign(__assign({}, Q), { delta: 0 })],
|
|
21164
21143
|
isFirst: !1,
|
|
21165
21144
|
isFinal: !0,
|
|
21166
21145
|
scale: 0,
|
|
21167
|
-
center: __assign(__assign({},
|
|
21146
|
+
center: __assign(__assign({}, Q), { delta: 0 }),
|
|
21168
21147
|
velocityX: 0,
|
|
21169
21148
|
velocityY: 0,
|
|
21170
21149
|
overallVelocityX: 0,
|
|
@@ -21307,15 +21286,15 @@ var BaseController = (
|
|
|
21307
21286
|
y: M.clientY
|
|
21308
21287
|
}, N = r.relativeClientPosition(_), D = new THREE.Raycaster();
|
|
21309
21288
|
D.params.Points = { threshold: 0.1 }, D.setFromCamera(N, r.camera);
|
|
21310
|
-
var
|
|
21289
|
+
var G = __assign(__assign({}, _), { coords: N, raycaster: D, buttons: 0, delta: 0 }), K = createEvent("gesture.pinch", {
|
|
21311
21290
|
target: M.target,
|
|
21312
21291
|
pointerType: "mouse",
|
|
21313
21292
|
srcEvent: M,
|
|
21314
|
-
pointers: [__assign({},
|
|
21293
|
+
pointers: [__assign({}, G)],
|
|
21315
21294
|
isFirst: B,
|
|
21316
21295
|
isFinal: O,
|
|
21317
21296
|
scale: (P = M.scale) !== null && P !== void 0 ? P : 1,
|
|
21318
|
-
center: __assign({},
|
|
21297
|
+
center: __assign({}, G),
|
|
21319
21298
|
velocityX: 0,
|
|
21320
21299
|
velocityY: 0,
|
|
21321
21300
|
overallVelocityX: 0,
|
|
@@ -22512,84 +22491,84 @@ void main() {
|
|
|
22512
22491
|
var y = new THREE.Matrix4().compose(this.scene.position, h, this.scene.scale);
|
|
22513
22492
|
this.camera.matrix.equals(y) || (this.camera.matrix.copy(y), this.camera.matrixWorld.copy(this.camera.matrix), this.camera.position.copy(this.scene.position), this.camera.quaternion.copy(h), this.camera.scale.copy(this.scene.scale), d = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
|
|
22514
22493
|
var b = this.frustum.planes[5].normal, T = [];
|
|
22515
|
-
l >= u && traverseTileCubeNode(this.tileTree, function(
|
|
22516
|
-
if (!(
|
|
22517
|
-
if (
|
|
22494
|
+
l >= u && traverseTileCubeNode(this.tileTree, function(q) {
|
|
22495
|
+
if (!(q.level < u)) {
|
|
22496
|
+
if (q.level > l || !c.frustum.intersectsBox(q.box))
|
|
22518
22497
|
return !1;
|
|
22519
|
-
T.push(
|
|
22498
|
+
T.push(q);
|
|
22520
22499
|
}
|
|
22521
22500
|
});
|
|
22522
22501
|
var S = /* @__PURE__ */ new WeakMap();
|
|
22523
|
-
T.sort(function(
|
|
22524
|
-
if (
|
|
22525
|
-
return
|
|
22526
|
-
var
|
|
22527
|
-
|
|
22528
|
-
var ee = S.get(
|
|
22529
|
-
return ee === void 0 && (ee =
|
|
22502
|
+
T.sort(function(q, re) {
|
|
22503
|
+
if (q.level !== re.level)
|
|
22504
|
+
return q.level - re.level;
|
|
22505
|
+
var Y = S.get(q);
|
|
22506
|
+
Y === void 0 && (Y = q.box.getCenter(scratchSortVector3).angleTo(b), S.set(q, Y));
|
|
22507
|
+
var ee = S.get(re);
|
|
22508
|
+
return ee === void 0 && (ee = re.box.getCenter(scratchSortVector3).angleTo(b), S.set(re, ee)), Y - ee;
|
|
22530
22509
|
});
|
|
22531
22510
|
var R = /* @__PURE__ */ new WeakSet(), C = this.observer.images.tiles;
|
|
22532
22511
|
if (C)
|
|
22533
|
-
for (var w = function(
|
|
22534
|
-
var
|
|
22535
|
-
return
|
|
22512
|
+
for (var w = function(q) {
|
|
22513
|
+
var re = C.find(function(de) {
|
|
22514
|
+
return de.level === q.level;
|
|
22536
22515
|
});
|
|
22537
|
-
if (!
|
|
22516
|
+
if (!re)
|
|
22538
22517
|
return "continue";
|
|
22539
|
-
R.add(
|
|
22540
|
-
var
|
|
22541
|
-
if (
|
|
22542
|
-
|
|
22543
|
-
var ee =
|
|
22518
|
+
R.add(q);
|
|
22519
|
+
var Y = L.tileMeshes.get(q);
|
|
22520
|
+
if (Y) {
|
|
22521
|
+
Y.appearDuration = L.appearDuration;
|
|
22522
|
+
var ee = Y.updateTime(p);
|
|
22544
22523
|
return ee && (d = !0), "continue";
|
|
22545
22524
|
}
|
|
22546
22525
|
if (L.pedding >= L.maxRequest)
|
|
22547
22526
|
return "continue";
|
|
22548
|
-
var
|
|
22549
|
-
|
|
22550
|
-
|
|
22551
|
-
|
|
22552
|
-
|
|
22527
|
+
var ne = Math.pow(2, q.level) * q.position.y, le = Math.pow(2, q.level) * q.position.x, ie = "".concat(L.observer.panoId, ".").concat(q.face, ".").concat(q.level, ".").concat(ne, ".").concat(le), se = re[q.face], ae = re.size, fe = L.imageOptions.transform, he = __assign(__assign({}, pick(L.imageOptions, ["format", "sharpen", "mappings"])), { key: "pano_tile.".concat(ie), size: re.scale >= 1 ? void 0 : ae * q.size * re.scale, cut: q.size === 1 ? void 0 : [
|
|
22528
|
+
ae * q.position.x,
|
|
22529
|
+
ae * q.position.y,
|
|
22530
|
+
ae * q.size,
|
|
22531
|
+
ae * q.size
|
|
22553
22532
|
] });
|
|
22554
|
-
|
|
22555
|
-
var
|
|
22533
|
+
q.level === 1 && re.scale >= 0.5 && (he.format === "jpg" || /\.jpg$/.test(se)) && (he.size = void 0, he.quality || (he.quality = 70)), q.size === 1 && console.warn("tile: ".concat(he.key, " should not appear.")), L.pedding++;
|
|
22534
|
+
var xe = L.textureLoader.loadTexture(se, {
|
|
22556
22535
|
imageURL: {
|
|
22557
|
-
transform:
|
|
22536
|
+
transform: fe,
|
|
22558
22537
|
options: he
|
|
22559
22538
|
},
|
|
22560
22539
|
minFilter: THREE.LinearFilter,
|
|
22561
22540
|
magFilter: THREE.LinearFilter,
|
|
22562
22541
|
generateMipmaps: !1,
|
|
22563
22542
|
fetcher: getFetcher(L.observer.work)
|
|
22564
|
-
}).then(function(
|
|
22565
|
-
return
|
|
22543
|
+
}).then(function(de) {
|
|
22544
|
+
return de.body;
|
|
22566
22545
|
});
|
|
22567
|
-
|
|
22568
|
-
return c.pedding--,
|
|
22569
|
-
}, function(
|
|
22570
|
-
return c.pedding--, Promise.reject(
|
|
22571
|
-
}),
|
|
22546
|
+
xe.then(function(de) {
|
|
22547
|
+
return c.pedding--, de;
|
|
22548
|
+
}, function(de) {
|
|
22549
|
+
return c.pedding--, Promise.reject(de);
|
|
22550
|
+
}), Y = new TileMesh(q, xe), Y.name = "tiling:tile-".concat(ie), Y.visible = !1, Y.appearDuration = L.appearDuration, L.tileMeshes.set(q, Y), L.scene.add(Y), Y.updateTime(p), d = !0;
|
|
22572
22551
|
}, L = this, H = 0, M = T; H < M.length; H++) {
|
|
22573
22552
|
var P = M[H];
|
|
22574
22553
|
w(P);
|
|
22575
22554
|
}
|
|
22576
22555
|
var B = [], O = [];
|
|
22577
|
-
this.tileMeshes.forEach(function(
|
|
22578
|
-
R.has(
|
|
22579
|
-
var
|
|
22580
|
-
|
|
22556
|
+
this.tileMeshes.forEach(function(q, re) {
|
|
22557
|
+
R.has(re) ? B.push(q) : O.push(q);
|
|
22558
|
+
var Y = re.level >= u && re.level <= l;
|
|
22559
|
+
q.visible !== Y && (q.visible = Y, d = !0);
|
|
22581
22560
|
});
|
|
22582
|
-
for (var _ = O.sort(function(
|
|
22583
|
-
return
|
|
22561
|
+
for (var _ = O.sort(function(q, re) {
|
|
22562
|
+
return re.activeTime - q.activeTime;
|
|
22584
22563
|
}).slice(Math.max(0, this.maxCacheTile - B.length)), N = 0, D = _; N < D.length; N++) {
|
|
22585
|
-
var
|
|
22586
|
-
this.tileMeshes.delete(
|
|
22564
|
+
var G = D[N];
|
|
22565
|
+
this.tileMeshes.delete(G.node), this.scene.remove(G), G.dispose(), d = !0;
|
|
22587
22566
|
}
|
|
22588
22567
|
if (d) {
|
|
22589
22568
|
var K = t.getRenderTarget();
|
|
22590
22569
|
scratchPrevClearColor$1.copy(t.getClearColor());
|
|
22591
|
-
var
|
|
22592
|
-
t.autoClear = !0, t.autoClearColor = !0, t.autoClearDepth = !0, t.autoClearStencil = !0, t.clippingPlanes = clippingPlanes, t.setRenderTarget(this.renderTarget), t.setClearColor(clearColor$1, clearAlpha), t.render(this.scene, this.camera), t.setRenderTarget(K), t.setClearColor(scratchPrevClearColor$1,
|
|
22570
|
+
var J = t.getClearAlpha(), Q = t.autoClear, U = t.autoClearColor, X = t.autoClearDepth, j = t.autoClearStencil, $ = t.clippingPlanes;
|
|
22571
|
+
t.autoClear = !0, t.autoClearColor = !0, t.autoClearDepth = !0, t.autoClearStencil = !0, t.clippingPlanes = clippingPlanes, t.setRenderTarget(this.renderTarget), t.setClearColor(clearColor$1, clearAlpha), t.render(this.scene, this.camera), t.setRenderTarget(K), t.setClearColor(scratchPrevClearColor$1, J), t.autoClear = Q, t.autoClearColor = U, t.autoClearDepth = X, t.autoClearStencil = j, t.clippingPlanes = $;
|
|
22593
22572
|
}
|
|
22594
22573
|
return this.forceRenderWhenNextUpdate = !1, d;
|
|
22595
22574
|
}, n;
|
|
@@ -22838,7 +22817,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
22838
22817
|
return Math.log(l) * Math.LOG2E;
|
|
22839
22818
|
}, s = t.height / 2 / Math.tan(r(n / 2)) * Math.tan(r(45)) * 2, u = Math.max(o(s / 512), 0);
|
|
22840
22819
|
return u < 2.3 && u > 0.1 && (u = 1), u = u % 1 > 0.75 ? Math.ceil(u) : Math.floor(u), u;
|
|
22841
|
-
}, tileAppearDuration: 0.5, tileMaxRequest: 3, flyEffectUseDepthBuffer: !
|
|
22820
|
+
}, tileAppearDuration: 0.5, tileMaxRequest: 3, flyEffectUseDepthBuffer: !0 }), PanoramaController = (
|
|
22842
22821
|
/** @class */
|
|
22843
22822
|
function(n) {
|
|
22844
22823
|
__extends(t, n);
|
|
@@ -22967,26 +22946,26 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
22967
22946
|
}
|
|
22968
22947
|
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(C.x + (w.x - C.x) * L, C.y + (w.y - C.y) * L, C.z + (w.z - C.z) * L);
|
|
22969
22948
|
for (var P = [], B = [], O = 0, _ = this.locationMotion.keyframes; O < _.length; O++) {
|
|
22970
|
-
var N = _[O], D = N.key,
|
|
22971
|
-
D !== void 0 && (P.push(D),
|
|
22949
|
+
var N = _[O], D = N.key, G = N.progress;
|
|
22950
|
+
D !== void 0 && (P.push(D), G > this.locationMotion.progress && B.push(D));
|
|
22972
22951
|
}
|
|
22973
|
-
for (var K = 0,
|
|
22974
|
-
var
|
|
22975
|
-
if (!(B.indexOf(
|
|
22976
|
-
var
|
|
22977
|
-
if (
|
|
22978
|
-
var X =
|
|
22952
|
+
for (var K = 0, J = Object.keys(this.panoResources); K < J.length; K++) {
|
|
22953
|
+
var Q = J[K];
|
|
22954
|
+
if (!(B.indexOf(Q) >= 0)) {
|
|
22955
|
+
var U = this.panoResources[Q];
|
|
22956
|
+
if (U.panoPicture) {
|
|
22957
|
+
var X = U.panoPicture.map;
|
|
22979
22958
|
if (X) {
|
|
22980
22959
|
if (X === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || X === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
22981
22960
|
continue;
|
|
22982
|
-
X.dispose(),
|
|
22961
|
+
X.dispose(), U.panoPicture = null;
|
|
22983
22962
|
}
|
|
22984
22963
|
}
|
|
22985
|
-
P.indexOf(
|
|
22964
|
+
P.indexOf(Q) >= 0 || delete this.panoResources[Q];
|
|
22986
22965
|
}
|
|
22987
22966
|
}
|
|
22988
|
-
var
|
|
22989
|
-
|
|
22967
|
+
var j = panoParse(b.panoId);
|
|
22968
|
+
j !== this.currentPano && (this.currentPano = j, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
22990
22969
|
userAction: this.userAction,
|
|
22991
22970
|
prevPano: panoParse(T.panoId),
|
|
22992
22971
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
@@ -22996,106 +22975,106 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
22996
22975
|
}));
|
|
22997
22976
|
}
|
|
22998
22977
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
|
|
22999
|
-
var
|
|
22978
|
+
var $ = this.works.getResolvedObserver(this.currentPano), q = this.locationMotion.ended ? this.getForwardObserverOrNot() : null;
|
|
23000
22979
|
if (this.camera.pose.distance > 0.1 || R)
|
|
23001
|
-
for (var
|
|
23002
|
-
var ee =
|
|
23003
|
-
|
|
22980
|
+
for (var re = 0, Y = Object.keys(this.panoMeshes); re < Y.length; re++) {
|
|
22981
|
+
var ee = Y[re], ne = this.panoMeshes[ee];
|
|
22982
|
+
ne.setOpacity(0), ne.setCurrent(!1), ne.updateTime && ne.updateTime(e, r), ne.visible = !1;
|
|
23004
22983
|
}
|
|
23005
|
-
else if (
|
|
23006
|
-
var le = arrayMin(
|
|
22984
|
+
else if ($) {
|
|
22985
|
+
var le = arrayMin($.visibleIds, function(Le) {
|
|
23007
22986
|
var He = o.works.getResolvedObserver(Le);
|
|
23008
|
-
return He ?
|
|
22987
|
+
return He ? $.standingPosition.distanceTo(He.standingPosition) : 1 / 0;
|
|
23009
22988
|
}, !0), ie = le[1];
|
|
23010
22989
|
ie = clamp$1(ie, 2.5, 1 / 0);
|
|
23011
|
-
for (var
|
|
23012
|
-
var ee = he[
|
|
23013
|
-
if (
|
|
23014
|
-
|
|
22990
|
+
for (var se = $.visibleIds.concat(panoStringify(this.currentPano)), ae = this.camera.getDirection(new THREE.Vector3()), fe = 0, he = Object.keys(this.panoMeshes); fe < he.length; fe++) {
|
|
22991
|
+
var ee = he[fe], ne = this.panoMeshes[ee], M = this.works.getResolvedObserver(ee);
|
|
22992
|
+
if (se.indexOf(ee) === -1)
|
|
22993
|
+
ne.setCurrent(!1), ne.setOpacity(0);
|
|
23015
22994
|
else if (!M)
|
|
23016
|
-
|
|
22995
|
+
ne.setCurrent(!1), ne.setOpacity(0);
|
|
23017
22996
|
else if (!M.loadable && !M.active)
|
|
23018
|
-
|
|
22997
|
+
ne.setCurrent(!1), ne.setOpacity(0);
|
|
23019
22998
|
else {
|
|
23020
|
-
var
|
|
23021
|
-
|
|
23022
|
-
var
|
|
22999
|
+
var xe = ne.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
|
|
23000
|
+
ne.setCurrent(!ne.loading && ne.progress === 0 && q !== null && q.panoId === ee), ne.setOpacity(xe < 0.01 ? 0 : clamp$1(ie / xe * 1.2, 0.4, 0.85));
|
|
23001
|
+
var de = this.camera.position.clone().setY(ne.position.y), Re = new THREE.Vector3().copy(ne.position).sub(de).normalize();
|
|
23023
23002
|
if (ee === panoStringify(this.currentPano)) {
|
|
23024
|
-
var
|
|
23025
|
-
|
|
23003
|
+
var te = clamp$1((0.5 - de.distanceTo(ne.position)) / 0.5, 0, 1);
|
|
23004
|
+
Re.multiplyScalar(1 - te).add(ae.clone().multiplyScalar(te));
|
|
23026
23005
|
}
|
|
23027
|
-
|
|
23006
|
+
Re.length() > 0 && ne.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Re.x, Re.z), 0));
|
|
23028
23007
|
}
|
|
23029
|
-
|
|
23008
|
+
ne.updateTime && ne.updateTime(e, r);
|
|
23030
23009
|
}
|
|
23031
23010
|
}
|
|
23032
|
-
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible &&
|
|
23033
|
-
for (var
|
|
23034
|
-
var ee =
|
|
23035
|
-
M &&
|
|
23011
|
+
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && $) {
|
|
23012
|
+
for (var W = [], z = 0, Ce = $.accessibleIds; z < Ce.length; z++) {
|
|
23013
|
+
var ee = Ce[z], M = this.works.getResolvedObserver(ee);
|
|
23014
|
+
M && W.push(M);
|
|
23036
23015
|
}
|
|
23037
|
-
if (
|
|
23038
|
-
return Le.standingPosition.distanceTo(
|
|
23039
|
-
}),
|
|
23040
|
-
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount %
|
|
23041
|
-
var
|
|
23042
|
-
return He.work === (
|
|
23016
|
+
if (W.sort(function(Le, He) {
|
|
23017
|
+
return Le.standingPosition.distanceTo($.standingPosition) - He.standingPosition.distanceTo($.standingPosition);
|
|
23018
|
+
}), W.length) {
|
|
23019
|
+
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % W.length;
|
|
23020
|
+
var ce = W[this.accessibleObserverFloorCheckCount], ne = this.panoMeshes[ce.panoId], ve = this.modelScene.models.find(function(He) {
|
|
23021
|
+
return He.work === (ce == null ? void 0 : ce.work);
|
|
23043
23022
|
});
|
|
23044
|
-
if (
|
|
23023
|
+
if (ce && ne && ve && ve.visible) {
|
|
23045
23024
|
var Ve = 0.3, rt = 0.05, We = 5e-3, me = adjustPanoCircleMeshVectors.map(function(He) {
|
|
23046
|
-
scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(
|
|
23025
|
+
scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(ce.standingPosition), scratchRaycaster$1.ray.origin.add(scratchVector3$1), scratchRaycaster$1.ray.direction.set(0, -1, 0);
|
|
23047
23026
|
var Ge = ve.intersectRaycaster(scratchRaycaster$1, null, !0)[0];
|
|
23048
|
-
return Ge && Ge.distance - We <= Ve ? new THREE.Vector3().copy(
|
|
23027
|
+
return Ge && Ge.distance - We <= Ve ? new THREE.Vector3().copy(ce.standingPosition).setY(Ge.point.y + We) : ce.standingPosition;
|
|
23049
23028
|
});
|
|
23050
23029
|
me.sort(function(He, Ge) {
|
|
23051
23030
|
return Ge.y - He.y;
|
|
23052
23031
|
});
|
|
23053
|
-
var
|
|
23054
|
-
return He.distanceTo(
|
|
23032
|
+
var oe = me[Math.floor(me.length / 2)], pe = me.filter(function(He) {
|
|
23033
|
+
return He.distanceTo(oe) <= rt;
|
|
23055
23034
|
})[0];
|
|
23056
|
-
pe && !pe.equals(
|
|
23035
|
+
pe && !pe.equals(ne.position) && (ne.position.copy(pe), this.needsRender = !0);
|
|
23057
23036
|
}
|
|
23058
23037
|
this.accessibleObserverFloorCheckCount++;
|
|
23059
23038
|
}
|
|
23060
23039
|
}
|
|
23061
23040
|
{
|
|
23062
|
-
var L = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Me = Math.round(L),
|
|
23041
|
+
var L = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Me = Math.round(L), Te = this.modelScene.parameter.pano0, Pe = this.modelScene.parameter.pano1, Fe = Me === 0 ? Te : Pe, M = void 0;
|
|
23063
23042
|
if (Fe && (M = this.works.getResolvedObserver(Fe.panoId), M || (M = this.panoPictureObserverMap.get(Fe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = L <= 0.5 || L < 1 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !Fe || this.tileLevelForFov === !1)
|
|
23064
23043
|
this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
|
|
23065
23044
|
else {
|
|
23066
|
-
var Ae = getImageSizeLevel(Fe.mapSize),
|
|
23045
|
+
var Ae = getImageSizeLevel(Fe.mapSize), be = Ae + 1, Ie = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Be = Math.floor(this.tileLevelForFov(this.camera.fov, Ie)), qe = Be > Ae ? Be : 0;
|
|
23067
23046
|
this.tiling.setObserver(M);
|
|
23068
|
-
var ke = this.tiling.update(this.renderer, this.camera, Fe.map, Fe.matrix, Fe.zoom,
|
|
23047
|
+
var ke = this.tiling.update(this.renderer, this.camera, Fe.map, Fe.matrix, Fe.zoom, be, qe), Ne = {
|
|
23069
23048
|
map: this.tiling.renderTarget.texture,
|
|
23070
23049
|
matrixInverse: this.tiling.camera.matrixWorldInverse,
|
|
23071
23050
|
projectionMatrix: this.tiling.camera.projectionMatrix,
|
|
23072
23051
|
pano: Me,
|
|
23073
|
-
opacity: (
|
|
23052
|
+
opacity: (Te == null ? void 0 : Te.panoId) === (Pe == null ? void 0 : Pe.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
|
|
23074
23053
|
}, _e = this.modelScene.parameter.refinedScreen;
|
|
23075
23054
|
(ke || Ne.pano !== (_e == null ? void 0 : _e.pano) || Ne.opacity !== (_e == null ? void 0 : _e.opacity)) && this.modelScene.parameter.set("refinedScreen", Ne);
|
|
23076
23055
|
}
|
|
23077
23056
|
}
|
|
23078
|
-
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e),
|
|
23057
|
+
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), $ && $.video && (this.needsRender = !0), this.intersectMesh.scale.setScalar(clamp$1(this.cameraMotion.value.fov / 45, 0, 1));
|
|
23079
23058
|
{
|
|
23080
|
-
var Ue = b.effect, De = this.modelScene.parameter,
|
|
23081
|
-
if (
|
|
23082
|
-
if (((d = this.modelScene.parameter.pano0Depth) === null || d === void 0 ? void 0 : d.panoId) !==
|
|
23083
|
-
var je = 500,
|
|
23084
|
-
this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !==
|
|
23059
|
+
var Ue = b.effect, De = this.modelScene.parameter, Te = De.pano0, Pe = De.pano1;
|
|
23060
|
+
if (Te && Pe && Te !== Pe && Ue === "fly" && this.flyEffectUseDepthBuffer) {
|
|
23061
|
+
if (((d = this.modelScene.parameter.pano0Depth) === null || d === void 0 ? void 0 : d.panoId) !== Te.panoId || ((f = this.modelScene.parameter.pano1Depth) === null || f === void 0 ? void 0 : f.panoId) !== Pe.panoId) {
|
|
23062
|
+
var je = 500, Se = 512;
|
|
23063
|
+
this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Se && this.pano0DepthCubeRenderTarget.setSize(Se, Se) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Se, {
|
|
23085
23064
|
minFilter: THREE.NearestFilter,
|
|
23086
23065
|
magFilter: THREE.NearestFilter,
|
|
23087
23066
|
generateMipmaps: !1
|
|
23088
|
-
}), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !==
|
|
23067
|
+
}), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== Se && this.pano1DepthCubeRenderTarget.setSize(Se, Se) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Se, {
|
|
23089
23068
|
minFilter: THREE.NearestFilter,
|
|
23090
23069
|
magFilter: THREE.NearestFilter,
|
|
23091
23070
|
generateMipmaps: !1
|
|
23092
23071
|
});
|
|
23093
23072
|
var Oe = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
|
|
23094
|
-
Oe.matrix.copy(
|
|
23073
|
+
Oe.matrix.copy(Te.matrix), Oe.matrixWorld.copy(Oe.matrix), Oe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Oe, je);
|
|
23095
23074
|
var we = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
|
|
23096
23075
|
we.matrix.copy(Pe.matrix), we.matrixWorld.copy(we.matrix), we.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, we, je), this.modelScene.parameter.set({
|
|
23097
23076
|
pano0Depth: {
|
|
23098
|
-
panoId:
|
|
23077
|
+
panoId: Te.panoId,
|
|
23099
23078
|
map: this.pano0DepthCubeRenderTarget.texture,
|
|
23100
23079
|
mapSize: this.pano0DepthCubeRenderTarget.width,
|
|
23101
23080
|
maxDepth: je
|
|
@@ -23369,41 +23348,41 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23369
23348
|
{ key: w.key, progress: N / T, value: w.value },
|
|
23370
23349
|
{ key: y, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
|
|
23371
23350
|
];
|
|
23372
|
-
var
|
|
23373
|
-
|
|
23351
|
+
var G = this.locationMotionKeyframesLength(this.locationMotion.keyframes), K = this.locationMotionKeyframesLength(S);
|
|
23352
|
+
G === 0 || G === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * G / K;
|
|
23374
23353
|
}
|
|
23375
|
-
var
|
|
23354
|
+
var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), Q = {
|
|
23376
23355
|
longitude: o.longitude,
|
|
23377
23356
|
latitude: o.latitude,
|
|
23378
23357
|
fov: o.fov
|
|
23379
|
-
},
|
|
23358
|
+
}, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l = Q.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = Q.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (d = Q.fov) !== null && d !== void 0 ? d : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), X = this.currentPano;
|
|
23380
23359
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
23381
23360
|
options: o,
|
|
23382
23361
|
prevPano: X,
|
|
23383
23362
|
progress: 0,
|
|
23384
|
-
state:
|
|
23363
|
+
state: U,
|
|
23385
23364
|
userAction: this.userAction,
|
|
23386
23365
|
error: null
|
|
23387
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
23388
|
-
this.cameraMotion.set(
|
|
23366
|
+
})), o.moveStartCallback && o.moveStartCallback(U), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
|
|
23367
|
+
this.cameraMotion.set(Q, J).catch(noop$1);
|
|
23389
23368
|
else {
|
|
23390
|
-
var
|
|
23369
|
+
var j = coordinatesToVector({
|
|
23391
23370
|
longitude: this.cameraMotion.value.longitude,
|
|
23392
23371
|
latitude: this.cameraMotion.value.latitude
|
|
23393
|
-
}),
|
|
23394
|
-
longitude: (f =
|
|
23395
|
-
latitude: (h =
|
|
23396
|
-
}),
|
|
23397
|
-
|
|
23398
|
-
var
|
|
23399
|
-
|
|
23400
|
-
var
|
|
23372
|
+
}), $ = coordinatesToVector({
|
|
23373
|
+
longitude: (f = Q.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
|
|
23374
|
+
latitude: (h = Q.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
|
|
23375
|
+
}), q = new THREE.Object3D();
|
|
23376
|
+
q.lookAt(j);
|
|
23377
|
+
var re = new THREE.Matrix4().makeRotationFromQuaternion(q.quaternion);
|
|
23378
|
+
q.lookAt($);
|
|
23379
|
+
var Y = new THREE.Matrix4().makeRotationFromQuaternion(q.quaternion), ee = new THREE.Matrix4().getInverse(re).premultiply(Y), ne = this.cameraMotion.value.fov, le = (p = Q.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ie = 1;
|
|
23401
23380
|
r.effect === "zoomin" ? ie = 1.5 : r.effect === "zoomout" && (ie = 0.4);
|
|
23402
|
-
for (var
|
|
23403
|
-
var
|
|
23404
|
-
if (
|
|
23405
|
-
var he = this.panoResources[
|
|
23406
|
-
he && (he.fixCameraTransform.copy(ee), he.panoPicture && (he.panoPicture.zoom = Math.tan(
|
|
23381
|
+
for (var se = clamp$1(le * ie, 1, 170), ae = 0; ae < S.length - 1; ae++) {
|
|
23382
|
+
var fe = S[ae].key;
|
|
23383
|
+
if (fe) {
|
|
23384
|
+
var he = this.panoResources[fe];
|
|
23385
|
+
he && (he.fixCameraTransform.copy(ee), he.panoPicture && (he.panoPicture.zoom = Math.tan(se / 2 / 180 * Math.PI) / Math.tan(ne / 2 / 180 * Math.PI)));
|
|
23407
23386
|
}
|
|
23408
23387
|
}
|
|
23409
23388
|
this.cameraMotion.setKeyframes([
|
|
@@ -23418,54 +23397,54 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23418
23397
|
{
|
|
23419
23398
|
progress: 0,
|
|
23420
23399
|
value: {
|
|
23421
|
-
longitude: (g =
|
|
23422
|
-
latitude: (A =
|
|
23423
|
-
fov:
|
|
23400
|
+
longitude: (g = Q.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
|
|
23401
|
+
latitude: (A = Q.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
|
|
23402
|
+
fov: se
|
|
23424
23403
|
}
|
|
23425
23404
|
},
|
|
23426
23405
|
{
|
|
23427
23406
|
progress: 1,
|
|
23428
23407
|
value: {
|
|
23429
|
-
longitude: (m =
|
|
23430
|
-
latitude: (E =
|
|
23408
|
+
longitude: (m = Q.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
|
|
23409
|
+
latitude: (E = Q.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
|
|
23431
23410
|
fov: le
|
|
23432
23411
|
}
|
|
23433
23412
|
}
|
|
23434
|
-
],
|
|
23413
|
+
], J).catch(noop$1);
|
|
23435
23414
|
}
|
|
23436
|
-
var
|
|
23437
|
-
|
|
23415
|
+
var xe = this.locationMotion.setKeyframes(S, J, R);
|
|
23416
|
+
xe.then(
|
|
23438
23417
|
// resolve
|
|
23439
23418
|
// 动画结束
|
|
23440
23419
|
function() {
|
|
23441
|
-
for (var
|
|
23442
|
-
var
|
|
23443
|
-
|
|
23420
|
+
for (var de = 0, Re = s.modelScene.children; de < Re.length; de++) {
|
|
23421
|
+
var te = Re[de];
|
|
23422
|
+
te instanceof Model && te.show();
|
|
23444
23423
|
}
|
|
23445
|
-
var
|
|
23424
|
+
var W = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: s.camera.pose.distance });
|
|
23446
23425
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
23447
23426
|
options: o,
|
|
23448
23427
|
prevPano: X,
|
|
23449
23428
|
progress: 1,
|
|
23450
|
-
state:
|
|
23429
|
+
state: W,
|
|
23451
23430
|
userAction: s.userAction,
|
|
23452
23431
|
error: null
|
|
23453
|
-
})), o.moveEndCallback && o.moveEndCallback(
|
|
23454
|
-
var
|
|
23455
|
-
if (
|
|
23456
|
-
var
|
|
23432
|
+
})), o.moveEndCallback && o.moveEndCallback(W);
|
|
23433
|
+
var z = s.works.getResolvedObserver(e);
|
|
23434
|
+
if (z && z.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
|
|
23435
|
+
var Ce = {
|
|
23457
23436
|
map: s.videoTexture,
|
|
23458
|
-
size:
|
|
23459
|
-
matrix:
|
|
23460
|
-
panoMatrix:
|
|
23437
|
+
size: z.video.size,
|
|
23438
|
+
matrix: z.video.matrix,
|
|
23439
|
+
panoMatrix: z.matrix,
|
|
23461
23440
|
alpha: 1
|
|
23462
|
-
},
|
|
23463
|
-
ve.setAttribute("uuid",
|
|
23464
|
-
Ve &&
|
|
23441
|
+
}, ce = createUuid(), ve = s.videoTexture.image;
|
|
23442
|
+
ve.setAttribute("uuid", ce), canplayVideo().then(function(Ve) {
|
|
23443
|
+
Ve && z.video && ve.getAttribute("uuid") === ce && (ve.oncanplay = function() {
|
|
23465
23444
|
ve.oncanplay = noop$1, ve.play();
|
|
23466
23445
|
}, ve.ontimeupdate = function() {
|
|
23467
|
-
ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(
|
|
23468
|
-
}, ve.src =
|
|
23446
|
+
ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(Ce));
|
|
23447
|
+
}, ve.src = z.video.source);
|
|
23469
23448
|
}).catch(function() {
|
|
23470
23449
|
ve.removeAttribute("uuid");
|
|
23471
23450
|
});
|
|
@@ -23478,7 +23457,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23478
23457
|
options: o,
|
|
23479
23458
|
prevPano: X,
|
|
23480
23459
|
progress: 0,
|
|
23481
|
-
state:
|
|
23460
|
+
state: U,
|
|
23482
23461
|
userAction: s.userAction,
|
|
23483
23462
|
error: null
|
|
23484
23463
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -23529,19 +23508,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23529
23508
|
}
|
|
23530
23509
|
var u = e.center.raycaster, l = this.camera.getDirection(new THREE.Vector3()).setY(0), c = null, d = this.works.getResolvedObserver(this.currentPano);
|
|
23531
23510
|
if (d) {
|
|
23532
|
-
var f = d.accessibleIds.filter(function(
|
|
23533
|
-
if (
|
|
23511
|
+
var f = d.accessibleIds.filter(function(U) {
|
|
23512
|
+
if (U === panoStringify(r.currentPano))
|
|
23534
23513
|
return !1;
|
|
23535
|
-
var X = r.works.getResolvedObserver(
|
|
23514
|
+
var X = r.works.getResolvedObserver(U);
|
|
23536
23515
|
return !X || X.position.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : X.loadable || X.active;
|
|
23537
23516
|
}), h = this.modelScene.intersectRaycaster(u)[0];
|
|
23538
23517
|
if (h) {
|
|
23539
|
-
var p = arrayMin(f, function(
|
|
23540
|
-
var X = r.works.getResolvedObserver(
|
|
23518
|
+
var p = arrayMin(f, function(U) {
|
|
23519
|
+
var X = r.works.getResolvedObserver(U);
|
|
23541
23520
|
if (!X)
|
|
23542
23521
|
return 1 / 0;
|
|
23543
|
-
var
|
|
23544
|
-
return
|
|
23522
|
+
var j = X.standingPosition.clone();
|
|
23523
|
+
return j.distanceTo(h.point);
|
|
23545
23524
|
}, !0), g = p[0], A = p[1];
|
|
23546
23525
|
g && A < this.panoTapTriggerRadius && (c = (o = this.works.getResolvedObserver(g)) !== null && o !== void 0 ? o : null);
|
|
23547
23526
|
}
|
|
@@ -23566,31 +23545,31 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23566
23545
|
}
|
|
23567
23546
|
}
|
|
23568
23547
|
}
|
|
23569
|
-
var _ = L.length > 0 ? L : __spreadArray(__spreadArray([], C, !0), w, !0), N = _.slice().sort(function(
|
|
23570
|
-
return
|
|
23548
|
+
var _ = L.length > 0 ? L : __spreadArray(__spreadArray([], C, !0), w, !0), N = _.slice().sort(function(U, X) {
|
|
23549
|
+
return U.angleTo(R) - X.angleTo(R);
|
|
23571
23550
|
})[0];
|
|
23572
23551
|
if (N && N.angleTo(l) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
|
|
23573
|
-
var D = e.state.fov,
|
|
23574
|
-
b.latitude = clamp$1(0,
|
|
23552
|
+
var D = e.state.fov, G = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
|
|
23553
|
+
b.latitude = clamp$1(0, G, K);
|
|
23575
23554
|
}
|
|
23576
|
-
var
|
|
23577
|
-
if (
|
|
23555
|
+
var J = __assign({}, e.state);
|
|
23556
|
+
if (J.workCode = c.pano.workCode, J.panoIndex = c.pano.panoIndex, b.longitude !== void 0 && (J.longitude = b.longitude), b.latitude !== void 0 && (J.latitude = b.latitude), b.fov !== void 0 && (J.fov = b.fov), J.distance = 0, J.offset = c.position.clone(), e.state = J, this.emit("gesture.tap", e), !e.defaultPrevented) {
|
|
23578
23557
|
if (this.emit("pano.select", createEvent("pano.select", {
|
|
23579
23558
|
prevPano: this.currentPano,
|
|
23580
|
-
state:
|
|
23559
|
+
state: J,
|
|
23581
23560
|
userAction: e.userAction,
|
|
23582
23561
|
options: b,
|
|
23583
23562
|
progress: 0,
|
|
23584
23563
|
error: null
|
|
23585
23564
|
})), c && !c.active) {
|
|
23586
|
-
var
|
|
23587
|
-
this.panoMeshes[
|
|
23565
|
+
var Q = c.panoId;
|
|
23566
|
+
this.panoMeshes[Q] && (this.panoMeshes[Q].setDisabled(!1), this.panoMeshes[Q].setLoading(!0));
|
|
23588
23567
|
}
|
|
23589
23568
|
c && c.active && this.emit("pano.request", createEvent("pano.request", {
|
|
23590
23569
|
userAction: e.userAction,
|
|
23591
23570
|
prevPano: this.currentPano,
|
|
23592
23571
|
progress: 0,
|
|
23593
|
-
state:
|
|
23572
|
+
state: J,
|
|
23594
23573
|
options: b,
|
|
23595
23574
|
error: null
|
|
23596
23575
|
}));
|
|
@@ -24536,23 +24515,23 @@ void main() {
|
|
|
24536
24515
|
M.copy(P), S = !0;
|
|
24537
24516
|
}
|
|
24538
24517
|
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(M.x + (P.x - M.x) * B, M.y + (P.y - M.y) * B, M.z + (P.z - M.z) * B);
|
|
24539
|
-
for (var N = [], D = [],
|
|
24540
|
-
var
|
|
24541
|
-
|
|
24518
|
+
for (var N = [], D = [], G = 0, K = this.locationMotion.keyframes; G < K.length; G++) {
|
|
24519
|
+
var J = K[G], Q = J.key, U = J.progress;
|
|
24520
|
+
Q !== void 0 && (N.push(Q), U > this.locationMotion.progress && D.push(Q));
|
|
24542
24521
|
}
|
|
24543
|
-
for (var X = 0,
|
|
24544
|
-
var
|
|
24545
|
-
if (!(D.indexOf(
|
|
24546
|
-
var
|
|
24547
|
-
if (
|
|
24548
|
-
var
|
|
24549
|
-
if (
|
|
24550
|
-
if (
|
|
24522
|
+
for (var X = 0, j = Object.keys(this.panoResources); X < j.length; X++) {
|
|
24523
|
+
var $ = j[X];
|
|
24524
|
+
if (!(D.indexOf($) >= 0)) {
|
|
24525
|
+
var q = this.panoResources[$];
|
|
24526
|
+
if (q.panoPicture) {
|
|
24527
|
+
var re = q.panoPicture.map;
|
|
24528
|
+
if (re) {
|
|
24529
|
+
if (re === ((o = h.pano0) === null || o === void 0 ? void 0 : o.map) || re === ((s = h.pano1) === null || s === void 0 ? void 0 : s.map))
|
|
24551
24530
|
continue;
|
|
24552
|
-
|
|
24531
|
+
re.dispose(), q.panoPicture = null;
|
|
24553
24532
|
}
|
|
24554
24533
|
}
|
|
24555
|
-
N.indexOf(
|
|
24534
|
+
N.indexOf($) >= 0 || delete this.panoResources[$];
|
|
24556
24535
|
}
|
|
24557
24536
|
}
|
|
24558
24537
|
this.currentPano = panoParse(H.panoId), this.emit("pano.moving", createEvent("pano.moving", {
|
|
@@ -24565,74 +24544,74 @@ void main() {
|
|
|
24565
24544
|
}));
|
|
24566
24545
|
}
|
|
24567
24546
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset), panoEqual(this.currentPano, f) && this.updatePanoMeshesVisible();
|
|
24568
|
-
var
|
|
24547
|
+
var Y = this.camera.pose.longitude, ee = this.camera.pose.latitude;
|
|
24569
24548
|
this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose();
|
|
24570
|
-
var
|
|
24549
|
+
var ne = this.works.getResolvedObserver(this.currentPano);
|
|
24571
24550
|
if (this.camera.pose.distance > 0.1 || S)
|
|
24572
24551
|
for (var le = 0, ie = Object.keys(this.panoMeshes); le < ie.length; le++) {
|
|
24573
|
-
var
|
|
24574
|
-
|
|
24552
|
+
var se = ie[le], ae = this.panoMeshes[se];
|
|
24553
|
+
ae.setOpacity(0), ae.updateTime && ae.updateTime(e, r), ae.visible = !1;
|
|
24575
24554
|
}
|
|
24576
|
-
else if (
|
|
24577
|
-
for (var
|
|
24578
|
-
var
|
|
24555
|
+
else if (ne)
|
|
24556
|
+
for (var fe = ne.visibleIds.concat(panoStringify(this.currentPano)), he = 0, xe = fe; he < xe.length; he++) {
|
|
24557
|
+
var se = xe[he], de = panoParse(se), _ = this.works.getResolvedObserver(de);
|
|
24579
24558
|
if (_) {
|
|
24580
|
-
var
|
|
24559
|
+
var ae = this.panoMeshes[se];
|
|
24581
24560
|
if (!_.loadable && !_.active) {
|
|
24582
|
-
|
|
24561
|
+
ae.setOpacity(0);
|
|
24583
24562
|
continue;
|
|
24584
24563
|
}
|
|
24585
|
-
var
|
|
24586
|
-
|
|
24564
|
+
var Re = ae.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
|
|
24565
|
+
Re < 0.05 ? ae.setOpacity(0) : ae.setOpacity(clamp$1(1.5 / Re, 0, 1)), panoEqual(this.currentPano, de) && ae.setOpacity(0), ae.lookAt(this.camera.position);
|
|
24587
24566
|
}
|
|
24588
24567
|
}
|
|
24589
24568
|
if (this.locationMotion.ended)
|
|
24590
|
-
for (var
|
|
24591
|
-
var _ =
|
|
24592
|
-
|
|
24569
|
+
for (var te = this.intersect(e), W = 0, z = this.works.resolvedObservers; W < z.length; W++) {
|
|
24570
|
+
var _ = z[W], ae = this.panoMeshes[_.panoId];
|
|
24571
|
+
ae && (ae.setCurrent(ae === te), ae.updateTime && ae.updateTime(e, r));
|
|
24593
24572
|
}
|
|
24594
|
-
(
|
|
24573
|
+
(Y !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop$1), this.emit("camera.update", createEvent("camera.update", {
|
|
24595
24574
|
userAction: !0,
|
|
24596
24575
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
24597
24576
|
})));
|
|
24598
24577
|
{
|
|
24599
|
-
var B = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1,
|
|
24600
|
-
if (
|
|
24578
|
+
var B = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1, Ce = Math.round(B), ce = this.modelScene.parameter.pano0, ve = this.modelScene.parameter.pano1, de = Ce === 0 ? ce : ve, _ = void 0;
|
|
24579
|
+
if (de && (_ = this.works.getResolvedObserver(de.panoId), _ || (_ = this.panoPictureObserverMap.get(de))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = B <= 0.5 ? 0 : B < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !de || this.tileLevelForFov === !1)
|
|
24601
24580
|
this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
|
|
24602
24581
|
else {
|
|
24603
|
-
var Ve = getImageSizeLevel(
|
|
24582
|
+
var Ve = getImageSizeLevel(de.mapSize), rt = Ve + 1, We = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), me = Math.floor(this.tileLevelForFov(this.camera.fov, We)), oe = me > Ve ? me : 0;
|
|
24604
24583
|
this.tiling.setObserver(_);
|
|
24605
|
-
var pe = this.tiling.update(this.renderer, this.camera,
|
|
24584
|
+
var pe = this.tiling.update(this.renderer, this.camera, de.map, de.matrix, de.zoom, rt, oe), Me = {
|
|
24606
24585
|
map: this.tiling.renderTarget.texture,
|
|
24607
24586
|
matrixInverse: this.tiling.camera.matrixWorldInverse,
|
|
24608
24587
|
projectionMatrix: this.tiling.camera.projectionMatrix,
|
|
24609
|
-
pano:
|
|
24610
|
-
opacity: (
|
|
24611
|
-
},
|
|
24612
|
-
(pe || Me.pano !== (
|
|
24588
|
+
pano: Ce,
|
|
24589
|
+
opacity: (ce == null ? void 0 : ce.panoId) === (ve == null ? void 0 : ve.panoId) ? 1 : easeInQuart(Math.abs(((l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 0) - 0.5) * 2)
|
|
24590
|
+
}, Te = this.modelScene.parameter.refinedScreen;
|
|
24591
|
+
(pe || Me.pano !== (Te == null ? void 0 : Te.pano) || Me.opacity !== (Te == null ? void 0 : Te.opacity)) && this.modelScene.parameter.set("refinedScreen", Me);
|
|
24613
24592
|
}
|
|
24614
24593
|
}
|
|
24615
24594
|
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
|
|
24616
24595
|
{
|
|
24617
|
-
var Pe = y.effect, Fe = this.modelScene.parameter,
|
|
24618
|
-
if (
|
|
24619
|
-
if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !==
|
|
24620
|
-
var Ae = 500,
|
|
24621
|
-
this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !==
|
|
24596
|
+
var Pe = y.effect, Fe = this.modelScene.parameter, ce = Fe.pano0, ve = Fe.pano1;
|
|
24597
|
+
if (ce && ve && ce !== ve && Pe === "fly" && this.flyEffectUseDepthBuffer) {
|
|
24598
|
+
if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !== ce.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== ve.panoId) {
|
|
24599
|
+
var Ae = 500, be = 512;
|
|
24600
|
+
this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== be && this.pano0DepthCubeRenderTarget.setSize(be, be) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(be, {
|
|
24622
24601
|
minFilter: THREE.NearestFilter,
|
|
24623
24602
|
magFilter: THREE.NearestFilter,
|
|
24624
24603
|
generateMipmaps: !1
|
|
24625
|
-
}), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !==
|
|
24604
|
+
}), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== be && this.pano1DepthCubeRenderTarget.setSize(be, be) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(be, {
|
|
24626
24605
|
minFilter: THREE.NearestFilter,
|
|
24627
24606
|
magFilter: THREE.NearestFilter,
|
|
24628
24607
|
generateMipmaps: !1
|
|
24629
24608
|
});
|
|
24630
24609
|
var Ie = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
|
|
24631
|
-
Ie.matrix.copy(
|
|
24610
|
+
Ie.matrix.copy(ce.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, Ae);
|
|
24632
24611
|
var Be = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
|
|
24633
24612
|
Be.matrix.copy(ve.matrix), Be.matrixWorld.copy(Be.matrix), Be.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Be, Ae), this.modelScene.parameter.set({
|
|
24634
24613
|
pano0Depth: {
|
|
24635
|
-
panoId:
|
|
24614
|
+
panoId: ce.panoId,
|
|
24636
24615
|
map: this.pano0DepthCubeRenderTarget.texture,
|
|
24637
24616
|
mapSize: this.pano0DepthCubeRenderTarget.width,
|
|
24638
24617
|
maxDepth: Ae
|
|
@@ -24911,8 +24890,8 @@ void main() {
|
|
|
24911
24890
|
// 动画结束
|
|
24912
24891
|
function() {
|
|
24913
24892
|
for (var N = 0, D = s.modelScene.children; N < D.length; N++) {
|
|
24914
|
-
var
|
|
24915
|
-
|
|
24893
|
+
var G = D[N];
|
|
24894
|
+
G instanceof Model && G.show();
|
|
24916
24895
|
}
|
|
24917
24896
|
var K = __assign(__assign(__assign({}, B), { mode: s.mode }), clonePose(s.camera.pose));
|
|
24918
24897
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
@@ -25291,7 +25270,7 @@ void main() {
|
|
|
25291
25270
|
var E = {
|
|
25292
25271
|
x: e.center.x - o.x,
|
|
25293
25272
|
y: e.center.y - o.y
|
|
25294
|
-
}, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25273
|
+
}, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), G = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(this.cameraMotion.value.latitude + O.latitude, D, G);
|
|
25295
25274
|
this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (K = this.cameraMotion.value.latitude);
|
|
25296
25275
|
var w = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: _, latitude: K, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
|
|
25297
25276
|
if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = w, this.emit("gesture.pan", e), e.defaultPrevented)
|
|
@@ -25305,10 +25284,10 @@ void main() {
|
|
|
25305
25284
|
longitude: w.longitude,
|
|
25306
25285
|
latitude: w.latitude
|
|
25307
25286
|
}, 0).catch(noop$1), e.isFinal) {
|
|
25308
|
-
var
|
|
25287
|
+
var J = e.velocityX, Q = e.velocityY;
|
|
25309
25288
|
this.inMomentumMovement = {
|
|
25310
25289
|
uuid: createUuid()
|
|
25311
|
-
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x:
|
|
25290
|
+
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: J, y: Q })), { x: 0, y: 0, z: 0 }), 0);
|
|
25312
25291
|
}
|
|
25313
25292
|
}
|
|
25314
25293
|
}
|
|
@@ -26099,7 +26078,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
26099
26078
|
}
|
|
26100
26079
|
return Object.defineProperty(t, "version", {
|
|
26101
26080
|
get: function() {
|
|
26102
|
-
return "6.5.0-alpha.
|
|
26081
|
+
return "6.5.0-alpha.14";
|
|
26103
26082
|
},
|
|
26104
26083
|
enumerable: !1,
|
|
26105
26084
|
configurable: !0
|
|
@@ -26732,41 +26711,41 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26732
26711
|
{ key: C.key, progress: _ / b, value: C.value },
|
|
26733
26712
|
{ key: v, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
|
|
26734
26713
|
];
|
|
26735
|
-
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes),
|
|
26736
|
-
S = this.locationMotion.getProgressVelocity(E) * D /
|
|
26714
|
+
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), G = this.locationMotionKeyframesLength(T);
|
|
26715
|
+
S = this.locationMotion.getProgressVelocity(E) * D / G;
|
|
26737
26716
|
}
|
|
26738
|
-
var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0),
|
|
26717
|
+
var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), J = {
|
|
26739
26718
|
longitude: o.longitude,
|
|
26740
26719
|
latitude: o.latitude,
|
|
26741
26720
|
fov: o.fov
|
|
26742
|
-
},
|
|
26721
|
+
}, Q = __assign(__assign({}, e), { mode: this.mode, longitude: (u = J.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = J.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = J.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), U = this.currentPano;
|
|
26743
26722
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
26744
26723
|
options: o,
|
|
26745
|
-
prevPano:
|
|
26724
|
+
prevPano: U,
|
|
26746
26725
|
progress: 0,
|
|
26747
|
-
state:
|
|
26726
|
+
state: Q,
|
|
26748
26727
|
userAction: this.userAction,
|
|
26749
26728
|
error: null
|
|
26750
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
26751
|
-
this.cameraMotion.set(
|
|
26729
|
+
})), o.moveStartCallback && o.moveStartCallback(Q), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
|
|
26730
|
+
this.cameraMotion.set(J, K).catch(noop$1);
|
|
26752
26731
|
else {
|
|
26753
26732
|
var X = coordinatesToVector({
|
|
26754
26733
|
longitude: this.cameraMotion.value.longitude,
|
|
26755
26734
|
latitude: this.cameraMotion.value.latitude
|
|
26756
|
-
}),
|
|
26757
|
-
longitude: (d =
|
|
26758
|
-
latitude: (f =
|
|
26759
|
-
}),
|
|
26760
|
-
|
|
26761
|
-
var
|
|
26762
|
-
|
|
26763
|
-
var
|
|
26735
|
+
}), j = coordinatesToVector({
|
|
26736
|
+
longitude: (d = J.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
|
|
26737
|
+
latitude: (f = J.latitude) !== null && f !== void 0 ? f : this.cameraMotion.value.latitude
|
|
26738
|
+
}), $ = new THREE.Object3D();
|
|
26739
|
+
$.lookAt(X);
|
|
26740
|
+
var q = new THREE.Matrix4().makeRotationFromQuaternion($.quaternion);
|
|
26741
|
+
$.lookAt(j);
|
|
26742
|
+
var re = new THREE.Matrix4().makeRotationFromQuaternion($.quaternion), Y = new THREE.Matrix4().getInverse(q).premultiply(re), ee = this.cameraMotion.value.fov, ne = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, le = 1;
|
|
26764
26743
|
r.effect === "zoomin" ? le = 1.5 : r.effect === "zoomout" && (le = 0.4);
|
|
26765
|
-
for (var ie =
|
|
26766
|
-
var
|
|
26767
|
-
if (
|
|
26768
|
-
var
|
|
26769
|
-
|
|
26744
|
+
for (var ie = ne * le, se = 0; se < T.length - 1; se++) {
|
|
26745
|
+
var ae = T[se].key;
|
|
26746
|
+
if (ae) {
|
|
26747
|
+
var fe = this.panoResources[ae];
|
|
26748
|
+
fe && (fe.fixCameraTransform.copy(Y), fe.leftPanoPicture && (fe.leftPanoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
|
|
26770
26749
|
}
|
|
26771
26750
|
}
|
|
26772
26751
|
this.cameraMotion.setKeyframes([
|
|
@@ -26781,17 +26760,17 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26781
26760
|
{
|
|
26782
26761
|
progress: 0,
|
|
26783
26762
|
value: {
|
|
26784
|
-
longitude: (p =
|
|
26785
|
-
latitude: (g =
|
|
26763
|
+
longitude: (p = J.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
|
|
26764
|
+
latitude: (g = J.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
|
|
26786
26765
|
fov: ie
|
|
26787
26766
|
}
|
|
26788
26767
|
},
|
|
26789
26768
|
{
|
|
26790
26769
|
progress: 1,
|
|
26791
26770
|
value: {
|
|
26792
|
-
longitude: (A =
|
|
26793
|
-
latitude: (m =
|
|
26794
|
-
fov:
|
|
26771
|
+
longitude: (A = J.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
|
|
26772
|
+
latitude: (m = J.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
|
|
26773
|
+
fov: ne
|
|
26795
26774
|
}
|
|
26796
26775
|
}
|
|
26797
26776
|
], K).catch(noop$1);
|
|
@@ -26801,36 +26780,36 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26801
26780
|
// resolve
|
|
26802
26781
|
// 动画结束
|
|
26803
26782
|
function() {
|
|
26804
|
-
for (var
|
|
26805
|
-
var
|
|
26806
|
-
|
|
26783
|
+
for (var xe = 0, de = s.modelScene.children; xe < de.length; xe++) {
|
|
26784
|
+
var Re = de[xe];
|
|
26785
|
+
Re instanceof Model && Re.show();
|
|
26807
26786
|
}
|
|
26808
|
-
var
|
|
26787
|
+
var te = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
|
|
26809
26788
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
26810
26789
|
options: o,
|
|
26811
|
-
prevPano:
|
|
26790
|
+
prevPano: U,
|
|
26812
26791
|
progress: 1,
|
|
26813
|
-
state:
|
|
26792
|
+
state: te,
|
|
26814
26793
|
userAction: s.userAction,
|
|
26815
26794
|
error: null
|
|
26816
|
-
})), o.moveEndCallback && o.moveEndCallback(
|
|
26817
|
-
var
|
|
26818
|
-
if (
|
|
26819
|
-
var
|
|
26795
|
+
})), o.moveEndCallback && o.moveEndCallback(te);
|
|
26796
|
+
var W = s.works.getResolvedObserver(s.currentPano);
|
|
26797
|
+
if (W && W.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
|
|
26798
|
+
var z = {
|
|
26820
26799
|
map: s.videoTexture,
|
|
26821
|
-
size:
|
|
26822
|
-
matrix:
|
|
26823
|
-
panoMatrix:
|
|
26800
|
+
size: W.video.size,
|
|
26801
|
+
matrix: W.video.matrix,
|
|
26802
|
+
panoMatrix: W.matrix,
|
|
26824
26803
|
alpha: 1
|
|
26825
|
-
},
|
|
26826
|
-
|
|
26827
|
-
ve &&
|
|
26828
|
-
|
|
26829
|
-
},
|
|
26830
|
-
|
|
26831
|
-
},
|
|
26804
|
+
}, Ce = createUuid(), ce = s.videoTexture.image;
|
|
26805
|
+
ce.setAttribute("uuid", Ce), canplayVideo().then(function(ve) {
|
|
26806
|
+
ve && W.video && ce.getAttribute("uuid") === Ce && (ce.oncanplay = function() {
|
|
26807
|
+
ce.oncanplay = noop$1, ce.play();
|
|
26808
|
+
}, ce.ontimeupdate = function() {
|
|
26809
|
+
ce.currentTime > 0.5 && (ce.ontimeupdate = noop$1, s.panoVideo.setMaterial(z));
|
|
26810
|
+
}, ce.src = W.video.source);
|
|
26832
26811
|
}).catch(function() {
|
|
26833
|
-
|
|
26812
|
+
ce.removeAttribute("uuid");
|
|
26834
26813
|
});
|
|
26835
26814
|
}
|
|
26836
26815
|
},
|
|
@@ -26839,9 +26818,9 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26839
26818
|
function() {
|
|
26840
26819
|
s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
26841
26820
|
options: o,
|
|
26842
|
-
prevPano:
|
|
26821
|
+
prevPano: U,
|
|
26843
26822
|
progress: 0,
|
|
26844
|
-
state:
|
|
26823
|
+
state: Q,
|
|
26845
26824
|
userAction: s.userAction,
|
|
26846
26825
|
error: null
|
|
26847
26826
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -26938,29 +26917,29 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26938
26917
|
mapSize: A.pano0.mapSize,
|
|
26939
26918
|
zoom: A.pano0.zoom,
|
|
26940
26919
|
matrix: P.leftPanoPicture.matrix.clone().setPosition(B.position)
|
|
26941
|
-
},
|
|
26942
|
-
|
|
26920
|
+
}, G = this.panoPictureObserverMap.get(A.pano0);
|
|
26921
|
+
G && this.panoPictureObserverMap.set(D, G), A.pano0 = D;
|
|
26943
26922
|
}
|
|
26944
26923
|
O.copy(_), w = !0;
|
|
26945
26924
|
}
|
|
26946
26925
|
m.distance = this.locationMotion.value.distance, m.offset = new THREE.Vector3(O.x + (_.x - O.x) * N, O.y + (_.y - O.y) * N, O.z + (_.z - O.z) * N);
|
|
26947
|
-
for (var K = [],
|
|
26948
|
-
var X =
|
|
26949
|
-
|
|
26950
|
-
}
|
|
26951
|
-
for (var
|
|
26952
|
-
var
|
|
26953
|
-
if (!(
|
|
26954
|
-
var ee = this.panoResources[
|
|
26926
|
+
for (var K = [], J = [], Q = 0, U = this.locationMotion.keyframes; Q < U.length; Q++) {
|
|
26927
|
+
var X = U[Q], j = X.key, $ = X.progress;
|
|
26928
|
+
j !== void 0 && (K.push(j), $ > this.locationMotion.progress && J.push(j));
|
|
26929
|
+
}
|
|
26930
|
+
for (var q = 0, re = Object.keys(this.panoResources); q < re.length; q++) {
|
|
26931
|
+
var Y = re[q];
|
|
26932
|
+
if (!(J.indexOf(Y) >= 0)) {
|
|
26933
|
+
var ee = this.panoResources[Y];
|
|
26955
26934
|
if (ee.leftPanoPicture) {
|
|
26956
|
-
var
|
|
26957
|
-
if (
|
|
26958
|
-
if (
|
|
26935
|
+
var ne = ee.leftPanoPicture.map;
|
|
26936
|
+
if (ne) {
|
|
26937
|
+
if (ne === ((s = A.pano0) === null || s === void 0 ? void 0 : s.map) || ne === ((u = A.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
26959
26938
|
continue;
|
|
26960
|
-
|
|
26939
|
+
ne.dispose(), ee.leftPanoPicture = null;
|
|
26961
26940
|
}
|
|
26962
26941
|
}
|
|
26963
|
-
K.indexOf(
|
|
26942
|
+
K.indexOf(Y) >= 0 || delete this.panoResources[Y];
|
|
26964
26943
|
}
|
|
26965
26944
|
}
|
|
26966
26945
|
var le = panoParse(B.panoId);
|
|
@@ -26974,8 +26953,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26974
26953
|
}));
|
|
26975
26954
|
}
|
|
26976
26955
|
isEmptyObject(A) === !1 && this.modelScene.parameter.set(A), isEmptyObject(m) === !1 && this.setCamera(m);
|
|
26977
|
-
var ie = this.works.getResolvedObserver(this.currentPano),
|
|
26978
|
-
if (!
|
|
26956
|
+
var ie = this.works.getResolvedObserver(this.currentPano), se = p[1];
|
|
26957
|
+
if (!se) {
|
|
26979
26958
|
console.error("xrFrame丢失,请重试");
|
|
26980
26959
|
return;
|
|
26981
26960
|
}
|
|
@@ -26983,36 +26962,36 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26983
26962
|
console.error("session丢失,请重试");
|
|
26984
26963
|
return;
|
|
26985
26964
|
}
|
|
26986
|
-
var
|
|
26987
|
-
if (
|
|
26988
|
-
var
|
|
26989
|
-
if (
|
|
26990
|
-
var
|
|
26991
|
-
|
|
26992
|
-
var
|
|
26993
|
-
if (!
|
|
26965
|
+
var ae = this.xrManager.referenceSpace;
|
|
26966
|
+
if (ae) {
|
|
26967
|
+
var fe = this.xrManager.cameraVR, he = this.xrManager.cameraL, xe = this.xrManager.cameraR, de = [he, xe], Re = se.getViewerPose(ae), te = new THREE.Vector3(0, 0, 0);
|
|
26968
|
+
if (Re) {
|
|
26969
|
+
var W;
|
|
26970
|
+
W = this.xrManager.session.renderState.baseLayer;
|
|
26971
|
+
var z = Re.views;
|
|
26972
|
+
if (!W) {
|
|
26994
26973
|
console.error("no layer found");
|
|
26995
26974
|
return;
|
|
26996
26975
|
}
|
|
26997
|
-
this.renderer.setFramebuffer(
|
|
26998
|
-
var
|
|
26999
|
-
|
|
27000
|
-
var
|
|
27001
|
-
new THREE.Matrix4().fromArray(
|
|
26976
|
+
this.renderer.setFramebuffer(W.framebuffer);
|
|
26977
|
+
var Ce = !1;
|
|
26978
|
+
z.length !== fe.cameras.length && (fe.cameras.length = 0, Ce = !0), this.parallaxCameraMatrixs = [];
|
|
26979
|
+
var ce = new THREE.Vector3(), ve = new THREE.Vector3();
|
|
26980
|
+
new THREE.Matrix4().fromArray(z[0].transform.matrix).decompose(ce, new THREE.Quaternion(), new THREE.Vector3()), new THREE.Matrix4().fromArray(z[1].transform.matrix).decompose(ve, new THREE.Quaternion(), new THREE.Vector3()), ve.clone().sub(ce).normalize();
|
|
27002
26981
|
var Ve = new THREE.Vector3(), rt = new THREE.Quaternion(), We = new THREE.Vector3();
|
|
27003
26982
|
this.camera.matrix.decompose(Ve, rt, We);
|
|
27004
|
-
for (var me = 0; me <
|
|
27005
|
-
var
|
|
27006
|
-
Me.matrix.fromArray(
|
|
27007
|
-
var
|
|
27008
|
-
Me.matrix.decompose(
|
|
26983
|
+
for (var me = 0; me < z.length; me++) {
|
|
26984
|
+
var oe = z[me], pe = W.getViewport(oe), Me = de[me];
|
|
26985
|
+
Me.matrix.fromArray(oe.transform.matrix);
|
|
26986
|
+
var Te = new THREE.Vector3(), Pe = new THREE.Quaternion(), Fe = new THREE.Vector3();
|
|
26987
|
+
Me.matrix.decompose(Te, Pe, Fe), te.copy(Ve), Me.position.copy(Ve), Me.quaternion.copy(Pe), Me.scale.copy(Fe), Me.updateMatrix(), Me.projectionMatrix.fromArray(oe.projectionMatrix), Me.viewport.set(pe.x, pe.y, pe.width, pe.height), Ce === !0 && fe.cameras.push(Me);
|
|
27009
26988
|
}
|
|
27010
26989
|
if (this.xrManager.session && this.xrManager.session.inputSources) {
|
|
27011
26990
|
for (var me = 0; me < this.xrManager.session.inputSources.length; me++)
|
|
27012
26991
|
if (this.xrManager.session.inputSources[me] && this.xrManager.session.inputSources[me].targetRayMode === "transient-pointer") {
|
|
27013
|
-
var Ae =
|
|
26992
|
+
var Ae = se.getPose(this.xrManager.session.inputSources[me].targetRaySpace, ae);
|
|
27014
26993
|
if (Ae) {
|
|
27015
|
-
var
|
|
26994
|
+
var be = new THREE.Vector3(0, 0, -1).applyQuaternion(Ae.transform.orientation), Ie = new THREE.Raycaster(this.camera.position, be);
|
|
27016
26995
|
this.gazeRay = Ie;
|
|
27017
26996
|
}
|
|
27018
26997
|
}
|
|
@@ -27021,18 +27000,18 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27021
27000
|
for (var Be = this.xrManager.session.inputSources, me = 0; me < Be.length; me++) {
|
|
27022
27001
|
var qe = this.xrManager.controllers[me], ke = Be[me];
|
|
27023
27002
|
if (ke) {
|
|
27024
|
-
qe && qe.update(ke,
|
|
27025
|
-
var Ie = this.xrManager.getController(me), Ne = new THREE.Vector3(0, 1.2, 0), _e = Ie.position.clone().add(
|
|
27026
|
-
ke.handedness === "left" ? this.xrControllerRay.left.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)) : ke.handedness === "right" && this.xrControllerRay.right.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)), this.controllerWrappers[me].position.copy(new THREE.Vector3(0, 0, 0).add(
|
|
27003
|
+
qe && qe.update(ke, se, ae);
|
|
27004
|
+
var Ie = this.xrManager.getController(me), Ne = new THREE.Vector3(0, 1.2, 0), _e = Ie.position.clone().add(te).sub(Ne);
|
|
27005
|
+
ke.handedness === "left" ? this.xrControllerRay.left.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)) : ke.handedness === "right" && this.xrControllerRay.right.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)), this.controllerWrappers[me].position.copy(new THREE.Vector3(0, 0, 0).add(te).sub(Ne));
|
|
27027
27006
|
var Ue = this.modelScene.intersectRaycaster(this.xrControllerRay.right);
|
|
27028
27007
|
if (Ue.length === 0 && (Ue = this.xrControllerRay.right.intersectObject(this.boundingMesh, !0).map(function(F) {
|
|
27029
27008
|
var k;
|
|
27030
27009
|
return __assign({ floor: (k = ie == null ? void 0 : ie.floorIndex) !== null && k !== void 0 ? k : 0 }, F);
|
|
27031
27010
|
})), Ue.length >= 1 && Ue[0].face)
|
|
27032
27011
|
if (ke.handedness === "right") {
|
|
27033
|
-
var De = this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene, !0), je = Ue[0].face.normal,
|
|
27012
|
+
var De = this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene, !0), je = Ue[0].face.normal, Se = je.clone(), Oe = Ue[0].point.clone();
|
|
27034
27013
|
this.intersectMesh.position.copy(Oe);
|
|
27035
|
-
var we = Oe.clone().add(
|
|
27014
|
+
var we = Oe.clone().add(Se);
|
|
27036
27015
|
if (this.intersectMesh.lookAt(we), Math.abs(je.y) > 0.99) {
|
|
27037
27016
|
var Le = this.camera.position.clone().sub(Oe);
|
|
27038
27017
|
this.intersectMesh.rotation.z = -Math.atan2(Le.z, Le.x);
|
|
@@ -27065,30 +27044,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27065
27044
|
}, !0), vt = Mt[1];
|
|
27066
27045
|
vt = clamp$1(vt, 2.5, 1 / 0);
|
|
27067
27046
|
for (var at = ie.visibleIds.concat(panoStringify(this.currentPano)), Je = this.getForwardObserverOrNot(), dt = this.camera.getDirection(new THREE.Vector3()), nt = 0, Ke = Object.keys(this.panoMeshes); nt < Ke.length; nt++) {
|
|
27068
|
-
var Qe = Ke[nt], ye = this.panoMeshes[Qe],
|
|
27047
|
+
var Qe = Ke[nt], ye = this.panoMeshes[Qe], G = this.works.getResolvedObserver(Qe);
|
|
27069
27048
|
if (at.indexOf(Qe) === -1)
|
|
27070
27049
|
ye.setCurrent(!1), ye.setOpacity(0);
|
|
27071
|
-
else if (!
|
|
27050
|
+
else if (!G)
|
|
27072
27051
|
ye.setCurrent(!1), ye.setOpacity(0);
|
|
27073
|
-
else if (!
|
|
27052
|
+
else if (!G.loadable && !G.active)
|
|
27074
27053
|
ye.setCurrent(!1), ye.setOpacity(0);
|
|
27075
27054
|
else {
|
|
27076
27055
|
var Ee = ye.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
|
|
27077
27056
|
ye.setCurrent(!ye.loading && ye.progress === 0 && Je !== null && Je.panoId === Qe), ye.setOpacity(Ee < 0.01 ? 0 : clamp$1(vt / Ee * 1.2, 0.65, 0.98));
|
|
27078
|
-
var $e = this.camera.position.clone().setY(ye.position.y),
|
|
27057
|
+
var $e = this.camera.position.clone().setY(ye.position.y), be = new THREE.Vector3().copy(ye.position).sub($e).normalize();
|
|
27079
27058
|
if (Qe === panoStringify(this.currentPano)) {
|
|
27080
27059
|
var bt = clamp$1((0.5 - $e.distanceTo(ye.position)) / 0.5, 0, 1);
|
|
27081
|
-
|
|
27060
|
+
be.multiplyScalar(1 - bt).add(dt.clone().multiplyScalar(bt));
|
|
27082
27061
|
}
|
|
27083
|
-
|
|
27062
|
+
be.length() > 0 && ye.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(be.x, be.z), 0));
|
|
27084
27063
|
}
|
|
27085
27064
|
ye.updateTime && ye.updateTime(e, r);
|
|
27086
27065
|
}
|
|
27087
27066
|
}
|
|
27088
27067
|
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && ie) {
|
|
27089
27068
|
for (var Tt = [], Ht = 0, Ot = ie.accessibleIds; Ht < Ot.length; Ht++) {
|
|
27090
|
-
var Qe = Ot[Ht],
|
|
27091
|
-
|
|
27069
|
+
var Qe = Ot[Ht], G = this.works.getResolvedObserver(Qe);
|
|
27070
|
+
G && Tt.push(G);
|
|
27092
27071
|
}
|
|
27093
27072
|
if (Tt.sort(function(_t, I) {
|
|
27094
27073
|
return _t.standingPosition.distanceTo(ie.standingPosition) - I.standingPosition.distanceTo(ie.standingPosition);
|
|
@@ -27115,12 +27094,12 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27115
27094
|
}
|
|
27116
27095
|
}
|
|
27117
27096
|
{
|
|
27118
|
-
var N = (c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 1, pt = Math.round(N), st = this.modelScene.parameter.pano0, ut = this.modelScene.parameter.pano1, lt = pt === 0 ? st : ut,
|
|
27119
|
-
if (lt && (
|
|
27097
|
+
var N = (c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 1, pt = Math.round(N), st = this.modelScene.parameter.pano0, ut = this.modelScene.parameter.pano1, lt = pt === 0 ? st : ut, G = void 0;
|
|
27098
|
+
if (lt && (G = this.works.getResolvedObserver(lt.panoId), G || (G = this.panoPictureObserverMap.get(lt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N <= 0.5 ? 0 : N < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !G || !lt || this.tileLevelForFov === !1)
|
|
27120
27099
|
this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
|
|
27121
27100
|
else {
|
|
27122
27101
|
var ct = getImageSizeLevel(lt.mapSize), It = ct + 1, Lt = 4;
|
|
27123
|
-
this.tiling.setObserver(
|
|
27102
|
+
this.tiling.setObserver(G);
|
|
27124
27103
|
var Ft = this.tiling.update(this.renderer, this.camera, lt.map, lt.matrix, lt.zoom, It, Lt), wt = {
|
|
27125
27104
|
map: this.tiling.renderTarget.texture,
|
|
27126
27105
|
matrixInverse: this.tiling.camera.matrixWorldInverse,
|
|
@@ -27763,11 +27742,12 @@ void main() {
|
|
|
27763
27742
|
});
|
|
27764
27743
|
}
|
|
27765
27744
|
return n.prototype.render = function(t) {
|
|
27766
|
-
}, n.prototype.setSize = function(t, e) {
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
|
|
27770
|
-
|
|
27745
|
+
}, n.prototype.setSize = function(t, e, r) {
|
|
27746
|
+
var o = t * r, s = e * r;
|
|
27747
|
+
if (this.modelRenderTarget.width !== o || this.modelRenderTarget.height !== s) {
|
|
27748
|
+
this.modelRenderTarget.setSize(o, s), this.modelRenderTarget.depthTexture.dispose();
|
|
27749
|
+
var u = new THREE.DepthTexture(o, s);
|
|
27750
|
+
u.generateMipmaps = !1, u.format = THREE.DepthStencilFormat, u.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = u, this.modelRenderTarget.depthTexture.needsUpdate = !0;
|
|
27771
27751
|
}
|
|
27772
27752
|
}, n.prototype.dispose = function() {
|
|
27773
27753
|
this.screenBuffers.forEach(function(t) {
|
|
@@ -27786,7 +27766,6 @@ void main() {
|
|
|
27786
27766
|
return t.prototype.render = function(e) {
|
|
27787
27767
|
var r = this.renderer.getRenderTarget();
|
|
27788
27768
|
this.enableFragDepth ? (e && (this.renderer.setRenderTarget(this.modelRenderTarget), this.renderer.render(this.modelScene, this.camera)), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.renderer.setRenderTarget(r), this.renderer.render(this.modelScene, this.camera), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
|
|
27789
|
-
}, t.prototype.setSize = function(e, r) {
|
|
27790
27769
|
}, t;
|
|
27791
27770
|
}(BaseRenderer)
|
|
27792
27771
|
), Effect = (
|
|
@@ -27902,17 +27881,17 @@ var EDLEffect = (
|
|
|
27902
27881
|
__extends(t, n);
|
|
27903
27882
|
function t(e, r, o, s) {
|
|
27904
27883
|
var u = n.call(this, e, r, o, s) || this;
|
|
27905
|
-
return u.
|
|
27884
|
+
return u.renderer = e, u.material = new EDLMaterial(), mesh$1.material = u.material, u.material.needsUpdate = !0, u;
|
|
27906
27885
|
}
|
|
27907
27886
|
return t.prototype.render = function(e) {
|
|
27908
27887
|
this.modelScene.parameter.set("logDepthAlpha", 1), this.modelScene.update(this.renderer, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0, this.renderer.setRenderTarget(e[0]), this.renderer.render(this.scene, this.camera);
|
|
27909
|
-
var r = this.camera, o = this.material.uniforms
|
|
27910
|
-
o.uScreenWidth.value =
|
|
27911
|
-
var
|
|
27912
|
-
|
|
27913
|
-
for (var
|
|
27914
|
-
|
|
27915
|
-
o.uNeighbours.value =
|
|
27888
|
+
var r = this.camera, o = this.material.uniforms;
|
|
27889
|
+
o.uScreenWidth.value = this.camera.resolution.x, o.uScreenHeight.value = this.camera.resolution.y;
|
|
27890
|
+
var s = r.projectionMatrix, u = new Float32Array(16);
|
|
27891
|
+
u.set(s.elements);
|
|
27892
|
+
for (var l = new Float32Array(this.material.neighbourCount * 2), c = 0; c < this.material.neighbourCount; c++)
|
|
27893
|
+
l[2 * c + 0] = Math.cos(2 * c * Math.PI / this.material.neighbourCount), l[2 * c + 1] = Math.sin(2 * c * Math.PI / this.material.neighbourCount);
|
|
27894
|
+
o.uNeighbours.value = l, o.uNear.value = r.near, o.uFar.value = r.far, o.uEDLColor.value = e[0].texture, o.uProj.value = u, o.uEdlStrength.value = 0.05, o.uRadius.value = 1.5, this.renderer.setRenderTarget(e[1]), this.renderer.render(edlEffectScene, passCamera$1), this.modelScene.parameter.reset("logDepthAlpha"), this.modelScene.update(this.renderer, this.camera);
|
|
27916
27895
|
}, t.prototype.dispose = function() {
|
|
27917
27896
|
this.copyPass.dispose();
|
|
27918
27897
|
}, t;
|
|
@@ -27940,15 +27919,16 @@ var EDLEffect = (
|
|
|
27940
27919
|
return t.prototype.render = function(e) {
|
|
27941
27920
|
var r = this.renderer.getRenderTarget();
|
|
27942
27921
|
this.enableFragDepth ? (e && this.edlEffect.render(this.screenBuffers), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.edlEffect.render(this.screenBuffers), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
|
|
27943
|
-
}, t.prototype.setSize = function(e, r) {
|
|
27944
|
-
|
|
27945
|
-
|
|
27946
|
-
|
|
27947
|
-
|
|
27948
|
-
|
|
27949
|
-
|
|
27950
|
-
|
|
27951
|
-
|
|
27922
|
+
}, t.prototype.setSize = function(e, r, o) {
|
|
27923
|
+
var s = e * o, u = r * o;
|
|
27924
|
+
if (this.modelRenderTarget.width !== s || this.modelRenderTarget.height !== u) {
|
|
27925
|
+
this.modelRenderTarget.setSize(s, u), this.modelRenderTarget.depthTexture.dispose();
|
|
27926
|
+
var l = new THREE.DepthTexture(s, u);
|
|
27927
|
+
l.generateMipmaps = !1, l.format = THREE.DepthStencilFormat, l.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = l, this.modelRenderTarget.depthTexture.needsUpdate = !0;
|
|
27928
|
+
}
|
|
27929
|
+
for (var c = 0, d = this.screenBuffers; c < d.length; c++) {
|
|
27930
|
+
var f = d[c];
|
|
27931
|
+
f && f.setSize(s, u);
|
|
27952
27932
|
}
|
|
27953
27933
|
}, t.prototype.dispose = function() {
|
|
27954
27934
|
this.screenBuffers.forEach(function(e) {
|
|
@@ -28048,15 +28028,16 @@ var HQEffect = (
|
|
|
28048
28028
|
return t.prototype.render = function(e) {
|
|
28049
28029
|
var r = this.renderer.getRenderTarget();
|
|
28050
28030
|
this.enableFragDepth ? (e && this.hqEffect.render(this.screenBuffers), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.hqEffect.render(this.screenBuffers), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
|
|
28051
|
-
}, t.prototype.setSize = function(e, r) {
|
|
28052
|
-
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
|
|
28057
|
-
|
|
28058
|
-
|
|
28059
|
-
|
|
28031
|
+
}, t.prototype.setSize = function(e, r, o) {
|
|
28032
|
+
var s = e * o, u = r * o;
|
|
28033
|
+
if (this.modelRenderTarget.width !== s || this.modelRenderTarget.height !== u) {
|
|
28034
|
+
this.modelRenderTarget.setSize(s, u), this.modelRenderTarget.depthTexture.dispose();
|
|
28035
|
+
var l = new THREE.DepthTexture(s, u);
|
|
28036
|
+
l.generateMipmaps = !1, l.format = THREE.DepthStencilFormat, l.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = l, this.modelRenderTarget.depthTexture.needsUpdate = !0;
|
|
28037
|
+
}
|
|
28038
|
+
for (var c = 0, d = this.screenBuffers; c < d.length; c++) {
|
|
28039
|
+
var f = d[c];
|
|
28040
|
+
f && f.setSize(s, u);
|
|
28060
28041
|
}
|
|
28061
28042
|
}, t.prototype.dispose = function() {
|
|
28062
28043
|
this.screenBuffers.forEach(function(e) {
|
|
@@ -28269,7 +28250,6 @@ void main() {
|
|
|
28269
28250
|
return t.prototype.render = function(e) {
|
|
28270
28251
|
var r = this.renderer.getRenderTarget();
|
|
28271
28252
|
this.enableFragDepth ? (e && (this.luminanceAdaptiveEffect.enable = !0, this.luminanceAdaptiveEffect.render(this.screenBuffers)), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.luminanceAdaptiveEffect.enable = !0, this.luminanceAdaptiveEffect.render(this.screenBuffers), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0), this.modelScene.needsRender = !0;
|
|
28272
|
-
}, t.prototype.setSize = function(e, r) {
|
|
28273
28253
|
}, t;
|
|
28274
28254
|
}(BaseRenderer)
|
|
28275
28255
|
), DEFAULT_MODE_CHANGE_DURATION = 800, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST_PROXY = function(n) {
|
|
@@ -28367,7 +28347,7 @@ void main() {
|
|
|
28367
28347
|
}
|
|
28368
28348
|
return Object.defineProperty(t, "version", {
|
|
28369
28349
|
get: function() {
|
|
28370
|
-
return "6.5.0-alpha.
|
|
28350
|
+
return "6.5.0-alpha.14";
|
|
28371
28351
|
},
|
|
28372
28352
|
enumerable: !1,
|
|
28373
28353
|
configurable: !0
|
|
@@ -28597,17 +28577,17 @@ void main() {
|
|
|
28597
28577
|
}
|
|
28598
28578
|
else
|
|
28599
28579
|
E.push(parseWork(e));
|
|
28600
|
-
for (var T = createWorks(E), S = function(
|
|
28601
|
-
var
|
|
28602
|
-
allowHosts:
|
|
28580
|
+
for (var T = createWorks(E), S = function($) {
|
|
28581
|
+
var q = R, re = new Fetcher({
|
|
28582
|
+
allowHosts: $.allowHosts,
|
|
28603
28583
|
get requestProxy() {
|
|
28604
|
-
return
|
|
28584
|
+
return q.requestProxy;
|
|
28605
28585
|
},
|
|
28606
28586
|
get networkSubscribe() {
|
|
28607
|
-
return
|
|
28587
|
+
return q.networkSubscribe;
|
|
28608
28588
|
}
|
|
28609
28589
|
});
|
|
28610
|
-
registerFetcher(
|
|
28590
|
+
registerFetcher($, re);
|
|
28611
28591
|
}, R = this, C = 0, w = T; C < w.length; C++) {
|
|
28612
28592
|
var L = w[C];
|
|
28613
28593
|
S(L);
|
|
@@ -28666,8 +28646,8 @@ void main() {
|
|
|
28666
28646
|
offset: r.offset
|
|
28667
28647
|
};
|
|
28668
28648
|
}
|
|
28669
|
-
var N = __assign(__assign(__assign({}, P), { mode: B }), O), D = this.getCurrentState(),
|
|
28670
|
-
(B === "Floorplan" || B === "Topview" || B === "Mapview") && this.currentMode === B && (
|
|
28649
|
+
var N = __assign(__assign(__assign({}, P), { mode: B }), O), D = this.getCurrentState(), G = (p = m.duration) !== null && p !== void 0 ? p : this.modeChangeDuration;
|
|
28650
|
+
(B === "Floorplan" || B === "Topview" || B === "Mapview") && this.currentMode === B && (G = 0);
|
|
28671
28651
|
var K = "fly";
|
|
28672
28652
|
(B === "Panorama" || B === "VRPanorama" || B === "XRPanorama") && this.currentMode === B && (K = (g = m.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
|
|
28673
28653
|
input: e,
|
|
@@ -28675,85 +28655,85 @@ void main() {
|
|
|
28675
28655
|
state: N,
|
|
28676
28656
|
userAction: s
|
|
28677
28657
|
}));
|
|
28678
|
-
var
|
|
28658
|
+
var J = function() {
|
|
28679
28659
|
u.pano = P;
|
|
28680
|
-
var
|
|
28660
|
+
var $ = __assign(__assign({ initial: {
|
|
28681
28661
|
state: N,
|
|
28682
28662
|
currentState: D,
|
|
28683
|
-
duration:
|
|
28663
|
+
duration: G,
|
|
28684
28664
|
effect: K,
|
|
28685
28665
|
userAction: s
|
|
28686
|
-
} }, u.commonParams()), u.controllerInits[B]),
|
|
28666
|
+
} }, u.commonParams()), u.controllerInits[B]), q = Controllers[B].initAnimationEndState($);
|
|
28687
28667
|
if (u.controller && u.currentMode === B)
|
|
28688
|
-
u.controller.updateWork(T,
|
|
28668
|
+
u.controller.updateWork(T, q, { effect: K, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(B, $));
|
|
28689
28669
|
else {
|
|
28690
|
-
var
|
|
28670
|
+
var re = u.currentMode;
|
|
28691
28671
|
if (u.controller)
|
|
28692
28672
|
u.controller.destroy();
|
|
28693
28673
|
else {
|
|
28694
|
-
var
|
|
28695
|
-
u.camera.setFromPose(
|
|
28674
|
+
var Y = Controllers[B].initAnimationEndState($);
|
|
28675
|
+
u.camera.setFromPose(Y), u.emit("camera.update", createEvent("camera.update", {
|
|
28696
28676
|
state: u.getCurrentState(),
|
|
28697
28677
|
userAction: s
|
|
28698
28678
|
}));
|
|
28699
28679
|
}
|
|
28700
|
-
u.controller = u.applyController(B,
|
|
28680
|
+
u.controller = u.applyController(B, $);
|
|
28701
28681
|
var ee = createEvent("mode.change", {
|
|
28702
|
-
prevMode:
|
|
28682
|
+
prevMode: re,
|
|
28703
28683
|
mode: B,
|
|
28704
|
-
state:
|
|
28684
|
+
state: q,
|
|
28705
28685
|
userAction: s
|
|
28706
28686
|
});
|
|
28707
28687
|
try {
|
|
28708
28688
|
u.emit("mode.change", ee);
|
|
28709
|
-
} catch (
|
|
28710
|
-
console.error(
|
|
28689
|
+
} catch (ne) {
|
|
28690
|
+
console.error(ne);
|
|
28711
28691
|
}
|
|
28712
28692
|
}
|
|
28713
28693
|
u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
|
|
28714
28694
|
};
|
|
28715
28695
|
worksMap.set(this, T);
|
|
28716
|
-
var
|
|
28696
|
+
var Q = Promise.resolve();
|
|
28717
28697
|
if (B === t.Mode.Floorplan || B === t.Mode.Topview || B === t.Mode.Mapview || B === t.Mode.Model) {
|
|
28718
28698
|
this.modelScene.loaded === !1 && (this.camera.setFromPose(N), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = B);
|
|
28719
|
-
var
|
|
28720
|
-
|
|
28721
|
-
return
|
|
28699
|
+
var U = this.loadModels(T, m);
|
|
28700
|
+
Q = Promise.all(U.map(function($) {
|
|
28701
|
+
return $.loadedReady;
|
|
28722
28702
|
})).then(function() {
|
|
28723
|
-
u.needsRender = !0, u.modelSceneNeedsRender = !0,
|
|
28703
|
+
u.needsRender = !0, u.modelSceneNeedsRender = !0, J(), u.emit("camera.update", createEvent("camera.update", {
|
|
28724
28704
|
state: u.getCurrentState(),
|
|
28725
28705
|
userAction: s
|
|
28726
28706
|
}));
|
|
28727
28707
|
});
|
|
28728
28708
|
} else {
|
|
28729
|
-
|
|
28709
|
+
J();
|
|
28730
28710
|
var X = !1;
|
|
28731
28711
|
this.modelScene.autoRefine = !1;
|
|
28732
|
-
var
|
|
28712
|
+
var j = function() {
|
|
28733
28713
|
u.works === T && X === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
|
|
28734
28714
|
state: u.getCurrentState(),
|
|
28735
28715
|
userAction: s
|
|
28736
28716
|
})), X = !0, u.modelScene.autoRefine = !0);
|
|
28737
|
-
},
|
|
28738
|
-
|
|
28739
|
-
return
|
|
28740
|
-
})).then(noop$1), this.controller.once("pano.arrived",
|
|
28717
|
+
}, U = this.loadModels(T, m);
|
|
28718
|
+
Q = Promise.all(U.map(function(q) {
|
|
28719
|
+
return q.initReady;
|
|
28720
|
+
})).then(noop$1), this.controller.once("pano.arrived", j), this.controller.once("pano.cancel", j), setTimeout(j, ((A = m.duration) !== null && A !== void 0 ? A : this.modeChangeDuration) + 1e3);
|
|
28741
28721
|
}
|
|
28742
28722
|
return this.emit("works.load", createEvent("works.load", {
|
|
28743
28723
|
input: e,
|
|
28744
28724
|
state: this.getCurrentState(),
|
|
28745
28725
|
userAction: s,
|
|
28746
28726
|
works: T
|
|
28747
|
-
})),
|
|
28727
|
+
})), Q.then(function() {
|
|
28748
28728
|
return u.ready();
|
|
28749
28729
|
}).then(function() {
|
|
28750
|
-
var
|
|
28730
|
+
var $;
|
|
28751
28731
|
u.emit("works.ready", createEvent("works.ready", {
|
|
28752
28732
|
input: e,
|
|
28753
28733
|
state: u.getCurrentState(),
|
|
28754
28734
|
userAction: s,
|
|
28755
28735
|
works: T
|
|
28756
|
-
})), (
|
|
28736
|
+
})), ($ = u.analysis) === null || $ === void 0 || $.work(T);
|
|
28757
28737
|
});
|
|
28758
28738
|
}, t.prototype.reset = function() {
|
|
28759
28739
|
var e = this, r = this.loadWorkTask.then(function() {
|
|
@@ -28901,12 +28881,12 @@ void main() {
|
|
|
28901
28881
|
}), t.prototype.render = function(e) {
|
|
28902
28882
|
var r = this.renderer;
|
|
28903
28883
|
if (r) {
|
|
28904
|
-
var o = r.getRenderTarget(), s = r.autoClear, u = r.autoClearColor, l = r.autoClearDepth, c = r.autoClearStencil, d = scratchClearColor.copy(r.getClearColor()), f = r.getClearAlpha(), h = r.getViewport(scratchViewport), p = r.getScissor(scratchScissor), g = r.getScissorTest(), A = r.getSize(scratchRenderSize), m = Math.floor(A.x * this.viewport.left),
|
|
28905
|
-
r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(
|
|
28906
|
-
var
|
|
28907
|
-
this.modelScene.background = this.camera.isOrthographicCamera ? null :
|
|
28908
|
-
var
|
|
28909
|
-
|
|
28884
|
+
var o = r.getRenderTarget(), s = r.autoClear, u = r.autoClearColor, l = r.autoClearDepth, c = r.autoClearStencil, d = scratchClearColor.copy(r.getClearColor()), f = r.getClearAlpha(), h = r.getViewport(scratchViewport), p = r.getScissor(scratchScissor), g = r.getScissorTest(), A = r.getSize(scratchRenderSize), m = r.getPixelRatio(), E = Math.floor(A.x * this.viewport.left), v = Math.floor(A.y * this.viewport.bottom), y = Math.floor(A.x * this.viewport.width), b = Math.floor(A.y * this.viewport.height);
|
|
28885
|
+
r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(E, v, y, b), r.setScissor(E, v, y, b), r.setScissorTest(!0);
|
|
28886
|
+
var T = this.scene.background;
|
|
28887
|
+
this.modelScene.background = this.camera.isOrthographicCamera ? null : T, this.modelScene.environment = this.scene.environment, this.scene.background = null;
|
|
28888
|
+
var S = this.getBuiltinRenderer(r);
|
|
28889
|
+
S.setSize(A.x, A.y, m), this.controller ? this.controller.render(S, this.onlyRenderIfNeeds ? this.modelSceneNeedsRender : !0) : S.render(this.onlyRenderIfNeeds ? this.modelSceneNeedsRender : !0), this.scene.background = T, this.modelScene.background = null, this.modelScene.environment = null, this.poweredByRealsee && this.currentMode !== "VRPanorama" && this.currentMode !== "XRPanorama" && r.getRenderTarget() !== this.getPixelsRenderTarget && renderPoweredByRealsee(r), r.setRenderTarget(o), r.autoClear = s, r.autoClearColor = u, r.autoClearDepth = l, r.autoClearStencil = c, r.setClearColor(d, f), r.setViewport(h), r.setScissor(p), r.setScissorTest(g), e && AnimationFrameLoop.shared.add(e, !0);
|
|
28910
28890
|
}
|
|
28911
28891
|
}, t.prototype.updateTime = function(e, r) {
|
|
28912
28892
|
for (var o, s = this, u = [], l = 2; l < arguments.length; l++)
|