@realsee/five 6.3.0-alpha.3 → 6.3.0-alpha.4

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/five/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 11/8/2024
5
- * Version: 6.3.0-alpha.3
4
+ * Generated: 11/11/2024
5
+ * Version: 6.3.0-alpha.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -5466,7 +5466,7 @@ var Wi = {
5466
5466
  e.vertexShader = e.vertexShader.replace(/NUM_CLIPPERS/g, o), e.fragmentShader = e.fragmentShader.replace(/NUM_CLIPPERS/g, o);
5467
5467
  }, t.prototype.refreshUniforms = function(e) {
5468
5468
  var r, i, a = this.uniforms;
5469
- a.diffuse && a.diffuse.value.copy(this.color), a.opacity && (a.opacity.value = this.opacity), a.color && a.diffuse.value.copy(this.color), a.emissive && a.emissive.value.copy(this.emissive).multiplyScalar(this.emissiveIntensity), a.map && (a.map.value = this.map), a.alphaMap && (a.alphaMap.value = this.alphaMap), a.specularMap && (a.specularMap.value = this.specularMap), a.envMap && (a.envMap.value = this.envMap, a.flipEnvMap.value = !((r = this.envMap) === null || r === void 0) && r.isCubeTexture ? -1 : 1, a.reflectivity.value = this.reflectivity, a.refractionRatio.value = this.refractionRatio, a.maxMipLevel.value = this.envMap && (i = e.properties.get(this.envMap).__maxMipLevel) !== null && i !== void 0 ? i : 0), a.lightMap && (a.lightMap.value = this.lightMap, a.lightMapIntensity.value = this.lightMapIntensity), a.aoMap && (a.aoMap.value = this.aoMap, a.aoMapIntensity.value = this.aoMapIntensity), a.specular && a.specular.value.copy(this.specular), a.shininess && (a.shininess.value = Math.max(this.shininess, 1e-4)), a.emissiveMap && (a.emissiveMap.value = this.emissiveMap), a.bumpMap && (a.bumpMap.value = this.bumpMap, a.bumpScale.value = this.bumpScale, this.side === d.BackSide && (a.bumpScale.value *= -1)), a.normalMap && (a.normalMap.value = this.normalMap, a.normalScale.value.copy(this.normalScale), this.side === d.BackSide && a.normalScale.value.negate()), a.displacementMap && (a.displacementMap.value = this.displacementMap, a.displacementScale.value = this.displacementScale, a.displacementBias.value = this.displacementBias);
5469
+ a.diffuse && a.diffuse.value.copy(this.color), a.opacity && (a.opacity.value = this.opacity), a.color && a.diffuse.value.copy(this.color), a.emissive && a.emissive.value.copy(this.emissive).multiplyScalar(this.emissiveIntensity), a.map && (a.map.value = this.map), a.alphaMap && (a.alphaMap.value = this.alphaMap), a.specularMap && (a.specularMap.value = this.specularMap), a.envMap && (a.envMap.value = this.envMap, a.flipEnvMap.value = !((r = this.envMap) === null || r === void 0) && r.isCubeTexture ? -1 : 1, a.reflectivity.value = this.reflectivity, a.refractionRatio.value = this.refractionRatio, a.maxMipLevel.value = this.envMap && (i = e == null ? void 0 : e.properties.get(this.envMap).__maxMipLevel) !== null && i !== void 0 ? i : 0), a.lightMap && (a.lightMap.value = this.lightMap, a.lightMapIntensity.value = this.lightMapIntensity), a.aoMap && (a.aoMap.value = this.aoMap, a.aoMapIntensity.value = this.aoMapIntensity), a.specular && a.specular.value.copy(this.specular), a.shininess && (a.shininess.value = Math.max(this.shininess, 1e-4)), a.emissiveMap && (a.emissiveMap.value = this.emissiveMap), a.bumpMap && (a.bumpMap.value = this.bumpMap, a.bumpScale.value = this.bumpScale, this.side === d.BackSide && (a.bumpScale.value *= -1)), a.normalMap && (a.normalMap.value = this.normalMap, a.normalScale.value.copy(this.normalScale), this.side === d.BackSide && a.normalScale.value.negate()), a.displacementMap && (a.displacementMap.value = this.displacementMap, a.displacementScale.value = this.displacementScale, a.displacementBias.value = this.displacementBias);
5470
5470
  var o;
5471
5471
  this.map ? o = this.map : this.specularMap ? o = this.specularMap : this.displacementMap ? o = this.displacementMap : this.normalMap ? o = this.normalMap : this.bumpMap ? o = this.bumpMap : this.alphaMap ? o = this.alphaMap : this.emissiveMap && (o = this.emissiveMap), o !== void 0 && (o.matrixAutoUpdate === !0 && o.updateMatrix(), a.uvTransform.value.copy(o.matrix));
5472
5472
  var s;
@@ -5748,12 +5748,12 @@ var rd = Object.assign({
5748
5748
  var V = L.points, U = L.depth, q = !1;
5749
5749
  if (V.length !== 0 && V.length % 4 === 0) {
5750
5750
  q = !0;
5751
- var N = V[0], H = V[1], J = V[2], j = V[3], _ = new d.Vector3().subVectors(H, N), Z = new d.Vector3().subVectors(J, N), W = new d.Vector3().crossVectors(_, Z).normalize(), ee = -W.dot(N), Y = U, ne = N.clone().add(W.clone().negate().multiplyScalar(Y)), te = N.clone().add(W.clone().multiplyScalar(Y)), ue = H.clone().add(W.clone().negate().multiplyScalar(Y)), ae = H.clone().add(W.clone().multiplyScalar(Y)), ye = J.clone().add(W.clone().negate().multiplyScalar(Y)), fe = J.clone().add(W.clone().multiplyScalar(Y)), Ae = j.clone().add(W.clone().negate().multiplyScalar(Y)), Pe = j.clone().add(W.clone().multiplyScalar(Y)), we = new d.Plane().setFromCoplanarPoints(te, ae, fe), Me = new d.Plane().setFromCoplanarPoints(ye, ue, ne), re = new d.Plane().setFromCoplanarPoints(ae, te, ne), ie = new d.Plane().setFromCoplanarPoints(Ae, Pe, fe), G = new d.Plane().setFromCoplanarPoints(fe, ae, ue), Fe = new d.Plane().setFromCoplanarPoints(ne, te, Pe);
5751
+ var N = V[0], H = V[1], J = V[2], j = V[3], _ = new d.Vector3().subVectors(H, N), Z = new d.Vector3().subVectors(J, N), W = new d.Vector3().crossVectors(_, Z).normalize(), ee = -W.dot(N), Y = U, ne = N.clone().add(W.clone().negate().multiplyScalar(Y)), te = N.clone().add(W.clone().multiplyScalar(Y)), ue = H.clone().add(W.clone().negate().multiplyScalar(Y)), ie = H.clone().add(W.clone().multiplyScalar(Y)), ye = J.clone().add(W.clone().negate().multiplyScalar(Y)), fe = J.clone().add(W.clone().multiplyScalar(Y)), Ae = j.clone().add(W.clone().negate().multiplyScalar(Y)), Pe = j.clone().add(W.clone().multiplyScalar(Y)), we = new d.Plane().setFromCoplanarPoints(te, ie, fe), Me = new d.Plane().setFromCoplanarPoints(ye, ue, ne), re = new d.Plane().setFromCoplanarPoints(ie, te, ne), ae = new d.Plane().setFromCoplanarPoints(Ae, Pe, fe), G = new d.Plane().setFromCoplanarPoints(fe, ie, ue), Fe = new d.Plane().setFromCoplanarPoints(ne, te, Pe);
5752
5752
  this.uniforms.evennessPlanes.value = [
5753
5753
  { normal: we.normal, constant: we.constant },
5754
5754
  { normal: Me.normal, constant: Me.constant },
5755
5755
  { normal: re.normal, constant: re.constant },
5756
- { normal: ie.normal, constant: ie.constant },
5756
+ { normal: ae.normal, constant: ae.constant },
5757
5757
  { normal: G.normal, constant: G.constant },
5758
5758
  { normal: Fe.normal, constant: Fe.constant }
5759
5759
  ], this.uniforms.evennessPoints.value = L, this.uniforms.evennessPlaneDepth.value = U, this.uniforms.evennessPlaneNormal.value = W, this.uniforms.evennessPlaneD.value = ee;
@@ -7098,14 +7098,14 @@ var un = (
7098
7098
  }, t.prototype.intersectRay = function(e, r, i, a) {
7099
7099
  for (var o = this.offsetArray, s = this.rootNodePacked, l = new Float32Array(s), u = new Uint32Array(s), c = new Uint16Array(s), f = new un(1 / r.x, 1 / r.y, 1 / r.z), v = [0], m, h, p, g; (m = v.pop()) !== void 0; )
7100
7100
  if (g = m * wr / 4, Os(e, f, l[g], l[g + 1], l[g + 2], l[g + 3], l[g + 4], l[g + 5])) {
7101
- for (var A = u[g + 6], y = u[g + 7], x = void 0, b = void 0, w = void 0, E = e.x, S = e.y, M = e.z, R = r.x, O = r.y, C = r.z, P = void 0, z = void 0, T = void 0, k = void 0, L = void 0, V = void 0, U = void 0, q = void 0, N = void 0, H = void 0, J = void 0, j = void 0, _ = void 0, Z = void 0, W = void 0, ee = void 0, Y = void 0, ne = void 0, te = void 0, ue = void 0, ae = void 0, ye = void 0, fe = void 0, Ae = void 0, Pe = void 0, we = void 0, Me = void 0; A < y; A++) {
7101
+ for (var A = u[g + 6], y = u[g + 7], x = void 0, b = void 0, w = void 0, E = e.x, S = e.y, M = e.z, R = r.x, O = r.y, C = r.z, P = void 0, z = void 0, T = void 0, k = void 0, L = void 0, V = void 0, U = void 0, q = void 0, N = void 0, H = void 0, J = void 0, j = void 0, _ = void 0, Z = void 0, W = void 0, ee = void 0, Y = void 0, ne = void 0, te = void 0, ue = void 0, ie = void 0, ye = void 0, fe = void 0, Ae = void 0, Pe = void 0, we = void 0, Me = void 0; A < y; A++) {
7102
7102
  if (x = o[A], b = x * 3, this.getPositionByIndex(b, qe), P = qe.x, z = qe.y, T = qe.z, this.getPositionByIndex(b + 1, qe), k = qe.x, L = qe.y, V = qe.z, this.getPositionByIndex(b + 2, qe), U = qe.x, q = qe.y, N = qe.z, H = k - P, J = L - z, j = V - T, _ = U - P, Z = q - z, W = N - T, ee = J * W - j * Z, Y = j * _ - H * W, ne = H * Z - J * _, fe = R * ee + O * Y + C * ne, fe > 0)
7103
7103
  ye = 1;
7104
7104
  else if (fe < 0)
7105
7105
  ye = -1, fe = -fe;
7106
7106
  else
7107
7107
  continue;
7108
- te = E - P, ue = S - z, ae = M - T, Ae = ye * (R * (ue * W - ae * Z) + O * (ae * _ - te * W) + C * (te * Z - ue * _)), !(Ae < 0) && (Pe = ye * (R * (J * ae - j * ue) + O * (j * te - H * ae) + C * (H * ue - J * te)), !(Pe < 0) && (Ae + Pe > fe || (we = -ye * (te * ee + ue * Y + ae * ne), !(we < 0) && (Me = we / fe, a.push(new zs([P, z, T, k, L, V, U, q, N], [E + R * Me, S + O * Me, M + C * Me], x))))));
7108
+ te = E - P, ue = S - z, ie = M - T, Ae = ye * (R * (ue * W - ie * Z) + O * (ie * _ - te * W) + C * (te * Z - ue * _)), !(Ae < 0) && (Pe = ye * (R * (J * ie - j * ue) + O * (j * te - H * ie) + C * (H * ue - J * te)), !(Pe < 0) && (Ae + Pe > fe || (we = -ye * (te * ee + ue * Y + ie * ne), !(we < 0) && (Me = we / fe, a.push(new zs([P, z, T, k, L, V, U, q, N], [E + R * Me, S + O * Me, M + C * Me], x))))));
7109
7109
  }
7110
7110
  g = m * wr / 2, h = c[g + 16], p = c[g + 17], h && v.push(h), p && v.push(p);
7111
7111
  }
@@ -7929,12 +7929,12 @@ var ef = (
7929
7929
  }) : Y.push(W);
7930
7930
  var ne = J.array;
7931
7931
  if (J.normalized) {
7932
- for (var te = ia(ne.constructor), ue = new Float32Array(ne.length), ae = 0, ye = ne.length; ae < ye; ae++)
7933
- ue[ae] = ne[ae] * te;
7932
+ for (var te = ia(ne.constructor), ue = new Float32Array(ne.length), ie = 0, ye = ne.length; ie < ye; ie++)
7933
+ ue[ie] = ne[ie] * te;
7934
7934
  ne = ue;
7935
7935
  }
7936
- for (var ae = 0, ye = Y.length; ae < ye; ae++) {
7937
- var fe = new Z(Y[ae] + "." + Vr[_.path], H.array, ne, ee);
7936
+ for (var ie = 0, ye = Y.length; ie < ye; ie++) {
7937
+ var fe = new Z(Y[ie] + "." + Vr[_.path], H.array, ne, ee);
7938
7938
  z.push(fe);
7939
7939
  }
7940
7940
  }, k = 0, L = M.length; k < L; k++)
@@ -9604,7 +9604,7 @@ var fr = (
9604
9604
  a.normalScale.set(u, u);
9605
9605
  }
9606
9606
  }
9607
- return r.disposeSet.add(a), Promise.all(i).then(function() {
9607
+ return r.disposeSet.add(a), a.refreshUniforms(), Promise.all(i).then(function() {
9608
9608
  return a;
9609
9609
  });
9610
9610
  }, t;
@@ -10542,9 +10542,9 @@ function Uf(n) {
10542
10542
  Y += f.vertices.xyz.length / 3, w += f.faces.indices.length;
10543
10543
  }
10544
10544
  for (var S = new Float32Array(Y * 3), M = new Float32Array(Y * 2), R = void 0, ne = new Float32Array(Y), te = new Uint32Array(w), O = l ? new Float32Array(w) : void 0, C = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], ue = 0, z = 0, T = 0; T < b.length; T++) {
10545
- for (var k = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], f = b[T], L = f.vertices.xyz, ae = f.vertices.marks, V = f.vertices.uvs, U = f.faces.indices, ye = L.length / 3, H = U.length, E = 0; E < ye; E++) {
10545
+ for (var k = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], f = b[T], L = f.vertices.xyz, ie = f.vertices.marks, V = f.vertices.uvs, U = f.faces.indices, ye = L.length / 3, H = U.length, E = 0; E < ye; E++) {
10546
10546
  var j = S[z * 3 + E * 3] = L[E * 3], _ = S[z * 3 + E * 3 + 1] = L[E * 3 + 1], Z = S[z * 3 + E * 3 + 2] = L[E * 3 + 2];
10547
- O && (O[z + E] = ae[E]), M[z * 2 + E * 2] = V[E * 2], M[z * 2 + E * 2 + 1] = V[E * 2 + 1], ne[z + E] = x, j < k[0] && (k[0] = j), _ < k[1] && (k[1] = _), Z < k[2] && (k[2] = Z), j > k[3] && (k[3] = j), _ > k[4] && (k[4] = _), Z > k[5] && (k[5] = Z);
10547
+ O && (O[z + E] = ie[E]), M[z * 2 + E * 2] = V[E * 2], M[z * 2 + E * 2 + 1] = V[E * 2 + 1], ne[z + E] = x, j < k[0] && (k[0] = j), _ < k[1] && (k[1] = _), Z < k[2] && (k[2] = Z), j > k[3] && (k[3] = j), _ > k[4] && (k[4] = _), Z > k[5] && (k[5] = Z);
10548
10548
  }
10549
10549
  k[0] < P[0] && (P[0] = k[0]), k[1] < P[1] && (P[1] = k[1]), k[2] < P[2] && (P[2] = k[2]), k[3] > P[3] && (P[3] = k[3]), k[4] > P[4] && (P[4] = k[4]), k[5] > P[5] && (P[5] = k[5]);
10550
10550
  for (var E = 0; E < H; E++)
@@ -10607,7 +10607,7 @@ function iu(n, t, e, r, i, a) {
10607
10607
  f.add(O);
10608
10608
  for (var T = [], k = 0, L = S; k < L.length; k++) {
10609
10609
  var z = L[k], V = e[z.chunkName] || (z.texture ? vt(t || "", z.texture) : void 0), U = new $n("basic");
10610
- U.floor = E, O.attributes.normal === void 0 && (U.flatShading = !0), O.attributes.mask && (U.defines.USE_VERTEX_MARK = !0), T.push(U), V ? c[V] ? c[V].push(U) : c[V] = [U] : U.color = new d.Color(16777215), f.add(U);
10610
+ U.floor = E, O.attributes.normal === void 0 && (U.flatShading = !0), O.attributes.mask && (U.defines.USE_VERTEX_MARK = !0), T.push(U), V ? c[V] ? c[V].push(U) : c[V] = [U] : U.color = new d.Color(16777215), f.add(U), U.refreshUniforms();
10611
10611
  }
10612
10612
  var q = new Yt(O, T);
10613
10613
  q.name = "model_floor_" + E, q.userData.createAt = p, q.userData.description = g, q.matrix.compose(q.position, q.quaternion, q.scale), q.matrixAutoUpdate = !1, q.frustumCulled = !1, s = p, l = g, u.push(q);
@@ -10618,14 +10618,14 @@ function iu(n, t, e, r, i, a) {
10618
10618
  var Y = null;
10619
10619
  ee in i && (Y = i[ee]), Y || (Y = co(ee, H, a)), J.push(Y.then(function(ne) {
10620
10620
  for (var te = 0, ue = c[ee]; te < ue.length; te++) {
10621
- var ae = ue[te];
10622
- ae.map && (f.delete(ae.map), ae.map.dispose()), ae.map = ne, f.add(ne);
10621
+ var ie = ue[te];
10622
+ ie.map && (f.delete(ie.map), ie.map.dispose()), ie.map = ne, ie.refreshUniforms(), f.add(ne);
10623
10623
  }
10624
10624
  return ne;
10625
10625
  }).catch(function() {
10626
10626
  for (var ne = 0, te = c[ee]; ne < te.length; ne++) {
10627
10627
  var ue = te[ne];
10628
- ue.map && (f.delete(ue.map), ue.map.dispose()), ue.map = null, ue.color = new d.Color(16777215);
10628
+ ue.map && (f.delete(ue.map), ue.map.dispose()), ue.map = null, ue.color = new d.Color(16777215), ue.refreshUniforms();
10629
10629
  }
10630
10630
  return null;
10631
10631
  }));
@@ -11222,7 +11222,7 @@ function _f(n, t, e, r, i, a, o, s) {
11222
11222
  var h = n.d;
11223
11223
  h > 0 && h < 1 && (u.opacity = h);
11224
11224
  }
11225
- return u.floor = 0, {
11225
+ return u.floor = 0, u.refreshUniforms(), {
11226
11226
  material: u,
11227
11227
  textureReady: Promise.all(l).then(Q)
11228
11228
  };
@@ -12795,8 +12795,8 @@ function Mh(n, t, e) {
12795
12795
  return C;
12796
12796
  Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = S.map(function(re) {
12797
12797
  return JSON.parse(re);
12798
- }).reduce(function(re, ie) {
12799
- return Ua(re, ie);
12798
+ }).reduce(function(re, ae) {
12799
+ return Ua(re, ae);
12800
12800
  }), Object.defineProperty(e, "raw", {
12801
12801
  configurable: !1,
12802
12802
  get: function() {
@@ -12864,11 +12864,11 @@ function Mh(n, t, e) {
12864
12864
  });
12865
12865
  var U;
12866
12866
  Array.isArray(n.model.textures) ? (U = n.model.textures.map(function(re) {
12867
- var ie, G;
12868
- return ui(T, re, (G = (ie = n.model.textureBase) !== null && ie !== void 0 ? ie : n.model.material_base_url) !== null && G !== void 0 ? G : "", t);
12867
+ var ae, G;
12868
+ return ui(T, re, (G = (ae = n.model.textureBase) !== null && ae !== void 0 ? ae : n.model.material_base_url) !== null && G !== void 0 ? G : "", t);
12869
12869
  }), Object.freeze(U)) : Array.isArray(n.model.material_textures) && (U = n.model.material_textures.map(function(re) {
12870
- var ie, G;
12871
- return ui(T, re, (G = (ie = n.model.textureBase) !== null && ie !== void 0 ? ie : n.model.material_base_url) !== null && G !== void 0 ? G : "", t);
12870
+ var ae, G;
12871
+ return ui(T, re, (G = (ae = n.model.textureBase) !== null && ae !== void 0 ? ae : n.model.material_base_url) !== null && G !== void 0 ? G : "", t);
12872
12872
  }), Object.freeze(U)), Object.defineProperty(k, "textures", {
12873
12873
  configurable: !1,
12874
12874
  get: function() {
@@ -12925,7 +12925,7 @@ function Mh(n, t, e) {
12925
12925
  var ne = [];
12926
12926
  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));
12927
12927
  for (var te = function(re) {
12928
- var ie = {}, G = n.observers[re];
12928
+ var ae = {}, G = n.observers[re];
12929
12929
  if (!G)
12930
12930
  return "break";
12931
12931
  var Fe = ne[re];
@@ -12935,17 +12935,17 @@ function Mh(n, t, e) {
12935
12935
  // 处理 active
12936
12936
  // observer.active | panorama.active 有一个 false 则为 false
12937
12937
  active: G.active !== !1 && Fe.active !== !1
12938
- }), Object.defineProperty(ie, "work", {
12938
+ }), Object.defineProperty(ae, "work", {
12939
12939
  configurable: !1,
12940
12940
  get: function() {
12941
12941
  return e;
12942
12942
  }
12943
- }), Object.defineProperty(ie, "index", {
12943
+ }), Object.defineProperty(ae, "index", {
12944
12944
  configurable: !1,
12945
12945
  get: function() {
12946
12946
  return re;
12947
12947
  }
12948
- }), ee.add(re), Object.defineProperty(ie, "panoIndex", {
12948
+ }), ee.add(re), Object.defineProperty(ae, "panoIndex", {
12949
12949
  configurable: !1,
12950
12950
  get: function() {
12951
12951
  return re;
@@ -12955,7 +12955,7 @@ function Mh(n, t, e) {
12955
12955
  workCode: e.workCode,
12956
12956
  panoIndex: re
12957
12957
  });
12958
- W.add(ke), Object.defineProperty(ie, "panoId", {
12958
+ W.add(ke), Object.defineProperty(ae, "panoId", {
12959
12959
  configurable: !1,
12960
12960
  get: function() {
12961
12961
  return ke;
@@ -12965,35 +12965,35 @@ function Mh(n, t, e) {
12965
12965
  workCode: e.workCode,
12966
12966
  panoIndex: re
12967
12967
  });
12968
- Object.defineProperty(ie, "pano", {
12968
+ Object.defineProperty(ae, "pano", {
12969
12969
  configurable: !1,
12970
12970
  get: function() {
12971
12971
  return Te;
12972
12972
  }
12973
12973
  });
12974
12974
  var Ge = G.active !== !1;
12975
- Object.defineProperty(ie, "active", {
12975
+ Object.defineProperty(ae, "active", {
12976
12976
  configurable: !1,
12977
12977
  get: function() {
12978
12978
  return Ge;
12979
12979
  }
12980
12980
  });
12981
12981
  var be = G.loadable === !0;
12982
- Object.defineProperty(ie, "loadable", {
12982
+ Object.defineProperty(ae, "loadable", {
12983
12983
  configurable: !1,
12984
12984
  get: function() {
12985
12985
  return be;
12986
12986
  }
12987
12987
  });
12988
12988
  var ve = G.derived_id;
12989
- Object.defineProperty(ie, "derivedId", {
12989
+ Object.defineProperty(ae, "derivedId", {
12990
12990
  configurable: !1,
12991
12991
  get: function() {
12992
12992
  return ve;
12993
12993
  }
12994
12994
  });
12995
12995
  var xe = G.derived_id_str;
12996
- Object.defineProperty(ie, "derivedIdStr", {
12996
+ Object.defineProperty(ae, "derivedIdStr", {
12997
12997
  configurable: !1,
12998
12998
  get: function() {
12999
12999
  return xe;
@@ -13084,7 +13084,7 @@ function Mh(n, t, e) {
13084
13084
  }
13085
13085
  });
13086
13086
  }
13087
- Object.freeze(me), Object.defineProperty(ie, "images", {
13087
+ Object.freeze(me), Object.defineProperty(ae, "images", {
13088
13088
  configurable: !1,
13089
13089
  get: function() {
13090
13090
  return me;
@@ -13097,7 +13097,7 @@ function Mh(n, t, e) {
13097
13097
  vr.fromArray(G.position);
13098
13098
  else
13099
13099
  return "break";
13100
- Object.freeze(vr), Object.defineProperty(ie, "position", {
13100
+ Object.freeze(vr), Object.defineProperty(ae, "position", {
13101
13101
  configurable: !1,
13102
13102
  get: function() {
13103
13103
  return vr;
@@ -13114,7 +13114,7 @@ function Mh(n, t, e) {
13114
13114
  Ut.fromArray(G.standing_position);
13115
13115
  else
13116
13116
  return "break";
13117
- Object.freeze(Ut), Object.defineProperty(ie, "standingPosition", {
13117
+ Object.freeze(Ut), Object.defineProperty(ae, "standingPosition", {
13118
13118
  configurable: !1,
13119
13119
  get: function() {
13120
13120
  return Ut;
@@ -13130,49 +13130,49 @@ function Mh(n, t, e) {
13130
13130
  St.set(Mr, cn, _r, Wr);
13131
13131
  } else
13132
13132
  return "break";
13133
- Object.freeze(St), Object.defineProperty(ie, "quaternion", {
13133
+ Object.freeze(St), Object.defineProperty(ae, "quaternion", {
13134
13134
  configurable: !1,
13135
13135
  get: function() {
13136
13136
  return St;
13137
13137
  }
13138
13138
  });
13139
13139
  var Gt = 0;
13140
- jt(G.floorIndex) ? Gt = G.floorIndex : jt(G.floor_index) ? Gt = G.floor_index : jt(G.floor) && (Gt = G.floor), Object.defineProperty(ie, "floorIndex", {
13140
+ jt(G.floorIndex) ? Gt = G.floorIndex : jt(G.floor_index) ? Gt = G.floor_index : jt(G.floor) && (Gt = G.floor), Object.defineProperty(ae, "floorIndex", {
13141
13141
  configurable: !1,
13142
13142
  get: function() {
13143
13143
  return Gt;
13144
13144
  }
13145
13145
  });
13146
13146
  var Ye;
13147
- G.video && (Ye = {}, typeof G.video.source == "string" && (Ye.source = G.video.source), G.video.matrix instanceof d.Matrix4 ? Ye.matrix = G.video.matrix.clone() : Array.isArray(G.video.matrix) && (Ye.matrix = new d.Matrix4().fromArray(G.video.matrix)), G.video.size instanceof d.Vector2 ? Ye.size = G.video.size.clone() : Array.isArray(G.video.size) && (Ye.size = new d.Vector2().fromArray(G.video.size)), Ye.source && Ye.matrix && Ye.size && (ie.video = Ye)), Object.freeze(Ye), Object.defineProperty(ie, "video", {
13147
+ G.video && (Ye = {}, typeof G.video.source == "string" && (Ye.source = G.video.source), G.video.matrix instanceof d.Matrix4 ? Ye.matrix = G.video.matrix.clone() : Array.isArray(G.video.matrix) && (Ye.matrix = new d.Matrix4().fromArray(G.video.matrix)), G.video.size instanceof d.Vector2 ? Ye.size = G.video.size.clone() : Array.isArray(G.video.size) && (Ye.size = new d.Vector2().fromArray(G.video.size)), Ye.source && Ye.matrix && Ye.size && (ae.video = Ye)), Object.freeze(Ye), Object.defineProperty(ae, "video", {
13148
13148
  configurable: !1,
13149
13149
  get: function() {
13150
13150
  return Ye;
13151
13151
  }
13152
- }), Array.isArray(G.accessibleNodes) ? (ie.accessibleNodes = G.accessibleNodes.slice(), ie.accessibleIds = G.accessibleNodes.map(function(He) {
13152
+ }), Array.isArray(G.accessibleNodes) ? (ae.accessibleNodes = G.accessibleNodes.slice(), ae.accessibleIds = G.accessibleNodes.map(function(He) {
13153
13153
  return De({
13154
13154
  workCode: e.workCode,
13155
13155
  panoIndex: He
13156
13156
  });
13157
- })) : Array.isArray(G.accessible_nodes) && (ie.accessibleNodes = G.accessible_nodes.slice(), ie.accessibleIds = G.accessible_nodes.map(function(He) {
13157
+ })) : Array.isArray(G.accessible_nodes) && (ae.accessibleNodes = G.accessible_nodes.slice(), ae.accessibleIds = G.accessible_nodes.map(function(He) {
13158
13158
  return De({
13159
13159
  workCode: e.workCode,
13160
13160
  panoIndex: He
13161
13161
  });
13162
- })), Array.isArray(G.visibleNodes) ? (ie.visibleNodes = G.visibleNodes.slice(), ie.visibleIds = G.visibleNodes.map(function(He) {
13162
+ })), Array.isArray(G.visibleNodes) ? (ae.visibleNodes = G.visibleNodes.slice(), ae.visibleIds = G.visibleNodes.map(function(He) {
13163
13163
  return De({
13164
13164
  workCode: e.workCode,
13165
13165
  panoIndex: He
13166
13166
  });
13167
- })) : Array.isArray(G.visible_nodes) && (ie.visibleNodes = G.visible_nodes.slice(), ie.visibleIds = G.visible_nodes.map(function(He) {
13167
+ })) : Array.isArray(G.visible_nodes) && (ae.visibleNodes = G.visible_nodes.slice(), ae.visibleIds = G.visible_nodes.map(function(He) {
13168
13168
  return De({
13169
13169
  workCode: e.workCode,
13170
13170
  panoIndex: He
13171
13171
  });
13172
- })), Y[re] = ie;
13172
+ })), Y[re] = ae;
13173
13173
  }, ue = 0; ue < n.observers.length; ue++) {
13174
- var ae = te(ue);
13175
- if (ae === "break")
13174
+ var ie = te(ue);
13175
+ if (ie === "break")
13176
13176
  break;
13177
13177
  }
13178
13178
  }
@@ -13188,12 +13188,12 @@ function Mh(n, t, e) {
13188
13188
  }
13189
13189
  });
13190
13190
  } else {
13191
- for (var ie = [], G = 0; G < Y.length; G++)
13192
- Y[G] !== re && (Math.abs(Y[G].position.y - re.position.y) > 3 || Y[G].position.distanceTo(re.position) > 10 || ie.push(Y[G].panoId));
13193
- Object.freeze(ie), Object.defineProperty(re, "accessibleIds", {
13191
+ for (var ae = [], G = 0; G < Y.length; G++)
13192
+ Y[G] !== re && (Math.abs(Y[G].position.y - re.position.y) > 3 || Y[G].position.distanceTo(re.position) > 10 || ae.push(Y[G].panoId));
13193
+ Object.freeze(ae), Object.defineProperty(re, "accessibleIds", {
13194
13194
  configurable: !1,
13195
13195
  get: function() {
13196
- return ie;
13196
+ return ae;
13197
13197
  }
13198
13198
  });
13199
13199
  }
@@ -13274,8 +13274,8 @@ function Mh(n, t, e) {
13274
13274
  jt(n.initial.panoIndex) ? we = n.initial.panoIndex : jt(n.initial.pano_index) ? we = n.initial.pano_index : jt(n.initial.pano) && (we = n.initial.pano), typeof we == "number" && (we = he(we, 0, e.observers.length - 1), e.initial.panoIndex = we);
13275
13275
  }
13276
13276
  if (jt(n.initial.distance) && (e.initial.distance = n.initial.distance), Array.isArray(n.initial.offset)) {
13277
- var Me = [0, 0, 0].map(function(re, ie) {
13278
- var G = Number(n.initial.offset[ie]);
13277
+ var Me = [0, 0, 0].map(function(re, ae) {
13278
+ var G = Number(n.initial.offset[ae]);
13279
13279
  return isNaN(G) || !isFinite(G) ? 0 : G;
13280
13280
  });
13281
13281
  e.initial.offset = new d.Vector3().fromArray(Me);
@@ -13387,8 +13387,8 @@ var P0 = {
13387
13387
  var v = new d.Vector3(), m = new d.Vector3(), h = new d.Vector3(), p = new d.Vector2(), g = new d.Vector2(), A = new d.Vector2(), y = new d.Vector3(), x = new d.Vector3();
13388
13388
  function b(N, H, J) {
13389
13389
  v.fromArray(i, N * 3), m.fromArray(i, H * 3), h.fromArray(i, J * 3), p.fromArray(o, N * 2), g.fromArray(o, H * 2), A.fromArray(o, J * 2);
13390
- var j = m.x - v.x, _ = h.x - v.x, Z = m.y - v.y, W = h.y - v.y, ee = m.z - v.z, Y = h.z - v.z, ne = g.x - p.x, te = A.x - p.x, ue = g.y - p.y, ae = A.y - p.y, ye = 1 / (ne * ae - te * ue);
13391
- y.set((ae * j - ue * _) * ye, (ae * Z - ue * W) * ye, (ae * ee - ue * Y) * ye), x.set((ne * _ - te * j) * ye, (ne * W - te * Z) * ye, (ne * Y - te * ee) * ye), u[N].add(y), u[H].add(y), u[J].add(y), c[N].add(x), c[H].add(x), c[J].add(x);
13390
+ var j = m.x - v.x, _ = h.x - v.x, Z = m.y - v.y, W = h.y - v.y, ee = m.z - v.z, Y = h.z - v.z, ne = g.x - p.x, te = A.x - p.x, ue = g.y - p.y, ie = A.y - p.y, ye = 1 / (ne * ie - te * ue);
13391
+ y.set((ie * j - ue * _) * ye, (ie * Z - ue * W) * ye, (ie * ee - ue * Y) * ye), x.set((ne * _ - te * j) * ye, (ne * W - te * Z) * ye, (ne * Y - te * ee) * ye), u[N].add(y), u[H].add(y), u[J].add(y), c[N].add(x), c[H].add(x), c[J].add(x);
13392
13392
  }
13393
13393
  var w = n.groups;
13394
13394
  w.length === 0 && (w = [{
@@ -13851,7 +13851,7 @@ var Aa = (
13851
13851
  var _ = N.split("#"), Z = _[0], W = _[1], ee = (o = (W || Z).split("?")[1]) !== null && o !== void 0 ? o : "", Y = it(e).ajax(N, {
13852
13852
  responseType: "text"
13853
13853
  }).then(function(ne) {
13854
- var te, ue, ae, ye = N ? N.slice(0, N.lastIndexOf("/") + 1) : "", fe = mi(JSON.parse(ne.body), ye), Ae = fe.root, Pe = fe.rootMeta, we = Pe === void 0 ? {} : Pe;
13854
+ var te, ue, ie, ye = N ? N.slice(0, N.lastIndexOf("/") + 1) : "", fe = mi(JSON.parse(ne.body), ye), Ae = fe.root, Pe = fe.rootMeta, we = Pe === void 0 ? {} : Pe;
13855
13855
  we.upAxis && we.upAxis !== H && (H = we.upAxis), "lodVersion" in fe && (H = "-Y", "floorInfo" in fe && (fe.properties = fe.properties || {}, fe.properties.floorInfo = fe.floorInfo.map(function(xe) {
13856
13856
  return {
13857
13857
  ground: -xe.ground,
@@ -13860,15 +13860,15 @@ var Aa = (
13860
13860
  }), delete fe.floorInfo), fe.asset.tilesetVersion = String(fe.lodVersion), delete fe.lodVersion);
13861
13861
  var Me = Ae.boundingVolume ? vi(Ae.boundingVolume) : void 0;
13862
13862
  Me && Ae.transform && Me.applyMatrix4(va.fromArray(Ae.transform));
13863
- var re = null, ie = new d.Matrix4(), G = new d.Matrix4();
13864
- we.coordinate ? (re = we.coordinate.ground_height, ie.fromArray(we.coordinate.pose_ecef_to_enu), G.fromArray(we.coordinate.pose_enu_to_ecef)) : (Me ? Me.getCenter(Wt) : Wt.setScalar(0), F0(H, Wt, ie), G.getInverse(ie));
13865
- var Fe = new d.Matrix4().copy(yi), ke = new d.Matrix4().copy(bi), Te = new d.Matrix4().premultiply(ie).premultiply(Fe), Ge = new d.Matrix4().getInverse(Te);
13863
+ var re = null, ae = new d.Matrix4(), G = new d.Matrix4();
13864
+ we.coordinate ? (re = we.coordinate.ground_height, ae.fromArray(we.coordinate.pose_ecef_to_enu), G.fromArray(we.coordinate.pose_enu_to_ecef)) : (Me ? Me.getCenter(Wt) : Wt.setScalar(0), F0(H, Wt, ae), G.getInverse(ae));
13865
+ var Fe = new d.Matrix4().copy(yi), ke = new d.Matrix4().copy(bi), Te = new d.Matrix4().premultiply(ae).premultiply(Fe), Ge = new d.Matrix4().getInverse(Te);
13866
13866
  fe.root = {
13867
13867
  refine: (te = Ae.refine) !== null && te !== void 0 ? te : "REPLACE",
13868
13868
  geometricError: Ae.geometricError,
13869
13869
  transform: Te.toArray(),
13870
13870
  boundingVolume: Me ? Me.toJson() : void 0,
13871
- viewerRequestVolume: !((ue = r["3d-tiles"]) === null || ue === void 0) && ue.viewerRequestVolume ? (ae = r["3d-tiles"]) === null || ae === void 0 ? void 0 : ae.viewerRequestVolume.toJson() : void 0,
13871
+ viewerRequestVolume: !((ue = r["3d-tiles"]) === null || ue === void 0) && ue.viewerRequestVolume ? (ie = r["3d-tiles"]) === null || ie === void 0 ? void 0 : ie.viewerRequestVolume.toJson() : void 0,
13872
13872
  children: [Ae]
13873
13873
  };
13874
13874
  var be = new yn(a, fe, {
@@ -13884,7 +13884,7 @@ var Aa = (
13884
13884
  localToEnuMatrix: ke,
13885
13885
  enuToLocalMatrix: Fe,
13886
13886
  enuToEcefMatrix: G,
13887
- ecefToEnuMatrix: ie,
13887
+ ecefToEnuMatrix: ae,
13888
13888
  localToEcefMatrix: Ge,
13889
13889
  ecefToLocalMatrix: Te
13890
13890
  }
@@ -13897,7 +13897,7 @@ var Aa = (
13897
13897
  });
13898
13898
  g.push(Y.catch(function(ne) {
13899
13899
  a.onError(ne);
13900
- var te = new d.Matrix4(), ue = new d.Matrix4(), ae = new d.Matrix4().copy(yi), ye = new d.Matrix4().copy(bi), fe = new d.Matrix4().premultiply(te).premultiply(ae), Ae = new d.Matrix4().getInverse(fe), Pe = N ? N.slice(0, N.lastIndexOf("/") + 1) : "", we = mi({
13900
+ var te = new d.Matrix4(), ue = new d.Matrix4(), ie = new d.Matrix4().copy(yi), ye = new d.Matrix4().copy(bi), fe = new d.Matrix4().premultiply(te).premultiply(ie), Ae = new d.Matrix4().getInverse(fe), Pe = N ? N.slice(0, N.lastIndexOf("/") + 1) : "", we = mi({
13901
13901
  asset: {
13902
13902
  version: "0.0"
13903
13903
  },
@@ -13916,7 +13916,7 @@ var Aa = (
13916
13916
  groundHeight: null,
13917
13917
  coordinateTransform: {
13918
13918
  localToEnuMatrix: ye,
13919
- enuToLocalMatrix: ae,
13919
+ enuToLocalMatrix: ie,
13920
13920
  enuToEcefMatrix: ue,
13921
13921
  ecefToEnuMatrix: te,
13922
13922
  localToEcefMatrix: Ae,
@@ -15069,7 +15069,7 @@ var mu = new d.Vector3(0, 0, 0), Uh = (
15069
15069
  var i = this, a = new d.BoxBufferGeometry(e.max.x - e.min.x + r.x * 2, e.max.y - e.min.y + r.y * 2, e.max.z - e.min.z + r.z * 2, 1, 1);
15070
15070
  a.clearGroups(), a.addGroup(0, a.index ? a.index.count : a.attributes.position.count, 0), a.applyMatrix4(new d.Matrix4().makeScale(-1, 1, 1)), a.computeVertexNormals();
15071
15071
  var o = new $n("none");
15072
- return i = n.call(this, a, [o]) || this, i.position.copy(e.getCenter(new d.Vector3())), i.frustumCulled = !1, i.boundingBox = new d.Box3(), i.boundingBox.setFromObject(i), i.renderOrder = -1001, i;
15072
+ return o.refreshUniforms(), i = n.call(this, a, [o]) || this, i.position.copy(e.getCenter(new d.Vector3())), i.frustumCulled = !1, i.boundingBox = new d.Box3(), i.boundingBox.setFromObject(i), i.renderOrder = -1001, i;
15073
15073
  }
15074
15074
  return t;
15075
15075
  }(Yt)
@@ -15328,14 +15328,14 @@ var Vn = function(n, t, e, r) {
15328
15328
  var B = I.ownerDocument || I;
15329
15329
  return B.defaultView || B.parentWindow || n;
15330
15330
  }
15331
- var V = /mobile|tablet|ip(ad|hone|od)|android/i, U = "ontouchstart" in n, q = z(n, "PointerEvent") !== r, N = U && V.test(navigator.userAgent), H = "touch", J = "pen", j = "mouse", _ = "kinect", Z = 25, W = 1, ee = 2, Y = 4, ne = 8, te = 1, ue = 2, ae = 4, ye = 8, fe = 16, Ae = ue | ae, Pe = ye | fe, we = Ae | Pe, Me = ["x", "y"], re = ["clientX", "clientY"];
15332
- function ie(I, B) {
15331
+ var V = /mobile|tablet|ip(ad|hone|od)|android/i, U = "ontouchstart" in n, q = z(n, "PointerEvent") !== r, N = U && V.test(navigator.userAgent), H = "touch", J = "pen", j = "mouse", _ = "kinect", Z = 25, W = 1, ee = 2, Y = 4, ne = 8, te = 1, ue = 2, ie = 4, ye = 8, fe = 16, Ae = ue | ie, Pe = ye | fe, we = Ae | Pe, Me = ["x", "y"], re = ["clientX", "clientY"];
15332
+ function ae(I, B) {
15333
15333
  var D = this;
15334
15334
  this.manager = I, this.callback = B, this.element = I.element, this.target = I.options.inputTarget, this.domHandler = function(K) {
15335
15335
  x(I.options.enable, [I]) && D.handler(K);
15336
15336
  }, this.init();
15337
15337
  }
15338
- ie.prototype = {
15338
+ ae.prototype = {
15339
15339
  /**
15340
15340
  * should handle the inputEvent data and trigger the callback
15341
15341
  * @virtual
@@ -15427,7 +15427,7 @@ var Vn = function(n, t, e, r) {
15427
15427
  };
15428
15428
  }
15429
15429
  function ge(I, B) {
15430
- return I === B ? te : l(I) >= l(B) ? I < 0 ? ue : ae : B < 0 ? ye : fe;
15430
+ return I === B ? te : l(I) >= l(B) ? I < 0 ? ue : ie : B < 0 ? ye : fe;
15431
15431
  }
15432
15432
  function me(I, B, D) {
15433
15433
  D || (D = Me);
@@ -15451,9 +15451,9 @@ var Vn = function(n, t, e, r) {
15451
15451
  mouseup: Y
15452
15452
  }, Le = "mousedown", Ze = "mousemove mouseup";
15453
15453
  function ot() {
15454
- this.evEl = Le, this.evWin = Ze, this.pressed = !1, ie.apply(this, arguments);
15454
+ this.evEl = Le, this.evWin = Ze, this.pressed = !1, ae.apply(this, arguments);
15455
15455
  }
15456
- A(ot, ie, {
15456
+ A(ot, ae, {
15457
15457
  /**
15458
15458
  * handle mouse events
15459
15459
  * @param {Object} ev
@@ -15483,9 +15483,9 @@ var Vn = function(n, t, e, r) {
15483
15483
  }, er = "pointerdown", Tt = "pointermove pointerup pointercancel";
15484
15484
  n.MSPointerEvent && !n.PointerEvent && (er = "MSPointerDown", Tt = "MSPointerMove MSPointerUp MSPointerCancel");
15485
15485
  function tr() {
15486
- this.evEl = er, this.evWin = Tt, ie.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
15486
+ this.evEl = er, this.evWin = Tt, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
15487
15487
  }
15488
- A(tr, ie, {
15488
+ A(tr, ae, {
15489
15489
  /**
15490
15490
  * handle mouse events
15491
15491
  * @param {Object} ev
@@ -15507,9 +15507,9 @@ var Vn = function(n, t, e, r) {
15507
15507
  touchcancel: ne
15508
15508
  }, qt = "touchstart", rr = "touchstart touchmove touchend touchcancel";
15509
15509
  function Ht() {
15510
- this.evTarget = qt, this.evWin = rr, this.started = !1, ie.apply(this, arguments);
15510
+ this.evTarget = qt, this.evWin = rr, this.started = !1, ae.apply(this, arguments);
15511
15511
  }
15512
- A(Ht, ie, {
15512
+ A(Ht, ae, {
15513
15513
  handler: function(B) {
15514
15514
  var D = Sr[B.type];
15515
15515
  if (D === W && (this.started = !0), !!this.started) {
@@ -15534,9 +15534,9 @@ var Vn = function(n, t, e, r) {
15534
15534
  touchcancel: ne
15535
15535
  }, hr = "touchstart touchmove touchend touchcancel";
15536
15536
  function At() {
15537
- this.evTarget = hr, this.targetIds = {}, ie.apply(this, arguments);
15537
+ this.evTarget = hr, this.targetIds = {}, ae.apply(this, arguments);
15538
15538
  }
15539
- A(At, ie, {
15539
+ A(At, ae, {
15540
15540
  handler: function(B) {
15541
15541
  var D = Oe[B.type], K = pr.call(this, B, D);
15542
15542
  K && this.callback(this.manager, D, {
@@ -15568,11 +15568,11 @@ var Vn = function(n, t, e, r) {
15568
15568
  }
15569
15569
  var vr = 2500, Ut = 25;
15570
15570
  function St() {
15571
- ie.apply(this, arguments);
15571
+ ae.apply(this, arguments);
15572
15572
  var I = y(this.handler, this);
15573
15573
  this.touch = new At(this.manager, I), this.mouse = new ot(this.manager, I), this.primaryTouch = null, this.lastTouches = [];
15574
15574
  }
15575
- A(St, ie, {
15575
+ A(St, ae, {
15576
15576
  /**
15577
15577
  * handle mouse and touch events
15578
15578
  * @param {Hammer} manager
@@ -15839,7 +15839,7 @@ var Vn = function(n, t, e, r) {
15839
15839
  return I & Pn ? "cancel" : I & Tr ? "end" : I & dn ? "move" : I & Pt ? "start" : "";
15840
15840
  }
15841
15841
  function Ro(I) {
15842
- return I == fe ? "down" : I == ye ? "up" : I == ue ? "left" : I == ae ? "right" : "";
15842
+ return I == fe ? "down" : I == ye ? "up" : I == ue ? "left" : I == ie ? "right" : "";
15843
15843
  }
15844
15844
  function ni(I, B) {
15845
15845
  var D = B.manager;
@@ -15901,7 +15901,7 @@ var Vn = function(n, t, e, r) {
15901
15901
  },
15902
15902
  directionTest: function(I) {
15903
15903
  var B = this.options, D = !0, K = I.distance, $ = I.direction, ce = I.deltaX, Ie = I.deltaY;
15904
- return $ & B.direction || (B.direction & Ae ? ($ = ce === 0 ? te : ce < 0 ? ue : ae, D = ce != this.pX, K = Math.abs(I.deltaX)) : ($ = Ie === 0 ? te : Ie < 0 ? ye : fe, D = Ie != this.pY, K = Math.abs(I.deltaY))), I.direction = $, D && K > B.threshold && $ & B.direction;
15904
+ return $ & B.direction || (B.direction & Ae ? ($ = ce === 0 ? te : ce < 0 ? ue : ie, D = ce != this.pX, K = Math.abs(I.deltaX)) : ($ = Ie === 0 ? te : Ie < 0 ? ye : fe, D = Ie != this.pY, K = Math.abs(I.deltaY))), I.direction = $, D && K > B.threshold && $ & B.direction;
15905
15905
  },
15906
15906
  attrTest: function(I) {
15907
15907
  return Jt.prototype.attrTest.call(this, I) && (this.state & Pt || !(this.state & Pt) && this.directionTest(I));
@@ -16337,14 +16337,14 @@ var Vn = function(n, t, e, r) {
16337
16337
  STATE_FAILED: nr,
16338
16338
  DIRECTION_NONE: te,
16339
16339
  DIRECTION_LEFT: ue,
16340
- DIRECTION_RIGHT: ae,
16340
+ DIRECTION_RIGHT: ie,
16341
16341
  DIRECTION_UP: ye,
16342
16342
  DIRECTION_DOWN: fe,
16343
16343
  DIRECTION_HORIZONTAL: Ae,
16344
16344
  DIRECTION_VERTICAL: Pe,
16345
16345
  DIRECTION_ALL: we,
16346
16346
  Manager: Ki,
16347
- Input: ie,
16347
+ Input: ae,
16348
16348
  TouchAction: Ir,
16349
16349
  TouchInput: At,
16350
16350
  MouseInput: ot,
@@ -18639,8 +18639,8 @@ void main() {
18639
18639
  var ue = cr(Z.visibleIds, function(ve) {
18640
18640
  var xe = i.works.getResolvedObserver(ve);
18641
18641
  return xe ? Z.standingPosition.distanceTo(xe.standingPosition) : 1 / 0;
18642
- }, !0), ae = ue[1];
18643
- ae = he(ae, 2.5, 1 / 0);
18642
+ }, !0), ie = ue[1];
18643
+ ie = he(ie, 2.5, 1 / 0);
18644
18644
  for (var ye = Z.visibleIds.concat(De(this.currentPano)), fe = this.camera.getDirection(new d.Vector3()), Ae = 0, Pe = Object.keys(this.panoMeshes); Ae < Pe.length; Ae++) {
18645
18645
  var ne = Pe[Ae], te = this.panoMeshes[ne], we = this.works.getResolvedObserver(ne);
18646
18646
  if (ye.indexOf(ne) === -1)
@@ -18651,13 +18651,13 @@ void main() {
18651
18651
  te.setCurrent(!1), te.setOpacity(0);
18652
18652
  else {
18653
18653
  var Me = te.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
18654
- te.setCurrent(!te.loading && te.progress === 0 && W !== null && W.panoId === ne), te.setOpacity(Me < 0.01 ? 0 : he(ae / Me * 1.2, 0.4, 0.85));
18655
- var re = this.camera.position.clone().setY(te.position.y), ie = new d.Vector3().copy(te.position).sub(re).normalize();
18654
+ te.setCurrent(!te.loading && te.progress === 0 && W !== null && W.panoId === ne), te.setOpacity(Me < 0.01 ? 0 : he(ie / Me * 1.2, 0.4, 0.85));
18655
+ var re = this.camera.position.clone().setY(te.position.y), ae = new d.Vector3().copy(te.position).sub(re).normalize();
18656
18656
  if (ne === De(this.currentPano)) {
18657
18657
  var G = he((0.5 - re.distanceTo(te.position)) / 0.5, 0, 1);
18658
- ie.multiplyScalar(1 - G).add(fe.clone().multiplyScalar(G));
18658
+ ae.multiplyScalar(1 - G).add(fe.clone().multiplyScalar(G));
18659
18659
  }
18660
- ie.length() > 0 && te.quaternion.setFromEuler(new d.Euler(0, Math.atan2(ie.x, ie.z), 0));
18660
+ ae.length() > 0 && te.quaternion.setFromEuler(new d.Euler(0, Math.atan2(ae.x, ae.z), 0));
18661
18661
  }
18662
18662
  te.updateTime && te.updateTime(e, r);
18663
18663
  }
@@ -19052,9 +19052,9 @@ void main() {
19052
19052
  W.lookAt(_);
19053
19053
  var ee = new d.Matrix4().makeRotationFromQuaternion(W.quaternion);
19054
19054
  W.lookAt(Z);
19055
- var Y = new d.Matrix4().makeRotationFromQuaternion(W.quaternion), ne = new d.Matrix4().getInverse(ee).premultiply(Y), te = this.cameraMotion.value.fov, ue = (v = H.fov) !== null && v !== void 0 ? v : this.cameraMotion.value.fov, ae = 1;
19056
- r.effect === "zoomin" ? ae = 1.5 : r.effect === "zoomout" && (ae = 0.4);
19057
- for (var ye = he(ue * ae, 1, 170), fe = 0; fe < w.length - 1; fe++) {
19055
+ var Y = new d.Matrix4().makeRotationFromQuaternion(W.quaternion), ne = new d.Matrix4().getInverse(ee).premultiply(Y), te = this.cameraMotion.value.fov, ue = (v = H.fov) !== null && v !== void 0 ? v : this.cameraMotion.value.fov, ie = 1;
19056
+ r.effect === "zoomin" ? ie = 1.5 : r.effect === "zoomout" && (ie = 0.4);
19057
+ for (var ye = he(ue * ie, 1, 170), fe = 0; fe < w.length - 1; fe++) {
19058
19058
  var Ae = w[fe].key;
19059
19059
  if (Ae) {
19060
19060
  var Pe = this.panoResources[Ae];
@@ -19093,8 +19093,8 @@ void main() {
19093
19093
  // resolve
19094
19094
  // 动画结束
19095
19095
  function() {
19096
- for (var Me, re, ie = 0, G = a.models; ie < G.length; ie++) {
19097
- var Fe = G[ie];
19096
+ for (var Me, re, ae = 0, G = a.models; ae < G.length; ae++) {
19097
+ var Fe = G[ae];
19098
19098
  Fe.show();
19099
19099
  }
19100
19100
  var ke = F(F({}, e), { mode: a.mode, longitude: a.camera.pose.longitude, latitude: a.camera.pose.latitude, fov: a.camera.pose.fov, offset: a.camera.pose.offset.clone(), distance: a.camera.pose.distance });
@@ -20208,26 +20208,26 @@ void main() {
20208
20208
  var Y = this.works.getResolvedObserver(this.currentPano);
20209
20209
  if (this.camera.pose.distance > 0.1 || b)
20210
20210
  for (var ne = 0, te = Object.keys(this.panoMeshes); ne < te.length; ne++) {
20211
- var ue = te[ne], ae = this.panoMeshes[ue];
20212
- ae.setOpacity(0), ae.updateTime && ae.updateTime(e, r), ae.visible = !1;
20211
+ var ue = te[ne], ie = this.panoMeshes[ue];
20212
+ ie.setOpacity(0), ie.updateTime && ie.updateTime(e, r), ie.visible = !1;
20213
20213
  }
20214
20214
  else if (Y)
20215
20215
  for (var ye = Y.visibleIds.concat(De(this.currentPano)), fe = 0, Ae = ye; fe < Ae.length; fe++) {
20216
20216
  var ue = Ae[fe], Pe = wt(ue), we = this.works.getResolvedObserver(Pe);
20217
20217
  if (we) {
20218
- var ae = this.panoMeshes[ue];
20218
+ var ie = this.panoMeshes[ue];
20219
20219
  if (!we.loadable && !we.active) {
20220
- ae.setOpacity(0);
20220
+ ie.setOpacity(0);
20221
20221
  continue;
20222
20222
  }
20223
- var Me = ae.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
20224
- Me < 0.05 ? ae.setOpacity(0) : ae.setOpacity(he(1.5 / Me, 0, 1)), lr(this.currentPano, Pe) && ae.setOpacity(0), ae.lookAt(this.camera.position);
20223
+ var Me = ie.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
20224
+ Me < 0.05 ? ie.setOpacity(0) : ie.setOpacity(he(1.5 / Me, 0, 1)), lr(this.currentPano, Pe) && ie.setOpacity(0), ie.lookAt(this.camera.position);
20225
20225
  }
20226
20226
  }
20227
20227
  if (this.locationMotion.ended)
20228
- for (var re = this.intersect(e), ie = 0, G = this.works.resolvedObservers; ie < G.length; ie++) {
20229
- var we = G[ie], ae = this.panoMeshes[we.panoId];
20230
- ae && (ae.setCurrent(ae === re), ae.updateTime && ae.updateTime(e, r));
20228
+ for (var re = this.intersect(e), ae = 0, G = this.works.resolvedObservers; ae < G.length; ae++) {
20229
+ var we = G[ae], ie = this.panoMeshes[we.panoId];
20230
+ ie && (ie.setCurrent(ie === re), ie.updateTime && ie.updateTime(e, r));
20231
20231
  }
20232
20232
  (W !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(Vt(this.camera.pose, ["longitude", "latitude"]), 0).catch(Q), this.emit("camera.update", X("camera.update", {
20233
20233
  userAction: !0,
@@ -21418,7 +21418,7 @@ var hv = { type: "move" }, ts = (
21418
21418
  e.session.updateRenderState({ baseLayer: new XRWebGLLayer(e.session, e.gl, i) });
21419
21419
  break;
21420
21420
  case "Oculus":
21421
- e.session.updateRenderState({ layers: [new XRWebGLLayer(e.session, e.gl, i)] });
21421
+ e.session.updateRenderState({ baseLayer: new XRWebGLLayer(e.session, e.gl, i) });
21422
21422
  break;
21423
21423
  default:
21424
21424
  e.machineType;
@@ -21899,7 +21899,7 @@ var Av = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA
21899
21899
  }
21900
21900
  return Object.defineProperty(t, "version", {
21901
21901
  get: function() {
21902
- return "6.3.0-alpha.3";
21902
+ return "6.3.0-alpha.4";
21903
21903
  },
21904
21904
  enumerable: !1,
21905
21905
  configurable: !0
@@ -22575,11 +22575,11 @@ var as = 300, kv = new d.Matrix4().makeRotationAxis(new d.Vector3(0, 1, 0), Math
22575
22575
  Z.lookAt(_);
22576
22576
  var ee = new d.Matrix4().makeRotationFromQuaternion(Z.quaternion), Y = new d.Matrix4().getInverse(W).premultiply(ee), ne = this.cameraMotion.value.fov, te = (f = N.fov) !== null && f !== void 0 ? f : this.cameraMotion.value.fov, ue = 1;
22577
22577
  r.effect === "zoomin" ? ue = 1.5 : r.effect === "zoomout" && (ue = 0.4);
22578
- for (var ae = te * ue, ye = 0; ye < b.length - 1; ye++) {
22578
+ for (var ie = te * ue, ye = 0; ye < b.length - 1; ye++) {
22579
22579
  var fe = b[ye].key;
22580
22580
  if (fe) {
22581
22581
  var Ae = this.panoResources[fe];
22582
- Ae && (Ae.fixCameraTransform.copy(Y), Ae.leftPanoPicture && (Ae.leftPanoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan(ae / 2 / 180 * Math.PI)));
22582
+ Ae && (Ae.fixCameraTransform.copy(Y), Ae.leftPanoPicture && (Ae.leftPanoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan(ie / 2 / 180 * Math.PI)));
22583
22583
  }
22584
22584
  }
22585
22585
  this.cameraMotion.setKeyframes([
@@ -22596,7 +22596,7 @@ var as = 300, kv = new d.Matrix4().makeRotationAxis(new d.Vector3(0, 1, 0), Math
22596
22596
  value: {
22597
22597
  longitude: (v = N.longitude) !== null && v !== void 0 ? v : this.cameraMotion.value.longitude,
22598
22598
  latitude: (m = N.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
22599
- fov: ae
22599
+ fov: ie
22600
22600
  }
22601
22601
  },
22602
22602
  {
@@ -22614,8 +22614,8 @@ var as = 300, kv = new d.Matrix4().makeRotationAxis(new d.Vector3(0, 1, 0), Math
22614
22614
  // resolve
22615
22615
  // 动画结束
22616
22616
  function() {
22617
- for (var we, Me, re, ie = 0, G = a.models; ie < G.length; ie++) {
22618
- var Fe = G[ie];
22617
+ for (var we, Me, re, ae = 0, G = a.models; ae < G.length; ae++) {
22618
+ var Fe = G[ae];
22619
22619
  Fe.show();
22620
22620
  }
22621
22621
  var ke = F(F({}, e), { mode: a.mode, longitude: a.camera.pose.longitude, latitude: a.camera.pose.latitude, fov: a.camera.pose.fov, offset: a.camera.pose.offset.clone(), distance: 0 });
@@ -22804,7 +22804,7 @@ var as = 300, kv = new d.Matrix4().makeRotationAxis(new d.Vector3(0, 1, 0), Math
22804
22804
  }
22805
22805
  var W = this.xrManager.referenceSpace;
22806
22806
  if (W) {
22807
- var ee = this.xrManager.cameraVR, Y = this.xrManager.cameraL, ne = this.xrManager.cameraR, te = [Y, ne], ue = Z.getViewerPose(W), ae = new d.Vector3(0, 0, 0);
22807
+ var ee = this.xrManager.cameraVR, Y = this.xrManager.cameraL, ne = this.xrManager.cameraR, te = [Y, ne], ue = Z.getViewerPose(W), ie = new d.Vector3(0, 0, 0);
22808
22808
  if (ue) {
22809
22809
  var ye;
22810
22810
  ye = this.xrManager.session.renderState.baseLayer;
@@ -22818,13 +22818,13 @@ var as = 300, kv = new d.Matrix4().makeRotationAxis(new d.Vector3(0, 1, 0), Math
22818
22818
  fe.length !== ee.cameras.length && (ee.cameras.length = 0, Ae = !0), this.parallaxCameraMatrixs = [];
22819
22819
  var Pe = new d.Vector3(), we = new d.Vector3();
22820
22820
  new d.Matrix4().fromArray(fe[0].transform.matrix).decompose(Pe, new d.Quaternion(), new d.Vector3()), new d.Matrix4().fromArray(fe[1].transform.matrix).decompose(we, new d.Quaternion(), new d.Vector3()), we.clone().sub(Pe).normalize();
22821
- var Me = new d.Vector3(), re = new d.Quaternion(), ie = new d.Vector3();
22822
- this.camera.matrix.decompose(Me, re, ie);
22821
+ var Me = new d.Vector3(), re = new d.Quaternion(), ae = new d.Vector3();
22822
+ this.camera.matrix.decompose(Me, re, ae);
22823
22823
  for (var G = 0; G < fe.length; G++) {
22824
22824
  var Fe = fe[G], ke = ye.getViewport(Fe), Te = te[G];
22825
22825
  Te.matrix.fromArray(Fe.transform.matrix);
22826
22826
  var Ge = new d.Vector3(), be = new d.Quaternion(), ve = new d.Vector3();
22827
- Te.matrix.decompose(Ge, be, ve), ae.copy(Me), Te.position.copy(Me), Te.quaternion.copy(be), Te.scale.copy(ve), Te.updateMatrix(), Te.projectionMatrix.fromArray(Fe.projectionMatrix), Te.viewport.set(ke.x, ke.y, ke.width, ke.height), Ae === !0 && ee.cameras.push(Te);
22827
+ Te.matrix.decompose(Ge, be, ve), ie.copy(Me), Te.position.copy(Me), Te.quaternion.copy(be), Te.scale.copy(ve), Te.updateMatrix(), Te.projectionMatrix.fromArray(Fe.projectionMatrix), Te.viewport.set(ke.x, ke.y, ke.width, ke.height), Ae === !0 && ee.cameras.push(Te);
22828
22828
  }
22829
22829
  if (this.xrManager.session && this.xrManager.session.inputSources) {
22830
22830
  for (var G = 0; G < this.xrManager.session.inputSources.length; G++)
@@ -22841,8 +22841,8 @@ var as = 300, kv = new d.Matrix4().makeRotationAxis(new d.Vector3(0, 1, 0), Math
22841
22841
  var Ke = this.xrManager.controllers[G], rt = Qe[G];
22842
22842
  if (rt) {
22843
22843
  Ke && Ke.update(rt, Z, W);
22844
- var me = this.xrManager.getController(G), Xr = new d.Vector3(0, 1.2, 0), Le = me.position.clone().add(ae).sub(Xr);
22845
- rt.handedness === "left" ? this.xrControllerRay.left.set(Le, new d.Vector3(0, 0, -1).applyEuler(me.rotation)) : rt.handedness === "right" && this.xrControllerRay.right.set(Le, new d.Vector3(0, 0, -1).applyEuler(me.rotation)), this.controllerWrappers[G].position.copy(new d.Vector3(0, 0, 0).add(ae).sub(Xr));
22844
+ var me = this.xrManager.getController(G), Xr = new d.Vector3(0, 1.2, 0), Le = me.position.clone().add(ie).sub(Xr);
22845
+ rt.handedness === "left" ? this.xrControllerRay.left.set(Le, new d.Vector3(0, 0, -1).applyEuler(me.rotation)) : rt.handedness === "right" && this.xrControllerRay.right.set(Le, new d.Vector3(0, 0, -1).applyEuler(me.rotation)), this.controllerWrappers[G].position.copy(new d.Vector3(0, 0, 0).add(ie).sub(Xr));
22846
22846
  var Ze = this.models.intersectRaycaster(this.xrControllerRay.right);
22847
22847
  if (Ze.length === 0 && (Ze = this.xrControllerRay.right.intersectObject(this.boundingMesh, !0).map(function(Ir) {
22848
22848
  var Zr;
@@ -23459,7 +23459,7 @@ var jv = 800, cs = 90, Xv = function(n) {
23459
23459
  }
23460
23460
  return Object.defineProperty(t, "version", {
23461
23461
  get: function() {
23462
- return "6.3.0-alpha.3";
23462
+ return "6.3.0-alpha.4";
23463
23463
  },
23464
23464
  enumerable: !1,
23465
23465
  configurable: !0
@@ -23849,8 +23849,8 @@ var jv = 800, cs = 90, Xv = function(n) {
23849
23849
  if (o.controller)
23850
23850
  o.controller.destroy();
23851
23851
  else {
23852
- var ae = Rt[T].initAnimationEndState(ne);
23853
- o.camera.setFromPose(ae), o.modelGroup.visible = !0, o.emit("camera.update", X("camera.update", {
23852
+ var ie = Rt[T].initAnimationEndState(ne);
23853
+ o.camera.setFromPose(ie), o.modelGroup.visible = !0, o.emit("camera.update", X("camera.update", {
23854
23854
  state: o.getCurrentState(),
23855
23855
  userAction: a
23856
23856
  }));