@idetik/core 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +120 -102
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +25 -25
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/src/core/geometry.d.ts +1 -0
- package/dist/types/src/core/geometry.d.ts.map +1 -1
- package/dist/types/src/renderers/webgl_renderer.d.ts.map +1 -1
- package/dist/types/src/renderers/webgl_textures.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -834,12 +834,12 @@ function $() {
|
|
|
834
834
|
return X != Float32Array && (g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[11] = 0, g[12] = 0, g[13] = 0, g[14] = 0), g[0] = 1, g[5] = 1, g[10] = 1, g[15] = 1, g;
|
|
835
835
|
}
|
|
836
836
|
function OA(g, A) {
|
|
837
|
-
var I = A[0], B = A[1], C = A[2], Q = A[3], E = A[4], i = A[5], o = A[6], a = A[7], s = A[8], D = A[9], h = A[10], t = A[11], y = A[12], n = A[13], F = A[14], G = A[15],
|
|
838
|
-
return P ? (P = 1 / P, g[0] = (i * aA - o * oA + a * z) * P, g[1] = (C * oA - B * aA - Q * z) * P, g[2] = (n * f - F * c + G * r) * P, g[3] = (h * c - D * f - t * r) * P, g[4] = (o * b - E * aA - a * j) * P, g[5] = (I * aA - C * b + Q * j) * P, g[6] = (F * S - y * f - G * U) * P, g[7] = (s * f - h * S + t * U) * P, g[8] = (E * oA - i * b + a * Z) * P, g[9] = (B * b - I * oA - Q * Z) * P, g[10] = (y * c - n * S + G *
|
|
837
|
+
var I = A[0], B = A[1], C = A[2], Q = A[3], E = A[4], i = A[5], o = A[6], a = A[7], s = A[8], D = A[9], h = A[10], t = A[11], y = A[12], n = A[13], F = A[14], G = A[15], L = I * i - B * E, U = I * o - C * E, S = I * a - Q * E, r = B * o - C * i, c = B * a - Q * i, f = C * a - Q * o, Z = s * n - D * y, j = s * F - h * y, b = s * G - t * y, z = D * F - h * n, oA = D * G - t * n, aA = h * G - t * F, P = L * aA - U * oA + S * z + r * b - c * j + f * Z;
|
|
838
|
+
return P ? (P = 1 / P, g[0] = (i * aA - o * oA + a * z) * P, g[1] = (C * oA - B * aA - Q * z) * P, g[2] = (n * f - F * c + G * r) * P, g[3] = (h * c - D * f - t * r) * P, g[4] = (o * b - E * aA - a * j) * P, g[5] = (I * aA - C * b + Q * j) * P, g[6] = (F * S - y * f - G * U) * P, g[7] = (s * f - h * S + t * U) * P, g[8] = (E * oA - i * b + a * Z) * P, g[9] = (B * b - I * oA - Q * Z) * P, g[10] = (y * c - n * S + G * L) * P, g[11] = (D * S - s * c - t * L) * P, g[12] = (i * j - E * z - o * Z) * P, g[13] = (I * z - B * j + C * Z) * P, g[14] = (n * U - y * r - F * L) * P, g[15] = (s * r - D * U + h * L) * P, g) : null;
|
|
839
839
|
}
|
|
840
840
|
function QI(g, A, I) {
|
|
841
|
-
var B = A[0], C = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], a = A[6], s = A[7], D = A[8], h = A[9], t = A[10], y = A[11], n = A[12], F = A[13], G = A[14],
|
|
842
|
-
return g[0] = U * B + S * i + r * D + c * n, g[1] = U * C + S * o + r * h + c * F, g[2] = U * Q + S * a + r * t + c * G, g[3] = U * E + S * s + r * y + c *
|
|
841
|
+
var B = A[0], C = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], a = A[6], s = A[7], D = A[8], h = A[9], t = A[10], y = A[11], n = A[12], F = A[13], G = A[14], L = A[15], U = I[0], S = I[1], r = I[2], c = I[3];
|
|
842
|
+
return g[0] = U * B + S * i + r * D + c * n, g[1] = U * C + S * o + r * h + c * F, g[2] = U * Q + S * a + r * t + c * G, g[3] = U * E + S * s + r * y + c * L, U = I[4], S = I[5], r = I[6], c = I[7], g[4] = U * B + S * i + r * D + c * n, g[5] = U * C + S * o + r * h + c * F, g[6] = U * Q + S * a + r * t + c * G, g[7] = U * E + S * s + r * y + c * L, U = I[8], S = I[9], r = I[10], c = I[11], g[8] = U * B + S * i + r * D + c * n, g[9] = U * C + S * o + r * h + c * F, g[10] = U * Q + S * a + r * t + c * G, g[11] = U * E + S * s + r * y + c * L, U = I[12], S = I[13], r = I[14], c = I[15], g[12] = U * B + S * i + r * D + c * n, g[13] = U * C + S * o + r * h + c * F, g[14] = U * Q + S * a + r * t + c * G, g[15] = U * E + S * s + r * y + c * L, g;
|
|
843
843
|
}
|
|
844
844
|
function bC(g, A, I) {
|
|
845
845
|
var B = I[0], C = I[1], Q = I[2], E, i, o, a, s, D, h, t, y, n, F, G;
|
|
@@ -849,8 +849,8 @@ function vB(g, A) {
|
|
|
849
849
|
return g[0] = A[0], g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[5] = A[1], g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[10] = A[2], g[11] = 0, g[12] = 0, g[13] = 0, g[14] = 0, g[15] = 1, g;
|
|
850
850
|
}
|
|
851
851
|
function ZC(g, A, I, B) {
|
|
852
|
-
var C = A[0], Q = A[1], E = A[2], i = A[3], o = C + C, a = Q + Q, s = E + E, D = C * o, h = C * a, t = C * s, y = Q * a, n = Q * s, F = E * s, G = i * o,
|
|
853
|
-
return g[0] = (1 - (y + F)) * S, g[1] = (h + U) * S, g[2] = (t -
|
|
852
|
+
var C = A[0], Q = A[1], E = A[2], i = A[3], o = C + C, a = Q + Q, s = E + E, D = C * o, h = C * a, t = C * s, y = Q * a, n = Q * s, F = E * s, G = i * o, L = i * a, U = i * s, S = B[0], r = B[1], c = B[2];
|
|
853
|
+
return g[0] = (1 - (y + F)) * S, g[1] = (h + U) * S, g[2] = (t - L) * S, g[3] = 0, g[4] = (h - U) * r, g[5] = (1 - (D + F)) * r, g[6] = (n + G) * r, g[7] = 0, g[8] = (t + L) * c, g[9] = (n - G) * c, g[10] = (1 - (D + y)) * c, g[11] = 0, g[12] = I[0], g[13] = I[1], g[14] = I[2], g[15] = 1, g;
|
|
854
854
|
}
|
|
855
855
|
function PC(g, A, I, B, C) {
|
|
856
856
|
var Q = 1 / Math.tan(A / 2);
|
|
@@ -874,8 +874,8 @@ function XC(g, A, I, B) {
|
|
|
874
874
|
return t = y * y + n * n + F * F, t > 0 && (t = 1 / Math.sqrt(t), y *= t, n *= t, F *= t), g[0] = y, g[1] = n, g[2] = F, g[3] = 0, g[4] = D * F - h * n, g[5] = h * y - s * F, g[6] = s * n - D * y, g[7] = 0, g[8] = s, g[9] = D, g[10] = h, g[11] = 0, g[12] = C, g[13] = Q, g[14] = E, g[15] = 1, g;
|
|
875
875
|
}
|
|
876
876
|
function jC(g, A) {
|
|
877
|
-
var I = g[0], B = g[1], C = g[2], Q = g[3], E = g[4], i = g[5], o = g[6], a = g[7], s = g[8], D = g[9], h = g[10], t = g[11], y = g[12], n = g[13], F = g[14], G = g[15],
|
|
878
|
-
return Math.abs(I -
|
|
877
|
+
var I = g[0], B = g[1], C = g[2], Q = g[3], E = g[4], i = g[5], o = g[6], a = g[7], s = g[8], D = g[9], h = g[10], t = g[11], y = g[12], n = g[13], F = g[14], G = g[15], L = A[0], U = A[1], S = A[2], r = A[3], c = A[4], f = A[5], Z = A[6], j = A[7], b = A[8], z = A[9], oA = A[10], aA = A[11], P = A[12], Wg = A[13], bg = A[14], Zg = A[15];
|
|
878
|
+
return Math.abs(I - L) <= T * Math.max(1, Math.abs(I), Math.abs(L)) && Math.abs(B - U) <= T * Math.max(1, Math.abs(B), Math.abs(U)) && Math.abs(C - S) <= T * Math.max(1, Math.abs(C), Math.abs(S)) && Math.abs(Q - r) <= T * Math.max(1, Math.abs(Q), Math.abs(r)) && Math.abs(E - c) <= T * Math.max(1, Math.abs(E), Math.abs(c)) && Math.abs(i - f) <= T * Math.max(1, Math.abs(i), Math.abs(f)) && Math.abs(o - Z) <= T * Math.max(1, Math.abs(o), Math.abs(Z)) && Math.abs(a - j) <= T * Math.max(1, Math.abs(a), Math.abs(j)) && Math.abs(s - b) <= T * Math.max(1, Math.abs(s), Math.abs(b)) && Math.abs(D - z) <= T * Math.max(1, Math.abs(D), Math.abs(z)) && Math.abs(h - oA) <= T * Math.max(1, Math.abs(h), Math.abs(oA)) && Math.abs(t - aA) <= T * Math.max(1, Math.abs(t), Math.abs(aA)) && Math.abs(y - P) <= T * Math.max(1, Math.abs(y), Math.abs(P)) && Math.abs(n - Wg) <= T * Math.max(1, Math.abs(n), Math.abs(Wg)) && Math.abs(F - bg) <= T * Math.max(1, Math.abs(F), Math.abs(bg)) && Math.abs(G - Zg) <= T * Math.max(1, Math.abs(G), Math.abs(Zg));
|
|
879
879
|
}
|
|
880
880
|
function d() {
|
|
881
881
|
var g = new X(3);
|
|
@@ -1155,6 +1155,7 @@ const hQ = {
|
|
|
1155
1155
|
marker: 8
|
|
1156
1156
|
};
|
|
1157
1157
|
class mA extends YI {
|
|
1158
|
+
instanceCount = null;
|
|
1158
1159
|
boundingBox_ = null;
|
|
1159
1160
|
primitive_;
|
|
1160
1161
|
attributes_;
|
|
@@ -1565,6 +1566,12 @@ class wQ {
|
|
|
1565
1566
|
format: this.gl_.RGBA,
|
|
1566
1567
|
type: this.gl_.UNSIGNED_BYTE
|
|
1567
1568
|
};
|
|
1569
|
+
if (A === "rgba" && I === "unsigned_int")
|
|
1570
|
+
return {
|
|
1571
|
+
internalFormat: this.gl_.RGBA32UI,
|
|
1572
|
+
format: this.gl_.RGBA_INTEGER,
|
|
1573
|
+
type: this.gl_.UNSIGNED_INT
|
|
1574
|
+
};
|
|
1568
1575
|
if (A === "rgb" && I === "unsigned_byte")
|
|
1569
1576
|
return {
|
|
1570
1577
|
internalFormat: this.gl_.RGB8,
|
|
@@ -1883,7 +1890,7 @@ class RQ extends kC {
|
|
|
1883
1890
|
super(A);
|
|
1884
1891
|
const I = this.canvas.getContext("webgl2", {
|
|
1885
1892
|
depth: !0,
|
|
1886
|
-
antialias: !
|
|
1893
|
+
antialias: !1,
|
|
1887
1894
|
stencil: !0
|
|
1888
1895
|
});
|
|
1889
1896
|
if (!I)
|
|
@@ -2002,63 +2009,74 @@ class RQ extends kC {
|
|
|
2002
2009
|
...B.getUniforms(),
|
|
2003
2010
|
...a
|
|
2004
2011
|
};
|
|
2005
|
-
for (const
|
|
2006
|
-
switch (
|
|
2012
|
+
for (const n of C.uniformNames)
|
|
2013
|
+
switch (n) {
|
|
2007
2014
|
case "u_modelView":
|
|
2008
|
-
C.setUniform(
|
|
2015
|
+
C.setUniform(n, E);
|
|
2009
2016
|
break;
|
|
2010
2017
|
case "u_model":
|
|
2011
|
-
C.setUniform(
|
|
2018
|
+
C.setUniform(n, I.transform.matrix);
|
|
2012
2019
|
break;
|
|
2013
2020
|
case "u_projection":
|
|
2014
|
-
C.setUniform(
|
|
2021
|
+
C.setUniform(n, i);
|
|
2015
2022
|
break;
|
|
2016
2023
|
case "u_resolution":
|
|
2017
|
-
C.setUniform(
|
|
2024
|
+
C.setUniform(n, o);
|
|
2018
2025
|
break;
|
|
2019
2026
|
case "u_hasSceneDepth":
|
|
2020
2027
|
C.setUniform(
|
|
2021
|
-
|
|
2028
|
+
n,
|
|
2022
2029
|
Number(
|
|
2023
2030
|
B.requiresSceneDepth && this.currentViewportHasSceneDepth_
|
|
2024
2031
|
)
|
|
2025
2032
|
);
|
|
2026
2033
|
break;
|
|
2027
2034
|
case "u_sceneDepth":
|
|
2028
|
-
C.setUniform(
|
|
2035
|
+
C.setUniform(n, this.depthTarget_.textureUnit);
|
|
2029
2036
|
break;
|
|
2030
2037
|
case "u_mvpInverse": {
|
|
2031
|
-
const
|
|
2032
|
-
C.setUniform(
|
|
2038
|
+
const F = QI($(), i, E), G = OA($(), F);
|
|
2039
|
+
C.setUniform(n, G);
|
|
2033
2040
|
break;
|
|
2034
2041
|
}
|
|
2035
2042
|
case "u_opacity":
|
|
2036
2043
|
C.setUniform(
|
|
2037
|
-
|
|
2044
|
+
n,
|
|
2038
2045
|
B.opacity * (a.Opacity ?? 1)
|
|
2039
2046
|
);
|
|
2040
2047
|
break;
|
|
2041
2048
|
case "u_cameraPositionModel": {
|
|
2042
|
-
const
|
|
2049
|
+
const F = OA($(), E), G = DI(0, 0, 0, 1), L = VA(
|
|
2043
2050
|
YA(),
|
|
2044
|
-
|
|
2045
|
-
|
|
2051
|
+
G,
|
|
2052
|
+
F
|
|
2046
2053
|
);
|
|
2047
2054
|
C.setUniform(
|
|
2048
|
-
|
|
2055
|
+
n,
|
|
2049
2056
|
p(
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2057
|
+
L[0],
|
|
2058
|
+
L[1],
|
|
2059
|
+
L[2]
|
|
2053
2060
|
)
|
|
2054
2061
|
);
|
|
2055
2062
|
break;
|
|
2056
2063
|
}
|
|
2057
2064
|
default:
|
|
2058
|
-
|
|
2065
|
+
n in D && C.setUniform(n, D[n]);
|
|
2059
2066
|
}
|
|
2060
|
-
const h = this.glGetPrimitive(A.primitive), t = A.indexData;
|
|
2061
|
-
|
|
2067
|
+
const h = this.glGetPrimitive(A.primitive), t = A.indexData, { instanceCount: y } = A;
|
|
2068
|
+
y !== null ? t.length ? this.gl_.drawElementsInstanced(
|
|
2069
|
+
h,
|
|
2070
|
+
t.length,
|
|
2071
|
+
this.gl_.UNSIGNED_INT,
|
|
2072
|
+
0,
|
|
2073
|
+
y
|
|
2074
|
+
) : this.gl_.drawArraysInstanced(
|
|
2075
|
+
h,
|
|
2076
|
+
0,
|
|
2077
|
+
A.vertexCount,
|
|
2078
|
+
y
|
|
2079
|
+
) : t.length ? this.gl_.drawElements(h, t.length, this.gl_.UNSIGNED_INT, 0) : this.gl_.drawArrays(h, 0, A.vertexCount);
|
|
2062
2080
|
}
|
|
2063
2081
|
uploadTexture(A) {
|
|
2064
2082
|
this.textures_.uploadTexture(A);
|
|
@@ -2303,16 +2321,16 @@ class JQ {
|
|
|
2303
2321
|
this.chunkViewStates_.forEach(xA);
|
|
2304
2322
|
const t = this.channelsOfInterest(A), y = this.fallbackLOD(), n = this.getPaddedBounds(h), F = this.currentLOD_ === y ? [this.currentLOD_] : [this.currentLOD_, y];
|
|
2305
2323
|
for (const G of F) {
|
|
2306
|
-
const
|
|
2324
|
+
const L = G === this.currentLOD_, U = G === y;
|
|
2307
2325
|
this.iterateChunksInBox(
|
|
2308
2326
|
s,
|
|
2309
2327
|
G,
|
|
2310
2328
|
t,
|
|
2311
2329
|
n,
|
|
2312
2330
|
(S, r) => {
|
|
2313
|
-
const c = SA.intersects(r, h), f =
|
|
2331
|
+
const c = SA.intersects(r, h), f = L && !c, Z = this.computePriority(
|
|
2314
2332
|
U,
|
|
2315
|
-
|
|
2333
|
+
L,
|
|
2316
2334
|
c,
|
|
2317
2335
|
f,
|
|
2318
2336
|
!0
|
|
@@ -2462,8 +2480,8 @@ class JQ {
|
|
|
2462
2480
|
// Half-open chunk-index range [min, max) at a given LOD that covers `bounds`.
|
|
2463
2481
|
// Returns null if the bounds don't overlap the data grid.
|
|
2464
2482
|
chunkIndexRange(A, I) {
|
|
2465
|
-
const B = this.store_.dimensions, C = B.x.lods[I], Q = B.y.lods[I], E = B.z?.lods[I], i = Math.ceil(C.size / C.chunkSize), o = Math.ceil(Q.size / Q.chunkSize), a = E ? Math.ceil(E.size / E.chunkSize) : 1, s = C.chunkSize * C.scale, D = Q.chunkSize * Q.scale, h = E ? E.chunkSize * E.scale : 1, t = C.translation, y = Q.translation, n = E?.translation ?? 0, F = Math.max(0, Math.floor((A.min[0] - t) / s)), G = Math.min(i, Math.ceil((A.max[0] - t) / s)),
|
|
2466
|
-
return F >= G ||
|
|
2483
|
+
const B = this.store_.dimensions, C = B.x.lods[I], Q = B.y.lods[I], E = B.z?.lods[I], i = Math.ceil(C.size / C.chunkSize), o = Math.ceil(Q.size / Q.chunkSize), a = E ? Math.ceil(E.size / E.chunkSize) : 1, s = C.chunkSize * C.scale, D = Q.chunkSize * Q.scale, h = E ? E.chunkSize * E.scale : 1, t = C.translation, y = Q.translation, n = E?.translation ?? 0, F = Math.max(0, Math.floor((A.min[0] - t) / s)), G = Math.min(i, Math.ceil((A.max[0] - t) / s)), L = Math.max(0, Math.floor((A.min[1] - y) / D)), U = Math.min(o, Math.ceil((A.max[1] - y) / D)), S = E ? Math.max(0, Math.floor((A.min[2] - n) / h)) : 0, r = E ? Math.min(a, Math.ceil((A.max[2] - n) / h)) : 1;
|
|
2484
|
+
return F >= G || L >= U || S >= r ? null : { xMin: F, xMax: G, yMin: L, yMax: U, zMin: S, zMax: r };
|
|
2467
2485
|
}
|
|
2468
2486
|
iterateChunksInBox(A, I, B, C, Q) {
|
|
2469
2487
|
const E = this.chunkIndexRange(C, I);
|
|
@@ -2579,9 +2597,9 @@ class YQ {
|
|
|
2579
2597
|
for (let F = 0; F < I; ++F) {
|
|
2580
2598
|
const G = new Array(B);
|
|
2581
2599
|
n[F] = G;
|
|
2582
|
-
for (let
|
|
2600
|
+
for (let L = 0; L < B; ++L) {
|
|
2583
2601
|
const U = new Array(y);
|
|
2584
|
-
G[
|
|
2602
|
+
G[L] = U;
|
|
2585
2603
|
for (let S = 0; S < y; ++S) {
|
|
2586
2604
|
const r = o !== void 0 ? o.translation + S * D * o.scale : 0, c = new Array(t);
|
|
2587
2605
|
U[S] = c;
|
|
@@ -2604,7 +2622,7 @@ class YQ {
|
|
|
2604
2622
|
c: 1
|
|
2605
2623
|
},
|
|
2606
2624
|
rowAlignmentBytes: 1,
|
|
2607
|
-
chunkIndex: { x: b, y: f, z: S, c:
|
|
2625
|
+
chunkIndex: { x: b, y: f, z: S, c: L, t: F },
|
|
2608
2626
|
scale: {
|
|
2609
2627
|
x: E.scale,
|
|
2610
2628
|
y: i.scale,
|
|
@@ -2908,8 +2926,8 @@ PA.Panel = function(g, A, I, B) {
|
|
|
2908
2926
|
var G = F.getContext("2d");
|
|
2909
2927
|
return G.font = "bold " + E(9 * i * B) + "px Helvetica,Arial,sans-serif", G.textBaseline = "top", G.fillStyle = I, G.fillRect(0, 0, o, a), G.fillStyle = A, G.fillText(g, s, D), G.fillRect(h, t, y, n), G.fillStyle = I, G.globalAlpha = 0.9, G.fillRect(h, t, y, n), {
|
|
2910
2928
|
dom: F,
|
|
2911
|
-
update: function(
|
|
2912
|
-
C = Math.min(C,
|
|
2929
|
+
update: function(L, U) {
|
|
2930
|
+
C = Math.min(C, L), Q = Math.max(Q, L), G.fillStyle = I, G.globalAlpha = 1, G.fillRect(0, 0, o, t), G.fillStyle = A, G.fillText(E(L) + " " + g + " (" + E(C) + "-" + E(Q) + ")", s, D), G.drawImage(F, h + i, t, y - i, n, h, t, y - i, n), G.fillRect(h + y - i, t, i, n), G.fillStyle = I, G.globalAlpha = 0.9, G.fillRect(h + y - i, t, i, E((1 - L / U) * n));
|
|
2913
2931
|
}
|
|
2914
2932
|
};
|
|
2915
2933
|
};
|
|
@@ -4616,10 +4634,10 @@ function wE(g, A, I, B) {
|
|
|
4616
4634
|
let t = await o[h];
|
|
4617
4635
|
if (t === null)
|
|
4618
4636
|
return;
|
|
4619
|
-
let { data: y, shape: n, stride: F } = t, G = a.map((S, r) => S % n[r]).reduce((S, r, c) => S + r * F[c], 0),
|
|
4620
|
-
if (!(
|
|
4637
|
+
let { data: y, shape: n, stride: F } = t, G = a.map((S, r) => S % n[r]).reduce((S, r, c) => S + r * F[c], 0), L = y[G], U = y[G + 1];
|
|
4638
|
+
if (!(L === GB && U === GB))
|
|
4621
4639
|
return C(h, {
|
|
4622
|
-
offset: Number(
|
|
4640
|
+
offset: Number(L),
|
|
4623
4641
|
length: Number(U)
|
|
4624
4642
|
}, s);
|
|
4625
4643
|
};
|
|
@@ -4975,10 +4993,10 @@ function KE(g, A, I, B) {
|
|
|
4975
4993
|
return g;
|
|
4976
4994
|
const G = new g.constructor(
|
|
4977
4995
|
D
|
|
4978
|
-
),
|
|
4996
|
+
), L = E.z !== void 0 ? I[E.z] : 0, U = I[E.y];
|
|
4979
4997
|
let S = 0;
|
|
4980
4998
|
for (let r = 0; r < C.z; r++) {
|
|
4981
|
-
const c = y + r *
|
|
4999
|
+
const c = y + r * L;
|
|
4982
5000
|
for (let f = 0; f < C.y; f++) {
|
|
4983
5001
|
const Z = c + f * U, j = Z + C.x;
|
|
4984
5002
|
G.set(g.subarray(Z, j), S), S += C.x;
|
|
@@ -8890,12 +8908,12 @@ function ZE(g, A) {
|
|
|
8890
8908
|
const I = g.axes.map((D) => D.name), B = g.axes.length, C = cB(I, "x"), Q = cB(I, "y"), E = (D, h) => {
|
|
8891
8909
|
const t = [];
|
|
8892
8910
|
for (let y = 0; y < g.datasets.length; y++) {
|
|
8893
|
-
const n = g.datasets[y], F = A[y], G = n.coordinateTransformations[0].scale,
|
|
8911
|
+
const n = g.datasets[y], F = A[y], G = n.coordinateTransformations[0].scale, L = n.coordinateTransformations.length === 2 ? n.coordinateTransformations[1].translation : new Array(B).fill(0);
|
|
8894
8912
|
t.push({
|
|
8895
8913
|
size: F.shape[h],
|
|
8896
8914
|
chunkSize: F.chunks[h],
|
|
8897
8915
|
scale: G[h],
|
|
8898
|
-
translation:
|
|
8916
|
+
translation: L[h]
|
|
8899
8917
|
});
|
|
8900
8918
|
}
|
|
8901
8919
|
if (g.axes[h].type === "space" && OE(t))
|
|
@@ -11534,7 +11552,7 @@ var M;
|
|
|
11534
11552
|
})(M || (M = {}));
|
|
11535
11553
|
const u = eA.create, H = HA.create, tC = Eg.create, nA = ig.create;
|
|
11536
11554
|
FA.create;
|
|
11537
|
-
const m = DA.create,
|
|
11555
|
+
const m = DA.create, J = O.create;
|
|
11538
11556
|
cI.create;
|
|
11539
11557
|
UI.create;
|
|
11540
11558
|
cA.create;
|
|
@@ -11542,22 +11560,22 @@ const _ = ag.create, JA = qA.create;
|
|
|
11542
11560
|
kI.create;
|
|
11543
11561
|
GA.create;
|
|
11544
11562
|
fA.create;
|
|
11545
|
-
const Fi =
|
|
11563
|
+
const Fi = J({
|
|
11546
11564
|
/**The multiscale datasets for this image*/
|
|
11547
11565
|
multiscales: m(
|
|
11548
|
-
|
|
11566
|
+
J({
|
|
11549
11567
|
name: u().optional(),
|
|
11550
11568
|
datasets: m(
|
|
11551
|
-
|
|
11569
|
+
J({
|
|
11552
11570
|
path: u(),
|
|
11553
11571
|
coordinateTransformations: m(
|
|
11554
11572
|
nA().superRefine((g, A) => {
|
|
11555
11573
|
const I = [
|
|
11556
|
-
|
|
11574
|
+
J({
|
|
11557
11575
|
type: _("scale"),
|
|
11558
11576
|
scale: m(H()).min(2)
|
|
11559
11577
|
}),
|
|
11560
|
-
|
|
11578
|
+
J({
|
|
11561
11579
|
type: _("translation"),
|
|
11562
11580
|
translation: m(H()).min(2)
|
|
11563
11581
|
})
|
|
@@ -11581,11 +11599,11 @@ const Fi = L({
|
|
|
11581
11599
|
axes: m(
|
|
11582
11600
|
nA().superRefine((g, A) => {
|
|
11583
11601
|
const I = [
|
|
11584
|
-
|
|
11602
|
+
J({
|
|
11585
11603
|
name: u(),
|
|
11586
11604
|
type: JA(["channel", "time", "space"])
|
|
11587
11605
|
}),
|
|
11588
|
-
|
|
11606
|
+
J({
|
|
11589
11607
|
name: u(),
|
|
11590
11608
|
type: nA().refine(
|
|
11591
11609
|
(C) => !JA(["space", "time", "channel"]).safeParse(C).success,
|
|
@@ -11609,11 +11627,11 @@ const Fi = L({
|
|
|
11609
11627
|
coordinateTransformations: m(
|
|
11610
11628
|
nA().superRefine((g, A) => {
|
|
11611
11629
|
const I = [
|
|
11612
|
-
|
|
11630
|
+
J({
|
|
11613
11631
|
type: _("scale"),
|
|
11614
11632
|
scale: m(H()).min(2)
|
|
11615
11633
|
}),
|
|
11616
|
-
|
|
11634
|
+
J({
|
|
11617
11635
|
type: _("translation"),
|
|
11618
11636
|
translation: m(H()).min(2)
|
|
11619
11637
|
}),
|
|
@@ -11624,7 +11642,7 @@ const Fi = L({
|
|
|
11624
11642
|
// after generation from the schema.
|
|
11625
11643
|
// See the following PR for more context:
|
|
11626
11644
|
// https://github.com/ome/ngff/pull/152
|
|
11627
|
-
|
|
11645
|
+
J({
|
|
11628
11646
|
type: _("identity")
|
|
11629
11647
|
})
|
|
11630
11648
|
], B = I.reduce(
|
|
@@ -11643,10 +11661,10 @@ const Fi = L({
|
|
|
11643
11661
|
).min(1).optional()
|
|
11644
11662
|
})
|
|
11645
11663
|
).min(1).describe("The multiscale datasets for this image"),
|
|
11646
|
-
omero:
|
|
11664
|
+
omero: J({
|
|
11647
11665
|
channels: m(
|
|
11648
|
-
|
|
11649
|
-
window:
|
|
11666
|
+
J({
|
|
11667
|
+
window: J({
|
|
11650
11668
|
end: H(),
|
|
11651
11669
|
max: H(),
|
|
11652
11670
|
min: H(),
|
|
@@ -11663,18 +11681,18 @@ const Fi = L({
|
|
|
11663
11681
|
// (e.g. iohub), so we manually add them.
|
|
11664
11682
|
// See the OMERO docs for more information:
|
|
11665
11683
|
// https://docs.openmicroscopy.org/omero/5.6.1/developers/Web/WebGateway.html#rendering-settings
|
|
11666
|
-
rdefs:
|
|
11684
|
+
rdefs: J({
|
|
11667
11685
|
defaultT: H().optional(),
|
|
11668
11686
|
defaultZ: H().optional(),
|
|
11669
11687
|
color: JA(["color", "greyscale"]).optional(),
|
|
11670
11688
|
projection: u().optional()
|
|
11671
11689
|
}).optional()
|
|
11672
11690
|
}).optional()
|
|
11673
|
-
}).describe("JSON from OME-NGFF .zattrs"), ri =
|
|
11674
|
-
plate:
|
|
11691
|
+
}).describe("JSON from OME-NGFF .zattrs"), ri = J({
|
|
11692
|
+
plate: J({
|
|
11675
11693
|
/**The acquisitions for this plate*/
|
|
11676
11694
|
acquisitions: m(
|
|
11677
|
-
|
|
11695
|
+
J({
|
|
11678
11696
|
/**A unique identifier within the context of the plate*/
|
|
11679
11697
|
id: H().int().gte(0).describe(
|
|
11680
11698
|
"A unique identifier within the context of the plate"
|
|
@@ -11705,21 +11723,21 @@ const Fi = L({
|
|
|
11705
11723
|
name: u().describe("The name of the plate").optional(),
|
|
11706
11724
|
/**The columns of the plate*/
|
|
11707
11725
|
columns: m(
|
|
11708
|
-
|
|
11726
|
+
J({
|
|
11709
11727
|
/**The column name*/
|
|
11710
11728
|
name: u().regex(new RegExp("^[A-Za-z0-9]+$")).describe("The column name")
|
|
11711
11729
|
})
|
|
11712
11730
|
).min(1).describe("The columns of the plate"),
|
|
11713
11731
|
/**The rows of the plate*/
|
|
11714
11732
|
rows: m(
|
|
11715
|
-
|
|
11733
|
+
J({
|
|
11716
11734
|
/**The row name*/
|
|
11717
11735
|
name: u().regex(new RegExp("^[A-Za-z0-9]+$")).describe("The row name")
|
|
11718
11736
|
})
|
|
11719
11737
|
).min(1).describe("The rows of the plate"),
|
|
11720
11738
|
/**The wells of the plate*/
|
|
11721
11739
|
wells: m(
|
|
11722
|
-
|
|
11740
|
+
J({
|
|
11723
11741
|
/**The path to the well subgroup*/
|
|
11724
11742
|
path: u().regex(new RegExp("^[A-Za-z0-9]+/[A-Za-z0-9]+$")).describe("The path to the well subgroup"),
|
|
11725
11743
|
/**The index of the well in the rows list*/
|
|
@@ -11729,11 +11747,11 @@ const Fi = L({
|
|
|
11729
11747
|
})
|
|
11730
11748
|
).min(1).describe("The wells of the plate")
|
|
11731
11749
|
}).optional()
|
|
11732
|
-
}).describe("JSON from OME-NGFF .zattrs"), Si =
|
|
11733
|
-
well:
|
|
11750
|
+
}).describe("JSON from OME-NGFF .zattrs"), Si = J({
|
|
11751
|
+
well: J({
|
|
11734
11752
|
/**The fields of view for this well*/
|
|
11735
11753
|
images: m(
|
|
11736
|
-
|
|
11754
|
+
J({
|
|
11737
11755
|
/**A unique identifier within the context of the plate*/
|
|
11738
11756
|
acquisition: H().int().describe("A unique identifier within the context of the plate").optional(),
|
|
11739
11757
|
/**The path for this field of view subgroup*/
|
|
@@ -11743,24 +11761,24 @@ const Fi = L({
|
|
|
11743
11761
|
/**The version of the specification*/
|
|
11744
11762
|
version: _("0.4").describe("The version of the specification").optional()
|
|
11745
11763
|
}).optional()
|
|
11746
|
-
}).describe("JSON from OME-NGFF .zattrs"), Ri =
|
|
11764
|
+
}).describe("JSON from OME-NGFF .zattrs"), Ri = J({
|
|
11747
11765
|
/**The versioned OME-Zarr Metadata namespace*/
|
|
11748
|
-
ome:
|
|
11766
|
+
ome: J({
|
|
11749
11767
|
/**The multiscale datasets for this image*/
|
|
11750
11768
|
multiscales: m(
|
|
11751
|
-
|
|
11769
|
+
J({
|
|
11752
11770
|
name: u().optional(),
|
|
11753
11771
|
datasets: m(
|
|
11754
|
-
|
|
11772
|
+
J({
|
|
11755
11773
|
path: u(),
|
|
11756
11774
|
coordinateTransformations: m(
|
|
11757
11775
|
nA().superRefine((g, A) => {
|
|
11758
11776
|
const I = [
|
|
11759
|
-
|
|
11777
|
+
J({
|
|
11760
11778
|
type: _("scale"),
|
|
11761
11779
|
scale: m(H()).min(2)
|
|
11762
11780
|
}),
|
|
11763
|
-
|
|
11781
|
+
J({
|
|
11764
11782
|
type: _("translation"),
|
|
11765
11783
|
translation: m(H()).min(2)
|
|
11766
11784
|
})
|
|
@@ -11781,11 +11799,11 @@ const Fi = L({
|
|
|
11781
11799
|
axes: m(
|
|
11782
11800
|
nA().superRefine((g, A) => {
|
|
11783
11801
|
const I = [
|
|
11784
|
-
|
|
11802
|
+
J({
|
|
11785
11803
|
name: u(),
|
|
11786
11804
|
type: JA(["channel", "time", "space"])
|
|
11787
11805
|
}),
|
|
11788
|
-
|
|
11806
|
+
J({
|
|
11789
11807
|
name: u(),
|
|
11790
11808
|
type: nA().refine(
|
|
11791
11809
|
(C) => !JA(["space", "time", "channel"]).safeParse(C).success,
|
|
@@ -11809,11 +11827,11 @@ const Fi = L({
|
|
|
11809
11827
|
coordinateTransformations: m(
|
|
11810
11828
|
nA().superRefine((g, A) => {
|
|
11811
11829
|
const I = [
|
|
11812
|
-
|
|
11830
|
+
J({
|
|
11813
11831
|
type: _("scale"),
|
|
11814
11832
|
scale: m(H()).min(2)
|
|
11815
11833
|
}),
|
|
11816
|
-
|
|
11834
|
+
J({
|
|
11817
11835
|
type: _("translation"),
|
|
11818
11836
|
translation: m(H()).min(2)
|
|
11819
11837
|
}),
|
|
@@ -11824,7 +11842,7 @@ const Fi = L({
|
|
|
11824
11842
|
// after generation from the schema.
|
|
11825
11843
|
// See the following PR for more context:
|
|
11826
11844
|
// https://github.com/ome/ngff/pull/152
|
|
11827
|
-
|
|
11845
|
+
J({
|
|
11828
11846
|
type: _("identity")
|
|
11829
11847
|
})
|
|
11830
11848
|
], B = I.reduce(
|
|
@@ -11843,10 +11861,10 @@ const Fi = L({
|
|
|
11843
11861
|
).min(1).optional()
|
|
11844
11862
|
})
|
|
11845
11863
|
).min(1).describe("The multiscale datasets for this image"),
|
|
11846
|
-
omero:
|
|
11864
|
+
omero: J({
|
|
11847
11865
|
channels: m(
|
|
11848
|
-
|
|
11849
|
-
window:
|
|
11866
|
+
J({
|
|
11867
|
+
window: J({
|
|
11850
11868
|
end: H(),
|
|
11851
11869
|
max: H(),
|
|
11852
11870
|
min: H(),
|
|
@@ -11863,7 +11881,7 @@ const Fi = L({
|
|
|
11863
11881
|
// (e.g. iohub), so we manually add them.
|
|
11864
11882
|
// See the OMERO docs for more information:
|
|
11865
11883
|
// https://docs.openmicroscopy.org/omero/5.6.1/developers/Web/WebGateway.html#rendering-settings
|
|
11866
|
-
rdefs:
|
|
11884
|
+
rdefs: J({
|
|
11867
11885
|
defaultT: H().optional(),
|
|
11868
11886
|
defaultZ: H().optional(),
|
|
11869
11887
|
color: JA(["color", "greyscale"]).optional(),
|
|
@@ -11873,13 +11891,13 @@ const Fi = L({
|
|
|
11873
11891
|
/**The version of the OME-Zarr Metadata*/
|
|
11874
11892
|
version: _("0.5").describe("The version of the OME-Zarr Metadata")
|
|
11875
11893
|
}).describe("The versioned OME-Zarr Metadata namespace")
|
|
11876
|
-
}).describe("The zarr.json attributes key"), Ni =
|
|
11894
|
+
}).describe("The zarr.json attributes key"), Ni = J({
|
|
11877
11895
|
/**The versioned OME-Zarr Metadata namespace*/
|
|
11878
|
-
ome:
|
|
11879
|
-
plate:
|
|
11896
|
+
ome: J({
|
|
11897
|
+
plate: J({
|
|
11880
11898
|
/**The acquisitions for this plate*/
|
|
11881
11899
|
acquisitions: m(
|
|
11882
|
-
|
|
11900
|
+
J({
|
|
11883
11901
|
/**A unique identifier within the context of the plate*/
|
|
11884
11902
|
id: H().int().gte(0).describe(
|
|
11885
11903
|
"A unique identifier within the context of the plate"
|
|
@@ -11908,21 +11926,21 @@ const Fi = L({
|
|
|
11908
11926
|
name: u().describe("The name of the plate").optional(),
|
|
11909
11927
|
/**The columns of the plate*/
|
|
11910
11928
|
columns: m(
|
|
11911
|
-
|
|
11929
|
+
J({
|
|
11912
11930
|
/**The column name*/
|
|
11913
11931
|
name: u().regex(new RegExp("^[A-Za-z0-9]+$")).describe("The column name")
|
|
11914
11932
|
})
|
|
11915
11933
|
).min(1).describe("The columns of the plate"),
|
|
11916
11934
|
/**The rows of the plate*/
|
|
11917
11935
|
rows: m(
|
|
11918
|
-
|
|
11936
|
+
J({
|
|
11919
11937
|
/**The row name*/
|
|
11920
11938
|
name: u().regex(new RegExp("^[A-Za-z0-9]+$")).describe("The row name")
|
|
11921
11939
|
})
|
|
11922
11940
|
).min(1).describe("The rows of the plate"),
|
|
11923
11941
|
/**The wells of the plate*/
|
|
11924
11942
|
wells: m(
|
|
11925
|
-
|
|
11943
|
+
J({
|
|
11926
11944
|
/**The path to the well subgroup*/
|
|
11927
11945
|
path: u().regex(new RegExp("^[A-Za-z0-9]+/[A-Za-z0-9]+$")).describe("The path to the well subgroup"),
|
|
11928
11946
|
/**The index of the well in the rows list*/
|
|
@@ -11935,13 +11953,13 @@ const Fi = L({
|
|
|
11935
11953
|
/**The version of the OME-Zarr Metadata*/
|
|
11936
11954
|
version: _("0.5").describe("The version of the OME-Zarr Metadata")
|
|
11937
11955
|
}).describe("The versioned OME-Zarr Metadata namespace")
|
|
11938
|
-
}).describe("The zarr.json attributes key"), ci =
|
|
11956
|
+
}).describe("The zarr.json attributes key"), ci = J({
|
|
11939
11957
|
/**The versioned OME-Zarr Metadata namespace*/
|
|
11940
|
-
ome:
|
|
11941
|
-
well:
|
|
11958
|
+
ome: J({
|
|
11959
|
+
well: J({
|
|
11942
11960
|
/**The fields of view for this well*/
|
|
11943
11961
|
images: m(
|
|
11944
|
-
|
|
11962
|
+
J({
|
|
11945
11963
|
/**A unique identifier within the context of the plate*/
|
|
11946
11964
|
acquisition: H().int().describe(
|
|
11947
11965
|
"A unique identifier within the context of the plate"
|
|
@@ -12953,14 +12971,14 @@ class wC extends mA {
|
|
|
12953
12971
|
for (let t = 0; t < s; ++t) {
|
|
12954
12972
|
const y = t * h;
|
|
12955
12973
|
for (let n = 0; n < a; ++n) {
|
|
12956
|
-
const F = n * D, G = n / i,
|
|
12974
|
+
const F = n * D, G = n / i, L = t / o, U = [F, y, 0], S = [0, 0, 1], r = [G, L];
|
|
12957
12975
|
Q.push(...U, ...S, ...r);
|
|
12958
12976
|
}
|
|
12959
12977
|
}
|
|
12960
12978
|
for (let t = 0; t < o; ++t)
|
|
12961
12979
|
for (let y = 0; y < i; ++y) {
|
|
12962
|
-
const n = y + a * t, F = y + a * (t + 1), G = y + 1 + a * (t + 1),
|
|
12963
|
-
E.push(n, F,
|
|
12980
|
+
const n = y + a * t, F = y + a * (t + 1), G = y + 1 + a * (t + 1), L = y + 1 + a * t;
|
|
12981
|
+
E.push(n, F, L), E.push(F, G, L);
|
|
12964
12982
|
}
|
|
12965
12983
|
this.vertexData_ = new Float32Array(Q), this.indexData_ = new Uint32Array(E), this.addAttribute({
|
|
12966
12984
|
type: "position",
|
|
@@ -13456,12 +13474,12 @@ class Wi extends mA {
|
|
|
13456
13474
|
});
|
|
13457
13475
|
}
|
|
13458
13476
|
buildFace(A, I, B, C, Q, E, i, o, a, s, D, h, t) {
|
|
13459
|
-
const y = E / a, n = i / s, F = E / 2, G = i / 2,
|
|
13477
|
+
const y = E / a, n = i / s, F = E / 2, G = i / 2, L = o / 2 * D, U = a + 1, S = s + 1, r = h.length / 8;
|
|
13460
13478
|
for (let c = 0; c < S; c++) {
|
|
13461
13479
|
const f = -G + c * n;
|
|
13462
13480
|
for (let Z = 0; Z < U; Z++) {
|
|
13463
13481
|
const j = -F + Z * y, b = { x: 0, y: 0, z: 0 };
|
|
13464
|
-
b[A] = j * C, b[I] = f * Q, b[B] =
|
|
13482
|
+
b[A] = j * C, b[I] = f * Q, b[B] = L;
|
|
13465
13483
|
const z = { x: 0, y: 0, z: 0 };
|
|
13466
13484
|
z[B] = D;
|
|
13467
13485
|
const oA = Z / a, aA = 1 - c / s;
|