@takram/three-geospatial 0.0.1-alpha.1 → 0.0.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/build/index.cjs +5 -4
- package/build/index.cjs.map +1 -0
- package/build/index.js +214 -225
- package/build/index.js.map +1 -0
- package/build/r3f.cjs +1 -0
- package/build/r3f.cjs.map +1 -0
- package/build/r3f.js +1 -0
- package/build/r3f.js.map +1 -0
- package/build/shared.cjs +1 -0
- package/build/shared.cjs.map +1 -0
- package/build/shared.js +1 -0
- package/build/shared.js.map +1 -0
- package/package.json +1 -1
- package/src/assertions.ts +0 -12
- package/src/bufferGeometry.ts +1 -3
- package/types/assertions.d.ts +0 -3
package/build/index.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
var Tt = Object.defineProperty;
|
2
2
|
var St = (e, t, n) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
3
|
var c = (e, t, n) => St(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
-
import { Loader as R, FileLoader as Pt, BufferAttribute as J, Box3 as Ot, Vector3 as f, Sphere as Mt, BufferGeometry as At, DataTexture as H, FloatType as I, Data3DTexture as zt, RGBAFormat as Et, ClampToEdgeWrapping as k, LinearFilter as tt, MathUtils as u, Matrix4 as It, Quaternion as
|
4
|
+
import { Loader as R, FileLoader as Pt, BufferAttribute as J, Box3 as Ot, Vector3 as f, Sphere as Mt, BufferGeometry as At, DataTexture as H, FloatType as I, Data3DTexture as zt, RGBAFormat as Et, ClampToEdgeWrapping as k, LinearFilter as tt, MathUtils as u, Matrix4 as It, Quaternion as Ct, Ray as Lt, Vector2 as ut } from "three";
|
5
5
|
import { E as et, G as m } from "./shared.js";
|
6
|
-
import { a as
|
7
|
-
var
|
6
|
+
import { a as wr } from "./shared.js";
|
7
|
+
var Nt = `float reverseLogDepth(const float depth, const float near, const float far) {
|
8
8
|
#ifdef USE_LOGDEPTHBUF
|
9
9
|
float d = pow(2.0, depth * log2(far + 1.0)) - 1.0;
|
10
10
|
float a = far / (far - near);
|
@@ -55,7 +55,7 @@ function jt(e, t) {
|
|
55
55
|
throw new Error(n);
|
56
56
|
}
|
57
57
|
}
|
58
|
-
class
|
58
|
+
class Gt extends R {
|
59
59
|
load(t, n, r, i) {
|
60
60
|
const a = new Pt(this.manager);
|
61
61
|
a.setResponseType("arraybuffer"), a.setRequestHeader(this.requestHeader), a.setPath(this.path), a.setWithCredentials(this.withCredentials), a.load(
|
@@ -73,85 +73,76 @@ class Ut extends R {
|
|
73
73
|
);
|
74
74
|
}
|
75
75
|
}
|
76
|
-
function
|
77
|
-
}
|
78
|
-
function Gt(e) {
|
79
|
-
return e != null;
|
80
|
-
}
|
81
|
-
function Yn(e) {
|
82
|
-
return e !== void 0;
|
76
|
+
function Xn(e) {
|
83
77
|
}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
var Rt = typeof global == "object" && global && global.Object === Object && global, Ht = typeof self == "object" && self && self.Object === Object && self, B = Rt || Ht || Function("return this")(), p = B.Symbol, dt = Object.prototype, Bt = dt.hasOwnProperty, qt = dt.toString, x = p ? p.toStringTag : void 0;
|
88
|
-
function Vt(e) {
|
89
|
-
var t = Bt.call(e, x), n = e[x];
|
78
|
+
var Ut = typeof global == "object" && global && global.Object === Object && global, Rt = typeof self == "object" && self && self.Object === Object && self, B = Ut || Rt || Function("return this")(), p = B.Symbol, dt = Object.prototype, Ht = dt.hasOwnProperty, Bt = dt.toString, x = p ? p.toStringTag : void 0;
|
79
|
+
function qt(e) {
|
80
|
+
var t = Ht.call(e, x), n = e[x];
|
90
81
|
try {
|
91
82
|
e[x] = void 0;
|
92
83
|
var r = !0;
|
93
84
|
} catch {
|
94
85
|
}
|
95
|
-
var i =
|
86
|
+
var i = Bt.call(e);
|
96
87
|
return r && (t ? e[x] = n : delete e[x]), i;
|
97
88
|
}
|
98
|
-
var
|
99
|
-
function
|
100
|
-
return
|
89
|
+
var Vt = Object.prototype, Wt = Vt.toString;
|
90
|
+
function Xt(e) {
|
91
|
+
return Wt.call(e);
|
101
92
|
}
|
102
|
-
var
|
93
|
+
var Zt = "[object Null]", Yt = "[object Undefined]", rt = p ? p.toStringTag : void 0;
|
103
94
|
function q(e) {
|
104
|
-
return e == null ? e === void 0 ?
|
95
|
+
return e == null ? e === void 0 ? Yt : Zt : rt && rt in Object(e) ? qt(e) : Xt(e);
|
105
96
|
}
|
106
97
|
function V(e) {
|
107
98
|
return e != null && typeof e == "object";
|
108
99
|
}
|
109
|
-
var
|
100
|
+
var Kt = "[object Symbol]";
|
110
101
|
function W(e) {
|
111
|
-
return typeof e == "symbol" || V(e) && q(e) ==
|
102
|
+
return typeof e == "symbol" || V(e) && q(e) == Kt;
|
112
103
|
}
|
113
|
-
function
|
104
|
+
function Qt(e, t) {
|
114
105
|
for (var n = -1, r = e == null ? 0 : e.length, i = Array(r); ++n < r; )
|
115
106
|
i[n] = t(e[n], n, e);
|
116
107
|
return i;
|
117
108
|
}
|
118
|
-
var P = Array.isArray,
|
109
|
+
var P = Array.isArray, Jt = 1 / 0, it = p ? p.prototype : void 0, at = it ? it.toString : void 0;
|
119
110
|
function ft(e) {
|
120
111
|
if (typeof e == "string")
|
121
112
|
return e;
|
122
113
|
if (P(e))
|
123
|
-
return
|
114
|
+
return Qt(e, ft) + "";
|
124
115
|
if (W(e))
|
125
116
|
return at ? at.call(e) : "";
|
126
117
|
var t = e + "";
|
127
|
-
return t == "0" && 1 / e == -
|
118
|
+
return t == "0" && 1 / e == -Jt ? "-0" : t;
|
128
119
|
}
|
129
120
|
function A(e) {
|
130
121
|
var t = typeof e;
|
131
122
|
return e != null && (t == "object" || t == "function");
|
132
123
|
}
|
133
|
-
function
|
124
|
+
function kt(e) {
|
134
125
|
return e;
|
135
126
|
}
|
136
|
-
var
|
137
|
-
function
|
127
|
+
var te = "[object AsyncFunction]", ee = "[object Function]", ne = "[object GeneratorFunction]", re = "[object Proxy]";
|
128
|
+
function ie(e) {
|
138
129
|
if (!A(e))
|
139
130
|
return !1;
|
140
131
|
var t = q(e);
|
141
|
-
return t ==
|
132
|
+
return t == ee || t == ne || t == te || t == re;
|
142
133
|
}
|
143
134
|
var j = B["__core-js_shared__"], st = function() {
|
144
135
|
var e = /[^.]+$/.exec(j && j.keys && j.keys.IE_PROTO || "");
|
145
136
|
return e ? "Symbol(src)_1." + e : "";
|
146
137
|
}();
|
147
|
-
function
|
138
|
+
function ae(e) {
|
148
139
|
return !!st && st in e;
|
149
140
|
}
|
150
|
-
var
|
151
|
-
function
|
141
|
+
var se = Function.prototype, oe = se.toString;
|
142
|
+
function ce(e) {
|
152
143
|
if (e != null) {
|
153
144
|
try {
|
154
|
-
return
|
145
|
+
return oe.call(e);
|
155
146
|
} catch {
|
156
147
|
}
|
157
148
|
try {
|
@@ -161,23 +152,23 @@ function he(e) {
|
|
161
152
|
}
|
162
153
|
return "";
|
163
154
|
}
|
164
|
-
var
|
165
|
-
"^" +
|
155
|
+
var he = /[\\^$.*+?()[\]{}|]/g, le = /^\[object .+?Constructor\]$/, ue = Function.prototype, de = Object.prototype, fe = ue.toString, pe = de.hasOwnProperty, ye = RegExp(
|
156
|
+
"^" + fe.call(pe).replace(he, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
166
157
|
);
|
167
|
-
function
|
168
|
-
if (!A(e) ||
|
158
|
+
function ge(e) {
|
159
|
+
if (!A(e) || ae(e))
|
169
160
|
return !1;
|
170
|
-
var t =
|
171
|
-
return t.test(
|
161
|
+
var t = ie(e) ? ye : le;
|
162
|
+
return t.test(ce(e));
|
172
163
|
}
|
173
|
-
function
|
164
|
+
function we(e, t) {
|
174
165
|
return e == null ? void 0 : e[t];
|
175
166
|
}
|
176
167
|
function X(e, t) {
|
177
|
-
var n =
|
178
|
-
return
|
168
|
+
var n = we(e, t);
|
169
|
+
return ge(n) ? n : void 0;
|
179
170
|
}
|
180
|
-
function
|
171
|
+
function ve(e, t, n) {
|
181
172
|
switch (n.length) {
|
182
173
|
case 0:
|
183
174
|
return e.call(t);
|
@@ -190,20 +181,20 @@ function me(e, t, n) {
|
|
190
181
|
}
|
191
182
|
return e.apply(t, n);
|
192
183
|
}
|
193
|
-
var
|
194
|
-
function
|
184
|
+
var me = 800, xe = 16, _e = Date.now;
|
185
|
+
function be(e) {
|
195
186
|
var t = 0, n = 0;
|
196
187
|
return function() {
|
197
|
-
var r =
|
188
|
+
var r = _e(), i = xe - (r - n);
|
198
189
|
if (n = r, i > 0) {
|
199
|
-
if (++t >=
|
190
|
+
if (++t >= me)
|
200
191
|
return arguments[0];
|
201
192
|
} else
|
202
193
|
t = 0;
|
203
194
|
return e.apply(void 0, arguments);
|
204
195
|
};
|
205
196
|
}
|
206
|
-
function
|
197
|
+
function Te(e) {
|
207
198
|
return function() {
|
208
199
|
return e;
|
209
200
|
};
|
@@ -214,19 +205,19 @@ var z = function() {
|
|
214
205
|
return e({}, "", {}), e;
|
215
206
|
} catch {
|
216
207
|
}
|
217
|
-
}(),
|
208
|
+
}(), Se = z ? function(e, t) {
|
218
209
|
return z(e, "toString", {
|
219
210
|
configurable: !0,
|
220
211
|
enumerable: !1,
|
221
|
-
value:
|
212
|
+
value: Te(t),
|
222
213
|
writable: !0
|
223
214
|
});
|
224
|
-
} :
|
215
|
+
} : kt, Pe = be(Se), Oe = 9007199254740991, Me = /^(?:0|[1-9]\d*)$/;
|
225
216
|
function pt(e, t) {
|
226
217
|
var n = typeof e;
|
227
|
-
return t = t ??
|
218
|
+
return t = t ?? Oe, !!t && (n == "number" || n != "symbol" && Me.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
228
219
|
}
|
229
|
-
function
|
220
|
+
function Ae(e, t, n) {
|
230
221
|
t == "__proto__" && z ? z(e, t, {
|
231
222
|
configurable: !0,
|
232
223
|
enumerable: !0,
|
@@ -237,10 +228,10 @@ function ze(e, t, n) {
|
|
237
228
|
function yt(e, t) {
|
238
229
|
return e === t || e !== e && t !== t;
|
239
230
|
}
|
240
|
-
var
|
241
|
-
function
|
231
|
+
var ze = Object.prototype, Ee = ze.hasOwnProperty;
|
232
|
+
function Ie(e, t, n) {
|
242
233
|
var r = e[t];
|
243
|
-
(!(
|
234
|
+
(!(Ee.call(e, t) && yt(r, n)) || n === void 0 && !(t in e)) && Ae(e, t, n);
|
244
235
|
}
|
245
236
|
var ot = Math.max;
|
246
237
|
function Ce(e, t, n) {
|
@@ -250,54 +241,54 @@ function Ce(e, t, n) {
|
|
250
241
|
i = -1;
|
251
242
|
for (var o = Array(t + 1); ++i < t; )
|
252
243
|
o[i] = r[i];
|
253
|
-
return o[t] = n(s),
|
244
|
+
return o[t] = n(s), ve(e, this, o);
|
254
245
|
};
|
255
246
|
}
|
256
247
|
var Le = 9007199254740991;
|
257
|
-
function
|
248
|
+
function Ne(e) {
|
258
249
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Le;
|
259
250
|
}
|
260
|
-
var
|
251
|
+
var De = "[object Arguments]";
|
261
252
|
function ct(e) {
|
262
|
-
return V(e) && q(e) ==
|
253
|
+
return V(e) && q(e) == De;
|
263
254
|
}
|
264
|
-
var gt = Object.prototype,
|
255
|
+
var gt = Object.prototype, Fe = gt.hasOwnProperty, $e = gt.propertyIsEnumerable, wt = ct(/* @__PURE__ */ function() {
|
265
256
|
return arguments;
|
266
257
|
}()) ? ct : function(e) {
|
267
|
-
return V(e) &&
|
268
|
-
},
|
269
|
-
function
|
258
|
+
return V(e) && Fe.call(e, "callee") && !$e.call(e, "callee");
|
259
|
+
}, je = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ge = /^\w*$/;
|
260
|
+
function Ue(e, t) {
|
270
261
|
if (P(e))
|
271
262
|
return !1;
|
272
263
|
var n = typeof e;
|
273
|
-
return n == "number" || n == "symbol" || n == "boolean" || e == null || W(e) ? !0 : Ge.test(e) || !
|
264
|
+
return n == "number" || n == "symbol" || n == "boolean" || e == null || W(e) ? !0 : Ge.test(e) || !je.test(e) || t != null && e in Object(t);
|
274
265
|
}
|
275
266
|
var T = X(Object, "create");
|
276
|
-
function
|
267
|
+
function Re() {
|
277
268
|
this.__data__ = T ? T(null) : {}, this.size = 0;
|
278
269
|
}
|
279
|
-
function
|
270
|
+
function He(e) {
|
280
271
|
var t = this.has(e) && delete this.__data__[e];
|
281
272
|
return this.size -= t ? 1 : 0, t;
|
282
273
|
}
|
283
|
-
var
|
284
|
-
function
|
274
|
+
var Be = "__lodash_hash_undefined__", qe = Object.prototype, Ve = qe.hasOwnProperty;
|
275
|
+
function We(e) {
|
285
276
|
var t = this.__data__;
|
286
277
|
if (T) {
|
287
278
|
var n = t[e];
|
288
|
-
return n ===
|
279
|
+
return n === Be ? void 0 : n;
|
289
280
|
}
|
290
|
-
return
|
281
|
+
return Ve.call(t, e) ? t[e] : void 0;
|
291
282
|
}
|
292
|
-
var
|
293
|
-
function
|
283
|
+
var Xe = Object.prototype, Ze = Xe.hasOwnProperty;
|
284
|
+
function Ye(e) {
|
294
285
|
var t = this.__data__;
|
295
|
-
return T ? t[e] !== void 0 :
|
286
|
+
return T ? t[e] !== void 0 : Ze.call(t, e);
|
296
287
|
}
|
297
|
-
var
|
298
|
-
function
|
288
|
+
var Ke = "__lodash_hash_undefined__";
|
289
|
+
function Qe(e, t) {
|
299
290
|
var n = this.__data__;
|
300
|
-
return this.size += this.has(e) ? 0 : 1, n[e] = T && t === void 0 ?
|
291
|
+
return this.size += this.has(e) ? 0 : 1, n[e] = T && t === void 0 ? Ke : t, this;
|
301
292
|
}
|
302
293
|
function g(e) {
|
303
294
|
var t = -1, n = e == null ? 0 : e.length;
|
@@ -306,37 +297,37 @@ function g(e) {
|
|
306
297
|
this.set(r[0], r[1]);
|
307
298
|
}
|
308
299
|
}
|
309
|
-
g.prototype.clear =
|
310
|
-
g.prototype.delete =
|
311
|
-
g.prototype.get =
|
312
|
-
g.prototype.has =
|
313
|
-
g.prototype.set =
|
314
|
-
function
|
300
|
+
g.prototype.clear = Re;
|
301
|
+
g.prototype.delete = He;
|
302
|
+
g.prototype.get = We;
|
303
|
+
g.prototype.has = Ye;
|
304
|
+
g.prototype.set = Qe;
|
305
|
+
function Je() {
|
315
306
|
this.__data__ = [], this.size = 0;
|
316
307
|
}
|
317
|
-
function
|
308
|
+
function C(e, t) {
|
318
309
|
for (var n = e.length; n--; )
|
319
310
|
if (yt(e[n][0], t))
|
320
311
|
return n;
|
321
312
|
return -1;
|
322
313
|
}
|
323
|
-
var
|
324
|
-
function
|
325
|
-
var t = this.__data__, n =
|
314
|
+
var ke = Array.prototype, tn = ke.splice;
|
315
|
+
function en(e) {
|
316
|
+
var t = this.__data__, n = C(t, e);
|
326
317
|
if (n < 0)
|
327
318
|
return !1;
|
328
319
|
var r = t.length - 1;
|
329
|
-
return n == r ? t.pop() :
|
320
|
+
return n == r ? t.pop() : tn.call(t, n, 1), --this.size, !0;
|
330
321
|
}
|
331
|
-
function
|
332
|
-
var t = this.__data__, n =
|
322
|
+
function nn(e) {
|
323
|
+
var t = this.__data__, n = C(t, e);
|
333
324
|
return n < 0 ? void 0 : t[n][1];
|
334
325
|
}
|
335
|
-
function
|
336
|
-
return
|
326
|
+
function rn(e) {
|
327
|
+
return C(this.__data__, e) > -1;
|
337
328
|
}
|
338
|
-
function
|
339
|
-
var n = this.__data__, r =
|
329
|
+
function an(e, t) {
|
330
|
+
var n = this.__data__, r = C(n, e);
|
340
331
|
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
341
332
|
}
|
342
333
|
function v(e) {
|
@@ -346,39 +337,39 @@ function v(e) {
|
|
346
337
|
this.set(r[0], r[1]);
|
347
338
|
}
|
348
339
|
}
|
349
|
-
v.prototype.clear =
|
350
|
-
v.prototype.delete =
|
351
|
-
v.prototype.get =
|
352
|
-
v.prototype.has =
|
353
|
-
v.prototype.set =
|
354
|
-
var
|
355
|
-
function
|
340
|
+
v.prototype.clear = Je;
|
341
|
+
v.prototype.delete = en;
|
342
|
+
v.prototype.get = nn;
|
343
|
+
v.prototype.has = rn;
|
344
|
+
v.prototype.set = an;
|
345
|
+
var sn = X(B, "Map");
|
346
|
+
function on() {
|
356
347
|
this.size = 0, this.__data__ = {
|
357
348
|
hash: new g(),
|
358
|
-
map: new (
|
349
|
+
map: new (sn || v)(),
|
359
350
|
string: new g()
|
360
351
|
};
|
361
352
|
}
|
362
|
-
function
|
353
|
+
function cn(e) {
|
363
354
|
var t = typeof e;
|
364
355
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
365
356
|
}
|
366
|
-
function
|
357
|
+
function L(e, t) {
|
367
358
|
var n = e.__data__;
|
368
|
-
return
|
359
|
+
return cn(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
369
360
|
}
|
370
|
-
function
|
371
|
-
var t =
|
361
|
+
function hn(e) {
|
362
|
+
var t = L(this, e).delete(e);
|
372
363
|
return this.size -= t ? 1 : 0, t;
|
373
364
|
}
|
374
|
-
function
|
375
|
-
return
|
365
|
+
function ln(e) {
|
366
|
+
return L(this, e).get(e);
|
376
367
|
}
|
377
|
-
function
|
378
|
-
return
|
368
|
+
function un(e) {
|
369
|
+
return L(this, e).has(e);
|
379
370
|
}
|
380
|
-
function
|
381
|
-
var n =
|
371
|
+
function dn(e, t) {
|
372
|
+
var n = L(this, e), r = n.size;
|
382
373
|
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
383
374
|
}
|
384
375
|
function w(e) {
|
@@ -388,15 +379,15 @@ function w(e) {
|
|
388
379
|
this.set(r[0], r[1]);
|
389
380
|
}
|
390
381
|
}
|
391
|
-
w.prototype.clear =
|
392
|
-
w.prototype.delete =
|
393
|
-
w.prototype.get =
|
394
|
-
w.prototype.has =
|
395
|
-
w.prototype.set =
|
396
|
-
var
|
382
|
+
w.prototype.clear = on;
|
383
|
+
w.prototype.delete = hn;
|
384
|
+
w.prototype.get = ln;
|
385
|
+
w.prototype.has = un;
|
386
|
+
w.prototype.set = dn;
|
387
|
+
var fn = "Expected a function";
|
397
388
|
function Z(e, t) {
|
398
389
|
if (typeof e != "function" || t != null && typeof t != "function")
|
399
|
-
throw new TypeError(
|
390
|
+
throw new TypeError(fn);
|
400
391
|
var n = function() {
|
401
392
|
var r = arguments, i = t ? t.apply(this, r) : r[0], a = n.cache;
|
402
393
|
if (a.has(i))
|
@@ -407,82 +398,82 @@ function Z(e, t) {
|
|
407
398
|
return n.cache = new (Z.Cache || w)(), n;
|
408
399
|
}
|
409
400
|
Z.Cache = w;
|
410
|
-
var
|
411
|
-
function
|
401
|
+
var pn = 500;
|
402
|
+
function yn(e) {
|
412
403
|
var t = Z(e, function(r) {
|
413
|
-
return n.size ===
|
404
|
+
return n.size === pn && n.clear(), r;
|
414
405
|
}), n = t.cache;
|
415
406
|
return t;
|
416
407
|
}
|
417
|
-
var
|
408
|
+
var gn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, wn = /\\(\\)?/g, vn = yn(function(e) {
|
418
409
|
var t = [];
|
419
|
-
return e.charCodeAt(0) === 46 && t.push(""), e.replace(
|
420
|
-
t.push(i ? a.replace(
|
410
|
+
return e.charCodeAt(0) === 46 && t.push(""), e.replace(gn, function(n, r, i, a) {
|
411
|
+
t.push(i ? a.replace(wn, "$1") : r || n);
|
421
412
|
}), t;
|
422
413
|
});
|
423
|
-
function
|
414
|
+
function mn(e) {
|
424
415
|
return e == null ? "" : ft(e);
|
425
416
|
}
|
426
|
-
function
|
427
|
-
return P(e) ? e :
|
417
|
+
function N(e, t) {
|
418
|
+
return P(e) ? e : Ue(e, t) ? [e] : vn(mn(e));
|
428
419
|
}
|
429
|
-
var
|
420
|
+
var xn = 1 / 0;
|
430
421
|
function Y(e) {
|
431
422
|
if (typeof e == "string" || W(e))
|
432
423
|
return e;
|
433
424
|
var t = e + "";
|
434
|
-
return t == "0" && 1 / e == -
|
425
|
+
return t == "0" && 1 / e == -xn ? "-0" : t;
|
435
426
|
}
|
436
|
-
function
|
437
|
-
t =
|
427
|
+
function _n(e, t) {
|
428
|
+
t = N(t, e);
|
438
429
|
for (var n = 0, r = t.length; e != null && n < r; )
|
439
430
|
e = e[Y(t[n++])];
|
440
431
|
return n && n == r ? e : void 0;
|
441
432
|
}
|
442
|
-
function
|
433
|
+
function bn(e, t) {
|
443
434
|
for (var n = -1, r = t.length, i = e.length; ++n < r; )
|
444
435
|
e[i + n] = t[n];
|
445
436
|
return e;
|
446
437
|
}
|
447
438
|
var ht = p ? p.isConcatSpreadable : void 0;
|
448
|
-
function
|
439
|
+
function Tn(e) {
|
449
440
|
return P(e) || wt(e) || !!(ht && e && e[ht]);
|
450
441
|
}
|
451
|
-
function
|
442
|
+
function Sn(e, t, n, r, i) {
|
452
443
|
var a = -1, s = e.length;
|
453
|
-
for (n || (n =
|
444
|
+
for (n || (n = Tn), i || (i = []); ++a < s; ) {
|
454
445
|
var o = e[a];
|
455
|
-
n(o) ?
|
446
|
+
n(o) ? bn(i, o) : i[i.length] = o;
|
456
447
|
}
|
457
448
|
return i;
|
458
449
|
}
|
459
|
-
function
|
450
|
+
function Pn(e) {
|
460
451
|
var t = e == null ? 0 : e.length;
|
461
|
-
return t ?
|
452
|
+
return t ? Sn(e) : [];
|
462
453
|
}
|
463
|
-
function
|
464
|
-
return
|
454
|
+
function On(e) {
|
455
|
+
return Pe(Ce(e, void 0, Pn), e + "");
|
465
456
|
}
|
466
|
-
function
|
457
|
+
function Mn(e, t) {
|
467
458
|
return e != null && t in Object(e);
|
468
459
|
}
|
469
|
-
function
|
470
|
-
t =
|
460
|
+
function An(e, t, n) {
|
461
|
+
t = N(t, e);
|
471
462
|
for (var r = -1, i = t.length, a = !1; ++r < i; ) {
|
472
463
|
var s = Y(t[r]);
|
473
464
|
if (!(a = e != null && n(e, s)))
|
474
465
|
break;
|
475
466
|
e = e[s];
|
476
467
|
}
|
477
|
-
return a || ++r != i ? a : (i = e == null ? 0 : e.length, !!i &&
|
468
|
+
return a || ++r != i ? a : (i = e == null ? 0 : e.length, !!i && Ne(i) && pt(s, i) && (P(e) || wt(e)));
|
478
469
|
}
|
479
|
-
function
|
480
|
-
return e != null &&
|
470
|
+
function zn(e, t) {
|
471
|
+
return e != null && An(e, t, Mn);
|
481
472
|
}
|
482
|
-
function
|
473
|
+
function En(e, t, n, r) {
|
483
474
|
if (!A(e))
|
484
475
|
return e;
|
485
|
-
t =
|
476
|
+
t = N(t, e);
|
486
477
|
for (var i = -1, a = t.length, s = a - 1, o = e; o != null && ++i < a; ) {
|
487
478
|
var h = Y(t[i]), l = n;
|
488
479
|
if (h === "__proto__" || h === "constructor" || h === "prototype")
|
@@ -491,26 +482,26 @@ function In(e, t, n, r) {
|
|
491
482
|
var y = o[h];
|
492
483
|
l = void 0, l === void 0 && (l = A(y) ? y : pt(t[i + 1]) ? [] : {});
|
493
484
|
}
|
494
|
-
|
485
|
+
Ie(o, h, l), o = o[h];
|
495
486
|
}
|
496
487
|
return e;
|
497
488
|
}
|
498
|
-
function
|
489
|
+
function In(e, t, n) {
|
499
490
|
for (var r = -1, i = t.length, a = {}; ++r < i; ) {
|
500
|
-
var s = t[r], o =
|
501
|
-
n(o, s) &&
|
491
|
+
var s = t[r], o = _n(e, s);
|
492
|
+
n(o, s) && En(a, N(s, e), o);
|
502
493
|
}
|
503
494
|
return a;
|
504
495
|
}
|
505
496
|
function Cn(e, t) {
|
506
|
-
return
|
507
|
-
return
|
497
|
+
return In(e, t, function(n, r) {
|
498
|
+
return zn(e, r);
|
508
499
|
});
|
509
500
|
}
|
510
|
-
var Ln =
|
501
|
+
var Ln = On(function(e, t) {
|
511
502
|
return e == null ? {} : Cn(e, t);
|
512
503
|
});
|
513
|
-
function
|
504
|
+
function Zn(e) {
|
514
505
|
var t;
|
515
506
|
return [
|
516
507
|
Ln(e, ["attributes", "index", "boundingBox", "boundingSphere"]),
|
@@ -519,10 +510,10 @@ function Qn(e) {
|
|
519
510
|
(n) => n.array.buffer
|
520
511
|
),
|
521
512
|
(t = e.index) == null ? void 0 : t.array.buffer
|
522
|
-
].filter(
|
513
|
+
].filter((n) => n != null)
|
523
514
|
];
|
524
515
|
}
|
525
|
-
function
|
516
|
+
function Yn(e, t = new At()) {
|
526
517
|
for (const [n, r] of Object.entries(e.attributes))
|
527
518
|
t.setAttribute(
|
528
519
|
n,
|
@@ -558,18 +549,18 @@ function K(e, t, n, r = !0) {
|
|
558
549
|
a[s] = i[n](o, r);
|
559
550
|
return a;
|
560
551
|
}
|
561
|
-
function
|
552
|
+
function Nn(e, t) {
|
562
553
|
return K(e, Int16Array, "getInt16", t);
|
563
554
|
}
|
564
|
-
function
|
555
|
+
function Dn(e, t) {
|
565
556
|
return K(e, Uint16Array, "getUint16", t);
|
566
557
|
}
|
567
|
-
function
|
558
|
+
function Fn(e, t) {
|
568
559
|
return K(e, Float32Array, "getFloat32", t);
|
569
560
|
}
|
570
561
|
class Q extends R {
|
571
562
|
load(t, n, r, i) {
|
572
|
-
const a = new
|
563
|
+
const a = new Gt(this.manager);
|
573
564
|
a.setRequestHeader(this.requestHeader), a.setPath(this.path), a.setWithCredentials(this.withCredentials), a.load(
|
574
565
|
t,
|
575
566
|
(s) => {
|
@@ -584,22 +575,22 @@ class Q extends R {
|
|
584
575
|
);
|
585
576
|
}
|
586
577
|
}
|
587
|
-
class
|
578
|
+
class $n extends Q {
|
588
579
|
constructor() {
|
589
580
|
super(...arguments);
|
590
|
-
c(this, "parseTypedArray",
|
581
|
+
c(this, "parseTypedArray", Nn);
|
591
582
|
}
|
592
583
|
}
|
593
|
-
class
|
584
|
+
class jn extends Q {
|
594
585
|
constructor() {
|
595
586
|
super(...arguments);
|
596
|
-
c(this, "parseTypedArray",
|
587
|
+
c(this, "parseTypedArray", Dn);
|
597
588
|
}
|
598
589
|
}
|
599
590
|
class vt extends Q {
|
600
591
|
constructor() {
|
601
592
|
super(...arguments);
|
602
|
-
c(this, "parseTypedArray",
|
593
|
+
c(this, "parseTypedArray", Fn);
|
603
594
|
}
|
604
595
|
}
|
605
596
|
const D = {
|
@@ -626,29 +617,29 @@ class F extends R {
|
|
626
617
|
);
|
627
618
|
}
|
628
619
|
}
|
629
|
-
class
|
620
|
+
class Kn extends F {
|
630
621
|
constructor() {
|
631
622
|
super(...arguments);
|
632
623
|
c(this, "Texture", H);
|
633
|
-
c(this, "TypedArrayLoader",
|
624
|
+
c(this, "TypedArrayLoader", $n);
|
634
625
|
c(this, "parameters", {
|
635
626
|
...D,
|
636
627
|
type: I
|
637
628
|
});
|
638
629
|
}
|
639
630
|
}
|
640
|
-
class
|
631
|
+
class Qn extends F {
|
641
632
|
constructor() {
|
642
633
|
super(...arguments);
|
643
634
|
c(this, "Texture", H);
|
644
|
-
c(this, "TypedArrayLoader",
|
635
|
+
c(this, "TypedArrayLoader", jn);
|
645
636
|
c(this, "parameters", {
|
646
637
|
...D,
|
647
638
|
type: I
|
648
639
|
});
|
649
640
|
}
|
650
641
|
}
|
651
|
-
class
|
642
|
+
class Jn extends F {
|
652
643
|
constructor() {
|
653
644
|
super(...arguments);
|
654
645
|
c(this, "Texture", H);
|
@@ -659,7 +650,7 @@ class er extends F {
|
|
659
650
|
});
|
660
651
|
}
|
661
652
|
}
|
662
|
-
class
|
653
|
+
class kn extends F {
|
663
654
|
constructor() {
|
664
655
|
super(...arguments);
|
665
656
|
c(this, "Texture", zt);
|
@@ -670,18 +661,18 @@ class nr extends F {
|
|
670
661
|
});
|
671
662
|
}
|
672
663
|
}
|
673
|
-
const Gn = u.clamp,
|
674
|
-
function
|
664
|
+
const Gn = u.clamp, tr = u.euclideanModulo, er = u.inverseLerp, nr = u.lerp, rr = u.degToRad, ir = u.radToDeg, ar = u.isPowerOfTwo, sr = u.ceilPowerOfTwo, or = u.floorPowerOfTwo, cr = u.normalize;
|
665
|
+
function hr(e, t, n) {
|
675
666
|
return n <= e ? 0 : n >= t ? 1 : (n = (n - e) / (t - e), n * n * (3 - 2 * n));
|
676
667
|
}
|
677
|
-
function
|
668
|
+
function lr(e) {
|
678
669
|
return Math.min(Math.max(e, 0), 1);
|
679
670
|
}
|
680
|
-
function
|
671
|
+
function ur(e, t, n, r = n) {
|
681
672
|
const i = Math.abs(e - t);
|
682
673
|
return i <= r || i <= n * Math.max(Math.abs(e), Math.abs(t));
|
683
674
|
}
|
684
|
-
const
|
675
|
+
const G = 1e-6, O = /* @__PURE__ */ new f(), M = /* @__PURE__ */ new f(), d = /* @__PURE__ */ new f(), _ = /* @__PURE__ */ new f(), U = /* @__PURE__ */ new f(), Un = /* @__PURE__ */ new f(), Rn = /* @__PURE__ */ new It(), Hn = /* @__PURE__ */ new Ct(), Bn = /* @__PURE__ */ new Lt();
|
685
676
|
class mt {
|
686
677
|
constructor(t = 0, n = 0, r = 0, i = 0) {
|
687
678
|
// Distance from the target.
|
@@ -699,13 +690,13 @@ class mt {
|
|
699
690
|
return this._distance;
|
700
691
|
}
|
701
692
|
set distance(t) {
|
702
|
-
this._distance = Math.max(t,
|
693
|
+
this._distance = Math.max(t, G);
|
703
694
|
}
|
704
695
|
get pitch() {
|
705
696
|
return this._pitch;
|
706
697
|
}
|
707
698
|
set pitch(t) {
|
708
|
-
this._pitch = Gn(t, -Math.PI / 2 +
|
699
|
+
this._pitch = Gn(t, -Math.PI / 2 + G, Math.PI / 2 - G);
|
709
700
|
}
|
710
701
|
set(t, n, r, i) {
|
711
702
|
return this.distance = t, this.heading = n, this.pitch = r, i != null && (this.roll = i), this;
|
@@ -727,20 +718,20 @@ class mt {
|
|
727
718
|
d
|
728
719
|
), i == null || i.copy(d);
|
729
720
|
const s = _.copy(O).multiplyScalar(Math.cos(this.heading)).add(
|
730
|
-
|
731
|
-
).multiplyScalar(Math.cos(this.pitch)).add(
|
721
|
+
U.copy(M).multiplyScalar(Math.sin(this.heading))
|
722
|
+
).multiplyScalar(Math.cos(this.pitch)).add(U.copy(d).multiplyScalar(Math.sin(this.pitch))).normalize().multiplyScalar(this.distance);
|
732
723
|
if (n.copy(t).sub(s), this.roll !== 0) {
|
733
724
|
const o = _.copy(t).sub(n).normalize();
|
734
725
|
d.applyQuaternion(
|
735
|
-
|
726
|
+
Hn.setFromAxisAngle(o, this.roll)
|
736
727
|
);
|
737
728
|
}
|
738
729
|
r.setFromRotationMatrix(
|
739
|
-
|
730
|
+
Rn.lookAt(n, t, d)
|
740
731
|
);
|
741
732
|
}
|
742
733
|
setFromCamera(t, n = et.WGS84) {
|
743
|
-
const r = _.setFromMatrixPosition(t.matrixWorld), i =
|
734
|
+
const r = _.setFromMatrixPosition(t.matrixWorld), i = U.set(0, 0, 0.5).unproject(t).sub(r).normalize(), a = n.getIntersection(Bn.set(r, i));
|
744
735
|
if (a == null)
|
745
736
|
return;
|
746
737
|
this.distance = r.distanceTo(a), n.getEastNorthUpVectors(
|
@@ -752,7 +743,7 @@ class mt {
|
|
752
743
|
M.dot(i),
|
753
744
|
O.dot(i)
|
754
745
|
), this.pitch = Math.asin(d.dot(i));
|
755
|
-
const s = _.copy(t.up).applyQuaternion(t.quaternion), o =
|
746
|
+
const s = _.copy(t.up).applyQuaternion(t.quaternion), o = Un.copy(i).multiplyScalar(-s.dot(i)).add(s).normalize(), h = _.copy(i).multiplyScalar(-d.dot(i)).add(d).normalize(), l = h.dot(o), y = i.dot(h.cross(o));
|
756
747
|
return this.roll = Math.atan2(y, l), this;
|
757
748
|
}
|
758
749
|
}
|
@@ -884,49 +875,47 @@ class _t {
|
|
884
875
|
return n.west = t.x * i + this.rectangle.west, n.east = (t.x + 1) * i + this.rectangle.west, n.north = this.rectangle.north - (r.y - t.y - 1) * a, n.south = this.rectangle.north - (r.y - t.y) * a, n;
|
885
876
|
}
|
886
877
|
}
|
887
|
-
const
|
878
|
+
const dr = Nt, fr = Dt, pr = Ft;
|
888
879
|
export {
|
889
|
-
|
880
|
+
Gt as ArrayBufferLoader,
|
890
881
|
F as DataLoader,
|
891
882
|
et as Ellipsoid,
|
892
|
-
|
883
|
+
wr as EllipsoidGeometry,
|
893
884
|
vt as Float32ArrayLoader,
|
894
|
-
|
895
|
-
|
885
|
+
Jn as Float32Data2DLoader,
|
886
|
+
kn as Float32Data3DLoader,
|
896
887
|
m as Geodetic,
|
897
|
-
|
898
|
-
|
888
|
+
$n as Int16ArrayLoader,
|
889
|
+
Kn as Int16Data2DLoader,
|
899
890
|
mt as PointOfView,
|
900
891
|
E as Rectangle,
|
901
892
|
S as TileCoordinate,
|
902
893
|
_t as TilingScheme,
|
903
894
|
Q as TypedArrayLoader,
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
895
|
+
jn as Uint16ArrayLoader,
|
896
|
+
Qn as Uint16Data2DLoader,
|
897
|
+
Xn as assertType,
|
898
|
+
sr as ceilPowerOfTwo,
|
908
899
|
Gn as clamp,
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
gr as packingShader,
|
923
|
-
$n as parseFloat32Array,
|
924
|
-
Dn as parseInt16Array,
|
900
|
+
ur as closeTo,
|
901
|
+
ir as degrees,
|
902
|
+
dr as depthShader,
|
903
|
+
tr as euclideanModulo,
|
904
|
+
or as floorPowerOfTwo,
|
905
|
+
Yn as fromBufferGeometryLike,
|
906
|
+
er as inverseLerp,
|
907
|
+
ar as isPowerOfTwo,
|
908
|
+
nr as lerp,
|
909
|
+
cr as normalize,
|
910
|
+
fr as packingShader,
|
911
|
+
Fn as parseFloat32Array,
|
912
|
+
Nn as parseInt16Array,
|
925
913
|
K as parseTypedArray,
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
914
|
+
Dn as parseUint16Array,
|
915
|
+
rr as radians,
|
916
|
+
lr as saturate,
|
917
|
+
hr as smoothstep,
|
918
|
+
Zn as toBufferGeometryLike,
|
919
|
+
pr as transformShader
|
932
920
|
};
|
921
|
+
//# sourceMappingURL=index.js.map
|