@openglobus/openglobus-react 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +97 -94
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +21 -21
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/Globe/Globe.d.ts +3 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const En = Cn({
|
|
|
7
7
|
}), fd = ({ children: a }) => {
|
|
8
8
|
const [e, t] = dt(null);
|
|
9
9
|
return /* @__PURE__ */ Oe.createElement(En.Provider, { value: { globe: e, setGlobe: t } }, a);
|
|
10
|
-
}, mt = () => Tn(En), Gi = 2 * Math.PI, An = Math.PI / 2, sl = Number.MAX_VALUE || 17976931348623157e292, xs = Math.log(2), Et = 2147483647, ye = 549755748352, Ce = -549755748352,
|
|
10
|
+
}, mt = () => Tn(En), Gi = 2 * Math.PI, An = Math.PI / 2, sl = Number.MAX_VALUE || 17976931348623157e292, xs = Math.log(2), Et = 2147483647, ye = 549755748352, Ce = -549755748352, j = Math.PI / 180, J = 180 / Math.PI, Yr = 2 * J, ot = 0.5 * j, Ln = Math.sqrt(0.5), Pn = 1e-5, it = 1e-10, br = 1e-12, wr = 1e-14;
|
|
11
11
|
function ji(a, e, t) {
|
|
12
12
|
return Math.max(e, Math.min(a, t));
|
|
13
13
|
}
|
|
@@ -46,10 +46,10 @@ function Cr(a) {
|
|
|
46
46
|
return a - 360 * Math.floor(a / 360);
|
|
47
47
|
}
|
|
48
48
|
Object.freeze(Object.defineProperty({ __proto__: null, ARCSECONDS_TO_RADIANS: 484813681109536e-20, DEG2RAD: function(a) {
|
|
49
|
-
return a *
|
|
49
|
+
return a * j;
|
|
50
50
|
}, DEGREES: J, DEGREES_DOUBLE: Yr, DEGREES_TO_HOURS: 1 / 15, EPS1: 0.1, EPS10: it, EPS11: 1e-11, EPS12: br, EPS13: 1e-13, EPS14: wr, EPS15: 1e-15, EPS16: 1e-16, EPS17: 1e-17, EPS18: 1e-18, EPS19: 1e-19, EPS2: 0.01, EPS20: 1e-20, EPS3: 1e-3, EPS4: 1e-4, EPS5: Pn, EPS6: 1e-6, EPS7: 1e-7, EPS8: 1e-8, EPS9: 1e-9, HOURS_TO_DEGREES: 15, HOURS_TO_RADIANS: 0.26179938779914946, LOG2: xs, MAX: ye, MAX32: Et, MAX_FLOAT: sl, MIN: Ce, PI_TWO: An, RAD2DEG: function(a) {
|
|
51
51
|
return a * J;
|
|
52
|
-
}, RADIANS:
|
|
52
|
+
}, RADIANS: j, RADIANS_HALF: ot, RADIANS_TO_HOURS: 3.819718634205488, SQRT_HALF: Ln, TWO_PI: Gi, W: 3, X: 0, Y: 1, Z: 2, bezier1v: function(a, e, t, i, r) {
|
|
53
53
|
return ir(1 - a) * e + 3 * rr(1 - a) * a * t + 3 * (1 - a) * rr(a) * i + ir(a) * r;
|
|
54
54
|
}, bezier3v: function(a, e, t, i, r) {
|
|
55
55
|
let s = 1 - a, n = a * a, o = s * s, l = o * s, h = n * a;
|
|
@@ -157,7 +157,7 @@ function zn(a) {
|
|
|
157
157
|
}
|
|
158
158
|
function Wt(a, e, t) {
|
|
159
159
|
let i = Wi / (1 << t), r = new A(a * i - 2003750834e-2, Ee - e * i - i);
|
|
160
|
-
return new
|
|
160
|
+
return new G(r, new A(r.lon + i, r.lat + i));
|
|
161
161
|
}
|
|
162
162
|
const ce = zn(Ee), He = -ce;
|
|
163
163
|
Object.freeze(Object.defineProperty({ __proto__: null, INV_POLE_BY_180: Bn, MAX_LAT: ce, MIN_LAT: He, ONE_BY_POLE_DOUBLE: ri, PI_BY_POLE: Wr, POLE: Ee, POLE2: Wi, POLE_BY_180: Ii, POLE_BY_PI: Gt, POLE_DOUBLE: In, forward: qi, forwardArray: function(a) {
|
|
@@ -171,12 +171,12 @@ Object.freeze(Object.defineProperty({ __proto__: null, INV_POLE_BY_180: Bn, MAX_
|
|
|
171
171
|
}, inverse_lat: zn, inverse_lon: function(a) {
|
|
172
172
|
return 180 * a / Ee;
|
|
173
173
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
174
|
-
class
|
|
174
|
+
class G {
|
|
175
175
|
constructor(e = new A(), t = new A()) {
|
|
176
176
|
this.southWest = e, this.northEast = t;
|
|
177
177
|
}
|
|
178
178
|
static createFromArray(e) {
|
|
179
|
-
return new
|
|
179
|
+
return new G(new A(e[0], e[1]), new A(e[2], e[3]));
|
|
180
180
|
}
|
|
181
181
|
static createByCoordinates(e) {
|
|
182
182
|
let t = ye, i = Ce, r = ye, s = Ce;
|
|
@@ -184,7 +184,7 @@ class j {
|
|
|
184
184
|
const o = e[n];
|
|
185
185
|
o.lon < t && (t = o.lon), o.lon > i && (i = o.lon), o.lat < r && (r = o.lat), o.lat > s && (s = o.lat);
|
|
186
186
|
}
|
|
187
|
-
return new
|
|
187
|
+
return new G(new A(t, r), new A(i, s));
|
|
188
188
|
}
|
|
189
189
|
static createByCoordinatesArr(e) {
|
|
190
190
|
let t = ye, i = Ce, r = ye, s = Ce;
|
|
@@ -192,11 +192,11 @@ class j {
|
|
|
192
192
|
const o = e[n];
|
|
193
193
|
o[0] < t && (t = o[0]), o[0] > i && (i = o[0]), o[1] < r && (r = o[1]), o[1] > s && (s = o[1]);
|
|
194
194
|
}
|
|
195
|
-
return new
|
|
195
|
+
return new G(new A(t, r), new A(i, s));
|
|
196
196
|
}
|
|
197
197
|
static fromTile(e, t, i, r = 4007501668e-2, s = 4007501668e-2) {
|
|
198
198
|
const n = 1 << i, o = r / n, l = s / n, h = 0.5 * -r + e * o, c = 0.5 * s - t * l, d = h + o;
|
|
199
|
-
return new
|
|
199
|
+
return new G(new A(h, c - l), new A(d, c));
|
|
200
200
|
}
|
|
201
201
|
setByCoordinates(e) {
|
|
202
202
|
let t = ye, i = Ce, r = ye, s = Ce;
|
|
@@ -221,7 +221,7 @@ class j {
|
|
|
221
221
|
return this.northEast.lat - this.southWest.lat;
|
|
222
222
|
}
|
|
223
223
|
clone() {
|
|
224
|
-
return new
|
|
224
|
+
return new G(this.southWest.clone(), this.northEast.clone());
|
|
225
225
|
}
|
|
226
226
|
getCenter() {
|
|
227
227
|
const e = this.southWest, t = this.northEast;
|
|
@@ -255,10 +255,10 @@ class j {
|
|
|
255
255
|
return this.southWest.lon === e.southWest.lon && this.southWest.lat === e.southWest.lat && this.northEast.lon === e.northEast.lon && this.northEast.lat === e.northEast.lat;
|
|
256
256
|
}
|
|
257
257
|
forwardMercator() {
|
|
258
|
-
return new
|
|
258
|
+
return new G(this.southWest.forwardMercator(), this.northEast.forwardMercator());
|
|
259
259
|
}
|
|
260
260
|
inverseMercator() {
|
|
261
|
-
return new
|
|
261
|
+
return new G(this.southWest.inverseMercator(), this.northEast.inverseMercator());
|
|
262
262
|
}
|
|
263
263
|
getCartesianBounds(e) {
|
|
264
264
|
let t = ye, i = Ce, r = ye, s = Ce, n = ye, o = Ce;
|
|
@@ -1168,8 +1168,8 @@ class qr {
|
|
|
1168
1168
|
this._e = i / e, this._e2 = this._e * this._e, this._e22 = this._e2 * this._e2, this._k = i / t, this._k2 = this._k * this._k, this._radii = new v(e, e, t), this._radii2 = new v(this._a2, this._a2, this._b2), this._invRadii = new v(1 / e, 1 / e, 1 / t), this._invRadii2 = new v(1 / this._a2, 1 / this._a2, 1 / this._b2);
|
|
1169
1169
|
}
|
|
1170
1170
|
rhumbDistanceTo(e, t) {
|
|
1171
|
-
const i = e.lat *
|
|
1172
|
-
let n = Math.abs(t.lon - e.lon) *
|
|
1171
|
+
const i = e.lat * j, r = t.lat * j, s = r - i;
|
|
1172
|
+
let n = Math.abs(t.lon - e.lon) * j;
|
|
1173
1173
|
Math.abs(n) > Math.PI && (n = n > 0 ? -(2 * Math.PI - n) : 2 * Math.PI + n);
|
|
1174
1174
|
const o = Math.log(Math.tan(r / 2 + Math.PI / 4) / Math.tan(i / 2 + Math.PI / 4)), l = Math.abs(o) > 1e-11 ? s / o : Math.cos(i);
|
|
1175
1175
|
return Math.sqrt(s * s + l * l * n * n) * this._a;
|
|
@@ -1181,7 +1181,7 @@ class qr {
|
|
|
1181
1181
|
return isNaN(n) ? e : this.getGreatCircleDestination(e, n, s * i);
|
|
1182
1182
|
}
|
|
1183
1183
|
static getBearing(e, t) {
|
|
1184
|
-
let i = e.lat *
|
|
1184
|
+
let i = e.lat * j, r = e.lon * j, s = t.lat * j, n = t.lon * j, o = Math.sin(n - r) * Math.cos(s), l = Math.cos(i) * Math.sin(s) - Math.sin(i) * Math.cos(s) * Math.cos(n - r);
|
|
1185
1185
|
return Math.atan2(o, l) * J;
|
|
1186
1186
|
}
|
|
1187
1187
|
getFlattening() {
|
|
@@ -1212,7 +1212,7 @@ class qr {
|
|
|
1212
1212
|
return this.geodeticToCartesian(e.lon, e.lat, e.height, t);
|
|
1213
1213
|
}
|
|
1214
1214
|
geodeticToCartesian(e, t, i = 0, r = new v()) {
|
|
1215
|
-
let s =
|
|
1215
|
+
let s = j * t, n = j * e, o = Math.sin(s), l = this._a / Math.sqrt(1 - this._e2 * o * o), h = (l + i) * Math.cos(s);
|
|
1216
1216
|
return r.x = h * Math.cos(n), r.y = h * Math.sin(n), r.z = (l * (1 - this._e2) + i) * o, r;
|
|
1217
1217
|
}
|
|
1218
1218
|
projToSurface(e) {
|
|
@@ -1248,7 +1248,7 @@ class qr {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
inverse(e, t) {
|
|
1250
1250
|
let i = this._a, r = this._b, s = this._flattening;
|
|
1251
|
-
const n = e.lat *
|
|
1251
|
+
const n = e.lat * j, o = e.lon * j, l = t.lat * j, h = t.lon * j - o, c = (1 - s) * Math.tan(n), d = 1 / Math.sqrt(1 + c * c), u = c * d, g = (1 - s) * Math.tan(l), f = 1 / Math.sqrt(1 + g * g), p = g * f, _ = Math.abs(h) > Math.PI / 2 || Math.abs(l - n) > Math.PI / 2;
|
|
1252
1252
|
let m = h, y = null, x = null, w = _ ? Math.PI : 0, b = 0, E = _ ? -1 : 1, C = null, T = 1, P = 1, L = null, M = 0;
|
|
1253
1253
|
do {
|
|
1254
1254
|
if (y = Math.sin(m), x = Math.cos(m), C = (f * y) ** 2 + (d * p - u * f * x) ** 2, Math.abs(C) < 1e-24) break;
|
|
@@ -1262,7 +1262,7 @@ class qr {
|
|
|
1262
1262
|
return { distance: S, initialAzimuth: Math.abs(S) < Number.EPSILON ? NaN : Nt(z) * J, finalAzimuth: Math.abs(S) < Number.EPSILON ? NaN : Nt(k) * J };
|
|
1263
1263
|
}
|
|
1264
1264
|
direct(e, t, i) {
|
|
1265
|
-
let r = e.lon, s = e.lat, n = this._a, o = this._b, l = this._flattening, h = i, c = t *
|
|
1265
|
+
let r = e.lon, s = e.lat, n = this._a, o = this._b, l = this._flattening, h = i, c = t * j, d = Math.sin(c), u = Math.cos(c), g = (1 - l) * Math.tan(s * j), f = 1 / Math.sqrt(1 + g * g), p = g * f, _ = Math.atan2(g, u), m = f * d, y = 1 - m * m, x = y * (n * n - o * o) / (o * o), w = 1 + x / 16384 * (4096 + x * (x * (320 - 175 * x) - 768)), b = x / 1024 * (256 + x * (x * (74 - 47 * x) - 128)), E = h / (o * w), C = 2 * Math.PI, T = 0, P = 0, L = 0, M = 0;
|
|
1266
1266
|
for (; Math.abs(E - C) > 1e-12; ) T = Math.cos(2 * _ + E), P = Math.sin(E), L = Math.cos(E), M = b * P * (T + b / 4 * (L * (2 * T * T - 1) - b / 6 * T * (4 * P * P - 3) * (4 * T * T - 3))), C = E, E = h / (o * w) + M;
|
|
1267
1267
|
let I = p * P - f * L * u, D = Math.atan2(p * L + f * P * u, (1 - l) * Math.sqrt(m * m + I * I)), S = l / 16 * y * (4 + l * (4 - 3 * y)), z = Math.atan2(P * d, f * L - p * P * u) - (1 - S) * l * m * (E + S * P * (T + S * L * (2 * T * T - 1))), k = Math.atan2(m, -I);
|
|
1268
1268
|
return { destination: new A(r + z * J, D * J), finalAzimuth: k * J };
|
|
@@ -1288,16 +1288,16 @@ class qr {
|
|
|
1288
1288
|
return F.getLookRotation(i, t);
|
|
1289
1289
|
}
|
|
1290
1290
|
getBearingDestination(e, t = 0, i = 0) {
|
|
1291
|
-
t *=
|
|
1292
|
-
var r = (e.lon + 540) % 360 - 180, s = e.lat *
|
|
1291
|
+
t *= j;
|
|
1292
|
+
var r = (e.lon + 540) % 360 - 180, s = e.lat * j, n = r * j, o = i / this._a, l = Math.asin(Math.sin(s) * Math.cos(o) + Math.cos(s) * Math.sin(o) * Math.cos(t));
|
|
1293
1293
|
return new A((n + Math.atan2(Math.sin(t) * Math.sin(o) * Math.cos(s), Math.cos(o) - Math.sin(s) * Math.sin(l))) * J, l * J);
|
|
1294
1294
|
}
|
|
1295
1295
|
static getIntermediatePointOnGreatCircle(e, t, i) {
|
|
1296
|
-
var r = e.lat *
|
|
1296
|
+
var r = e.lat * j, s = e.lon * j, n = t.lat * j, o = t.lon * j, l = Math.sin(r), h = Math.cos(r), c = Math.sin(s), d = Math.cos(s), u = Math.sin(n), g = Math.cos(n), f = Math.sin(o), p = Math.cos(o), _ = n - r, m = o - s, y = Math.sin(_ / 2) * Math.sin(_ / 2) + Math.cos(r) * Math.cos(n) * Math.sin(m / 2) * Math.sin(m / 2), x = 2 * Math.atan2(Math.sqrt(y), Math.sqrt(1 - y)), w = Math.sin((1 - i) * x) / Math.sin(x), b = Math.sin(i * x) / Math.sin(x), E = w * h * d + b * g * p, C = w * h * c + b * g * f, T = w * l + b * u, P = Math.atan2(T, Math.sqrt(E * E + C * C)), L = Math.atan2(C, E);
|
|
1297
1297
|
return new A((L * J + 540) % 360 - 180, P * J);
|
|
1298
1298
|
}
|
|
1299
1299
|
static getRhumbBearing(e, t) {
|
|
1300
|
-
var i = (t.lon - e.lon) *
|
|
1300
|
+
var i = (t.lon - e.lon) * j, r = Math.log(Math.tan(t.lat * j / 2 + Math.PI / 4) / Math.tan(e.lat * j / 2 + Math.PI / 4));
|
|
1301
1301
|
return Math.abs(i) > Math.PI && (i = i > 0 ? -1 * (2 * Math.PI - i) : 2 * Math.PI + i), (Math.atan2(i, r) * J + 360) % 360;
|
|
1302
1302
|
}
|
|
1303
1303
|
getLonLatVisibilitySimple(e, t, i) {
|
|
@@ -1414,10 +1414,10 @@ function je(a, e) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
function Zr(a, e) {
|
|
1416
1416
|
if (a) {
|
|
1417
|
-
if (a instanceof Array) return new
|
|
1418
|
-
if (a instanceof
|
|
1417
|
+
if (a instanceof Array) return new G(Xi(a[0]), Xi(a[1]));
|
|
1418
|
+
if (a instanceof G) return a.clone();
|
|
1419
1419
|
} else if (e) return e;
|
|
1420
|
-
return new
|
|
1420
|
+
return new G();
|
|
1421
1421
|
}
|
|
1422
1422
|
function Xi(a, e) {
|
|
1423
1423
|
if (a) {
|
|
@@ -2216,7 +2216,7 @@ class io {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
const ro = class so {
|
|
2218
2218
|
constructor(e, t = {}) {
|
|
2219
|
-
if (this.isVector = !1, this.__id = so.__counter__++, this._iconSrc = t.iconSrc || null, this.events = _e(no, this), this.name = e || "noname", this.properties = t.properties || {}, this.hideInLayerSwitcher = t.hideInLayerSwitcher || !1, this._hasImageryTiles = !0, this._opacity = t.opacity != null ? t.opacity : 1, this.minZoom = t.minZoom || 0, this.maxZoom = t.maxZoom != null ? t.maxZoom : 50, this._planet = null, this.isVector = !1, this._attribution = t.attribution || "", this._zIndex = t.zIndex || 0, this._isBaseLayer = t.isBaseLayer || !1, this._defaultTextures = t.defaultTextures || [null, null], this._visibility = t.visibility === void 0 || t.visibility, this._fading = t.fading || !1, this._fadingFactor = this._opacity / 30, this._fading ? this._fadingOpacity = 0 : this._fadingOpacity = this._opacity, this._height = t.height || 0, this._extent = new
|
|
2219
|
+
if (this.isVector = !1, this.__id = so.__counter__++, this._iconSrc = t.iconSrc || null, this.events = _e(no, this), this.name = e || "noname", this.properties = t.properties || {}, this.hideInLayerSwitcher = t.hideInLayerSwitcher || !1, this._hasImageryTiles = !0, this._opacity = t.opacity != null ? t.opacity : 1, this.minZoom = t.minZoom || 0, this.maxZoom = t.maxZoom != null ? t.maxZoom : 50, this._planet = null, this.isVector = !1, this._attribution = t.attribution || "", this._zIndex = t.zIndex || 0, this._isBaseLayer = t.isBaseLayer || !1, this._defaultTextures = t.defaultTextures || [null, null], this._visibility = t.visibility === void 0 || t.visibility, this._fading = t.fading || !1, this._fadingFactor = this._opacity / 30, this._fading ? this._fadingOpacity = 0 : this._fadingOpacity = this._opacity, this._height = t.height || 0, this._extent = new G(), this.createTexture = null, this._textureFilter = t.textureFilter ? t.textureFilter.trim().toUpperCase() : "MIPMAP", this._isSRGB = t.isSRGB != null && t.isSRGB, this._internalFormat = null, this._extentMerc = new G(), this.setExtent(Zr(t.extent, new G(new A(-180, -90), new A(180, 90)))), this._pickingColor = new v(), this._pickingEnabled = t.pickingEnabled === void 0 || t.pickingEnabled, this._isPreloadDone = !1, this._preLoadZoomLevels = t.preLoadZoomLevels || [0, 1], this._ambient = null, this._diffuse = null, this._specular = null, t.ambient) {
|
|
2220
2220
|
let i = je(t.ambient, new v(0.2, 0.2, 0.2));
|
|
2221
2221
|
this._ambient = new Float32Array([i.x, i.y, i.z]);
|
|
2222
2222
|
}
|
|
@@ -2379,7 +2379,7 @@ const ro = class so {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
setExtent(e) {
|
|
2381
2381
|
let t = e.southWest.clone(), i = e.northEast.clone();
|
|
2382
|
-
t.lat < He && (t.lat = He), i.lat > ce && (i.lat = ce), this._extent = e.clone(), this._extentMerc = new
|
|
2382
|
+
t.lat < He && (t.lat = He), i.lat > ce && (i.lat = ce), this._extent = e.clone(), this._extentMerc = new G(t.forwardMercator(), i.forwardMercator()), this._correctFullExtent();
|
|
2383
2383
|
}
|
|
2384
2384
|
getExtent() {
|
|
2385
2385
|
return this._extent;
|
|
@@ -2758,7 +2758,7 @@ const Al = { POINT: 1, LINESTRING: 2, POLYGON: 3, MULTIPOLYGON: 4, MULTILINESTRI
|
|
|
2758
2758
|
return Al[e.toUpperCase()];
|
|
2759
2759
|
}
|
|
2760
2760
|
static getExtent(e, t) {
|
|
2761
|
-
let i = new
|
|
2761
|
+
let i = new G(new A(180, 90), new A(-180, -90)), r = xt.getType(e.type);
|
|
2762
2762
|
if (r === 1) {
|
|
2763
2763
|
let s = e.coordinates[0], n = e.coordinates[1];
|
|
2764
2764
|
i.southWest.lon = s, i.southWest.lat = n, i.northEast.lon = s, i.northEast.lat = n, t && (t[0] = s) && (t[1] = n);
|
|
@@ -3612,7 +3612,7 @@ xo.__counter__ = 0;
|
|
|
3612
3612
|
let Pl = xo;
|
|
3613
3613
|
const wo = class kr {
|
|
3614
3614
|
constructor(e = {}) {
|
|
3615
|
-
this.__id = kr.__counter__++, this.__doubleToTwoFloats = v.doubleToTwoFloats, this.altitude = e.altitude || 0, this.thickness = e.thickness || 1.5, this._opacity = e.opacity != null ? e.opacity : 1, this._defaultColor = pt(e.color || "#0000FF", e.opacity), this.visibility = e.visibility == null || e.visibility, this._closedLine = e.isClosed || !1, this._path3v = [], this._pathLengths = [], this._pathLonLat = [], this._pathLonLatMerc = [], this._pathColors = e.pathColors ? es(e.pathColors) : [], this._extent = new
|
|
3615
|
+
this.__id = kr.__counter__++, this.__doubleToTwoFloats = v.doubleToTwoFloats, this.altitude = e.altitude || 0, this.thickness = e.thickness || 1.5, this._opacity = e.opacity != null ? e.opacity : 1, this._defaultColor = pt(e.color || "#0000FF", e.opacity), this.visibility = e.visibility == null || e.visibility, this._closedLine = e.isClosed || !1, this._path3v = [], this._pathLengths = [], this._pathLonLat = [], this._pathLonLatMerc = [], this._pathColors = e.pathColors ? es(e.pathColors) : [], this._extent = new G(), this._verticesHigh = [], this._verticesLow = [], this._orders = [], this._indexes = [], this._colors = [], this._verticesHighBuffer = null, this._verticesLowBuffer = null, this._ordersBuffer = null, this._indexesBuffer = null, this._colorsBuffer = null, this._pickingColor = [0, 0, 0], this._renderNode = null, this._entity = null, this._handler = null, this._handlerIndex = -1, this._buffersUpdateCallbacks = [], this._buffersUpdateCallbacks[0] = this._createVerticesBuffer, this._buffersUpdateCallbacks[1] = this._createIndexBuffer, this._buffersUpdateCallbacks[2] = this._createColorsBuffer, this._changedBuffers = new Array(this._buffersUpdateCallbacks.length);
|
|
3616
3616
|
let t = We(e.visibleSpherePosition).toArray(), i = e.visibleSphereRadius || 0;
|
|
3617
3617
|
this._visibleSphere = new Float32Array([...t, i]), e.pathLonLat ? this.setPathLonLat(e.pathLonLat) : e.path3v && this.setPath3v(e.path3v), this._refresh();
|
|
3618
3618
|
}
|
|
@@ -4223,7 +4223,7 @@ Ao.__counter__ = 0;
|
|
|
4223
4223
|
let Po = Ao;
|
|
4224
4224
|
const So = class Ro {
|
|
4225
4225
|
constructor(e = {}) {
|
|
4226
|
-
e.properties = e.properties || {}, this.__id = Ro.__counter__++, this.properties = e.properties || {}, this.properties.name = this.properties.name != null ? this.properties.name : "", this.childEntities = [], this.parent = null, this.forceGlobalPosition = e.forceGlobalPosition || !1, this.forceGlobalRotation = e.forceGlobalRotation || !1, this.forceGlobalScale = e.forceGlobalScale || !1, this._cartesian = We(e.cartesian), this._rootCartesian = new v(), this._localPosition = We(e.localPosition), this._absoluteLocalPosition = new v(), this._lonLat = Xi(e.lonlat), this._lonLatMerc = new A(), this._altitude = e.altitude || 0, this._visibility = e.visibility == null || e.visibility, this._entityCollection = null, this._entityCollectionIndex = -1, this._layer = null, this._layerIndex = -1, this._pickingColor = new v(0, 0, 0), this._independentPicking = e.independentPicking || !1, this._relativePosition = e.relativePosition || !1, this._pitchRad = e.pitch || 0, this._yawRad = e.yaw || 0, this._rollRad = e.roll || 0, this._scale = We(e.scale, new v(1, 1, 1)), this._qFrame = F.IDENTITY, this._qRot = F.IDENTITY, this._absoluteQRot = F.IDENTITY, this._featureConstructorArray = { billboard: [_o, this.setBillboard], label: [yo, this.setLabel], polyline: [Co, this.setPolyline], pointCloud: [Pl, this.setPointCloud], geometry: [go, this.setGeometry], geoObject: [vo, this.setGeoObject], strip: [Po, this.setStrip], ray: [Sl, this.setRay] }, this.billboard = this._createOptionFeature("billboard", e.billboard), this.label = this._createOptionFeature("label", e.label), this.polyline = this._createOptionFeature("polyline", e.polyline), this.ray = this._createOptionFeature("ray", e.ray), this.pointCloud = this._createOptionFeature("pointCloud", e.pointCloud), this.geometry = this._createOptionFeature("geometry", e.geometry), this.geoObject = this._createOptionFeature("geoObject", e.geoObject), this.strip = this._createOptionFeature("strip", e.strip);
|
|
4226
|
+
e.properties = e.properties || {}, this.__id = Ro.__counter__++, this.properties = e.properties || {}, this.properties.name = this.properties.name != null ? this.properties.name : "", this.childEntities = [], this.parent = null, this.forceGlobalPosition = e.forceGlobalPosition || !1, this.forceGlobalRotation = e.forceGlobalRotation || !1, this.forceGlobalScale = e.forceGlobalScale || !1, this._cartesian = We(e.cartesian), this._rootCartesian = new v(), this._localPosition = We(e.localPosition), this._absoluteLocalPosition = new v(), this._lonLat = Xi(e.lonlat), this._lonLatMerc = new A(), this._altitude = e.altitude || 0, this._visibility = e.visibility == null || e.visibility, this._entityCollection = null, this._entityCollectionIndex = -1, this._layer = null, this._layerIndex = -1, this._pickingColor = new v(0, 0, 0), this._independentPicking = e.independentPicking || !1, this._relativePosition = e.relativePosition || !1, this._pitchRad = e.pitch || 0, this._yawRad = e.yaw || 0, this._rollRad = e.roll || 0, this._scale = We(e.scale, new v(1, 1, 1)), this._absoluteScale = new v(), this._qFrame = F.IDENTITY, this._qRot = F.IDENTITY, this._absoluteQRot = F.IDENTITY, this._featureConstructorArray = { billboard: [_o, this.setBillboard], label: [yo, this.setLabel], polyline: [Co, this.setPolyline], pointCloud: [Pl, this.setPointCloud], geometry: [go, this.setGeometry], geoObject: [vo, this.setGeoObject], strip: [Po, this.setStrip], ray: [Sl, this.setRay] }, this.billboard = this._createOptionFeature("billboard", e.billboard), this.label = this._createOptionFeature("label", e.label), this.polyline = this._createOptionFeature("polyline", e.polyline), this.ray = this._createOptionFeature("ray", e.ray), this.pointCloud = this._createOptionFeature("pointCloud", e.pointCloud), this.geometry = this._createOptionFeature("geometry", e.geometry), this.geoObject = this._createOptionFeature("geoObject", e.geoObject), this.strip = this._createOptionFeature("strip", e.strip);
|
|
4227
4227
|
}
|
|
4228
4228
|
get rootEntity() {
|
|
4229
4229
|
let e = this;
|
|
@@ -4287,18 +4287,14 @@ const So = class Ro {
|
|
|
4287
4287
|
return this._scale;
|
|
4288
4288
|
}
|
|
4289
4289
|
setScale3v(e) {
|
|
4290
|
-
this._scale.copy(e), this.
|
|
4290
|
+
this._scale.copy(e), this._updateAbsolutePosition();
|
|
4291
4291
|
for (let t = 0; t < this.childEntities.length; t++) {
|
|
4292
4292
|
let i = this.childEntities[t];
|
|
4293
4293
|
i.forceGlobalScale ? i.setScale3v(this._scale) : i.setScale3v(this.childEntities[t].getScale());
|
|
4294
4294
|
}
|
|
4295
4295
|
}
|
|
4296
4296
|
setScale(e) {
|
|
4297
|
-
this.
|
|
4298
|
-
for (let t = 0; t < this.childEntities.length; t++) {
|
|
4299
|
-
let i = this.childEntities[t];
|
|
4300
|
-
i.forceGlobalScale ? i.setScale(e) : i.setScale3v(this.childEntities[t].getScale());
|
|
4301
|
-
}
|
|
4297
|
+
this.setScale3v(new v(e, e, e));
|
|
4302
4298
|
}
|
|
4303
4299
|
getAbsoluteRotation() {
|
|
4304
4300
|
return this._absoluteQRot.clone();
|
|
@@ -4376,7 +4372,7 @@ const So = class Ro {
|
|
|
4376
4372
|
let t = e;
|
|
4377
4373
|
if (this.parent && this._relativePosition) {
|
|
4378
4374
|
let i = this._getScaleByDistance();
|
|
4379
|
-
t = e.sub(this.parent.getAbsoluteCartesian()).scale(1 / i), t = this.parent._absoluteQRot.conjugate().mulVec3(t);
|
|
4375
|
+
t = e.sub(this.parent.getAbsoluteCartesian()).scale(1 / i).divA(this.parent._absoluteScale), t = this.parent._absoluteQRot.conjugate().mulVec3(t);
|
|
4380
4376
|
}
|
|
4381
4377
|
this.setCartesian3v(t);
|
|
4382
4378
|
}
|
|
@@ -4404,11 +4400,11 @@ const So = class Ro {
|
|
|
4404
4400
|
_updateAbsolutePosition() {
|
|
4405
4401
|
let e = this.parent;
|
|
4406
4402
|
if (e && this._relativePosition) {
|
|
4407
|
-
this._qFrame.copy(e._qFrame), this._rootCartesian.copy(e._rootCartesian), this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad), e._absoluteQRot.mulRes(this._qRot, this._absoluteQRot);
|
|
4408
|
-
let t = e._absoluteQRot.mulVec3(this._cartesian.add(this._localPosition));
|
|
4403
|
+
this._scale.mulRes(e._absoluteScale, this._absoluteScale), this._qFrame.copy(e._qFrame), this._rootCartesian.copy(e._rootCartesian), this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad), e._absoluteQRot.mulRes(this._qRot, this._absoluteQRot);
|
|
4404
|
+
let t = e._absoluteQRot.mulVec3(this._cartesian.add(this._localPosition)).mulA(e._absoluteScale);
|
|
4409
4405
|
e._absoluteLocalPosition.addRes(t, this._absoluteLocalPosition);
|
|
4410
|
-
} else this._qFrame = F.IDENTITY, this._entityCollection && this._entityCollection.renderNode && (this._qFrame = this._entityCollection.renderNode.getFrameRotation(this._cartesian)), e && this.forceGlobalRotation ? this._qRot.setPitchYawRoll(e._pitchRad, e._yawRad, e._rollRad, this._qFrame) : this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad, this._qFrame), this._absoluteQRot.copy(this._qRot), this._rootCartesian.copy(this._cartesian), this._absoluteLocalPosition.copy(this._localPosition);
|
|
4411
|
-
this.geoObject && (this.geoObject.setRotation(this._absoluteQRot), this.geoObject.setPosition3v(this._rootCartesian), this.geoObject.setLocalPosition3v(this._absoluteLocalPosition)), this.billboard && this.billboard.setPosition3v(this._rootCartesian), this.label && this.label.setPosition3v(this._rootCartesian);
|
|
4406
|
+
} else this._qFrame = F.IDENTITY, this._entityCollection && this._entityCollection.renderNode && (this._qFrame = this._entityCollection.renderNode.getFrameRotation(this._cartesian)), e && this.forceGlobalRotation ? this._qRot.setPitchYawRoll(e._pitchRad, e._yawRad, e._rollRad, this._qFrame) : this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad, this._qFrame), this._absoluteScale.copy(this._scale), this._absoluteQRot.copy(this._qRot), this._rootCartesian.copy(this._cartesian), this._absoluteLocalPosition.copy(this._localPosition);
|
|
4407
|
+
this.geoObject && (this.geoObject.setScale3v(this._absoluteScale), this.geoObject.setRotation(this._absoluteQRot), this.geoObject.setPosition3v(this._rootCartesian), this.geoObject.setLocalPosition3v(this._absoluteLocalPosition)), this.billboard && this.billboard.setPosition3v(this._rootCartesian), this.label && this.label.setPosition3v(this._rootCartesian);
|
|
4412
4408
|
for (let t = 0, i = this.childEntities.length; t < i; t++) this.childEntities[t]._updateAbsolutePosition();
|
|
4413
4409
|
this._updateLonLat();
|
|
4414
4410
|
}
|
|
@@ -4495,7 +4491,7 @@ const So = class Ro {
|
|
|
4495
4491
|
}
|
|
4496
4492
|
getExtent() {
|
|
4497
4493
|
let e, t = this._lonLat;
|
|
4498
|
-
e = this.billboard || this.label ? new
|
|
4494
|
+
e = this.billboard || this.label ? new G(new A(t.lon, t.lat), new A(t.lon, t.lat)) : new G(new A(180, 90), new A(-180, -90));
|
|
4499
4495
|
let i = e.southWest, r = e.northEast;
|
|
4500
4496
|
if (this.polyline) {
|
|
4501
4497
|
let s = this.polyline.getExtent();
|
|
@@ -7115,7 +7111,7 @@ class ga extends Q {
|
|
|
7115
7111
|
const rh = ["loadend"];
|
|
7116
7112
|
class Ci extends qe {
|
|
7117
7113
|
constructor(e, t = {}) {
|
|
7118
|
-
super(e, t), this.events = this.events.registerNames(rh), this._projType = 0, this._frameWidth = 256, this._frameHeight = 256, this._sourceReady = !1, this._sourceTexture = null, this._materialTexture = null, this._gridBufferLow = null, this._gridBufferHigh = null, this._extentWgs84ParamsHigh = new Float32Array(4), this._extentWgs84ParamsLow = new Float32Array(4), this._extentMercParamsHigh = new Float32Array(4), this._extentMercParamsLow = new Float32Array(4), this._refreshFrame = !0, this._frameCreated = !1, this._sourceCreated = !1, this._animate = !1, this._ready = !1, this._creationProceeding = !1, this._isRendering = !1, this._extentWgs84 = new
|
|
7114
|
+
super(e, t), this.events = this.events.registerNames(rh), this._projType = 0, this._frameWidth = 256, this._frameHeight = 256, this._sourceReady = !1, this._sourceTexture = null, this._materialTexture = null, this._gridBufferLow = null, this._gridBufferHigh = null, this._extentWgs84ParamsHigh = new Float32Array(4), this._extentWgs84ParamsLow = new Float32Array(4), this._extentMercParamsHigh = new Float32Array(4), this._extentMercParamsLow = new Float32Array(4), this._refreshFrame = !0, this._frameCreated = !1, this._sourceCreated = !1, this._animate = !1, this._ready = !1, this._creationProceeding = !1, this._isRendering = !1, this._extentWgs84 = new G(), this._cornersWgs84 = [], this._cornersMerc = [], this._isFullExtent = t.fullExtent ? 1 : 0, this.rendering = this._renderingProjType0.bind(this), this._onLoadend_ = null, t.corners && this.setCorners(t.corners);
|
|
7119
7115
|
}
|
|
7120
7116
|
get isIdle() {
|
|
7121
7117
|
return super.isIdle && this._ready;
|
|
@@ -7151,7 +7147,7 @@ class Ci extends qe {
|
|
|
7151
7147
|
t.southWest.lat > ce || t.northEast.lat < He ? (this._projType = 0, this.rendering = this._renderingProjType0) : (this._projType = 1, this.rendering = this._renderingProjType1), this._ready && !this._creationProceeding && this._planet._geoImageCreator.add(this);
|
|
7152
7148
|
}
|
|
7153
7149
|
_createFrame() {
|
|
7154
|
-
this._extentWgs84 = this._extent.clone(), this._cornersMerc = [this._cornersWgs84[0].forwardMercatorEPS01(), this._cornersWgs84[1].forwardMercatorEPS01(), this._cornersWgs84[2].forwardMercatorEPS01(), this._cornersWgs84[3].forwardMercatorEPS01()], this._extentMerc = new
|
|
7150
|
+
this._extentWgs84 = this._extent.clone(), this._cornersMerc = [this._cornersWgs84[0].forwardMercatorEPS01(), this._cornersWgs84[1].forwardMercatorEPS01(), this._cornersWgs84[2].forwardMercatorEPS01(), this._cornersWgs84[3].forwardMercatorEPS01()], this._extentMerc = new G(this._extentWgs84.southWest.forwardMercatorEPS01(), this._extentWgs84.northEast.forwardMercatorEPS01());
|
|
7155
7151
|
let e = new Float32Array(2);
|
|
7156
7152
|
if (this._projType === 0 ? (nt(this._extentWgs84.southWest.lon, e), this._extentWgs84ParamsHigh[0] = e[0], this._extentWgs84ParamsLow[0] = e[1], nt(this._extentWgs84.southWest.lat, e), this._extentWgs84ParamsHigh[1] = e[0], this._extentWgs84ParamsLow[1] = e[1], this._extentWgs84ParamsHigh[2] = 2 / this._extentWgs84.getWidth(), this._extentWgs84ParamsHigh[3] = 2 / this._extentWgs84.getHeight()) : (nt(this._extentMerc.southWest.lon, e), this._extentMercParamsHigh[0] = e[0], this._extentMercParamsLow[0] = e[1], nt(this._extentMerc.southWest.lat, e), this._extentMercParamsHigh[1] = e[0], this._extentMercParamsLow[1] = e[1], this._extentMercParamsHigh[2] = 2 / this._extentMerc.getWidth(), this._extentMercParamsHigh[3] = 2 / this._extentMerc.getHeight()), this._planet) {
|
|
7157
7153
|
let t = this._planet.renderer.handler;
|
|
@@ -7440,7 +7436,7 @@ class os extends Q {
|
|
|
7440
7436
|
const t = this.planet.camera;
|
|
7441
7437
|
if (this.pointOnEarth && e.moving) {
|
|
7442
7438
|
this.renderer.controlsBag.scaleRot = 1;
|
|
7443
|
-
let i = 0.5 / t.eye.distance(this.pointOnEarth) * t._lonLat.height *
|
|
7439
|
+
let i = 0.5 / t.eye.distance(this.pointOnEarth) * t._lonLat.height * j;
|
|
7444
7440
|
i > 7e-3 ? i = 7e-3 : i < 3e-3 && (i = 3e-3), t.rotateHorizontal(i * (e.x - e.prev_x), !1, this.pointOnEarth, this.earthUp), t.rotateVertical(i * (e.y - e.prev_y), this.pointOnEarth, this.minSlope);
|
|
7445
7441
|
}
|
|
7446
7442
|
}
|
|
@@ -7841,7 +7837,7 @@ class ba extends Q {
|
|
|
7841
7837
|
_drawScreen(e) {
|
|
7842
7838
|
let t = this.planet.camera, i = e, r = this.planet.getDistanceFromPixel(i) || 0;
|
|
7843
7839
|
r === 0 && (i = t.project3v(v.ZERO), r = this.planet.getDistanceFromPixel(i) || 0);
|
|
7844
|
-
let s = t.getForward().scaleTo(r).addA(t.eye), n = r * Math.tan(t.viewAngle *
|
|
7840
|
+
let s = t.getForward().scaleTo(r).addA(t.eye), n = r * Math.tan(t.viewAngle * j), o = s.add(t.getRight().scaleTo(n)), l = t.project3v(o);
|
|
7845
7841
|
this._mPx = n / l.distance(i);
|
|
7846
7842
|
let h = this._mPx * this._minWidth, c = Pt(hr, h, (g, f) => g - f);
|
|
7847
7843
|
c < 0 && (c = ~c);
|
|
@@ -7991,7 +7987,7 @@ class wa extends Q {
|
|
|
7991
7987
|
}
|
|
7992
7988
|
const cr = 14959787e4;
|
|
7993
7989
|
function dr(a) {
|
|
7994
|
-
var e = a - Zi, t = 282.9404 + 470935e-10 * e, i = 0.016709 - 1151e-12 * e, r = Cr(356.047 + 0.9856002585 * e), s = 23.4392911 - 3563e-10 * e, n = r + J * i * Math.sin(r *
|
|
7990
|
+
var e = a - Zi, t = 282.9404 + 470935e-10 * e, i = 0.016709 - 1151e-12 * e, r = Cr(356.047 + 0.9856002585 * e), s = 23.4392911 - 3563e-10 * e, n = r + J * i * Math.sin(r * j) * (1 + i * Math.cos(r * j)), o = Math.cos(n * j) - i, l = Math.sin(n * j) * Math.sqrt(1 - i * i), h = Math.sqrt(o * o + l * l), c = Cr(Math.atan2(l, o) * J + t), d = o = h * Math.cos(c * j), u = (l = h * Math.sin(c * j)) * Math.cos(s * j), g = l * Math.sin(s * j), f = Gi * (24 * e / 23.9344694 - 259.853 / 360);
|
|
7995
7991
|
return F.zRotation(-f).mulVec3(new v(-d * cr, -u * cr, g * cr));
|
|
7996
7992
|
}
|
|
7997
7993
|
class fh {
|
|
@@ -8150,7 +8146,7 @@ class Ca extends Q {
|
|
|
8150
8146
|
let f = d * -(1 - u.length() / g.length());
|
|
8151
8147
|
t.eye.addA(t.getForward().scale(f)), t.rotateAround(-c, !1, this.pointOnEarth, this.earthUp);
|
|
8152
8148
|
const p = s.vec.add(n.vec).scale(0.5), _ = s.vecPrev.add(n.vecPrev).scale(0.5), m = p.sub(_).scale(-1);
|
|
8153
|
-
var r = 0.5 / d * t._lonLat.height *
|
|
8149
|
+
var r = 0.5 / d * t._lonLat.height * j;
|
|
8154
8150
|
r > 3e-3 && (r = 3e-3), t.rotateHorizontal(r * -m.x, !1, this.pointOnEarth, this.earthUp), t.rotateVertical(r * -m.y, this.pointOnEarth), t.checkTerrainCollision(), t.update();
|
|
8155
8151
|
}
|
|
8156
8152
|
this.scaleRot = 0;
|
|
@@ -8323,7 +8319,7 @@ function Ys(a, e = 0, t = 10, i = 2, r = "white") {
|
|
|
8323
8319
|
a.lineWidth = i, a.strokeStyle = r, a.beginPath(), a.moveTo(e, 0), a.lineTo(e, t), a.stroke();
|
|
8324
8320
|
}
|
|
8325
8321
|
function vh(a, e, t, i, r = "12px Arial", s = "black", n = "left", o = "bottom", l = 0) {
|
|
8326
|
-
a.save(), a.translate(t, i), a.rotate(l *
|
|
8322
|
+
a.save(), a.translate(t, i), a.rotate(l * j), a.fillStyle = s, a.textBaseline = o, a.font = r, a.textAlign = n, a.fillText(e, 0, 0), a.restore();
|
|
8327
8323
|
}
|
|
8328
8324
|
const ur = [[1e-3, 10], [2e-3, 10], [5e-3, 10], [0.01, 10], [0.02, 10], [0.05, 10], [0.1, 10], [0.25, 10], [0.5, 5], [1, 10], [2, 10], [5, 5], [10, 10], [15, 15], [30, 6], [60, 12], [120, 12], [300, 5], [600, 10], [900, 15], [1800, 6], [3600, 12], [7200, 10], [14400, 4], [21600, 6], [43200, 12], [86400, 24], [172800, 2], [345600, 4], [604800, 7], [1296e3, 15], [2592e3, 5], [5184e3, 6], [7776e3, 9], [15552e3, 18], [31536e3, 12], [63072e3, 2], [126144e3, 4], [15768e4, 5], [31536e4, 10], [63072e4, 2], [126144e4, 4], [15768e5, 5], [31536e5, 10], [63072e5, 2], [126144e5, 4], [15768e6, 5], [31536e6, 10]], yh = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xh = ["change", "current"];
|
|
8329
8325
|
class bh {
|
|
@@ -8887,7 +8883,7 @@ class zh extends ct {
|
|
|
8887
8883
|
let l = e[o].getLonLat();
|
|
8888
8884
|
l.lon < t && (t = l.lon), l.lat < i && (i = l.lat), l.lon > r && (r = l.lon), l.lat > s && (s = l.lat), l.height > n && (n = l.height);
|
|
8889
8885
|
}
|
|
8890
|
-
this._planet.camera.flyExtent(new
|
|
8886
|
+
this._planet.camera.flyExtent(new G(new A(t, i), new A(r, s)), n, null, 0);
|
|
8891
8887
|
}
|
|
8892
8888
|
}
|
|
8893
8889
|
get planet() {
|
|
@@ -9161,7 +9157,7 @@ class Gh extends V {
|
|
|
9161
9157
|
super(e), this._size = e.size != null ? e.size : 1, this.childEntities = [], this._init();
|
|
9162
9158
|
}
|
|
9163
9159
|
_init() {
|
|
9164
|
-
let e = new _r({ color: Yt, yaw: 0, pitch: 0, roll: 90 *
|
|
9160
|
+
let e = new _r({ color: Yt, yaw: 0, pitch: 0, roll: 90 * j, properties: { opName: "move_x", noEdit: !0, style: { color: Yt, selectColor: as } } }), t = new _r({ color: Ji, yaw: 0, pitch: 0, roll: 0, properties: { opName: "move_y", noEdit: !0, style: { color: Ji, selectColor: ls } } }), i = new _r({ color: er, yaw: 0, pitch: 90 * j, roll: 0, properties: { opName: "move_z", noEdit: !0, style: { color: er, selectColor: hs } } });
|
|
9165
9161
|
this.appendChild(e), this.appendChild(t), this.appendChild(i), this.setSize(this._size);
|
|
9166
9162
|
}
|
|
9167
9163
|
setSize(e) {
|
|
@@ -9207,7 +9203,7 @@ class Wh extends V {
|
|
|
9207
9203
|
if (super.setCartesian3v(e), this._entityCollection && this._entityCollection.renderNode) {
|
|
9208
9204
|
let i = this._entityCollection.renderNode, r = i.renderer.activeCamera, s = i.getFrameRotation(e).conjugate(), n = 0.15 * r.eye.distance(e), o = F.xRotation(0), l = F.yRotation(t), h = F.zRotation(0).mul(o).mul(l).mul(i.getFrameRotation(e)).conjugate();
|
|
9209
9205
|
for (let g = 0, f = 0, p = 1; g < Ti; g += p, f++) {
|
|
9210
|
-
let _ = g *
|
|
9206
|
+
let _ = g * j, m = Math.cos(_), y = Math.sin(_), x = h.mulVec3(new v(0, y, m)).normalize().scale(n).add(e), w = s.mulVec3(new v(m, 0, y)).normalize().scale(n).add(e), b = h.mulVec3(new v(m, y, 0)).normalize().scale(n).add(e);
|
|
9211
9207
|
Qs[f] = x, Js[f] = w, en[f] = b;
|
|
9212
9208
|
}
|
|
9213
9209
|
this.childEntities[0].polyline.setPath3v([Qs], void 0, !0), this.childEntities[1].polyline.setPath3v([Js], void 0, !0), this.childEntities[2].polyline.setPath3v([en], void 0, !0);
|
|
@@ -9617,22 +9613,22 @@ class Jh extends rt {
|
|
|
9617
9613
|
}
|
|
9618
9614
|
}, this._onChangePitch = (t) => {
|
|
9619
9615
|
let i = this.model.getSelectedEntity();
|
|
9620
|
-
i && (i.setPitch(parseFloat(t) *
|
|
9616
|
+
i && (i.setPitch(parseFloat(t) * j), this._refresh(i));
|
|
9621
9617
|
}, this._onChangeYaw = (t) => {
|
|
9622
9618
|
let i = this.model.getSelectedEntity();
|
|
9623
|
-
i && (i.setYaw(parseFloat(t) *
|
|
9619
|
+
i && (i.setYaw(parseFloat(t) * j), this._refresh(i));
|
|
9624
9620
|
}, this._onChangeRoll = (t) => {
|
|
9625
9621
|
let i = this.model.getSelectedEntity();
|
|
9626
|
-
i && (i.setRoll(parseFloat(t) *
|
|
9622
|
+
i && (i.setRoll(parseFloat(t) * j), this._refresh(i));
|
|
9627
9623
|
}, this._onChangeAbsolutePitch = (t) => {
|
|
9628
9624
|
let i = this.model.getSelectedEntity();
|
|
9629
|
-
i && (i.setAbsolutePitch(parseFloat(t) *
|
|
9625
|
+
i && (i.setAbsolutePitch(parseFloat(t) * j), this._refresh(i));
|
|
9630
9626
|
}, this._onChangeAbsoluteYaw = (t) => {
|
|
9631
9627
|
let i = this.model.getSelectedEntity();
|
|
9632
|
-
i && (i.setAbsoluteYaw(parseFloat(t) *
|
|
9628
|
+
i && (i.setAbsoluteYaw(parseFloat(t) * j), this._refresh(i));
|
|
9633
9629
|
}, this._onChangeAbsoluteRoll = (t) => {
|
|
9634
9630
|
let i = this.model.getSelectedEntity();
|
|
9635
|
-
i && (i.setAbsoluteRoll(parseFloat(t) *
|
|
9631
|
+
i && (i.setAbsoluteRoll(parseFloat(t) * j), this._refresh(i));
|
|
9636
9632
|
}, this._onChangeScale = (t) => {
|
|
9637
9633
|
let i = this.model.getSelectedEntity();
|
|
9638
9634
|
if (i) {
|
|
@@ -9712,7 +9708,7 @@ class rn extends Q {
|
|
|
9712
9708
|
}
|
|
9713
9709
|
}, this._onMouseMove = (t) => {
|
|
9714
9710
|
if (this._lockEntity && this.renderer && (t.rightButtonDown || this.renderer.events.isKeyPressed(q.KEY_ALT))) {
|
|
9715
|
-
let i = this._lockEntity.getAbsoluteCartesian(), r = this.renderer.activeCamera, s = 0.5 /
|
|
9711
|
+
let i = this._lockEntity.getAbsoluteCartesian(), r = this.renderer.activeCamera, s = 0.5 / j;
|
|
9716
9712
|
s > 7e-3 && (s = 7e-3), this.planet ? r.rotateHorizontal(s * (t.x - t.prev_x), !1, i, i.isZero() ? v.UP : i.normal()) : r.rotateHorizontal(s * (t.x - t.prev_x), !1, i, v.UP), r.rotateVertical(s * (t.y - t.prev_y), i), this._viewDir = i.sub(r.eye).normalize();
|
|
9717
9713
|
}
|
|
9718
9714
|
}, this.events = _e(ec), this._name = "CameraLock", this.planet = e.planet || null, this._lockDistance = 0, this._isFromTheBack = !1, this._lockEntity = null, this._viewDir = new v(0, 0, 0);
|
|
@@ -10061,7 +10057,7 @@ const hc = ["viewchange", "moveend"], Pa = class Sa {
|
|
|
10061
10057
|
this._horizontalViewAngle = (i = e, r = t, Yr * Math.atan(Math.tan(ot * i) * r)), this._updateViewportParameters();
|
|
10062
10058
|
}
|
|
10063
10059
|
_updateViewportParameters() {
|
|
10064
|
-
this._tanViewAngle_hrad = Math.tan(this._viewAngle * ot), this._tanViewAngle_hradOneByHeight = this._tanViewAngle_hrad * (1 / this._height), this._projSizeConst = Math.min(this._width < 512 ? 512 : this._width, this._height < 512 ? 512 : this._height) / (this._viewAngle *
|
|
10060
|
+
this._tanViewAngle_hrad = Math.tan(this._viewAngle * ot), this._tanViewAngle_hradOneByHeight = this._tanViewAngle_hrad * (1 / this._height), this._projSizeConst = Math.min(this._width < 512 ? 512 : this._width, this._height < 512 ? 512 : this._height) / (this._viewAngle * j);
|
|
10065
10061
|
}
|
|
10066
10062
|
setViewAngle(e) {
|
|
10067
10063
|
this._viewAngle = e, this.refresh();
|
|
@@ -10250,7 +10246,7 @@ class Ra extends ds {
|
|
|
10250
10246
|
l.lat = i;
|
|
10251
10247
|
let u = o.lonLatToCartesian(l), g = v.sub(h, d).scale(0.5).addA(d), f = g.length();
|
|
10252
10248
|
f < 1e-6 && (l.lon = 0.5 * (s + n), l.lat = 0.5 * (i + r), g = o.lonLatToCartesian(l)), u.subA(g), c.subA(g), h.subA(g), d.subA(g);
|
|
10253
|
-
let p = g.getNormal(), _ = p.cross(v.NORTH).normalize(), m = _.cross(p).normalize(), y = Math.max(Math.abs(m.dot(u)), Math.abs(m.dot(c)), Math.abs(m.dot(h)), Math.abs(m.dot(d))), x = Math.max(Math.abs(_.dot(u)), Math.abs(_.dot(c)), Math.abs(_.dot(h)), Math.abs(_.dot(d))), w = Math.tan(this._viewAngle *
|
|
10249
|
+
let p = g.getNormal(), _ = p.cross(v.NORTH).normalize(), m = _.cross(p).normalize(), y = Math.max(Math.abs(m.dot(u)), Math.abs(m.dot(c)), Math.abs(m.dot(h)), Math.abs(m.dot(d))), x = Math.max(Math.abs(_.dot(u)), Math.abs(_.dot(c)), Math.abs(_.dot(h)), Math.abs(_.dot(d))), w = Math.tan(this._viewAngle * j * 0.5), b = this.getAspectRatio() * w, E = Math.max(x / b, y / w);
|
|
10254
10250
|
return g.normalize(), g.scale(f + E + t), g;
|
|
10255
10251
|
}
|
|
10256
10252
|
viewExtent(e, t) {
|
|
@@ -11556,13 +11552,13 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
|
|
|
11556
11552
|
}, HeightRuler: Gs, KeyboardNavigation: class extends Q {
|
|
11557
11553
|
constructor(a = {}) {
|
|
11558
11554
|
a = a || {}, super({ name: "KeyboardNavigation", ...a }), this.onCameraPitchUp = () => {
|
|
11559
|
-
this._camera && this._camera.setPitch(this._camera.getPitch() + 0.1 *
|
|
11555
|
+
this._camera && this._camera.setPitch(this._camera.getPitch() + 0.1 * j);
|
|
11560
11556
|
}, this.onCameraPitchDown = () => {
|
|
11561
|
-
this._camera && this._camera.setPitch(this._camera.getPitch() - 0.1 *
|
|
11557
|
+
this._camera && this._camera.setPitch(this._camera.getPitch() - 0.1 * j);
|
|
11562
11558
|
}, this.onCameraYawLeft = () => {
|
|
11563
|
-
this._camera && this._camera.setYaw(this._camera.getYaw() - 0.1 *
|
|
11559
|
+
this._camera && this._camera.setYaw(this._camera.getYaw() - 0.1 * j);
|
|
11564
11560
|
}, this.onCameraYawRight = () => {
|
|
11565
|
-
this._camera && this._camera.setYaw(this._camera.getYaw() + 0.1 *
|
|
11561
|
+
this._camera && this._camera.setYaw(this._camera.getYaw() + 0.1 * j);
|
|
11566
11562
|
}, this.onCameraMoveForward = () => {
|
|
11567
11563
|
this._camera && this.force.addA(this._camera.getForward()).normalize();
|
|
11568
11564
|
}, this.onCameraMoveBackward = () => {
|
|
@@ -12068,7 +12064,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
|
|
|
12068
12064
|
if (this._lookPos && e.moving && this.renderer) {
|
|
12069
12065
|
const t = this.renderer.activeCamera;
|
|
12070
12066
|
this.renderer.controlsBag.scaleRot = 1;
|
|
12071
|
-
let i = 0.5 / t.eye.distance(this._lookPos) *
|
|
12067
|
+
let i = 0.5 / t.eye.distance(this._lookPos) * j;
|
|
12072
12068
|
i > 7e-3 ? i = 7e-3 : i < 3e-3 && (i = 3e-3), t.rotateHorizontal(i * (e.x - e.prev_x), !1, this._lookPos, this._up), t.rotateVertical(i * (e.y - e.prev_y), this._lookPos);
|
|
12073
12069
|
}
|
|
12074
12070
|
}, this._onRDown = (e) => {
|
|
@@ -12400,7 +12396,7 @@ function Ye(a, e, t) {
|
|
|
12400
12396
|
}
|
|
12401
12397
|
function Gr(a, e, t, i) {
|
|
12402
12398
|
let r = 1 / (1 << t), s = i.getWidth() * r, n = i.getHeight() * r, o = i.southWest.lon + a * s, l = i.northEast.lat - e * n;
|
|
12403
|
-
return new
|
|
12399
|
+
return new G(new A(o, l - n), new A(o + s, l));
|
|
12404
12400
|
}
|
|
12405
12401
|
const Ac = 20, At = 300;
|
|
12406
12402
|
let vt = new v(), yt = new v(), mr = new v(), Kt = new v(), Qt = new v(), vr = new v(), Jt = new U(), Ri = new U();
|
|
@@ -12410,7 +12406,7 @@ const hi = new Array(4);
|
|
|
12410
12406
|
hi[0] = !1, hi[1] = !0, hi[2] = !1, hi[3] = !0;
|
|
12411
12407
|
class Oa {
|
|
12412
12408
|
constructor(e, t, i, r) {
|
|
12413
|
-
this.isPole = !1, this._tileGroup = 0, this._projection = fs, this.node = e, this.planet = t, this.handler = t.renderer.handler, this.bsphere = new Ne(), this._plainRadius = 0, this.bbox = new qn(), this._sw = new v(), this._nw = new v(), this._se = new v(), this._ne = new v(), this.centerNormal = new v(), this._extent = this._extentMerc = r, this._extentLonLat = new
|
|
12409
|
+
this.isPole = !1, this._tileGroup = 0, this._projection = fs, this.node = e, this.planet = t, this.handler = t.renderer.handler, this.bsphere = new Ne(), this._plainRadius = 0, this.bbox = new qn(), this._sw = new v(), this._nw = new v(), this._se = new v(), this._ne = new v(), this.centerNormal = new v(), this._extent = this._extentMerc = r, this._extentLonLat = new G(), this.gridSize = t.terrain.gridSizeByZoom[i], this.fileGridSize = 0, this.tileZoom = i, this.powTileZoom = 1 << i, this.tileX = 0, this.tileXE = 0, this.tileXW = 0, this.tileYN = 0, this.tileYS = 0, this.tileY = 0, this.tileIndex = "", this.elevationData = null, 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, this._transitionOpacity = 1, this._transitionTimestamp = 0;
|
|
12414
12410
|
}
|
|
12415
12411
|
checkZoom() {
|
|
12416
12412
|
return this.tileZoom < this.planet.terrain._maxNodeZoom;
|
|
@@ -12778,7 +12774,7 @@ class ft {
|
|
|
12778
12774
|
createChildNodes() {
|
|
12779
12775
|
this.ready = !0;
|
|
12780
12776
|
const e = this.planet, t = this.segment, i = t._extent, r = t.tileZoom + 1, s = 0.5 * i.getWidth(), n = 0.5 * i.getHeight(), o = i.northEast, l = i.southWest, h = new A(l.lon + s, l.lat + n), c = this.nodes;
|
|
12781
|
-
c[0] = new ft(this.SegmentPrototype, e, 0, this, r, new
|
|
12777
|
+
c[0] = new ft(this.SegmentPrototype, e, 0, this, r, new G(new A(l.lon, l.lat + n), new A(l.lon + s, o.lat))), c[1] = new ft(this.SegmentPrototype, e, 1, this, r, new G(h, new A(o.lon, o.lat))), c[2] = new ft(this.SegmentPrototype, e, 2, this, r, new G(new A(l.lon, l.lat), h)), c[3] = new ft(this.SegmentPrototype, e, 3, this, r, new G(new A(l.lon + s, l.lat), new A(o.lon, l.lat + n)));
|
|
12782
12778
|
}
|
|
12783
12779
|
createBounds() {
|
|
12784
12780
|
let e = this.segment;
|
|
@@ -13118,8 +13114,8 @@ class Sc {
|
|
|
13118
13114
|
return r = Ye(e.lon, 360 / n, -180), s = Ye(e.lat, 180 / n, 90), [r, s, i, 0];
|
|
13119
13115
|
}
|
|
13120
13116
|
getLonLatTileOffset(e, t, i, r, s) {
|
|
13121
|
-
let n = e, o = new
|
|
13122
|
-
o = Gr(t, i, r,
|
|
13117
|
+
let n = e, o = new G();
|
|
13118
|
+
o = Gr(t, i, r, G.createFromArray([-180, -90, 180, 90]));
|
|
13123
13119
|
let l = o.getWidth() / (s - 1), h = o.getHeight() / (s - 1);
|
|
13124
13120
|
return [s - Math.ceil((n.lat - o.southWest.lat) / h) - 1, Math.floor((n.lon - o.southWest.lon) / l)];
|
|
13125
13121
|
}
|
|
@@ -13130,7 +13126,7 @@ class Sc {
|
|
|
13130
13126
|
const Ha = new _s({ code: "epsg:4326", units: Fa }), _n = (90 - ce) / Math.pow(2, 7);
|
|
13131
13127
|
class fn extends Oa {
|
|
13132
13128
|
constructor(e, t, i, r) {
|
|
13133
|
-
super(e, t, i, r), this._projection = Ha, this._extentLonLat = this._extent, this._extentMerc = new
|
|
13129
|
+
super(e, t, i, r), this._projection = Ha, this._extentLonLat = this._extent, this._extentMerc = new G(r.southWest.forwardMercatorEPS01(), r.northEast.forwardMercatorEPS01()), this._isNorth = this._extent.northEast.lat > 0, this.isPole = !0;
|
|
13134
13130
|
}
|
|
13135
13131
|
_setExtentLonLat() {
|
|
13136
13132
|
this._extentLonLat = this._extent;
|
|
@@ -13225,7 +13221,7 @@ class Ct {
|
|
|
13225
13221
|
}
|
|
13226
13222
|
createChildNodes() {
|
|
13227
13223
|
const e = this.strategy, t = this.extent, i = 0.5 * t.getWidth(), r = 0.5 * t.getHeight(), s = t.northEast, n = t.southWest, o = new A(n.lon + i, n.lat + r), l = this.childNodes, h = this.layer._planet, c = this.zoom + 1;
|
|
13228
|
-
l[0] = new Ct(e, 0, this, new
|
|
13224
|
+
l[0] = new Ct(e, 0, this, new G(new A(n.lon, n.lat + r), new A(n.lon + i, s.lat)), h, c), l[1] = new Ct(e, 1, this, new G(o, new A(s.lon, s.lat)), h, c), l[2] = new Ct(e, 2, this, new G(new A(n.lon, n.lat), o), h, c), l[3] = new Ct(e, 3, this, new G(new A(n.lon + i, n.lat), new A(s.lon, n.lat + r)), h, c);
|
|
13229
13225
|
}
|
|
13230
13226
|
collectRenderCollectionsPASS1(e, t) {
|
|
13231
13227
|
const i = e[this.nodeId];
|
|
@@ -13294,7 +13290,7 @@ class Tt extends Ct {
|
|
|
13294
13290
|
}
|
|
13295
13291
|
createChildNodes() {
|
|
13296
13292
|
const e = this.strategy, t = this.extent, i = 0.5 * t.getWidth(), r = 0.5 * t.getHeight(), s = t.northEast, n = t.southWest, o = new A(n.lon + i, n.lat + r), l = this.childNodes, h = this.layer._planet, c = this.zoom + 1;
|
|
13297
|
-
l[0] = new Tt(e, 0, this, new
|
|
13293
|
+
l[0] = new Tt(e, 0, this, new G(new A(n.lon, n.lat + r), new A(n.lon + i, s.lat)), h, c), l[1] = new Tt(e, 1, this, new G(o, new A(s.lon, s.lat)), h, c), l[2] = new Tt(e, 2, this, new G(new A(n.lon, n.lat), o), h, c), l[3] = new Tt(e, 3, this, new G(new A(n.lon + i, n.lat), new A(s.lon, n.lat + r)), h, c);
|
|
13298
13294
|
}
|
|
13299
13295
|
_setExtentBounds() {
|
|
13300
13296
|
this.extent.northEast.lat > 0 && (this.isNorth = !0), this.bsphere.setFromExtent(this.layer._planet.ellipsoid, this.extent);
|
|
@@ -13318,7 +13314,7 @@ class Rc extends Na {
|
|
|
13318
13314
|
constructor(e, t) {
|
|
13319
13315
|
super(e, t);
|
|
13320
13316
|
let i = e._planet;
|
|
13321
|
-
this._entityCollectionsTree = new Ct(this, 0, null,
|
|
13317
|
+
this._entityCollectionsTree = new Ct(this, 0, null, G.createFromArray([-2003750834e-2, -2003750834e-2, 2003750834e-2, 2003750834e-2]), i, 0), this._entityCollectionsTreeNorth = new Tt(this, 0, null, G.createFromArray([-180, ce, 180, 90]), i, 0), this._entityCollectionsTreeSouth = new Tt(this, 0, null, G.createFromArray([-180, -90, 180, He]), i, 0), this._renderingNodes = {}, this._renderingNodesNorth = {}, this._renderingNodesSouth = {};
|
|
13322
13318
|
}
|
|
13323
13319
|
insertEntity(e, t = !1) {
|
|
13324
13320
|
e._lonLat.lat > ce ? (this._entityCollectionsTreeNorth.__setLonLat__(e), this._entityCollectionsTreeNorth.insertEntity(e, t)) : e._lonLat.lat < He ? (this._entityCollectionsTreeSouth.__setLonLat__(e), this._entityCollectionsTreeSouth.insertEntity(e, t)) : (this._entityCollectionsTree.__setLonLat__(e), this._entityCollectionsTree.insertEntity(e, t));
|
|
@@ -13368,7 +13364,7 @@ class Mc extends Sc {
|
|
|
13368
13364
|
return new Rc(e, t);
|
|
13369
13365
|
}
|
|
13370
13366
|
init() {
|
|
13371
|
-
this._quadTreeList = [new ft(Oa, this.planet, 0, null, 0,
|
|
13367
|
+
this._quadTreeList = [new ft(Oa, this.planet, 0, null, 0, G.createFromArray([-2003750834e-2, -2003750834e-2, 2003750834e-2, 2003750834e-2])), new ft(fn, this.planet, 0, null, 0, G.createFromArray([-180, ce, 180, 90])), new ft(fn, this.planet, 0, null, 0, G.createFromArray([-180, -90, 180, He]))];
|
|
13372
13368
|
}
|
|
13373
13369
|
getTileXY(e, t) {
|
|
13374
13370
|
let i = function(l, h = ce) {
|
|
@@ -13383,8 +13379,8 @@ class Mc extends Sc {
|
|
|
13383
13379
|
return [s, n, r, i];
|
|
13384
13380
|
}
|
|
13385
13381
|
getLonLatTileOffset(e, t, i, r, s) {
|
|
13386
|
-
let n = e, o = new
|
|
13387
|
-
e.lat > ce ? o = Gr(t, i, r,
|
|
13382
|
+
let n = e, o = new G();
|
|
13383
|
+
e.lat > ce ? o = Gr(t, i, r, G.createFromArray([-180, ce, 180, 90])) : e.lat < He ? o = Gr(t, i, r, G.createFromArray([-180, -90, 180, He])) : (n = qi(e), o = Wt(t, i, r));
|
|
13388
13384
|
let l = o.getWidth() / (s - 1), h = o.getHeight() / (s - 1);
|
|
13389
13385
|
return [s - Math.ceil((n.lat - o.southWest.lat) / h) - 1, Math.floor((n.lon - o.southWest.lon) / l)];
|
|
13390
13386
|
}
|
|
@@ -13993,9 +13989,9 @@ class Ya extends ct {
|
|
|
13993
13989
|
this._fadingNodes.has(l._fadingNodes[0].__id) && !n.has(m.node.__id) && (n.set(m.node.__id, !0), u ? (g && m.equalize(), m.readyToEngage && m.engage(), m.screenRendering(o, h, c), d.push(m)) : m.screenRendering(o, h, c, this.transparentTexture, !0));
|
|
13994
13990
|
}
|
|
13995
13991
|
f.enable(f.DEPTH_TEST);
|
|
13996
|
-
}, this._atmosphere = new wc(e.atmosphereParameters), this.transitionTime = 580, this.ellipsoid = e.ellipsoid || Fn, this.lightEnabled = !0, this._planetRadius2 = (this.ellipsoid.getPolarSize() - 1e4) * (this.ellipsoid.getPolarSize() - 1e4), this._layers = [], this._updateLayers = !1, this.visibleTileLayers = [], this.visibleVectorLayers = [], this._visibleVectorLayersByDepthOrder = [], this._visibleTileLayerSlices = [], this._visibleEntityCollections = [[]], this.baseLayer = null, this.terrain = null, this.camera = new Ra(this, { frustums: e.frustums, eye: new v(25e6, 0, 0), look: v.ZERO, up: v.NORTH, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude }), this.maxEqualZoomAltitude = e.maxEqualZoomAltitude || 15e6, this.minEqualZoomAltitude = e.minEqualZoomAltitude || 1e4, this.minEqualZoomCameraSlope = e.minEqualZoomCameraSlope || 0.8, this.mousePositionOnEarth = new v(), this.emptyTexture = null, this.transparentTexture = null, this.defaultTexture = null, this.minCurrZoom = ye, this.maxCurrZoom = Ce, this._viewExtent = new
|
|
13992
|
+
}, this._atmosphere = new wc(e.atmosphereParameters), this.transitionTime = 580, this.ellipsoid = e.ellipsoid || Fn, this.lightEnabled = !0, this._planetRadius2 = (this.ellipsoid.getPolarSize() - 1e4) * (this.ellipsoid.getPolarSize() - 1e4), this._layers = [], this._updateLayers = !1, this.visibleTileLayers = [], this.visibleVectorLayers = [], this._visibleVectorLayersByDepthOrder = [], this._visibleTileLayerSlices = [], this._visibleEntityCollections = [[]], this.baseLayer = null, this.terrain = null, this.camera = new Ra(this, { frustums: e.frustums, eye: new v(25e6, 0, 0), look: v.ZERO, up: v.NORTH, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude }), this.maxEqualZoomAltitude = e.maxEqualZoomAltitude || 15e6, this.minEqualZoomAltitude = e.minEqualZoomAltitude || 1e4, this.minEqualZoomCameraSlope = e.minEqualZoomCameraSlope || 0.8, this.mousePositionOnEarth = new v(), this.emptyTexture = null, this.transparentTexture = null, this.defaultTexture = null, this.minCurrZoom = ye, this.maxCurrZoom = Ce, this._viewExtent = new G(new A(180, 180), new A(-180, -180)), this._skipPreRender = !1, this._initialViewExtent = null, this._createdNodesCount = 0, this._renderedNodes = [], this._renderedNodesInFrustum = [], this._fadingNodes = /* @__PURE__ */ new Map(), this._fadingNodesInFrustum = [], this._fadingOpaqueSegments = [], this.layerLock = new Hr(), this.terrainLock = new Hr(), this._heightFactor = 1, this._indexesCache = [], this._indexesCacheToRemove = [], this._indexesCacheToRemoveCounter = 0, this._textureCoordsBufferCache = [], this.quadTreeStrategy = e.quadTreeStrategyPrototype ? new e.quadTreeStrategyPrototype(this) : new Mc(this), this._nightTexture = null, this._specularTexture = null;
|
|
13997
13993
|
let t = je(e.ambient, new v(0.2, 0.2, 0.3)), i = je(e.diffuse, new v(1, 1, 1)), r = je(e.specular, new v(63e-5, 55e-5, 32e-5)), s = e.shininess || 18;
|
|
13998
|
-
this._ambient = new Float32Array([t.x, t.y, t.z]), this._diffuse = new Float32Array([i.x, i.y, i.z]), this._specular = new Float32Array([r.x, r.y, r.z, s]), this._maxGridSize = Math.log2(e.maxGridSize || 256), this.SLICE_SIZE = 4, this.SLICE_SIZE_4 = 4 * this.SLICE_SIZE, this.SLICE_SIZE_3 = 3 * this.SLICE_SIZE, this._lodSize = 256, this._curLodSize = 256, this._minLodSize = 512, this._maxLodSize = 256, this._pickingColorArr = new Float32Array(this.SLICE_SIZE_4), this._samplerArr = new Int32Array(this.SLICE_SIZE), this._pickingMaskArr = new Int32Array(this.SLICE_SIZE), this._geoImageCreator = new Bc(this), this._vectorTileCreator = new Hc(this, e.vectorTileSize, e.vectorTileSize), this._normalMapCreator = new Ic(this), this._terrainWorker = new Nc(3), this._plainSegmentWorker = new Fc(3), this._tileLoader = new Ua(e.maxLoadingRequests || 12), this._memKey = new Ai(), this.events = _e(Vc), this._distBeforeMemClear = 0, this._prevCamEye = new v(), this._initialized = !1, this._renderCompleted = !1, this._renderCompletedActivated = !1, this._terrainCompleted = !1, this._terrainCompletedActivated = !1, this._collectRenderNodesIsActive = !0, this.nightTextureCoefficient = 2, this._renderScreenNodesPASS = this._renderScreenNodesPASSNoAtmos, this._renderScreenNodesWithHeightPASS = this._renderScreenNodesWithHeightPASSNoAtmos, this._atmosphereEnabled = e.atmosphereEnabled || !1, this._atmosphereMaxMinOpacity = new Float32Array([0.95, 0.28]), this.solidTextureOne = null, this.solidTextureTwo = null, this._nightTextureSrc = e.nightTextureSrc || null, this._specularTextureSrc = e.specularTextureSrc || null, this._transitionOpacityEnabled = e.transitionOpacityEnabled == null || e.transitionOpacityEnabled;
|
|
13994
|
+
this._ambient = new Float32Array([t.x, t.y, t.z]), this._diffuse = new Float32Array([i.x, i.y, i.z]), this._specular = new Float32Array([r.x, r.y, r.z, s]), this._maxGridSize = Math.log2(e.maxGridSize || 256), this.SLICE_SIZE = 4, this.SLICE_SIZE_4 = 4 * this.SLICE_SIZE, this.SLICE_SIZE_3 = 3 * this.SLICE_SIZE, this._lodSize = 256, this._curLodSize = 256, this._minLodSize = 512, this._maxLodSize = 256, this._maxNodes = e.maxNodesCount || 200, this._pickingColorArr = new Float32Array(this.SLICE_SIZE_4), this._samplerArr = new Int32Array(this.SLICE_SIZE), this._pickingMaskArr = new Int32Array(this.SLICE_SIZE), this._geoImageCreator = new Bc(this), this._vectorTileCreator = new Hc(this, e.vectorTileSize, e.vectorTileSize), this._normalMapCreator = new Ic(this), this._terrainWorker = new Nc(3), this._plainSegmentWorker = new Fc(3), this._tileLoader = new Ua(e.maxLoadingRequests || 12), this._memKey = new Ai(), this.events = _e(Vc), this._distBeforeMemClear = 0, this._prevCamEye = new v(), this._initialized = !1, this._renderCompleted = !1, this._renderCompletedActivated = !1, this._terrainCompleted = !1, this._terrainCompletedActivated = !1, this._collectRenderNodesIsActive = !0, this.nightTextureCoefficient = 2, this._renderScreenNodesPASS = this._renderScreenNodesPASSNoAtmos, this._renderScreenNodesWithHeightPASS = this._renderScreenNodesWithHeightPASSNoAtmos, this._atmosphereEnabled = e.atmosphereEnabled || !1, this._atmosphereMaxMinOpacity = new Float32Array([0.95, 0.28]), this.solidTextureOne = null, this.solidTextureTwo = null, this._nightTextureSrc = e.nightTextureSrc || null, this._specularTextureSrc = e.specularTextureSrc || null, this._transitionOpacityEnabled = e.transitionOpacityEnabled == null || e.transitionOpacityEnabled;
|
|
13999
13995
|
}
|
|
14000
13996
|
get terrainReady() {
|
|
14001
13997
|
return this._terrainCompleted && this._terrainCompletedActivated;
|
|
@@ -14326,7 +14322,7 @@ precision highp float;uniform float frustumPickingColor;layout(location=0)out ve
|
|
|
14326
14322
|
}
|
|
14327
14323
|
_globalPreDraw() {
|
|
14328
14324
|
let e = this.camera;
|
|
14329
|
-
this._distBeforeMemClear += this._prevCamEye.distance(e.eye), this._prevCamEye.copy(e.eye), e.checkFly(), this._createdNodesCount >
|
|
14325
|
+
this._distBeforeMemClear += this._prevCamEye.distance(e.eye), this._prevCamEye.copy(e.eye), e.checkFly(), this._createdNodesCount > this._maxNodes && this._distBeforeMemClear > this._minDistanceBeforeMemClear && (this.terrain.clearCache(), this.memClear()), this._indexesCacheToRemoveCounter > 600 && this._clearIndexesCache();
|
|
14330
14326
|
}
|
|
14331
14327
|
preFrame() {
|
|
14332
14328
|
this._updateLayers && (this._updateLayers = !1, this._updateVisibleLayers()), this.camera.isFirstPass && (this.camera.update(), this._skipPreRender && this._collectRenderNodesIsActive && this._collectRenderNodes(this.camera), this._skipPreRender = !0, this._normalMapCreator.frame(), this._geoImageCreator.frame(), this._vectorTileCreator.frame(), this.camera.checkTerrainCollision(), this.camera.update(), this.events.dispatch(this.events.draw, this), this._collectVectorLayerCollections());
|
|
@@ -14474,7 +14470,7 @@ precision highp float;uniform float frustumPickingColor;layout(location=0)out ve
|
|
|
14474
14470
|
this.camera ? this.camera.viewExtent(e) : this._initialViewExtent = e;
|
|
14475
14471
|
}
|
|
14476
14472
|
viewExtentArr(e) {
|
|
14477
|
-
this.viewExtent(new
|
|
14473
|
+
this.viewExtent(new G(new A(e[0], e[1]), new A(e[2], e[3])));
|
|
14478
14474
|
}
|
|
14479
14475
|
getExtent() {
|
|
14480
14476
|
if (this.renderer) {
|
|
@@ -14482,7 +14478,7 @@ precision highp float;uniform float frustumPickingColor;layout(location=0)out ve
|
|
|
14482
14478
|
if (i[0] && i[1] && i[2] && i[3]) {
|
|
14483
14479
|
let r = i[0].lon, s = i[2].lat, n = i[1].lon, o = i[0].lat;
|
|
14484
14480
|
for (let l = 0; l < i.length; l++) i[l].lon > n && (n = i[l].lon), i[l].lat > o && (o = i[l].lat), i[l].lon < r && (r = i[l].lon), i[l].lat < s && (s = i[l].lat);
|
|
14485
|
-
return new
|
|
14481
|
+
return new G(new A(r, s), new A(n, o));
|
|
14486
14482
|
}
|
|
14487
14483
|
}
|
|
14488
14484
|
return this._viewExtent;
|
|
@@ -14657,7 +14653,7 @@ class vs extends ms {
|
|
|
14657
14653
|
constructor(e = "", t = {}) {
|
|
14658
14654
|
super({ geoidSrc: "https://openglobus.org/geoid/egm84-30.pgm", maxNativeZoom: t.maxNativeZoom || 14, ...t }), this._s = t.subdomains || ["a", "b", "c"], this.events = _e(Uc, this), this._requestCount = 0, this._requestsPeerSubdomain = 4, this.isEmpty = !1, this.equalizeNormals = !0, this.name = e || "openglobus", this.url = t.url || "https://{s}.srtm3.openglobus.org/{z}/{y}/{x}.ddm", this.gridSizeByZoom = t.gridSizeByZoom || [64, 32, 32, 16, 16, 8, 8, 8, 16, 16, 16, 32, 32, 32, 32, 16, 8, 4, 2, 2, 2, 2, 2, 2], this._heightFactor = t.heightFactor != null ? t.heightFactor : 1, this.noDataValues = t.noDataValues || [];
|
|
14659
14655
|
for (let i = 0; i < this.noDataValues.length; i++) this.noDataValues[i] *= this._heightFactor;
|
|
14660
|
-
this.plainGridSize = t.plainGridSize || 32, this._extent = Zr(t.extent, new
|
|
14656
|
+
this.plainGridSize = t.plainGridSize || 32, this._extent = Zr(t.extent, new G(new A(-180, -90), new A(180, 90))), this._dataType = "arrayBuffer", this._maxNodeZoom = this.gridSizeByZoom.length - 1, this._elevationCache = {}, this._fetchCache = {}, this._cache = t.cache || "", this._loader = new Ua(), this._urlRewriteCallback = t.urlRewrite || null;
|
|
14661
14657
|
}
|
|
14662
14658
|
get loader() {
|
|
14663
14659
|
return this._loader;
|
|
@@ -14685,7 +14681,7 @@ class vs extends ms {
|
|
|
14685
14681
|
if (c) return c.heights ? t(this._getGroundHeightMerc(d, c)) : t(0), !0;
|
|
14686
14682
|
{
|
|
14687
14683
|
let u = this._fetchCache[h];
|
|
14688
|
-
u || (u = this._loader.fetch({ src: this.buildURL(s, n, o, l), type: this._dataType }), this._fetchCache[h] = u), u.then((g) => {
|
|
14684
|
+
u || (u = this._loader.fetch({ src: this.buildURL(s, n, o, l), type: this._dataType, options: { cache: this._cache } }), this._fetchCache[h] = u), u.then((g) => {
|
|
14689
14685
|
let f = Wt(s, n, o);
|
|
14690
14686
|
if (g.status === "ready") {
|
|
14691
14687
|
let p = { heights: this._createHeights(g.data, null, l, s, n, o, f), extent: f };
|
|
@@ -14760,7 +14756,7 @@ class vs extends ms {
|
|
|
14760
14756
|
const Uc = ["load", "loadend"];
|
|
14761
14757
|
class Li extends qe {
|
|
14762
14758
|
constructor(e, t = {}) {
|
|
14763
|
-
super(e, t), this.events = this.events.registerNames(Gc), this.url = t.url || "", this._s = t.subdomains || ["a", "b", "c"], this.minNativeZoom = t.minNativeZoom || 0, this.maxNativeZoom = t.maxNativeZoom || 19, this._urlRewriteCallback = t.urlRewrite || null, this._requestsPeerSubdomains = 4, this._requestCount = 0;
|
|
14759
|
+
super(e, t), this.events = this.events.registerNames(Gc), this.url = t.url || "", this._s = t.subdomains || ["a", "b", "c"], this.minNativeZoom = t.minNativeZoom || 0, this.maxNativeZoom = t.maxNativeZoom || 19, this._urlRewriteCallback = t.urlRewrite || null, this._requestsPeerSubdomains = 4, this._requestCount = 0, this._cache = t.cache || "default";
|
|
14764
14760
|
}
|
|
14765
14761
|
get isIdle() {
|
|
14766
14762
|
return super.isIdle && this._planet._tileLoader.getRequestCounter(this) === 0;
|
|
@@ -14785,7 +14781,7 @@ class Li extends qe {
|
|
|
14785
14781
|
}
|
|
14786
14782
|
loadMaterial(e, t = !1) {
|
|
14787
14783
|
let i = e.segment;
|
|
14788
|
-
this._isBaseLayer ? e.texture = i.getDefaultTexture() : e.texture = i.planet.transparentTexture, (this._planet.layerLock.isFree() || e.segment.tileZoom < 2) && (e.isReady = !1, e.isLoading = !0, this._checkSegment(i) ? (e.loadingAttempts++, this._planet._tileLoader.load({ sender: this, src: this._getHTTPRequestString(e.segment), type: "imageBitmap", filter: () => i.initialized && i.node.getState() === 1 || t, options: {} }, (r) => {
|
|
14784
|
+
this._isBaseLayer ? e.texture = i.getDefaultTexture() : e.texture = i.planet.transparentTexture, (this._planet.layerLock.isFree() || e.segment.tileZoom < 2) && (e.isReady = !1, e.isLoading = !0, this._checkSegment(i) ? (e.loadingAttempts++, this._planet._tileLoader.load({ sender: this, src: this._getHTTPRequestString(e.segment), type: "imageBitmap", filter: () => i.initialized && i.node.getState() === 1 || t, options: { cache: this._cache } }, (r) => {
|
|
14789
14785
|
if (r.status === "ready") {
|
|
14790
14786
|
if (e.isLoading) {
|
|
14791
14787
|
let s = this.events.load;
|
|
@@ -14845,7 +14841,7 @@ class Li extends qe {
|
|
|
14845
14841
|
const Gc = ["load", "loadend"];
|
|
14846
14842
|
class gt extends Li {
|
|
14847
14843
|
constructor(e, t) {
|
|
14848
|
-
super(e, t), this._extra = new URLSearchParams(t.extra).toString(), t.extent || this.setExtent(new
|
|
14844
|
+
super(e, t), this._extra = new URLSearchParams(t.extra).toString(), t.extent || this.setExtent(new G(new A(-180, -90), new A(180, 90))), this.layers = t.layers, this.imageWidth = t.imageWidth || 256, this.imageHeight = t.imageHeight || 256, this._getBbox = gt.get_bbox_v1_1_1, this._version = "", this.setVersion(t.version);
|
|
14849
14845
|
}
|
|
14850
14846
|
static createRequestUrl(e, t, i = "image/png", r = "1.1.1", s = "GetMap", n, o, l = 256, h = 256, c) {
|
|
14851
14847
|
return `${e}?LAYERS=${t}&FORMAT=${i}&SERVICE=WMS&VERSION=${r}&REQUEST=${s}&SRS=${n}&BBOX=${o}&WIDTH=${l}&HEIGHT=${h}` + (c ? `&${c}` : "");
|
|
@@ -14996,7 +14992,7 @@ class Se extends vs {
|
|
|
14996
14992
|
return Se.checkNoDataValue(this.noDataValues, p) ? this.getHeightAsync(e, t, i - 1) : (t(this._heightFactor * this.rgb2Height(f[d], f[d + 1], f[d + 2])), !0);
|
|
14997
14993
|
}
|
|
14998
14994
|
let g = this._fetchCache[u];
|
|
14999
|
-
return g || (g = this._loader.fetch({ src: this._urlRewriteCallback && this._urlRewriteCallback(s, n, o, l) || this.buildURL(s, n, o, l), type: this._dataType }), this._fetchCache[u] = g), g.then((f) => {
|
|
14995
|
+
return g || (g = this._loader.fetch({ src: this._urlRewriteCallback && this._urlRewriteCallback(s, n, o, l) || this.buildURL(s, n, o, l), type: this._dataType, options: { cache: this._cache } }), this._fetchCache[u] = g), g.then((f) => {
|
|
15000
14996
|
if (f.status === "ready") {
|
|
15001
14997
|
this._ctx.clearRect(0, 0, this._imageSize, this._imageSize), this._ctx.drawImage(f.data, 0, 0);
|
|
15002
14998
|
let p = this._ctx.getImageData(0, 0, 256, 256).data;
|
|
@@ -15270,11 +15266,11 @@ class qc extends ue {
|
|
|
15270
15266
|
return i;
|
|
15271
15267
|
}
|
|
15272
15268
|
_convertKMLintoEntities(e) {
|
|
15273
|
-
const t = new
|
|
15269
|
+
const t = new G(new A(180, 90), new A(-180, -90));
|
|
15274
15270
|
return { entities: this._parseKML(e, t), extent: t };
|
|
15275
15271
|
}
|
|
15276
15272
|
_convertCoordonatesIntoEntities(e, t, i) {
|
|
15277
|
-
const r = new
|
|
15273
|
+
const r = new G(new A(180, 90), new A(-180, -90)), s = (o) => {
|
|
15278
15274
|
const l = o[0], h = o[1];
|
|
15279
15275
|
l < r.southWest.lon && (r.southWest.lon = l), h < r.southWest.lat && (r.southWest.lat = h), l > r.northEast.lon && (r.northEast.lon = l), h > r.northEast.lat && (r.northEast.lat = h);
|
|
15280
15276
|
}, n = [];
|
|
@@ -16235,7 +16231,7 @@ const vn = "/res", Qa = class Ui {
|
|
|
16235
16231
|
document.addEventListener("mousewheel", t, { capture: !1, passive: !1 });
|
|
16236
16232
|
}, this._canvas.onmouseleave = function() {
|
|
16237
16233
|
document.removeEventListener("mousewheel", t);
|
|
16238
|
-
}, this.renderer = new nd(new St(this._canvas, { autoActivate: !1, pixelRatio: e.dpi || window.devicePixelRatio + 0.15, context: { antialias: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !1 } }), { autoActivate: !1, msaa: e.msaa, fontsSrc: e.fontsSrc, gamma: e.gamma, exposure: e.exposure }), this.renderer.div = this.$inner, e.skybox && this.renderer.addNode(e.skybox), this._planetName = e.name ? e.name : "globus_planet_" + Ui.__counter__, this.planet = new Ya({ name: this._planetName, frustums: e.frustums, ellipsoid: e.ellipsoid, maxGridSize: e.maxGridSize, nightTextureSrc: e.nightTextureSrc === null ? null : e.nightTextureSrc || `${e.resourcesSrc || vn}/night.png`, specularTextureSrc: e.specularTextureSrc === null ? null : e.specularTextureSrc || `${e.resourcesSrc || vn}/spec.png`, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude || 15e6, maxEqualZoomAltitude: e.maxEqualZoomAltitude, minEqualZoomAltitude: e.minEqualZoomAltitude, minEqualZoomCameraSlope: e.minEqualZoomCameraSlope, quadTreeStrategyPrototype: e.quadTreeStrategyPrototype, maxLoadingRequests: e.maxLoadingRequests, atmosphereEnabled: e.atmosphereEnabled, transitionOpacityEnabled: e.transitionOpacityEnabled, atmosphereParameters: e.atmosphereParameters, minDistanceBeforeMemClear: e.minDistanceBeforeMemClear, vectorTileSize: e.vectorTileSize }), e.terrain ? Array.isArray(e.terrain) ? this.planet.setTerrain(e.terrain[0]) : this.planet.setTerrain(e.terrain) : this.planet.setTerrain(new ms()), this.renderer.addNode(this.planet), e.controls ? this.planet.addControls(e.controls) : this.planet.addControls([new Ta(), new va(), new Ca(), new ga(), new ba(), new Jn(), new Ur()]);
|
|
16234
|
+
}, this.renderer = new nd(new St(this._canvas, { autoActivate: !1, pixelRatio: e.dpi || window.devicePixelRatio + 0.15, context: { antialias: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !1 } }), { autoActivate: !1, msaa: e.msaa, fontsSrc: e.fontsSrc, gamma: e.gamma, exposure: e.exposure }), this.renderer.div = this.$inner, e.skybox && this.renderer.addNode(e.skybox), this._planetName = e.name ? e.name : "globus_planet_" + Ui.__counter__, this.planet = new Ya({ name: this._planetName, frustums: e.frustums, ellipsoid: e.ellipsoid, maxGridSize: e.maxGridSize, nightTextureSrc: e.nightTextureSrc === null ? null : e.nightTextureSrc || `${e.resourcesSrc || vn}/night.png`, specularTextureSrc: e.specularTextureSrc === null ? null : e.specularTextureSrc || `${e.resourcesSrc || vn}/spec.png`, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude || 15e6, maxEqualZoomAltitude: e.maxEqualZoomAltitude, minEqualZoomAltitude: e.minEqualZoomAltitude, minEqualZoomCameraSlope: e.minEqualZoomCameraSlope, quadTreeStrategyPrototype: e.quadTreeStrategyPrototype, maxLoadingRequests: e.maxLoadingRequests, atmosphereEnabled: e.atmosphereEnabled, transitionOpacityEnabled: e.transitionOpacityEnabled, atmosphereParameters: e.atmosphereParameters, minDistanceBeforeMemClear: e.minDistanceBeforeMemClear, vectorTileSize: e.vectorTileSize, maxNodesCount: e.maxNodesCount }), e.terrain ? Array.isArray(e.terrain) ? this.planet.setTerrain(e.terrain[0]) : this.planet.setTerrain(e.terrain) : this.planet.setTerrain(new ms()), this.renderer.addNode(this.planet), e.controls ? this.planet.addControls(e.controls) : this.planet.addControls([new Ta(), new va(), new Ca(), new ga(), new ba(), new Jn(), new Ur()]);
|
|
16239
16235
|
const i = this.renderer.controls;
|
|
16240
16236
|
let r;
|
|
16241
16237
|
for (let n in i) if (i[n] instanceof Vr) {
|
|
@@ -16273,6 +16269,14 @@ new qr(1737400, 1737400);
|
|
|
16273
16269
|
const gd = ({ children: a, onDraw: e, ...t }) => {
|
|
16274
16270
|
const i = Ve(null), { setGlobe: r } = mt(), [s, n] = dt(t), o = Ve(null);
|
|
16275
16271
|
return O(() => {
|
|
16272
|
+
if (o && o.current && t.viewExtent !== void 0) {
|
|
16273
|
+
const l = t.viewExtent instanceof G ? t.viewExtent : new G(
|
|
16274
|
+
new A(t.viewExtent[0], t.viewExtent[1]),
|
|
16275
|
+
new A(t.viewExtent[2], t.viewExtent[3])
|
|
16276
|
+
);
|
|
16277
|
+
o.current.planet.viewExtent(l);
|
|
16278
|
+
}
|
|
16279
|
+
}, [t.viewExtent]), O(() => {
|
|
16276
16280
|
o && o.current && t.atmosphereEnabled !== void 0 && (o.current.planet.atmosphereEnabled = t.atmosphereEnabled);
|
|
16277
16281
|
}, [t.atmosphereEnabled]), O(() => {
|
|
16278
16282
|
var l, h;
|
|
@@ -16293,8 +16297,7 @@ const gd = ({ children: a, onDraw: e, ...t }) => {
|
|
|
16293
16297
|
}), e && o.current.planet.events.on("draw", e);
|
|
16294
16298
|
}
|
|
16295
16299
|
return r(o.current), () => {
|
|
16296
|
-
|
|
16297
|
-
e && ((l = o.current) == null || l.planet.events.off("draw", e)), (h = o.current) == null || h.destroy(), o.current = null;
|
|
16300
|
+
o.current && (e && o.current.planet.events.off("draw", e), o.current.destroy(), o.current = null);
|
|
16298
16301
|
};
|
|
16299
16302
|
}, [s]), /* @__PURE__ */ Oe.createElement("div", { style: {
|
|
16300
16303
|
width: "100%",
|