@fxi/zartigl 0.10.4 → 0.11.1
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/{backdrop-DctkJ45Q.js → backdrop-Dceb4d8E.js} +6 -6
- package/dist/catalog.js +1 -1
- package/dist/{geovideo-index-BqOLqzgA.js → engine-BBxJ6x3s.js} +706 -329
- package/dist/engine.d.ts +78 -2
- package/dist/engine.js +54 -107
- package/dist/{index-CNtMu8AU.js → index-DKYFuzyw.js} +2 -2
- package/dist/zartigl.js +67 -67
- package/package.json +1 -1
package/dist/zartigl.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { m as WA, p as yB, s as rB, a as rg, b as ng, r as OI, c as RC, d as UA, e as dC, f as nB, g as UC } from "./index-
|
|
2
|
-
import { T as lC, g as LC, r as kC, d as JC, c as wA, a as MC, b as iI, e as KC, f as mA, h as SI, i as aA,
|
|
3
|
-
import {
|
|
4
|
-
import { B as
|
|
5
|
-
import {
|
|
6
|
-
const xI = 85,
|
|
1
|
+
import { m as WA, p as yB, s as rB, a as rg, b as ng, r as OI, c as RC, d as UA, e as dC, f as nB, g as UC } from "./index-DKYFuzyw.js";
|
|
2
|
+
import { T as lC, g as LC, r as kC, d as JC, c as wA, a as MC, b as iI, e as KC, f as mA, h as SI, i as aA, G as qC, j as Fg, v as YA, k as fA, s as zI, l as jI, m as FB, n as wg, o as uI, p as YC, q as pI, t as fC, u as wB, w as EA, x as cg, y as HC, z as mC, A as uC, B as Sg, C as QI, D as pC, E as xC, F as TC, H as WC } from "./engine-BBxJ6x3s.js";
|
|
3
|
+
import { I as qi, J as Yi } from "./engine-BBxJ6x3s.js";
|
|
4
|
+
import { B as bC, a as vC, b as PC, c as ZC, d as cB, r as SB, e as VC, g as OC } from "./backdrop-Dceb4d8E.js";
|
|
5
|
+
import { f as Hi, i as mi } from "./backdrop-Dceb4d8E.js";
|
|
6
|
+
const xI = 85, zC = 89.9;
|
|
7
7
|
function TI(B) {
|
|
8
8
|
return Math.max(-xI, Math.min(xI, B));
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Gg(B) {
|
|
11
11
|
const A = TI(B), I = Math.sin(A * Math.PI / 180);
|
|
12
12
|
return 0.5 - Math.log((1 + I) / (1 - I)) / (4 * Math.PI);
|
|
13
13
|
}
|
|
14
14
|
function oI(B) {
|
|
15
15
|
return (B + 180) / 360;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function jC(B) {
|
|
18
18
|
return ((B + 180) % 360 + 360) % 360 - 180;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const I =
|
|
20
|
+
function XC(B, A) {
|
|
21
|
+
const I = jC(B) * Math.PI / 180, g = A * Math.PI / 180, C = Math.cos(g);
|
|
22
22
|
return [
|
|
23
23
|
Math.sin(I) * C,
|
|
24
24
|
Math.sin(g),
|
|
25
25
|
Math.cos(I) * C
|
|
26
26
|
];
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function _C(B) {
|
|
29
29
|
return {
|
|
30
30
|
west: -180,
|
|
31
31
|
east: 180,
|
|
@@ -33,8 +33,8 @@ function XC(B) {
|
|
|
33
33
|
north: TI(B.getNorth())
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const g = I ?
|
|
36
|
+
function $C(B, A = 1, I = !1) {
|
|
37
|
+
const g = I ? zC : xI, C = (i) => Math.max(-g, Math.min(g, i)), Q = C(B.getSouth()), o = C(B.getNorth()), t = Math.max(0, o - Q) * Math.max(0, A);
|
|
38
38
|
return {
|
|
39
39
|
west: -180,
|
|
40
40
|
east: 180,
|
|
@@ -42,10 +42,10 @@ function _C(B, A = 1, I = !1) {
|
|
|
42
42
|
north: C(o + t)
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function AQ(B, A, I = 1e-6) {
|
|
46
46
|
return B.south <= A.south + I && B.north >= A.north - I;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function IQ(B, A = !1) {
|
|
49
49
|
const I = B.getWest(), g = B.getEast(), C = oI(I), Q = oI(g), o = C - Math.floor(C), a = Q - C >= 1 ? { minX: 0, maxX: 1 } : { minX: o, maxX: o + Q - C };
|
|
50
50
|
return A ? {
|
|
51
51
|
...a,
|
|
@@ -53,8 +53,8 @@ function AQ(B, A = !1) {
|
|
|
53
53
|
maxY: (Math.min(B.getNorth(), 90) + 90) / 180
|
|
54
54
|
} : {
|
|
55
55
|
...a,
|
|
56
|
-
minY:
|
|
57
|
-
maxY:
|
|
56
|
+
minY: Gg(B.getNorth()),
|
|
57
|
+
maxY: Gg(B.getSouth())
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
function XI(B, A) {
|
|
@@ -87,7 +87,7 @@ out vec2 v_tex_coord;
|
|
|
87
87
|
void main() {
|
|
88
88
|
v_tex_coord = a_position * 0.5 + 0.5;
|
|
89
89
|
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
90
|
-
}`,
|
|
90
|
+
}`, gQ = `#version 300 es
|
|
91
91
|
precision highp float;
|
|
92
92
|
|
|
93
93
|
uint pcg(uint v) {
|
|
@@ -357,7 +357,7 @@ void main() {
|
|
|
357
357
|
fract(newPos.y * 255.0)
|
|
358
358
|
);
|
|
359
359
|
#endif
|
|
360
|
-
}`,
|
|
360
|
+
}`, BQ = `precision highp float;
|
|
361
361
|
|
|
362
362
|
attribute float a_index;
|
|
363
363
|
attribute float a_is_curr;
|
|
@@ -589,7 +589,7 @@ void main() {
|
|
|
589
589
|
vec2 worldPos = vec2((pos.x + u_world_offset) * u_world_size, pos.y * u_world_size);
|
|
590
590
|
gl_Position = u_matrix * vec4(worldPos, 0.0, 1.0);
|
|
591
591
|
}
|
|
592
|
-
}`,
|
|
592
|
+
}`, CQ = `precision mediump float;
|
|
593
593
|
|
|
594
594
|
uniform sampler2D u_color_ramp;
|
|
595
595
|
uniform float u_particle_contrast;
|
|
@@ -628,7 +628,7 @@ void main() {
|
|
|
628
628
|
}
|
|
629
629
|
|
|
630
630
|
gl_FragColor = vec4(color.rgb, color.a * u_opacity);
|
|
631
|
-
}`,
|
|
631
|
+
}`, QQ = `#version 300 es
|
|
632
632
|
precision mediump float;
|
|
633
633
|
|
|
634
634
|
uniform sampler2D u_screen;
|
|
@@ -645,7 +645,7 @@ void main() {
|
|
|
645
645
|
float alpha = floor(color.a * 255.0 * u_opacity) / 255.0;
|
|
646
646
|
|
|
647
647
|
o_color = vec4(color.rgb * step(1.0 / 255.0, alpha), alpha);
|
|
648
|
-
}`,
|
|
648
|
+
}`, EQ = `#version 300 es
|
|
649
649
|
precision mediump float;
|
|
650
650
|
|
|
651
651
|
uniform sampler2D u_screen;
|
|
@@ -716,7 +716,7 @@ void main() {
|
|
|
716
716
|
}
|
|
717
717
|
vec3 rgb = u_grade_on > 0.5 ? gradeColor(color.rgb, u_grade) : color.rgb;
|
|
718
718
|
o_color = vec4(rgb, color.a);
|
|
719
|
-
}`,
|
|
719
|
+
}`, iQ = `#version 300 es
|
|
720
720
|
precision mediump float;
|
|
721
721
|
|
|
722
722
|
uniform sampler2D u_screen;
|
|
@@ -784,7 +784,7 @@ void main() {
|
|
|
784
784
|
|
|
785
785
|
v_geo_uv = a_grid_uv;
|
|
786
786
|
gl_Position = u_matrix * vec4(worldPos, 0.0, 1.0);
|
|
787
|
-
}`,
|
|
787
|
+
}`, oQ = `precision mediump float;
|
|
788
788
|
|
|
789
789
|
uniform sampler2D u_field;
|
|
790
790
|
uniform sampler2D u_color_ramp;
|
|
@@ -909,7 +909,7 @@ void main() {
|
|
|
909
909
|
vec4 position = u_matrix * vec4(ecef, 1.0);
|
|
910
910
|
position.z = (1.0 - (dot(ecef, u_clipping_plane.xyz) + u_clipping_plane.w)) * position.w;
|
|
911
911
|
gl_Position = position;
|
|
912
|
-
}`,
|
|
912
|
+
}`, aQ = `precision mediump float;
|
|
913
913
|
|
|
914
914
|
uniform sampler2D u_field;
|
|
915
915
|
uniform sampler2D u_color_ramp;
|
|
@@ -999,7 +999,7 @@ void main() {
|
|
|
999
999
|
color.rgb = applyVibrance(color.rgb, u_vibrance);
|
|
1000
1000
|
gl_FragColor = vec4(color.rgb, color.a * u_opacity);
|
|
1001
1001
|
}`;
|
|
1002
|
-
const NI = [0, 0, 0, 0], sA = 512, lA = sA * sA, LA = 128, uA = 64,
|
|
1002
|
+
const NI = [0, 0, 0, 0], sA = 512, lA = sA * sA, LA = 128, uA = 64, sQ = 1, tQ = 0.92, eQ = 0.1, Ng = 0.98;
|
|
1003
1003
|
function DQ(B) {
|
|
1004
1004
|
if (Number.isNaN(B))
|
|
1005
1005
|
return 32256;
|
|
@@ -1026,8 +1026,8 @@ const hQ = {
|
|
|
1026
1026
|
opacity: 1,
|
|
1027
1027
|
logScale: !1,
|
|
1028
1028
|
vibrance: 0,
|
|
1029
|
-
colorGrade:
|
|
1030
|
-
backdrop:
|
|
1029
|
+
colorGrade: vC,
|
|
1030
|
+
backdrop: bC,
|
|
1031
1031
|
glow: 0,
|
|
1032
1032
|
scalarMode: !1,
|
|
1033
1033
|
particleState: "auto",
|
|
@@ -1044,8 +1044,8 @@ class RB {
|
|
|
1044
1044
|
this.updateProgram = wA(
|
|
1045
1045
|
A,
|
|
1046
1046
|
$A,
|
|
1047
|
-
|
|
1048
|
-
), this.drawProgram = wA(A, I +
|
|
1047
|
+
gQ.replace(/^(#version[^\n]*\n)/, `$1${I}`)
|
|
1048
|
+
), this.drawProgram = wA(A, I + BQ, CQ), this.fadeProgram = wA(A, $A, QQ), this.compositeProgram = wA(A, $A, EQ), this.glowProgram = wA(A, $A, iQ), this.gridProgram = wA(A, GB, oQ), this.gridGlobeProgram = wA(A, NB, aQ), this.updateLocs = this.getUniforms(this.updateProgram, [
|
|
1049
1049
|
"u_particles",
|
|
1050
1050
|
..._A,
|
|
1051
1051
|
"u_velocity",
|
|
@@ -1232,8 +1232,8 @@ class RB {
|
|
|
1232
1232
|
if (this.prevBounds) {
|
|
1233
1233
|
const Y = this.prevBounds.maxX - this.prevBounds.minX, W = this.prevBounds.maxY - this.prevBounds.minY, b = 1e-6, m = (Q.minX + Q.maxX) * 0.5, v = (Q.minY + Q.maxY) * 0.5, IA = (this.prevBounds.minX + this.prevBounds.maxX) * 0.5, O = (this.prevBounds.minY + this.prevBounds.maxY) * 0.5, z = Math.abs(k - Y) / Math.max(Y, b), T = Math.abs(m - IA) / Math.max(Y, b) + Math.abs(v - O) / Math.max(W, b), _ = Math.min(1, z + T);
|
|
1234
1234
|
this.redistributionBoost = Math.max(
|
|
1235
|
-
this.redistributionBoost *
|
|
1236
|
-
_ *
|
|
1235
|
+
this.redistributionBoost * tQ,
|
|
1236
|
+
_ * sQ
|
|
1237
1237
|
);
|
|
1238
1238
|
}
|
|
1239
1239
|
this.prevBounds = {
|
|
@@ -1244,7 +1244,7 @@ class RB {
|
|
|
1244
1244
|
};
|
|
1245
1245
|
const M = Math.min(
|
|
1246
1246
|
this.params.dropRate + this.redistributionBoost,
|
|
1247
|
-
|
|
1247
|
+
eQ
|
|
1248
1248
|
);
|
|
1249
1249
|
D.uniform1f(this.updateLocs.u_drop_rate, M), D.uniform1f(
|
|
1250
1250
|
this.updateLocs.u_drop_rate_bump,
|
|
@@ -1263,7 +1263,7 @@ class RB {
|
|
|
1263
1263
|
t.north
|
|
1264
1264
|
), D.uniform1f(
|
|
1265
1265
|
this.updateLocs.u_valid_threshold,
|
|
1266
|
-
|
|
1266
|
+
Ng
|
|
1267
1267
|
), D.bindFramebuffer(D.FRAMEBUFFER, this.particleFramebuffers[1]), this.drawQuad(), c = !0;
|
|
1268
1268
|
}
|
|
1269
1269
|
D.viewport(0, 0, this.screenWidth, this.screenHeight), D.bindFramebuffer(D.FRAMEBUFFER, this.screenFramebuffers[1]), D.useProgram(this.fadeProgram), D.disable(D.BLEND), aA(D, this.screenTextures[0], 0), D.uniform1i(this.fadeLocs.u_screen, 0), D.uniform1f(
|
|
@@ -1314,7 +1314,7 @@ class RB {
|
|
|
1314
1314
|
this.params.logScale ? 1 : 0
|
|
1315
1315
|
), D.uniform1f(this.drawLocs.u_vibrance, this.params.vibrance), D.uniform1f(
|
|
1316
1316
|
this.drawLocs.u_valid_threshold,
|
|
1317
|
-
|
|
1317
|
+
Ng
|
|
1318
1318
|
), D.uniform1f(this.drawLocs.u_is_globe, i ? 1 : 0), D.uniform3f(
|
|
1319
1319
|
this.drawLocs.u_globe_center,
|
|
1320
1320
|
E[0],
|
|
@@ -1334,20 +1334,20 @@ class RB {
|
|
|
1334
1334
|
D.disableVertexAttribArray(k), D.disableVertexAttribArray(M), D.disable(D.BLEND);
|
|
1335
1335
|
}
|
|
1336
1336
|
D.bindFramebuffer(D.FRAMEBUFFER, w), D.viewport(0, 0, this.screenWidth, this.screenHeight);
|
|
1337
|
-
const L =
|
|
1337
|
+
const L = PC(this.params.backdrop);
|
|
1338
1338
|
L[3] > 0 && N(L);
|
|
1339
1339
|
const d = this.params.glow > 0 ? this.renderGlow(w) : null, q = this.params.colorGrade;
|
|
1340
1340
|
D.useProgram(this.compositeProgram), aA(D, this.screenTextures[1], 0), D.uniform1i(this.compositeLocs.u_screen, 0), aA(D, d ?? this.screenTextures[1], 1), D.uniform1i(this.compositeLocs.u_glow_tex, 1), D.uniform1f(
|
|
1341
1341
|
this.compositeLocs.u_glow,
|
|
1342
|
-
d ?
|
|
1343
|
-
), D.uniform1f(this.compositeLocs.u_grade_on, q.enabled ? 1 : 0), D.uniform4f(this.compositeLocs.u_grade, ...
|
|
1342
|
+
d ? qC * this.params.glow : 0
|
|
1343
|
+
), D.uniform1f(this.compositeLocs.u_grade_on, q.enabled ? 1 : 0), D.uniform4f(this.compositeLocs.u_grade, ...ZC(q)), D.enable(D.BLEND), D.blendFunc(D.SRC_ALPHA, D.ONE_MINUS_SRC_ALPHA), this.drawQuad(), D.disable(D.BLEND), c && (this.particleStateTextures.reverse(), this.particleFramebuffers.reverse()), this.screenTextures.reverse(), this.screenFramebuffers.reverse();
|
|
1344
1344
|
}
|
|
1345
1345
|
/**
|
|
1346
1346
|
* Reduce the latest trails into the glow texture (glow.glsl), then rebind
|
|
1347
1347
|
* `framebuffer` with the full viewport.
|
|
1348
1348
|
*/
|
|
1349
1349
|
renderGlow(A) {
|
|
1350
|
-
const I = this.gl, g = Math.ceil(this.screenWidth /
|
|
1350
|
+
const I = this.gl, g = Math.ceil(this.screenWidth / Fg), C = Math.ceil(this.screenHeight / Fg);
|
|
1351
1351
|
return this.glowTexture || (this.glowTexture = SI(I, I.LINEAR, null, g, C), this.glowFramebuffer = mA(I, this.glowTexture)), I.bindFramebuffer(I.FRAMEBUFFER, this.glowFramebuffer), I.viewport(0, 0, g, C), I.disable(I.BLEND), I.useProgram(this.glowProgram), aA(I, this.screenTextures[1], 0), I.uniform1i(this.glowLocs.u_screen, 0), this.drawQuad(), I.bindFramebuffer(I.FRAMEBUFFER, A), I.viewport(0, 0, this.screenWidth, this.screenHeight), this.glowTexture;
|
|
1352
1352
|
}
|
|
1353
1353
|
deleteGlowTarget() {
|
|
@@ -4435,7 +4435,7 @@ class V {
|
|
|
4435
4435
|
) : null, this.variableU = A.variableU ?? "uo", this.variableV = A.variableV ?? "vo", this.vectorDerivation = A.vectorDerivation, this.unit = A.unit ?? "m/s", this.time = A.time ?? 0, this.depth = A.depth ?? 0, this.zarrSourceValue = this.playback ? null : A.zarrSource ?? new sI(A.source), this.velocityField = new dB(), this.simulation = new RB({
|
|
4436
4436
|
particleDensity: A.particleDensity ?? 0.05,
|
|
4437
4437
|
speed: A.speed ?? 1,
|
|
4438
|
-
fadeOpacity:
|
|
4438
|
+
fadeOpacity: wg(A.fade ?? bE),
|
|
4439
4439
|
colorRamp: A.colorRamp,
|
|
4440
4440
|
opacity: A.opacity ?? 1,
|
|
4441
4441
|
logScale: A.logScale ?? !1,
|
|
@@ -4489,9 +4489,9 @@ class V {
|
|
|
4489
4489
|
};
|
|
4490
4490
|
}
|
|
4491
4491
|
isViewportCovered() {
|
|
4492
|
-
return !this.map || !this.velocityField.hasData() ? !1 :
|
|
4492
|
+
return !this.map || !this.velocityField.hasData() ? !1 : AQ(
|
|
4493
4493
|
this.velocityField.geoBounds,
|
|
4494
|
-
|
|
4494
|
+
_C(this.map.getBounds())
|
|
4495
4495
|
);
|
|
4496
4496
|
}
|
|
4497
4497
|
reloadIfViewportUncovered() {
|
|
@@ -4508,7 +4508,7 @@ class V {
|
|
|
4508
4508
|
* The map's current viewport is used to determine the lat bounds of the request.
|
|
4509
4509
|
*/
|
|
4510
4510
|
async fetchVelocityData(A, I) {
|
|
4511
|
-
const g = this.map.getBounds(), C = this.map.getProjection?.()?.type === "globe", Q =
|
|
4511
|
+
const g = this.map.getBounds(), C = this.map.getProjection?.()?.type === "globe", Q = $C(g, 1, C), o = this.zarrSource.findTimeIndex(A), a = this.zarrSource.findDepthIndex(this.depth);
|
|
4512
4512
|
console.log(
|
|
4513
4513
|
`[zartigl] Loading velocity: depth=${this.depth} → depthIdx=${a}, actual depth value=${this.zarrSource.getCoords().vertical[a]}, timeIdx=${o}`
|
|
4514
4514
|
);
|
|
@@ -4661,7 +4661,7 @@ class V {
|
|
|
4661
4661
|
try {
|
|
4662
4662
|
const F = g.canvas;
|
|
4663
4663
|
this.simulation.resize(F.width, F.height), g.bindFramebuffer(g.FRAMEBUFFER, n.framebuffer), Q ? (g.activeTexture(g.TEXTURE1), g.bindTexture(g.TEXTURE_2D, Q[0]), g.activeTexture(g.TEXTURE4), g.bindTexture(g.TEXTURE_2D, Q[1])) : this.velocityField.bind(this.velocityTexUnit);
|
|
4664
|
-
const D = this.map.getProjection?.()?.type === "globe", w = this.map.getBounds(), R =
|
|
4664
|
+
const D = this.map.getProjection?.()?.type === "globe", w = this.map.getBounds(), R = IQ(w, D), K = XI(w, D);
|
|
4665
4665
|
g.disable(g.DEPTH_TEST), g.disable(g.STENCIL_TEST);
|
|
4666
4666
|
const J = 512 * Math.pow(2, this.map.getZoom()), c = this.map.getCenter();
|
|
4667
4667
|
this.simulation.render(
|
|
@@ -4674,7 +4674,7 @@ class V {
|
|
|
4674
4674
|
K,
|
|
4675
4675
|
E,
|
|
4676
4676
|
D,
|
|
4677
|
-
|
|
4677
|
+
XC(c.lng, c.lat),
|
|
4678
4678
|
I.defaultProjectionData.clippingPlane,
|
|
4679
4679
|
...r ? [r] : []
|
|
4680
4680
|
);
|
|
@@ -4803,7 +4803,7 @@ class V {
|
|
|
4803
4803
|
this.simulation.setSpeed(A);
|
|
4804
4804
|
}
|
|
4805
4805
|
setFade(A) {
|
|
4806
|
-
this.simulation.setFadeOpacity(
|
|
4806
|
+
this.simulation.setFadeOpacity(wg(A));
|
|
4807
4807
|
}
|
|
4808
4808
|
setParticleDensity(A) {
|
|
4809
4809
|
this.simulation.setParticleDensity(A);
|
|
@@ -4994,7 +4994,7 @@ class oA {
|
|
|
4994
4994
|
g.getUniformLocation(E, "u_mask_threshold"),
|
|
4995
4995
|
o.mask.threshold
|
|
4996
4996
|
);
|
|
4997
|
-
const { codeRange: r, valueRange: n, transfer: e } =
|
|
4997
|
+
const { codeRange: r, valueRange: n, transfer: e } = YC(
|
|
4998
4998
|
o.encoding
|
|
4999
4999
|
);
|
|
5000
5000
|
g.uniform1f(
|
|
@@ -5129,7 +5129,7 @@ class oA {
|
|
|
5129
5129
|
id: this.id,
|
|
5130
5130
|
initialized: !!A?.currentPair,
|
|
5131
5131
|
playing: this.playback.isPlaying(),
|
|
5132
|
-
currentTime: A ? A.manifest.timeline.kind === "snapshot-loop" ? (this.playback.time - A.times[0]) / 1e3 :
|
|
5132
|
+
currentTime: A ? A.manifest.timeline.kind === "snapshot-loop" ? (this.playback.time - A.times[0]) / 1e3 : fC(A.manifest, this.playback.time) : 0,
|
|
5133
5133
|
manifestId: this.manifest?.id,
|
|
5134
5134
|
mediaUrl: this.manifest?.media.url,
|
|
5135
5135
|
preloadedMediaUrl: this.playback.preloadedMediaUrl,
|
|
@@ -5726,7 +5726,7 @@ function Qi(B) {
|
|
|
5726
5726
|
) ? A : void 0;
|
|
5727
5727
|
}
|
|
5728
5728
|
function vA(B, A) {
|
|
5729
|
-
return A ?
|
|
5729
|
+
return A ? WC(A, [
|
|
5730
5730
|
B.values[0],
|
|
5731
5731
|
B.values[B.values.length - 1]
|
|
5732
5732
|
]) : null;
|
|
@@ -5813,7 +5813,7 @@ function EI(B) {
|
|
|
5813
5813
|
speed: A.speed,
|
|
5814
5814
|
fade: A.fade,
|
|
5815
5815
|
glow: A.glow,
|
|
5816
|
-
colorGrade: A.grade === void 0 ? void 0 :
|
|
5816
|
+
colorGrade: A.grade === void 0 ? void 0 : OC(A.grade),
|
|
5817
5817
|
opacity: I.opacity,
|
|
5818
5818
|
logScale: I.logScale,
|
|
5819
5819
|
vibrance: I.vibrance,
|
|
@@ -5887,7 +5887,7 @@ function mI(B) {
|
|
|
5887
5887
|
density: g,
|
|
5888
5888
|
speed: C,
|
|
5889
5889
|
fade: Q,
|
|
5890
|
-
grade: o &&
|
|
5890
|
+
grade: o && VC(o),
|
|
5891
5891
|
backdrop: r
|
|
5892
5892
|
},
|
|
5893
5893
|
raster: { opacity: a, logScale: t, vibrance: i, colorDomain: E }
|
|
@@ -6068,7 +6068,7 @@ class li {
|
|
|
6068
6068
|
"Layer selection was superseded",
|
|
6069
6069
|
"AbortError"
|
|
6070
6070
|
);
|
|
6071
|
-
const k =
|
|
6071
|
+
const k = cg(N), M = {
|
|
6072
6072
|
min: k[0],
|
|
6073
6073
|
max: k[k.length - 1],
|
|
6074
6074
|
step: k.length > 1 ? k[1] - k[0] : void 0,
|
|
@@ -6192,7 +6192,7 @@ class li {
|
|
|
6192
6192
|
A,
|
|
6193
6193
|
I
|
|
6194
6194
|
);
|
|
6195
|
-
return !
|
|
6195
|
+
return !HC(i, Q);
|
|
6196
6196
|
}
|
|
6197
6197
|
applyVisible(A) {
|
|
6198
6198
|
this.assertAlive(), this.visible !== A && (this.visible = A, A ? this.attachWhenReady() : this.detach());
|
|
@@ -6265,7 +6265,7 @@ class li {
|
|
|
6265
6265
|
}
|
|
6266
6266
|
/** Media rate for the loaded artifact: steps per second when set, else the raw multiplier. */
|
|
6267
6267
|
effectivePlaybackRate() {
|
|
6268
|
-
return this.stepsPerSecond != null && this.geoVideoManifest ?
|
|
6268
|
+
return this.stepsPerSecond != null && this.geoVideoManifest ? mC(this.geoVideoManifest, this.stepsPerSecond) : this.playbackRate;
|
|
6269
6269
|
}
|
|
6270
6270
|
playbackSpeeds() {
|
|
6271
6271
|
return this.catalogLayer?.kind === "vector" ? iB : Bi;
|
|
@@ -6282,7 +6282,7 @@ class li {
|
|
|
6282
6282
|
Math.max(A[0], this.stepsPerSecond ?? 1)
|
|
6283
6283
|
);
|
|
6284
6284
|
}
|
|
6285
|
-
return this.stepsPerSecond != null ? this.stepsPerSecond : this.geoVideoManifest ? this.playbackRate *
|
|
6285
|
+
return this.stepsPerSecond != null ? this.stepsPerSecond : this.geoVideoManifest ? this.playbackRate * uC(this.geoVideoManifest) : this.playbackRate;
|
|
6286
6286
|
}
|
|
6287
6287
|
/** Apply or clear a time window without rebuilding source metadata or the map layer. */
|
|
6288
6288
|
applyTimeRange(A) {
|
|
@@ -6369,7 +6369,7 @@ class li {
|
|
|
6369
6369
|
alphaFade: ZI(this.settings),
|
|
6370
6370
|
min: C[0],
|
|
6371
6371
|
max: C[1],
|
|
6372
|
-
unit:
|
|
6372
|
+
unit: Sg(this.geoVideoManifest.style.unit)
|
|
6373
6373
|
};
|
|
6374
6374
|
}
|
|
6375
6375
|
const A = typeof this.settings.palette == "string" ? VI(this.settings.palette) : "custom", I = this.catalogLayer.kind === "scalar" ? this.settings.colorDomain : null;
|
|
@@ -6380,7 +6380,7 @@ class li {
|
|
|
6380
6380
|
alphaFade: this.catalogLayer.kind === "scalar" ? ZI(this.settings) : void 0,
|
|
6381
6381
|
min: I?.[0] ?? this.lastMeta?.min,
|
|
6382
6382
|
max: I?.[1] ?? this.lastMeta?.max,
|
|
6383
|
-
unit:
|
|
6383
|
+
unit: Sg(this.lastMeta?.unit ?? this.variableUnit)
|
|
6384
6384
|
};
|
|
6385
6385
|
}
|
|
6386
6386
|
getPalettes() {
|
|
@@ -6417,7 +6417,7 @@ class li {
|
|
|
6417
6417
|
if (A.timeline.kind === "snapshot-loop")
|
|
6418
6418
|
return this.catalogLayer?.kind !== "vector";
|
|
6419
6419
|
const I = this.timeMeta;
|
|
6420
|
-
return
|
|
6420
|
+
return cg(A).filter(
|
|
6421
6421
|
(C) => !I || C >= I.min && C <= I.max
|
|
6422
6422
|
).length > 1;
|
|
6423
6423
|
}
|
|
@@ -6752,7 +6752,7 @@ class li {
|
|
|
6752
6752
|
*/
|
|
6753
6753
|
async nextArchiveChunk() {
|
|
6754
6754
|
const A = this.catalogLayer, I = this.catalogSource;
|
|
6755
|
-
return !A || !I || !this.isArchiveChunk(I) ? null :
|
|
6755
|
+
return !A || !I || !this.isArchiveChunk(I) ? null : pC((await this.resolveArchives(A)).sources, I, {
|
|
6756
6756
|
range: this.resolvedTimeRange,
|
|
6757
6757
|
loop: this.loop
|
|
6758
6758
|
});
|
|
@@ -6841,7 +6841,7 @@ class li {
|
|
|
6841
6841
|
return C.chunks;
|
|
6842
6842
|
const Q = {
|
|
6843
6843
|
expires: Date.now() + oi,
|
|
6844
|
-
chunks:
|
|
6844
|
+
chunks: xC(g.indexUrl).then((o) => TC(g, o, A)).catch((o) => (console.warn("[zartigl] GeoVideo archive unavailable:", o), Q.expires = Date.now() + ai, []))
|
|
6845
6845
|
};
|
|
6846
6846
|
return this.archiveChunks.set(g.indexUrl, Q), Q.chunks;
|
|
6847
6847
|
})
|
|
@@ -7129,8 +7129,8 @@ ${A}
|
|
|
7129
7129
|
</html>`;
|
|
7130
7130
|
}
|
|
7131
7131
|
export {
|
|
7132
|
-
|
|
7133
|
-
|
|
7132
|
+
bC as BACKDROP_OFF,
|
|
7133
|
+
vC as COLOR_GRADE_OFF,
|
|
7134
7134
|
Hi as COLOR_GRADE_VIBRANT,
|
|
7135
7135
|
Bi as GEOVIDEO_SPEEDS,
|
|
7136
7136
|
oA as GeoVideoLayer,
|
|
@@ -7148,15 +7148,15 @@ export {
|
|
|
7148
7148
|
Gi as buildStandaloneDemoSnippet,
|
|
7149
7149
|
ZE as buildWmtsLegendUrl,
|
|
7150
7150
|
CB as buildWmtsTileUrl,
|
|
7151
|
-
|
|
7151
|
+
VC as colorGradeToGrade,
|
|
7152
7152
|
WE as deriveDirectionMagnitudeComponents,
|
|
7153
|
-
|
|
7154
|
-
|
|
7153
|
+
Sg as formatUnit,
|
|
7154
|
+
fC as geoVideoSecondsForTime,
|
|
7155
7155
|
qi as geoVideoTimeForSeconds,
|
|
7156
|
-
|
|
7156
|
+
cg as geoVideoTimelineValues,
|
|
7157
7157
|
wB as getPalettes,
|
|
7158
7158
|
Ui as getVectorDerivationVariables,
|
|
7159
|
-
|
|
7159
|
+
OC as gradeToColorGrade,
|
|
7160
7160
|
mi as isHexColor,
|
|
7161
7161
|
uI as loadGeoVideoManifest,
|
|
7162
7162
|
SB as resolveBackdrop,
|