@vitessce/gl 2.0.3-beta.0 → 3.0.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/deflate-36830437.js +11 -0
- package/dist/index-d34ff949.js +120610 -0
- package/dist/index.js +33 -16
- package/dist/jpeg-a66190dc.js +838 -0
- package/dist/lerc-21af7ec8.js +2004 -0
- package/dist/lzw-76194936.js +126 -0
- package/dist/packbits-bf7850c4.js +28 -0
- package/dist/pako.esm-68f84e2a.js +4022 -0
- package/dist/raw-05d82ade.js +10 -0
- package/dist/webimage-1ceac06a.js +30 -0
- package/dist-tsc/BitmaskLayer.d.ts +74 -0
- package/dist-tsc/BitmaskLayer.d.ts.map +1 -0
- package/{dist → dist-tsc}/BitmaskLayer.js +14 -4
- package/dist-tsc/HeatmapBitmapLayer.d.ts +93 -0
- package/dist-tsc/HeatmapBitmapLayer.d.ts.map +1 -0
- package/{dist → dist-tsc}/HeatmapBitmapLayer.js +3 -3
- package/dist-tsc/HeatmapCompositeTextLayer.d.ts +11 -0
- package/dist-tsc/HeatmapCompositeTextLayer.d.ts.map +1 -0
- package/{dist → dist-tsc}/HeatmapCompositeTextLayer.js +1 -1
- package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.d.ts +93 -0
- package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.d.ts.map +1 -0
- package/{dist → dist-tsc}/PaddedExpressionHeatmapBitmapLayer.js +3 -3
- package/dist-tsc/PixelatedBitmapLayer.d.ts +10 -0
- package/dist-tsc/PixelatedBitmapLayer.d.ts.map +1 -0
- package/{dist → dist-tsc}/PixelatedBitmapLayer.js +1 -1
- package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.d.ts +62 -0
- package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.d.ts.map +1 -0
- package/{dist → dist-tsc}/ScaledExpressionExtension/ScaledExpressionExtension.js +2 -2
- package/dist-tsc/ScaledExpressionExtension/index.d.ts +3 -0
- package/dist-tsc/ScaledExpressionExtension/index.d.ts.map +1 -0
- package/{dist → dist-tsc}/ScaledExpressionExtension/index.js +1 -1
- package/dist-tsc/ScaledExpressionExtension/shader-module.d.ts +17 -0
- package/dist-tsc/ScaledExpressionExtension/shader-module.d.ts.map +1 -0
- package/{dist → dist-tsc}/ScaledExpressionExtension/shader-module.js +1 -1
- package/dist-tsc/SelectionExtension/SelectionExtension.d.ts +18 -0
- package/dist-tsc/SelectionExtension/SelectionExtension.d.ts.map +1 -0
- package/{dist → dist-tsc}/SelectionExtension/SelectionExtension.js +1 -1
- package/dist-tsc/SelectionExtension/index.d.ts +3 -0
- package/dist-tsc/SelectionExtension/index.d.ts.map +1 -0
- package/dist-tsc/SelectionExtension/index.js +2 -0
- package/dist-tsc/SelectionExtension/shader-module.d.ts +12 -0
- package/dist-tsc/SelectionExtension/shader-module.d.ts.map +1 -0
- package/dist-tsc/SelectionLayer.d.ts +15 -0
- package/dist-tsc/SelectionLayer.d.ts.map +1 -0
- package/{dist → dist-tsc}/SelectionLayer.js +1 -11
- package/dist-tsc/bitmask-layer-shaders.d.ts +3 -0
- package/dist-tsc/bitmask-layer-shaders.d.ts.map +1 -0
- package/{dist → dist-tsc}/bitmask-layer-shaders.js +1 -1
- package/dist-tsc/constants.d.ts +8 -0
- package/dist-tsc/constants.d.ts.map +1 -0
- package/dist-tsc/deck.d.ts +2 -0
- package/dist-tsc/deck.d.ts.map +1 -0
- package/dist-tsc/glsl/index.d.ts +2 -0
- package/dist-tsc/glsl/index.d.ts.map +1 -0
- package/dist-tsc/heatmap-bitmap-layer-shaders.d.ts +13 -0
- package/dist-tsc/heatmap-bitmap-layer-shaders.d.ts.map +1 -0
- package/{dist → dist-tsc}/heatmap-bitmap-layer-shaders.js +1 -1
- package/dist-tsc/heatmap-constants.d.ts +20 -0
- package/dist-tsc/heatmap-constants.d.ts.map +1 -0
- package/dist-tsc/index.d.ts +14 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +19 -0
- package/dist-tsc/luma.d.ts +2 -0
- package/dist-tsc/luma.d.ts.map +1 -0
- package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.d.ts +13 -0
- package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.d.ts.map +1 -0
- package/{dist → dist-tsc}/padded-expression-heatmap-bitmap-layer-shaders.js +1 -1
- package/dist-tsc/selection-utils.d.ts +19 -0
- package/dist-tsc/selection-utils.d.ts.map +1 -0
- package/{dist → dist-tsc}/selection-utils.js +1 -1
- package/dist-tsc/viv.d.ts +2 -0
- package/dist-tsc/viv.d.ts.map +1 -0
- package/package.json +16 -7
- package/src/BitmaskLayer.js +175 -0
- package/src/HeatmapBitmapLayer.js +144 -0
- package/src/HeatmapCompositeTextLayer.js +156 -0
- package/src/PaddedExpressionHeatmapBitmapLayer.js +154 -0
- package/src/PixelatedBitmapLayer.js +30 -0
- package/src/ScaledExpressionExtension/ScaledExpressionExtension.js +117 -0
- package/src/ScaledExpressionExtension/index.js +3 -0
- package/src/ScaledExpressionExtension/shader-module.js +35 -0
- package/src/SelectionExtension/SelectionExtension.js +34 -0
- package/src/SelectionExtension/index.js +3 -0
- package/src/SelectionExtension/shader-module.js +22 -0
- package/src/SelectionLayer.js +187 -0
- package/src/bitmask-layer-shaders.js +92 -0
- package/src/constants.js +13 -0
- package/src/deck.js +4 -0
- package/src/glsl/README.md +8 -0
- package/src/glsl/colormaps.in.glsl +15 -0
- package/src/glsl/index.js +341 -0
- package/src/heatmap-bitmap-layer-shaders.js +111 -0
- package/src/heatmap-constants.js +30 -0
- package/src/index.js +36 -0
- package/src/luma.js +2 -0
- package/src/padded-expression-heatmap-bitmap-layer-shaders.js +145 -0
- package/src/selection-utils.js +109 -0
- package/src/viv.js +20 -0
- package/dist/SelectionExtension/index.js +0 -2
- package/dist/layer-controller.js +0 -109
- package/dist/spatial.js +0 -281
- package/dist/spatial.test.js +0 -8
- /package/{dist → dist-tsc}/SelectionExtension/shader-module.js +0 -0
- /package/{dist → dist-tsc}/constants.js +0 -0
- /package/{dist → dist-tsc}/deck.js +0 -0
- /package/{dist → dist-tsc}/glsl/index.js +0 -0
- /package/{dist → dist-tsc}/heatmap-constants.js +0 -0
- /package/{dist → dist-tsc}/luma.js +0 -0
- /package/{dist → dist-tsc}/viv.js +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { B as BaseDecoder } from "./index-d34ff949.js";
|
|
2
|
+
import "react";
|
|
3
|
+
class WebImageDecoder extends BaseDecoder {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
if (typeof createImageBitmap === "undefined") {
|
|
7
|
+
throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");
|
|
8
|
+
} else if (typeof document === "undefined" && typeof OffscreenCanvas === "undefined") {
|
|
9
|
+
throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
async decode(fileDirectory, buffer) {
|
|
13
|
+
const blob = new Blob([buffer]);
|
|
14
|
+
const imageBitmap = await createImageBitmap(blob);
|
|
15
|
+
let canvas;
|
|
16
|
+
if (typeof document !== "undefined") {
|
|
17
|
+
canvas = document.createElement("canvas");
|
|
18
|
+
canvas.width = imageBitmap.width;
|
|
19
|
+
canvas.height = imageBitmap.height;
|
|
20
|
+
} else {
|
|
21
|
+
canvas = new OffscreenCanvas(imageBitmap.width, imageBitmap.height);
|
|
22
|
+
}
|
|
23
|
+
const ctx = canvas.getContext("2d");
|
|
24
|
+
ctx.drawImage(imageBitmap, 0, 0);
|
|
25
|
+
return ctx.getImageData(0, 0, imageBitmap.width, imageBitmap.height).data.buffer;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
WebImageDecoder as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
declare const BitmaskLayer_base: new (...props: import(".pnpm/@vivjs+types@0.13.7/node_modules/@vivjs/types").Viv<{
|
|
2
|
+
contrastLimits: number[][];
|
|
3
|
+
channelsVisible: boolean[];
|
|
4
|
+
dtype: string;
|
|
5
|
+
domain?: number[] | undefined;
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
onHover?: Function | undefined;
|
|
8
|
+
onClick?: Function | undefined;
|
|
9
|
+
modelMatrix?: Object | undefined;
|
|
10
|
+
interpolation?: number | undefined;
|
|
11
|
+
}, string[]>[]) => any;
|
|
12
|
+
/**
|
|
13
|
+
* A BitmapLayer that performs aggregation in the fragment shader,
|
|
14
|
+
* and renders its texture from a Uint8Array rather than an ImageData.
|
|
15
|
+
*/
|
|
16
|
+
declare class BitmaskLayer extends BitmaskLayer_base {
|
|
17
|
+
[x: string]: any;
|
|
18
|
+
getShaders(): {
|
|
19
|
+
fs: string;
|
|
20
|
+
vs: string;
|
|
21
|
+
modules: any[];
|
|
22
|
+
defines: {
|
|
23
|
+
COLORMAP_FUNC: any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
updateState({ props, oldProps, changeFlags }: {
|
|
27
|
+
props: any;
|
|
28
|
+
oldProps: any;
|
|
29
|
+
changeFlags: any;
|
|
30
|
+
}): void;
|
|
31
|
+
setColorTexture(): void;
|
|
32
|
+
draw(opts: any): void;
|
|
33
|
+
/**
|
|
34
|
+
* This function creates textures from the data
|
|
35
|
+
*/
|
|
36
|
+
dataToTexture(data: any, width: any, height: any): any;
|
|
37
|
+
}
|
|
38
|
+
declare namespace BitmaskLayer {
|
|
39
|
+
export const layerName: string;
|
|
40
|
+
export { defaultProps };
|
|
41
|
+
}
|
|
42
|
+
export default BitmaskLayer;
|
|
43
|
+
declare namespace defaultProps {
|
|
44
|
+
namespace hoveredCell {
|
|
45
|
+
const type: string;
|
|
46
|
+
const value: null;
|
|
47
|
+
const compare: boolean;
|
|
48
|
+
}
|
|
49
|
+
namespace cellColorData {
|
|
50
|
+
const type_1: string;
|
|
51
|
+
export { type_1 as type };
|
|
52
|
+
const value_1: null;
|
|
53
|
+
export { value_1 as value };
|
|
54
|
+
const compare_1: number;
|
|
55
|
+
export { compare_1 as compare };
|
|
56
|
+
}
|
|
57
|
+
namespace colormap {
|
|
58
|
+
const type_2: string;
|
|
59
|
+
export { type_2 as type };
|
|
60
|
+
export { GLSL_COLORMAP_DEFAULT as value };
|
|
61
|
+
const compare_2: boolean;
|
|
62
|
+
export { compare_2 as compare };
|
|
63
|
+
}
|
|
64
|
+
namespace expressionData {
|
|
65
|
+
const type_3: string;
|
|
66
|
+
export { type_3 as type };
|
|
67
|
+
const value_2: null;
|
|
68
|
+
export { value_2 as value };
|
|
69
|
+
const compare_3: number;
|
|
70
|
+
export { compare_3 as compare };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
|
|
74
|
+
//# sourceMappingURL=BitmaskLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitmaskLayer.d.ts","sourceRoot":"","sources":["../src/BitmaskLayer.js"],"names":[],"mappings":";;;;;;;;;;;AAgCA;;;GAGG;AACH;;IAEE;;;;;;;MAYC;IAED;;;;aA4BC;IAED,wBA0BC;IAED,sBAmCC;IAED;;OAEG;IACH,uDAqBC;CACF"}
|
|
@@ -2,8 +2,8 @@ import GL from '@luma.gl/constants'; // eslint-disable-line import/no-extraneous
|
|
|
2
2
|
import { project32, picking } from '@deck.gl/core'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
3
|
import { Texture2D, isWebGL2 } from '@luma.gl/core';
|
|
4
4
|
import { XRLayer } from '@hms-dbmi/viv';
|
|
5
|
-
import { fs, vs } from './bitmask-layer-shaders';
|
|
6
|
-
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER, } from './constants';
|
|
5
|
+
import { fs, vs } from './bitmask-layer-shaders.js';
|
|
6
|
+
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER, } from './constants.js';
|
|
7
7
|
function padWithDefault(arr, defaultValue, padWidth) {
|
|
8
8
|
const newArr = [...arr];
|
|
9
9
|
for (let i = 0; i < padWidth; i += 1) {
|
|
@@ -13,9 +13,15 @@ function padWithDefault(arr, defaultValue, padWidth) {
|
|
|
13
13
|
}
|
|
14
14
|
const defaultProps = {
|
|
15
15
|
hoveredCell: { type: 'number', value: null, compare: true },
|
|
16
|
-
|
|
16
|
+
// We do not want to deep-compare cellColorData,
|
|
17
|
+
// as it is potentially a TypedArray with millions of elements.
|
|
18
|
+
// For `compare`: "if a number is supplied, indicates the maximum depth to deep-compare,
|
|
19
|
+
// where 0 is shallow comparison and -1 is infinite depth. true is equivalent to 1."
|
|
20
|
+
// Reference: https://deck.gl/docs/developer-guide/custom-layers/prop-types#array
|
|
21
|
+
cellColorData: { type: 'object', value: null, compare: 0 },
|
|
17
22
|
colormap: { type: 'string', value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
18
|
-
|
|
23
|
+
// Same as with cellColorData, we do not want to deep-compare expressionData.
|
|
24
|
+
expressionData: { type: 'object', value: null, compare: 0 },
|
|
19
25
|
};
|
|
20
26
|
/**
|
|
21
27
|
* A BitmapLayer that performs aggregation in the fragment shader,
|
|
@@ -38,9 +44,13 @@ export default class BitmaskLayer extends XRLayer {
|
|
|
38
44
|
}
|
|
39
45
|
updateState({ props, oldProps, changeFlags }) {
|
|
40
46
|
super.updateState({ props, oldProps, changeFlags });
|
|
47
|
+
// Check the cellColorData to determine whether
|
|
48
|
+
// to update the texture.
|
|
41
49
|
if (props.cellColorData !== oldProps.cellColorData) {
|
|
42
50
|
this.setColorTexture();
|
|
43
51
|
}
|
|
52
|
+
// Check the expressionData to determine whether
|
|
53
|
+
// to update the texture.
|
|
44
54
|
if (props.expressionData !== oldProps.expressionData) {
|
|
45
55
|
const { expressionData, cellTexHeight, cellTexWidth } = this.props;
|
|
46
56
|
const expressionTex = this.dataToTexture(expressionData, cellTexWidth, cellTexHeight);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A BitmapLayer that performs aggregation in the fragment shader,
|
|
3
|
+
* and renders its texture from a Uint8Array rather than an ImageData.
|
|
4
|
+
*/
|
|
5
|
+
declare class HeatmapBitmapLayer {
|
|
6
|
+
/**
|
|
7
|
+
* Copy of getShaders from Layer (grandparent, parent of BitmapLayer).
|
|
8
|
+
* Reference: https://github.com/visgl/deck.gl/blob/0afd4e99a6199aeec979989e0c361c97e6c17a16/modules/core/src/lib/layer.js#L302
|
|
9
|
+
* @param {object} shaders
|
|
10
|
+
* @returns {object} Merged shaders.
|
|
11
|
+
*/
|
|
12
|
+
_getShaders(shaders: object): object;
|
|
13
|
+
/**
|
|
14
|
+
* Need to override to provide custom shaders.
|
|
15
|
+
*/
|
|
16
|
+
getShaders(): object;
|
|
17
|
+
updateState(args: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Need to override to provide additional uniform values.
|
|
20
|
+
* Simplified by removing video-related code.
|
|
21
|
+
* Reference: https://github.com/visgl/deck.gl/blob/0afd4e99a6199aeec979989e0c361c97e6c17a16/modules/layers/src/bitmap-layer/bitmap-layer.js#L173
|
|
22
|
+
* @param {*} opts
|
|
23
|
+
*/
|
|
24
|
+
draw(opts: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Need to override to provide the custom DEFAULT_TEXTURE_PARAMETERS
|
|
27
|
+
* object.
|
|
28
|
+
* Simplified by removing video-related code.
|
|
29
|
+
* Reference: https://github.com/visgl/deck.gl/blob/0afd4e99a6199aeec979989e0c361c97e6c17a16/modules/layers/src/bitmap-layer/bitmap-layer.js#L218
|
|
30
|
+
* @param {Uint8Array} image
|
|
31
|
+
*/
|
|
32
|
+
loadTexture(image: Uint8Array): void;
|
|
33
|
+
}
|
|
34
|
+
declare namespace HeatmapBitmapLayer {
|
|
35
|
+
export const layerName: string;
|
|
36
|
+
export { defaultProps };
|
|
37
|
+
}
|
|
38
|
+
export default HeatmapBitmapLayer;
|
|
39
|
+
declare namespace defaultProps {
|
|
40
|
+
namespace image {
|
|
41
|
+
const type: string;
|
|
42
|
+
const value: null;
|
|
43
|
+
const async: boolean;
|
|
44
|
+
}
|
|
45
|
+
namespace colormap {
|
|
46
|
+
const type_1: string;
|
|
47
|
+
export { type_1 as type };
|
|
48
|
+
export { GLSL_COLORMAP_DEFAULT as value };
|
|
49
|
+
export const compare: boolean;
|
|
50
|
+
}
|
|
51
|
+
namespace bounds {
|
|
52
|
+
const type_2: string;
|
|
53
|
+
export { type_2 as type };
|
|
54
|
+
const value_1: number[];
|
|
55
|
+
export { value_1 as value };
|
|
56
|
+
const compare_1: boolean;
|
|
57
|
+
export { compare_1 as compare };
|
|
58
|
+
}
|
|
59
|
+
namespace aggSizeX {
|
|
60
|
+
const type_3: string;
|
|
61
|
+
export { type_3 as type };
|
|
62
|
+
const value_2: number;
|
|
63
|
+
export { value_2 as value };
|
|
64
|
+
const compare_2: boolean;
|
|
65
|
+
export { compare_2 as compare };
|
|
66
|
+
}
|
|
67
|
+
namespace aggSizeY {
|
|
68
|
+
const type_4: string;
|
|
69
|
+
export { type_4 as type };
|
|
70
|
+
const value_3: number;
|
|
71
|
+
export { value_3 as value };
|
|
72
|
+
const compare_3: boolean;
|
|
73
|
+
export { compare_3 as compare };
|
|
74
|
+
}
|
|
75
|
+
namespace colorScaleLo {
|
|
76
|
+
const type_5: string;
|
|
77
|
+
export { type_5 as type };
|
|
78
|
+
const value_4: number;
|
|
79
|
+
export { value_4 as value };
|
|
80
|
+
const compare_4: boolean;
|
|
81
|
+
export { compare_4 as compare };
|
|
82
|
+
}
|
|
83
|
+
namespace colorScaleHi {
|
|
84
|
+
const type_6: string;
|
|
85
|
+
export { type_6 as type };
|
|
86
|
+
const value_5: number;
|
|
87
|
+
export { value_5 as value };
|
|
88
|
+
const compare_5: boolean;
|
|
89
|
+
export { compare_5 as compare };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
|
|
93
|
+
//# sourceMappingURL=HeatmapBitmapLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeatmapBitmapLayer.d.ts","sourceRoot":"","sources":["../src/HeatmapBitmapLayer.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH;IACE;;;;;OAKG;IAEH,qBAJW,MAAM,GACJ,MAAM,CAYlB;IAED;;OAEG;IACH,qBAcC;IAED,6BAYC;IAED;;;;;OAKG;IACH,sBAoBC;IAED;;;;;;OAMG;IACH,mBAFW,UAAU,QA8BpB;CACF"}
|
|
@@ -2,9 +2,9 @@ import GL from '@luma.gl/constants'; // eslint-disable-line import/no-extraneous
|
|
|
2
2
|
import { _mergeShaders, project32, picking } from '@deck.gl/core'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
3
|
import { BitmapLayer } from '@deck.gl/layers'; // eslint-disable-line import/no-extraneous-dependencies
|
|
4
4
|
import { Texture2D } from '@luma.gl/core';
|
|
5
|
-
import { PIXELATED_TEXTURE_PARAMETERS, TILE_SIZE } from './heatmap-constants';
|
|
6
|
-
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER, } from './constants';
|
|
7
|
-
import { vertexShader, fragmentShader } from './heatmap-bitmap-layer-shaders';
|
|
5
|
+
import { PIXELATED_TEXTURE_PARAMETERS, TILE_SIZE } from './heatmap-constants.js';
|
|
6
|
+
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER, } from './constants.js';
|
|
7
|
+
import { vertexShader, fragmentShader } from './heatmap-bitmap-layer-shaders.js';
|
|
8
8
|
const defaultProps = {
|
|
9
9
|
image: { type: 'object', value: null, async: true },
|
|
10
10
|
colormap: { type: 'string', value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class HeatmapCompositeTextLayer {
|
|
2
|
+
_renderAxisTopLayers(): any[];
|
|
3
|
+
_renderCornerLayers(): any;
|
|
4
|
+
_renderAxisLeftLayers(): any[];
|
|
5
|
+
renderLayers(): any;
|
|
6
|
+
}
|
|
7
|
+
declare namespace HeatmapCompositeTextLayer {
|
|
8
|
+
const layerName: string;
|
|
9
|
+
}
|
|
10
|
+
export default HeatmapCompositeTextLayer;
|
|
11
|
+
//# sourceMappingURL=HeatmapCompositeTextLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeatmapCompositeTextLayer.d.ts","sourceRoot":"","sources":["../src/HeatmapCompositeTextLayer.js"],"names":[],"mappings":"AAYA;IACE,8BA2CC;IAED,2BAmCC;IAED,+BA2CC;IAED,oBAYC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
2
|
import { COORDINATE_SYSTEM, CompositeLayer } from '@deck.gl/core'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
3
|
import { TextLayer } from '@deck.gl/layers'; // eslint-disable-line import/no-extraneous-dependencies
|
|
4
|
-
import { AXIS_LABEL_TEXT_SIZE, AXIS_TITLE_TEXT_SIZE, AXIS_MARGIN, THEME_TO_TEXT_COLOR, AXIS_FONT_FAMILY, COLOR_BAR_SIZE, } from './heatmap-constants';
|
|
4
|
+
import { AXIS_LABEL_TEXT_SIZE, AXIS_TITLE_TEXT_SIZE, AXIS_MARGIN, THEME_TO_TEXT_COLOR, AXIS_FONT_FAMILY, COLOR_BAR_SIZE, } from './heatmap-constants.js';
|
|
5
5
|
export default class HeatmapCompositeTextLayer extends CompositeLayer {
|
|
6
6
|
_renderAxisTopLayers() {
|
|
7
7
|
const { axisTopLabelData, matrixLeft, width, matrixWidth, viewWidth, theme, targetX, targetY, axisTopTitle, cellWidth, axisOffsetTop, scaleFactor, hideTopLabels, } = this.props;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A BitmapLayer that performs aggregation in the fragment shader,
|
|
3
|
+
* and renders its texture from a Uint8Array rather than an ImageData.
|
|
4
|
+
*/
|
|
5
|
+
declare class PaddedExpressionHeatmapBitmapLayer {
|
|
6
|
+
/**
|
|
7
|
+
* Copy of getShaders from Layer (grandparent, parent of BitmapLayer).
|
|
8
|
+
* Reference: https://github.com/visgl/deck.gl/blob/0afd4e99a6199aeec979989e0c361c97e6c17a16/modules/core/src/lib/layer.js#L302
|
|
9
|
+
* @param {object} shaders
|
|
10
|
+
* @returns {object} Merged shaders.
|
|
11
|
+
*/
|
|
12
|
+
_getShaders(shaders: object): object;
|
|
13
|
+
/**
|
|
14
|
+
* Need to override to provide custom shaders.
|
|
15
|
+
*/
|
|
16
|
+
getShaders(): object;
|
|
17
|
+
updateState(args: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Need to override to provide additional uniform values.
|
|
20
|
+
* Simplified by removing video-related code.
|
|
21
|
+
* Reference: https://github.com/visgl/deck.gl/blob/0afd4e99a6199aeec979989e0c361c97e6c17a16/modules/layers/src/bitmap-layer/bitmap-layer.js#L173
|
|
22
|
+
* @param {*} opts
|
|
23
|
+
*/
|
|
24
|
+
draw(opts: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Need to override to provide the custom DEFAULT_TEXTURE_PARAMETERS
|
|
27
|
+
* object.
|
|
28
|
+
* Simplified by removing video-related code.
|
|
29
|
+
* Reference: https://github.com/visgl/deck.gl/blob/0afd4e99a6199aeec979989e0c361c97e6c17a16/modules/layers/src/bitmap-layer/bitmap-layer.js#L218
|
|
30
|
+
* @param {Array<Uint8Array>} images
|
|
31
|
+
*/
|
|
32
|
+
loadTexture(image: any): void;
|
|
33
|
+
}
|
|
34
|
+
declare namespace PaddedExpressionHeatmapBitmapLayer {
|
|
35
|
+
export const layerName: string;
|
|
36
|
+
export { defaultProps };
|
|
37
|
+
}
|
|
38
|
+
export default PaddedExpressionHeatmapBitmapLayer;
|
|
39
|
+
declare namespace defaultProps {
|
|
40
|
+
namespace image {
|
|
41
|
+
const type: string;
|
|
42
|
+
const value: null;
|
|
43
|
+
const async: boolean;
|
|
44
|
+
}
|
|
45
|
+
namespace colormap {
|
|
46
|
+
const type_1: string;
|
|
47
|
+
export { type_1 as type };
|
|
48
|
+
export { GLSL_COLORMAP_DEFAULT as value };
|
|
49
|
+
export const compare: boolean;
|
|
50
|
+
}
|
|
51
|
+
namespace bounds {
|
|
52
|
+
const type_2: string;
|
|
53
|
+
export { type_2 as type };
|
|
54
|
+
const value_1: number[];
|
|
55
|
+
export { value_1 as value };
|
|
56
|
+
const compare_1: boolean;
|
|
57
|
+
export { compare_1 as compare };
|
|
58
|
+
}
|
|
59
|
+
namespace aggSizeX {
|
|
60
|
+
const type_3: string;
|
|
61
|
+
export { type_3 as type };
|
|
62
|
+
const value_2: number;
|
|
63
|
+
export { value_2 as value };
|
|
64
|
+
const compare_2: boolean;
|
|
65
|
+
export { compare_2 as compare };
|
|
66
|
+
}
|
|
67
|
+
namespace aggSizeY {
|
|
68
|
+
const type_4: string;
|
|
69
|
+
export { type_4 as type };
|
|
70
|
+
const value_3: number;
|
|
71
|
+
export { value_3 as value };
|
|
72
|
+
const compare_3: boolean;
|
|
73
|
+
export { compare_3 as compare };
|
|
74
|
+
}
|
|
75
|
+
namespace colorScaleLo {
|
|
76
|
+
const type_5: string;
|
|
77
|
+
export { type_5 as type };
|
|
78
|
+
const value_4: number;
|
|
79
|
+
export { value_4 as value };
|
|
80
|
+
const compare_4: boolean;
|
|
81
|
+
export { compare_4 as compare };
|
|
82
|
+
}
|
|
83
|
+
namespace colorScaleHi {
|
|
84
|
+
const type_6: string;
|
|
85
|
+
export { type_6 as type };
|
|
86
|
+
const value_5: number;
|
|
87
|
+
export { value_5 as value };
|
|
88
|
+
const compare_5: boolean;
|
|
89
|
+
export { compare_5 as compare };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
|
|
93
|
+
//# sourceMappingURL=PaddedExpressionHeatmapBitmapLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaddedExpressionHeatmapBitmapLayer.d.ts","sourceRoot":"","sources":["../src/PaddedExpressionHeatmapBitmapLayer.js"],"names":[],"mappings":"AAmBA;;;GAGG;AACH;IACE;;;;;OAKG;IACH,qBAHW,MAAM,GACJ,MAAM,CAWlB;IAED;;OAEG;IACH,qBAaC;IAED,6BAaC;IAED;;;;;OAKG;IACH,sBAiCC;IAED;;;;;;OAMG;IACH,8BA4BC;CACF"}
|
|
@@ -3,9 +3,9 @@ import GL from '@luma.gl/constants'; // eslint-disable-line import/no-extraneous
|
|
|
3
3
|
import { _mergeShaders, project32, picking } from '@deck.gl/core'; // eslint-disable-line import/no-extraneous-dependencies
|
|
4
4
|
import { BitmapLayer } from '@deck.gl/layers'; // eslint-disable-line import/no-extraneous-dependencies
|
|
5
5
|
import { Texture2D } from '@luma.gl/core';
|
|
6
|
-
import { PIXELATED_TEXTURE_PARAMETERS, TILE_SIZE, DATA_TEXTURE_SIZE } from './heatmap-constants';
|
|
7
|
-
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER } from './constants';
|
|
8
|
-
import { vertexShader, fragmentShader } from './padded-expression-heatmap-bitmap-layer-shaders';
|
|
6
|
+
import { PIXELATED_TEXTURE_PARAMETERS, TILE_SIZE, DATA_TEXTURE_SIZE } from './heatmap-constants.js';
|
|
7
|
+
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER } from './constants.js';
|
|
8
|
+
import { vertexShader, fragmentShader } from './padded-expression-heatmap-bitmap-layer-shaders.js';
|
|
9
9
|
const defaultProps = {
|
|
10
10
|
image: { type: 'object', value: null, async: true },
|
|
11
11
|
colormap: { type: 'string', value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare class PixelatedBitmapLayer {
|
|
2
|
+
renderLayers(): any;
|
|
3
|
+
}
|
|
4
|
+
declare namespace PixelatedBitmapLayer {
|
|
5
|
+
export const layerName: string;
|
|
6
|
+
export { defaultProps };
|
|
7
|
+
}
|
|
8
|
+
export default PixelatedBitmapLayer;
|
|
9
|
+
declare const defaultProps: any;
|
|
10
|
+
//# sourceMappingURL=PixelatedBitmapLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PixelatedBitmapLayer.d.ts","sourceRoot":"","sources":["../src/PixelatedBitmapLayer.js"],"names":[],"mappings":"AAiBA;IACE,oBAOC;CACF;;;;;;AApBD,gCASE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BitmapLayer } from '@deck.gl/layers'; // eslint-disable-line import/no-extraneous-dependencies
|
|
2
2
|
import { CompositeLayer } from '@deck.gl/core'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
|
-
import { PIXELATED_TEXTURE_PARAMETERS } from './heatmap-constants';
|
|
3
|
+
import { PIXELATED_TEXTURE_PARAMETERS } from './heatmap-constants.js';
|
|
4
4
|
// These are the same defaultProps as for BitmapLayer.
|
|
5
5
|
const defaultProps = {
|
|
6
6
|
...BitmapLayer.defaultProps,
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
declare class ScaledExpressionExtension {
|
|
2
|
+
getShaders(): {
|
|
3
|
+
modules: {
|
|
4
|
+
name: string;
|
|
5
|
+
vs: string;
|
|
6
|
+
inject: {
|
|
7
|
+
'vs:DECKGL_FILTER_COLOR': string;
|
|
8
|
+
};
|
|
9
|
+
}[];
|
|
10
|
+
defines: {
|
|
11
|
+
COLORMAP_FUNC: any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
updateState({ props, oldProps }: {
|
|
15
|
+
props: any;
|
|
16
|
+
oldProps: any;
|
|
17
|
+
}): void;
|
|
18
|
+
initializeState(): void;
|
|
19
|
+
draw(): void;
|
|
20
|
+
}
|
|
21
|
+
declare namespace ScaledExpressionExtension {
|
|
22
|
+
export const extensionName: string;
|
|
23
|
+
export { defaultProps };
|
|
24
|
+
}
|
|
25
|
+
export default ScaledExpressionExtension;
|
|
26
|
+
declare namespace defaultProps {
|
|
27
|
+
namespace colormap {
|
|
28
|
+
export const type: string;
|
|
29
|
+
export { GLSL_COLORMAP_DEFAULT as value };
|
|
30
|
+
export const compare: boolean;
|
|
31
|
+
}
|
|
32
|
+
namespace colorScaleLo {
|
|
33
|
+
const type_1: string;
|
|
34
|
+
export { type_1 as type };
|
|
35
|
+
export const value: number;
|
|
36
|
+
const compare_1: boolean;
|
|
37
|
+
export { compare_1 as compare };
|
|
38
|
+
}
|
|
39
|
+
namespace colorScaleHi {
|
|
40
|
+
const type_2: string;
|
|
41
|
+
export { type_2 as type };
|
|
42
|
+
const value_1: number;
|
|
43
|
+
export { value_1 as value };
|
|
44
|
+
const compare_2: boolean;
|
|
45
|
+
export { compare_2 as compare };
|
|
46
|
+
}
|
|
47
|
+
const isExpressionMode: boolean;
|
|
48
|
+
namespace getExpressionValue {
|
|
49
|
+
const type_3: string;
|
|
50
|
+
export { type_3 as type };
|
|
51
|
+
const value_2: number;
|
|
52
|
+
export { value_2 as value };
|
|
53
|
+
}
|
|
54
|
+
namespace getSelectionState {
|
|
55
|
+
const type_4: string;
|
|
56
|
+
export { type_4 as type };
|
|
57
|
+
const value_3: number;
|
|
58
|
+
export { value_3 as value };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
import { GLSL_COLORMAP_DEFAULT } from "../constants.js";
|
|
62
|
+
//# sourceMappingURL=ScaledExpressionExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScaledExpressionExtension.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/ScaledExpressionExtension.js"],"names":[],"mappings":"AAgBA;IACE;;;;;;;;;;;MAUC;IAED;;;aA+BC;IAED,wBAwBC;IAED,aAwBC;CACF"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
3
|
import GL from '@luma.gl/constants';
|
|
4
4
|
import { LayerExtension } from '@deck.gl/core';
|
|
5
|
-
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER } from '../constants';
|
|
6
|
-
import module from './shader-module';
|
|
5
|
+
import { GLSL_COLORMAPS, GLSL_COLORMAP_DEFAULT, COLORMAP_SHADER_PLACEHOLDER } from '../constants.js';
|
|
6
|
+
import module from './shader-module.js';
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
colormap: { type: 'string', value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
9
9
|
colorScaleLo: { type: 'number', value: 0.0, compare: true },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/index.js"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ScaledExpressionExtension from './ScaledExpressionExtension';
|
|
1
|
+
import ScaledExpressionExtension from './ScaledExpressionExtension.js';
|
|
2
2
|
export default ScaledExpressionExtension;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const name: string;
|
|
3
|
+
export { vs };
|
|
4
|
+
export { inject };
|
|
5
|
+
}
|
|
6
|
+
export default _default;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* Reference: https://github.com/visgl/deck.gl/blob/8.4-release/modules/layers/src/scatterplot-layer/scatterplot-layer-vertex.glsl.js
|
|
10
|
+
* Reference: https://observablehq.com/@rreusser/selecting-the-right-opacity-for-2d-point-clouds
|
|
11
|
+
* Reference: https://github.com/flekschas/regl-scatterplot/blob/5e3b03e/src/point.vs
|
|
12
|
+
*/
|
|
13
|
+
declare const vs: string;
|
|
14
|
+
declare const inject: {
|
|
15
|
+
'vs:DECKGL_FILTER_COLOR': string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=shader-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/shader-module.js"],"names":[],"mappings":";;;;;;AAEA;;;;;GAKG;AACH,yBAUE;AAEF;;EAQE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare class SelectionExtension {
|
|
2
|
+
getShaders(): {
|
|
3
|
+
modules: {
|
|
4
|
+
name: string;
|
|
5
|
+
vs: string;
|
|
6
|
+
inject: {
|
|
7
|
+
'vs:DECKGL_FILTER_GL_POSITION': string;
|
|
8
|
+
'fs:#main-start': string;
|
|
9
|
+
};
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
initializeState(context: any, extension: any): void;
|
|
13
|
+
}
|
|
14
|
+
declare namespace SelectionExtension {
|
|
15
|
+
const extensionName: string;
|
|
16
|
+
}
|
|
17
|
+
export default SelectionExtension;
|
|
18
|
+
//# sourceMappingURL=SelectionExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionExtension.d.ts","sourceRoot":"","sources":["../../src/SelectionExtension/SelectionExtension.js"],"names":[],"mappings":"AAMA;IAEE;;;;;;;;;MAIC;IAED,oDAgBC;CACF"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
3
|
import GL from '@luma.gl/constants';
|
|
4
4
|
import { LayerExtension } from '@deck.gl/core';
|
|
5
|
-
import module from './shader-module';
|
|
5
|
+
import module from './shader-module.js';
|
|
6
6
|
export default class SelectionExtension extends LayerExtension {
|
|
7
7
|
// eslint-disable-next-line class-methods-use-this
|
|
8
8
|
getShaders() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SelectionExtension/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const name: string;
|
|
3
|
+
export { vs };
|
|
4
|
+
export { inject };
|
|
5
|
+
}
|
|
6
|
+
export default _default;
|
|
7
|
+
declare const vs: "\nattribute float isSelected;\n";
|
|
8
|
+
declare const inject: {
|
|
9
|
+
'vs:DECKGL_FILTER_GL_POSITION': string;
|
|
10
|
+
'fs:#main-start': string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=shader-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/SelectionExtension/shader-module.js"],"names":[],"mappings":";;;;;;AAAA,oDAEE;AAEF;;;EAWE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare class SelectionLayer {
|
|
2
|
+
_selectPolygonObjects(coordinates: any): void;
|
|
3
|
+
renderLayers(): EditableGeoJsonLayer[];
|
|
4
|
+
}
|
|
5
|
+
declare namespace SelectionLayer {
|
|
6
|
+
export const layerName: string;
|
|
7
|
+
export { defaultProps };
|
|
8
|
+
}
|
|
9
|
+
export default SelectionLayer;
|
|
10
|
+
import { EditableGeoJsonLayer } from "@nebula.gl/layers";
|
|
11
|
+
declare namespace defaultProps {
|
|
12
|
+
const layerIds: never[];
|
|
13
|
+
function onSelect(): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SelectionLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionLayer.d.ts","sourceRoot":"","sources":["../src/SelectionLayer.js"],"names":[],"mappings":"AAqEA;IACE,8CA0DC;IAED,uCAoDC;CACF;;;;;;;;;IAxJW,0BAAQ"}
|