uplot-webgpu 0.1.0 → 0.2.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/index.js +0 -17
- package/index.ts +5 -0
- package/package.json +4 -69
- package/paths/ts/bars.ts +253 -0
- package/paths/ts/catmullRomCentrip.ts +127 -0
- package/paths/ts/index.ts +9 -0
- package/paths/ts/linear.ts +172 -0
- package/paths/ts/monotoneCubic.ts +70 -0
- package/paths/ts/points.ts +70 -0
- package/paths/ts/spline.ts +105 -0
- package/paths/ts/stepped.ts +126 -0
- package/paths/ts/types.ts +143 -0
- package/paths/ts/utils.ts +303 -0
- package/scripts/ts/uPlot.ts +3732 -0
- package/scripts/ts/utils/dom.ts +124 -0
- package/scripts/ts/utils/domClasses.ts +22 -0
- package/scripts/ts/utils/feats.ts +13 -0
- package/scripts/ts/utils/fmtDate.ts +398 -0
- package/scripts/ts/utils/opts.ts +844 -0
- package/scripts/ts/utils/strings.ts +22 -0
- package/scripts/ts/utils/sync.ts +27 -0
- package/scripts/ts/utils/utils.ts +692 -0
- package/scripts/{webgpu → ts/webgpu}/GPUPath.ts +92 -41
- package/scripts/{webgpu → ts/webgpu}/WebGPURenderer.ts +176 -84
- package/scripts/ts/webgpu/exporters.ts +221 -0
- package/scripts/ts/webgpu/index.ts +31 -0
- package/scripts/{webgpu → ts/webgpu}/shaders.ts +0 -1
- package/scripts/uPlot.js +0 -2
- package/scripts/webgpu/GPUPath.js +513 -606
- package/scripts/webgpu/WebGPURenderer.js +3484 -4018
- package/scripts/webgpu/exporters.js +191 -201
- package/scripts/webgpu/index.js +12 -0
- package/scripts/webgpu/shaders.js +6 -3
- package/tinybuild.config.js +6 -6
- package/tsconfig.json +64 -0
- package/scripts/uPlot.d.ts +0 -26
- package/scripts/webgpu/GPUPath.d.ts +0 -46
- package/scripts/webgpu/WebGPURenderer.d.ts +0 -176
- package/scripts/webgpu/exporters.d.ts +0 -8
- package/scripts/webgpu/shaders.d.ts +0 -2
- package/scripts/webgpu/smokeTest.d.ts +0 -2
- package/scripts/webgpu/webgpu-ambient.d.ts +0 -41
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const WIDTH = "width";
|
|
2
|
+
export const HEIGHT = "height";
|
|
3
|
+
export const TOP = "top";
|
|
4
|
+
export const BOTTOM = "bottom";
|
|
5
|
+
export const LEFT = "left";
|
|
6
|
+
export const RIGHT = "right";
|
|
7
|
+
export const hexBlack = "#000";
|
|
8
|
+
export const transparent = hexBlack + "0";
|
|
9
|
+
|
|
10
|
+
export const mousemove = "mousemove";
|
|
11
|
+
export const mousedown = "mousedown";
|
|
12
|
+
export const mouseup = "mouseup";
|
|
13
|
+
export const mouseenter = "mouseenter";
|
|
14
|
+
export const mouseleave = "mouseleave";
|
|
15
|
+
export const dblclick = "dblclick";
|
|
16
|
+
export const resize = "resize";
|
|
17
|
+
export const scroll = "scroll";
|
|
18
|
+
|
|
19
|
+
export const change = "change";
|
|
20
|
+
export const dppxchange = "dppxchange";
|
|
21
|
+
|
|
22
|
+
export const LEGEND_DISP = "--";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const syncs = {};
|
|
2
|
+
|
|
3
|
+
export function _sync(key?: any, opts?: any, ..._extra: any[]) {
|
|
4
|
+
let s = syncs[key];
|
|
5
|
+
|
|
6
|
+
if (!s) {
|
|
7
|
+
s = {
|
|
8
|
+
key,
|
|
9
|
+
plots: [],
|
|
10
|
+
sub(plot) {
|
|
11
|
+
s.plots.push(plot);
|
|
12
|
+
},
|
|
13
|
+
unsub(plot) {
|
|
14
|
+
s.plots = s.plots.filter(c => c != plot);
|
|
15
|
+
},
|
|
16
|
+
pub(type, self, x, y, w, h, i) {
|
|
17
|
+
for (let j = 0; j < s.plots.length; j++)
|
|
18
|
+
s.plots[j] != self && s.plots[j].pub(type, self, x, y, w, h, i);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
if (key != null)
|
|
23
|
+
syncs[key] = s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return s;
|
|
27
|
+
}
|