@vitessce/gl 3.3.9 → 3.3.10

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.
Files changed (34) hide show
  1. package/dist-tsc/BitmaskLayer.d.ts +13 -13
  2. package/dist-tsc/BitmaskLayer.d.ts.map +1 -1
  3. package/dist-tsc/BitmaskLayerBeta.d.ts +43 -43
  4. package/dist-tsc/BitmaskLayerBeta.d.ts.map +1 -1
  5. package/dist-tsc/HeatmapBitmapLayer.d.ts +22 -22
  6. package/dist-tsc/HeatmapBitmapLayer.d.ts.map +1 -1
  7. package/dist-tsc/HeatmapCompositeTextLayer.d.ts +1 -1
  8. package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.d.ts +22 -22
  9. package/dist-tsc/PaddedExpressionHeatmapBitmapLayer.d.ts.map +1 -1
  10. package/dist-tsc/PixelatedBitmapLayer.d.ts +1 -1
  11. package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.d.ts +15 -15
  12. package/dist-tsc/ScaledExpressionExtension/ScaledExpressionExtension.d.ts.map +1 -1
  13. package/dist-tsc/ScaledExpressionExtension/index.d.ts +1 -1
  14. package/dist-tsc/ScaledExpressionExtension/index.d.ts.map +1 -1
  15. package/dist-tsc/ScaledExpressionExtension/shader-module.d.ts +2 -2
  16. package/dist-tsc/ScaledExpressionExtension/shader-module.d.ts.map +1 -1
  17. package/dist-tsc/SelectionExtension/SelectionExtension.d.ts +1 -1
  18. package/dist-tsc/SelectionExtension/index.d.ts +1 -1
  19. package/dist-tsc/SelectionExtension/index.d.ts.map +1 -1
  20. package/dist-tsc/SelectionExtension/shader-module.d.ts +1 -1
  21. package/dist-tsc/SelectionLayer.d.ts +3 -3
  22. package/dist-tsc/SelectionLayer.d.ts.map +1 -1
  23. package/dist-tsc/bitmask-layer-beta-shaders.d.ts +1 -1
  24. package/dist-tsc/bitmask-layer-beta-shaders.d.ts.map +1 -1
  25. package/dist-tsc/bitmask-layer-shaders.d.ts +1 -1
  26. package/dist-tsc/bitmask-layer-shaders.d.ts.map +1 -1
  27. package/dist-tsc/bitmask-utils.test.js +2 -2
  28. package/dist-tsc/constants.d.ts +1 -1
  29. package/dist-tsc/heatmap-bitmap-layer-shaders.d.ts +1 -1
  30. package/dist-tsc/heatmap-bitmap-layer-shaders.d.ts.map +1 -1
  31. package/dist-tsc/heatmap-constants.d.ts +3 -3
  32. package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.d.ts +1 -1
  33. package/dist-tsc/padded-expression-heatmap-bitmap-layer-shaders.d.ts.map +1 -1
  34. package/package.json +2 -2
@@ -36,39 +36,39 @@ declare class BitmaskLayer extends BitmaskLayer_base {
36
36
  dataToTexture(data: any, width: any, height: any): any;
37
37
  }
38
38
  declare namespace BitmaskLayer {
39
- export const layerName: string;
39
+ export let layerName: string;
40
40
  export { defaultProps };
41
41
  }
42
42
  export default BitmaskLayer;
43
43
  declare namespace defaultProps {
44
44
  namespace hoveredCell {
45
- const type: string;
46
- const value: null;
47
- const compare: boolean;
45
+ let type: string;
46
+ let value: null;
47
+ let compare: boolean;
48
48
  }
49
49
  namespace cellColorData {
50
- const type_1: string;
50
+ let type_1: string;
51
51
  export { type_1 as type };
52
- const value_1: null;
52
+ let value_1: null;
53
53
  export { value_1 as value };
54
- const compare_1: number;
54
+ let compare_1: number;
55
55
  export { compare_1 as compare };
56
56
  }
57
57
  namespace colormap {
58
- const type_2: string;
58
+ let type_2: string;
59
59
  export { type_2 as type };
60
60
  export { GLSL_COLORMAP_DEFAULT as value };
61
- const compare_2: boolean;
61
+ let compare_2: boolean;
62
62
  export { compare_2 as compare };
63
63
  }
64
64
  namespace expressionData {
65
- const type_3: string;
65
+ let type_3: string;
66
66
  export { type_3 as type };
67
- const value_2: null;
67
+ let value_2: null;
68
68
  export { value_2 as value };
69
- const compare_3: number;
69
+ let compare_3: number;
70
70
  export { compare_3 as compare };
71
71
  }
72
72
  }
73
- import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
73
+ import { GLSL_COLORMAP_DEFAULT } from './constants.js';
74
74
  //# sourceMappingURL=BitmaskLayer.d.ts.map
@@ -1 +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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAnKM,gBAAgB"}
@@ -42,119 +42,119 @@ declare class BitmaskLayer extends BitmaskLayer_base {
42
42
  multiSetsToTexture(multiFeatureValues: any, multiMatrixObsIndex: any, setColorValues: any, channelIsSetColorMode: any): any[];
43
43
  }
44
44
  declare namespace BitmaskLayer {
45
- export const layerName: string;
45
+ export let layerName: string;
46
46
  export { defaultProps };
47
47
  }
48
48
  export default BitmaskLayer;
49
49
  declare namespace defaultProps {
50
50
  namespace channelStrokeWidths {
51
- const type: string;
52
- const value: null;
53
- const compare: boolean;
51
+ let type: string;
52
+ let value: null;
53
+ let compare: boolean;
54
54
  }
55
55
  namespace channelsFilled {
56
- const type_1: string;
56
+ let type_1: string;
57
57
  export { type_1 as type };
58
- const value_1: null;
58
+ let value_1: null;
59
59
  export { value_1 as value };
60
- const compare_1: boolean;
60
+ let compare_1: boolean;
61
61
  export { compare_1 as compare };
62
62
  }
63
63
  namespace channelOpacities {
64
- const type_2: string;
64
+ let type_2: string;
65
65
  export { type_2 as type };
66
- const value_2: null;
66
+ let value_2: null;
67
67
  export { value_2 as value };
68
- const compare_2: boolean;
68
+ let compare_2: boolean;
69
69
  export { compare_2 as compare };
70
70
  }
71
71
  namespace channelColors {
72
- const type_3: string;
72
+ let type_3: string;
73
73
  export { type_3 as type };
74
- const value_3: null;
74
+ let value_3: null;
75
75
  export { value_3 as value };
76
- const compare_3: boolean;
76
+ let compare_3: boolean;
77
77
  export { compare_3 as compare };
78
78
  }
79
79
  namespace hoveredCell {
80
- const type_4: string;
80
+ let type_4: string;
81
81
  export { type_4 as type };
82
- const value_4: null;
82
+ let value_4: null;
83
83
  export { value_4 as value };
84
- const compare_4: boolean;
84
+ let compare_4: boolean;
85
85
  export { compare_4 as compare };
86
86
  }
87
87
  namespace colormap {
88
- const type_5: string;
88
+ let type_5: string;
89
89
  export { type_5 as type };
90
90
  export { GLSL_COLORMAP_DEFAULT as value };
91
- const compare_5: boolean;
91
+ let compare_5: boolean;
92
92
  export { compare_5 as compare };
93
93
  }
94
94
  namespace expressionData {
95
- const type_6: string;
95
+ let type_6: string;
96
96
  export { type_6 as type };
97
- const value_5: null;
97
+ let value_5: null;
98
98
  export { value_5 as value };
99
- const compare_6: boolean;
99
+ let compare_6: boolean;
100
100
  export { compare_6 as compare };
101
101
  }
102
102
  namespace multiFeatureValues {
103
- const type_7: string;
103
+ let type_7: string;
104
104
  export { type_7 as type };
105
- const value_6: null;
105
+ let value_6: null;
106
106
  export { value_6 as value };
107
- const compare_7: boolean;
107
+ let compare_7: boolean;
108
108
  export { compare_7 as compare };
109
109
  }
110
110
  namespace multiMatrixObsIndex {
111
- const type_8: string;
111
+ let type_8: string;
112
112
  export { type_8 as type };
113
- const value_7: null;
113
+ let value_7: null;
114
114
  export { value_7 as value };
115
- const compare_8: boolean;
115
+ let compare_8: boolean;
116
116
  export { compare_8 as compare };
117
117
  }
118
118
  namespace setColorValues {
119
- const type_9: string;
119
+ let type_9: string;
120
120
  export { type_9 as type };
121
- const value_8: null;
121
+ let value_8: null;
122
122
  export { value_8 as value };
123
- const compare_9: boolean;
123
+ let compare_9: boolean;
124
124
  export { compare_9 as compare };
125
125
  }
126
126
  namespace channelFeatureValueColormaps {
127
- const type_10: string;
127
+ let type_10: string;
128
128
  export { type_10 as type };
129
- const value_9: null;
129
+ let value_9: null;
130
130
  export { value_9 as value };
131
- const compare_10: boolean;
131
+ let compare_10: boolean;
132
132
  export { compare_10 as compare };
133
133
  }
134
134
  namespace channelFeatureValueColormapRanges {
135
- const type_11: string;
135
+ let type_11: string;
136
136
  export { type_11 as type };
137
- const value_10: null;
137
+ let value_10: null;
138
138
  export { value_10 as value };
139
- const compare_11: boolean;
139
+ let compare_11: boolean;
140
140
  export { compare_11 as compare };
141
141
  }
142
142
  namespace channelIsStaticColorMode {
143
- const type_12: string;
143
+ let type_12: string;
144
144
  export { type_12 as type };
145
- const value_11: null;
145
+ let value_11: null;
146
146
  export { value_11 as value };
147
- const compare_12: boolean;
147
+ let compare_12: boolean;
148
148
  export { compare_12 as compare };
149
149
  }
150
150
  namespace channelIsSetColorMode {
151
- const type_13: string;
151
+ let type_13: string;
152
152
  export { type_13 as type };
153
- const value_12: null;
153
+ let value_12: null;
154
154
  export { value_12 as value };
155
- const compare_13: boolean;
155
+ let compare_13: boolean;
156
156
  export { compare_13 as compare };
157
157
  }
158
158
  }
159
- import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
159
+ import { GLSL_COLORMAP_DEFAULT } from './constants.js';
160
160
  //# sourceMappingURL=BitmaskLayerBeta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BitmaskLayerBeta.d.ts","sourceRoot":"","sources":["../src/BitmaskLayerBeta.js"],"names":[],"mappings":";;;;;;;;;;;AAgEA;;;GAGG;AACH;;IAEE;;;;;;;MAYC;IAED;;;;MAIE;IACF,4CA0BC;IAED;;;;aA6CC;IAED,sBAuHC;IAED;;OAEG;IACH,uDAqBC;IAED,8HAuEC;CACF"}
1
+ {"version":3,"file":"BitmaskLayerBeta.d.ts","sourceRoot":"","sources":["../src/BitmaskLayerBeta.js"],"names":[],"mappings":";;;;;;;;;;;AAgEA;;;GAGG;AACH;;IAEE;;;;;;;MAYC;IAED;;;;MAIE;IACF,4CA0BC;IAED;;;;aA6CC;IAED,sBAuHC;IAED;;OAEG;IACH,uDAqBC;IAED,8HAuEC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCApXM,gBAAgB"}
@@ -32,62 +32,62 @@ declare class HeatmapBitmapLayer {
32
32
  loadTexture(image: Uint8Array): void;
33
33
  }
34
34
  declare namespace HeatmapBitmapLayer {
35
- export const layerName: string;
35
+ export let layerName: string;
36
36
  export { defaultProps };
37
37
  }
38
38
  export default HeatmapBitmapLayer;
39
39
  declare namespace defaultProps {
40
40
  namespace image {
41
- const type: string;
42
- const value: null;
43
- const async: boolean;
41
+ let type: string;
42
+ let value: null;
43
+ let async: boolean;
44
44
  }
45
45
  namespace colormap {
46
- const type_1: string;
46
+ let type_1: string;
47
47
  export { type_1 as type };
48
48
  export { GLSL_COLORMAP_DEFAULT as value };
49
- export const compare: boolean;
49
+ export let compare: boolean;
50
50
  }
51
51
  namespace bounds {
52
- const type_2: string;
52
+ let type_2: string;
53
53
  export { type_2 as type };
54
- const value_1: number[];
54
+ let value_1: number[];
55
55
  export { value_1 as value };
56
- const compare_1: boolean;
56
+ let compare_1: boolean;
57
57
  export { compare_1 as compare };
58
58
  }
59
59
  namespace aggSizeX {
60
- const type_3: string;
60
+ let type_3: string;
61
61
  export { type_3 as type };
62
- const value_2: number;
62
+ let value_2: number;
63
63
  export { value_2 as value };
64
- const compare_2: boolean;
64
+ let compare_2: boolean;
65
65
  export { compare_2 as compare };
66
66
  }
67
67
  namespace aggSizeY {
68
- const type_4: string;
68
+ let type_4: string;
69
69
  export { type_4 as type };
70
- const value_3: number;
70
+ let value_3: number;
71
71
  export { value_3 as value };
72
- const compare_3: boolean;
72
+ let compare_3: boolean;
73
73
  export { compare_3 as compare };
74
74
  }
75
75
  namespace colorScaleLo {
76
- const type_5: string;
76
+ let type_5: string;
77
77
  export { type_5 as type };
78
- const value_4: number;
78
+ let value_4: number;
79
79
  export { value_4 as value };
80
- const compare_4: boolean;
80
+ let compare_4: boolean;
81
81
  export { compare_4 as compare };
82
82
  }
83
83
  namespace colorScaleHi {
84
- const type_6: string;
84
+ let type_6: string;
85
85
  export { type_6 as type };
86
- const value_5: number;
86
+ let value_5: number;
87
87
  export { value_5 as value };
88
- const compare_5: boolean;
88
+ let compare_5: boolean;
89
89
  export { compare_5 as compare };
90
90
  }
91
91
  }
92
- import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
92
+ import { GLSL_COLORMAP_DEFAULT } from './constants.js';
93
93
  //# sourceMappingURL=HeatmapBitmapLayer.d.ts.map
@@ -1 +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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCApIM,gBAAgB"}
@@ -5,7 +5,7 @@ declare class HeatmapCompositeTextLayer {
5
5
  renderLayers(): any;
6
6
  }
7
7
  declare namespace HeatmapCompositeTextLayer {
8
- const layerName: string;
8
+ let layerName: string;
9
9
  }
10
10
  export default HeatmapCompositeTextLayer;
11
11
  //# sourceMappingURL=HeatmapCompositeTextLayer.d.ts.map
@@ -32,62 +32,62 @@ declare class PaddedExpressionHeatmapBitmapLayer {
32
32
  loadTexture(image: any): void;
33
33
  }
34
34
  declare namespace PaddedExpressionHeatmapBitmapLayer {
35
- export const layerName: string;
35
+ export let layerName: string;
36
36
  export { defaultProps };
37
37
  }
38
38
  export default PaddedExpressionHeatmapBitmapLayer;
39
39
  declare namespace defaultProps {
40
40
  namespace image {
41
- const type: string;
42
- const value: null;
43
- const async: boolean;
41
+ let type: string;
42
+ let value: null;
43
+ let async: boolean;
44
44
  }
45
45
  namespace colormap {
46
- const type_1: string;
46
+ let type_1: string;
47
47
  export { type_1 as type };
48
48
  export { GLSL_COLORMAP_DEFAULT as value };
49
- export const compare: boolean;
49
+ export let compare: boolean;
50
50
  }
51
51
  namespace bounds {
52
- const type_2: string;
52
+ let type_2: string;
53
53
  export { type_2 as type };
54
- const value_1: number[];
54
+ let value_1: number[];
55
55
  export { value_1 as value };
56
- const compare_1: boolean;
56
+ let compare_1: boolean;
57
57
  export { compare_1 as compare };
58
58
  }
59
59
  namespace aggSizeX {
60
- const type_3: string;
60
+ let type_3: string;
61
61
  export { type_3 as type };
62
- const value_2: number;
62
+ let value_2: number;
63
63
  export { value_2 as value };
64
- const compare_2: boolean;
64
+ let compare_2: boolean;
65
65
  export { compare_2 as compare };
66
66
  }
67
67
  namespace aggSizeY {
68
- const type_4: string;
68
+ let type_4: string;
69
69
  export { type_4 as type };
70
- const value_3: number;
70
+ let value_3: number;
71
71
  export { value_3 as value };
72
- const compare_3: boolean;
72
+ let compare_3: boolean;
73
73
  export { compare_3 as compare };
74
74
  }
75
75
  namespace colorScaleLo {
76
- const type_5: string;
76
+ let type_5: string;
77
77
  export { type_5 as type };
78
- const value_4: number;
78
+ let value_4: number;
79
79
  export { value_4 as value };
80
- const compare_4: boolean;
80
+ let compare_4: boolean;
81
81
  export { compare_4 as compare };
82
82
  }
83
83
  namespace colorScaleHi {
84
- const type_6: string;
84
+ let type_6: string;
85
85
  export { type_6 as type };
86
- const value_5: number;
86
+ let value_5: number;
87
87
  export { value_5 as value };
88
- const compare_5: boolean;
88
+ let compare_5: boolean;
89
89
  export { compare_5 as compare };
90
90
  }
91
91
  }
92
- import { GLSL_COLORMAP_DEFAULT } from "./constants.js";
92
+ import { GLSL_COLORMAP_DEFAULT } from './constants.js';
93
93
  //# sourceMappingURL=PaddedExpressionHeatmapBitmapLayer.d.ts.map
@@ -1 +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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAjJkF,gBAAgB"}
@@ -2,7 +2,7 @@ declare class PixelatedBitmapLayer {
2
2
  renderLayers(): any;
3
3
  }
4
4
  declare namespace PixelatedBitmapLayer {
5
- export const layerName: string;
5
+ export let layerName: string;
6
6
  export { defaultProps };
7
7
  }
8
8
  export default PixelatedBitmapLayer;
@@ -19,44 +19,44 @@ declare class ScaledExpressionExtension {
19
19
  draw(): void;
20
20
  }
21
21
  declare namespace ScaledExpressionExtension {
22
- export const extensionName: string;
22
+ export let extensionName: string;
23
23
  export { defaultProps };
24
24
  }
25
25
  export default ScaledExpressionExtension;
26
26
  declare namespace defaultProps {
27
27
  namespace colormap {
28
- export const type: string;
28
+ export let type: string;
29
29
  export { GLSL_COLORMAP_DEFAULT as value };
30
- export const compare: boolean;
30
+ export let compare: boolean;
31
31
  }
32
32
  namespace colorScaleLo {
33
- const type_1: string;
33
+ let type_1: string;
34
34
  export { type_1 as type };
35
- export const value: number;
36
- const compare_1: boolean;
35
+ export let value: number;
36
+ let compare_1: boolean;
37
37
  export { compare_1 as compare };
38
38
  }
39
39
  namespace colorScaleHi {
40
- const type_2: string;
40
+ let type_2: string;
41
41
  export { type_2 as type };
42
- const value_1: number;
42
+ let value_1: number;
43
43
  export { value_1 as value };
44
- const compare_2: boolean;
44
+ let compare_2: boolean;
45
45
  export { compare_2 as compare };
46
46
  }
47
- const isExpressionMode: boolean;
47
+ let isExpressionMode: boolean;
48
48
  namespace getExpressionValue {
49
- const type_3: string;
49
+ let type_3: string;
50
50
  export { type_3 as type };
51
- const value_2: number;
51
+ let value_2: number;
52
52
  export { value_2 as value };
53
53
  }
54
54
  namespace getSelectionState {
55
- const type_4: string;
55
+ let type_4: string;
56
56
  export { type_4 as type };
57
- const value_3: number;
57
+ let value_3: number;
58
58
  export { value_3 as value };
59
59
  }
60
60
  }
61
- import { GLSL_COLORMAP_DEFAULT } from "../constants.js";
61
+ import { GLSL_COLORMAP_DEFAULT } from '../constants.js';
62
62
  //# sourceMappingURL=ScaledExpressionExtension.d.ts.map
@@ -1 +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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCA7GkF,iBAAiB"}
@@ -1,3 +1,3 @@
1
1
  export default ScaledExpressionExtension;
2
- import ScaledExpressionExtension from "./ScaledExpressionExtension.js";
2
+ import ScaledExpressionExtension from './ScaledExpressionExtension.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/index.js"],"names":[],"mappings":";sCAAsC,gCAAgC"}
@@ -1,5 +1,5 @@
1
1
  declare namespace _default {
2
- export const name: string;
2
+ export let name: string;
3
3
  export { vs };
4
4
  export { inject };
5
5
  }
@@ -10,7 +10,7 @@ export default _default;
10
10
  * Reference: https://observablehq.com/@rreusser/selecting-the-right-opacity-for-2d-point-clouds
11
11
  * Reference: https://github.com/flekschas/regl-scatterplot/blob/5e3b03e/src/point.vs
12
12
  */
13
- declare const vs: string;
13
+ declare const vs: "\n#define GLSLIFY 1\nvec4 plasma (float x_4) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n float a0 = smoothstep(e0,e1,x_4);\n float a1 = smoothstep(e1,e2,x_4);\n float a2 = smoothstep(e2,e3,x_4);\n float a3 = smoothstep(e3,e4,x_4);\n float a4 = smoothstep(e4,e5,x_4);\n float a5 = smoothstep(e5,e6,x_4);\n float a6 = smoothstep(e6,e7,x_4);\n float a7 = smoothstep(e7,e8,x_4);\n return max(mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1),\n max(mix(v1,v2,a1)*step(e1,x_4)*step(x_4,e2),\n max(mix(v2,v3,a2)*step(e2,x_4)*step(x_4,e3),\n max(mix(v3,v4,a3)*step(e3,x_4)*step(x_4,e4),\n max(mix(v4,v5,a4)*step(e4,x_4)*step(x_4,e5),\n max(mix(v5,v6,a5)*step(e5,x_4)*step(x_4,e6),\n max(mix(v6,v7,a6)*step(e6,x_4)*step(x_4,e7),mix(v7,v8,a7)*step(e7,x_4)*step(x_4,e8)\n )))))));\n}\n\nvec4 viridis (float x_1) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n float a0 = smoothstep(e0,e1,x_1);\n float a1 = smoothstep(e1,e2,x_1);\n float a2 = smoothstep(e2,e3,x_1);\n float a3 = smoothstep(e3,e4,x_1);\n float a4 = smoothstep(e4,e5,x_1);\n float a5 = smoothstep(e5,e6,x_1);\n float a6 = smoothstep(e6,e7,x_1);\n float a7 = smoothstep(e7,e8,x_1);\n return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),\n max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),\n max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),\n max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),\n max(mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5),\n max(mix(v5,v6,a5)*step(e5,x_1)*step(x_1,e6),\n max(mix(v6,v7,a6)*step(e6,x_1)*step(x_1,e7),mix(v7,v8,a7)*step(e7,x_1)*step(x_1,e8)\n )))))));\n}\n\nvec4 greys (float x_10) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_10);\n return mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1);\n}\n\nvec4 magma (float x_7) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n float a0 = smoothstep(e0,e1,x_7);\n float a1 = smoothstep(e1,e2,x_7);\n float a2 = smoothstep(e2,e3,x_7);\n float a3 = smoothstep(e3,e4,x_7);\n float a4 = smoothstep(e4,e5,x_7);\n float a5 = smoothstep(e5,e6,x_7);\n float a6 = smoothstep(e6,e7,x_7);\n float a7 = smoothstep(e7,e8,x_7);\n return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n )))))));\n}\n\nvec4 jet (float x_8) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n const float e1 = 0.125;\n const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n const float e2 = 0.375;\n const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n const float e3 = 0.625;\n const vec4 v3 = vec4(1,1,0,1);\n const float e4 = 0.875;\n const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n const float e5 = 1.0;\n const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n float a0 = smoothstep(e0,e1,x_8);\n float a1 = smoothstep(e1,e2,x_8);\n float a2 = smoothstep(e2,e3,x_8);\n float a3 = smoothstep(e3,e4,x_8);\n float a4 = smoothstep(e4,e5,x_8);\n return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5)\n ))));\n}\n\nvec4 bone (float x_11) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.376;\n const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n const float e2 = 0.753;\n const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_11);\n float a1 = smoothstep(e1,e2,x_11);\n float a2 = smoothstep(e2,e3,x_11);\n return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3)\n ));\n}\n\nvec4 copper (float x_6) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.804;\n const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n const float e2 = 1.0;\n const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n float a0 = smoothstep(e0,e1,x_6);\n float a1 = smoothstep(e1,e2,x_6);\n return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2)\n );\n}\n\nvec4 density (float x_5) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n float a0 = smoothstep(e0,e1,x_5);\n float a1 = smoothstep(e1,e2,x_5);\n float a2 = smoothstep(e2,e3,x_5);\n float a3 = smoothstep(e3,e4,x_5);\n float a4 = smoothstep(e4,e5,x_5);\n float a5 = smoothstep(e5,e6,x_5);\n float a6 = smoothstep(e6,e7,x_5);\n float a7 = smoothstep(e7,e8,x_5);\n return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),\n max(mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2),\n max(mix(v2,v3,a2)*step(e2,x_5)*step(x_5,e3),\n max(mix(v3,v4,a3)*step(e3,x_5)*step(x_5,e4),\n max(mix(v4,v5,a4)*step(e4,x_5)*step(x_5,e5),\n max(mix(v5,v6,a5)*step(e5,x_5)*step(x_5,e6),\n max(mix(v6,v7,a6)*step(e6,x_5)*step(x_5,e7),mix(v7,v8,a7)*step(e7,x_5)*step(x_5,e8)\n )))))));\n}\n\nvec4 inferno (float x_3) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n float a0 = smoothstep(e0,e1,x_3);\n float a1 = smoothstep(e1,e2,x_3);\n float a2 = smoothstep(e2,e3,x_3);\n float a3 = smoothstep(e3,e4,x_3);\n float a4 = smoothstep(e4,e5,x_3);\n float a5 = smoothstep(e5,e6,x_3);\n float a6 = smoothstep(e6,e7,x_3);\n float a7 = smoothstep(e7,e8,x_3);\n return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),\n max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),\n max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),\n max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8)\n )))))));\n}\n\nvec4 cool (float x_2) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n float a0 = smoothstep(e0,e1,x_2);\n float a1 = smoothstep(e1,e2,x_2);\n float a2 = smoothstep(e2,e3,x_2);\n float a3 = smoothstep(e3,e4,x_2);\n float a4 = smoothstep(e4,e5,x_2);\n float a5 = smoothstep(e5,e6,x_2);\n float a6 = smoothstep(e6,e7,x_2);\n float a7 = smoothstep(e7,e8,x_2);\n return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n )))))));\n}\n\nvec4 hot (float x_0) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.3;\n const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n const float e2 = 0.6;\n const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_0);\n float a1 = smoothstep(e1,e2,x_0);\n float a2 = smoothstep(e2,e3,x_0);\n return max(mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1),\n max(mix(v1,v2,a1)*step(e1,x_0)*step(x_0,e2),mix(v2,v3,a2)*step(e2,x_0)*step(x_0,e3)\n ));\n}\n\nvec4 spring (float x_14) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_14);\n return mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1);\n}\n\nvec4 summer (float x_9) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0.4,1);\n float a0 = smoothstep(e0,e1,x_9);\n return mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1);\n}\n\nvec4 autumn (float x_13) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_13);\n return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 winter (float x_12) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n float a0 = smoothstep(e0,e1,x_12);\n return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\n\n// Custom attributes for Vitessce:\nattribute float expressionValue;\n\n// Custom uniforms for Vitessce:\nuniform vec2 uColorScaleRange;\nuniform bool uIsExpressionMode;\n\n";
14
14
  declare const inject: {
15
15
  'vs:DECKGL_FILTER_COLOR': string;
16
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/shader-module.js"],"names":[],"mappings":";;;;;;AAEA;;;;;GAKG;AACH,yBAUE;AAEF;;EAQE"}
1
+ {"version":3,"file":"shader-module.d.ts","sourceRoot":"","sources":["../../src/ScaledExpressionExtension/shader-module.js"],"names":[],"mappings":";;;;;;AAEA;;;;;GAKG;AACH,83bAUE;AAEF;;EAQE"}
@@ -12,7 +12,7 @@ declare class SelectionExtension {
12
12
  initializeState(context: any, extension: any): void;
13
13
  }
14
14
  declare namespace SelectionExtension {
15
- const extensionName: string;
15
+ let extensionName: string;
16
16
  }
17
17
  export default SelectionExtension;
18
18
  //# sourceMappingURL=SelectionExtension.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export default SelectionExtension;
2
- import SelectionExtension from "./SelectionExtension.js";
2
+ import SelectionExtension from './SelectionExtension.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SelectionExtension/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SelectionExtension/index.js"],"names":[],"mappings":";+BAA+B,yBAAyB"}
@@ -1,5 +1,5 @@
1
1
  declare namespace _default {
2
- export const name: string;
2
+ export let name: string;
3
3
  export { vs };
4
4
  export { inject };
5
5
  }
@@ -4,13 +4,13 @@ declare class SelectionLayer {
4
4
  renderLayers(): EditableGeoJsonLayer[];
5
5
  }
6
6
  declare namespace SelectionLayer {
7
- export const layerName: string;
7
+ export let layerName: string;
8
8
  export { defaultProps };
9
9
  }
10
10
  export default SelectionLayer;
11
- import { EditableGeoJsonLayer } from "@nebula.gl/layers";
11
+ import { EditableGeoJsonLayer } from '@nebula.gl/layers';
12
12
  declare namespace defaultProps {
13
- const layerIds: never[];
13
+ let layerIds: never[];
14
14
  function onSelect(): void;
15
15
  }
16
16
  //# sourceMappingURL=SelectionLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionLayer.d.ts","sourceRoot":"","sources":["../src/SelectionLayer.js"],"names":[],"mappings":"AAqEA;IACE,8CAqEC;IAED,qBAMC;IAED,uCAmDC;CACF;;;;;;;;;IA1KW,0BAAQ"}
1
+ {"version":3,"file":"SelectionLayer.d.ts","sourceRoot":"","sources":["../src/SelectionLayer.js"],"names":[],"mappings":"AAqEA;IACE,8CAqEC;IAED,qBAMC;IAED,uCAmDC;CACF;;;;;;qCA7LoC,mBAAmB;;;IAmB5C,0BAAQ"}
@@ -1,3 +1,3 @@
1
1
  export const vs: "\n#define SHADER_NAME bitmask-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute vec3 instancePickingColors;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = instancePickingColors;\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vTexCoord = texCoords;\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n";
2
- export const fs: string;
2
+ export const fs: "\n#define SHADER_NAME bitmask-layer-fragment-shader\nprecision highp float;\n\n#define GLSLIFY 1\nvec4 plasma (float x_4) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n float a0 = smoothstep(e0,e1,x_4);\n float a1 = smoothstep(e1,e2,x_4);\n float a2 = smoothstep(e2,e3,x_4);\n float a3 = smoothstep(e3,e4,x_4);\n float a4 = smoothstep(e4,e5,x_4);\n float a5 = smoothstep(e5,e6,x_4);\n float a6 = smoothstep(e6,e7,x_4);\n float a7 = smoothstep(e7,e8,x_4);\n return max(mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1),\n max(mix(v1,v2,a1)*step(e1,x_4)*step(x_4,e2),\n max(mix(v2,v3,a2)*step(e2,x_4)*step(x_4,e3),\n max(mix(v3,v4,a3)*step(e3,x_4)*step(x_4,e4),\n max(mix(v4,v5,a4)*step(e4,x_4)*step(x_4,e5),\n max(mix(v5,v6,a5)*step(e5,x_4)*step(x_4,e6),\n max(mix(v6,v7,a6)*step(e6,x_4)*step(x_4,e7),mix(v7,v8,a7)*step(e7,x_4)*step(x_4,e8)\n )))))));\n}\n\nvec4 viridis (float x_1) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n float a0 = smoothstep(e0,e1,x_1);\n float a1 = smoothstep(e1,e2,x_1);\n float a2 = smoothstep(e2,e3,x_1);\n float a3 = smoothstep(e3,e4,x_1);\n float a4 = smoothstep(e4,e5,x_1);\n float a5 = smoothstep(e5,e6,x_1);\n float a6 = smoothstep(e6,e7,x_1);\n float a7 = smoothstep(e7,e8,x_1);\n return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),\n max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),\n max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),\n max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),\n max(mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5),\n max(mix(v5,v6,a5)*step(e5,x_1)*step(x_1,e6),\n max(mix(v6,v7,a6)*step(e6,x_1)*step(x_1,e7),mix(v7,v8,a7)*step(e7,x_1)*step(x_1,e8)\n )))))));\n}\n\nvec4 greys (float x_10) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_10);\n return mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1);\n}\n\nvec4 magma (float x_7) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n float a0 = smoothstep(e0,e1,x_7);\n float a1 = smoothstep(e1,e2,x_7);\n float a2 = smoothstep(e2,e3,x_7);\n float a3 = smoothstep(e3,e4,x_7);\n float a4 = smoothstep(e4,e5,x_7);\n float a5 = smoothstep(e5,e6,x_7);\n float a6 = smoothstep(e6,e7,x_7);\n float a7 = smoothstep(e7,e8,x_7);\n return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n )))))));\n}\n\nvec4 jet (float x_8) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n const float e1 = 0.125;\n const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n const float e2 = 0.375;\n const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n const float e3 = 0.625;\n const vec4 v3 = vec4(1,1,0,1);\n const float e4 = 0.875;\n const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n const float e5 = 1.0;\n const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n float a0 = smoothstep(e0,e1,x_8);\n float a1 = smoothstep(e1,e2,x_8);\n float a2 = smoothstep(e2,e3,x_8);\n float a3 = smoothstep(e3,e4,x_8);\n float a4 = smoothstep(e4,e5,x_8);\n return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5)\n ))));\n}\n\nvec4 bone (float x_11) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.376;\n const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n const float e2 = 0.753;\n const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_11);\n float a1 = smoothstep(e1,e2,x_11);\n float a2 = smoothstep(e2,e3,x_11);\n return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3)\n ));\n}\n\nvec4 copper (float x_6) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.804;\n const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n const float e2 = 1.0;\n const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n float a0 = smoothstep(e0,e1,x_6);\n float a1 = smoothstep(e1,e2,x_6);\n return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2)\n );\n}\n\nvec4 density (float x_5) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n float a0 = smoothstep(e0,e1,x_5);\n float a1 = smoothstep(e1,e2,x_5);\n float a2 = smoothstep(e2,e3,x_5);\n float a3 = smoothstep(e3,e4,x_5);\n float a4 = smoothstep(e4,e5,x_5);\n float a5 = smoothstep(e5,e6,x_5);\n float a6 = smoothstep(e6,e7,x_5);\n float a7 = smoothstep(e7,e8,x_5);\n return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),\n max(mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2),\n max(mix(v2,v3,a2)*step(e2,x_5)*step(x_5,e3),\n max(mix(v3,v4,a3)*step(e3,x_5)*step(x_5,e4),\n max(mix(v4,v5,a4)*step(e4,x_5)*step(x_5,e5),\n max(mix(v5,v6,a5)*step(e5,x_5)*step(x_5,e6),\n max(mix(v6,v7,a6)*step(e6,x_5)*step(x_5,e7),mix(v7,v8,a7)*step(e7,x_5)*step(x_5,e8)\n )))))));\n}\n\nvec4 inferno (float x_3) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n float a0 = smoothstep(e0,e1,x_3);\n float a1 = smoothstep(e1,e2,x_3);\n float a2 = smoothstep(e2,e3,x_3);\n float a3 = smoothstep(e3,e4,x_3);\n float a4 = smoothstep(e4,e5,x_3);\n float a5 = smoothstep(e5,e6,x_3);\n float a6 = smoothstep(e6,e7,x_3);\n float a7 = smoothstep(e7,e8,x_3);\n return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),\n max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),\n max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),\n max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8)\n )))))));\n}\n\nvec4 cool (float x_2) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n float a0 = smoothstep(e0,e1,x_2);\n float a1 = smoothstep(e1,e2,x_2);\n float a2 = smoothstep(e2,e3,x_2);\n float a3 = smoothstep(e3,e4,x_2);\n float a4 = smoothstep(e4,e5,x_2);\n float a5 = smoothstep(e5,e6,x_2);\n float a6 = smoothstep(e6,e7,x_2);\n float a7 = smoothstep(e7,e8,x_2);\n return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n )))))));\n}\n\nvec4 hot (float x_0) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.3;\n const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n const float e2 = 0.6;\n const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_0);\n float a1 = smoothstep(e1,e2,x_0);\n float a2 = smoothstep(e2,e3,x_0);\n return max(mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1),\n max(mix(v1,v2,a1)*step(e1,x_0)*step(x_0,e2),mix(v2,v3,a2)*step(e2,x_0)*step(x_0,e3)\n ));\n}\n\nvec4 spring (float x_14) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_14);\n return mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1);\n}\n\nvec4 summer (float x_9) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0.4,1);\n float a0 = smoothstep(e0,e1,x_9);\n return mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1);\n}\n\nvec4 autumn (float x_13) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_13);\n return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 winter (float x_12) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n float a0 = smoothstep(e0,e1,x_12);\n return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\n\n// Note: can have a maximum of 16 textures in most browsers\n// Reference: https://webglreport.com/\n\n// Data (mask) texture\nuniform sampler2D channel0;\nuniform sampler2D channel1;\nuniform sampler2D channel2;\nuniform sampler2D channel3;\nuniform sampler2D channel4;\nuniform sampler2D channel5;\nuniform sampler2D channel6;\n\n// Color texture\nuniform float hovered;\n\n// Channel-specific properties\nuniform bool channelsVisible[7];\nuniform float channelOpacities[7];\nuniform bool channelIsStaticColorMode[7]; // TODO: should this be a single float?\nuniform bool channelIsSetColorMode[7]; // TODO: should this be a single float?\n\n// TODO: can array of tuples/vec2 be used?\nuniform float channelColormapRangeStarts[7];\nuniform float channelColormapRangeEnds[7];\n\nuniform float multiFeatureTexSize;\n\n// Use one expressionTex for all channels, using an offset mechanism.\nuniform sampler2D valueTex;\nuniform float valueTexOffsets[7];\nuniform float valueTexHeight;\n\n// Textures for set colors, using the same offset mechanism.\nuniform sampler2D colorTex;\nuniform float colorTexOffsets[7];\nuniform float colorTexHeight;\n\n\n// Static colors\n// TODO: For some reason I cannot use uniform vec3 colors[7]; and i cannot figure out why.\nuniform vec3 color0;\nuniform vec3 color1;\nuniform vec3 color2;\nuniform vec3 color3;\nuniform vec3 color4;\nuniform vec3 color5;\nuniform vec3 color6;\n\n// Info for edge-only mode\nuniform float scaleFactor;\nuniform bool channelsFilled[7];\nuniform float channelStrokeWidths[7];\n\n// opacity\nuniform float opacity;\n\nvarying vec2 vTexCoord;\n\nvec3 sampleAndGetData(sampler2D dataTex, vec2 coord, bool isFilled, float strokeWidth, bool isOn) {\n float sampledData = texture(dataTex, coord).r;\n float clampedSampledData = max(0., min(sampledData, 1.));\n\n bool isEdge = true;\n\n if(!isFilled) {\n vec2 uTextureSize = vec2(2048.0, 2048.0);\n vec2 onePixel = vec2(1.0, 1.0) / uTextureSize;\n\n // Vary the edgeSize based on user-defined stroke width.\n float edgeSize = 150.0 * strokeWidth * scaleFactor;\n\n float pixN = texture(dataTex, coord + vec2(0.0, onePixel.y * edgeSize)).r;\n float pixS = texture(dataTex, coord - vec2(0.0, onePixel.y * edgeSize)).r;\n float pixW = texture(dataTex, coord + vec2(onePixel.x * edgeSize, 0.0)).r;\n float pixE = texture(dataTex, coord - vec2(onePixel.x * edgeSize, 0.0)).r;\n\n float pixNW = texture(dataTex, coord + vec2(onePixel.y * edgeSize, onePixel.y * edgeSize)).r;\n float pixNE = texture(dataTex, coord + vec2(-1.0 * onePixel.x * edgeSize, onePixel.y * edgeSize)).r;\n float pixSW = texture(dataTex, coord - vec2(onePixel.x * edgeSize, onePixel.y * edgeSize)).r;\n float pixSE = texture(dataTex, coord - vec2(-1.0 * onePixel.x * edgeSize, onePixel.y * edgeSize)).r;\n\n isEdge = (pixN != sampledData || pixS != sampledData || pixW != sampledData || pixE != sampledData || pixNW != sampledData || pixNE != sampledData || pixSW != sampledData || pixSE != sampledData);\n }\n // Return a tuple of (sampledData, isEdge)\n return vec3(clampedSampledData * float(isOn), sampledData, float(isEdge));\n}\n\nvec4 dataToColor(vec3 sampledDataAndIsEdge, bool isStaticColorMode, vec3 channelColor, float channelOpacity, float valueOffset, float rangeStart, float rangeEnd, bool isSetColorMode, float setColorOffset) {\n float clampedSampledDataAndIsOn = sampledDataAndIsEdge.x;\n float sampledData = sampledDataAndIsEdge.y;\n float isEdge = sampledDataAndIsEdge.z;\n \n\n vec4 hoveredColor = float(sampledData == hovered && sampledData > 0. && hovered > 0.) * vec4(0., 0., 1., 1.);\n \n // Colors are laid out corresponding to ids in row-major order in the texture. So if width of the texture is 10, and you want ID 25,\n // you need coordinate (1, 4) (i.e 2 rows down, and 5 columns over indexed from 0 for a total of 25 units covered in row major order).\n float offsetSampledData = sampledData + valueOffset - 1.0;\n vec2 colorTexCoord = vec2(mod(offsetSampledData, multiFeatureTexSize) / multiFeatureTexSize, floor(offsetSampledData / multiFeatureTexSize) / (valueTexHeight - 1.));\n\n // Get expression value\n float expressionValue = texture(valueTex, colorTexCoord).r / 255.;\n float scaledExpressionValue = (expressionValue - rangeStart) / max(0.005, (rangeEnd - rangeStart));\n\n\n // Get set color index value\n vec2 setIndicesTexCoord = vec2(mod(offsetSampledData, multiFeatureTexSize) / multiFeatureTexSize, floor(offsetSampledData / multiFeatureTexSize) / (valueTexHeight - 1.));\n float setColorIndex = texture(valueTex, setIndicesTexCoord).r;\n\n // Initialize to the default \"null\" color.\n vec3 setColor = vec3(200. / 255., 200. / 255., 200. / 255.);\n if(setColorIndex != 0.) {\n // Subtract one from setColorIndex because we have already checked for the \"null\" value.\n setColorIndex = setColorIndex - 1.;\n\n float setColorOffsetR = (setColorIndex + setColorOffset) * 3.0 + 0.0;\n vec2 setColorTexCoordR = vec2(mod(setColorOffsetR, multiFeatureTexSize) / multiFeatureTexSize, floor(setColorOffsetR / multiFeatureTexSize) / (colorTexHeight - 1.));\n float setColorR = texture(colorTex, setColorTexCoordR).r / 255.;\n\n float setColorOffsetG = (setColorIndex + setColorOffset) * 3.0 + 1.0;\n vec2 setColorTexCoordG = vec2(mod(setColorOffsetG, multiFeatureTexSize) / multiFeatureTexSize, floor(setColorOffsetG / multiFeatureTexSize) / (colorTexHeight - 1.));\n float setColorG = texture(colorTex, setColorTexCoordG).r / 255.;\n\n float setColorOffsetB = (setColorIndex + setColorOffset) * 3.0 + 2.0;\n vec2 setColorTexCoordB = vec2(mod(setColorOffsetB, multiFeatureTexSize) / multiFeatureTexSize, floor(setColorOffsetB / multiFeatureTexSize) / (colorTexHeight - 1.));\n float setColorB = texture(colorTex, setColorTexCoordB).r / 255.;\n\n setColor = vec3(setColorR, setColorG, setColorB);\n }\n\n \n vec4 sampledColor = (1. - (float(isStaticColorMode) + float(isSetColorMode))) * vec4(COLORMAP_FUNC(clamp(scaledExpressionValue, 0.0, 1.0)).rgb, channelOpacity) + float(isStaticColorMode) * vec4(channelColor.rgb, channelOpacity) + float(isSetColorMode) * vec4(setColor, channelOpacity);\n // Only return a color if the data is non-zero.\n \n return clampedSampledDataAndIsOn * isEdge * sampledColor;\n}\n\nvoid main() {\n\n // Get the color and alpha value for each channel.\n vec3 dat0 = sampleAndGetData(channel0, vTexCoord, channelsFilled[0], channelStrokeWidths[0], channelsVisible[0]);\n vec3 dat1 = sampleAndGetData(channel1, vTexCoord, channelsFilled[1], channelStrokeWidths[1], channelsVisible[1]);\n vec3 dat2 = sampleAndGetData(channel2, vTexCoord, channelsFilled[2], channelStrokeWidths[2], channelsVisible[2]);\n vec3 dat3 = sampleAndGetData(channel3, vTexCoord, channelsFilled[3], channelStrokeWidths[3], channelsVisible[3]);\n vec3 dat4 = sampleAndGetData(channel4, vTexCoord, channelsFilled[4], channelStrokeWidths[4], channelsVisible[4]);\n vec3 dat5 = sampleAndGetData(channel5, vTexCoord, channelsFilled[5], channelStrokeWidths[5], channelsVisible[5]);\n vec3 dat6 = sampleAndGetData(channel6, vTexCoord, channelsFilled[6], channelStrokeWidths[6], channelsVisible[6]);\n \n vec4 val0 = dataToColor(dat0, channelIsStaticColorMode[0], color0, channelOpacities[0], valueTexOffsets[0], channelColormapRangeStarts[0], channelColormapRangeEnds[0], channelIsSetColorMode[0], colorTexOffsets[0]);\n vec4 val1 = dataToColor(dat1, channelIsStaticColorMode[1], color1, channelOpacities[1], valueTexOffsets[1], channelColormapRangeStarts[1], channelColormapRangeEnds[1], channelIsSetColorMode[1], colorTexOffsets[1]);\n vec4 val2 = dataToColor(dat2, channelIsStaticColorMode[2], color2, channelOpacities[2], valueTexOffsets[2], channelColormapRangeStarts[2], channelColormapRangeEnds[2], channelIsSetColorMode[2], colorTexOffsets[2]);\n vec4 val3 = dataToColor(dat3, channelIsStaticColorMode[3], color3, channelOpacities[3], valueTexOffsets[3], channelColormapRangeStarts[3], channelColormapRangeEnds[3], channelIsSetColorMode[3], colorTexOffsets[3]);\n vec4 val4 = dataToColor(dat4, channelIsStaticColorMode[4], color4, channelOpacities[4], valueTexOffsets[4], channelColormapRangeStarts[4], channelColormapRangeEnds[4], channelIsSetColorMode[4], colorTexOffsets[4]);\n vec4 val5 = dataToColor(dat5, channelIsStaticColorMode[5], color5, channelOpacities[5], valueTexOffsets[5], channelColormapRangeStarts[5], channelColormapRangeEnds[5], channelIsSetColorMode[5], colorTexOffsets[5]);\n vec4 val6 = dataToColor(dat6, channelIsStaticColorMode[6], color6, channelOpacities[6], valueTexOffsets[6], channelColormapRangeStarts[6], channelColormapRangeEnds[6], channelIsSetColorMode[6], colorTexOffsets[6]);\n \n // If all of the channels are \"empty\", then discard this pixel so that it is not considered during picking.\n float emptyDat = 0.;\n if(dat0.x == emptyDat && dat1.x == emptyDat && dat2.x == emptyDat && dat3.x == emptyDat && dat4.x == emptyDat && dat5.x == emptyDat && dat6.x == emptyDat) {\n discard;\n }\n \n // If the next channel color and the currently stored color (gl_FragColor) are identical,\n // or the next channel color is transparent black,\n // just use the currently stored color. Repeat this for all channels.\n\n // Mix colors where necessary, using the alpha value of the next channel as the weight.\n // Use the maximum alpha value as the resulting alpha value.\n gl_FragColor = val0;\n gl_FragColor = (val1 == gl_FragColor || val1 == vec4(0.)) ? gl_FragColor : vec4(mix(gl_FragColor, val1, val1.a).rgb, max(gl_FragColor.a, val1.a));\n gl_FragColor = (val2 == gl_FragColor || val2 == vec4(0.)) ? gl_FragColor : vec4(mix(gl_FragColor, val2, val2.a).rgb, max(gl_FragColor.a, val2.a));\n gl_FragColor = (val3 == gl_FragColor || val3 == vec4(0.)) ? gl_FragColor : vec4(mix(gl_FragColor, val3, val3.a).rgb, max(gl_FragColor.a, val3.a));\n gl_FragColor = (val4 == gl_FragColor || val4 == vec4(0.)) ? gl_FragColor : vec4(mix(gl_FragColor, val4, val4.a).rgb, max(gl_FragColor.a, val4.a));\n gl_FragColor = (val5 == gl_FragColor || val5 == vec4(0.)) ? gl_FragColor : vec4(mix(gl_FragColor, val5, val5.a).rgb, max(gl_FragColor.a, val5.a));\n gl_FragColor = (val6 == gl_FragColor || val6 == vec4(0.)) ? gl_FragColor : vec4(mix(gl_FragColor, val6, val6.a).rgb, max(gl_FragColor.a, val6.a));\n\n \n\n // TODO: multiply the resulting channel-level opacity value by the layer-level opacity value.\n\n geometry.uv = vTexCoord;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
3
3
  //# sourceMappingURL=bitmask-layer-beta-shaders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bitmask-layer-beta-shaders.d.ts","sourceRoot":"","sources":["../src/bitmask-layer-beta-shaders.js"],"names":[],"mappings":"AAEA,0mBAoBE;AAEF,wBA6LE"}
1
+ {"version":3,"file":"bitmask-layer-beta-shaders.d.ts","sourceRoot":"","sources":["../src/bitmask-layer-beta-shaders.js"],"names":[],"mappings":"AAEA,0mBAoBE;AAEF,kmwBA6LE"}
@@ -1,3 +1,3 @@
1
1
  export const vs: "\n#define SHADER_NAME bitmask-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute vec3 instancePickingColors;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = instancePickingColors;\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vTexCoord = texCoords;\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n";
2
- export const fs: string;
2
+ export const fs: "\n#define SHADER_NAME bitmask-layer-fragment-shader\nprecision highp float;\n\n#define GLSLIFY 1\nvec4 plasma (float x_4) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n float a0 = smoothstep(e0,e1,x_4);\n float a1 = smoothstep(e1,e2,x_4);\n float a2 = smoothstep(e2,e3,x_4);\n float a3 = smoothstep(e3,e4,x_4);\n float a4 = smoothstep(e4,e5,x_4);\n float a5 = smoothstep(e5,e6,x_4);\n float a6 = smoothstep(e6,e7,x_4);\n float a7 = smoothstep(e7,e8,x_4);\n return max(mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1),\n max(mix(v1,v2,a1)*step(e1,x_4)*step(x_4,e2),\n max(mix(v2,v3,a2)*step(e2,x_4)*step(x_4,e3),\n max(mix(v3,v4,a3)*step(e3,x_4)*step(x_4,e4),\n max(mix(v4,v5,a4)*step(e4,x_4)*step(x_4,e5),\n max(mix(v5,v6,a5)*step(e5,x_4)*step(x_4,e6),\n max(mix(v6,v7,a6)*step(e6,x_4)*step(x_4,e7),mix(v7,v8,a7)*step(e7,x_4)*step(x_4,e8)\n )))))));\n}\n\nvec4 viridis (float x_1) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n float a0 = smoothstep(e0,e1,x_1);\n float a1 = smoothstep(e1,e2,x_1);\n float a2 = smoothstep(e2,e3,x_1);\n float a3 = smoothstep(e3,e4,x_1);\n float a4 = smoothstep(e4,e5,x_1);\n float a5 = smoothstep(e5,e6,x_1);\n float a6 = smoothstep(e6,e7,x_1);\n float a7 = smoothstep(e7,e8,x_1);\n return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),\n max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),\n max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),\n max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),\n max(mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5),\n max(mix(v5,v6,a5)*step(e5,x_1)*step(x_1,e6),\n max(mix(v6,v7,a6)*step(e6,x_1)*step(x_1,e7),mix(v7,v8,a7)*step(e7,x_1)*step(x_1,e8)\n )))))));\n}\n\nvec4 greys (float x_10) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_10);\n return mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1);\n}\n\nvec4 magma (float x_7) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n float a0 = smoothstep(e0,e1,x_7);\n float a1 = smoothstep(e1,e2,x_7);\n float a2 = smoothstep(e2,e3,x_7);\n float a3 = smoothstep(e3,e4,x_7);\n float a4 = smoothstep(e4,e5,x_7);\n float a5 = smoothstep(e5,e6,x_7);\n float a6 = smoothstep(e6,e7,x_7);\n float a7 = smoothstep(e7,e8,x_7);\n return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n )))))));\n}\n\nvec4 jet (float x_8) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n const float e1 = 0.125;\n const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n const float e2 = 0.375;\n const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n const float e3 = 0.625;\n const vec4 v3 = vec4(1,1,0,1);\n const float e4 = 0.875;\n const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n const float e5 = 1.0;\n const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n float a0 = smoothstep(e0,e1,x_8);\n float a1 = smoothstep(e1,e2,x_8);\n float a2 = smoothstep(e2,e3,x_8);\n float a3 = smoothstep(e3,e4,x_8);\n float a4 = smoothstep(e4,e5,x_8);\n return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5)\n ))));\n}\n\nvec4 bone (float x_11) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.376;\n const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n const float e2 = 0.753;\n const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_11);\n float a1 = smoothstep(e1,e2,x_11);\n float a2 = smoothstep(e2,e3,x_11);\n return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3)\n ));\n}\n\nvec4 copper (float x_6) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.804;\n const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n const float e2 = 1.0;\n const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n float a0 = smoothstep(e0,e1,x_6);\n float a1 = smoothstep(e1,e2,x_6);\n return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2)\n );\n}\n\nvec4 density (float x_5) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n float a0 = smoothstep(e0,e1,x_5);\n float a1 = smoothstep(e1,e2,x_5);\n float a2 = smoothstep(e2,e3,x_5);\n float a3 = smoothstep(e3,e4,x_5);\n float a4 = smoothstep(e4,e5,x_5);\n float a5 = smoothstep(e5,e6,x_5);\n float a6 = smoothstep(e6,e7,x_5);\n float a7 = smoothstep(e7,e8,x_5);\n return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),\n max(mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2),\n max(mix(v2,v3,a2)*step(e2,x_5)*step(x_5,e3),\n max(mix(v3,v4,a3)*step(e3,x_5)*step(x_5,e4),\n max(mix(v4,v5,a4)*step(e4,x_5)*step(x_5,e5),\n max(mix(v5,v6,a5)*step(e5,x_5)*step(x_5,e6),\n max(mix(v6,v7,a6)*step(e6,x_5)*step(x_5,e7),mix(v7,v8,a7)*step(e7,x_5)*step(x_5,e8)\n )))))));\n}\n\nvec4 inferno (float x_3) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n float a0 = smoothstep(e0,e1,x_3);\n float a1 = smoothstep(e1,e2,x_3);\n float a2 = smoothstep(e2,e3,x_3);\n float a3 = smoothstep(e3,e4,x_3);\n float a4 = smoothstep(e4,e5,x_3);\n float a5 = smoothstep(e5,e6,x_3);\n float a6 = smoothstep(e6,e7,x_3);\n float a7 = smoothstep(e7,e8,x_3);\n return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),\n max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),\n max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),\n max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8)\n )))))));\n}\n\nvec4 cool (float x_2) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n float a0 = smoothstep(e0,e1,x_2);\n float a1 = smoothstep(e1,e2,x_2);\n float a2 = smoothstep(e2,e3,x_2);\n float a3 = smoothstep(e3,e4,x_2);\n float a4 = smoothstep(e4,e5,x_2);\n float a5 = smoothstep(e5,e6,x_2);\n float a6 = smoothstep(e6,e7,x_2);\n float a7 = smoothstep(e7,e8,x_2);\n return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n )))))));\n}\n\nvec4 hot (float x_0) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.3;\n const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n const float e2 = 0.6;\n const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_0);\n float a1 = smoothstep(e1,e2,x_0);\n float a2 = smoothstep(e2,e3,x_0);\n return max(mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1),\n max(mix(v1,v2,a1)*step(e1,x_0)*step(x_0,e2),mix(v2,v3,a2)*step(e2,x_0)*step(x_0,e3)\n ));\n}\n\nvec4 spring (float x_14) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_14);\n return mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1);\n}\n\nvec4 summer (float x_9) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0.4,1);\n float a0 = smoothstep(e0,e1,x_9);\n return mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1);\n}\n\nvec4 autumn (float x_13) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_13);\n return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 winter (float x_12) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n float a0 = smoothstep(e0,e1,x_12);\n return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\n\n// Data (mask) texture\nuniform sampler2D channel0;\nuniform sampler2D channel1;\nuniform sampler2D channel2;\nuniform sampler2D channel3;\nuniform sampler2D channel4;\nuniform sampler2D channel5;\n\n// Color texture\nuniform sampler2D colorTex;\nuniform float colorTexHeight;\nuniform float colorTexWidth;\nuniform float hovered;\n// range\nuniform bool channelsVisible[6];\n\n// Expression mapping\nuniform vec2 uColorScaleRange;\nuniform bool uIsExpressionMode;\nuniform sampler2D expressionTex;\n\n// opacity\nuniform float opacity;\n\nvarying vec2 vTexCoord;\n\nvec4 sampleAndGetColor(sampler2D dataTex, vec2 coord, bool isOn){\n float sampledData = texture(dataTex, coord).r;\n vec4 hoveredColor = float(sampledData == hovered && sampledData > 0. && hovered > 0.) * vec4(0., 0., 1., 1.);\n // Colors are laid out corresponding to ids in row-major order in the texture. So if width of the texture is 10, and you want ID 25,\n // you need coordinate (1, 4) (i.e 2 rows down, and 5 columns over indexed from 0 for a total of 25 units covered in row major order).\n vec2 colorTexCoord = vec2(mod(sampledData, colorTexWidth) / colorTexWidth, floor(sampledData / colorTexWidth) / (colorTexHeight - 1.));\n float expressionValue = texture(expressionTex, colorTexCoord).r / 255.;\n float scaledExpressionValue = (expressionValue - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n vec4 sampledColor = float(uIsExpressionMode) * COLORMAP_FUNC(clamp(scaledExpressionValue, 0.0, 1.0)) + (1. - float(uIsExpressionMode)) * vec4(texture(colorTex, colorTexCoord).rgb, 1.);\n // Only return a color if the data is non-zero.\n return max(0., min(sampledData, 1.)) * float(isOn) * (sampledColor + hoveredColor);\n}\n\nvoid main() {\n\n gl_FragColor = sampleAndGetColor(channel0, vTexCoord, channelsVisible[0]);\n\n // If the sampled color and the currently stored color (gl_FragColor) are identical, don't blend and use the sampled color,\n // otherwise just use the currently stored color. Repeat this for all channels.\n vec4 sampledColor = sampleAndGetColor(channel1, vTexCoord, channelsVisible[1]);\n gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n sampledColor = sampleAndGetColor(channel2, vTexCoord, channelsVisible[2]);\n gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n sampledColor = sampleAndGetColor(channel3, vTexCoord, channelsVisible[3]);\n gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n sampledColor = sampleAndGetColor(channel4, vTexCoord, channelsVisible[4]);\n gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n sampledColor = sampleAndGetColor(channel5, vTexCoord, channelsVisible[5]);\n gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n // Apply the opacity if there is pixel data, and if the pixel data is empty i.e no segmentation, use 0 opacity.\n gl_FragColor = vec4(gl_FragColor.rgb, (gl_FragColor.rgb == vec3(0., 0., 0.)) ? 0.0 : opacity);\n\n geometry.uv = vTexCoord;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
3
3
  //# sourceMappingURL=bitmask-layer-shaders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bitmask-layer-shaders.d.ts","sourceRoot":"","sources":["../src/bitmask-layer-shaders.js"],"names":[],"mappings":"AAEA,0mBAoBE;AAEF,wBAmEE"}
1
+ {"version":3,"file":"bitmask-layer-shaders.d.ts","sourceRoot":"","sources":["../src/bitmask-layer-shaders.js"],"names":[],"mappings":"AAEA,0mBAoBE;AAEF,o/hBAmEE"}
@@ -4,11 +4,11 @@ describe('bitmask utils', () => {
4
4
  describe('multiSetsToTextureData', () => {
5
5
  it('gets all scope names for a particular coordination type', () => {
6
6
  const multiFeatureValues = [
7
- [1, 2, 3, 255, 1000],
7
+ [1, 2, 3, 255, 1000], // 5 expression values, one per cell
8
8
  [10, 20, 30], // 3 expression values, one per glomerulus
9
9
  ];
10
10
  const multiObsIndex = [
11
- ['1', '2', '3', '4', '5'],
11
+ ['1', '2', '3', '4', '5'], // 5 cells
12
12
  ['1', '2', '3'], // 3 glomeruli
13
13
  ];
14
14
  const setColorValues = [
@@ -2,7 +2,7 @@ export const GLSL_COLORMAPS: string[];
2
2
  export const GLSL_COLORMAP_DEFAULT: "plasma";
3
3
  export const COLORMAP_SHADER_PLACEHOLDER: "COLORMAP_FUNC";
4
4
  export namespace DEFAULT_GL_OPTIONS {
5
- const webgl2: boolean;
5
+ let webgl2: boolean;
6
6
  }
7
7
  export { SELECTION_TYPE } from "nebula.gl";
8
8
  //# sourceMappingURL=constants.d.ts.map
@@ -9,5 +9,5 @@ export const vertexShader: "\n#define SHADER_NAME heatmap-bitmap-layer-vertex-sh
9
9
  * Reference: https://github.com/visgl/deck.gl/blob/8.2-release/modules/layers/src/bitmap-layer/bitmap-layer-fragment.js
10
10
  * Reference: https://github.com/hms-dbmi/viv/blob/06231ae02cac1ff57ba458c71e9bc59ed2fc4f8b/src/layers/XRLayer/xr-layer-fragment-colormap.webgl1.glsl
11
11
  */
12
- export const fragmentShader: string;
12
+ export const fragmentShader: "\n#define SHADER_NAME heatmap-bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\n#define GLSLIFY 1\nvec4 plasma (float x_4) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n float a0 = smoothstep(e0,e1,x_4);\n float a1 = smoothstep(e1,e2,x_4);\n float a2 = smoothstep(e2,e3,x_4);\n float a3 = smoothstep(e3,e4,x_4);\n float a4 = smoothstep(e4,e5,x_4);\n float a5 = smoothstep(e5,e6,x_4);\n float a6 = smoothstep(e6,e7,x_4);\n float a7 = smoothstep(e7,e8,x_4);\n return max(mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1),\n max(mix(v1,v2,a1)*step(e1,x_4)*step(x_4,e2),\n max(mix(v2,v3,a2)*step(e2,x_4)*step(x_4,e3),\n max(mix(v3,v4,a3)*step(e3,x_4)*step(x_4,e4),\n max(mix(v4,v5,a4)*step(e4,x_4)*step(x_4,e5),\n max(mix(v5,v6,a5)*step(e5,x_4)*step(x_4,e6),\n max(mix(v6,v7,a6)*step(e6,x_4)*step(x_4,e7),mix(v7,v8,a7)*step(e7,x_4)*step(x_4,e8)\n )))))));\n}\n\nvec4 viridis (float x_1) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n float a0 = smoothstep(e0,e1,x_1);\n float a1 = smoothstep(e1,e2,x_1);\n float a2 = smoothstep(e2,e3,x_1);\n float a3 = smoothstep(e3,e4,x_1);\n float a4 = smoothstep(e4,e5,x_1);\n float a5 = smoothstep(e5,e6,x_1);\n float a6 = smoothstep(e6,e7,x_1);\n float a7 = smoothstep(e7,e8,x_1);\n return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),\n max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),\n max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),\n max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),\n max(mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5),\n max(mix(v5,v6,a5)*step(e5,x_1)*step(x_1,e6),\n max(mix(v6,v7,a6)*step(e6,x_1)*step(x_1,e7),mix(v7,v8,a7)*step(e7,x_1)*step(x_1,e8)\n )))))));\n}\n\nvec4 greys (float x_10) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_10);\n return mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1);\n}\n\nvec4 magma (float x_7) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n float a0 = smoothstep(e0,e1,x_7);\n float a1 = smoothstep(e1,e2,x_7);\n float a2 = smoothstep(e2,e3,x_7);\n float a3 = smoothstep(e3,e4,x_7);\n float a4 = smoothstep(e4,e5,x_7);\n float a5 = smoothstep(e5,e6,x_7);\n float a6 = smoothstep(e6,e7,x_7);\n float a7 = smoothstep(e7,e8,x_7);\n return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n )))))));\n}\n\nvec4 jet (float x_8) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n const float e1 = 0.125;\n const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n const float e2 = 0.375;\n const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n const float e3 = 0.625;\n const vec4 v3 = vec4(1,1,0,1);\n const float e4 = 0.875;\n const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n const float e5 = 1.0;\n const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n float a0 = smoothstep(e0,e1,x_8);\n float a1 = smoothstep(e1,e2,x_8);\n float a2 = smoothstep(e2,e3,x_8);\n float a3 = smoothstep(e3,e4,x_8);\n float a4 = smoothstep(e4,e5,x_8);\n return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5)\n ))));\n}\n\nvec4 bone (float x_11) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.376;\n const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n const float e2 = 0.753;\n const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_11);\n float a1 = smoothstep(e1,e2,x_11);\n float a2 = smoothstep(e2,e3,x_11);\n return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3)\n ));\n}\n\nvec4 copper (float x_6) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.804;\n const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n const float e2 = 1.0;\n const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n float a0 = smoothstep(e0,e1,x_6);\n float a1 = smoothstep(e1,e2,x_6);\n return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2)\n );\n}\n\nvec4 density (float x_5) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n float a0 = smoothstep(e0,e1,x_5);\n float a1 = smoothstep(e1,e2,x_5);\n float a2 = smoothstep(e2,e3,x_5);\n float a3 = smoothstep(e3,e4,x_5);\n float a4 = smoothstep(e4,e5,x_5);\n float a5 = smoothstep(e5,e6,x_5);\n float a6 = smoothstep(e6,e7,x_5);\n float a7 = smoothstep(e7,e8,x_5);\n return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),\n max(mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2),\n max(mix(v2,v3,a2)*step(e2,x_5)*step(x_5,e3),\n max(mix(v3,v4,a3)*step(e3,x_5)*step(x_5,e4),\n max(mix(v4,v5,a4)*step(e4,x_5)*step(x_5,e5),\n max(mix(v5,v6,a5)*step(e5,x_5)*step(x_5,e6),\n max(mix(v6,v7,a6)*step(e6,x_5)*step(x_5,e7),mix(v7,v8,a7)*step(e7,x_5)*step(x_5,e8)\n )))))));\n}\n\nvec4 inferno (float x_3) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n float a0 = smoothstep(e0,e1,x_3);\n float a1 = smoothstep(e1,e2,x_3);\n float a2 = smoothstep(e2,e3,x_3);\n float a3 = smoothstep(e3,e4,x_3);\n float a4 = smoothstep(e4,e5,x_3);\n float a5 = smoothstep(e5,e6,x_3);\n float a6 = smoothstep(e6,e7,x_3);\n float a7 = smoothstep(e7,e8,x_3);\n return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),\n max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),\n max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),\n max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8)\n )))))));\n}\n\nvec4 cool (float x_2) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n float a0 = smoothstep(e0,e1,x_2);\n float a1 = smoothstep(e1,e2,x_2);\n float a2 = smoothstep(e2,e3,x_2);\n float a3 = smoothstep(e3,e4,x_2);\n float a4 = smoothstep(e4,e5,x_2);\n float a5 = smoothstep(e5,e6,x_2);\n float a6 = smoothstep(e6,e7,x_2);\n float a7 = smoothstep(e7,e8,x_2);\n return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n )))))));\n}\n\nvec4 hot (float x_0) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.3;\n const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n const float e2 = 0.6;\n const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_0);\n float a1 = smoothstep(e1,e2,x_0);\n float a2 = smoothstep(e2,e3,x_0);\n return max(mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1),\n max(mix(v1,v2,a1)*step(e1,x_0)*step(x_0,e2),mix(v2,v3,a2)*step(e2,x_0)*step(x_0,e3)\n ));\n}\n\nvec4 spring (float x_14) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_14);\n return mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1);\n}\n\nvec4 summer (float x_9) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0.4,1);\n float a0 = smoothstep(e0,e1,x_9);\n return mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1);\n}\n\nvec4 autumn (float x_13) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_13);\n return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 winter (float x_12) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n float a0 = smoothstep(e0,e1,x_12);\n return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\n\n// The texture (GL.LUMINANCE & Uint8Array).\nuniform sampler2D uBitmapTexture;\n\n// What are the dimensions of the texture (width, height)?\nuniform vec2 uTextureSize;\n\n// How many consecutive pixels should be aggregated together along each axis?\nuniform vec2 uAggSize;\n\n// What are the values of the color scale sliders?\nuniform vec2 uColorScaleRange;\n\n// The texture coordinate, varying (interpolated between values set by the vertex shader).\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n // Compute 1 pixel in texture coordinates\n vec2 onePixel = vec2(1.0, 1.0) / uTextureSize;\n \n vec2 viewCoord = vec2(floor(vTexCoord.x * uTextureSize.x), floor(vTexCoord.y * uTextureSize.y));\n\n // Compute (x % aggSizeX, y % aggSizeY).\n // These values will be the number of values to the left / above the current position to consider.\n vec2 modAggSize = vec2(-1.0 * mod(viewCoord.x, uAggSize.x), -1.0 * mod(viewCoord.y, uAggSize.y));\n\n // Take the sum of values along each axis.\n float intensitySum = 0.0;\n vec2 offsetPixels = vec2(0.0, 0.0);\n\n for(int i = 0; i < 16; i++) {\n // Check to break outer loop early.\n // Uniforms cannot be used as conditions in GLSL for loops.\n if(float(i) >= uAggSize.y) {\n // Done in the y direction.\n break;\n }\n\n offsetPixels = vec2(offsetPixels.x, (modAggSize.y + float(i)) * onePixel.y);\n\n for(int j = 0; j < 16; j++) {\n // Check to break inner loop early.\n // Uniforms cannot be used as conditions in GLSL for loops.\n if(float(j) >= uAggSize.x) {\n // Done in the x direction.\n break;\n }\n\n offsetPixels = vec2((modAggSize.x + float(j)) * onePixel.x, offsetPixels.y);\n intensitySum += texture2D(uBitmapTexture, vTexCoord + offsetPixels).r;\n }\n }\n \n // Compute the mean value.\n float intensityMean = intensitySum / (uAggSize.x * uAggSize.y);\n \n // Re-scale using the color scale slider values.\n float scaledIntensityMean = (intensityMean - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n\n gl_FragColor = COLORMAP_FUNC(clamp(scaledIntensityMean, 0.0, 1.0));\n\n geometry.uv = vTexCoord;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
13
13
  //# sourceMappingURL=heatmap-bitmap-layer-shaders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap-bitmap-layer-shaders.d.ts","sourceRoot":"","sources":["../src/heatmap-bitmap-layer-shaders.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,moBAwBE;AAEF;;;;;GAKG;AACH,oCAwEE"}
1
+ {"version":3,"file":"heatmap-bitmap-layer-shaders.d.ts","sourceRoot":"","sources":["../src/heatmap-bitmap-layer-shaders.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,moBAwBE;AAEF;;;;;GAKG;AACH,0ggBAwEE"}
@@ -10,9 +10,9 @@ export const AXIS_MAX_SIZE: 120;
10
10
  export const AXIS_MARGIN: 3;
11
11
  export const AXIS_PADDING: 10;
12
12
  export namespace THEME_TO_TEXT_COLOR {
13
- const dark: number[];
14
- const light: number[];
15
- const light2: number[];
13
+ let dark: number[];
14
+ let light: number[];
15
+ let light2: number[];
16
16
  }
17
17
  export const AXIS_FONT_FAMILY: "-apple-system, 'Helvetica Neue', Arial, sans-serif";
18
18
  export const PIXELATED_TEXTURE_PARAMETERS: {
@@ -9,5 +9,5 @@ export const vertexShader: "\n#define SHADER_NAME heatmap-bitmap-layer-vertex-sh
9
9
  * Reference: https://github.com/visgl/deck.gl/blob/8.2-release/modules/layers/src/bitmap-layer/bitmap-layer-fragment.js
10
10
  * Reference: https://github.com/hms-dbmi/viv/blob/06231ae02cac1ff57ba458c71e9bc59ed2fc4f8b/src/layers/XRLayer/xr-layer-fragment-colormap.webgl1.glsl
11
11
  */
12
- export const fragmentShader: string;
12
+ export const fragmentShader: "\n#define SHADER_NAME heatmap-bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\n#define GLSLIFY 1\nvec4 plasma (float x_4) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n float a0 = smoothstep(e0,e1,x_4);\n float a1 = smoothstep(e1,e2,x_4);\n float a2 = smoothstep(e2,e3,x_4);\n float a3 = smoothstep(e3,e4,x_4);\n float a4 = smoothstep(e4,e5,x_4);\n float a5 = smoothstep(e5,e6,x_4);\n float a6 = smoothstep(e6,e7,x_4);\n float a7 = smoothstep(e7,e8,x_4);\n return max(mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1),\n max(mix(v1,v2,a1)*step(e1,x_4)*step(x_4,e2),\n max(mix(v2,v3,a2)*step(e2,x_4)*step(x_4,e3),\n max(mix(v3,v4,a3)*step(e3,x_4)*step(x_4,e4),\n max(mix(v4,v5,a4)*step(e4,x_4)*step(x_4,e5),\n max(mix(v5,v6,a5)*step(e5,x_4)*step(x_4,e6),\n max(mix(v6,v7,a6)*step(e6,x_4)*step(x_4,e7),mix(v7,v8,a7)*step(e7,x_4)*step(x_4,e8)\n )))))));\n}\n\nvec4 viridis (float x_1) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n float a0 = smoothstep(e0,e1,x_1);\n float a1 = smoothstep(e1,e2,x_1);\n float a2 = smoothstep(e2,e3,x_1);\n float a3 = smoothstep(e3,e4,x_1);\n float a4 = smoothstep(e4,e5,x_1);\n float a5 = smoothstep(e5,e6,x_1);\n float a6 = smoothstep(e6,e7,x_1);\n float a7 = smoothstep(e7,e8,x_1);\n return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),\n max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),\n max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),\n max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),\n max(mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5),\n max(mix(v5,v6,a5)*step(e5,x_1)*step(x_1,e6),\n max(mix(v6,v7,a6)*step(e6,x_1)*step(x_1,e7),mix(v7,v8,a7)*step(e7,x_1)*step(x_1,e8)\n )))))));\n}\n\nvec4 greys (float x_10) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_10);\n return mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1);\n}\n\nvec4 magma (float x_7) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n float a0 = smoothstep(e0,e1,x_7);\n float a1 = smoothstep(e1,e2,x_7);\n float a2 = smoothstep(e2,e3,x_7);\n float a3 = smoothstep(e3,e4,x_7);\n float a4 = smoothstep(e4,e5,x_7);\n float a5 = smoothstep(e5,e6,x_7);\n float a6 = smoothstep(e6,e7,x_7);\n float a7 = smoothstep(e7,e8,x_7);\n return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n )))))));\n}\n\nvec4 jet (float x_8) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n const float e1 = 0.125;\n const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n const float e2 = 0.375;\n const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n const float e3 = 0.625;\n const vec4 v3 = vec4(1,1,0,1);\n const float e4 = 0.875;\n const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n const float e5 = 1.0;\n const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n float a0 = smoothstep(e0,e1,x_8);\n float a1 = smoothstep(e1,e2,x_8);\n float a2 = smoothstep(e2,e3,x_8);\n float a3 = smoothstep(e3,e4,x_8);\n float a4 = smoothstep(e4,e5,x_8);\n return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5)\n ))));\n}\n\nvec4 bone (float x_11) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.376;\n const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n const float e2 = 0.753;\n const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_11);\n float a1 = smoothstep(e1,e2,x_11);\n float a2 = smoothstep(e2,e3,x_11);\n return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3)\n ));\n}\n\nvec4 copper (float x_6) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.804;\n const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n const float e2 = 1.0;\n const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n float a0 = smoothstep(e0,e1,x_6);\n float a1 = smoothstep(e1,e2,x_6);\n return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2)\n );\n}\n\nvec4 density (float x_5) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n float a0 = smoothstep(e0,e1,x_5);\n float a1 = smoothstep(e1,e2,x_5);\n float a2 = smoothstep(e2,e3,x_5);\n float a3 = smoothstep(e3,e4,x_5);\n float a4 = smoothstep(e4,e5,x_5);\n float a5 = smoothstep(e5,e6,x_5);\n float a6 = smoothstep(e6,e7,x_5);\n float a7 = smoothstep(e7,e8,x_5);\n return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),\n max(mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2),\n max(mix(v2,v3,a2)*step(e2,x_5)*step(x_5,e3),\n max(mix(v3,v4,a3)*step(e3,x_5)*step(x_5,e4),\n max(mix(v4,v5,a4)*step(e4,x_5)*step(x_5,e5),\n max(mix(v5,v6,a5)*step(e5,x_5)*step(x_5,e6),\n max(mix(v6,v7,a6)*step(e6,x_5)*step(x_5,e7),mix(v7,v8,a7)*step(e7,x_5)*step(x_5,e8)\n )))))));\n}\n\nvec4 inferno (float x_3) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n float a0 = smoothstep(e0,e1,x_3);\n float a1 = smoothstep(e1,e2,x_3);\n float a2 = smoothstep(e2,e3,x_3);\n float a3 = smoothstep(e3,e4,x_3);\n float a4 = smoothstep(e4,e5,x_3);\n float a5 = smoothstep(e5,e6,x_3);\n float a6 = smoothstep(e6,e7,x_3);\n float a7 = smoothstep(e7,e8,x_3);\n return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),\n max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),\n max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),\n max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8)\n )))))));\n}\n\nvec4 cool (float x_2) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n const float e1 = 0.13;\n const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n const float e2 = 0.25;\n const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n const float e3 = 0.38;\n const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n const float e4 = 0.5;\n const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n const float e5 = 0.63;\n const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n const float e6 = 0.75;\n const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n const float e7 = 0.88;\n const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n const float e8 = 1.0;\n const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n float a0 = smoothstep(e0,e1,x_2);\n float a1 = smoothstep(e1,e2,x_2);\n float a2 = smoothstep(e2,e3,x_2);\n float a3 = smoothstep(e3,e4,x_2);\n float a4 = smoothstep(e4,e5,x_2);\n float a5 = smoothstep(e5,e6,x_2);\n float a6 = smoothstep(e6,e7,x_2);\n float a7 = smoothstep(e7,e8,x_2);\n return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n )))))));\n}\n\nvec4 hot (float x_0) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,0,1);\n const float e1 = 0.3;\n const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n const float e2 = 0.6;\n const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n const float e3 = 1.0;\n const vec4 v3 = vec4(1,1,1,1);\n float a0 = smoothstep(e0,e1,x_0);\n float a1 = smoothstep(e1,e2,x_0);\n float a2 = smoothstep(e2,e3,x_0);\n return max(mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1),\n max(mix(v1,v2,a1)*step(e1,x_0)*step(x_0,e2),mix(v2,v3,a2)*step(e2,x_0)*step(x_0,e3)\n ));\n}\n\nvec4 spring (float x_14) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_14);\n return mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1);\n}\n\nvec4 summer (float x_9) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0.4,1);\n float a0 = smoothstep(e0,e1,x_9);\n return mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1);\n}\n\nvec4 autumn (float x_13) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(1,0,0,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(1,1,0,1);\n float a0 = smoothstep(e0,e1,x_13);\n return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 winter (float x_12) {\n const float e0 = 0.0;\n const vec4 v0 = vec4(0,0,1,1);\n const float e1 = 1.0;\n const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n float a0 = smoothstep(e0,e1,x_12);\n return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\n\n// The texture (GL.LUMINANCE & Uint8Array).\nuniform sampler2D uBitmapTexture;\n\n// height x width of the data matrix (i.e x and y are flipped compared to the graphics convention)\nuniform vec2 uOrigDataSize;\nuniform vec2 uReshapedDataSize;\n\nuniform vec2 tileIJ;\nuniform vec2 dataIJ;\nuniform vec2 numTiles;\n\n// What are the dimensions of the texture (width, height)?\nuniform vec2 uTextureSize;\n\n// How many consecutive pixels should be aggregated together along each axis?\nuniform vec2 uAggSize;\n\n// What are the values of the color scale sliders?\nuniform vec2 uColorScaleRange;\n\n// The texture coordinate, varying (interpolated between values set by the vertex shader).\nvarying vec2 vTexCoord;\n\nvec2 offsetvTexcoord(vec2 coord) {\n float xTileToDataRatio = uTextureSize.x / uOrigDataSize.y;\n float yTileToDataRatio = uTextureSize.y / uOrigDataSize.x;\n vec2 vTexCoordOffset = vec2(\n (tileIJ.y * xTileToDataRatio) + (coord.x * xTileToDataRatio),\n (tileIJ.x * yTileToDataRatio) + ((1. - coord.y) * yTileToDataRatio)\n );\n return vTexCoordOffset;\n}\n\nvec2 dataCoordinateFromvTexCoordOffset(vec2 vTexCoordOffset) {\n \n // True pixel coordinate on scale of uOrigDataSize\n vec2 viewCoord = vec2(floor(vTexCoordOffset.x * uOrigDataSize.y), floor(vTexCoordOffset.y * uOrigDataSize.x));\n return viewCoord;\n}\n\nfloat getIndexFromViewCoord(vec2 viewCoord) {\n return viewCoord.y * uOrigDataSize.y + viewCoord.x;\n}\n\nvec2 transformDataCoordinate(float index) {\n float textureX = (floor( index / uReshapedDataSize.x )) / uReshapedDataSize.x;\n float textureY = (index - (floor( index / uReshapedDataSize.x ) * uReshapedDataSize.x)) / uReshapedDataSize.y;\n vec2 texturedCoord = vec2(textureY, textureX);\n return texturedCoord;\n}\n\nvoid main(void) {\n // Compute 1 pixel in texture coordinates\n vec2 onePixel = vec2(1.0, 1.0) / uTextureSize;\n vec2 vTexCoordOffset = offsetvTexcoord(vTexCoord);\n vec2 viewCoordTransformed = dataCoordinateFromvTexCoordOffset(vTexCoordOffset);\n // Compute (x % aggSizeX, y % aggSizeY).\n // These values will be the number of values to the left / above the current position to consider.\n vec2 modAggSize = vec2(-1.0 * mod(viewCoordTransformed.x, uAggSize.x), -1.0 * mod(viewCoordTransformed.y, uAggSize.y));\n // Take the sum of values along each axis.\n float intensitySum = 0.0;\n vec2 offsetPixels = vec2(0.0, 0.0);\n for(int i = 0; i < 16; i++) {\n // Check to break outer loop early.\n // Uniforms cannot be used as conditions in GLSL for loops.\n if(float(i) >= uAggSize.y) {\n // Done in the y direction.\n break;\n }\n\n offsetPixels = vec2(offsetPixels.x, (modAggSize.y + float(i)));\n\n for(int j = 0; j < 16; j++) {\n // Check to break inner loop early.\n // Uniforms cannot be used as conditions in GLSL for loops.\n if(float(j) >= uAggSize.x) {\n // Done in the x direction.\n break;\n }\n offsetPixels = vec2((modAggSize.x + float(j)), offsetPixels.y);\n float indexFull = getIndexFromViewCoord(viewCoordTransformed + offsetPixels);\n float index = indexFull - (floor(indexFull / (uReshapedDataSize.x * uReshapedDataSize.y)) * (uReshapedDataSize.x * uReshapedDataSize.y));\n vec2 vTexCoordTransformed = transformDataCoordinate(index);\n intensitySum += texture2D(uBitmapTexture, vTexCoordTransformed).r;\n }\n }\n \n // Compute the mean value.\n float intensityMean = intensitySum / (uAggSize.x * uAggSize.y);\n // Re-scale using the color scale slider values.\n float scaledIntensityMean = (intensityMean - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n\n gl_FragColor = COLORMAP_FUNC(clamp(scaledIntensityMean, 0.0, 1.0));\n\n geometry.uv = vTexCoord;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
13
13
  //# sourceMappingURL=padded-expression-heatmap-bitmap-layer-shaders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"padded-expression-heatmap-bitmap-layer-shaders.d.ts","sourceRoot":"","sources":["../src/padded-expression-heatmap-bitmap-layer-shaders.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,moBAwBE;AAEF;;;;;GAKG;AACH,oCA0GE"}
1
+ {"version":3,"file":"padded-expression-heatmap-bitmap-layer-shaders.d.ts","sourceRoot":"","sources":["../src/padded-expression-heatmap-bitmap-layer-shaders.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,moBAwBE;AAEF;;;;;GAKG;AACH,8kjBA0GE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/gl",
3
- "version": "3.3.9",
3
+ "version": "3.3.10",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -52,7 +52,7 @@
52
52
  "math.gl": "^3.5.6",
53
53
  "mathjs": "^9.2.0",
54
54
  "nebula.gl": "0.23.8",
55
- "@vitessce/utils": "3.3.9"
55
+ "@vitessce/utils": "3.3.10"
56
56
  },
57
57
  "devDependencies": {
58
58
  "glsl-colormap": "^1.0.1"