@openglobus/openglobus-react 0.0.3 → 0.0.5
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/README.md +3 -3
- package/dist/index.mjs +94 -92
- package/dist/index.umd.js +19 -19
- package/dist/src/index.d.ts +4 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,16 +32,16 @@ import {LonLat} from "@openglobus/og";
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
export default function ButtonContainer() {
|
|
35
|
-
const {
|
|
35
|
+
const {globus} = useGlobusContext()
|
|
36
36
|
const clickFlyTo = () => {
|
|
37
|
-
let ell =
|
|
37
|
+
let ell = globus?.planet.ellipsoid;
|
|
38
38
|
|
|
39
39
|
let destPos = new LonLat(10.13176, 46.18868, 10779);
|
|
40
40
|
let viewPoi = new LonLat(9.98464, 46.06157, 3039);
|
|
41
41
|
if (ell) {
|
|
42
42
|
let lookCart = ell.lonLatToCartesian(viewPoi);
|
|
43
43
|
let upVec = ell.lonLatToCartesian(destPos).normalize();
|
|
44
|
-
|
|
44
|
+
globus?.planet.camera.flyLonLat(destPos, lookCart, upVec, 0);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
package/dist/index.mjs
CHANGED
|
@@ -2618,7 +2618,7 @@ const js = {
|
|
|
2618
2618
|
function Gi(c, e) {
|
|
2619
2619
|
return c ?? e;
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2621
|
+
function Lt(c) {
|
|
2622
2622
|
return c == null;
|
|
2623
2623
|
}
|
|
2624
2624
|
let ea = 0;
|
|
@@ -2635,11 +2635,11 @@ function yt(c, e) {
|
|
|
2635
2635
|
let i = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, r = c.replace(i, function(n, a, o, l) {
|
|
2636
2636
|
return a + a + o + o + l + l;
|
|
2637
2637
|
}), s = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);
|
|
2638
|
-
return s ? new ie(parseInt(s[1], 16) / 255, parseInt(s[2], 16) / 255, parseInt(s[3], 16) / 255,
|
|
2638
|
+
return s ? new ie(parseInt(s[1], 16) / 255, parseInt(s[2], 16) / 255, parseInt(s[3], 16) / 255, Lt(e) ? 1 : e) : new ie();
|
|
2639
2639
|
} else {
|
|
2640
|
-
|
|
2640
|
+
Lt(e) && (e = 1);
|
|
2641
2641
|
let i = c.split(",");
|
|
2642
|
-
return new ie(parseInt(i[0].split("(")[1]) / 255, parseInt(i[1]) / 255, parseInt(i[2]) / 255,
|
|
2642
|
+
return new ie(parseInt(i[0].split("(")[1]) / 255, parseInt(i[1]) / 255, parseInt(i[2]) / 255, Lt(i[3]) ? e : parseFloat(i[3]));
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
2645
2645
|
function or(c, e) {
|
|
@@ -2658,7 +2658,7 @@ function lr(c) {
|
|
|
2658
2658
|
return new p(parseInt(t[0].split("(")[1]) / 255, parseInt(t[1]) / 255, parseInt(t[2]) / 255);
|
|
2659
2659
|
}
|
|
2660
2660
|
}
|
|
2661
|
-
function
|
|
2661
|
+
function St(c, e) {
|
|
2662
2662
|
return c.replace(/{[^{}]+}/g, function(t) {
|
|
2663
2663
|
return e[t.replace(/[{}]+/g, "")] || "";
|
|
2664
2664
|
});
|
|
@@ -2792,7 +2792,7 @@ function X(c, e = Float32Array) {
|
|
|
2792
2792
|
return t.set(c, 0), t;
|
|
2793
2793
|
}
|
|
2794
2794
|
}
|
|
2795
|
-
function
|
|
2795
|
+
function zt(c) {
|
|
2796
2796
|
return ArrayBuffer.isView(c) ? Array.from(c) : c;
|
|
2797
2797
|
}
|
|
2798
2798
|
function Ee(c, e, t, i) {
|
|
@@ -3097,7 +3097,7 @@ class Pe {
|
|
|
3097
3097
|
this.__id = Pe.__counter__++, this.events = qe(xa), this.model = e.model || null, this.template = e.template || "", this.parent = e.parent || null, this._classList = e.classList || [], this.el = null;
|
|
3098
3098
|
}
|
|
3099
3099
|
static getHTML(e, t) {
|
|
3100
|
-
return
|
|
3100
|
+
return St(e, t);
|
|
3101
3101
|
}
|
|
3102
3102
|
static parseHTML(e) {
|
|
3103
3103
|
return Ws(e);
|
|
@@ -3173,7 +3173,7 @@ const ya = `<div class="og-button" title="{title}">
|
|
|
3173
3173
|
class vi extends Pe {
|
|
3174
3174
|
constructor(e = {}) {
|
|
3175
3175
|
super({
|
|
3176
|
-
template:
|
|
3176
|
+
template: St(ya, {
|
|
3177
3177
|
icon: e.icon || "",
|
|
3178
3178
|
text: e.text || "",
|
|
3179
3179
|
title: e.title || ""
|
|
@@ -3410,7 +3410,7 @@ const Aa = `<svg className="svg-icon" style="width: 1em; height: 1em;vertical-al
|
|
|
3410
3410
|
class xr extends Pe {
|
|
3411
3411
|
constructor(e = {}) {
|
|
3412
3412
|
super({
|
|
3413
|
-
template:
|
|
3413
|
+
template: St(Ca, {
|
|
3414
3414
|
title: e.title || "",
|
|
3415
3415
|
display: Gi(e.visible, !0) ? "flex" : "none",
|
|
3416
3416
|
resize: Gi(e.resizable, !0) ? "both" : "none",
|
|
@@ -5047,18 +5047,18 @@ class ka {
|
|
|
5047
5047
|
}
|
|
5048
5048
|
}
|
|
5049
5049
|
}
|
|
5050
|
-
const
|
|
5050
|
+
const Bt = {
|
|
5051
5051
|
RIGHT: 0,
|
|
5052
5052
|
LEFT: 1,
|
|
5053
5053
|
CENTER: 2
|
|
5054
5054
|
}, jr = {
|
|
5055
|
-
left:
|
|
5056
|
-
right:
|
|
5057
|
-
center:
|
|
5055
|
+
left: Bt.LEFT,
|
|
5056
|
+
right: Bt.RIGHT,
|
|
5057
|
+
center: Bt.CENTER
|
|
5058
5058
|
};
|
|
5059
5059
|
class Da extends ei {
|
|
5060
5060
|
constructor(e = {}) {
|
|
5061
|
-
super(e), this._handler = null, this._text = e.text || "", this._face = ta(e.face, "arial"), this._size = e.size || 24, this._outline = e.outline != null ? e.outline : 0, this._outlineColor = Ye(e.outlineColor, new ie(0, 0, 0, 1)), this._align = e.align && jr[e.align.trim().toLowerCase()] ||
|
|
5061
|
+
super(e), this._handler = null, this._text = e.text || "", this._face = ta(e.face, "arial"), this._size = e.size || 24, this._outline = e.outline != null ? e.outline : 0, this._outlineColor = Ye(e.outlineColor, new ie(0, 0, 0, 1)), this._align = e.align && jr[e.align.trim().toLowerCase()] || Bt.RIGHT, this._fontIndex = 0, this._fontAtlas = null, this._isRTL = e.isRTL || !1;
|
|
5062
5062
|
}
|
|
5063
5063
|
/**
|
|
5064
5064
|
* Set label text.
|
|
@@ -5725,7 +5725,7 @@ class ut {
|
|
|
5725
5725
|
* @param {boolean} [skipEllipsoid] -
|
|
5726
5726
|
*/
|
|
5727
5727
|
appendPoint3v(e, t, i) {
|
|
5728
|
-
this._path3v.length === 0 || !this._renderNode ? (this._pathColors.push([t || this._defaultColor]), this.addPoint3v(e)) : (this._verticesHigh =
|
|
5728
|
+
this._path3v.length === 0 || !this._renderNode ? (this._pathColors.push([t || this._defaultColor]), this.addPoint3v(e)) : (this._verticesHigh = zt(this._verticesHigh), this._verticesLow = zt(this._verticesLow), this._colors = zt(this._colors), this._orders = zt(this._orders), this._indexes = zt(this._indexes), ut.appendPoint3v(this._path3v, e, this._pathColors, t || this._defaultColor, this._closedLine, this._verticesHigh, this._verticesLow, this._colors, this._orders, this._indexes, i ? null : this._renderNode.ellipsoid, this._pathLonLat, this._pathLonLatMerc, this._extent), this._pathLengths[this._path3v.length] += 1, this._changedBuffers[at] = !0, this._changedBuffers[Xe] = !0, this._changedBuffers[di] = !0);
|
|
5729
5729
|
}
|
|
5730
5730
|
/**
|
|
5731
5731
|
* Append new point in the end of the path.
|
|
@@ -9240,7 +9240,7 @@ class go extends ti {
|
|
|
9240
9240
|
} else
|
|
9241
9241
|
u += y.nAdvance;
|
|
9242
9242
|
}
|
|
9243
|
-
if (r ===
|
|
9243
|
+
if (r === Bt.CENTER)
|
|
9244
9244
|
for (u *= -0.5, h = 0; h < d; h++) {
|
|
9245
9245
|
let _ = a + h * 24;
|
|
9246
9246
|
o[_ + 2] += u, o[_ + 6] += u, o[_ + 10] += u, o[_ + 14] += u, o[_ + 18] += u, o[_ + 22] += u;
|
|
@@ -10685,7 +10685,7 @@ function bo(c, e = !1) {
|
|
|
10685
10685
|
let t = 1 - kr(128, c[0]) * 2, i = 2 * sr(c[0], 128) + kr(128, c[1]) - 127, r = sr(c[1], 128) * 65536 + c[2] * 256 + (e && c[3] || 0) + 8388608;
|
|
10686
10686
|
return t * jn(i) * (r * 11920928955078125e-23);
|
|
10687
10687
|
}
|
|
10688
|
-
function
|
|
10688
|
+
function Ct(c, e) {
|
|
10689
10689
|
if (c >= 0) {
|
|
10690
10690
|
let t = Math.floor(c / 65536) * 65536;
|
|
10691
10691
|
e[0] = Math.fround(t), e[1] = Math.fround(c - t);
|
|
@@ -11728,11 +11728,11 @@ const Go = [
|
|
|
11728
11728
|
"entityremove"
|
|
11729
11729
|
];
|
|
11730
11730
|
pe.createCylinder(1, 1, 2, 20, 1, !0, !1, 0, -0.5, 0);
|
|
11731
|
-
const _n = 0, gn = 1, mn = 2,
|
|
11731
|
+
const _n = 0, gn = 1, mn = 2, Ot = {
|
|
11732
11732
|
ell: _n,
|
|
11733
11733
|
msl: gn,
|
|
11734
11734
|
gnd: mn
|
|
11735
|
-
}, pn = 1e3, vn = 1 / pn, Er = 0.3048, jo = 1 / Er, xn = 3.6, Yo = 1 / xn, qo = 3.28084, yn = Er * vn, Wo = 1 / yn, Ue = 0, et = 1, tt = 2, Xo = 3, Zo = 4, bt = 5,
|
|
11735
|
+
}, pn = 1e3, vn = 1 / pn, Er = 0.3048, jo = 1 / Er, xn = 3.6, Yo = 1 / xn, qo = 3.28084, yn = Er * vn, Wo = 1 / yn, Ue = 0, et = 1, tt = 2, Xo = 3, Zo = 4, bt = 5, Rt = 6, bn = 7, $o = "--", Ko = ["m", "km", "ft", "s", "h", "m/s", "km/h", "ft/s"], wn = [0, 2, 0, 0, 0, 0, 0, 0];
|
|
11736
11736
|
let he = [];
|
|
11737
11737
|
he[Ue] = [];
|
|
11738
11738
|
he[Ue][Ue] = (c) => c;
|
|
@@ -11748,11 +11748,11 @@ he[et][et] = (c) => c;
|
|
|
11748
11748
|
he[et][tt] = (c) => c * Wo;
|
|
11749
11749
|
he[bt] = [];
|
|
11750
11750
|
he[bt][bt] = (c) => c;
|
|
11751
|
-
he[bt][
|
|
11751
|
+
he[bt][Rt] = (c) => c * xn;
|
|
11752
11752
|
he[bt][bn] = (c) => c * qo;
|
|
11753
|
-
he[
|
|
11754
|
-
he[
|
|
11755
|
-
he[
|
|
11753
|
+
he[Rt] = [];
|
|
11754
|
+
he[Rt][bt] = (c) => c * Yo;
|
|
11755
|
+
he[Rt][Rt] = (c) => c;
|
|
11756
11756
|
function Tn(c, e, t) {
|
|
11757
11757
|
return he[c][e](t);
|
|
11758
11758
|
}
|
|
@@ -11773,9 +11773,9 @@ const ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11773
11773
|
ft: tt,
|
|
11774
11774
|
fts: bn,
|
|
11775
11775
|
h: Zo,
|
|
11776
|
-
heightMode:
|
|
11776
|
+
heightMode: Ot,
|
|
11777
11777
|
km: et,
|
|
11778
|
-
kmh:
|
|
11778
|
+
kmh: Rt,
|
|
11779
11779
|
m: Ue,
|
|
11780
11780
|
ms: bt,
|
|
11781
11781
|
s: Xo,
|
|
@@ -11789,7 +11789,7 @@ const ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11789
11789
|
<div class="og-units-height"></div>`, el = '<svg width="12" height="12"><g><path stroke-width="1" stroke-opacity="1" d="M6 0L6 12M0 6L12 6" stroke="#337ab7"></path></g></svg>', tl = [Qo, Jo];
|
|
11790
11790
|
class il extends Be {
|
|
11791
11791
|
constructor(e = {}) {
|
|
11792
|
-
super(e), this._type = e.type || 0, this._TYPE_FUNC = [this._SHOW_DECIMAL, this._SHOW_DEGREE], this._showFn = null, this._el = null, this._latSideEl = null, this._lonSideEl = null, this._latValEl = null, this._lonValEl = null, this._heightEl = null, this._altUnitVal = e.altitudeUnit || "m", this._heightModeVal = e.heightMode || "ell", this._altUnit = ys[this._altUnitVal], this._heightMode =
|
|
11792
|
+
super(e), this._type = e.type || 0, this._TYPE_FUNC = [this._SHOW_DECIMAL, this._SHOW_DEGREE], this._showFn = null, this._el = null, this._latSideEl = null, this._lonSideEl = null, this._latValEl = null, this._lonValEl = null, this._heightEl = null, this._altUnitVal = e.altitudeUnit || "m", this._heightModeVal = e.heightMode || "ell", this._altUnit = ys[this._altUnitVal], this._heightMode = Ot[this._heightModeVal], this._lonLat = null, this._centerMode = e.centerMode != null ? e.centerMode : !0;
|
|
11793
11793
|
}
|
|
11794
11794
|
_SHOW_DECIMAL(e) {
|
|
11795
11795
|
if (e) {
|
|
@@ -11810,7 +11810,7 @@ class il extends Be {
|
|
|
11810
11810
|
return e.className = "og-center-icon", e.innerHTML = el, e;
|
|
11811
11811
|
}
|
|
11812
11812
|
_updateUnits() {
|
|
11813
|
-
this._heightMode =
|
|
11813
|
+
this._heightMode = Ot[this._heightModeVal], this._altUnit = ys[this._altUnitVal], this._el.querySelector(".og-units-height").innerHTML = An(this._altUnit), this._showHeight();
|
|
11814
11814
|
}
|
|
11815
11815
|
_refreshCoordinates() {
|
|
11816
11816
|
this._type >= this._TYPE_FUNC.length && (this._type = 0);
|
|
@@ -11829,7 +11829,7 @@ class il extends Be {
|
|
|
11829
11829
|
async _showHeight() {
|
|
11830
11830
|
if (this._lonLat && this.planet) {
|
|
11831
11831
|
let e = 0;
|
|
11832
|
-
this._heightEl.style.opacity = "0.7", this._heightMode ===
|
|
11832
|
+
this._heightEl.style.opacity = "0.7", this._heightMode === Ot.ell ? (e = await this.planet.getHeightAboveELL(this._lonLat), e = Number(_r(!0, Ue, this._altUnit, e))) : this._heightMode === Ot.msl && (e = await this.planet.getHeightDefault(this._lonLat), e = Number(_r(!0, Ue, this._altUnit, e))), this._heightEl.style.opacity = "1.0", this._heightEl.innerHTML = e.toString();
|
|
11833
11833
|
}
|
|
11834
11834
|
}
|
|
11835
11835
|
}
|
|
@@ -12766,7 +12766,7 @@ class Zi {
|
|
|
12766
12766
|
}
|
|
12767
12767
|
pe.createCylinder(0.33, 0, 1, 20, 1, !0, !1, 0, 0, 0);
|
|
12768
12768
|
pe.createCylinder(0.33, 0.33, 1.1, 20, 1, !0, !0, 0, -0.55, 0);
|
|
12769
|
-
function
|
|
12769
|
+
function It(c) {
|
|
12770
12770
|
return new Uint32Array(c);
|
|
12771
12771
|
}
|
|
12772
12772
|
function ul(c) {
|
|
@@ -12779,7 +12779,7 @@ function _l(c) {
|
|
|
12779
12779
|
n = l * c + h, o = (l + 1) * c, a = o + h, e.push(n, a);
|
|
12780
12780
|
e.push(a, o + i);
|
|
12781
12781
|
}
|
|
12782
|
-
return e.push(e[e.length - 1], c * c - c),
|
|
12782
|
+
return e.push(e[e.length - 1], c * c - c), It(e);
|
|
12783
12783
|
}
|
|
12784
12784
|
function gl(c, e) {
|
|
12785
12785
|
let t = [];
|
|
@@ -12790,7 +12790,7 @@ function gl(c, e) {
|
|
|
12790
12790
|
let a = r - c * n - c + 1, o = r - c * s;
|
|
12791
12791
|
t.push(o, a);
|
|
12792
12792
|
}
|
|
12793
|
-
return e === c - 1 && (t.push(c), t.push(0)),
|
|
12793
|
+
return e === c - 1 && (t.push(c), t.push(0)), It(t);
|
|
12794
12794
|
}
|
|
12795
12795
|
function ml(c, e) {
|
|
12796
12796
|
let t = [];
|
|
@@ -12801,7 +12801,7 @@ function ml(c, e) {
|
|
|
12801
12801
|
let n = c + s + 1, a = r;
|
|
12802
12802
|
t.push(a, n);
|
|
12803
12803
|
}
|
|
12804
|
-
return e === c - 1 && (t.push(c - 2), t.push(c - 1)),
|
|
12804
|
+
return e === c - 1 && (t.push(c - 2), t.push(c - 1)), It(t);
|
|
12805
12805
|
}
|
|
12806
12806
|
function pl(c, e) {
|
|
12807
12807
|
let t = [];
|
|
@@ -12812,7 +12812,7 @@ function pl(c, e) {
|
|
|
12812
12812
|
let n = c * (s + 1) + c - 2, a = c + c * r - 1;
|
|
12813
12813
|
t.push(a, n);
|
|
12814
12814
|
}
|
|
12815
|
-
return e === c - 1 && (t.push(c * (c - 1) - 1), t.push(c * c - 1)),
|
|
12815
|
+
return e === c - 1 && (t.push(c * (c - 1) - 1), t.push(c * c - 1)), It(t);
|
|
12816
12816
|
}
|
|
12817
12817
|
function vl(c, e) {
|
|
12818
12818
|
let t = [];
|
|
@@ -12824,7 +12824,7 @@ function vl(c, e) {
|
|
|
12824
12824
|
let o = s - a, l = n - r;
|
|
12825
12825
|
t.push(l, o);
|
|
12826
12826
|
}
|
|
12827
|
-
return e === c - 1 && t.push(c * c - c + 1), t.push(c * c - c),
|
|
12827
|
+
return e === c - 1 && t.push(c * c - c + 1), t.push(c * c - c), It(t);
|
|
12828
12828
|
}
|
|
12829
12829
|
function As(c) {
|
|
12830
12830
|
let e = [[], [], [], []];
|
|
@@ -12871,7 +12871,7 @@ class yl {
|
|
|
12871
12871
|
let i = this.centerIndexesTable[e], r = this.skirtsIndexesTable[te][e][t[te]], s = this.skirtsIndexesTable[$][e][t[$]], n = this.skirtsIndexesTable[ee][e][t[ee]], a = this.skirtsIndexesTable[K][e][t[K]], o = ul(i.length + r.length + s.length + n.length + a.length);
|
|
12872
12872
|
return o.set(i, 0), o.set(r, i.length), o.set(s, i.length + r.length), o.set(n, i.length + r.length + s.length), o.set(a, i.length + r.length + s.length + n.length), o;
|
|
12873
12873
|
} else
|
|
12874
|
-
return
|
|
12874
|
+
return It([0, 2, 1, 3]);
|
|
12875
12875
|
}
|
|
12876
12876
|
initTextureCoordsTable(e) {
|
|
12877
12877
|
let t = [];
|
|
@@ -14787,8 +14787,8 @@ class zl {
|
|
|
14787
14787
|
this.tileOffsetArr[r] = s[0], this.tileOffsetArr[r + 1] = s[1], this.tileOffsetArr[r + 2] = s[2], this.tileOffsetArr[r + 3] = s[3];
|
|
14788
14788
|
}
|
|
14789
14789
|
}
|
|
14790
|
-
const
|
|
14791
|
-
let ot = new p(), lt = new p(), $i = new p(),
|
|
14790
|
+
const Pt = 0, pi = 1, Mn = 2;
|
|
14791
|
+
let ot = new p(), lt = new p(), $i = new p(), Ft = new p(), kt = new p(), Ki = new p(), Dt = new re(), fi = new re();
|
|
14792
14792
|
const ri = new Array(4);
|
|
14793
14793
|
ri[$] = 0;
|
|
14794
14794
|
ri[ee] = 1;
|
|
@@ -14801,7 +14801,7 @@ si[K] = !1;
|
|
|
14801
14801
|
si[te] = !0;
|
|
14802
14802
|
class Rn {
|
|
14803
14803
|
constructor(e, t, i, r) {
|
|
14804
|
-
this.isPole = !1, this._tileGroup =
|
|
14804
|
+
this.isPole = !1, this._tileGroup = Pt, this._projection = zi, this.node = e, this.planet = t, this.handler = t.renderer.handler, this.bsphere = new Qe(), this._plainRadius = 0, this.bbox = new va(), this._sw = new p(), this._nw = new p(), this._se = new p(), this._ne = new p(), this.centerNormal = new p(), this._extent = this._extentMerc = r, this._extentLonLat = new U(), this.gridSize = t.terrain.gridSizeByZoom[i], this.fileGridSize = 0, this.tileZoom = i, this.tileX = 0, this.tileXE = 0, this.tileXW = 0, this.tileYN = 0, this.tileYS = 0, this.tileY = 0, this.tileIndex = "", this._assignTileIndexes(), this.materials = [], this.plainReady = !1, this.initialized = !1, this.normalMapReady = !1, this.terrainReady = !1, this.terrainIsLoading = !1, this.terrainExists = !1, this.passReady = !1, this.plainVertices = null, this.plainVerticesHigh = null, this.plainVerticesLow = null, this.plainNormals = null, this.terrainVertices = null, this.terrainVerticesHigh = null, this.terrainVerticesLow = null, this.noDataVertices = null, this.tempVertices = null, this.tempVerticesHigh = null, this.tempVerticesLow = null, this.normalMapTexture = null, this.normalMapTextureBias = new Float32Array(3), this.normalMapVertices = null, this.normalMapVerticesHigh = null, this.normalMapVerticesLow = null, this.normalMapNormals = null, this.vertexNormalBuffer = null, this.vertexPositionBuffer = null, this.vertexPositionBufferHigh = null, this.vertexPositionBufferLow = null, this.vertexTextureCoordBuffer = null, this._globalTextureCoordinates = new Float32Array(4), this._inTheQueue = !1, this._appliedNeighborsZoom = [0, 0, 0, 0], this._slices = [], this._indexBuffer = null, this.readyToEngage = !1, this.plainProcessing = !1, this.normalMapTexturePtr = null;
|
|
14805
14805
|
}
|
|
14806
14806
|
checkZoom() {
|
|
14807
14807
|
return this.tileZoom < this.planet.terrain._maxNodeZoom;
|
|
@@ -14834,13 +14834,13 @@ class Rn {
|
|
|
14834
14834
|
let r = this.tempVertices;
|
|
14835
14835
|
if (r && r.length) {
|
|
14836
14836
|
let s = this.planet.ellipsoid.getSurfaceNormal3v(e);
|
|
14837
|
-
|
|
14837
|
+
Dt.set(e, s.negateTo());
|
|
14838
14838
|
let n = this._extent.northEast, a = this._extent.southWest, o = Math.sqrt(r.length / 3) - 1, l = n.lon, h = n.lat, d = a.lon, f = a.lat, u = t.lon, g = t.lat, _ = l - d, m = h - f, v = _ / o, b = m / o, y = u - d, w = g - f, x = Math.floor(y / v), T = Math.floor(o - w / b), A = ((o + 1) * T + x) * 3, E = ((o + 1) * (T + 1) + x) * 3;
|
|
14839
|
-
$i.set(r[A], r[A + 1], r[A + 2]),
|
|
14840
|
-
let C =
|
|
14841
|
-
return C === re.INSIDE ? e.distance(i) : C === re.AWAY && (fi.set(e, s), fi.hitTriangle($i,
|
|
14839
|
+
$i.set(r[A], r[A + 1], r[A + 2]), Ft.set(r[A + 3], r[A + 4], r[A + 5]), kt.set(r[E], r[E + 1], r[E + 2]);
|
|
14840
|
+
let C = Dt.hitTriangle($i, Ft, kt, i);
|
|
14841
|
+
return C === re.INSIDE ? e.distance(i) : C === re.AWAY && (fi.set(e, s), fi.hitTriangle($i, Ft, kt, i) === re.INSIDE) ? -e.distance(i) : (Ki.set(r[E + 3], r[E + 4], r[E + 5]), C = Dt.hitTriangle(Ft, Ki, kt, i), C === re.INSIDE ? e.distance(i) : C === re.AWAY && (fi.set(e, s), fi.hitTriangle(Ft, Ki, kt, i) === re.INSIDE) || C === re.AWAY ? -e.distance(i) : e.distance(i));
|
|
14842
14842
|
} else
|
|
14843
|
-
return e.distance(this.planet.ellipsoid.hitRay(
|
|
14843
|
+
return e.distance(this.planet.ellipsoid.hitRay(Dt.origin, Dt.direction));
|
|
14844
14844
|
}
|
|
14845
14845
|
/**
|
|
14846
14846
|
* Project wgs86 to segment native projection.
|
|
@@ -15053,7 +15053,7 @@ class Rn {
|
|
|
15053
15053
|
e.southWest.lon < t.southWest.lon && (t.southWest.lon = e.southWest.lon), e.northEast.lon > t.northEast.lon && (t.northEast.lon = e.northEast.lon), e.southWest.lat < t.southWest.lat && (t.southWest.lat = e.southWest.lat), e.northEast.lat > t.northEast.lat && (t.northEast.lat = e.northEast.lat);
|
|
15054
15054
|
}
|
|
15055
15055
|
_assignTileIndexes() {
|
|
15056
|
-
this._tileGroup =
|
|
15056
|
+
this._tileGroup = Pt;
|
|
15057
15057
|
const e = this.tileZoom, t = this._extent, i = se;
|
|
15058
15058
|
this.tileX = Math.round(Math.abs(-i - t.southWest.lon) / (t.northEast.lon - t.southWest.lon)), this.tileY = Math.round(Math.abs(i - t.northEast.lat) / (t.northEast.lat - t.southWest.lat));
|
|
15059
15059
|
const r = Math.pow(2, e);
|
|
@@ -15215,14 +15215,14 @@ let W = {
|
|
|
15215
15215
|
xmax: 0,
|
|
15216
15216
|
ymax: 0,
|
|
15217
15217
|
zmax: 0
|
|
15218
|
-
}, Qi = class
|
|
15218
|
+
}, Qi = class Vt {
|
|
15219
15219
|
constructor(e, t, i, r, s, n, a) {
|
|
15220
15220
|
t._createdNodesCount++, this.SegmentPrototype = e, this.planet = t, this.parentNode = r, this.partId = i, this.nodeId = i + s, this.state = null, this.appliedTerrainNodeId = -1, this.sideSizeLog2 = [0, 0, 0, 0], this.ready = !1, this.neighbors = [[], [], [], []], this.equalizedSideWithNodeId = [this.nodeId, this.nodeId, this.nodeId, this.nodeId], this.nodes = [], this.segment = new e(this, t, n, a), this._cameraInside = !1, this.inFrustum = 0, this.createBounds();
|
|
15221
15221
|
}
|
|
15222
15222
|
createChildrenNodes() {
|
|
15223
15223
|
this.ready = !0;
|
|
15224
15224
|
const e = this.planet, t = this.segment, i = t._extent, r = t.tileZoom + 1, s = i.getWidth() * 0.5, n = i.getHeight() * 0.5, a = i.northEast, o = i.southWest, l = this.nodeId * 4 + 1, h = new B(o.lon + s, o.lat + n), d = this.nodes;
|
|
15225
|
-
d[Q] = new
|
|
15225
|
+
d[Q] = new Vt(this.SegmentPrototype, e, Q, this, l, r, new U(new B(o.lon, o.lat + n), new B(o.lon + s, a.lat))), d[ue] = new Vt(this.SegmentPrototype, e, ue, this, l, r, new U(h, new B(a.lon, a.lat))), d[_e] = new Vt(this.SegmentPrototype, e, _e, this, l, r, new U(new B(o.lon, o.lat), h)), d[ge] = new Vt(this.SegmentPrototype, e, ge, this, l, r, new U(new B(o.lon + s, o.lat), new B(a.lon, o.lat + n)));
|
|
15226
15226
|
}
|
|
15227
15227
|
createBounds() {
|
|
15228
15228
|
let e = this.segment;
|
|
@@ -15348,13 +15348,13 @@ let W = {
|
|
|
15348
15348
|
if (t.tileX === 0 && i.tileX === Math.pow(2, i.tileZoom) - 1 && (d <= _ && u >= v || d >= _ && u <= v))
|
|
15349
15349
|
return te;
|
|
15350
15350
|
}
|
|
15351
|
-
if (t._tileGroup ===
|
|
15351
|
+
if (t._tileGroup === Pt && i._tileGroup === pi && t.tileY === 0 && i.tileY === Math.pow(2, i.tileZoom) - 1 && (f >= m && h <= g || f <= m && h >= g))
|
|
15352
15352
|
return $;
|
|
15353
|
-
if (t._tileGroup === Mn && i._tileGroup ===
|
|
15353
|
+
if (t._tileGroup === Mn && i._tileGroup === Pt && t.tileY === 0 && i.tileY === Math.pow(2, i.tileZoom) - 1 && (f >= m && h <= g || f <= m && h >= g))
|
|
15354
15354
|
return $;
|
|
15355
|
-
if (i._tileGroup === pi && t._tileGroup ===
|
|
15355
|
+
if (i._tileGroup === pi && t._tileGroup === Pt && t.tileY === Math.pow(2, t.tileZoom) - 1 && i.tileY === 0 && (f >= m && h <= g || f <= m && h >= g))
|
|
15356
15356
|
return K;
|
|
15357
|
-
if (t._tileGroup === pi && i._tileGroup ===
|
|
15357
|
+
if (t._tileGroup === pi && i._tileGroup === Pt && t.tileY === Math.pow(2, t.tileZoom) - 1 && i.tileY === 0 && (f >= m && h <= g || f <= m && h >= g))
|
|
15358
15358
|
return K;
|
|
15359
15359
|
}
|
|
15360
15360
|
return -1;
|
|
@@ -15793,13 +15793,13 @@ class Hl {
|
|
|
15793
15793
|
let b = new B(e[0].lon + v * r.lon, e[0].lat + v * r.lat), y = new B(e[1].lon + v * s.lon, e[1].lat + v * s.lat);
|
|
15794
15794
|
for (let w = 0; w <= i; w++) {
|
|
15795
15795
|
let x = new B(e[0].lon + w * n.lon, e[0].lat + w * n.lat), T = new B(e[3].lon + w * a.lon, e[3].lat + w * a.lat), A = sa(b, y, x, T);
|
|
15796
|
-
|
|
15796
|
+
Ct(A.lon, m), h[u++] = m[0], d[g++] = m[1], Ct(A.lat, m), h[u++] = m[0], d[g++] = m[1], f[_++] = A;
|
|
15797
15797
|
}
|
|
15798
15798
|
}
|
|
15799
15799
|
if (t)
|
|
15800
15800
|
for (let v = 0; v < l; v++) {
|
|
15801
15801
|
let b = f[v].forwardMercator();
|
|
15802
|
-
|
|
15802
|
+
Ct(b.lon, m), h[v * 2] = m[0], d[v * 2] = m[1], Ct(b.lat, m), h[v * 2 + 1] = m[0], d[v * 2 + 1] = m[1];
|
|
15803
15803
|
}
|
|
15804
15804
|
return [
|
|
15805
15805
|
this._planet.renderer.handler.createArrayBuffer(h, 2, l),
|
|
@@ -17947,7 +17947,7 @@ class Zl {
|
|
|
17947
17947
|
let b = m._updateTexture || e.createEmptyTexture_l(a, o), y = v ? m._updatePickingMask || e.createEmptyTexture_n(a, o) : null;
|
|
17948
17948
|
m.applyTexture(b, y), u.setSize(a, o), u.bindOutputTexture(b), t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT);
|
|
17949
17949
|
let w = m.segment.getExtentMerc();
|
|
17950
|
-
|
|
17950
|
+
Ct(w.southWest.lon, Et), d[0] = Et[0], f[0] = Et[1], Ct(w.southWest.lat, Et), d[1] = Et[0], f[1] = Et[1], d[2] = 2 / w.getWidth(), d[3] = 2 / w.getHeight(), r.activate();
|
|
17951
17951
|
let x = r._program, T = x.attributes, A = x.uniforms, E = m.layer._geometryHandler;
|
|
17952
17952
|
t.uniform4fv(A.extentParamsHigh, d), t.uniform4fv(A.extentParamsLow, f), t.bindBuffer(t.ARRAY_BUFFER, E._polyVerticesHighBufferMerc), t.vertexAttribPointer(T.coordinatesHigh, E._polyVerticesHighBufferMerc.itemSize, t.FLOAT, !1, 0, 0), t.bindBuffer(t.ARRAY_BUFFER, E._polyVerticesLowBufferMerc), t.vertexAttribPointer(T.coordinatesLow, E._polyVerticesLowBufferMerc.itemSize, t.FLOAT, !1, 0, 0), t.bindBuffer(t.ARRAY_BUFFER, E._polyColorsBuffer), t.vertexAttribPointer(T.colors, E._polyColorsBuffer.itemSize, t.FLOAT, !1, 0, 0), t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, E._polyIndexesBuffer), t.drawElements(t.TRIANGLES, E._polyIndexesBuffer.numItems, t.UNSIGNED_INT, 0), v && (u.bindOutputTexture(y), t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, E._polyPickingColorsBuffer), t.vertexAttribPointer(T.colors, E._polyPickingColorsBuffer.itemSize, t.FLOAT, !1, 0, 0), t.drawElements(t.TRIANGLES, E._polyIndexesBuffer.numItems, t.UNSIGNED_INT, 0)), u.bindOutputTexture(b), i.activate(), x = i._program, T = x.attributes, A = x.uniforms, t.uniform2fv(A.viewport, [a, o]), t.uniform4fv(A.extentParamsHigh, d), t.uniform4fv(A.extentParamsLow, f);
|
|
17953
17953
|
let C = E._lineVerticesHighBufferMerc;
|
|
@@ -19261,7 +19261,7 @@ class nh extends ni {
|
|
|
19261
19261
|
return this._requestCount++, this._s[Math.floor(this._requestCount % (this._requestsPeerSubdomain * this._s.length) / this._requestsPeerSubdomain)];
|
|
19262
19262
|
}
|
|
19263
19263
|
_buildURL(e, t, i) {
|
|
19264
|
-
return
|
|
19264
|
+
return St(this.url, {
|
|
19265
19265
|
s: this._getSubdomain(),
|
|
19266
19266
|
x: e.toString(),
|
|
19267
19267
|
y: t.toString(),
|
|
@@ -19415,7 +19415,7 @@ class Ss extends Ve {
|
|
|
19415
19415
|
* @returns {string} - Returns url string.
|
|
19416
19416
|
*/
|
|
19417
19417
|
_createUrl(e) {
|
|
19418
|
-
return
|
|
19418
|
+
return St(this.url, {
|
|
19419
19419
|
s: this._getSubdomain(),
|
|
19420
19420
|
x: e.tileX.toString(),
|
|
19421
19421
|
y: e.tileY.toString(),
|
|
@@ -19689,7 +19689,7 @@ class yi {
|
|
|
19689
19689
|
LINEAR: this.createTexture_l,
|
|
19690
19690
|
MIPMAP: this.createTexture_mm,
|
|
19691
19691
|
ANISOTROPIC: this.createTexture_a
|
|
19692
|
-
}, this.createTextureDefault = this.createTexture_n, this.ONCANVASRESIZE = null, this._createCanvas(), (t.autoActivate ||
|
|
19692
|
+
}, this.createTextureDefault = this.createTexture_n, this.ONCANVASRESIZE = null, this._createCanvas(), (t.autoActivate || Lt(t.autoActivate)) && this.initialize();
|
|
19693
19693
|
}
|
|
19694
19694
|
isInitialized() {
|
|
19695
19695
|
return this._initialized;
|
|
@@ -20469,7 +20469,7 @@ function _h(c) {
|
|
|
20469
20469
|
return new yh(c);
|
|
20470
20470
|
}
|
|
20471
20471
|
const gh = 1, mh = 2, ph = 4, vh = (c) => !(c[0] || c[1] || c[2]), xh = (c) => !!(c[0] || c[1] || c[2]);
|
|
20472
|
-
let $e = new Uint8Array(4),
|
|
20472
|
+
let $e = new Uint8Array(4), Nt = new Uint8Array(4), Ht = new Uint8Array(4);
|
|
20473
20473
|
class yh extends Jt {
|
|
20474
20474
|
constructor(e) {
|
|
20475
20475
|
super(bh), this.renderer = e, this._touchHandler = new uh(e.handler.canvas), this._mouseHandler = new fh(e.handler.canvas), this._keyboardHandler = new dh(), this._active = !0, this.clickRadius = 15, this.mouseState = {
|
|
@@ -20641,10 +20641,10 @@ class yh extends Jt {
|
|
|
20641
20641
|
let n = s.rendererEvents;
|
|
20642
20642
|
t.pickingObject = s, n && n.dispatch(n.mouseleave, t), e.pickingObject = s, n && n.dispatch(n.touchleave, e);
|
|
20643
20643
|
}
|
|
20644
|
-
$e[0] = $e[1] = $e[2] = $e[3] =
|
|
20644
|
+
$e[0] = $e[1] = $e[2] = $e[3] = Ht[0] = Ht[1] = Ht[2] = Ht[3] = Nt[0] = Nt[1] = Nt[2] = Nt[3] = 0;
|
|
20645
20645
|
}
|
|
20646
20646
|
if (this._isMouseInside && !(t.leftButtonHold || t.rightButtonHold || t.middleButtonHold)) {
|
|
20647
|
-
let i = this.renderer, r = $e, s =
|
|
20647
|
+
let i = this.renderer, r = $e, s = Ht, n = Nt;
|
|
20648
20648
|
e.x || e.y ? i.readPickingColor(e.nx, 1 - e.ny, n) : i.readPickingColor(t.nx, 1 - t.ny, n), s[0] = r[0], s[1] = r[1], s[2] = r[2], r[0] = n[0], r[1] = n[1], r[2] = n[2], t.pickingObject = null, e.pickingObject = null;
|
|
20649
20649
|
let a = i.getPickingObjectArr(r);
|
|
20650
20650
|
if (t.pickingObject = a, e.pickingObject = a, r[0] !== s[0] || r[1] !== s[1] || r[2] !== s[2])
|
|
@@ -21377,7 +21377,7 @@ class Sh {
|
|
|
21377
21377
|
this.controls[t.controls[s].name] = t.controls[s];
|
|
21378
21378
|
this.controlsBag = {}, this.colorObjects = /* @__PURE__ */ new Map(), this._pickingCallbacks = [], this.pickingFramebuffer = null, this._tempPickingPix_ = new Uint8Array([]), this.distanceFramebuffer = null, this._distanceCallbacks = [], this._tempDistancePix_ = new Uint8Array([]), this._depthCallbacks = [], this.depthFramebuffer = null;
|
|
21379
21379
|
let i = new URLSearchParams(location.search);
|
|
21380
|
-
i.get("og_msaa") ? this._msaa = Number(i.get("og_msaa")) : this._msaa = t.msaa != null ? t.msaa : Lh, this._internalFormat = "RGBA16F", this._format = "RGBA", this._type = "FLOAT", this.sceneFramebuffer = null, this.blitFramebuffer = null, this.toneMappingFramebuffer = null, this._initialized = !1, this.billboardsTextureAtlas = new mr(), this.geoObjectsTextureAtlas = new mr(), this.fontAtlas = new Eh(t.fontsSrc), this._entityCollections = [], this._currentOutput = "screen", this._fnScreenFrame = null, this.labelWorker = new Ia(4), this.__useDistanceFramebuffer__ = !0, this.screenDepthFramebuffer = null, this.screenFramePositionBuffer = null, this.screenTexture = {}, this.outputTexture = null, this._skipDistanceFrame = !1, this._distancePixelBuffer = null, this._skipPickingFrame = !1, this._pickingPixelBuffer = null, this._readDistanceBuffer = this._readDistanceBuffer_webgl2, this._readPickingBuffer = this._readPickingBuffer_webgl2, (t.autoActivate ||
|
|
21380
|
+
i.get("og_msaa") ? this._msaa = Number(i.get("og_msaa")) : this._msaa = t.msaa != null ? t.msaa : Lh, this._internalFormat = "RGBA16F", this._format = "RGBA", this._type = "FLOAT", this.sceneFramebuffer = null, this.blitFramebuffer = null, this.toneMappingFramebuffer = null, this._initialized = !1, this.billboardsTextureAtlas = new mr(), this.geoObjectsTextureAtlas = new mr(), this.fontAtlas = new Eh(t.fontsSrc), this._entityCollections = [], this._currentOutput = "screen", this._fnScreenFrame = null, this.labelWorker = new Ia(4), this.__useDistanceFramebuffer__ = !0, this.screenDepthFramebuffer = null, this.screenFramePositionBuffer = null, this.screenTexture = {}, this.outputTexture = null, this._skipDistanceFrame = !1, this._distancePixelBuffer = null, this._skipPickingFrame = !1, this._pickingPixelBuffer = null, this._readDistanceBuffer = this._readDistanceBuffer_webgl2, this._readPickingBuffer = this._readPickingBuffer_webgl2, (t.autoActivate || Lt(t.autoActivate)) && this.start();
|
|
21381
21381
|
}
|
|
21382
21382
|
enableBlendOneSrcAlpha() {
|
|
21383
21383
|
let e = this.handler.gl;
|
|
@@ -21830,9 +21830,9 @@ class Sh {
|
|
|
21830
21830
|
}
|
|
21831
21831
|
}
|
|
21832
21832
|
const Ih = "/night.png", zh = "/spec.png", Os = "/res", Fh = "globus_planet_";
|
|
21833
|
-
class
|
|
21833
|
+
class Mt {
|
|
21834
21834
|
constructor(e) {
|
|
21835
|
-
this.$target = null, this._instanceID = `__globus${
|
|
21835
|
+
this.$target = null, this._instanceID = `__globus${Mt.__counter__++ ? Mt.__counter__ : ""}__`, window[this._instanceID] = this, this._canvas = document.createElement("canvas"), this._canvas.id = `canvas${this._instanceID}`, this._canvas.style.width = "100%", this._canvas.style.height = "100%", this._canvas.style.display = "block", this._canvas.style.opacity = "0.0", this._canvas.style.transition = "opacity 150ms", this.$inner = document.createElement("div"), this.$inner.classList.add("og-inner"), this.$inner.appendChild(this._canvas), this.$inner.attributions = document.createElement("div"), e.attributionContainer ? e.attributionContainer.appendChild(this.$inner.attributions) : (this.$inner.attributions.classList.add("og-attribution"), this.$inner.appendChild(this.$inner.attributions)), e.target && this.attachTo(e.target);
|
|
21836
21836
|
const t = (n) => {
|
|
21837
21837
|
n.preventDefault();
|
|
21838
21838
|
};
|
|
@@ -21855,7 +21855,7 @@ class Rt {
|
|
|
21855
21855
|
autoActivate: !1,
|
|
21856
21856
|
msaa: e.msaa,
|
|
21857
21857
|
fontsSrc: e.fontsSrc
|
|
21858
|
-
}), this.renderer.div = this.$inner, e.skybox && this.renderer.addNode(e.skybox), this._planetName = e.name ? e.name : Fh +
|
|
21858
|
+
}), this.renderer.div = this.$inner, e.skybox && this.renderer.addNode(e.skybox), this._planetName = e.name ? e.name : Fh + Mt.__counter__, this.planet = new rh({
|
|
21859
21859
|
name: this._planetName,
|
|
21860
21860
|
frustums: e.frustums,
|
|
21861
21861
|
ellipsoid: e.ellipsoid,
|
|
@@ -21887,7 +21887,7 @@ class Rt {
|
|
|
21887
21887
|
}
|
|
21888
21888
|
r ? this.sun = r : (this.sun = new ws(), this.planet.addControl(this.sun)), e.sun && (e.sun.active !== void 0 && !e.sun.active && this.sun.deactivate(), e.sun.stopped === !0 && this.sun.stop()), e.layers && this.planet.addLayers(e.layers);
|
|
21889
21889
|
let s = e.viewExtent;
|
|
21890
|
-
s && (s instanceof Array ? this.planet.viewExtentArr(s) : this.planet.viewExtent(s)), (e.autoActivate ||
|
|
21890
|
+
s && (s instanceof Array ? this.planet.viewExtentArr(s) : this.planet.viewExtent(s)), (e.autoActivate || Lt(e.autoActivate)) && this.start();
|
|
21891
21891
|
}
|
|
21892
21892
|
start() {
|
|
21893
21893
|
this.renderer.start(), this.fadeIn();
|
|
@@ -21918,34 +21918,34 @@ class Rt {
|
|
|
21918
21918
|
this.detach(), this.renderer.destroy();
|
|
21919
21919
|
}
|
|
21920
21920
|
}
|
|
21921
|
-
|
|
21922
|
-
let
|
|
21921
|
+
Mt.__counter__ = 0;
|
|
21922
|
+
let Ut = null;
|
|
21923
21923
|
const Fn = kn({
|
|
21924
|
-
|
|
21925
|
-
|
|
21924
|
+
globus: null,
|
|
21925
|
+
setGlobus: () => {
|
|
21926
21926
|
}
|
|
21927
21927
|
}), kh = ({ children: c }) => {
|
|
21928
|
-
const [e, t] = Dn(
|
|
21929
|
-
return /* @__PURE__ */ ir.createElement(Fn.Provider, { value: {
|
|
21930
|
-
}, Dh = () => Nn(Fn), Oh = ({
|
|
21931
|
-
const
|
|
21928
|
+
const [e, t] = Dn(Ut);
|
|
21929
|
+
return /* @__PURE__ */ ir.createElement(Fn.Provider, { value: { globus: e, setGlobus: t } }, c);
|
|
21930
|
+
}, Dh = () => Nn(Fn), Oh = ({ options: c, children: e }) => {
|
|
21931
|
+
const t = Hn(null), { setGlobus: i } = Dh();
|
|
21932
21932
|
return On(() => {
|
|
21933
|
-
if (
|
|
21934
|
-
|
|
21933
|
+
if (Ut)
|
|
21934
|
+
t.current = Ut.$target;
|
|
21935
21935
|
else {
|
|
21936
|
-
let
|
|
21937
|
-
for (var
|
|
21938
|
-
var
|
|
21939
|
-
|
|
21936
|
+
let r = function(a, o, l) {
|
|
21937
|
+
for (var h = "", d = l; d > 0; d--) {
|
|
21938
|
+
var f = 0, u = 1 << d - 1;
|
|
21939
|
+
a & u && f++, o & u && (f += 2), h += f.toString();
|
|
21940
21940
|
}
|
|
21941
|
-
return
|
|
21941
|
+
return h;
|
|
21942
21942
|
};
|
|
21943
|
-
const
|
|
21943
|
+
const s = new Ss("OpenStreetMap", {
|
|
21944
21944
|
isBaseLayer: !0,
|
|
21945
21945
|
url: "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
21946
21946
|
visibility: !0,
|
|
21947
21947
|
attribution: "Data @ OpenStreetMap contributors, ODbL"
|
|
21948
|
-
}),
|
|
21948
|
+
}), n = new Ss("sat", {
|
|
21949
21949
|
isBaseLayer: !0,
|
|
21950
21950
|
subdomains: ["t0", "t1", "t2", "t3"],
|
|
21951
21951
|
url: "https://ecn.{s}.tiles.virtualearth.net/tiles/a{quad}.jpeg?n=z&g=7146",
|
|
@@ -21958,27 +21958,29 @@ const Fn = kn({
|
|
|
21958
21958
|
ambient: "rgb(100,100,140)",
|
|
21959
21959
|
diffuse: "rgb(450,450,450)",
|
|
21960
21960
|
nightTextureCoefficient: 2.7,
|
|
21961
|
-
urlRewrite: function(
|
|
21962
|
-
return
|
|
21961
|
+
urlRewrite: function(a, o) {
|
|
21962
|
+
return St(o, { s: this._getSubdomain(), quad: r(a.tileX, a.tileY, a.tileZoom) });
|
|
21963
21963
|
}
|
|
21964
21964
|
});
|
|
21965
|
-
|
|
21966
|
-
target:
|
|
21965
|
+
Ut = new Mt({
|
|
21966
|
+
target: t.current,
|
|
21967
21967
|
name: "Earth",
|
|
21968
21968
|
terrain: new nh(),
|
|
21969
|
-
layers: [
|
|
21970
|
-
autoActivate: !0
|
|
21971
|
-
|
|
21972
|
-
|
|
21969
|
+
layers: [s, n],
|
|
21970
|
+
autoActivate: !0,
|
|
21971
|
+
atmosphereEnabled: !0,
|
|
21972
|
+
...c
|
|
21973
|
+
});
|
|
21973
21974
|
}
|
|
21974
|
-
|
|
21975
|
+
return i(Ut), () => {
|
|
21976
|
+
};
|
|
21975
21977
|
}, []), /* @__PURE__ */ ir.createElement(kh, null, /* @__PURE__ */ ir.createElement("div", { style: {
|
|
21976
21978
|
width: "100%",
|
|
21977
21979
|
height: "100%"
|
|
21978
|
-
}, id: "globus", ref:
|
|
21980
|
+
}, id: "globus", ref: t }, e));
|
|
21979
21981
|
};
|
|
21980
21982
|
export {
|
|
21981
|
-
kh as
|
|
21983
|
+
kh as GlobusContextProvider,
|
|
21982
21984
|
Oh as default,
|
|
21983
21985
|
Dh as useGlobusContext
|
|
21984
21986
|
};
|