@genome-spy/app 0.85.0 → 0.87.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/README.md +28 -0
- package/dist/{agentApi-Cz0hCnVp.js → agentApi-BZ1JCo1N.js} +7174 -8484
- package/dist/agentApi.es.js +3312 -3575
- package/dist/agentShared.es.js +14 -13
- package/dist/canvas2d-B_PnIof-.js +620 -0
- package/dist/canvas2d-Cafq5v-N.js +620 -0
- package/dist/{arrayUtils-LJpQOu-U.js → clipOptions-D6eh9T-_.js} +1060 -634
- package/dist/{paramUtils-BYI4rwyL.js → clipOptions-H68pJyEZ.js} +940 -514
- package/dist/{debug-CgDtmspT.js → debug-BGzgZmyk.js} +8 -8
- package/dist/{debug-BvCZWumf.js → debug-UYKZLNh4.js} +8 -8
- package/dist/index.es.js +2983 -2916
- package/dist/index.js +2006 -1997
- package/dist/indexer-Di57GyxX.js +72 -0
- package/dist/indexer-o6Hpg4nN.js +72 -0
- package/dist/layoutResult-D50MSHXR.js +97 -0
- package/dist/nativeText-D9SoxpaD.js +934 -0
- package/dist/nativeText-DAjvkrzc.js +934 -0
- package/dist/performanceProfiler-CPLEjApa.js +20 -0
- package/dist/rasterExport-DzldLv6E.js +44 -0
- package/dist/rasterExport-IAbJwi8F.js +44 -0
- package/dist/rasterImage-B4rPLaW9.js +18 -0
- package/dist/rasterization-CFogVB3B.js +50 -0
- package/dist/rectangle-DKnrAmKs.js +142 -0
- package/dist/renderCanvas2D-BJ93Ptqj.js +277 -0
- package/dist/renderCanvas2D-yJ1IrDcX.js +277 -0
- package/dist/schema.json +11685 -4428
- package/dist/{svg-yFj875aX.js → svg-BRpl2Xub.js} +412 -449
- package/dist/{svg-CCu8kYy2.js → svg-DJuqHIyc.js} +399 -436
- package/dist/svgRasterizer-CGZQ5njV.js +40 -0
- package/dist/svgRasterizer-PAoqLn1j.js +40 -0
- package/dist/vega-scale-BGC53c22.js +2403 -0
- package/dist/vega-scale-DdW2NzQ3.js +2403 -0
- package/dist/viewError-BiR9VCgL.js +29 -0
- package/dist/{viewIdentityRegistry-BUdkK9zT.js → viewIdentityRegistry-D4p067HU.js} +1 -1
- package/dist/{viewIdentityRegistry-D3oPbN4O.js → viewIdentityRegistry-Dc2hXYsO.js} +1 -1
- package/dist/viewSelectors-DNXnGwEW.js +2015 -0
- package/dist/viewSelectors-DYYlOt91.js +2015 -0
- package/dist/viewUtils-EdhZTPrJ.js +6448 -0
- package/dist/webgl-C53DwzVT.js +4127 -0
- package/dist/webgl-CdgNFlJk.js +4127 -0
- package/package.json +7 -6
- package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
- package/dist/canvas2d-DoAXEiF9.js +0 -309
- package/dist/canvas2d-f5jl4A5D.js +0 -310
- package/dist/clipOptions-gqdb3fvW.js +0 -43
- package/dist/color-W5zffv-z.js +0 -335
- package/dist/framebufferReadback-CCLOjStu.js +0 -148
- package/dist/framebufferReadback-THWwFqs8.js +0 -1994
- package/dist/nativeText-DMO8gLt7.js +0 -806
- package/dist/nativeText-m5AUINMq.js +0 -806
- package/dist/twgl-full.module-DB2UdP1k.js +0 -1849
- package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
- package/dist/viewSelectors-DGCspRN3.js +0 -4198
- package/dist/viewSelectors-U5oLCLHV.js +0 -4195
- package/dist/viewUtils-Dg4RA40Q.js +0 -7503
- package/dist/warning-DRGdb6BF.js +0 -59
- package/dist/webgl-Ci6ZhCCf.js +0 -54
- package/dist/webgl-Dpz8a3TI.js +0 -53
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./color-W5zffv-z.js";
|
|
2
|
-
import { y as t } from "./twgl-full.module-DB2UdP1k.js";
|
|
3
|
-
import { a as n, n as r, o as i } from "./clipOptions-gqdb3fvW.js";
|
|
4
|
-
import { t as a } from "./viewRenderingContext-HtpqwS_x.js";
|
|
5
|
-
//#region ../core/src/view/renderingContext/bufferedViewRenderingContext.js
|
|
6
|
-
var o = class extends a {
|
|
7
|
-
#e = [
|
|
8
|
-
0,
|
|
9
|
-
0,
|
|
10
|
-
0,
|
|
11
|
-
0
|
|
12
|
-
];
|
|
13
|
-
#t;
|
|
14
|
-
#n = [];
|
|
15
|
-
#r;
|
|
16
|
-
#i;
|
|
17
|
-
#a = /* @__PURE__ */ new Set();
|
|
18
|
-
#o;
|
|
19
|
-
#s = void 0;
|
|
20
|
-
#c = 1;
|
|
21
|
-
#l = {
|
|
22
|
-
width: 0,
|
|
23
|
-
height: 0
|
|
24
|
-
};
|
|
25
|
-
#u;
|
|
26
|
-
constructor(t, n) {
|
|
27
|
-
if (super(t), this.#i = n.webGLHelper, this.#r = n.framebufferInfo, this.#c = n.devicePixelRatio, this.#l = n.canvasSize, this.#o = n.markPredicate ?? (() => !0), this.#u = n.pixelOffset, n.clearColor) {
|
|
28
|
-
let t = e(n.clearColor).rgb();
|
|
29
|
-
this.#e = [
|
|
30
|
-
t.r / 255,
|
|
31
|
-
t.g / 255,
|
|
32
|
-
t.b / 255,
|
|
33
|
-
t.opacity
|
|
34
|
-
];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
getDevicePixelRatio() {
|
|
38
|
-
return this.#c;
|
|
39
|
-
}
|
|
40
|
-
pushView(e, t) {
|
|
41
|
-
this.#a.add(e), this.#s = t;
|
|
42
|
-
}
|
|
43
|
-
renderMark(e, t) {
|
|
44
|
-
if (!this.#o(e) || this.globalOptions.picking && !e.isPickingParticipant()) return;
|
|
45
|
-
let r = e.render(t);
|
|
46
|
-
if (r) {
|
|
47
|
-
let a = n(t);
|
|
48
|
-
this.#n.push({
|
|
49
|
-
mark: e,
|
|
50
|
-
callback: r,
|
|
51
|
-
coords: this.#s,
|
|
52
|
-
clip: i(a, e.properties.clip, this.#s),
|
|
53
|
-
cullClip: a
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
render() {
|
|
58
|
-
if (this.#t || this.#d(), this.#t.length == 0) return;
|
|
59
|
-
let e = this.#i.gl, t = this.#r;
|
|
60
|
-
t ? (e.bindFramebuffer(e.FRAMEBUFFER, t.framebuffer), e.viewport(0, 0, t.width, t.height)) : e.viewport(0, 0, e.drawingBufferWidth, e.drawingBufferHeight), e.disable(e.SCISSOR_TEST), e.clearColor(...this.#e), e.clear(e.COLOR_BUFFER_BIT);
|
|
61
|
-
for (let e of this.#a) e.onBeforeRender();
|
|
62
|
-
for (let e of this.#t) e();
|
|
63
|
-
this.#r && e.bindFramebuffer(e.FRAMEBUFFER, null);
|
|
64
|
-
}
|
|
65
|
-
#d() {
|
|
66
|
-
this.#t = [];
|
|
67
|
-
let e = !0, n = !0, i = (t) => () => {
|
|
68
|
-
e && t();
|
|
69
|
-
}, a = (t) => () => {
|
|
70
|
-
e && n && t();
|
|
71
|
-
}, o = t(this.#n.reverse(), (e) => e.mark);
|
|
72
|
-
for (let [t, s] of [...o.entries()].reverse()) {
|
|
73
|
-
if (!t.isReady()) continue;
|
|
74
|
-
this.#t.push(() => {
|
|
75
|
-
e = t.unitView.getEffectiveOpacity() > 0;
|
|
76
|
-
}), this.#t.push(...t.prepareRender(this.globalOptions).map((e) => i(e)));
|
|
77
|
-
let o, c, l;
|
|
78
|
-
for (let e of s) {
|
|
79
|
-
let s = e.coords;
|
|
80
|
-
(!s.equals(o) || !r(e.clip, c) || !r(e.cullClip, l)) && this.#t.push(i(() => {
|
|
81
|
-
n = t.setViewport(this.#l, this.#c, s, e.clip, e.cullClip, this.#u);
|
|
82
|
-
})), this.#t.push(a(e.callback)), o = e.coords, c = e.clip, l = e.cullClip;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region ../core/src/gl/framebufferReadback.js
|
|
89
|
-
function s(e, t, n = {}) {
|
|
90
|
-
let r = n.x ?? 0, i = n.y ?? 0, a = n.width ?? t.width, o = n.height ?? t.height;
|
|
91
|
-
f(t, r, i, a, o);
|
|
92
|
-
let s = new Uint8Array(a * o * 4);
|
|
93
|
-
e.bindFramebuffer(e.FRAMEBUFFER, t.framebuffer);
|
|
94
|
-
try {
|
|
95
|
-
e.readPixels(r, t.height - i - o, a, o, e.RGBA, e.UNSIGNED_BYTE, s);
|
|
96
|
-
} finally {
|
|
97
|
-
e.bindFramebuffer(e.FRAMEBUFFER, null);
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
pixels: d(s, a, o, n.unpremultiplyAlpha ?? !1),
|
|
101
|
-
width: a,
|
|
102
|
-
height: o
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function c(e, t, n = "image/png", r = {}) {
|
|
106
|
-
return u(e, t, r).toDataURL(n);
|
|
107
|
-
}
|
|
108
|
-
function l(e, t, n = "image/png", r = {}) {
|
|
109
|
-
let i = u(e, t, r);
|
|
110
|
-
return new Promise((e, t) => {
|
|
111
|
-
i.toBlob((r) => {
|
|
112
|
-
r ? e(r) : t(/* @__PURE__ */ Error(`Could not encode framebuffer as ${n}.`));
|
|
113
|
-
}, n);
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function u(e, t, n) {
|
|
117
|
-
let { pixels: r, width: i, height: a } = s(e, t, n), o = document.createElement("canvas");
|
|
118
|
-
o.width = i, o.height = a;
|
|
119
|
-
let c = o.getContext("2d"), l = c.createImageData(i, a);
|
|
120
|
-
return l.data.set(r), c.putImageData(l, 0, 0), o;
|
|
121
|
-
}
|
|
122
|
-
function d(e, t, n, r) {
|
|
123
|
-
let i = new Uint8ClampedArray(e.length), a = t * 4;
|
|
124
|
-
for (let t = 0; t < n; t++) {
|
|
125
|
-
let r = (n - t - 1) * a, o = t * a;
|
|
126
|
-
i.set(e.subarray(r, r + a), o);
|
|
127
|
-
}
|
|
128
|
-
if (r) for (let e = 0; e < i.length; e += 4) {
|
|
129
|
-
let t = i[e + 3];
|
|
130
|
-
if (t == 0) i[e] = 0, i[e + 1] = 0, i[e + 2] = 0;
|
|
131
|
-
else if (t < 255) {
|
|
132
|
-
let n = 255 / t;
|
|
133
|
-
i[e] = Math.round(i[e] * n), i[e + 1] = Math.round(i[e + 1] * n), i[e + 2] = Math.round(i[e + 2] * n);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return i;
|
|
137
|
-
}
|
|
138
|
-
function f(e, t, n, r, i) {
|
|
139
|
-
if (![
|
|
140
|
-
t,
|
|
141
|
-
n,
|
|
142
|
-
r,
|
|
143
|
-
i
|
|
144
|
-
].every(Number.isInteger)) throw RangeError("Framebuffer readback bounds must be integers.");
|
|
145
|
-
if (t < 0 || n < 0 || r <= 0 || i <= 0 || t + r > e.width || n + i > e.height) throw RangeError("Framebuffer readback bounds are out of range.");
|
|
146
|
-
}
|
|
147
|
-
//#endregion
|
|
148
|
-
export { c as n, o as r, l as t };
|