@loaders.gl/tiles 3.3.0-alpha.1 → 3.3.0-alpha.11
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/dist.min.js +1031 -1433
- package/dist/es5/bundle.js +0 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/constants.js +2 -1
- package/dist/es5/constants.js.map +1 -1
- package/dist/es5/index.js +26 -36
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/tileset/helpers/3d-tiles-options.js +0 -1
- package/dist/es5/tileset/helpers/3d-tiles-options.js.map +1 -1
- package/dist/es5/tileset/helpers/bounding-volume.js +7 -26
- package/dist/es5/tileset/helpers/bounding-volume.js.map +1 -1
- package/dist/es5/tileset/helpers/frame-state.js +45 -50
- package/dist/es5/tileset/helpers/frame-state.js.map +1 -1
- package/dist/es5/tileset/helpers/i3s-lod.js +0 -13
- package/dist/es5/tileset/helpers/i3s-lod.js.map +1 -1
- package/dist/es5/tileset/helpers/tiles-3d-lod.js +7 -16
- package/dist/es5/tileset/helpers/tiles-3d-lod.js.map +1 -1
- package/dist/es5/tileset/helpers/transform-utils.js +2 -11
- package/dist/es5/tileset/helpers/transform-utils.js.map +1 -1
- package/dist/es5/tileset/helpers/zoom.js +6 -16
- package/dist/es5/tileset/helpers/zoom.js.map +1 -1
- package/dist/es5/tileset/tile-3d.js +111 -98
- package/dist/es5/tileset/tile-3d.js.map +1 -1
- package/dist/es5/tileset/tileset-3d.js +130 -196
- package/dist/es5/tileset/tileset-3d.js.map +1 -1
- package/dist/es5/tileset/tileset-cache.js +1 -14
- package/dist/es5/tileset/tileset-cache.js.map +1 -1
- package/dist/es5/tileset/traversers/{i3s-frame-counter.js → i3s-pending-tiles-register.js} +21 -16
- package/dist/es5/tileset/traversers/i3s-pending-tiles-register.js.map +1 -0
- package/dist/es5/tileset/traversers/i3s-tile-manager.js +33 -27
- package/dist/es5/tileset/traversers/i3s-tile-manager.js.map +1 -1
- package/dist/es5/tileset/traversers/i3s-tileset-traverser.js +10 -52
- package/dist/es5/tileset/traversers/i3s-tileset-traverser.js.map +1 -1
- package/dist/es5/tileset/traversers/tileset-3d-traverser.js +0 -22
- package/dist/es5/tileset/traversers/tileset-3d-traverser.js.map +1 -1
- package/dist/es5/tileset/traversers/tileset-traverser.js +55 -78
- package/dist/es5/tileset/traversers/tileset-traverser.js.map +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/utils/doubly-linked-list-node.js +3 -7
- package/dist/es5/utils/doubly-linked-list-node.js.map +1 -1
- package/dist/es5/utils/doubly-linked-list.js +9 -17
- package/dist/es5/utils/doubly-linked-list.js.map +1 -1
- package/dist/es5/utils/managed-array.js +29 -30
- package/dist/es5/utils/managed-array.js.map +1 -1
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/constants.js +3 -0
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tileset/helpers/3d-tiles-options.js.map +1 -1
- package/dist/esm/tileset/helpers/bounding-volume.js +4 -10
- package/dist/esm/tileset/helpers/bounding-volume.js.map +1 -1
- package/dist/esm/tileset/helpers/frame-state.js +36 -20
- package/dist/esm/tileset/helpers/frame-state.js.map +1 -1
- package/dist/esm/tileset/helpers/i3s-lod.js +4 -4
- package/dist/esm/tileset/helpers/i3s-lod.js.map +1 -1
- package/dist/esm/tileset/helpers/tiles-3d-lod.js +11 -8
- package/dist/esm/tileset/helpers/tiles-3d-lod.js.map +1 -1
- package/dist/esm/tileset/helpers/transform-utils.js +1 -3
- package/dist/esm/tileset/helpers/transform-utils.js.map +1 -1
- package/dist/esm/tileset/helpers/zoom.js +3 -2
- package/dist/esm/tileset/helpers/zoom.js.map +1 -1
- package/dist/esm/tileset/tile-3d.js +47 -108
- package/dist/esm/tileset/tile-3d.js.map +1 -1
- package/dist/esm/tileset/tileset-3d.js +70 -163
- package/dist/esm/tileset/tileset-3d.js.map +1 -1
- package/dist/esm/tileset/tileset-cache.js +2 -18
- package/dist/esm/tileset/tileset-cache.js.map +1 -1
- package/dist/esm/tileset/traversers/i3s-pending-tiles-register.js +28 -0
- package/dist/esm/tileset/traversers/i3s-pending-tiles-register.js.map +1 -0
- package/dist/esm/tileset/traversers/i3s-tile-manager.js +34 -15
- package/dist/esm/tileset/traversers/i3s-tile-manager.js.map +1 -1
- package/dist/esm/tileset/traversers/i3s-tileset-traverser.js +8 -22
- package/dist/esm/tileset/traversers/i3s-tileset-traverser.js.map +1 -1
- package/dist/esm/tileset/traversers/tileset-3d-traverser.js +2 -9
- package/dist/esm/tileset/traversers/tileset-3d-traverser.js.map +1 -1
- package/dist/esm/tileset/traversers/tileset-traverser.js +20 -59
- package/dist/esm/tileset/traversers/tileset-traverser.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/doubly-linked-list-node.js +1 -4
- package/dist/esm/utils/doubly-linked-list-node.js.map +1 -1
- package/dist/esm/utils/doubly-linked-list.js +2 -11
- package/dist/esm/utils/doubly-linked-list.js.map +1 -1
- package/dist/esm/utils/managed-array.js +4 -22
- package/dist/esm/utils/managed-array.js.map +1 -1
- package/dist/tileset/helpers/frame-state.d.ts +5 -8
- package/dist/tileset/helpers/frame-state.d.ts.map +1 -1
- package/dist/tileset/helpers/frame-state.js +27 -12
- package/dist/tileset/helpers/i3s-lod.d.ts.map +1 -1
- package/dist/tileset/tile-3d.d.ts +15 -4
- package/dist/tileset/tile-3d.d.ts.map +1 -1
- package/dist/tileset/tile-3d.js +15 -2
- package/dist/tileset/tileset-3d.d.ts +17 -4
- package/dist/tileset/tileset-3d.d.ts.map +1 -1
- package/dist/tileset/tileset-3d.js +47 -10
- package/dist/tileset/traversers/{i3s-frame-counter.d.ts → i3s-pending-tiles-register.d.ts} +7 -4
- package/dist/tileset/traversers/i3s-pending-tiles-register.d.ts.map +1 -0
- package/dist/tileset/traversers/{i3s-frame-counter.js → i3s-pending-tiles-register.js} +17 -8
- package/dist/tileset/traversers/i3s-tile-manager.d.ts +19 -1
- package/dist/tileset/traversers/i3s-tile-manager.d.ts.map +1 -1
- package/dist/tileset/traversers/i3s-tile-manager.js +32 -12
- package/dist/tileset/traversers/i3s-tileset-traverser.d.ts +1 -1
- package/dist/tileset/traversers/i3s-tileset-traverser.d.ts.map +1 -1
- package/dist/tileset/traversers/i3s-tileset-traverser.js +9 -9
- package/dist/tileset/traversers/tileset-traverser.d.ts +3 -3
- package/dist/tileset/traversers/tileset-traverser.d.ts.map +1 -1
- package/dist/tileset/traversers/tileset-traverser.js +4 -4
- package/dist/types.d.ts +30 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/tileset/helpers/frame-state.ts +47 -19
- package/src/tileset/helpers/i3s-lod.ts +3 -1
- package/src/tileset/tile-3d.ts +16 -2
- package/src/tileset/tileset-3d.ts +55 -16
- package/src/tileset/traversers/i3s-pending-tiles-register.ts +44 -0
- package/src/tileset/traversers/i3s-tile-manager.ts +47 -11
- package/src/tileset/traversers/i3s-tileset-traverser.ts +5 -5
- package/src/tileset/traversers/tileset-traverser.ts +2 -2
- package/src/types.ts +32 -0
- package/dist/es5/tileset/traversers/i3s-frame-counter.js.map +0 -1
- package/dist/esm/tileset/traversers/i3s-frame-counter.js +0 -23
- package/dist/esm/tileset/traversers/i3s-frame-counter.js.map +0 -1
- package/dist/tileset/traversers/i3s-frame-counter.d.ts.map +0 -1
- package/src/tileset/traversers/i3s-frame-counter.ts +0 -35
package/dist/dist.min.js
CHANGED
|
@@ -25,11 +25,8 @@
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
// ../../node_modules/@math.gl/core/dist/esm/lib/common.js
|
|
28
|
-
function round(value) {
|
|
29
|
-
return Math.round(value / config.EPSILON) * config.EPSILON;
|
|
30
|
-
}
|
|
31
28
|
function formatValue(value, {
|
|
32
|
-
precision = config.precision
|
|
29
|
+
precision = config.precision
|
|
33
30
|
} = {}) {
|
|
34
31
|
value = round(value);
|
|
35
32
|
return "".concat(parseFloat(value.toPrecision(precision)));
|
|
@@ -37,19 +34,6 @@
|
|
|
37
34
|
function isArray(value) {
|
|
38
35
|
return Array.isArray(value) || ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
39
36
|
}
|
|
40
|
-
function duplicateArray(array) {
|
|
41
|
-
return array.clone ? array.clone() : new Array(array.length);
|
|
42
|
-
}
|
|
43
|
-
function map(value, func, result) {
|
|
44
|
-
if (isArray(value)) {
|
|
45
|
-
result = result || duplicateArray(value);
|
|
46
|
-
for (let i = 0; i < result.length && i < value.length; ++i) {
|
|
47
|
-
result[i] = func(value[i], i, result);
|
|
48
|
-
}
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
return func(value);
|
|
52
|
-
}
|
|
53
37
|
function toRadians(degrees2) {
|
|
54
38
|
return radians(degrees2);
|
|
55
39
|
}
|
|
@@ -88,7 +72,7 @@
|
|
|
88
72
|
if (b && b.equals) {
|
|
89
73
|
return b.equals(a);
|
|
90
74
|
}
|
|
91
|
-
if (
|
|
75
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
92
76
|
return Math.abs(a - b) <= config.EPSILON * Math.max(1, Math.abs(a), Math.abs(b));
|
|
93
77
|
}
|
|
94
78
|
return false;
|
|
@@ -96,18 +80,36 @@
|
|
|
96
80
|
config.EPSILON = oldEpsilon;
|
|
97
81
|
}
|
|
98
82
|
}
|
|
83
|
+
function round(value) {
|
|
84
|
+
return Math.round(value / config.EPSILON) * config.EPSILON;
|
|
85
|
+
}
|
|
86
|
+
function duplicateArray(array) {
|
|
87
|
+
return array.clone ? array.clone() : new Array(array.length);
|
|
88
|
+
}
|
|
89
|
+
function map(value, func, result) {
|
|
90
|
+
if (isArray(value)) {
|
|
91
|
+
const array = value;
|
|
92
|
+
result = result || duplicateArray(array);
|
|
93
|
+
for (let i = 0; i < result.length && i < array.length; ++i) {
|
|
94
|
+
result[i] = func(value[i], i, result);
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
return func(value);
|
|
99
|
+
}
|
|
99
100
|
var RADIANS_TO_DEGREES, DEGREES_TO_RADIANS, config;
|
|
100
101
|
var init_common = __esm({
|
|
101
102
|
"../../node_modules/@math.gl/core/dist/esm/lib/common.js"() {
|
|
102
103
|
RADIANS_TO_DEGREES = 1 / Math.PI * 180;
|
|
103
104
|
DEGREES_TO_RADIANS = 1 / 180 * Math.PI;
|
|
104
|
-
config = {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
config = {
|
|
106
|
+
EPSILON: 1e-12,
|
|
107
|
+
debug: false,
|
|
108
|
+
precision: 4,
|
|
109
|
+
printTypes: false,
|
|
110
|
+
printDegrees: false,
|
|
111
|
+
printRowMajor: true
|
|
112
|
+
};
|
|
111
113
|
}
|
|
112
114
|
});
|
|
113
115
|
|
|
@@ -137,24 +139,25 @@
|
|
|
137
139
|
var init_math_array = __esm({
|
|
138
140
|
"../../node_modules/@math.gl/core/dist/esm/classes/base/math-array.js"() {
|
|
139
141
|
init_common();
|
|
140
|
-
init_assert();
|
|
141
142
|
MathArray = class extends _extendableBuiltin(Array) {
|
|
142
|
-
get ELEMENTS() {
|
|
143
|
-
assert(false);
|
|
144
|
-
return 0;
|
|
145
|
-
}
|
|
146
143
|
clone() {
|
|
147
144
|
return new this.constructor().copy(this);
|
|
148
145
|
}
|
|
149
|
-
from(arrayOrObject) {
|
|
150
|
-
return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
|
|
151
|
-
}
|
|
152
146
|
fromArray(array, offset = 0) {
|
|
153
147
|
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
154
148
|
this[i] = array[i + offset];
|
|
155
149
|
}
|
|
156
150
|
return this.check();
|
|
157
151
|
}
|
|
152
|
+
toArray(targetArray = [], offset = 0) {
|
|
153
|
+
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
154
|
+
targetArray[offset + i] = this[i];
|
|
155
|
+
}
|
|
156
|
+
return targetArray;
|
|
157
|
+
}
|
|
158
|
+
from(arrayOrObject) {
|
|
159
|
+
return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
|
|
160
|
+
}
|
|
158
161
|
to(arrayOrObject) {
|
|
159
162
|
if (arrayOrObject === this) {
|
|
160
163
|
return this;
|
|
@@ -164,12 +167,6 @@
|
|
|
164
167
|
toTarget(target) {
|
|
165
168
|
return target ? this.to(target) : this;
|
|
166
169
|
}
|
|
167
|
-
toArray(array = [], offset = 0) {
|
|
168
|
-
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
169
|
-
array[offset + i] = this[i];
|
|
170
|
-
}
|
|
171
|
-
return array;
|
|
172
|
-
}
|
|
173
170
|
toFloat32Array() {
|
|
174
171
|
return new Float32Array(this);
|
|
175
172
|
}
|
|
@@ -213,9 +210,7 @@
|
|
|
213
210
|
}
|
|
214
211
|
lerp(a, b, t) {
|
|
215
212
|
if (t === void 0) {
|
|
216
|
-
|
|
217
|
-
b = a;
|
|
218
|
-
a = this;
|
|
213
|
+
return this.lerp(this, a, b);
|
|
219
214
|
}
|
|
220
215
|
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
221
216
|
const ai = a[i];
|
|
@@ -258,14 +253,36 @@
|
|
|
258
253
|
return this.check();
|
|
259
254
|
}
|
|
260
255
|
scale(scale5) {
|
|
261
|
-
if (
|
|
262
|
-
|
|
256
|
+
if (typeof scale5 === "number") {
|
|
257
|
+
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
258
|
+
this[i] *= scale5;
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
for (let i = 0; i < this.ELEMENTS && i < scale5.length; ++i) {
|
|
262
|
+
this[i] *= scale5[i];
|
|
263
|
+
}
|
|
263
264
|
}
|
|
265
|
+
return this.check();
|
|
266
|
+
}
|
|
267
|
+
multiplyByScalar(scalar) {
|
|
264
268
|
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
265
|
-
this[i] *=
|
|
269
|
+
this[i] *= scalar;
|
|
266
270
|
}
|
|
267
271
|
return this.check();
|
|
268
272
|
}
|
|
273
|
+
check() {
|
|
274
|
+
if (config.debug && !this.validate()) {
|
|
275
|
+
throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
|
|
276
|
+
}
|
|
277
|
+
return this;
|
|
278
|
+
}
|
|
279
|
+
validate() {
|
|
280
|
+
let valid = this.length === this.ELEMENTS;
|
|
281
|
+
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
282
|
+
valid = valid && Number.isFinite(this[i]);
|
|
283
|
+
}
|
|
284
|
+
return valid;
|
|
285
|
+
}
|
|
269
286
|
sub(a) {
|
|
270
287
|
return this.subtract(a);
|
|
271
288
|
}
|
|
@@ -291,7 +308,7 @@
|
|
|
291
308
|
return this.check();
|
|
292
309
|
}
|
|
293
310
|
divideScalar(a) {
|
|
294
|
-
return this.
|
|
311
|
+
return this.multiplyByScalar(1 / a);
|
|
295
312
|
}
|
|
296
313
|
clampScalar(min, max) {
|
|
297
314
|
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
@@ -299,25 +316,9 @@
|
|
|
299
316
|
}
|
|
300
317
|
return this.check();
|
|
301
318
|
}
|
|
302
|
-
multiplyByScalar(scalar) {
|
|
303
|
-
return this.scale(scalar);
|
|
304
|
-
}
|
|
305
319
|
get elements() {
|
|
306
320
|
return this;
|
|
307
321
|
}
|
|
308
|
-
check() {
|
|
309
|
-
if (config.debug && !this.validate()) {
|
|
310
|
-
throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
|
|
311
|
-
}
|
|
312
|
-
return this;
|
|
313
|
-
}
|
|
314
|
-
validate() {
|
|
315
|
-
let valid = this.length === this.ELEMENTS;
|
|
316
|
-
for (let i = 0; i < this.ELEMENTS; ++i) {
|
|
317
|
-
valid = valid && Number.isFinite(this[i]);
|
|
318
|
-
}
|
|
319
|
-
return valid;
|
|
320
|
-
}
|
|
321
322
|
};
|
|
322
323
|
}
|
|
323
324
|
});
|
|
@@ -346,17 +347,9 @@
|
|
|
346
347
|
}
|
|
347
348
|
return v;
|
|
348
349
|
}
|
|
349
|
-
function deprecated(method, version) {
|
|
350
|
-
if (!map2[method]) {
|
|
351
|
-
map2[method] = true;
|
|
352
|
-
console.warn("".concat(method, " has been removed in version ").concat(version, ", see upgrade guide for more information"));
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
var map2;
|
|
356
350
|
var init_validators = __esm({
|
|
357
351
|
"../../node_modules/@math.gl/core/dist/esm/lib/validators.js"() {
|
|
358
352
|
init_common();
|
|
359
|
-
map2 = {};
|
|
360
353
|
}
|
|
361
354
|
});
|
|
362
355
|
|
|
@@ -368,14 +361,6 @@
|
|
|
368
361
|
init_validators();
|
|
369
362
|
init_assert();
|
|
370
363
|
Vector = class extends MathArray {
|
|
371
|
-
get ELEMENTS() {
|
|
372
|
-
assert(false);
|
|
373
|
-
return 0;
|
|
374
|
-
}
|
|
375
|
-
copy(vector) {
|
|
376
|
-
assert(false);
|
|
377
|
-
return this;
|
|
378
|
-
}
|
|
379
364
|
get x() {
|
|
380
365
|
return this[0];
|
|
381
366
|
}
|
|
@@ -580,6 +565,15 @@
|
|
|
580
565
|
out[2] = a[2];
|
|
581
566
|
return out;
|
|
582
567
|
}
|
|
568
|
+
function vec4_transformMat2(out, a, m) {
|
|
569
|
+
const x = a[0];
|
|
570
|
+
const y = a[1];
|
|
571
|
+
out[0] = m[0] * x + m[2] * y;
|
|
572
|
+
out[1] = m[1] * x + m[3] * y;
|
|
573
|
+
out[2] = a[2];
|
|
574
|
+
out[3] = a[3];
|
|
575
|
+
return out;
|
|
576
|
+
}
|
|
583
577
|
function vec4_transformMat3(out, a, m) {
|
|
584
578
|
const x = a[0];
|
|
585
579
|
const y = a[1];
|
|
@@ -754,7 +748,7 @@
|
|
|
754
748
|
});
|
|
755
749
|
|
|
756
750
|
// ../../node_modules/@math.gl/core/dist/esm/classes/vector3.js
|
|
757
|
-
var ORIGIN,
|
|
751
|
+
var ORIGIN, ZERO, Vector3;
|
|
758
752
|
var init_vector3 = __esm({
|
|
759
753
|
"../../node_modules/@math.gl/core/dist/esm/classes/vector3.js"() {
|
|
760
754
|
init_vector();
|
|
@@ -763,10 +757,13 @@
|
|
|
763
757
|
init_vec3();
|
|
764
758
|
init_gl_matrix_extras();
|
|
765
759
|
ORIGIN = [0, 0, 0];
|
|
766
|
-
constants = {};
|
|
767
760
|
Vector3 = class extends Vector {
|
|
768
761
|
static get ZERO() {
|
|
769
|
-
|
|
762
|
+
if (!ZERO) {
|
|
763
|
+
ZERO = new Vector3(0, 0, 0);
|
|
764
|
+
Object.freeze(ZERO);
|
|
765
|
+
}
|
|
766
|
+
return ZERO;
|
|
770
767
|
}
|
|
771
768
|
constructor(x = 0, y = 0, z = 0) {
|
|
772
769
|
super(-0, -0, -0);
|
|
@@ -876,6 +873,113 @@
|
|
|
876
873
|
}
|
|
877
874
|
});
|
|
878
875
|
|
|
876
|
+
// ../../node_modules/@math.gl/core/dist/esm/classes/vector4.js
|
|
877
|
+
var ZERO2, Vector4;
|
|
878
|
+
var init_vector4 = __esm({
|
|
879
|
+
"../../node_modules/@math.gl/core/dist/esm/classes/vector4.js"() {
|
|
880
|
+
init_vector();
|
|
881
|
+
init_common();
|
|
882
|
+
init_validators();
|
|
883
|
+
init_vec3();
|
|
884
|
+
init_gl_matrix_extras();
|
|
885
|
+
Vector4 = class extends Vector {
|
|
886
|
+
static get ZERO() {
|
|
887
|
+
if (!ZERO2) {
|
|
888
|
+
ZERO2 = new Vector4(0, 0, 0, 0);
|
|
889
|
+
Object.freeze(ZERO2);
|
|
890
|
+
}
|
|
891
|
+
return ZERO2;
|
|
892
|
+
}
|
|
893
|
+
constructor(x = 0, y = 0, z = 0, w = 0) {
|
|
894
|
+
super(-0, -0, -0, -0);
|
|
895
|
+
if (isArray(x) && arguments.length === 1) {
|
|
896
|
+
this.copy(x);
|
|
897
|
+
} else {
|
|
898
|
+
if (config.debug) {
|
|
899
|
+
checkNumber(x);
|
|
900
|
+
checkNumber(y);
|
|
901
|
+
checkNumber(z);
|
|
902
|
+
checkNumber(w);
|
|
903
|
+
}
|
|
904
|
+
this[0] = x;
|
|
905
|
+
this[1] = y;
|
|
906
|
+
this[2] = z;
|
|
907
|
+
this[3] = w;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
set(x, y, z, w) {
|
|
911
|
+
this[0] = x;
|
|
912
|
+
this[1] = y;
|
|
913
|
+
this[2] = z;
|
|
914
|
+
this[3] = w;
|
|
915
|
+
return this.check();
|
|
916
|
+
}
|
|
917
|
+
copy(array) {
|
|
918
|
+
this[0] = array[0];
|
|
919
|
+
this[1] = array[1];
|
|
920
|
+
this[2] = array[2];
|
|
921
|
+
this[3] = array[3];
|
|
922
|
+
return this.check();
|
|
923
|
+
}
|
|
924
|
+
fromObject(object) {
|
|
925
|
+
if (config.debug) {
|
|
926
|
+
checkNumber(object.x);
|
|
927
|
+
checkNumber(object.y);
|
|
928
|
+
checkNumber(object.z);
|
|
929
|
+
checkNumber(object.w);
|
|
930
|
+
}
|
|
931
|
+
this[0] = object.x;
|
|
932
|
+
this[1] = object.y;
|
|
933
|
+
this[2] = object.z;
|
|
934
|
+
this[3] = object.w;
|
|
935
|
+
return this;
|
|
936
|
+
}
|
|
937
|
+
toObject(object) {
|
|
938
|
+
object.x = this[0];
|
|
939
|
+
object.y = this[1];
|
|
940
|
+
object.z = this[2];
|
|
941
|
+
object.w = this[3];
|
|
942
|
+
return object;
|
|
943
|
+
}
|
|
944
|
+
get ELEMENTS() {
|
|
945
|
+
return 4;
|
|
946
|
+
}
|
|
947
|
+
get z() {
|
|
948
|
+
return this[2];
|
|
949
|
+
}
|
|
950
|
+
set z(value) {
|
|
951
|
+
this[2] = checkNumber(value);
|
|
952
|
+
}
|
|
953
|
+
get w() {
|
|
954
|
+
return this[3];
|
|
955
|
+
}
|
|
956
|
+
set w(value) {
|
|
957
|
+
this[3] = checkNumber(value);
|
|
958
|
+
}
|
|
959
|
+
transform(matrix4) {
|
|
960
|
+
transformMat42(this, this, matrix4);
|
|
961
|
+
return this.check();
|
|
962
|
+
}
|
|
963
|
+
transformByMatrix3(matrix3) {
|
|
964
|
+
vec4_transformMat3(this, this, matrix3);
|
|
965
|
+
return this.check();
|
|
966
|
+
}
|
|
967
|
+
transformByMatrix2(matrix2) {
|
|
968
|
+
vec4_transformMat2(this, this, matrix2);
|
|
969
|
+
return this.check();
|
|
970
|
+
}
|
|
971
|
+
transformByQuaternion(quaternion) {
|
|
972
|
+
transformQuat(this, this, quaternion);
|
|
973
|
+
return this.check();
|
|
974
|
+
}
|
|
975
|
+
applyMatrix4(m) {
|
|
976
|
+
m.transform(this, this);
|
|
977
|
+
return this;
|
|
978
|
+
}
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
|
|
879
983
|
// ../../node_modules/@math.gl/core/dist/esm/classes/base/matrix.js
|
|
880
984
|
var Matrix;
|
|
881
985
|
var init_matrix = __esm({
|
|
@@ -883,16 +987,7 @@
|
|
|
883
987
|
init_math_array();
|
|
884
988
|
init_validators();
|
|
885
989
|
init_common();
|
|
886
|
-
init_assert();
|
|
887
990
|
Matrix = class extends MathArray {
|
|
888
|
-
get ELEMENTS() {
|
|
889
|
-
assert(false);
|
|
890
|
-
return 0;
|
|
891
|
-
}
|
|
892
|
-
get RANK() {
|
|
893
|
-
assert(false);
|
|
894
|
-
return 0;
|
|
895
|
-
}
|
|
896
991
|
toString() {
|
|
897
992
|
let string = "[";
|
|
898
993
|
if (config.printRowMajor) {
|
|
@@ -1095,7 +1190,21 @@
|
|
|
1095
1190
|
});
|
|
1096
1191
|
|
|
1097
1192
|
// ../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js
|
|
1098
|
-
|
|
1193
|
+
function getZeroMatrix() {
|
|
1194
|
+
if (!ZERO_MATRIX3) {
|
|
1195
|
+
ZERO_MATRIX3 = new Matrix3([0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
1196
|
+
Object.freeze(ZERO_MATRIX3);
|
|
1197
|
+
}
|
|
1198
|
+
return ZERO_MATRIX3;
|
|
1199
|
+
}
|
|
1200
|
+
function getIdentityMatrix() {
|
|
1201
|
+
if (!IDENTITY_MATRIX3) {
|
|
1202
|
+
IDENTITY_MATRIX3 = new Matrix3();
|
|
1203
|
+
Object.freeze(IDENTITY_MATRIX3);
|
|
1204
|
+
}
|
|
1205
|
+
return IDENTITY_MATRIX3;
|
|
1206
|
+
}
|
|
1207
|
+
var INDICES, IDENTITY_MATRIX, Matrix3, ZERO_MATRIX3, IDENTITY_MATRIX3;
|
|
1099
1208
|
var init_matrix3 = __esm({
|
|
1100
1209
|
"../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js"() {
|
|
1101
1210
|
init_matrix();
|
|
@@ -1104,28 +1213,24 @@
|
|
|
1104
1213
|
init_mat3();
|
|
1105
1214
|
init_vec2();
|
|
1106
1215
|
init_vec3();
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
});
|
|
1120
|
-
constants2 = {};
|
|
1216
|
+
(function(INDICES3) {
|
|
1217
|
+
INDICES3[INDICES3["COL0ROW0"] = 0] = "COL0ROW0";
|
|
1218
|
+
INDICES3[INDICES3["COL0ROW1"] = 1] = "COL0ROW1";
|
|
1219
|
+
INDICES3[INDICES3["COL0ROW2"] = 2] = "COL0ROW2";
|
|
1220
|
+
INDICES3[INDICES3["COL1ROW0"] = 3] = "COL1ROW0";
|
|
1221
|
+
INDICES3[INDICES3["COL1ROW1"] = 4] = "COL1ROW1";
|
|
1222
|
+
INDICES3[INDICES3["COL1ROW2"] = 5] = "COL1ROW2";
|
|
1223
|
+
INDICES3[INDICES3["COL2ROW0"] = 6] = "COL2ROW0";
|
|
1224
|
+
INDICES3[INDICES3["COL2ROW1"] = 7] = "COL2ROW1";
|
|
1225
|
+
INDICES3[INDICES3["COL2ROW2"] = 8] = "COL2ROW2";
|
|
1226
|
+
})(INDICES || (INDICES = {}));
|
|
1227
|
+
IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 1, 0, 0, 0, 1]);
|
|
1121
1228
|
Matrix3 = class extends Matrix {
|
|
1122
1229
|
static get IDENTITY() {
|
|
1123
|
-
|
|
1124
|
-
return constants2.IDENTITY;
|
|
1230
|
+
return getIdentityMatrix();
|
|
1125
1231
|
}
|
|
1126
1232
|
static get ZERO() {
|
|
1127
|
-
|
|
1128
|
-
return constants2.ZERO;
|
|
1233
|
+
return getZeroMatrix();
|
|
1129
1234
|
}
|
|
1130
1235
|
get ELEMENTS() {
|
|
1131
1236
|
return 9;
|
|
@@ -1136,10 +1241,12 @@
|
|
|
1136
1241
|
get INDICES() {
|
|
1137
1242
|
return INDICES;
|
|
1138
1243
|
}
|
|
1139
|
-
constructor(array) {
|
|
1244
|
+
constructor(array, ...args) {
|
|
1140
1245
|
super(-0, -0, -0, -0, -0, -0, -0, -0, -0);
|
|
1141
1246
|
if (arguments.length === 1 && Array.isArray(array)) {
|
|
1142
1247
|
this.copy(array);
|
|
1248
|
+
} else if (args.length > 0) {
|
|
1249
|
+
this.copy([array, ...args]);
|
|
1143
1250
|
} else {
|
|
1144
1251
|
this.identity();
|
|
1145
1252
|
}
|
|
@@ -1156,6 +1263,16 @@
|
|
|
1156
1263
|
this[8] = array[8];
|
|
1157
1264
|
return this.check();
|
|
1158
1265
|
}
|
|
1266
|
+
identity() {
|
|
1267
|
+
return this.copy(IDENTITY_MATRIX);
|
|
1268
|
+
}
|
|
1269
|
+
fromObject(object) {
|
|
1270
|
+
return this.check();
|
|
1271
|
+
}
|
|
1272
|
+
fromQuaternion(q) {
|
|
1273
|
+
fromQuat(this, q);
|
|
1274
|
+
return this.check();
|
|
1275
|
+
}
|
|
1159
1276
|
set(m00, m10, m20, m01, m11, m21, m02, m12, m22) {
|
|
1160
1277
|
this[0] = m00;
|
|
1161
1278
|
this[1] = m10;
|
|
@@ -1183,13 +1300,6 @@
|
|
|
1183
1300
|
determinant() {
|
|
1184
1301
|
return determinant(this);
|
|
1185
1302
|
}
|
|
1186
|
-
identity() {
|
|
1187
|
-
return this.copy(IDENTITY);
|
|
1188
|
-
}
|
|
1189
|
-
fromQuaternion(q) {
|
|
1190
|
-
fromQuat(this, q);
|
|
1191
|
-
return this.check();
|
|
1192
|
-
}
|
|
1193
1303
|
transpose() {
|
|
1194
1304
|
transpose(this, this);
|
|
1195
1305
|
return this.check();
|
|
@@ -1214,7 +1324,7 @@
|
|
|
1214
1324
|
if (Array.isArray(factor)) {
|
|
1215
1325
|
scale(this, this, factor);
|
|
1216
1326
|
} else {
|
|
1217
|
-
scale(this, this, [factor, factor
|
|
1327
|
+
scale(this, this, [factor, factor]);
|
|
1218
1328
|
}
|
|
1219
1329
|
return this.check();
|
|
1220
1330
|
}
|
|
@@ -1223,32 +1333,30 @@
|
|
|
1223
1333
|
return this.check();
|
|
1224
1334
|
}
|
|
1225
1335
|
transform(vector, result) {
|
|
1336
|
+
let out;
|
|
1226
1337
|
switch (vector.length) {
|
|
1227
1338
|
case 2:
|
|
1228
|
-
|
|
1339
|
+
out = transformMat3(result || [-0, -0], vector, this);
|
|
1229
1340
|
break;
|
|
1230
1341
|
case 3:
|
|
1231
|
-
|
|
1342
|
+
out = transformMat32(result || [-0, -0, -0], vector, this);
|
|
1232
1343
|
break;
|
|
1233
1344
|
case 4:
|
|
1234
|
-
|
|
1345
|
+
out = vec4_transformMat3(result || [-0, -0, -0, -0], vector, this);
|
|
1235
1346
|
break;
|
|
1236
1347
|
default:
|
|
1237
1348
|
throw new Error("Illegal vector");
|
|
1238
1349
|
}
|
|
1239
|
-
checkVector(
|
|
1240
|
-
return
|
|
1350
|
+
checkVector(out, vector.length);
|
|
1351
|
+
return out;
|
|
1241
1352
|
}
|
|
1242
1353
|
transformVector(vector, result) {
|
|
1243
|
-
deprecated("Matrix3.transformVector");
|
|
1244
1354
|
return this.transform(vector, result);
|
|
1245
1355
|
}
|
|
1246
1356
|
transformVector2(vector, result) {
|
|
1247
|
-
deprecated("Matrix3.transformVector");
|
|
1248
1357
|
return this.transform(vector, result);
|
|
1249
1358
|
}
|
|
1250
1359
|
transformVector3(vector, result) {
|
|
1251
|
-
deprecated("Matrix3.transformVector");
|
|
1252
1360
|
return this.transform(vector, result);
|
|
1253
1361
|
}
|
|
1254
1362
|
};
|
|
@@ -1692,7 +1800,7 @@
|
|
|
1692
1800
|
out[15] = 0;
|
|
1693
1801
|
return out;
|
|
1694
1802
|
}
|
|
1695
|
-
function
|
|
1803
|
+
function perspectiveNO(out, fovy, aspect, near, far) {
|
|
1696
1804
|
var f = 1 / Math.tan(fovy / 2), nf;
|
|
1697
1805
|
out[0] = f / aspect;
|
|
1698
1806
|
out[1] = 0;
|
|
@@ -1718,7 +1826,7 @@
|
|
|
1718
1826
|
}
|
|
1719
1827
|
return out;
|
|
1720
1828
|
}
|
|
1721
|
-
function
|
|
1829
|
+
function orthoNO(out, left, right, bottom, top, near, far) {
|
|
1722
1830
|
var lr = 1 / (left - right);
|
|
1723
1831
|
var bt = 1 / (bottom - top);
|
|
1724
1832
|
var nf = 1 / (near - far);
|
|
@@ -1807,9 +1915,12 @@
|
|
|
1807
1915
|
out[15] = 1;
|
|
1808
1916
|
return out;
|
|
1809
1917
|
}
|
|
1918
|
+
var perspective, ortho;
|
|
1810
1919
|
var init_mat4 = __esm({
|
|
1811
1920
|
"../../node_modules/gl-matrix/esm/mat4.js"() {
|
|
1812
1921
|
init_common2();
|
|
1922
|
+
perspective = perspectiveNO;
|
|
1923
|
+
ortho = orthoNO;
|
|
1813
1924
|
}
|
|
1814
1925
|
});
|
|
1815
1926
|
|
|
@@ -1939,48 +2050,90 @@
|
|
|
1939
2050
|
});
|
|
1940
2051
|
|
|
1941
2052
|
// ../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js
|
|
1942
|
-
|
|
2053
|
+
function getZeroMatrix2() {
|
|
2054
|
+
if (!ZERO3) {
|
|
2055
|
+
ZERO3 = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
2056
|
+
Object.freeze(ZERO3);
|
|
2057
|
+
}
|
|
2058
|
+
return ZERO3;
|
|
2059
|
+
}
|
|
2060
|
+
function getIdentityMatrix2() {
|
|
2061
|
+
if (!IDENTITY) {
|
|
2062
|
+
IDENTITY = new Matrix4();
|
|
2063
|
+
Object.freeze(IDENTITY);
|
|
2064
|
+
}
|
|
2065
|
+
return IDENTITY;
|
|
2066
|
+
}
|
|
2067
|
+
function checkRadians(possiblyDegrees) {
|
|
2068
|
+
if (possiblyDegrees > Math.PI * 2) {
|
|
2069
|
+
throw Error("expected radians");
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
function computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, near) {
|
|
2073
|
+
const column0Row0 = 2 * near / (right - left);
|
|
2074
|
+
const column1Row1 = 2 * near / (top - bottom);
|
|
2075
|
+
const column2Row0 = (right + left) / (right - left);
|
|
2076
|
+
const column2Row1 = (top + bottom) / (top - bottom);
|
|
2077
|
+
const column2Row2 = -1;
|
|
2078
|
+
const column2Row3 = -1;
|
|
2079
|
+
const column3Row2 = -2 * near;
|
|
2080
|
+
result[0] = column0Row0;
|
|
2081
|
+
result[1] = 0;
|
|
2082
|
+
result[2] = 0;
|
|
2083
|
+
result[3] = 0;
|
|
2084
|
+
result[4] = 0;
|
|
2085
|
+
result[5] = column1Row1;
|
|
2086
|
+
result[6] = 0;
|
|
2087
|
+
result[7] = 0;
|
|
2088
|
+
result[8] = column2Row0;
|
|
2089
|
+
result[9] = column2Row1;
|
|
2090
|
+
result[10] = column2Row2;
|
|
2091
|
+
result[11] = column2Row3;
|
|
2092
|
+
result[12] = 0;
|
|
2093
|
+
result[13] = 0;
|
|
2094
|
+
result[14] = column3Row2;
|
|
2095
|
+
result[15] = 0;
|
|
2096
|
+
return result;
|
|
2097
|
+
}
|
|
2098
|
+
var INDICES2, DEFAULT_FOVY, DEFAULT_ASPECT, DEFAULT_NEAR, DEFAULT_FAR, IDENTITY_MATRIX2, Matrix4, ZERO3, IDENTITY;
|
|
1943
2099
|
var init_matrix4 = __esm({
|
|
1944
2100
|
"../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js"() {
|
|
1945
|
-
init_validators();
|
|
1946
2101
|
init_matrix();
|
|
2102
|
+
init_validators();
|
|
1947
2103
|
init_gl_matrix_extras();
|
|
1948
2104
|
init_mat4();
|
|
1949
2105
|
init_vec2();
|
|
1950
2106
|
init_vec3();
|
|
1951
2107
|
init_vec4();
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
2108
|
+
(function(INDICES3) {
|
|
2109
|
+
INDICES3[INDICES3["COL0ROW0"] = 0] = "COL0ROW0";
|
|
2110
|
+
INDICES3[INDICES3["COL0ROW1"] = 1] = "COL0ROW1";
|
|
2111
|
+
INDICES3[INDICES3["COL0ROW2"] = 2] = "COL0ROW2";
|
|
2112
|
+
INDICES3[INDICES3["COL0ROW3"] = 3] = "COL0ROW3";
|
|
2113
|
+
INDICES3[INDICES3["COL1ROW0"] = 4] = "COL1ROW0";
|
|
2114
|
+
INDICES3[INDICES3["COL1ROW1"] = 5] = "COL1ROW1";
|
|
2115
|
+
INDICES3[INDICES3["COL1ROW2"] = 6] = "COL1ROW2";
|
|
2116
|
+
INDICES3[INDICES3["COL1ROW3"] = 7] = "COL1ROW3";
|
|
2117
|
+
INDICES3[INDICES3["COL2ROW0"] = 8] = "COL2ROW0";
|
|
2118
|
+
INDICES3[INDICES3["COL2ROW1"] = 9] = "COL2ROW1";
|
|
2119
|
+
INDICES3[INDICES3["COL2ROW2"] = 10] = "COL2ROW2";
|
|
2120
|
+
INDICES3[INDICES3["COL2ROW3"] = 11] = "COL2ROW3";
|
|
2121
|
+
INDICES3[INDICES3["COL3ROW0"] = 12] = "COL3ROW0";
|
|
2122
|
+
INDICES3[INDICES3["COL3ROW1"] = 13] = "COL3ROW1";
|
|
2123
|
+
INDICES3[INDICES3["COL3ROW2"] = 14] = "COL3ROW2";
|
|
2124
|
+
INDICES3[INDICES3["COL3ROW3"] = 15] = "COL3ROW3";
|
|
2125
|
+
})(INDICES2 || (INDICES2 = {}));
|
|
2126
|
+
DEFAULT_FOVY = 45 * Math.PI / 180;
|
|
2127
|
+
DEFAULT_ASPECT = 1;
|
|
2128
|
+
DEFAULT_NEAR = 0.1;
|
|
2129
|
+
DEFAULT_FAR = 500;
|
|
2130
|
+
IDENTITY_MATRIX2 = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
|
|
1973
2131
|
Matrix4 = class extends Matrix {
|
|
1974
2132
|
static get IDENTITY() {
|
|
1975
|
-
|
|
1976
|
-
return constants3.IDENTITY;
|
|
2133
|
+
return getIdentityMatrix2();
|
|
1977
2134
|
}
|
|
1978
2135
|
static get ZERO() {
|
|
1979
|
-
|
|
1980
|
-
return constants3.ZERO;
|
|
1981
|
-
}
|
|
1982
|
-
get INDICES() {
|
|
1983
|
-
return INDICES2;
|
|
2136
|
+
return getZeroMatrix2();
|
|
1984
2137
|
}
|
|
1985
2138
|
get ELEMENTS() {
|
|
1986
2139
|
return 16;
|
|
@@ -1988,6 +2141,9 @@
|
|
|
1988
2141
|
get RANK() {
|
|
1989
2142
|
return 4;
|
|
1990
2143
|
}
|
|
2144
|
+
get INDICES() {
|
|
2145
|
+
return INDICES2;
|
|
2146
|
+
}
|
|
1991
2147
|
constructor(array) {
|
|
1992
2148
|
super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);
|
|
1993
2149
|
if (arguments.length === 1 && Array.isArray(array)) {
|
|
@@ -2073,91 +2229,65 @@
|
|
|
2073
2229
|
return result;
|
|
2074
2230
|
}
|
|
2075
2231
|
identity() {
|
|
2076
|
-
return this.copy(
|
|
2232
|
+
return this.copy(IDENTITY_MATRIX2);
|
|
2077
2233
|
}
|
|
2078
|
-
|
|
2079
|
-
fromQuat2(this, q);
|
|
2234
|
+
fromObject(object) {
|
|
2080
2235
|
return this.check();
|
|
2081
2236
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2237
|
+
fromQuaternion(quaternion) {
|
|
2238
|
+
fromQuat2(this, quaternion);
|
|
2239
|
+
return this.check();
|
|
2240
|
+
}
|
|
2241
|
+
frustum(view) {
|
|
2242
|
+
const {
|
|
2243
|
+
left,
|
|
2244
|
+
right,
|
|
2245
|
+
bottom,
|
|
2246
|
+
top,
|
|
2247
|
+
near = DEFAULT_NEAR,
|
|
2248
|
+
far = DEFAULT_FAR
|
|
2249
|
+
} = view;
|
|
2090
2250
|
if (far === Infinity) {
|
|
2091
|
-
|
|
2251
|
+
computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);
|
|
2092
2252
|
} else {
|
|
2093
2253
|
frustum(this, left, right, bottom, top, near, far);
|
|
2094
2254
|
}
|
|
2095
2255
|
return this.check();
|
|
2096
2256
|
}
|
|
2097
|
-
|
|
2098
|
-
const
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
const column2Row3 = -1;
|
|
2104
|
-
const column3Row2 = -2 * near;
|
|
2105
|
-
result[0] = column0Row0;
|
|
2106
|
-
result[1] = 0;
|
|
2107
|
-
result[2] = 0;
|
|
2108
|
-
result[3] = 0;
|
|
2109
|
-
result[4] = 0;
|
|
2110
|
-
result[5] = column1Row1;
|
|
2111
|
-
result[6] = 0;
|
|
2112
|
-
result[7] = 0;
|
|
2113
|
-
result[8] = column2Row0;
|
|
2114
|
-
result[9] = column2Row1;
|
|
2115
|
-
result[10] = column2Row2;
|
|
2116
|
-
result[11] = column2Row3;
|
|
2117
|
-
result[12] = 0;
|
|
2118
|
-
result[13] = 0;
|
|
2119
|
-
result[14] = column3Row2;
|
|
2120
|
-
result[15] = 0;
|
|
2121
|
-
return result;
|
|
2122
|
-
}
|
|
2123
|
-
lookAt(eye, center, up) {
|
|
2124
|
-
if (arguments.length === 1) {
|
|
2125
|
-
({
|
|
2126
|
-
eye,
|
|
2127
|
-
center,
|
|
2128
|
-
up
|
|
2129
|
-
} = eye);
|
|
2130
|
-
}
|
|
2131
|
-
center = center || [0, 0, 0];
|
|
2132
|
-
up = up || [0, 1, 0];
|
|
2257
|
+
lookAt(view) {
|
|
2258
|
+
const {
|
|
2259
|
+
eye,
|
|
2260
|
+
center = [0, 0, 0],
|
|
2261
|
+
up = [0, 1, 0]
|
|
2262
|
+
} = view;
|
|
2133
2263
|
lookAt(this, eye, center, up);
|
|
2134
2264
|
return this.check();
|
|
2135
2265
|
}
|
|
2136
|
-
ortho({
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2266
|
+
ortho(view) {
|
|
2267
|
+
const {
|
|
2268
|
+
left,
|
|
2269
|
+
right,
|
|
2270
|
+
bottom,
|
|
2271
|
+
top,
|
|
2272
|
+
near = DEFAULT_NEAR,
|
|
2273
|
+
far = DEFAULT_FAR
|
|
2274
|
+
} = view;
|
|
2144
2275
|
ortho(this, left, right, bottom, top, near, far);
|
|
2145
2276
|
return this.check();
|
|
2146
2277
|
}
|
|
2147
|
-
orthographic({
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
}
|
|
2278
|
+
orthographic(view) {
|
|
2279
|
+
const {
|
|
2280
|
+
fovy = DEFAULT_FOVY,
|
|
2281
|
+
aspect = DEFAULT_ASPECT,
|
|
2282
|
+
focalDistance = 1,
|
|
2283
|
+
near = DEFAULT_NEAR,
|
|
2284
|
+
far = DEFAULT_FAR
|
|
2285
|
+
} = view;
|
|
2286
|
+
checkRadians(fovy);
|
|
2157
2287
|
const halfY = fovy / 2;
|
|
2158
2288
|
const top = focalDistance * Math.tan(halfY);
|
|
2159
2289
|
const right = top * aspect;
|
|
2160
|
-
return
|
|
2290
|
+
return this.ortho({
|
|
2161
2291
|
left: -right,
|
|
2162
2292
|
right,
|
|
2163
2293
|
bottom: -top,
|
|
@@ -2166,17 +2296,14 @@
|
|
|
2166
2296
|
far
|
|
2167
2297
|
});
|
|
2168
2298
|
}
|
|
2169
|
-
perspective({
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
fovy
|
|
2177
|
-
if (fovy > Math.PI * 2) {
|
|
2178
|
-
throw Error("radians");
|
|
2179
|
-
}
|
|
2299
|
+
perspective(view) {
|
|
2300
|
+
const {
|
|
2301
|
+
fovy = 45 * Math.PI / 180,
|
|
2302
|
+
aspect = 1,
|
|
2303
|
+
near = 0.1,
|
|
2304
|
+
far = 500
|
|
2305
|
+
} = view;
|
|
2306
|
+
checkRadians(fovy);
|
|
2180
2307
|
perspective(this, fovy, aspect, near, far);
|
|
2181
2308
|
return this.check();
|
|
2182
2309
|
}
|
|
@@ -2195,8 +2322,10 @@
|
|
|
2195
2322
|
result[2] = this[14];
|
|
2196
2323
|
return result;
|
|
2197
2324
|
}
|
|
2198
|
-
getRotation(result
|
|
2199
|
-
|
|
2325
|
+
getRotation(result, scaleResult) {
|
|
2326
|
+
result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];
|
|
2327
|
+
scaleResult = scaleResult || [-0, -0, -0];
|
|
2328
|
+
const scale5 = this.getScale(scaleResult);
|
|
2200
2329
|
const inverseScale0 = 1 / scale5[0];
|
|
2201
2330
|
const inverseScale1 = 1 / scale5[1];
|
|
2202
2331
|
const inverseScale2 = 1 / scale5[2];
|
|
@@ -2218,8 +2347,10 @@
|
|
|
2218
2347
|
result[15] = 1;
|
|
2219
2348
|
return result;
|
|
2220
2349
|
}
|
|
2221
|
-
getRotationMatrix3(result
|
|
2222
|
-
|
|
2350
|
+
getRotationMatrix3(result, scaleResult) {
|
|
2351
|
+
result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0];
|
|
2352
|
+
scaleResult = scaleResult || [-0, -0, -0];
|
|
2353
|
+
const scale5 = this.getScale(scaleResult);
|
|
2223
2354
|
const inverseScale0 = 1 / scale5[0];
|
|
2224
2355
|
const inverseScale1 = 1 / scale5[1];
|
|
2225
2356
|
const inverseScale2 = 1 / scale5[2];
|
|
@@ -2262,23 +2393,19 @@
|
|
|
2262
2393
|
rotateZ2(this, this, radians2);
|
|
2263
2394
|
return this.check();
|
|
2264
2395
|
}
|
|
2265
|
-
rotateXYZ(
|
|
2266
|
-
return this.rotateX(
|
|
2396
|
+
rotateXYZ(angleXYZ) {
|
|
2397
|
+
return this.rotateX(angleXYZ[0]).rotateY(angleXYZ[1]).rotateZ(angleXYZ[2]);
|
|
2267
2398
|
}
|
|
2268
2399
|
rotateAxis(radians2, axis) {
|
|
2269
2400
|
rotate2(this, this, radians2, axis);
|
|
2270
2401
|
return this.check();
|
|
2271
2402
|
}
|
|
2272
2403
|
scale(factor) {
|
|
2273
|
-
|
|
2274
|
-
scale2(this, this, factor);
|
|
2275
|
-
} else {
|
|
2276
|
-
scale2(this, this, [factor, factor, factor]);
|
|
2277
|
-
}
|
|
2404
|
+
scale2(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);
|
|
2278
2405
|
return this.check();
|
|
2279
2406
|
}
|
|
2280
|
-
translate(
|
|
2281
|
-
translate2(this, this,
|
|
2407
|
+
translate(vector) {
|
|
2408
|
+
translate2(this, this, vector);
|
|
2282
2409
|
return this.check();
|
|
2283
2410
|
}
|
|
2284
2411
|
transform(vector, result) {
|
|
@@ -2293,51 +2420,50 @@
|
|
|
2293
2420
|
const {
|
|
2294
2421
|
length: length4
|
|
2295
2422
|
} = vector;
|
|
2423
|
+
let out;
|
|
2296
2424
|
switch (length4) {
|
|
2297
2425
|
case 2:
|
|
2298
|
-
|
|
2426
|
+
out = transformMat4(result || [-0, -0], vector, this);
|
|
2299
2427
|
break;
|
|
2300
2428
|
case 3:
|
|
2301
|
-
|
|
2429
|
+
out = transformMat42(result || [-0, -0, -0], vector, this);
|
|
2302
2430
|
break;
|
|
2303
2431
|
default:
|
|
2304
2432
|
throw new Error("Illegal vector");
|
|
2305
2433
|
}
|
|
2306
|
-
checkVector(
|
|
2307
|
-
return
|
|
2434
|
+
checkVector(out, vector.length);
|
|
2435
|
+
return out;
|
|
2308
2436
|
}
|
|
2309
2437
|
transformAsVector(vector, result) {
|
|
2438
|
+
let out;
|
|
2310
2439
|
switch (vector.length) {
|
|
2311
2440
|
case 2:
|
|
2312
|
-
|
|
2441
|
+
out = vec2_transformMat4AsVector(result || [-0, -0], vector, this);
|
|
2313
2442
|
break;
|
|
2314
2443
|
case 3:
|
|
2315
|
-
|
|
2444
|
+
out = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);
|
|
2316
2445
|
break;
|
|
2317
2446
|
default:
|
|
2318
2447
|
throw new Error("Illegal vector");
|
|
2319
2448
|
}
|
|
2320
|
-
checkVector(
|
|
2321
|
-
return
|
|
2322
|
-
}
|
|
2323
|
-
makeRotationX(radians2) {
|
|
2324
|
-
return this.identity().rotateX(radians2);
|
|
2325
|
-
}
|
|
2326
|
-
makeTranslation(x, y, z) {
|
|
2327
|
-
return this.identity().translate([x, y, z]);
|
|
2449
|
+
checkVector(out, vector.length);
|
|
2450
|
+
return out;
|
|
2328
2451
|
}
|
|
2329
2452
|
transformPoint(vector, result) {
|
|
2330
|
-
deprecated("Matrix4.transformPoint", "3.0");
|
|
2331
2453
|
return this.transformAsPoint(vector, result);
|
|
2332
2454
|
}
|
|
2333
2455
|
transformVector(vector, result) {
|
|
2334
|
-
deprecated("Matrix4.transformVector", "3.0");
|
|
2335
2456
|
return this.transformAsPoint(vector, result);
|
|
2336
2457
|
}
|
|
2337
2458
|
transformDirection(vector, result) {
|
|
2338
|
-
deprecated("Matrix4.transformDirection", "3.0");
|
|
2339
2459
|
return this.transformAsVector(vector, result);
|
|
2340
2460
|
}
|
|
2461
|
+
makeRotationX(radians2) {
|
|
2462
|
+
return this.identity().rotateX(radians2);
|
|
2463
|
+
}
|
|
2464
|
+
makeTranslation(x, y, z) {
|
|
2465
|
+
return this.identity().translate([x, y, z]);
|
|
2466
|
+
}
|
|
2341
2467
|
};
|
|
2342
2468
|
}
|
|
2343
2469
|
});
|
|
@@ -2564,7 +2690,7 @@
|
|
|
2564
2690
|
"../../node_modules/@math.gl/core/dist/esm/classes/quaternion.js"() {
|
|
2565
2691
|
init_math_array();
|
|
2566
2692
|
init_validators();
|
|
2567
|
-
|
|
2693
|
+
init_vector4();
|
|
2568
2694
|
init_quat();
|
|
2569
2695
|
init_vec4();
|
|
2570
2696
|
IDENTITY_QUATERNION = [0, 0, 0, 1];
|
|
@@ -2591,18 +2717,25 @@
|
|
|
2591
2717
|
this[3] = w;
|
|
2592
2718
|
return this.check();
|
|
2593
2719
|
}
|
|
2594
|
-
|
|
2595
|
-
|
|
2720
|
+
fromObject(object) {
|
|
2721
|
+
this[0] = object.x;
|
|
2722
|
+
this[1] = object.y;
|
|
2723
|
+
this[2] = object.z;
|
|
2724
|
+
this[3] = object.w;
|
|
2596
2725
|
return this.check();
|
|
2597
2726
|
}
|
|
2598
|
-
|
|
2599
|
-
|
|
2727
|
+
fromMatrix3(m) {
|
|
2728
|
+
fromMat3(this, m);
|
|
2600
2729
|
return this.check();
|
|
2601
2730
|
}
|
|
2602
2731
|
fromAxisRotation(axis, rad) {
|
|
2603
2732
|
setAxisAngle(this, axis, rad);
|
|
2604
2733
|
return this.check();
|
|
2605
2734
|
}
|
|
2735
|
+
identity() {
|
|
2736
|
+
identity2(this);
|
|
2737
|
+
return this.check();
|
|
2738
|
+
}
|
|
2606
2739
|
setAxisAngle(axis, rad) {
|
|
2607
2740
|
return this.fromAxisRotation(axis, rad);
|
|
2608
2741
|
}
|
|
@@ -2639,20 +2772,14 @@
|
|
|
2639
2772
|
lengthSquared() {
|
|
2640
2773
|
return squaredLength2(this);
|
|
2641
2774
|
}
|
|
2642
|
-
dot(a
|
|
2643
|
-
if (b !== void 0) {
|
|
2644
|
-
throw new Error("Quaternion.dot only takes one argument");
|
|
2645
|
-
}
|
|
2775
|
+
dot(a) {
|
|
2646
2776
|
return dot3(this, a);
|
|
2647
2777
|
}
|
|
2648
2778
|
rotationTo(vectorA, vectorB) {
|
|
2649
2779
|
rotationTo(this, vectorA, vectorB);
|
|
2650
2780
|
return this.check();
|
|
2651
2781
|
}
|
|
2652
|
-
add(a
|
|
2653
|
-
if (b !== void 0) {
|
|
2654
|
-
throw new Error("Quaternion.add only takes one argument");
|
|
2655
|
-
}
|
|
2782
|
+
add(a) {
|
|
2656
2783
|
add2(this, this, a);
|
|
2657
2784
|
return this.check();
|
|
2658
2785
|
}
|
|
@@ -2669,16 +2796,17 @@
|
|
|
2669
2796
|
return this.check();
|
|
2670
2797
|
}
|
|
2671
2798
|
lerp(a, b, t) {
|
|
2799
|
+
if (t === void 0) {
|
|
2800
|
+
return this.lerp(this, a, b);
|
|
2801
|
+
}
|
|
2672
2802
|
lerp2(this, a, b, t);
|
|
2673
2803
|
return this.check();
|
|
2674
2804
|
}
|
|
2675
|
-
multiplyRight(a
|
|
2676
|
-
assert(!b);
|
|
2805
|
+
multiplyRight(a) {
|
|
2677
2806
|
multiply3(this, this, a);
|
|
2678
2807
|
return this.check();
|
|
2679
2808
|
}
|
|
2680
|
-
multiplyLeft(a
|
|
2681
|
-
assert(!b);
|
|
2809
|
+
multiplyLeft(a) {
|
|
2682
2810
|
multiply3(this, a, this);
|
|
2683
2811
|
return this.check();
|
|
2684
2812
|
}
|
|
@@ -2710,25 +2838,32 @@
|
|
|
2710
2838
|
scale4(this, this, b);
|
|
2711
2839
|
return this.check();
|
|
2712
2840
|
}
|
|
2713
|
-
slerp(
|
|
2841
|
+
slerp(arg0, arg1, arg2) {
|
|
2842
|
+
let start;
|
|
2843
|
+
let target;
|
|
2844
|
+
let ratio;
|
|
2714
2845
|
switch (arguments.length) {
|
|
2715
2846
|
case 1:
|
|
2716
2847
|
({
|
|
2717
2848
|
start = IDENTITY_QUATERNION,
|
|
2718
2849
|
target,
|
|
2719
2850
|
ratio
|
|
2720
|
-
} =
|
|
2851
|
+
} = arg0);
|
|
2721
2852
|
break;
|
|
2722
2853
|
case 2:
|
|
2723
|
-
[target, ratio] = arguments;
|
|
2724
2854
|
start = this;
|
|
2855
|
+
target = arg0;
|
|
2856
|
+
ratio = arg1;
|
|
2725
2857
|
break;
|
|
2726
2858
|
default:
|
|
2859
|
+
start = arg0;
|
|
2860
|
+
target = arg1;
|
|
2861
|
+
ratio = arg2;
|
|
2727
2862
|
}
|
|
2728
2863
|
slerp(this, start, target, ratio);
|
|
2729
2864
|
return this.check();
|
|
2730
2865
|
}
|
|
2731
|
-
transformVector4(vector, result =
|
|
2866
|
+
transformVector4(vector, result = new Vector4()) {
|
|
2732
2867
|
transformQuat2(result, vector, this);
|
|
2733
2868
|
return checkVector(result, 4);
|
|
2734
2869
|
}
|
|
@@ -2738,16 +2873,35 @@
|
|
|
2738
2873
|
setFromAxisAngle(axis, rad) {
|
|
2739
2874
|
return this.setAxisAngle(axis, rad);
|
|
2740
2875
|
}
|
|
2741
|
-
premultiply(a
|
|
2742
|
-
return this.multiplyLeft(a
|
|
2876
|
+
premultiply(a) {
|
|
2877
|
+
return this.multiplyLeft(a);
|
|
2743
2878
|
}
|
|
2744
|
-
multiply(a
|
|
2745
|
-
return this.multiplyRight(a
|
|
2879
|
+
multiply(a) {
|
|
2880
|
+
return this.multiplyRight(a);
|
|
2746
2881
|
}
|
|
2747
2882
|
};
|
|
2748
2883
|
}
|
|
2749
2884
|
});
|
|
2750
2885
|
|
|
2886
|
+
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
2887
|
+
function _defineProperty(obj, key, value) {
|
|
2888
|
+
if (key in obj) {
|
|
2889
|
+
Object.defineProperty(obj, key, {
|
|
2890
|
+
value,
|
|
2891
|
+
enumerable: true,
|
|
2892
|
+
configurable: true,
|
|
2893
|
+
writable: true
|
|
2894
|
+
});
|
|
2895
|
+
} else {
|
|
2896
|
+
obj[key] = value;
|
|
2897
|
+
}
|
|
2898
|
+
return obj;
|
|
2899
|
+
}
|
|
2900
|
+
var init_defineProperty = __esm({
|
|
2901
|
+
"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
|
|
2902
|
+
}
|
|
2903
|
+
});
|
|
2904
|
+
|
|
2751
2905
|
// ../../node_modules/@math.gl/core/dist/esm/lib/math-utils.js
|
|
2752
2906
|
var math_utils_default;
|
|
2753
2907
|
var init_math_utils = __esm({
|
|
@@ -2782,26 +2936,15 @@
|
|
|
2782
2936
|
});
|
|
2783
2937
|
|
|
2784
2938
|
// ../../node_modules/@math.gl/core/dist/esm/index.js
|
|
2785
|
-
var globals, global_;
|
|
2786
2939
|
var init_esm = __esm({
|
|
2787
2940
|
"../../node_modules/@math.gl/core/dist/esm/index.js"() {
|
|
2788
|
-
init_common();
|
|
2789
2941
|
init_vector3();
|
|
2790
2942
|
init_matrix3();
|
|
2791
2943
|
init_matrix4();
|
|
2792
2944
|
init_quaternion();
|
|
2793
|
-
init_common();
|
|
2794
2945
|
init_math_utils();
|
|
2795
2946
|
init_assert();
|
|
2796
|
-
|
|
2797
|
-
self: typeof self !== "undefined" && self,
|
|
2798
|
-
window: typeof window !== "undefined" && window,
|
|
2799
|
-
global: typeof global !== "undefined" && global
|
|
2800
|
-
};
|
|
2801
|
-
global_ = globals.global || globals.self || globals.window;
|
|
2802
|
-
global_.mathgl = {
|
|
2803
|
-
config
|
|
2804
|
-
};
|
|
2947
|
+
init_common();
|
|
2805
2948
|
}
|
|
2806
2949
|
});
|
|
2807
2950
|
|
|
@@ -2824,65 +2967,67 @@
|
|
|
2824
2967
|
});
|
|
2825
2968
|
|
|
2826
2969
|
// ../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js
|
|
2827
|
-
function
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
result[
|
|
2834
|
-
result[1] = map3(cartographic.latitude);
|
|
2970
|
+
function identity3(x) {
|
|
2971
|
+
return x;
|
|
2972
|
+
}
|
|
2973
|
+
function fromCartographic(cartographic, result = [], map2 = identity3) {
|
|
2974
|
+
if ("longitude" in cartographic) {
|
|
2975
|
+
result[0] = map2(cartographic.longitude);
|
|
2976
|
+
result[1] = map2(cartographic.latitude);
|
|
2835
2977
|
result[2] = cartographic.height;
|
|
2836
|
-
} else {
|
|
2837
|
-
result[0] =
|
|
2838
|
-
result[1] =
|
|
2978
|
+
} else if ("x" in cartographic) {
|
|
2979
|
+
result[0] = map2(cartographic.x);
|
|
2980
|
+
result[1] = map2(cartographic.y);
|
|
2839
2981
|
result[2] = cartographic.z;
|
|
2982
|
+
} else {
|
|
2983
|
+
result[0] = map2(cartographic[0]);
|
|
2984
|
+
result[1] = map2(cartographic[1]);
|
|
2985
|
+
result[2] = cartographic[2];
|
|
2840
2986
|
}
|
|
2841
2987
|
return result;
|
|
2842
2988
|
}
|
|
2843
|
-
function fromCartographicToRadians(cartographic, vector =
|
|
2844
|
-
return fromCartographic(cartographic, vector, config._cartographicRadians ?
|
|
2989
|
+
function fromCartographicToRadians(cartographic, vector = []) {
|
|
2990
|
+
return fromCartographic(cartographic, vector, config._cartographicRadians ? identity3 : toRadians);
|
|
2845
2991
|
}
|
|
2846
|
-
function toCartographic(vector, cartographic,
|
|
2847
|
-
if (
|
|
2848
|
-
cartographic
|
|
2849
|
-
cartographic
|
|
2850
|
-
cartographic[2] = vector[2];
|
|
2851
|
-
} else if ("longitude" in cartographic) {
|
|
2852
|
-
cartographic.longitude = map3(vector[0]);
|
|
2853
|
-
cartographic.latitude = map3(vector[1]);
|
|
2992
|
+
function toCartographic(vector, cartographic, map2 = identity3) {
|
|
2993
|
+
if ("longitude" in cartographic) {
|
|
2994
|
+
cartographic.longitude = map2(vector[0]);
|
|
2995
|
+
cartographic.latitude = map2(vector[1]);
|
|
2854
2996
|
cartographic.height = vector[2];
|
|
2855
|
-
} else {
|
|
2856
|
-
cartographic.x =
|
|
2857
|
-
cartographic.y =
|
|
2997
|
+
} else if ("x" in cartographic) {
|
|
2998
|
+
cartographic.x = map2(vector[0]);
|
|
2999
|
+
cartographic.y = map2(vector[1]);
|
|
2858
3000
|
cartographic.z = vector[2];
|
|
3001
|
+
} else {
|
|
3002
|
+
cartographic[0] = map2(vector[0]);
|
|
3003
|
+
cartographic[1] = map2(vector[1]);
|
|
3004
|
+
cartographic[2] = vector[2];
|
|
2859
3005
|
}
|
|
2860
3006
|
return cartographic;
|
|
2861
3007
|
}
|
|
2862
3008
|
function toCartographicFromRadians(vector, cartographic) {
|
|
2863
|
-
return toCartographic(vector, cartographic, config._cartographicRadians ?
|
|
3009
|
+
return toCartographic(vector, cartographic, config._cartographicRadians ? identity3 : toDegrees);
|
|
2864
3010
|
}
|
|
2865
|
-
var
|
|
3011
|
+
var scratchVector;
|
|
2866
3012
|
var init_type_utils = __esm({
|
|
2867
3013
|
"../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js"() {
|
|
2868
3014
|
init_esm();
|
|
2869
3015
|
init_constants();
|
|
2870
|
-
noop = (x) => x;
|
|
2871
3016
|
scratchVector = new Vector3();
|
|
2872
3017
|
}
|
|
2873
3018
|
});
|
|
2874
3019
|
|
|
2875
3020
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js
|
|
2876
|
-
function scaleToGeodeticSurface(cartesian, ellipsoid, result =
|
|
3021
|
+
function scaleToGeodeticSurface(cartesian, ellipsoid, result = []) {
|
|
2877
3022
|
const {
|
|
2878
3023
|
oneOverRadii,
|
|
2879
3024
|
oneOverRadiiSquared,
|
|
2880
3025
|
centerToleranceSquared
|
|
2881
3026
|
} = ellipsoid;
|
|
2882
3027
|
scratchVector2.from(cartesian);
|
|
2883
|
-
const positionX =
|
|
2884
|
-
const positionY =
|
|
2885
|
-
const positionZ =
|
|
3028
|
+
const positionX = scratchVector2.x;
|
|
3029
|
+
const positionY = scratchVector2.y;
|
|
3030
|
+
const positionZ = scratchVector2.z;
|
|
2886
3031
|
const oneOverRadiiX = oneOverRadii.x;
|
|
2887
3032
|
const oneOverRadiiY = oneOverRadii.y;
|
|
2888
3033
|
const oneOverRadiiZ = oneOverRadii.z;
|
|
@@ -2904,7 +3049,7 @@
|
|
|
2904
3049
|
const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
|
|
2905
3050
|
const gradient = scaleToGeodeticSurfaceGradient;
|
|
2906
3051
|
gradient.set(intersection.x * oneOverRadiiSquaredX * 2, intersection.y * oneOverRadiiSquaredY * 2, intersection.z * oneOverRadiiSquaredZ * 2);
|
|
2907
|
-
let lambda = (1 - ratio) *
|
|
3052
|
+
let lambda = (1 - ratio) * scratchVector2.len() / (0.5 * gradient.len());
|
|
2908
3053
|
let correction = 0;
|
|
2909
3054
|
let xMultiplier;
|
|
2910
3055
|
let yMultiplier;
|
|
@@ -3067,9 +3212,10 @@
|
|
|
3067
3212
|
});
|
|
3068
3213
|
|
|
3069
3214
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js
|
|
3070
|
-
var scratchVector4, scratchNormal, scratchK, scratchPosition, scratchHeight, scratchCartesian,
|
|
3215
|
+
var scratchVector4, scratchNormal, scratchK, scratchPosition, scratchHeight, scratchCartesian, Ellipsoid;
|
|
3071
3216
|
var init_ellipsoid = __esm({
|
|
3072
3217
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js"() {
|
|
3218
|
+
init_defineProperty();
|
|
3073
3219
|
init_esm();
|
|
3074
3220
|
init_vec3();
|
|
3075
3221
|
init_constants();
|
|
@@ -3083,11 +3229,16 @@
|
|
|
3083
3229
|
scratchHeight = new Vector3();
|
|
3084
3230
|
scratchCartesian = new Vector3();
|
|
3085
3231
|
Ellipsoid = class {
|
|
3086
|
-
static get WGS84() {
|
|
3087
|
-
wgs84 = wgs84 || new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z);
|
|
3088
|
-
return wgs84;
|
|
3089
|
-
}
|
|
3090
3232
|
constructor(x = 0, y = 0, z = 0) {
|
|
3233
|
+
_defineProperty(this, "radii", void 0);
|
|
3234
|
+
_defineProperty(this, "radiiSquared", void 0);
|
|
3235
|
+
_defineProperty(this, "radiiToTheFourth", void 0);
|
|
3236
|
+
_defineProperty(this, "oneOverRadii", void 0);
|
|
3237
|
+
_defineProperty(this, "oneOverRadiiSquared", void 0);
|
|
3238
|
+
_defineProperty(this, "minimumRadius", void 0);
|
|
3239
|
+
_defineProperty(this, "maximumRadius", void 0);
|
|
3240
|
+
_defineProperty(this, "centerToleranceSquared", math_utils_default.EPSILON1);
|
|
3241
|
+
_defineProperty(this, "squaredXOverSquaredZ", void 0);
|
|
3091
3242
|
assert(x >= 0);
|
|
3092
3243
|
assert(y >= 0);
|
|
3093
3244
|
assert(z >= 0);
|
|
@@ -3098,7 +3249,6 @@
|
|
|
3098
3249
|
this.oneOverRadiiSquared = new Vector3(x === 0 ? 0 : 1 / (x * x), y === 0 ? 0 : 1 / (y * y), z === 0 ? 0 : 1 / (z * z));
|
|
3099
3250
|
this.minimumRadius = Math.min(x, y, z);
|
|
3100
3251
|
this.maximumRadius = Math.max(x, y, z);
|
|
3101
|
-
this.centerToleranceSquared = math_utils_default.EPSILON1;
|
|
3102
3252
|
if (this.radiiSquared.z !== 0) {
|
|
3103
3253
|
this.squaredXOverSquaredZ = this.radiiSquared.x / this.radiiSquared.z;
|
|
3104
3254
|
}
|
|
@@ -3185,6 +3335,7 @@
|
|
|
3185
3335
|
return scratchPosition.set(0, 0, z).to(result);
|
|
3186
3336
|
}
|
|
3187
3337
|
};
|
|
3338
|
+
_defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
|
|
3188
3339
|
}
|
|
3189
3340
|
});
|
|
3190
3341
|
|
|
@@ -3196,25 +3347,6 @@
|
|
|
3196
3347
|
}
|
|
3197
3348
|
});
|
|
3198
3349
|
|
|
3199
|
-
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
3200
|
-
function _defineProperty(obj, key, value) {
|
|
3201
|
-
if (key in obj) {
|
|
3202
|
-
Object.defineProperty(obj, key, {
|
|
3203
|
-
value,
|
|
3204
|
-
enumerable: true,
|
|
3205
|
-
configurable: true,
|
|
3206
|
-
writable: true
|
|
3207
|
-
});
|
|
3208
|
-
} else {
|
|
3209
|
-
obj[key] = value;
|
|
3210
|
-
}
|
|
3211
|
-
return obj;
|
|
3212
|
-
}
|
|
3213
|
-
var init_defineProperty = __esm({
|
|
3214
|
-
"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
|
|
3215
|
-
}
|
|
3216
|
-
});
|
|
3217
|
-
|
|
3218
3350
|
// ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
3219
3351
|
function getHiResTimestamp() {
|
|
3220
3352
|
let timestamp;
|
|
@@ -3446,19 +3578,19 @@
|
|
|
3446
3578
|
});
|
|
3447
3579
|
|
|
3448
3580
|
// ../loader-utils/src/lib/env-utils/globals.ts
|
|
3449
|
-
var
|
|
3581
|
+
var globals, self_, window_, global_, document_, isBrowser, matches, nodeVersion;
|
|
3450
3582
|
var init_globals = __esm({
|
|
3451
3583
|
"../loader-utils/src/lib/env-utils/globals.ts"() {
|
|
3452
|
-
|
|
3584
|
+
globals = {
|
|
3453
3585
|
self: typeof self !== "undefined" && self,
|
|
3454
3586
|
window: typeof window !== "undefined" && window,
|
|
3455
3587
|
global: typeof global !== "undefined" && global,
|
|
3456
3588
|
document: typeof document !== "undefined" && document
|
|
3457
3589
|
};
|
|
3458
|
-
self_ =
|
|
3459
|
-
window_ =
|
|
3460
|
-
|
|
3461
|
-
document_ =
|
|
3590
|
+
self_ = globals.self || globals.window || globals.global || {};
|
|
3591
|
+
window_ = globals.window || globals.self || globals.global || {};
|
|
3592
|
+
global_ = globals.global || globals.self || globals.window || {};
|
|
3593
|
+
document_ = globals.document || {};
|
|
3462
3594
|
isBrowser = Boolean(typeof process !== "object" || String(process) !== "[object process]" || process.browser);
|
|
3463
3595
|
matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
3464
3596
|
nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
@@ -3489,19 +3621,19 @@
|
|
|
3489
3621
|
});
|
|
3490
3622
|
|
|
3491
3623
|
// ../worker-utils/src/lib/env-utils/globals.ts
|
|
3492
|
-
var
|
|
3624
|
+
var globals2, self_2, window_2, global_2, document_2, isBrowser2, isMobile, matches2, nodeVersion2;
|
|
3493
3625
|
var init_globals2 = __esm({
|
|
3494
3626
|
"../worker-utils/src/lib/env-utils/globals.ts"() {
|
|
3495
|
-
|
|
3627
|
+
globals2 = {
|
|
3496
3628
|
self: typeof self !== "undefined" && self,
|
|
3497
3629
|
window: typeof window !== "undefined" && window,
|
|
3498
3630
|
global: typeof global !== "undefined" && global,
|
|
3499
3631
|
document: typeof document !== "undefined" && document
|
|
3500
3632
|
};
|
|
3501
|
-
self_2 =
|
|
3502
|
-
window_2 =
|
|
3503
|
-
|
|
3504
|
-
document_2 =
|
|
3633
|
+
self_2 = globals2.self || globals2.window || globals2.global || {};
|
|
3634
|
+
window_2 = globals2.window || globals2.self || globals2.global || {};
|
|
3635
|
+
global_2 = globals2.global || globals2.self || globals2.window || {};
|
|
3636
|
+
document_2 = globals2.document || {};
|
|
3505
3637
|
isBrowser2 = typeof process !== "object" || String(process) !== "[object process]" || process.browser;
|
|
3506
3638
|
isMobile = typeof window !== "undefined" && typeof window.orientation !== "undefined";
|
|
3507
3639
|
matches2 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
@@ -3549,11 +3681,13 @@
|
|
|
3549
3681
|
}
|
|
3550
3682
|
});
|
|
3551
3683
|
|
|
3552
|
-
// ../worker-utils/src/lib/node/worker_threads-browser.
|
|
3684
|
+
// ../worker-utils/src/lib/node/worker_threads-browser.ts
|
|
3553
3685
|
var Worker2;
|
|
3554
3686
|
var init_worker_threads_browser = __esm({
|
|
3555
|
-
"../worker-utils/src/lib/node/worker_threads-browser.
|
|
3687
|
+
"../worker-utils/src/lib/node/worker_threads-browser.ts"() {
|
|
3556
3688
|
Worker2 = class {
|
|
3689
|
+
terminate() {
|
|
3690
|
+
}
|
|
3557
3691
|
};
|
|
3558
3692
|
}
|
|
3559
3693
|
});
|
|
@@ -3666,7 +3800,7 @@
|
|
|
3666
3800
|
this.worker = isBrowser2 ? this._createBrowserWorker() : this._createNodeWorker();
|
|
3667
3801
|
}
|
|
3668
3802
|
static isSupported() {
|
|
3669
|
-
return typeof Worker !== "undefined" && isBrowser2 || typeof Worker2 !==
|
|
3803
|
+
return typeof Worker !== "undefined" && isBrowser2 || typeof Worker2 !== "undefined" && !isBrowser2;
|
|
3670
3804
|
}
|
|
3671
3805
|
destroy() {
|
|
3672
3806
|
this.onMessage = NOOP;
|
|
@@ -4483,11 +4617,11 @@
|
|
|
4483
4617
|
var INTERSECTION;
|
|
4484
4618
|
var init_constants2 = __esm({
|
|
4485
4619
|
"../../node_modules/@math.gl/culling/dist/esm/constants.js"() {
|
|
4486
|
-
INTERSECTION =
|
|
4620
|
+
INTERSECTION = {
|
|
4487
4621
|
OUTSIDE: -1,
|
|
4488
4622
|
INTERSECTING: 0,
|
|
4489
4623
|
INSIDE: 1
|
|
4490
|
-
}
|
|
4624
|
+
};
|
|
4491
4625
|
}
|
|
4492
4626
|
});
|
|
4493
4627
|
|
|
@@ -4495,6 +4629,7 @@
|
|
|
4495
4629
|
var scratchVector5, scratchNormal2;
|
|
4496
4630
|
var init_axis_aligned_bounding_box = __esm({
|
|
4497
4631
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/axis-aligned-bounding-box.js"() {
|
|
4632
|
+
init_defineProperty();
|
|
4498
4633
|
init_esm();
|
|
4499
4634
|
init_constants2();
|
|
4500
4635
|
scratchVector5 = new Vector3();
|
|
@@ -4506,6 +4641,7 @@
|
|
|
4506
4641
|
var scratchVector6, scratchVector23, BoundingSphere;
|
|
4507
4642
|
var init_bounding_sphere = __esm({
|
|
4508
4643
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/bounding-sphere.js"() {
|
|
4644
|
+
init_defineProperty();
|
|
4509
4645
|
init_esm();
|
|
4510
4646
|
init_mat4();
|
|
4511
4647
|
init_constants2();
|
|
@@ -4513,6 +4649,8 @@
|
|
|
4513
4649
|
scratchVector23 = new Vector3();
|
|
4514
4650
|
BoundingSphere = class {
|
|
4515
4651
|
constructor(center = [0, 0, 0], radius = 0) {
|
|
4652
|
+
_defineProperty(this, "center", void 0);
|
|
4653
|
+
_defineProperty(this, "radius", void 0);
|
|
4516
4654
|
this.radius = -0;
|
|
4517
4655
|
this.center = new Vector3();
|
|
4518
4656
|
this.fromCenterRadius(center, radius);
|
|
@@ -4554,8 +4692,8 @@
|
|
|
4554
4692
|
return this;
|
|
4555
4693
|
}
|
|
4556
4694
|
expand(point) {
|
|
4557
|
-
|
|
4558
|
-
const radius =
|
|
4695
|
+
const scratchPoint = scratchVector6.from(point);
|
|
4696
|
+
const radius = scratchPoint.subtract(this.center).magnitude();
|
|
4559
4697
|
if (radius > this.radius) {
|
|
4560
4698
|
this.radius = radius;
|
|
4561
4699
|
}
|
|
@@ -4568,12 +4706,13 @@
|
|
|
4568
4706
|
return this;
|
|
4569
4707
|
}
|
|
4570
4708
|
distanceSquaredTo(point) {
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
return delta.lengthSquared() - this.radius * this.radius;
|
|
4709
|
+
const d = this.distanceTo(point);
|
|
4710
|
+
return d * d;
|
|
4574
4711
|
}
|
|
4575
4712
|
distanceTo(point) {
|
|
4576
|
-
|
|
4713
|
+
const scratchPoint = scratchVector6.from(point);
|
|
4714
|
+
const delta = scratchPoint.subtract(this.center);
|
|
4715
|
+
return Math.max(0, delta.len() - this.radius);
|
|
4577
4716
|
}
|
|
4578
4717
|
intersectPlane(plane) {
|
|
4579
4718
|
const center = this.center;
|
|
@@ -4596,6 +4735,7 @@
|
|
|
4596
4735
|
var scratchVector32, scratchOffset, scratchVectorU, scratchVectorV, scratchVectorW, scratchCorner, scratchToCenter, MATRIX3, OrientedBoundingBox;
|
|
4597
4736
|
var init_oriented_bounding_box = __esm({
|
|
4598
4737
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/oriented-bounding-box.js"() {
|
|
4738
|
+
init_defineProperty();
|
|
4599
4739
|
init_esm();
|
|
4600
4740
|
init_bounding_sphere();
|
|
4601
4741
|
init_constants2();
|
|
@@ -4619,6 +4759,8 @@
|
|
|
4619
4759
|
};
|
|
4620
4760
|
OrientedBoundingBox = class {
|
|
4621
4761
|
constructor(center = [0, 0, 0], halfAxes = [0, 0, 0, 0, 0, 0, 0, 0, 0]) {
|
|
4762
|
+
_defineProperty(this, "center", void 0);
|
|
4763
|
+
_defineProperty(this, "halfAxes", void 0);
|
|
4622
4764
|
this.center = new Vector3().from(center);
|
|
4623
4765
|
this.halfAxes = new Matrix3(halfAxes);
|
|
4624
4766
|
}
|
|
@@ -4790,11 +4932,14 @@
|
|
|
4790
4932
|
var scratchPosition2, scratchNormal3, Plane;
|
|
4791
4933
|
var init_plane = __esm({
|
|
4792
4934
|
"../../node_modules/@math.gl/culling/dist/esm/lib/plane.js"() {
|
|
4935
|
+
init_defineProperty();
|
|
4793
4936
|
init_esm();
|
|
4794
4937
|
scratchPosition2 = new Vector3();
|
|
4795
4938
|
scratchNormal3 = new Vector3();
|
|
4796
4939
|
Plane = class {
|
|
4797
4940
|
constructor(normal = [0, 0, 1], distance = 0) {
|
|
4941
|
+
_defineProperty(this, "normal", void 0);
|
|
4942
|
+
_defineProperty(this, "distance", void 0);
|
|
4798
4943
|
this.normal = new Vector3();
|
|
4799
4944
|
this.distance = -0;
|
|
4800
4945
|
this.fromNormalDistance(normal, distance);
|
|
@@ -4818,7 +4963,7 @@
|
|
|
4818
4963
|
this.distance = d;
|
|
4819
4964
|
return this;
|
|
4820
4965
|
}
|
|
4821
|
-
clone(
|
|
4966
|
+
clone() {
|
|
4822
4967
|
return new Plane(this.normal, this.distance);
|
|
4823
4968
|
}
|
|
4824
4969
|
equals(right) {
|
|
@@ -4846,6 +4991,7 @@
|
|
|
4846
4991
|
var faces, scratchPlaneCenter, scratchPlaneNormal, scratchPlane, CullingVolume;
|
|
4847
4992
|
var init_culling_volume = __esm({
|
|
4848
4993
|
"../../node_modules/@math.gl/culling/dist/esm/lib/culling-volume.js"() {
|
|
4994
|
+
init_defineProperty();
|
|
4849
4995
|
init_esm();
|
|
4850
4996
|
init_constants2();
|
|
4851
4997
|
init_plane();
|
|
@@ -4854,18 +5000,9 @@
|
|
|
4854
5000
|
scratchPlaneNormal = new Vector3();
|
|
4855
5001
|
scratchPlane = new Plane(new Vector3(1, 0, 0), 0);
|
|
4856
5002
|
CullingVolume = class {
|
|
4857
|
-
static get MASK_OUTSIDE() {
|
|
4858
|
-
return 4294967295;
|
|
4859
|
-
}
|
|
4860
|
-
static get MASK_INSIDE() {
|
|
4861
|
-
return 0;
|
|
4862
|
-
}
|
|
4863
|
-
static get MASK_INDETERMINATE() {
|
|
4864
|
-
return 2147483647;
|
|
4865
|
-
}
|
|
4866
5003
|
constructor(planes = []) {
|
|
5004
|
+
_defineProperty(this, "planes", void 0);
|
|
4867
5005
|
this.planes = planes;
|
|
4868
|
-
assert(this.planes.every((plane) => plane instanceof Plane));
|
|
4869
5006
|
}
|
|
4870
5007
|
fromBoundingSphere(boundingSphere) {
|
|
4871
5008
|
this.planes.length = 2 * faces.length;
|
|
@@ -4893,7 +5030,6 @@
|
|
|
4893
5030
|
return this;
|
|
4894
5031
|
}
|
|
4895
5032
|
computeVisibility(boundingVolume) {
|
|
4896
|
-
assert(boundingVolume);
|
|
4897
5033
|
let intersect = INTERSECTION.INSIDE;
|
|
4898
5034
|
for (const plane of this.planes) {
|
|
4899
5035
|
const result = boundingVolume.intersectPlane(plane);
|
|
@@ -4909,7 +5045,6 @@
|
|
|
4909
5045
|
return intersect;
|
|
4910
5046
|
}
|
|
4911
5047
|
computeVisibilityWithPlaneMask(boundingVolume, parentPlaneMask) {
|
|
4912
|
-
assert(boundingVolume, "boundingVolume is required.");
|
|
4913
5048
|
assert(Number.isFinite(parentPlaneMask), "parentPlaneMask is required.");
|
|
4914
5049
|
if (parentPlaneMask === CullingVolume.MASK_OUTSIDE || parentPlaneMask === CullingVolume.MASK_INSIDE) {
|
|
4915
5050
|
return parentPlaneMask;
|
|
@@ -4932,6 +5067,9 @@
|
|
|
4932
5067
|
return mask;
|
|
4933
5068
|
}
|
|
4934
5069
|
};
|
|
5070
|
+
_defineProperty(CullingVolume, "MASK_OUTSIDE", 4294967295);
|
|
5071
|
+
_defineProperty(CullingVolume, "MASK_INSIDE", 0);
|
|
5072
|
+
_defineProperty(CullingVolume, "MASK_INDETERMINATE", 2147483647);
|
|
4935
5073
|
}
|
|
4936
5074
|
});
|
|
4937
5075
|
|
|
@@ -4939,6 +5077,7 @@
|
|
|
4939
5077
|
var scratchPlaneUpVector, scratchPlaneRightVector, scratchPlaneNearCenter, scratchPlaneFarCenter, scratchPlaneNormal2;
|
|
4940
5078
|
var init_perspective_off_center_frustum = __esm({
|
|
4941
5079
|
"../../node_modules/@math.gl/culling/dist/esm/lib/perspective-off-center-frustum.js"() {
|
|
5080
|
+
init_defineProperty();
|
|
4942
5081
|
init_esm();
|
|
4943
5082
|
init_culling_volume();
|
|
4944
5083
|
init_plane();
|
|
@@ -4953,6 +5092,7 @@
|
|
|
4953
5092
|
// ../../node_modules/@math.gl/culling/dist/esm/lib/perspective-frustum.js
|
|
4954
5093
|
var init_perspective_frustum = __esm({
|
|
4955
5094
|
"../../node_modules/@math.gl/culling/dist/esm/lib/perspective-frustum.js"() {
|
|
5095
|
+
init_defineProperty();
|
|
4956
5096
|
init_perspective_off_center_frustum();
|
|
4957
5097
|
}
|
|
4958
5098
|
});
|
|
@@ -5027,8 +5167,6 @@
|
|
|
5027
5167
|
init_bounding_sphere_from_points();
|
|
5028
5168
|
init_bounding_box_from_points();
|
|
5029
5169
|
init_compute_eigen_decomposition();
|
|
5030
|
-
init_constants2();
|
|
5031
|
-
init_constants2();
|
|
5032
5170
|
}
|
|
5033
5171
|
});
|
|
5034
5172
|
|
|
@@ -5036,14 +5174,13 @@
|
|
|
5036
5174
|
function getFrameState(viewport, frameNumber) {
|
|
5037
5175
|
const { cameraDirection, cameraUp, height } = viewport;
|
|
5038
5176
|
const { metersPerUnit } = viewport.distanceScales;
|
|
5039
|
-
const
|
|
5040
|
-
const viewportCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(viewportCenterCartographic, new Vector3());
|
|
5177
|
+
const viewportCenterCartesian = worldToCartesian(viewport, viewport.center);
|
|
5041
5178
|
const enuToFixedTransform = Ellipsoid.WGS84.eastNorthUpToFixedFrame(viewportCenterCartesian);
|
|
5042
5179
|
const cameraPositionCartographic = viewport.unprojectPosition(viewport.cameraPosition);
|
|
5043
5180
|
const cameraPositionCartesian2 = Ellipsoid.WGS84.cartographicToCartesian(cameraPositionCartographic, new Vector3());
|
|
5044
5181
|
const cameraDirectionCartesian = new Vector3(enuToFixedTransform.transformAsVector(new Vector3(cameraDirection).scale(metersPerUnit))).normalize();
|
|
5045
5182
|
const cameraUpCartesian = new Vector3(enuToFixedTransform.transformAsVector(new Vector3(cameraUp).scale(metersPerUnit))).normalize();
|
|
5046
|
-
commonSpacePlanesToWGS84(viewport
|
|
5183
|
+
commonSpacePlanesToWGS84(viewport);
|
|
5047
5184
|
const ViewportClass = viewport.constructor;
|
|
5048
5185
|
const { longitude, latitude, width, bearing, zoom } = viewport;
|
|
5049
5186
|
const topDownViewport = new ViewportClass({
|
|
@@ -5093,18 +5230,32 @@
|
|
|
5093
5230
|
}
|
|
5094
5231
|
return [selectedTiles, unselectedTiles];
|
|
5095
5232
|
}
|
|
5096
|
-
function commonSpacePlanesToWGS84(viewport
|
|
5233
|
+
function commonSpacePlanesToWGS84(viewport) {
|
|
5097
5234
|
const frustumPlanes = viewport.getFrustumPlanes();
|
|
5235
|
+
const nearCenterCommon = closestPointOnPlane(frustumPlanes.near, viewport.cameraPosition);
|
|
5236
|
+
const nearCenterCartesian = worldToCartesian(viewport, nearCenterCommon);
|
|
5237
|
+
const cameraCartesian = worldToCartesian(viewport, viewport.cameraPosition, scratchPosition3);
|
|
5098
5238
|
let i = 0;
|
|
5239
|
+
cullingVolume.planes[i++].fromPointNormal(nearCenterCartesian, scratchVector7.copy(nearCenterCartesian).subtract(cameraCartesian));
|
|
5099
5240
|
for (const dir in frustumPlanes) {
|
|
5241
|
+
if (dir === "near") {
|
|
5242
|
+
continue;
|
|
5243
|
+
}
|
|
5100
5244
|
const plane = frustumPlanes[dir];
|
|
5101
|
-
const
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
const cartesianPos = Ellipsoid.WGS84.cartographicToCartesian(cartographicPos, new Vector3());
|
|
5105
|
-
cullingVolume.planes[i++].fromPointNormal(cartesianPos, scratchVector7.copy(viewportCenterCartesian).subtract(cartesianPos));
|
|
5245
|
+
const posCommon = closestPointOnPlane(plane, nearCenterCommon, scratchPosition3);
|
|
5246
|
+
const cartesianPos = worldToCartesian(viewport, posCommon, scratchPosition3);
|
|
5247
|
+
cullingVolume.planes[i++].fromPointNormal(cartesianPos, scratchVector7.copy(nearCenterCartesian).subtract(cartesianPos));
|
|
5106
5248
|
}
|
|
5107
5249
|
}
|
|
5250
|
+
function closestPointOnPlane(plane, refPoint, out = new Vector3()) {
|
|
5251
|
+
const distanceToRef = plane.normal.dot(refPoint);
|
|
5252
|
+
out.copy(plane.normal).scale(plane.distance - distanceToRef).add(refPoint);
|
|
5253
|
+
return out;
|
|
5254
|
+
}
|
|
5255
|
+
function worldToCartesian(viewport, point, out = new Vector3()) {
|
|
5256
|
+
const cartographicPos = viewport.unprojectPosition(point);
|
|
5257
|
+
return Ellipsoid.WGS84.cartographicToCartesian(cartographicPos, out);
|
|
5258
|
+
}
|
|
5108
5259
|
var scratchVector7, scratchPosition3, cullingVolume;
|
|
5109
5260
|
var init_frame_state = __esm({
|
|
5110
5261
|
"src/tileset/helpers/frame-state.ts"() {
|
|
@@ -5369,7 +5520,7 @@
|
|
|
5369
5520
|
}
|
|
5370
5521
|
});
|
|
5371
5522
|
|
|
5372
|
-
// ../../node_modules
|
|
5523
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
5373
5524
|
function isElectron(mockUserAgent) {
|
|
5374
5525
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
5375
5526
|
return true;
|
|
@@ -5385,52 +5536,59 @@
|
|
|
5385
5536
|
return false;
|
|
5386
5537
|
}
|
|
5387
5538
|
var init_is_electron = __esm({
|
|
5388
|
-
"../../node_modules
|
|
5539
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
5389
5540
|
}
|
|
5390
5541
|
});
|
|
5391
5542
|
|
|
5392
|
-
// ../../node_modules
|
|
5543
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
5393
5544
|
function isBrowser3() {
|
|
5394
5545
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
5395
5546
|
return !isNode || isElectron();
|
|
5396
5547
|
}
|
|
5397
5548
|
var init_is_browser = __esm({
|
|
5398
|
-
"../../node_modules
|
|
5549
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
5399
5550
|
init_is_electron();
|
|
5400
5551
|
}
|
|
5401
5552
|
});
|
|
5402
5553
|
|
|
5403
|
-
// ../../node_modules
|
|
5404
|
-
var
|
|
5554
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
5555
|
+
var globals3, self_3, window_3, document_3, process_;
|
|
5405
5556
|
var init_globals3 = __esm({
|
|
5406
|
-
"../../node_modules
|
|
5407
|
-
|
|
5557
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
5558
|
+
globals3 = {
|
|
5408
5559
|
self: typeof self !== "undefined" && self,
|
|
5409
5560
|
window: typeof window !== "undefined" && window,
|
|
5410
5561
|
global: typeof global !== "undefined" && global,
|
|
5411
5562
|
document: typeof document !== "undefined" && document,
|
|
5412
5563
|
process: typeof process === "object" && process
|
|
5413
5564
|
};
|
|
5414
|
-
self_3 =
|
|
5415
|
-
window_3 =
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
process_ = globals4.process || {};
|
|
5565
|
+
self_3 = globals3.self || globals3.window || globals3.global;
|
|
5566
|
+
window_3 = globals3.window || globals3.self || globals3.global;
|
|
5567
|
+
document_3 = globals3.document || {};
|
|
5568
|
+
process_ = globals3.process || {};
|
|
5419
5569
|
}
|
|
5420
5570
|
});
|
|
5421
5571
|
|
|
5422
|
-
// ../../node_modules
|
|
5572
|
+
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
5423
5573
|
var VERSION2, isBrowser4;
|
|
5424
5574
|
var init_globals4 = __esm({
|
|
5425
|
-
"../../node_modules
|
|
5575
|
+
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
5426
5576
|
init_is_browser();
|
|
5427
|
-
init_globals3();
|
|
5428
5577
|
VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
5429
5578
|
isBrowser4 = isBrowser3();
|
|
5430
5579
|
}
|
|
5431
5580
|
});
|
|
5432
5581
|
|
|
5433
|
-
// ../../node_modules
|
|
5582
|
+
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
5583
|
+
var init_esm5 = __esm({
|
|
5584
|
+
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
5585
|
+
init_globals4();
|
|
5586
|
+
init_globals3();
|
|
5587
|
+
init_is_browser();
|
|
5588
|
+
}
|
|
5589
|
+
});
|
|
5590
|
+
|
|
5591
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
5434
5592
|
function getStorage(type) {
|
|
5435
5593
|
try {
|
|
5436
5594
|
const storage = window[type];
|
|
@@ -5444,9 +5602,15 @@
|
|
|
5444
5602
|
}
|
|
5445
5603
|
var LocalStorage;
|
|
5446
5604
|
var init_local_storage = __esm({
|
|
5447
|
-
"../../node_modules
|
|
5605
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
5606
|
+
init_defineProperty();
|
|
5448
5607
|
LocalStorage = class {
|
|
5449
|
-
constructor(id
|
|
5608
|
+
constructor(id) {
|
|
5609
|
+
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5610
|
+
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
5611
|
+
_defineProperty(this, "storage", void 0);
|
|
5612
|
+
_defineProperty(this, "id", void 0);
|
|
5613
|
+
_defineProperty(this, "config", {});
|
|
5450
5614
|
this.storage = getStorage(type);
|
|
5451
5615
|
this.id = id;
|
|
5452
5616
|
this.config = {};
|
|
@@ -5481,7 +5645,7 @@
|
|
|
5481
5645
|
}
|
|
5482
5646
|
});
|
|
5483
5647
|
|
|
5484
|
-
// ../../node_modules
|
|
5648
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
5485
5649
|
function formatTime(ms) {
|
|
5486
5650
|
let formatted;
|
|
5487
5651
|
if (ms < 10) {
|
|
@@ -5495,11 +5659,13 @@
|
|
|
5495
5659
|
}
|
|
5496
5660
|
return formatted;
|
|
5497
5661
|
}
|
|
5498
|
-
function leftPad(string
|
|
5662
|
+
function leftPad(string) {
|
|
5663
|
+
let length4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
|
|
5499
5664
|
const padLength = Math.max(length4 - string.length, 0);
|
|
5500
5665
|
return "".concat(" ".repeat(padLength)).concat(string);
|
|
5501
5666
|
}
|
|
5502
|
-
function formatImage(image, message, scale5
|
|
5667
|
+
function formatImage(image, message, scale5) {
|
|
5668
|
+
let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
|
|
5503
5669
|
const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
5504
5670
|
if (image.width > maxWidth) {
|
|
5505
5671
|
scale5 = Math.min(scale5, maxWidth / image.width);
|
|
@@ -5510,16 +5676,16 @@
|
|
|
5510
5676
|
return ["".concat(message, " %c+"), style];
|
|
5511
5677
|
}
|
|
5512
5678
|
var init_formatters = __esm({
|
|
5513
|
-
"../../node_modules
|
|
5679
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
5514
5680
|
}
|
|
5515
5681
|
});
|
|
5516
5682
|
|
|
5517
|
-
// ../../node_modules
|
|
5683
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
5518
5684
|
function getColor(color) {
|
|
5519
5685
|
return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
5520
5686
|
}
|
|
5521
5687
|
function addColor(string, color, background) {
|
|
5522
|
-
if (!
|
|
5688
|
+
if (!isBrowser3 && typeof string === "string") {
|
|
5523
5689
|
if (color) {
|
|
5524
5690
|
color = getColor(color);
|
|
5525
5691
|
string = "[".concat(color, "m").concat(string, "[39m");
|
|
@@ -5533,31 +5699,32 @@
|
|
|
5533
5699
|
}
|
|
5534
5700
|
var COLOR;
|
|
5535
5701
|
var init_color = __esm({
|
|
5536
|
-
"../../node_modules
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
BLACK
|
|
5540
|
-
RED
|
|
5541
|
-
GREEN
|
|
5542
|
-
YELLOW
|
|
5543
|
-
BLUE
|
|
5544
|
-
MAGENTA
|
|
5545
|
-
CYAN
|
|
5546
|
-
WHITE
|
|
5547
|
-
BRIGHT_BLACK
|
|
5548
|
-
BRIGHT_RED
|
|
5549
|
-
BRIGHT_GREEN
|
|
5550
|
-
BRIGHT_YELLOW
|
|
5551
|
-
BRIGHT_BLUE
|
|
5552
|
-
BRIGHT_MAGENTA
|
|
5553
|
-
BRIGHT_CYAN
|
|
5554
|
-
BRIGHT_WHITE
|
|
5555
|
-
};
|
|
5702
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
5703
|
+
init_esm5();
|
|
5704
|
+
(function(COLOR2) {
|
|
5705
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
5706
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
5707
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
5708
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
5709
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
5710
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
5711
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
5712
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
5713
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
5714
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
5715
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
5716
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
5717
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
5718
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
5719
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
5720
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
5721
|
+
})(COLOR || (COLOR = {}));
|
|
5556
5722
|
}
|
|
5557
5723
|
});
|
|
5558
5724
|
|
|
5559
|
-
// ../../node_modules
|
|
5560
|
-
function autobind(obj
|
|
5725
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
5726
|
+
function autobind(obj) {
|
|
5727
|
+
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
5561
5728
|
const proto = Object.getPrototypeOf(obj);
|
|
5562
5729
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
5563
5730
|
for (const key of propNames) {
|
|
@@ -5569,28 +5736,30 @@
|
|
|
5569
5736
|
}
|
|
5570
5737
|
}
|
|
5571
5738
|
var init_autobind = __esm({
|
|
5572
|
-
"../../node_modules
|
|
5739
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
5573
5740
|
}
|
|
5574
5741
|
});
|
|
5575
5742
|
|
|
5576
|
-
// ../../node_modules
|
|
5743
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
5577
5744
|
function assert4(condition, message) {
|
|
5578
5745
|
if (!condition) {
|
|
5579
5746
|
throw new Error(message || "Assertion failed");
|
|
5580
5747
|
}
|
|
5581
5748
|
}
|
|
5582
5749
|
var init_assert4 = __esm({
|
|
5583
|
-
"../../node_modules
|
|
5750
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
5584
5751
|
}
|
|
5585
5752
|
});
|
|
5586
5753
|
|
|
5587
|
-
// ../../node_modules
|
|
5754
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
5588
5755
|
function getHiResTimestamp2() {
|
|
5589
5756
|
let timestamp;
|
|
5590
|
-
if (
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5757
|
+
if (isBrowser3 && "performance" in window_3) {
|
|
5758
|
+
var _window$performance, _window$performance$n;
|
|
5759
|
+
timestamp = window_3 === null || window_3 === void 0 ? void 0 : (_window$performance = window_3.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
|
|
5760
|
+
} else if ("hrtime" in process_) {
|
|
5761
|
+
var _process$hrtime;
|
|
5762
|
+
const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
|
|
5594
5763
|
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
5595
5764
|
} else {
|
|
5596
5765
|
timestamp = Date.now();
|
|
@@ -5598,21 +5767,19 @@
|
|
|
5598
5767
|
return timestamp;
|
|
5599
5768
|
}
|
|
5600
5769
|
var init_hi_res_timestamp2 = __esm({
|
|
5601
|
-
"../../node_modules
|
|
5602
|
-
|
|
5770
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
5771
|
+
init_esm5();
|
|
5603
5772
|
}
|
|
5604
5773
|
});
|
|
5605
5774
|
|
|
5606
|
-
//
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
function getTableHeader(table) {
|
|
5610
|
-
for (const key in table) {
|
|
5611
|
-
for (const title in table[key]) {
|
|
5612
|
-
return title || "untitled";
|
|
5613
|
-
}
|
|
5775
|
+
// (disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image
|
|
5776
|
+
var init_node_asciify_image = __esm({
|
|
5777
|
+
"(disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image"() {
|
|
5614
5778
|
}
|
|
5615
|
-
|
|
5779
|
+
});
|
|
5780
|
+
|
|
5781
|
+
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
5782
|
+
function noop() {
|
|
5616
5783
|
}
|
|
5617
5784
|
function normalizeLogLevel(logLevel) {
|
|
5618
5785
|
if (!logLevel) {
|
|
@@ -5641,7 +5808,6 @@
|
|
|
5641
5808
|
const args = opts.args ? Array.from(opts.args) : [];
|
|
5642
5809
|
while (args.length && args.shift() !== message) {
|
|
5643
5810
|
}
|
|
5644
|
-
opts.args = args;
|
|
5645
5811
|
switch (typeof logLevel) {
|
|
5646
5812
|
case "string":
|
|
5647
5813
|
case "function":
|
|
@@ -5660,7 +5826,9 @@
|
|
|
5660
5826
|
}
|
|
5661
5827
|
const messageType = typeof opts.message;
|
|
5662
5828
|
assert4(messageType === "string" || messageType === "object");
|
|
5663
|
-
return Object.assign(opts,
|
|
5829
|
+
return Object.assign(opts, {
|
|
5830
|
+
args
|
|
5831
|
+
}, opts.opts);
|
|
5664
5832
|
}
|
|
5665
5833
|
function decorateMessage(id, message, opts) {
|
|
5666
5834
|
if (typeof message === "string") {
|
|
@@ -5670,29 +5838,25 @@
|
|
|
5670
5838
|
}
|
|
5671
5839
|
return message;
|
|
5672
5840
|
}
|
|
5673
|
-
function logImageInNode({
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
fit: "box",
|
|
5686
|
-
width: "".concat(Math.round(80 * scale5), "%")
|
|
5687
|
-
}).then((data) => console.log(data));
|
|
5688
|
-
}
|
|
5689
|
-
return noop2;
|
|
5841
|
+
function logImageInNode(_ref2) {
|
|
5842
|
+
let {
|
|
5843
|
+
image,
|
|
5844
|
+
message = "",
|
|
5845
|
+
scale: scale5 = 1
|
|
5846
|
+
} = _ref2;
|
|
5847
|
+
asciify.nodeAsciifyImage({
|
|
5848
|
+
image,
|
|
5849
|
+
message,
|
|
5850
|
+
scale: scale5
|
|
5851
|
+
});
|
|
5852
|
+
return noop;
|
|
5690
5853
|
}
|
|
5691
|
-
function logImageInBrowser({
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5854
|
+
function logImageInBrowser(_ref3) {
|
|
5855
|
+
let {
|
|
5856
|
+
image,
|
|
5857
|
+
message = "",
|
|
5858
|
+
scale: scale5 = 1
|
|
5859
|
+
} = _ref3;
|
|
5696
5860
|
if (typeof image === "string") {
|
|
5697
5861
|
const img = new Image();
|
|
5698
5862
|
img.onload = () => {
|
|
@@ -5700,33 +5864,43 @@
|
|
|
5700
5864
|
console.log(...args);
|
|
5701
5865
|
};
|
|
5702
5866
|
img.src = image;
|
|
5703
|
-
return
|
|
5867
|
+
return noop;
|
|
5704
5868
|
}
|
|
5705
5869
|
const element = image.nodeName || "";
|
|
5706
5870
|
if (element.toLowerCase() === "img") {
|
|
5707
5871
|
console.log(...formatImage(image, message, scale5));
|
|
5708
|
-
return
|
|
5872
|
+
return noop;
|
|
5709
5873
|
}
|
|
5710
5874
|
if (element.toLowerCase() === "canvas") {
|
|
5711
5875
|
const img = new Image();
|
|
5712
5876
|
img.onload = () => console.log(...formatImage(img, message, scale5));
|
|
5713
5877
|
img.src = image.toDataURL();
|
|
5714
|
-
return
|
|
5878
|
+
return noop;
|
|
5879
|
+
}
|
|
5880
|
+
return noop;
|
|
5881
|
+
}
|
|
5882
|
+
function getTableHeader(table) {
|
|
5883
|
+
for (const key in table) {
|
|
5884
|
+
for (const title in table[key]) {
|
|
5885
|
+
return title || "untitled";
|
|
5886
|
+
}
|
|
5715
5887
|
}
|
|
5716
|
-
return
|
|
5888
|
+
return "empty";
|
|
5717
5889
|
}
|
|
5718
5890
|
var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
|
|
5719
5891
|
var init_log = __esm({
|
|
5720
|
-
"../../node_modules
|
|
5721
|
-
|
|
5892
|
+
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
5893
|
+
init_defineProperty();
|
|
5894
|
+
init_esm5();
|
|
5722
5895
|
init_local_storage();
|
|
5723
5896
|
init_formatters();
|
|
5724
5897
|
init_color();
|
|
5725
5898
|
init_autobind();
|
|
5726
5899
|
init_assert4();
|
|
5727
5900
|
init_hi_res_timestamp2();
|
|
5901
|
+
init_node_asciify_image();
|
|
5728
5902
|
originalConsole = {
|
|
5729
|
-
debug:
|
|
5903
|
+
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
5730
5904
|
log: console.log,
|
|
5731
5905
|
info: console.info,
|
|
5732
5906
|
warn: console.warn,
|
|
@@ -5741,16 +5915,20 @@
|
|
|
5741
5915
|
once: true
|
|
5742
5916
|
};
|
|
5743
5917
|
Log = class {
|
|
5744
|
-
constructor({
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5918
|
+
constructor() {
|
|
5919
|
+
let {
|
|
5920
|
+
id
|
|
5921
|
+
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
5922
|
+
id: ""
|
|
5923
|
+
};
|
|
5924
|
+
_defineProperty(this, "id", void 0);
|
|
5925
|
+
_defineProperty(this, "VERSION", VERSION2);
|
|
5926
|
+
_defineProperty(this, "_startTs", getHiResTimestamp2());
|
|
5927
|
+
_defineProperty(this, "_deltaTs", getHiResTimestamp2());
|
|
5928
|
+
_defineProperty(this, "_storage", void 0);
|
|
5929
|
+
_defineProperty(this, "userData", {});
|
|
5930
|
+
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
5749
5931
|
this.id = id;
|
|
5750
|
-
this.VERSION = VERSION2;
|
|
5751
|
-
this._startTs = getHiResTimestamp2();
|
|
5752
|
-
this._deltaTs = getHiResTimestamp2();
|
|
5753
|
-
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
5754
5932
|
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
5755
5933
|
this.userData = {};
|
|
5756
5934
|
this.timeStamp("".concat(this.id, " started"));
|
|
@@ -5784,7 +5962,8 @@
|
|
|
5784
5962
|
getPriority() {
|
|
5785
5963
|
return this.level;
|
|
5786
5964
|
}
|
|
5787
|
-
enable(
|
|
5965
|
+
enable() {
|
|
5966
|
+
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
5788
5967
|
this._storage.updateConfiguration({
|
|
5789
5968
|
enabled
|
|
5790
5969
|
});
|
|
@@ -5796,6 +5975,21 @@
|
|
|
5796
5975
|
});
|
|
5797
5976
|
return this;
|
|
5798
5977
|
}
|
|
5978
|
+
get(setting) {
|
|
5979
|
+
return this._storage.config[setting];
|
|
5980
|
+
}
|
|
5981
|
+
set(setting, value) {
|
|
5982
|
+
this._storage.updateConfiguration({
|
|
5983
|
+
[setting]: value
|
|
5984
|
+
});
|
|
5985
|
+
}
|
|
5986
|
+
settings() {
|
|
5987
|
+
if (console.table) {
|
|
5988
|
+
console.table(this._storage.config);
|
|
5989
|
+
} else {
|
|
5990
|
+
console.log(this._storage.config);
|
|
5991
|
+
}
|
|
5992
|
+
}
|
|
5799
5993
|
assert(condition, message) {
|
|
5800
5994
|
assert4(condition, message);
|
|
5801
5995
|
}
|
|
@@ -5824,27 +6018,31 @@
|
|
|
5824
6018
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
5825
6019
|
}
|
|
5826
6020
|
once(logLevel, message) {
|
|
6021
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
6022
|
+
args[_key - 2] = arguments[_key];
|
|
6023
|
+
}
|
|
5827
6024
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
5828
6025
|
}
|
|
5829
6026
|
table(logLevel, table, columns) {
|
|
5830
6027
|
if (table) {
|
|
5831
|
-
return this._getLogFunction(logLevel, table, console.table ||
|
|
6028
|
+
return this._getLogFunction(logLevel, table, console.table || noop, columns && [columns], {
|
|
5832
6029
|
tag: getTableHeader(table)
|
|
5833
6030
|
});
|
|
5834
6031
|
}
|
|
5835
|
-
return
|
|
6032
|
+
return noop;
|
|
5836
6033
|
}
|
|
5837
|
-
image({
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
6034
|
+
image(_ref) {
|
|
6035
|
+
let {
|
|
6036
|
+
logLevel,
|
|
6037
|
+
priority,
|
|
6038
|
+
image,
|
|
6039
|
+
message = "",
|
|
6040
|
+
scale: scale5 = 1
|
|
6041
|
+
} = _ref;
|
|
5844
6042
|
if (!this._shouldLog(logLevel || priority)) {
|
|
5845
|
-
return
|
|
6043
|
+
return noop;
|
|
5846
6044
|
}
|
|
5847
|
-
return
|
|
6045
|
+
return isBrowser3 ? logImageInBrowser({
|
|
5848
6046
|
image,
|
|
5849
6047
|
message,
|
|
5850
6048
|
scale: scale5
|
|
@@ -5854,34 +6052,20 @@
|
|
|
5854
6052
|
scale: scale5
|
|
5855
6053
|
});
|
|
5856
6054
|
}
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
console.table(this._storage.config);
|
|
5860
|
-
} else {
|
|
5861
|
-
console.log(this._storage.config);
|
|
5862
|
-
}
|
|
5863
|
-
}
|
|
5864
|
-
get(setting) {
|
|
5865
|
-
return this._storage.config[setting];
|
|
5866
|
-
}
|
|
5867
|
-
set(setting, value) {
|
|
5868
|
-
this._storage.updateConfiguration({
|
|
5869
|
-
[setting]: value
|
|
5870
|
-
});
|
|
5871
|
-
}
|
|
5872
|
-
time(logLevel, message) {
|
|
5873
|
-
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
6055
|
+
time(logLevel, message) {
|
|
6056
|
+
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
5874
6057
|
}
|
|
5875
6058
|
timeEnd(logLevel, message) {
|
|
5876
6059
|
return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
|
|
5877
6060
|
}
|
|
5878
6061
|
timeStamp(logLevel, message) {
|
|
5879
|
-
return this._getLogFunction(logLevel, message, console.timeStamp ||
|
|
6062
|
+
return this._getLogFunction(logLevel, message, console.timeStamp || noop);
|
|
5880
6063
|
}
|
|
5881
|
-
group(logLevel, message
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
6064
|
+
group(logLevel, message) {
|
|
6065
|
+
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
6066
|
+
collapsed: false
|
|
6067
|
+
};
|
|
6068
|
+
const options = normalizeArguments({
|
|
5885
6069
|
logLevel,
|
|
5886
6070
|
message,
|
|
5887
6071
|
opts
|
|
@@ -5889,16 +6073,17 @@
|
|
|
5889
6073
|
const {
|
|
5890
6074
|
collapsed
|
|
5891
6075
|
} = opts;
|
|
5892
|
-
|
|
5893
|
-
return this._getLogFunction(
|
|
6076
|
+
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
6077
|
+
return this._getLogFunction(options);
|
|
5894
6078
|
}
|
|
5895
|
-
groupCollapsed(logLevel, message
|
|
6079
|
+
groupCollapsed(logLevel, message) {
|
|
6080
|
+
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
5896
6081
|
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
5897
6082
|
collapsed: true
|
|
5898
6083
|
}));
|
|
5899
6084
|
}
|
|
5900
6085
|
groupEnd(logLevel) {
|
|
5901
|
-
return this._getLogFunction(logLevel, "", console.groupEnd ||
|
|
6086
|
+
return this._getLogFunction(logLevel, "", console.groupEnd || noop);
|
|
5902
6087
|
}
|
|
5903
6088
|
withGroup(logLevel, message, func) {
|
|
5904
6089
|
this.group(logLevel, message)();
|
|
@@ -5916,7 +6101,7 @@
|
|
|
5916
6101
|
_shouldLog(logLevel) {
|
|
5917
6102
|
return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
|
|
5918
6103
|
}
|
|
5919
|
-
_getLogFunction(logLevel, message, method, args
|
|
6104
|
+
_getLogFunction(logLevel, message, method, args, opts) {
|
|
5920
6105
|
if (this._shouldLog(logLevel)) {
|
|
5921
6106
|
opts = normalizeArguments({
|
|
5922
6107
|
logLevel,
|
|
@@ -5934,57 +6119,27 @@
|
|
|
5934
6119
|
if (!cache[tag]) {
|
|
5935
6120
|
cache[tag] = getHiResTimestamp2();
|
|
5936
6121
|
} else {
|
|
5937
|
-
return
|
|
6122
|
+
return noop;
|
|
5938
6123
|
}
|
|
5939
6124
|
}
|
|
5940
6125
|
message = decorateMessage(this.id, opts.message, opts);
|
|
5941
6126
|
return method.bind(console, message, ...opts.args);
|
|
5942
6127
|
}
|
|
5943
|
-
return
|
|
6128
|
+
return noop;
|
|
5944
6129
|
}
|
|
5945
6130
|
};
|
|
5946
|
-
Log
|
|
5947
|
-
}
|
|
5948
|
-
});
|
|
5949
|
-
|
|
5950
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
5951
|
-
var init_hi_res_timestamp3 = __esm({
|
|
5952
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
|
|
5953
|
-
}
|
|
5954
|
-
});
|
|
5955
|
-
|
|
5956
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js
|
|
5957
|
-
var init_stat2 = __esm({
|
|
5958
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
|
|
5959
|
-
init_hi_res_timestamp3();
|
|
5960
|
-
}
|
|
5961
|
-
});
|
|
5962
|
-
|
|
5963
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js
|
|
5964
|
-
var init_stats2 = __esm({
|
|
5965
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
|
|
5966
|
-
init_stat2();
|
|
5967
|
-
}
|
|
5968
|
-
});
|
|
5969
|
-
|
|
5970
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js
|
|
5971
|
-
var init_esm5 = __esm({
|
|
5972
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js"() {
|
|
5973
|
-
init_stats2();
|
|
5974
|
-
init_stat2();
|
|
5975
|
-
init_hi_res_timestamp3();
|
|
6131
|
+
_defineProperty(Log, "VERSION", VERSION2);
|
|
5976
6132
|
}
|
|
5977
6133
|
});
|
|
5978
6134
|
|
|
5979
|
-
// ../../node_modules
|
|
6135
|
+
// ../../node_modules/@probe.gl/log/dist/esm/index.js
|
|
5980
6136
|
var esm_default;
|
|
5981
6137
|
var init_esm6 = __esm({
|
|
5982
|
-
"../../node_modules
|
|
6138
|
+
"../../node_modules/@probe.gl/log/dist/esm/index.js"() {
|
|
5983
6139
|
init_log();
|
|
5984
6140
|
init_log();
|
|
5985
|
-
init_esm5();
|
|
5986
6141
|
esm_default = new Log({
|
|
5987
|
-
id: "probe.gl"
|
|
6142
|
+
id: "@probe.gl/log"
|
|
5988
6143
|
});
|
|
5989
6144
|
}
|
|
5990
6145
|
});
|
|
@@ -6060,822 +6215,199 @@
|
|
|
6060
6215
|
};
|
|
6061
6216
|
REMOVED_LOADER_OPTIONS = {
|
|
6062
6217
|
throws: "nothrow",
|
|
6063
|
-
dataType: "(no longer used)",
|
|
6064
|
-
uri: "baseUri",
|
|
6065
|
-
method: "fetch.method",
|
|
6066
|
-
headers: "fetch.headers",
|
|
6067
|
-
body: "fetch.body",
|
|
6068
|
-
mode: "fetch.mode",
|
|
6069
|
-
credentials: "fetch.credentials",
|
|
6070
|
-
cache: "fetch.cache",
|
|
6071
|
-
redirect: "fetch.redirect",
|
|
6072
|
-
referrer: "fetch.referrer",
|
|
6073
|
-
referrerPolicy: "fetch.referrerPolicy",
|
|
6074
|
-
integrity: "fetch.integrity",
|
|
6075
|
-
keepalive: "fetch.keepalive",
|
|
6076
|
-
signal: "fetch.signal"
|
|
6077
|
-
};
|
|
6078
|
-
}
|
|
6079
|
-
});
|
|
6080
|
-
|
|
6081
|
-
// ../core/src/lib/loader-utils/option-utils.ts
|
|
6082
|
-
function getGlobalLoaderState() {
|
|
6083
|
-
globalThis.loaders = globalThis.loaders || {};
|
|
6084
|
-
const { loaders } = globalThis;
|
|
6085
|
-
loaders._state = loaders._state || {};
|
|
6086
|
-
return loaders._state;
|
|
6087
|
-
}
|
|
6088
|
-
function normalizeOptions(options, loader, loaders, url) {
|
|
6089
|
-
loaders = loaders || [];
|
|
6090
|
-
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
6091
|
-
validateOptions(options, loaders);
|
|
6092
|
-
return normalizeOptionsInternal(loader, options, url);
|
|
6093
|
-
}
|
|
6094
|
-
function getFetchFunction(options, context) {
|
|
6095
|
-
const globalOptions = getGlobalLoaderOptions();
|
|
6096
|
-
const fetchOptions = options || globalOptions;
|
|
6097
|
-
if (typeof fetchOptions.fetch === "function") {
|
|
6098
|
-
return fetchOptions.fetch;
|
|
6099
|
-
}
|
|
6100
|
-
if (isObject(fetchOptions.fetch)) {
|
|
6101
|
-
return (url) => fetchFile(url, fetchOptions);
|
|
6102
|
-
}
|
|
6103
|
-
if (context?.fetch) {
|
|
6104
|
-
return context?.fetch;
|
|
6105
|
-
}
|
|
6106
|
-
return fetchFile;
|
|
6107
|
-
}
|
|
6108
|
-
function validateOptions(options, loaders) {
|
|
6109
|
-
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
6110
|
-
for (const loader of loaders) {
|
|
6111
|
-
const idOptions = options && options[loader.id] || {};
|
|
6112
|
-
const loaderOptions = loader.options && loader.options[loader.id] || {};
|
|
6113
|
-
const deprecatedOptions = loader.deprecatedOptions && loader.deprecatedOptions[loader.id] || {};
|
|
6114
|
-
validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);
|
|
6115
|
-
}
|
|
6116
|
-
}
|
|
6117
|
-
function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, loaders) {
|
|
6118
|
-
const loaderName = id || "Top level";
|
|
6119
|
-
const prefix = id ? `${id}.` : "";
|
|
6120
|
-
for (const key in options) {
|
|
6121
|
-
const isSubOptions = !id && isObject(options[key]);
|
|
6122
|
-
const isBaseUriOption = key === "baseUri" && !id;
|
|
6123
|
-
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
6124
|
-
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
6125
|
-
if (key in deprecatedOptions) {
|
|
6126
|
-
probeLog.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
6127
|
-
} else if (!isSubOptions) {
|
|
6128
|
-
const suggestion = findSimilarOption(key, loaders);
|
|
6129
|
-
probeLog.warn(`${loaderName} loader option '${prefix}${key}' not recognized. ${suggestion}`)();
|
|
6130
|
-
}
|
|
6131
|
-
}
|
|
6132
|
-
}
|
|
6133
|
-
}
|
|
6134
|
-
function findSimilarOption(optionKey, loaders) {
|
|
6135
|
-
const lowerCaseOptionKey = optionKey.toLowerCase();
|
|
6136
|
-
let bestSuggestion = "";
|
|
6137
|
-
for (const loader of loaders) {
|
|
6138
|
-
for (const key in loader.options) {
|
|
6139
|
-
if (optionKey === key) {
|
|
6140
|
-
return `Did you mean '${loader.id}.${key}'?`;
|
|
6141
|
-
}
|
|
6142
|
-
const lowerCaseKey = key.toLowerCase();
|
|
6143
|
-
const isPartialMatch = lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);
|
|
6144
|
-
if (isPartialMatch) {
|
|
6145
|
-
bestSuggestion = bestSuggestion || `Did you mean '${loader.id}.${key}'?`;
|
|
6146
|
-
}
|
|
6147
|
-
}
|
|
6148
|
-
}
|
|
6149
|
-
return bestSuggestion;
|
|
6150
|
-
}
|
|
6151
|
-
function normalizeOptionsInternal(loader, options, url) {
|
|
6152
|
-
const loaderDefaultOptions = loader.options || {};
|
|
6153
|
-
const mergedOptions = { ...loaderDefaultOptions };
|
|
6154
|
-
addUrlOptions(mergedOptions, url);
|
|
6155
|
-
if (mergedOptions.log === null) {
|
|
6156
|
-
mergedOptions.log = new NullLog();
|
|
6157
|
-
}
|
|
6158
|
-
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
6159
|
-
mergeNestedFields(mergedOptions, options);
|
|
6160
|
-
return mergedOptions;
|
|
6161
|
-
}
|
|
6162
|
-
function mergeNestedFields(mergedOptions, options) {
|
|
6163
|
-
for (const key in options) {
|
|
6164
|
-
if (key in options) {
|
|
6165
|
-
const value = options[key];
|
|
6166
|
-
if (isPureObject(value) && isPureObject(mergedOptions[key])) {
|
|
6167
|
-
mergedOptions[key] = {
|
|
6168
|
-
...mergedOptions[key],
|
|
6169
|
-
...options[key]
|
|
6170
|
-
};
|
|
6171
|
-
} else {
|
|
6172
|
-
mergedOptions[key] = options[key];
|
|
6173
|
-
}
|
|
6174
|
-
}
|
|
6175
|
-
}
|
|
6176
|
-
}
|
|
6177
|
-
function addUrlOptions(options, url) {
|
|
6178
|
-
if (url && !("baseUri" in options)) {
|
|
6179
|
-
options.baseUri = url;
|
|
6180
|
-
}
|
|
6181
|
-
}
|
|
6182
|
-
var getGlobalLoaderOptions;
|
|
6183
|
-
var init_option_utils = __esm({
|
|
6184
|
-
"../core/src/lib/loader-utils/option-utils.ts"() {
|
|
6185
|
-
init_is_type();
|
|
6186
|
-
init_fetch_file();
|
|
6187
|
-
init_loggers();
|
|
6188
|
-
init_option_defaults();
|
|
6189
|
-
getGlobalLoaderOptions = () => {
|
|
6190
|
-
const state = getGlobalLoaderState();
|
|
6191
|
-
state.globalOptions = state.globalOptions || { ...DEFAULT_LOADER_OPTIONS };
|
|
6192
|
-
return state.globalOptions;
|
|
6193
|
-
};
|
|
6194
|
-
}
|
|
6195
|
-
});
|
|
6196
|
-
|
|
6197
|
-
// ../core/src/lib/loader-utils/normalize-loader.ts
|
|
6198
|
-
function isLoaderObject(loader) {
|
|
6199
|
-
if (!loader) {
|
|
6200
|
-
return false;
|
|
6201
|
-
}
|
|
6202
|
-
if (Array.isArray(loader)) {
|
|
6203
|
-
loader = loader[0];
|
|
6204
|
-
}
|
|
6205
|
-
const hasExtensions = Array.isArray(loader?.extensions);
|
|
6206
|
-
return hasExtensions;
|
|
6207
|
-
}
|
|
6208
|
-
function normalizeLoader(loader) {
|
|
6209
|
-
assert2(loader, "null loader");
|
|
6210
|
-
assert2(isLoaderObject(loader), "invalid loader");
|
|
6211
|
-
let options;
|
|
6212
|
-
if (Array.isArray(loader)) {
|
|
6213
|
-
options = loader[1];
|
|
6214
|
-
loader = loader[0];
|
|
6215
|
-
loader = {
|
|
6216
|
-
...loader,
|
|
6217
|
-
options: { ...loader.options, ...options }
|
|
6218
|
-
};
|
|
6219
|
-
}
|
|
6220
|
-
if (loader?.parseTextSync || loader?.parseText) {
|
|
6221
|
-
loader.text = true;
|
|
6222
|
-
}
|
|
6223
|
-
if (!loader.text) {
|
|
6224
|
-
loader.binary = true;
|
|
6225
|
-
}
|
|
6226
|
-
return loader;
|
|
6227
|
-
}
|
|
6228
|
-
var init_normalize_loader = __esm({
|
|
6229
|
-
"../core/src/lib/loader-utils/normalize-loader.ts"() {
|
|
6230
|
-
init_src2();
|
|
6231
|
-
}
|
|
6232
|
-
});
|
|
6233
|
-
|
|
6234
|
-
// ../core/src/lib/api/register-loaders.ts
|
|
6235
|
-
function getRegisteredLoaders() {
|
|
6236
|
-
return getGlobalLoaderRegistry();
|
|
6237
|
-
}
|
|
6238
|
-
var getGlobalLoaderRegistry;
|
|
6239
|
-
var init_register_loaders = __esm({
|
|
6240
|
-
"../core/src/lib/api/register-loaders.ts"() {
|
|
6241
|
-
init_option_utils();
|
|
6242
|
-
getGlobalLoaderRegistry = () => {
|
|
6243
|
-
const state = getGlobalLoaderState();
|
|
6244
|
-
state.loaderRegistry = state.loaderRegistry || [];
|
|
6245
|
-
return state.loaderRegistry;
|
|
6246
|
-
};
|
|
6247
|
-
}
|
|
6248
|
-
});
|
|
6249
|
-
|
|
6250
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
6251
|
-
function isElectron2(mockUserAgent) {
|
|
6252
|
-
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
6253
|
-
return true;
|
|
6254
|
-
}
|
|
6255
|
-
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions.electron)) {
|
|
6256
|
-
return true;
|
|
6257
|
-
}
|
|
6258
|
-
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
6259
|
-
const userAgent = mockUserAgent || realUserAgent;
|
|
6260
|
-
if (userAgent && userAgent.indexOf("Electron") >= 0) {
|
|
6261
|
-
return true;
|
|
6262
|
-
}
|
|
6263
|
-
return false;
|
|
6264
|
-
}
|
|
6265
|
-
var init_is_electron2 = __esm({
|
|
6266
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
6267
|
-
}
|
|
6268
|
-
});
|
|
6269
|
-
|
|
6270
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
6271
|
-
function isBrowser5() {
|
|
6272
|
-
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
6273
|
-
return !isNode || isElectron2();
|
|
6274
|
-
}
|
|
6275
|
-
var init_is_browser2 = __esm({
|
|
6276
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
6277
|
-
init_is_electron2();
|
|
6278
|
-
}
|
|
6279
|
-
});
|
|
6280
|
-
|
|
6281
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
6282
|
-
var globals5, self_4, window_4, document_4, process_2;
|
|
6283
|
-
var init_globals5 = __esm({
|
|
6284
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
6285
|
-
globals5 = {
|
|
6286
|
-
self: typeof self !== "undefined" && self,
|
|
6287
|
-
window: typeof window !== "undefined" && window,
|
|
6288
|
-
global: typeof global !== "undefined" && global,
|
|
6289
|
-
document: typeof document !== "undefined" && document,
|
|
6290
|
-
process: typeof process === "object" && process
|
|
6291
|
-
};
|
|
6292
|
-
self_4 = globals5.self || globals5.window || globals5.global;
|
|
6293
|
-
window_4 = globals5.window || globals5.self || globals5.global;
|
|
6294
|
-
document_4 = globals5.document || {};
|
|
6295
|
-
process_2 = globals5.process || {};
|
|
6296
|
-
}
|
|
6297
|
-
});
|
|
6298
|
-
|
|
6299
|
-
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
6300
|
-
var VERSION3, isBrowser6;
|
|
6301
|
-
var init_globals6 = __esm({
|
|
6302
|
-
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
6303
|
-
init_is_browser2();
|
|
6304
|
-
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
6305
|
-
isBrowser6 = isBrowser5();
|
|
6306
|
-
}
|
|
6307
|
-
});
|
|
6308
|
-
|
|
6309
|
-
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
6310
|
-
var init_esm7 = __esm({
|
|
6311
|
-
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
6312
|
-
init_globals6();
|
|
6313
|
-
init_globals5();
|
|
6314
|
-
init_is_browser2();
|
|
6315
|
-
}
|
|
6316
|
-
});
|
|
6317
|
-
|
|
6318
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
6319
|
-
function getStorage2(type) {
|
|
6320
|
-
try {
|
|
6321
|
-
const storage = window[type];
|
|
6322
|
-
const x = "__storage_test__";
|
|
6323
|
-
storage.setItem(x, x);
|
|
6324
|
-
storage.removeItem(x);
|
|
6325
|
-
return storage;
|
|
6326
|
-
} catch (e) {
|
|
6327
|
-
return null;
|
|
6328
|
-
}
|
|
6329
|
-
}
|
|
6330
|
-
var LocalStorage2;
|
|
6331
|
-
var init_local_storage2 = __esm({
|
|
6332
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
6333
|
-
init_defineProperty();
|
|
6334
|
-
LocalStorage2 = class {
|
|
6335
|
-
constructor(id) {
|
|
6336
|
-
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6337
|
-
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
6338
|
-
_defineProperty(this, "storage", void 0);
|
|
6339
|
-
_defineProperty(this, "id", void 0);
|
|
6340
|
-
_defineProperty(this, "config", {});
|
|
6341
|
-
this.storage = getStorage2(type);
|
|
6342
|
-
this.id = id;
|
|
6343
|
-
this.config = {};
|
|
6344
|
-
Object.assign(this.config, defaultSettings);
|
|
6345
|
-
this._loadConfiguration();
|
|
6346
|
-
}
|
|
6347
|
-
getConfiguration() {
|
|
6348
|
-
return this.config;
|
|
6349
|
-
}
|
|
6350
|
-
setConfiguration(configuration) {
|
|
6351
|
-
this.config = {};
|
|
6352
|
-
return this.updateConfiguration(configuration);
|
|
6353
|
-
}
|
|
6354
|
-
updateConfiguration(configuration) {
|
|
6355
|
-
Object.assign(this.config, configuration);
|
|
6356
|
-
if (this.storage) {
|
|
6357
|
-
const serialized = JSON.stringify(this.config);
|
|
6358
|
-
this.storage.setItem(this.id, serialized);
|
|
6359
|
-
}
|
|
6360
|
-
return this;
|
|
6361
|
-
}
|
|
6362
|
-
_loadConfiguration() {
|
|
6363
|
-
let configuration = {};
|
|
6364
|
-
if (this.storage) {
|
|
6365
|
-
const serializedConfiguration = this.storage.getItem(this.id);
|
|
6366
|
-
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
6367
|
-
}
|
|
6368
|
-
Object.assign(this.config, configuration);
|
|
6369
|
-
return this;
|
|
6370
|
-
}
|
|
6371
|
-
};
|
|
6372
|
-
}
|
|
6373
|
-
});
|
|
6374
|
-
|
|
6375
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
6376
|
-
function formatTime2(ms) {
|
|
6377
|
-
let formatted;
|
|
6378
|
-
if (ms < 10) {
|
|
6379
|
-
formatted = "".concat(ms.toFixed(2), "ms");
|
|
6380
|
-
} else if (ms < 100) {
|
|
6381
|
-
formatted = "".concat(ms.toFixed(1), "ms");
|
|
6382
|
-
} else if (ms < 1e3) {
|
|
6383
|
-
formatted = "".concat(ms.toFixed(0), "ms");
|
|
6384
|
-
} else {
|
|
6385
|
-
formatted = "".concat((ms / 1e3).toFixed(2), "s");
|
|
6386
|
-
}
|
|
6387
|
-
return formatted;
|
|
6388
|
-
}
|
|
6389
|
-
function leftPad2(string) {
|
|
6390
|
-
let length4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
|
|
6391
|
-
const padLength = Math.max(length4 - string.length, 0);
|
|
6392
|
-
return "".concat(" ".repeat(padLength)).concat(string);
|
|
6393
|
-
}
|
|
6394
|
-
function formatImage2(image, message, scale5) {
|
|
6395
|
-
let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
|
|
6396
|
-
const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
6397
|
-
if (image.width > maxWidth) {
|
|
6398
|
-
scale5 = Math.min(scale5, maxWidth / image.width);
|
|
6399
|
-
}
|
|
6400
|
-
const width = image.width * scale5;
|
|
6401
|
-
const height = image.height * scale5;
|
|
6402
|
-
const style = ["font-size:1px;", "padding:".concat(Math.floor(height / 2), "px ").concat(Math.floor(width / 2), "px;"), "line-height:".concat(height, "px;"), "background:url(".concat(imageUrl, ");"), "background-size:".concat(width, "px ").concat(height, "px;"), "color:transparent;"].join("");
|
|
6403
|
-
return ["".concat(message, " %c+"), style];
|
|
6404
|
-
}
|
|
6405
|
-
var init_formatters2 = __esm({
|
|
6406
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
6407
|
-
}
|
|
6408
|
-
});
|
|
6409
|
-
|
|
6410
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
6411
|
-
function getColor2(color) {
|
|
6412
|
-
return typeof color === "string" ? COLOR2[color.toUpperCase()] || COLOR2.WHITE : color;
|
|
6413
|
-
}
|
|
6414
|
-
function addColor2(string, color, background) {
|
|
6415
|
-
if (!isBrowser5 && typeof string === "string") {
|
|
6416
|
-
if (color) {
|
|
6417
|
-
color = getColor2(color);
|
|
6418
|
-
string = "[".concat(color, "m").concat(string, "[39m");
|
|
6419
|
-
}
|
|
6420
|
-
if (background) {
|
|
6421
|
-
color = getColor2(background);
|
|
6422
|
-
string = "[".concat(background + 10, "m").concat(string, "[49m");
|
|
6423
|
-
}
|
|
6424
|
-
}
|
|
6425
|
-
return string;
|
|
6426
|
-
}
|
|
6427
|
-
var COLOR2;
|
|
6428
|
-
var init_color2 = __esm({
|
|
6429
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
6430
|
-
init_esm7();
|
|
6431
|
-
(function(COLOR3) {
|
|
6432
|
-
COLOR3[COLOR3["BLACK"] = 30] = "BLACK";
|
|
6433
|
-
COLOR3[COLOR3["RED"] = 31] = "RED";
|
|
6434
|
-
COLOR3[COLOR3["GREEN"] = 32] = "GREEN";
|
|
6435
|
-
COLOR3[COLOR3["YELLOW"] = 33] = "YELLOW";
|
|
6436
|
-
COLOR3[COLOR3["BLUE"] = 34] = "BLUE";
|
|
6437
|
-
COLOR3[COLOR3["MAGENTA"] = 35] = "MAGENTA";
|
|
6438
|
-
COLOR3[COLOR3["CYAN"] = 36] = "CYAN";
|
|
6439
|
-
COLOR3[COLOR3["WHITE"] = 37] = "WHITE";
|
|
6440
|
-
COLOR3[COLOR3["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
6441
|
-
COLOR3[COLOR3["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
6442
|
-
COLOR3[COLOR3["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
6443
|
-
COLOR3[COLOR3["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
6444
|
-
COLOR3[COLOR3["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
6445
|
-
COLOR3[COLOR3["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
6446
|
-
COLOR3[COLOR3["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
6447
|
-
COLOR3[COLOR3["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
6448
|
-
})(COLOR2 || (COLOR2 = {}));
|
|
6449
|
-
}
|
|
6450
|
-
});
|
|
6451
|
-
|
|
6452
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
6453
|
-
function autobind2(obj) {
|
|
6454
|
-
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
6455
|
-
const proto = Object.getPrototypeOf(obj);
|
|
6456
|
-
const propNames = Object.getOwnPropertyNames(proto);
|
|
6457
|
-
for (const key of propNames) {
|
|
6458
|
-
if (typeof obj[key] === "function") {
|
|
6459
|
-
if (!predefined.find((name) => key === name)) {
|
|
6460
|
-
obj[key] = obj[key].bind(obj);
|
|
6461
|
-
}
|
|
6462
|
-
}
|
|
6463
|
-
}
|
|
6464
|
-
}
|
|
6465
|
-
var init_autobind2 = __esm({
|
|
6466
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
6467
|
-
}
|
|
6468
|
-
});
|
|
6469
|
-
|
|
6470
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
6471
|
-
function assert5(condition, message) {
|
|
6472
|
-
if (!condition) {
|
|
6473
|
-
throw new Error(message || "Assertion failed");
|
|
6474
|
-
}
|
|
6475
|
-
}
|
|
6476
|
-
var init_assert5 = __esm({
|
|
6477
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
6478
|
-
}
|
|
6479
|
-
});
|
|
6480
|
-
|
|
6481
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
6482
|
-
function getHiResTimestamp4() {
|
|
6483
|
-
let timestamp;
|
|
6484
|
-
if (isBrowser5 && "performance" in window_4) {
|
|
6485
|
-
var _window$performance, _window$performance$n;
|
|
6486
|
-
timestamp = window_4 === null || window_4 === void 0 ? void 0 : (_window$performance = window_4.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
|
|
6487
|
-
} else if ("hrtime" in process_2) {
|
|
6488
|
-
var _process$hrtime;
|
|
6489
|
-
const timeParts = process_2 === null || process_2 === void 0 ? void 0 : (_process$hrtime = process_2.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_2);
|
|
6490
|
-
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
6491
|
-
} else {
|
|
6492
|
-
timestamp = Date.now();
|
|
6493
|
-
}
|
|
6494
|
-
return timestamp;
|
|
6495
|
-
}
|
|
6496
|
-
var init_hi_res_timestamp4 = __esm({
|
|
6497
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
6498
|
-
init_esm7();
|
|
6499
|
-
}
|
|
6500
|
-
});
|
|
6501
|
-
|
|
6502
|
-
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
6503
|
-
function noop3() {
|
|
6504
|
-
}
|
|
6505
|
-
function normalizeLogLevel2(logLevel) {
|
|
6506
|
-
if (!logLevel) {
|
|
6507
|
-
return 0;
|
|
6508
|
-
}
|
|
6509
|
-
let resolvedLevel;
|
|
6510
|
-
switch (typeof logLevel) {
|
|
6511
|
-
case "number":
|
|
6512
|
-
resolvedLevel = logLevel;
|
|
6513
|
-
break;
|
|
6514
|
-
case "object":
|
|
6515
|
-
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
6516
|
-
break;
|
|
6517
|
-
default:
|
|
6518
|
-
return 0;
|
|
6519
|
-
}
|
|
6520
|
-
assert5(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
6521
|
-
return resolvedLevel;
|
|
6522
|
-
}
|
|
6523
|
-
function normalizeArguments2(opts) {
|
|
6524
|
-
const {
|
|
6525
|
-
logLevel,
|
|
6526
|
-
message
|
|
6527
|
-
} = opts;
|
|
6528
|
-
opts.logLevel = normalizeLogLevel2(logLevel);
|
|
6529
|
-
const args = opts.args ? Array.from(opts.args) : [];
|
|
6530
|
-
while (args.length && args.shift() !== message) {
|
|
6531
|
-
}
|
|
6532
|
-
switch (typeof logLevel) {
|
|
6533
|
-
case "string":
|
|
6534
|
-
case "function":
|
|
6535
|
-
if (message !== void 0) {
|
|
6536
|
-
args.unshift(message);
|
|
6537
|
-
}
|
|
6538
|
-
opts.message = logLevel;
|
|
6539
|
-
break;
|
|
6540
|
-
case "object":
|
|
6541
|
-
Object.assign(opts, logLevel);
|
|
6542
|
-
break;
|
|
6543
|
-
default:
|
|
6544
|
-
}
|
|
6545
|
-
if (typeof opts.message === "function") {
|
|
6546
|
-
opts.message = opts.message();
|
|
6547
|
-
}
|
|
6548
|
-
const messageType = typeof opts.message;
|
|
6549
|
-
assert5(messageType === "string" || messageType === "object");
|
|
6550
|
-
return Object.assign(opts, {
|
|
6551
|
-
args
|
|
6552
|
-
}, opts.opts);
|
|
6553
|
-
}
|
|
6554
|
-
function decorateMessage2(id, message, opts) {
|
|
6555
|
-
if (typeof message === "string") {
|
|
6556
|
-
const time = opts.time ? leftPad2(formatTime2(opts.total)) : "";
|
|
6557
|
-
message = opts.time ? "".concat(id, ": ").concat(time, " ").concat(message) : "".concat(id, ": ").concat(message);
|
|
6558
|
-
message = addColor2(message, opts.color, opts.background);
|
|
6559
|
-
}
|
|
6560
|
-
return message;
|
|
6561
|
-
}
|
|
6562
|
-
function logImageInNode2(_ref2) {
|
|
6563
|
-
let {
|
|
6564
|
-
image,
|
|
6565
|
-
message = "",
|
|
6566
|
-
scale: scale5 = 1
|
|
6567
|
-
} = _ref2;
|
|
6568
|
-
let asciify = null;
|
|
6569
|
-
try {
|
|
6570
|
-
asciify = module.require("asciify-image");
|
|
6571
|
-
} catch (error) {
|
|
6572
|
-
}
|
|
6573
|
-
if (asciify) {
|
|
6574
|
-
return () => asciify(image, {
|
|
6575
|
-
fit: "box",
|
|
6576
|
-
width: "".concat(Math.round(80 * scale5), "%")
|
|
6577
|
-
}).then((data) => console.log(data));
|
|
6578
|
-
}
|
|
6579
|
-
return noop3;
|
|
6580
|
-
}
|
|
6581
|
-
function logImageInBrowser2(_ref3) {
|
|
6582
|
-
let {
|
|
6583
|
-
image,
|
|
6584
|
-
message = "",
|
|
6585
|
-
scale: scale5 = 1
|
|
6586
|
-
} = _ref3;
|
|
6587
|
-
if (typeof image === "string") {
|
|
6588
|
-
const img = new Image();
|
|
6589
|
-
img.onload = () => {
|
|
6590
|
-
const args = formatImage2(img, message, scale5);
|
|
6591
|
-
console.log(...args);
|
|
6592
|
-
};
|
|
6593
|
-
img.src = image;
|
|
6594
|
-
return noop3;
|
|
6595
|
-
}
|
|
6596
|
-
const element = image.nodeName || "";
|
|
6597
|
-
if (element.toLowerCase() === "img") {
|
|
6598
|
-
console.log(...formatImage2(image, message, scale5));
|
|
6599
|
-
return noop3;
|
|
6600
|
-
}
|
|
6601
|
-
if (element.toLowerCase() === "canvas") {
|
|
6602
|
-
const img = new Image();
|
|
6603
|
-
img.onload = () => console.log(...formatImage2(img, message, scale5));
|
|
6604
|
-
img.src = image.toDataURL();
|
|
6605
|
-
return noop3;
|
|
6606
|
-
}
|
|
6607
|
-
return noop3;
|
|
6608
|
-
}
|
|
6609
|
-
function getTableHeader2(table) {
|
|
6610
|
-
for (const key in table) {
|
|
6611
|
-
for (const title in table[key]) {
|
|
6612
|
-
return title || "untitled";
|
|
6613
|
-
}
|
|
6614
|
-
}
|
|
6615
|
-
return "empty";
|
|
6616
|
-
}
|
|
6617
|
-
var originalConsole2, DEFAULT_SETTINGS2, cache2, ONCE2, Log2;
|
|
6618
|
-
var init_log2 = __esm({
|
|
6619
|
-
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
6620
|
-
init_defineProperty();
|
|
6621
|
-
init_esm7();
|
|
6622
|
-
init_local_storage2();
|
|
6623
|
-
init_formatters2();
|
|
6624
|
-
init_color2();
|
|
6625
|
-
init_autobind2();
|
|
6626
|
-
init_assert5();
|
|
6627
|
-
init_hi_res_timestamp4();
|
|
6628
|
-
originalConsole2 = {
|
|
6629
|
-
debug: isBrowser5 ? console.debug || console.log : console.log,
|
|
6630
|
-
log: console.log,
|
|
6631
|
-
info: console.info,
|
|
6632
|
-
warn: console.warn,
|
|
6633
|
-
error: console.error
|
|
6634
|
-
};
|
|
6635
|
-
DEFAULT_SETTINGS2 = {
|
|
6636
|
-
enabled: true,
|
|
6637
|
-
level: 0
|
|
6638
|
-
};
|
|
6639
|
-
cache2 = {};
|
|
6640
|
-
ONCE2 = {
|
|
6641
|
-
once: true
|
|
6642
|
-
};
|
|
6643
|
-
Log2 = class {
|
|
6644
|
-
constructor() {
|
|
6645
|
-
let {
|
|
6646
|
-
id
|
|
6647
|
-
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
6648
|
-
id: ""
|
|
6649
|
-
};
|
|
6650
|
-
_defineProperty(this, "id", void 0);
|
|
6651
|
-
_defineProperty(this, "VERSION", VERSION3);
|
|
6652
|
-
_defineProperty(this, "_startTs", getHiResTimestamp4());
|
|
6653
|
-
_defineProperty(this, "_deltaTs", getHiResTimestamp4());
|
|
6654
|
-
_defineProperty(this, "_storage", void 0);
|
|
6655
|
-
_defineProperty(this, "userData", {});
|
|
6656
|
-
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
6657
|
-
this.id = id;
|
|
6658
|
-
this._storage = new LocalStorage2("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS2);
|
|
6659
|
-
this.userData = {};
|
|
6660
|
-
this.timeStamp("".concat(this.id, " started"));
|
|
6661
|
-
autobind2(this);
|
|
6662
|
-
Object.seal(this);
|
|
6663
|
-
}
|
|
6664
|
-
set level(newLevel) {
|
|
6665
|
-
this.setLevel(newLevel);
|
|
6666
|
-
}
|
|
6667
|
-
get level() {
|
|
6668
|
-
return this.getLevel();
|
|
6669
|
-
}
|
|
6670
|
-
isEnabled() {
|
|
6671
|
-
return this._storage.config.enabled;
|
|
6672
|
-
}
|
|
6673
|
-
getLevel() {
|
|
6674
|
-
return this._storage.config.level;
|
|
6675
|
-
}
|
|
6676
|
-
getTotal() {
|
|
6677
|
-
return Number((getHiResTimestamp4() - this._startTs).toPrecision(10));
|
|
6678
|
-
}
|
|
6679
|
-
getDelta() {
|
|
6680
|
-
return Number((getHiResTimestamp4() - this._deltaTs).toPrecision(10));
|
|
6681
|
-
}
|
|
6682
|
-
set priority(newPriority) {
|
|
6683
|
-
this.level = newPriority;
|
|
6684
|
-
}
|
|
6685
|
-
get priority() {
|
|
6686
|
-
return this.level;
|
|
6687
|
-
}
|
|
6688
|
-
getPriority() {
|
|
6689
|
-
return this.level;
|
|
6690
|
-
}
|
|
6691
|
-
enable() {
|
|
6692
|
-
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
6693
|
-
this._storage.updateConfiguration({
|
|
6694
|
-
enabled
|
|
6695
|
-
});
|
|
6696
|
-
return this;
|
|
6697
|
-
}
|
|
6698
|
-
setLevel(level) {
|
|
6699
|
-
this._storage.updateConfiguration({
|
|
6700
|
-
level
|
|
6701
|
-
});
|
|
6702
|
-
return this;
|
|
6703
|
-
}
|
|
6704
|
-
get(setting) {
|
|
6705
|
-
return this._storage.config[setting];
|
|
6706
|
-
}
|
|
6707
|
-
set(setting, value) {
|
|
6708
|
-
this._storage.updateConfiguration({
|
|
6709
|
-
[setting]: value
|
|
6710
|
-
});
|
|
6711
|
-
}
|
|
6712
|
-
settings() {
|
|
6713
|
-
if (console.table) {
|
|
6714
|
-
console.table(this._storage.config);
|
|
6715
|
-
} else {
|
|
6716
|
-
console.log(this._storage.config);
|
|
6717
|
-
}
|
|
6718
|
-
}
|
|
6719
|
-
assert(condition, message) {
|
|
6720
|
-
assert5(condition, message);
|
|
6721
|
-
}
|
|
6722
|
-
warn(message) {
|
|
6723
|
-
return this._getLogFunction(0, message, originalConsole2.warn, arguments, ONCE2);
|
|
6724
|
-
}
|
|
6725
|
-
error(message) {
|
|
6726
|
-
return this._getLogFunction(0, message, originalConsole2.error, arguments);
|
|
6727
|
-
}
|
|
6728
|
-
deprecated(oldUsage, newUsage) {
|
|
6729
|
-
return this.warn("`".concat(oldUsage, "` is deprecated and will be removed in a later version. Use `").concat(newUsage, "` instead"));
|
|
6730
|
-
}
|
|
6731
|
-
removed(oldUsage, newUsage) {
|
|
6732
|
-
return this.error("`".concat(oldUsage, "` has been removed. Use `").concat(newUsage, "` instead"));
|
|
6733
|
-
}
|
|
6734
|
-
probe(logLevel, message) {
|
|
6735
|
-
return this._getLogFunction(logLevel, message, originalConsole2.log, arguments, {
|
|
6736
|
-
time: true,
|
|
6737
|
-
once: true
|
|
6738
|
-
});
|
|
6739
|
-
}
|
|
6740
|
-
log(logLevel, message) {
|
|
6741
|
-
return this._getLogFunction(logLevel, message, originalConsole2.debug, arguments);
|
|
6742
|
-
}
|
|
6743
|
-
info(logLevel, message) {
|
|
6744
|
-
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
6745
|
-
}
|
|
6746
|
-
once(logLevel, message) {
|
|
6747
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
6748
|
-
args[_key - 2] = arguments[_key];
|
|
6749
|
-
}
|
|
6750
|
-
return this._getLogFunction(logLevel, message, originalConsole2.debug || originalConsole2.info, arguments, ONCE2);
|
|
6751
|
-
}
|
|
6752
|
-
table(logLevel, table, columns) {
|
|
6753
|
-
if (table) {
|
|
6754
|
-
return this._getLogFunction(logLevel, table, console.table || noop3, columns && [columns], {
|
|
6755
|
-
tag: getTableHeader2(table)
|
|
6756
|
-
});
|
|
6757
|
-
}
|
|
6758
|
-
return noop3;
|
|
6759
|
-
}
|
|
6760
|
-
image(_ref) {
|
|
6761
|
-
let {
|
|
6762
|
-
logLevel,
|
|
6763
|
-
priority,
|
|
6764
|
-
image,
|
|
6765
|
-
message = "",
|
|
6766
|
-
scale: scale5 = 1
|
|
6767
|
-
} = _ref;
|
|
6768
|
-
if (!this._shouldLog(logLevel || priority)) {
|
|
6769
|
-
return noop3;
|
|
6770
|
-
}
|
|
6771
|
-
return isBrowser5 ? logImageInBrowser2({
|
|
6772
|
-
image,
|
|
6773
|
-
message,
|
|
6774
|
-
scale: scale5
|
|
6775
|
-
}) : logImageInNode2({
|
|
6776
|
-
image,
|
|
6777
|
-
message,
|
|
6778
|
-
scale: scale5
|
|
6779
|
-
});
|
|
6780
|
-
}
|
|
6781
|
-
time(logLevel, message) {
|
|
6782
|
-
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
6218
|
+
dataType: "(no longer used)",
|
|
6219
|
+
uri: "baseUri",
|
|
6220
|
+
method: "fetch.method",
|
|
6221
|
+
headers: "fetch.headers",
|
|
6222
|
+
body: "fetch.body",
|
|
6223
|
+
mode: "fetch.mode",
|
|
6224
|
+
credentials: "fetch.credentials",
|
|
6225
|
+
cache: "fetch.cache",
|
|
6226
|
+
redirect: "fetch.redirect",
|
|
6227
|
+
referrer: "fetch.referrer",
|
|
6228
|
+
referrerPolicy: "fetch.referrerPolicy",
|
|
6229
|
+
integrity: "fetch.integrity",
|
|
6230
|
+
keepalive: "fetch.keepalive",
|
|
6231
|
+
signal: "fetch.signal"
|
|
6232
|
+
};
|
|
6233
|
+
}
|
|
6234
|
+
});
|
|
6235
|
+
|
|
6236
|
+
// ../core/src/lib/loader-utils/option-utils.ts
|
|
6237
|
+
function getGlobalLoaderState() {
|
|
6238
|
+
globalThis.loaders = globalThis.loaders || {};
|
|
6239
|
+
const { loaders } = globalThis;
|
|
6240
|
+
loaders._state = loaders._state || {};
|
|
6241
|
+
return loaders._state;
|
|
6242
|
+
}
|
|
6243
|
+
function normalizeOptions(options, loader, loaders, url) {
|
|
6244
|
+
loaders = loaders || [];
|
|
6245
|
+
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
6246
|
+
validateOptions(options, loaders);
|
|
6247
|
+
return normalizeOptionsInternal(loader, options, url);
|
|
6248
|
+
}
|
|
6249
|
+
function getFetchFunction(options, context) {
|
|
6250
|
+
const globalOptions = getGlobalLoaderOptions();
|
|
6251
|
+
const fetchOptions = options || globalOptions;
|
|
6252
|
+
if (typeof fetchOptions.fetch === "function") {
|
|
6253
|
+
return fetchOptions.fetch;
|
|
6254
|
+
}
|
|
6255
|
+
if (isObject(fetchOptions.fetch)) {
|
|
6256
|
+
return (url) => fetchFile(url, fetchOptions);
|
|
6257
|
+
}
|
|
6258
|
+
if (context?.fetch) {
|
|
6259
|
+
return context?.fetch;
|
|
6260
|
+
}
|
|
6261
|
+
return fetchFile;
|
|
6262
|
+
}
|
|
6263
|
+
function validateOptions(options, loaders) {
|
|
6264
|
+
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
6265
|
+
for (const loader of loaders) {
|
|
6266
|
+
const idOptions = options && options[loader.id] || {};
|
|
6267
|
+
const loaderOptions = loader.options && loader.options[loader.id] || {};
|
|
6268
|
+
const deprecatedOptions = loader.deprecatedOptions && loader.deprecatedOptions[loader.id] || {};
|
|
6269
|
+
validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);
|
|
6270
|
+
}
|
|
6271
|
+
}
|
|
6272
|
+
function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, loaders) {
|
|
6273
|
+
const loaderName = id || "Top level";
|
|
6274
|
+
const prefix = id ? `${id}.` : "";
|
|
6275
|
+
for (const key in options) {
|
|
6276
|
+
const isSubOptions = !id && isObject(options[key]);
|
|
6277
|
+
const isBaseUriOption = key === "baseUri" && !id;
|
|
6278
|
+
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
6279
|
+
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
6280
|
+
if (key in deprecatedOptions) {
|
|
6281
|
+
probeLog.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
6282
|
+
} else if (!isSubOptions) {
|
|
6283
|
+
const suggestion = findSimilarOption(key, loaders);
|
|
6284
|
+
probeLog.warn(`${loaderName} loader option '${prefix}${key}' not recognized. ${suggestion}`)();
|
|
6783
6285
|
}
|
|
6784
|
-
|
|
6785
|
-
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
}
|
|
6289
|
+
function findSimilarOption(optionKey, loaders) {
|
|
6290
|
+
const lowerCaseOptionKey = optionKey.toLowerCase();
|
|
6291
|
+
let bestSuggestion = "";
|
|
6292
|
+
for (const loader of loaders) {
|
|
6293
|
+
for (const key in loader.options) {
|
|
6294
|
+
if (optionKey === key) {
|
|
6295
|
+
return `Did you mean '${loader.id}.${key}'?`;
|
|
6786
6296
|
}
|
|
6787
|
-
|
|
6788
|
-
|
|
6297
|
+
const lowerCaseKey = key.toLowerCase();
|
|
6298
|
+
const isPartialMatch = lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);
|
|
6299
|
+
if (isPartialMatch) {
|
|
6300
|
+
bestSuggestion = bestSuggestion || `Did you mean '${loader.id}.${key}'?`;
|
|
6789
6301
|
}
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6304
|
+
return bestSuggestion;
|
|
6305
|
+
}
|
|
6306
|
+
function normalizeOptionsInternal(loader, options, url) {
|
|
6307
|
+
const loaderDefaultOptions = loader.options || {};
|
|
6308
|
+
const mergedOptions = { ...loaderDefaultOptions };
|
|
6309
|
+
addUrlOptions(mergedOptions, url);
|
|
6310
|
+
if (mergedOptions.log === null) {
|
|
6311
|
+
mergedOptions.log = new NullLog();
|
|
6312
|
+
}
|
|
6313
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
6314
|
+
mergeNestedFields(mergedOptions, options);
|
|
6315
|
+
return mergedOptions;
|
|
6316
|
+
}
|
|
6317
|
+
function mergeNestedFields(mergedOptions, options) {
|
|
6318
|
+
for (const key in options) {
|
|
6319
|
+
if (key in options) {
|
|
6320
|
+
const value = options[key];
|
|
6321
|
+
if (isPureObject(value) && isPureObject(mergedOptions[key])) {
|
|
6322
|
+
mergedOptions[key] = {
|
|
6323
|
+
...mergedOptions[key],
|
|
6324
|
+
...options[key]
|
|
6793
6325
|
};
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
message,
|
|
6797
|
-
opts
|
|
6798
|
-
});
|
|
6799
|
-
const {
|
|
6800
|
-
collapsed
|
|
6801
|
-
} = opts;
|
|
6802
|
-
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
6803
|
-
return this._getLogFunction(options);
|
|
6804
|
-
}
|
|
6805
|
-
groupCollapsed(logLevel, message) {
|
|
6806
|
-
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6807
|
-
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
6808
|
-
collapsed: true
|
|
6809
|
-
}));
|
|
6810
|
-
}
|
|
6811
|
-
groupEnd(logLevel) {
|
|
6812
|
-
return this._getLogFunction(logLevel, "", console.groupEnd || noop3);
|
|
6813
|
-
}
|
|
6814
|
-
withGroup(logLevel, message, func) {
|
|
6815
|
-
this.group(logLevel, message)();
|
|
6816
|
-
try {
|
|
6817
|
-
func();
|
|
6818
|
-
} finally {
|
|
6819
|
-
this.groupEnd(logLevel)();
|
|
6820
|
-
}
|
|
6821
|
-
}
|
|
6822
|
-
trace() {
|
|
6823
|
-
if (console.trace) {
|
|
6824
|
-
console.trace();
|
|
6825
|
-
}
|
|
6826
|
-
}
|
|
6827
|
-
_shouldLog(logLevel) {
|
|
6828
|
-
return this.isEnabled() && this.getLevel() >= normalizeLogLevel2(logLevel);
|
|
6829
|
-
}
|
|
6830
|
-
_getLogFunction(logLevel, message, method, args, opts) {
|
|
6831
|
-
if (this._shouldLog(logLevel)) {
|
|
6832
|
-
opts = normalizeArguments2({
|
|
6833
|
-
logLevel,
|
|
6834
|
-
message,
|
|
6835
|
-
args,
|
|
6836
|
-
opts
|
|
6837
|
-
});
|
|
6838
|
-
method = method || opts.method;
|
|
6839
|
-
assert5(method);
|
|
6840
|
-
opts.total = this.getTotal();
|
|
6841
|
-
opts.delta = this.getDelta();
|
|
6842
|
-
this._deltaTs = getHiResTimestamp4();
|
|
6843
|
-
const tag = opts.tag || opts.message;
|
|
6844
|
-
if (opts.once) {
|
|
6845
|
-
if (!cache2[tag]) {
|
|
6846
|
-
cache2[tag] = getHiResTimestamp4();
|
|
6847
|
-
} else {
|
|
6848
|
-
return noop3;
|
|
6849
|
-
}
|
|
6850
|
-
}
|
|
6851
|
-
message = decorateMessage2(this.id, opts.message, opts);
|
|
6852
|
-
return method.bind(console, message, ...opts.args);
|
|
6853
|
-
}
|
|
6854
|
-
return noop3;
|
|
6326
|
+
} else {
|
|
6327
|
+
mergedOptions[key] = options[key];
|
|
6855
6328
|
}
|
|
6329
|
+
}
|
|
6330
|
+
}
|
|
6331
|
+
}
|
|
6332
|
+
function addUrlOptions(options, url) {
|
|
6333
|
+
if (url && !("baseUri" in options)) {
|
|
6334
|
+
options.baseUri = url;
|
|
6335
|
+
}
|
|
6336
|
+
}
|
|
6337
|
+
var getGlobalLoaderOptions;
|
|
6338
|
+
var init_option_utils = __esm({
|
|
6339
|
+
"../core/src/lib/loader-utils/option-utils.ts"() {
|
|
6340
|
+
init_is_type();
|
|
6341
|
+
init_fetch_file();
|
|
6342
|
+
init_loggers();
|
|
6343
|
+
init_option_defaults();
|
|
6344
|
+
getGlobalLoaderOptions = () => {
|
|
6345
|
+
const state = getGlobalLoaderState();
|
|
6346
|
+
state.globalOptions = state.globalOptions || { ...DEFAULT_LOADER_OPTIONS };
|
|
6347
|
+
return state.globalOptions;
|
|
6856
6348
|
};
|
|
6857
|
-
_defineProperty(Log2, "VERSION", VERSION3);
|
|
6858
6349
|
}
|
|
6859
6350
|
});
|
|
6860
6351
|
|
|
6861
|
-
//
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6352
|
+
// ../core/src/lib/loader-utils/normalize-loader.ts
|
|
6353
|
+
function isLoaderObject(loader) {
|
|
6354
|
+
if (!loader) {
|
|
6355
|
+
return false;
|
|
6356
|
+
}
|
|
6357
|
+
if (Array.isArray(loader)) {
|
|
6358
|
+
loader = loader[0];
|
|
6359
|
+
}
|
|
6360
|
+
const hasExtensions = Array.isArray(loader?.extensions);
|
|
6361
|
+
return hasExtensions;
|
|
6362
|
+
}
|
|
6363
|
+
function normalizeLoader(loader) {
|
|
6364
|
+
assert2(loader, "null loader");
|
|
6365
|
+
assert2(isLoaderObject(loader), "invalid loader");
|
|
6366
|
+
let options;
|
|
6367
|
+
if (Array.isArray(loader)) {
|
|
6368
|
+
options = loader[1];
|
|
6369
|
+
loader = loader[0];
|
|
6370
|
+
loader = {
|
|
6371
|
+
...loader,
|
|
6372
|
+
options: { ...loader.options, ...options }
|
|
6373
|
+
};
|
|
6374
|
+
}
|
|
6375
|
+
if (loader?.parseTextSync || loader?.parseText) {
|
|
6376
|
+
loader.text = true;
|
|
6377
|
+
}
|
|
6378
|
+
if (!loader.text) {
|
|
6379
|
+
loader.binary = true;
|
|
6380
|
+
}
|
|
6381
|
+
return loader;
|
|
6382
|
+
}
|
|
6383
|
+
var init_normalize_loader = __esm({
|
|
6384
|
+
"../core/src/lib/loader-utils/normalize-loader.ts"() {
|
|
6385
|
+
init_src2();
|
|
6386
|
+
}
|
|
6387
|
+
});
|
|
6388
|
+
|
|
6389
|
+
// ../core/src/lib/api/register-loaders.ts
|
|
6390
|
+
function getRegisteredLoaders() {
|
|
6391
|
+
return getGlobalLoaderRegistry();
|
|
6392
|
+
}
|
|
6393
|
+
var getGlobalLoaderRegistry;
|
|
6394
|
+
var init_register_loaders = __esm({
|
|
6395
|
+
"../core/src/lib/api/register-loaders.ts"() {
|
|
6396
|
+
init_option_utils();
|
|
6397
|
+
getGlobalLoaderRegistry = () => {
|
|
6398
|
+
const state = getGlobalLoaderState();
|
|
6399
|
+
state.loaderRegistry = state.loaderRegistry || [];
|
|
6400
|
+
return state.loaderRegistry;
|
|
6401
|
+
};
|
|
6870
6402
|
}
|
|
6871
6403
|
});
|
|
6872
6404
|
|
|
6873
6405
|
// ../core/src/lib/utils/log.ts
|
|
6874
6406
|
var log;
|
|
6875
|
-
var
|
|
6407
|
+
var init_log2 = __esm({
|
|
6876
6408
|
"../core/src/lib/utils/log.ts"() {
|
|
6877
|
-
|
|
6878
|
-
log = new
|
|
6409
|
+
init_esm6();
|
|
6410
|
+
log = new Log({ id: "loaders.gl" });
|
|
6879
6411
|
}
|
|
6880
6412
|
});
|
|
6881
6413
|
|
|
@@ -7064,7 +6596,7 @@
|
|
|
7064
6596
|
"../core/src/lib/api/select-loader.ts"() {
|
|
7065
6597
|
init_src2();
|
|
7066
6598
|
init_normalize_loader();
|
|
7067
|
-
|
|
6599
|
+
init_log2();
|
|
7068
6600
|
init_resource_utils();
|
|
7069
6601
|
init_register_loaders();
|
|
7070
6602
|
init_is_type();
|
|
@@ -7738,7 +7270,7 @@
|
|
|
7738
7270
|
this.requestedTiles = {};
|
|
7739
7271
|
this.emptyTiles = {};
|
|
7740
7272
|
}
|
|
7741
|
-
|
|
7273
|
+
traversalFinished(frameState) {
|
|
7742
7274
|
return true;
|
|
7743
7275
|
}
|
|
7744
7276
|
traverse(root, frameState, options) {
|
|
@@ -7789,7 +7321,7 @@
|
|
|
7789
7321
|
tile._shouldRefine = shouldRefine && parentRefines;
|
|
7790
7322
|
}
|
|
7791
7323
|
const newTime = new Date().getTime();
|
|
7792
|
-
if (this.traversalFinished || newTime - this.lastUpdate > this.updateDebounceTime) {
|
|
7324
|
+
if (this.traversalFinished(frameState) || newTime - this.lastUpdate > this.updateDebounceTime) {
|
|
7793
7325
|
this.lastUpdate = newTime;
|
|
7794
7326
|
this.options.onTraversalEnd(frameState);
|
|
7795
7327
|
}
|
|
@@ -8007,6 +7539,7 @@
|
|
|
8007
7539
|
this._lodJudge = null;
|
|
8008
7540
|
this._expireDate = null;
|
|
8009
7541
|
this._expiredContent = null;
|
|
7542
|
+
this.implicitTiling = null;
|
|
8010
7543
|
Object.seal(this);
|
|
8011
7544
|
}
|
|
8012
7545
|
destroy() {
|
|
@@ -8295,8 +7828,20 @@
|
|
|
8295
7828
|
case "i3s":
|
|
8296
7829
|
return {
|
|
8297
7830
|
...this.tileset.options.i3s,
|
|
8298
|
-
|
|
8299
|
-
|
|
7831
|
+
_tileOptions: {
|
|
7832
|
+
attributeUrls: this.header.attributeUrls,
|
|
7833
|
+
textureUrl: this.header.textureUrl,
|
|
7834
|
+
textureFormat: this.header.textureFormat,
|
|
7835
|
+
textureLoaderOptions: this.header.textureLoaderOptions,
|
|
7836
|
+
materialDefinition: this.header.materialDefinition,
|
|
7837
|
+
isDracoGeometry: this.header.isDracoGeometry,
|
|
7838
|
+
mbs: this.header.mbs
|
|
7839
|
+
},
|
|
7840
|
+
_tilesetOptions: {
|
|
7841
|
+
store: this.tileset.tileset.store,
|
|
7842
|
+
attributeStorageInfo: this.tileset.tileset.attributeStorageInfo,
|
|
7843
|
+
fields: this.tileset.tileset.fields
|
|
7844
|
+
},
|
|
8300
7845
|
isTileHeader: false
|
|
8301
7846
|
};
|
|
8302
7847
|
case "3d-tiles":
|
|
@@ -8355,24 +7900,30 @@
|
|
|
8355
7900
|
}
|
|
8356
7901
|
});
|
|
8357
7902
|
|
|
8358
|
-
// src/tileset/traversers/i3s-
|
|
7903
|
+
// src/tileset/traversers/i3s-pending-tiles-register.ts
|
|
8359
7904
|
var I3SPendingTilesRegister;
|
|
8360
|
-
var
|
|
8361
|
-
"src/tileset/traversers/i3s-
|
|
7905
|
+
var init_i3s_pending_tiles_register = __esm({
|
|
7906
|
+
"src/tileset/traversers/i3s-pending-tiles-register.ts"() {
|
|
8362
7907
|
I3SPendingTilesRegister = class {
|
|
8363
7908
|
constructor() {
|
|
8364
7909
|
this.frameNumberMap = new Map();
|
|
8365
7910
|
}
|
|
8366
|
-
register(frameNumber) {
|
|
8367
|
-
const
|
|
8368
|
-
|
|
7911
|
+
register(viewportId, frameNumber) {
|
|
7912
|
+
const viewportMap = this.frameNumberMap.get(viewportId) || new Map();
|
|
7913
|
+
const oldCount = viewportMap.get(frameNumber) || 0;
|
|
7914
|
+
viewportMap.set(frameNumber, oldCount + 1);
|
|
7915
|
+
this.frameNumberMap.set(viewportId, viewportMap);
|
|
8369
7916
|
}
|
|
8370
|
-
deregister(frameNumber) {
|
|
8371
|
-
const
|
|
8372
|
-
|
|
7917
|
+
deregister(viewportId, frameNumber) {
|
|
7918
|
+
const viewportMap = this.frameNumberMap.get(viewportId);
|
|
7919
|
+
if (!viewportMap) {
|
|
7920
|
+
return;
|
|
7921
|
+
}
|
|
7922
|
+
const oldCount = viewportMap.get(frameNumber) || 1;
|
|
7923
|
+
viewportMap.set(frameNumber, oldCount - 1);
|
|
8373
7924
|
}
|
|
8374
|
-
isZero(frameNumber) {
|
|
8375
|
-
const count = this.frameNumberMap.get(frameNumber) || 0;
|
|
7925
|
+
isZero(viewportId, frameNumber) {
|
|
7926
|
+
const count = this.frameNumberMap.get(viewportId)?.get(frameNumber) || 0;
|
|
8376
7927
|
return count === 0;
|
|
8377
7928
|
}
|
|
8378
7929
|
};
|
|
@@ -8383,7 +7934,7 @@
|
|
|
8383
7934
|
var STATUS, I3STileManager;
|
|
8384
7935
|
var init_i3s_tile_manager = __esm({
|
|
8385
7936
|
"src/tileset/traversers/i3s-tile-manager.ts"() {
|
|
8386
|
-
|
|
7937
|
+
init_i3s_pending_tiles_register();
|
|
8387
7938
|
STATUS = {
|
|
8388
7939
|
REQUESTED: "REQUESTED",
|
|
8389
7940
|
COMPLETED: "COMPLETED",
|
|
@@ -8396,34 +7947,51 @@
|
|
|
8396
7947
|
}
|
|
8397
7948
|
add(request, key, callback, frameState) {
|
|
8398
7949
|
if (!this._statusMap[key]) {
|
|
8399
|
-
const {
|
|
7950
|
+
const {
|
|
7951
|
+
frameNumber,
|
|
7952
|
+
viewport: { id }
|
|
7953
|
+
} = frameState;
|
|
8400
7954
|
this._statusMap[key] = { request, callback, key, frameState, status: STATUS.REQUESTED };
|
|
8401
|
-
this.pendingTilesRegister.register(frameNumber);
|
|
7955
|
+
this.pendingTilesRegister.register(id, frameNumber);
|
|
8402
7956
|
request().then((data) => {
|
|
8403
7957
|
this._statusMap[key].status = STATUS.COMPLETED;
|
|
8404
|
-
const {
|
|
8405
|
-
|
|
7958
|
+
const {
|
|
7959
|
+
frameNumber: actualFrameNumber,
|
|
7960
|
+
viewport: { id: id2 }
|
|
7961
|
+
} = this._statusMap[key].frameState;
|
|
7962
|
+
this.pendingTilesRegister.deregister(id2, actualFrameNumber);
|
|
8406
7963
|
this._statusMap[key].callback(data, frameState);
|
|
8407
7964
|
}).catch((error) => {
|
|
8408
7965
|
this._statusMap[key].status = STATUS.ERROR;
|
|
8409
|
-
const {
|
|
8410
|
-
|
|
7966
|
+
const {
|
|
7967
|
+
frameNumber: actualFrameNumber,
|
|
7968
|
+
viewport: { id: id2 }
|
|
7969
|
+
} = this._statusMap[key].frameState;
|
|
7970
|
+
this.pendingTilesRegister.deregister(id2, actualFrameNumber);
|
|
8411
7971
|
callback(error);
|
|
8412
7972
|
});
|
|
8413
7973
|
}
|
|
8414
7974
|
}
|
|
8415
7975
|
update(key, frameState) {
|
|
8416
7976
|
if (this._statusMap[key]) {
|
|
8417
|
-
|
|
8418
|
-
|
|
7977
|
+
const {
|
|
7978
|
+
frameNumber,
|
|
7979
|
+
viewport: { id }
|
|
7980
|
+
} = this._statusMap[key].frameState;
|
|
7981
|
+
this.pendingTilesRegister.deregister(id, frameNumber);
|
|
7982
|
+
const {
|
|
7983
|
+
frameNumber: newFrameNumber,
|
|
7984
|
+
viewport: { id: newViewportId }
|
|
7985
|
+
} = frameState;
|
|
7986
|
+
this.pendingTilesRegister.register(newViewportId, newFrameNumber);
|
|
8419
7987
|
this._statusMap[key].frameState = frameState;
|
|
8420
7988
|
}
|
|
8421
7989
|
}
|
|
8422
7990
|
find(key) {
|
|
8423
7991
|
return this._statusMap[key];
|
|
8424
7992
|
}
|
|
8425
|
-
hasPendingTiles(frameNumber) {
|
|
8426
|
-
return !this.pendingTilesRegister.isZero(frameNumber);
|
|
7993
|
+
hasPendingTiles(viewportId, frameNumber) {
|
|
7994
|
+
return !this.pendingTilesRegister.isZero(viewportId, frameNumber);
|
|
8427
7995
|
}
|
|
8428
7996
|
};
|
|
8429
7997
|
}
|
|
@@ -8439,8 +8007,8 @@
|
|
|
8439
8007
|
init_tile_3d();
|
|
8440
8008
|
init_i3s_tile_manager();
|
|
8441
8009
|
I3STilesetTraverser = class extends TilesetTraverser {
|
|
8442
|
-
|
|
8443
|
-
return !this._tileManager.hasPendingTiles(this._frameNumber || 0);
|
|
8010
|
+
traversalFinished(frameState) {
|
|
8011
|
+
return !this._tileManager.hasPendingTiles(frameState.viewport.id, this._frameNumber || 0);
|
|
8444
8012
|
}
|
|
8445
8013
|
constructor(options) {
|
|
8446
8014
|
super(options);
|
|
@@ -8481,8 +8049,7 @@
|
|
|
8481
8049
|
...tileset.loadOptions,
|
|
8482
8050
|
i3s: {
|
|
8483
8051
|
...tileset.loadOptions.i3s,
|
|
8484
|
-
isTileHeader: true
|
|
8485
|
-
loadContent: false
|
|
8052
|
+
isTileHeader: true
|
|
8486
8053
|
}
|
|
8487
8054
|
};
|
|
8488
8055
|
return await load(nodeUrl, loader, options);
|
|
@@ -8492,7 +8059,7 @@
|
|
|
8492
8059
|
tile.children.push(childTile);
|
|
8493
8060
|
const frameState = this._tileManager.find(childTile.id).frameState;
|
|
8494
8061
|
this.updateTile(childTile, frameState);
|
|
8495
|
-
if (this._frameNumber === frameState.frameNumber && (this.traversalFinished || new Date().getTime() - this.lastUpdate > this.updateDebounceTime)) {
|
|
8062
|
+
if (this._frameNumber === frameState.frameNumber && (this.traversalFinished(frameState) || new Date().getTime() - this.lastUpdate > this.updateDebounceTime)) {
|
|
8496
8063
|
this.executeTraversal(childTile, frameState);
|
|
8497
8064
|
}
|
|
8498
8065
|
}
|
|
@@ -8570,6 +8137,7 @@
|
|
|
8570
8137
|
TILES_GPU_MEMORY = "Tile Memory Use";
|
|
8571
8138
|
Tileset3D = class {
|
|
8572
8139
|
constructor(json, options) {
|
|
8140
|
+
this.contentFormats = { draco: false, meshopt: false, dds: false, ktx2: false };
|
|
8573
8141
|
this.updatePromise = null;
|
|
8574
8142
|
assert2(json);
|
|
8575
8143
|
this.options = { ...DEFAULT_PROPS4, ...options };
|
|
@@ -8661,7 +8229,9 @@
|
|
|
8661
8229
|
} else {
|
|
8662
8230
|
this.lastUpdatedVieports = viewports;
|
|
8663
8231
|
}
|
|
8664
|
-
|
|
8232
|
+
if (viewports) {
|
|
8233
|
+
this.doUpdate(viewports);
|
|
8234
|
+
}
|
|
8665
8235
|
});
|
|
8666
8236
|
}
|
|
8667
8237
|
async selectTiles(viewports = null) {
|
|
@@ -8672,7 +8242,9 @@
|
|
|
8672
8242
|
if (!this.updatePromise) {
|
|
8673
8243
|
this.updatePromise = new Promise((resolve) => {
|
|
8674
8244
|
setTimeout(() => {
|
|
8675
|
-
|
|
8245
|
+
if (this.lastUpdatedVieports) {
|
|
8246
|
+
this.doUpdate(this.lastUpdatedVieports);
|
|
8247
|
+
}
|
|
8676
8248
|
resolve(this._frameNumber);
|
|
8677
8249
|
this.updatePromise = null;
|
|
8678
8250
|
}, this.options.debounceTime);
|
|
@@ -8680,21 +8252,19 @@
|
|
|
8680
8252
|
}
|
|
8681
8253
|
return this.updatePromise;
|
|
8682
8254
|
}
|
|
8683
|
-
doUpdate(viewports
|
|
8255
|
+
doUpdate(viewports) {
|
|
8684
8256
|
if ("loadTiles" in this.options && !this.options.loadTiles) {
|
|
8685
8257
|
return;
|
|
8686
8258
|
}
|
|
8687
8259
|
if (this.traverseCounter > 0) {
|
|
8688
8260
|
return;
|
|
8689
8261
|
}
|
|
8690
|
-
|
|
8691
|
-
viewports = [viewports];
|
|
8692
|
-
}
|
|
8262
|
+
const preparedViewports = viewports instanceof Array ? viewports : [viewports];
|
|
8693
8263
|
this._cache.reset();
|
|
8694
8264
|
this._frameNumber++;
|
|
8695
|
-
this.traverseCounter =
|
|
8265
|
+
this.traverseCounter = preparedViewports.length;
|
|
8696
8266
|
const viewportsToTraverse = [];
|
|
8697
|
-
for (const viewport of
|
|
8267
|
+
for (const viewport of preparedViewports) {
|
|
8698
8268
|
const id = viewport.id;
|
|
8699
8269
|
if (this._needTraverse(id)) {
|
|
8700
8270
|
viewportsToTraverse.push(id);
|
|
@@ -8702,7 +8272,7 @@
|
|
|
8702
8272
|
this.traverseCounter--;
|
|
8703
8273
|
}
|
|
8704
8274
|
}
|
|
8705
|
-
for (const viewport of
|
|
8275
|
+
for (const viewport of preparedViewports) {
|
|
8706
8276
|
const id = viewport.id;
|
|
8707
8277
|
if (!this.roots[id]) {
|
|
8708
8278
|
this.roots[id] = this._initializeTileHeaders(this.tileset, null);
|
|
@@ -8862,7 +8432,7 @@
|
|
|
8862
8432
|
this.stats.get(TILES_LOADED);
|
|
8863
8433
|
this.stats.get(TILES_UNLOADED);
|
|
8864
8434
|
this.stats.get(TILES_LOAD_FAILED);
|
|
8865
|
-
this.stats.get(POINTS_COUNT
|
|
8435
|
+
this.stats.get(POINTS_COUNT);
|
|
8866
8436
|
this.stats.get(TILES_GPU_MEMORY, "memory");
|
|
8867
8437
|
}
|
|
8868
8438
|
_initializeTileHeaders(tilesetJson, parentTileHeader) {
|
|
@@ -8940,9 +8510,37 @@
|
|
|
8940
8510
|
if (tile && tile.content) {
|
|
8941
8511
|
calculateTransformProps(tile, tile.content);
|
|
8942
8512
|
}
|
|
8513
|
+
this.updateContentTypes(tile);
|
|
8943
8514
|
this._addTileToCache(tile);
|
|
8944
8515
|
this.options.onTileLoad(tile);
|
|
8945
8516
|
}
|
|
8517
|
+
updateContentTypes(tile) {
|
|
8518
|
+
if (this.type === TILESET_TYPE.I3S) {
|
|
8519
|
+
if (tile.header.isDracoGeometry) {
|
|
8520
|
+
this.contentFormats.draco = true;
|
|
8521
|
+
}
|
|
8522
|
+
switch (tile.header.textureFormat) {
|
|
8523
|
+
case "dds":
|
|
8524
|
+
this.contentFormats.dds = true;
|
|
8525
|
+
break;
|
|
8526
|
+
case "ktx2":
|
|
8527
|
+
this.contentFormats.ktx2 = true;
|
|
8528
|
+
break;
|
|
8529
|
+
default:
|
|
8530
|
+
}
|
|
8531
|
+
} else if (this.type === TILESET_TYPE.TILES3D) {
|
|
8532
|
+
const { extensionsRemoved = [] } = tile.content?.gltf || {};
|
|
8533
|
+
if (extensionsRemoved.includes("KHR_draco_mesh_compression")) {
|
|
8534
|
+
this.contentFormats.draco = true;
|
|
8535
|
+
}
|
|
8536
|
+
if (extensionsRemoved.includes("EXT_meshopt_compression")) {
|
|
8537
|
+
this.contentFormats.meshopt = true;
|
|
8538
|
+
}
|
|
8539
|
+
if (extensionsRemoved.includes("KHR_texture_basisu")) {
|
|
8540
|
+
this.contentFormats.ktx2 = true;
|
|
8541
|
+
}
|
|
8542
|
+
}
|
|
8543
|
+
}
|
|
8946
8544
|
_onStartTileLoading() {
|
|
8947
8545
|
this._pendingCount++;
|
|
8948
8546
|
this.stats.get(TILES_LOADING).incrementCount();
|
|
@@ -9064,10 +8662,10 @@
|
|
|
9064
8662
|
|
|
9065
8663
|
// src/bundle.ts
|
|
9066
8664
|
var require_bundle = __commonJS({
|
|
9067
|
-
"src/bundle.ts"(exports,
|
|
8665
|
+
"src/bundle.ts"(exports, module) {
|
|
9068
8666
|
var moduleExports = (init_src4(), src_exports);
|
|
9069
8667
|
globalThis.loaders = globalThis.loaders || {};
|
|
9070
|
-
|
|
8668
|
+
module.exports = Object.assign(globalThis.loaders, moduleExports);
|
|
9071
8669
|
}
|
|
9072
8670
|
});
|
|
9073
8671
|
require_bundle();
|