@deck.gl/aggregation-layers 8.8.0-alpha.5 → 8.8.0-alpha.6

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 (104) hide show
  1. package/dist/dist.dev.js +30 -25
  2. package/dist/es5/heatmap-layer/heatmap-layer-utils.js +5 -2
  3. package/dist/es5/heatmap-layer/heatmap-layer-utils.js.map +1 -1
  4. package/dist/es5/heatmap-layer/heatmap-layer.js +2 -1
  5. package/dist/es5/heatmap-layer/heatmap-layer.js.map +1 -1
  6. package/dist/esm/heatmap-layer/heatmap-layer-utils.js +5 -2
  7. package/dist/esm/heatmap-layer/heatmap-layer-utils.js.map +1 -1
  8. package/dist/esm/heatmap-layer/heatmap-layer.js +2 -1
  9. package/dist/esm/heatmap-layer/heatmap-layer.js.map +1 -1
  10. package/dist.min.js +1 -1
  11. package/package.json +3 -3
  12. package/src/heatmap-layer/heatmap-layer-utils.js +10 -5
  13. package/src/heatmap-layer/heatmap-layer.js +6 -2
  14. package/typed/aggregation-layer.d.ts +33 -0
  15. package/typed/aggregation-layer.d.ts.map +1 -0
  16. package/typed/contour-layer/contour-layer.d.ts +39 -0
  17. package/typed/contour-layer/contour-layer.d.ts.map +1 -0
  18. package/typed/contour-layer/contour-utils.d.ts +19 -0
  19. package/typed/contour-layer/contour-utils.d.ts.map +1 -0
  20. package/typed/contour-layer/marching-squares-codes.d.ts +32 -0
  21. package/typed/contour-layer/marching-squares-codes.d.ts.map +1 -0
  22. package/typed/contour-layer/marching-squares.d.ts +10 -0
  23. package/typed/contour-layer/marching-squares.d.ts.map +1 -0
  24. package/typed/cpu-grid-layer/cpu-grid-layer.d.ts +131 -0
  25. package/typed/cpu-grid-layer/cpu-grid-layer.d.ts.map +1 -0
  26. package/typed/cpu-grid-layer/grid-aggregator.d.ts +23 -0
  27. package/typed/cpu-grid-layer/grid-aggregator.d.ts.map +1 -0
  28. package/typed/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts +3 -0
  29. package/typed/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts.map +1 -0
  30. package/typed/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts +3 -0
  31. package/typed/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts.map +1 -0
  32. package/typed/gpu-grid-layer/gpu-grid-cell-layer.d.ts +85 -0
  33. package/typed/gpu-grid-layer/gpu-grid-cell-layer.d.ts.map +1 -0
  34. package/typed/gpu-grid-layer/gpu-grid-layer.d.ts +65 -0
  35. package/typed/gpu-grid-layer/gpu-grid-layer.d.ts.map +1 -0
  36. package/typed/grid-aggregation-layer.d.ts +19 -0
  37. package/typed/grid-aggregation-layer.d.ts.map +1 -0
  38. package/typed/grid-layer/grid-layer.d.ts +93 -0
  39. package/typed/grid-layer/grid-layer.d.ts.map +1 -0
  40. package/typed/heatmap-layer/heatmap-layer-utils.d.ts +13 -0
  41. package/typed/heatmap-layer/heatmap-layer-utils.d.ts.map +1 -0
  42. package/typed/heatmap-layer/heatmap-layer.d.ts +96 -0
  43. package/typed/heatmap-layer/heatmap-layer.d.ts.map +1 -0
  44. package/typed/heatmap-layer/max-fs.glsl.d.ts +3 -0
  45. package/typed/heatmap-layer/max-fs.glsl.d.ts.map +1 -0
  46. package/typed/heatmap-layer/max-vs.glsl.d.ts +3 -0
  47. package/typed/heatmap-layer/max-vs.glsl.d.ts.map +1 -0
  48. package/typed/heatmap-layer/triangle-layer-fragment.glsl.d.ts +3 -0
  49. package/typed/heatmap-layer/triangle-layer-fragment.glsl.d.ts.map +1 -0
  50. package/typed/heatmap-layer/triangle-layer-vertex.glsl.d.ts +3 -0
  51. package/typed/heatmap-layer/triangle-layer-vertex.glsl.d.ts.map +1 -0
  52. package/typed/heatmap-layer/triangle-layer.d.ts +10 -0
  53. package/typed/heatmap-layer/triangle-layer.d.ts.map +1 -0
  54. package/typed/heatmap-layer/weights-fs.glsl.d.ts +3 -0
  55. package/typed/heatmap-layer/weights-fs.glsl.d.ts.map +1 -0
  56. package/typed/heatmap-layer/weights-vs.glsl.d.ts +3 -0
  57. package/typed/heatmap-layer/weights-vs.glsl.d.ts.map +1 -0
  58. package/typed/hexagon-layer/hexagon-aggregator.d.ts +24 -0
  59. package/typed/hexagon-layer/hexagon-aggregator.d.ts.map +1 -0
  60. package/typed/hexagon-layer/hexagon-layer.d.ts +130 -0
  61. package/typed/hexagon-layer/hexagon-layer.d.ts.map +1 -0
  62. package/typed/index.d.ts +13 -0
  63. package/typed/index.d.ts.map +1 -0
  64. package/typed/package.json +6 -0
  65. package/typed/screen-grid-layer/screen-grid-cell-layer.d.ts +33 -0
  66. package/typed/screen-grid-layer/screen-grid-cell-layer.d.ts.map +1 -0
  67. package/typed/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts +3 -0
  68. package/typed/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts.map +1 -0
  69. package/typed/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts +3 -0
  70. package/typed/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts.map +1 -0
  71. package/typed/screen-grid-layer/screen-grid-layer.d.ts +34 -0
  72. package/typed/screen-grid-layer/screen-grid-layer.d.ts.map +1 -0
  73. package/typed/utils/aggregation-operation-utils.d.ts +13 -0
  74. package/typed/utils/aggregation-operation-utils.d.ts.map +1 -0
  75. package/typed/utils/bin-sorter.d.ts +46 -0
  76. package/typed/utils/bin-sorter.d.ts.map +1 -0
  77. package/typed/utils/color-utils.d.ts +3 -0
  78. package/typed/utils/color-utils.d.ts.map +1 -0
  79. package/typed/utils/cpu-aggregator.d.ts +155 -0
  80. package/typed/utils/cpu-aggregator.d.ts.map +1 -0
  81. package/typed/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts +3 -0
  82. package/typed/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts.map +1 -0
  83. package/typed/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts +3 -0
  84. package/typed/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts.map +1 -0
  85. package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts +3 -0
  86. package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts.map +1 -0
  87. package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts +3 -0
  88. package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts.map +1 -0
  89. package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts +36 -0
  90. package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts.map +1 -0
  91. package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts +1 -0
  92. package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts.map +1 -0
  93. package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts +66 -0
  94. package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts.map +1 -0
  95. package/typed/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts +3 -0
  96. package/typed/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts.map +1 -0
  97. package/typed/utils/grid-aggregation-utils.d.ts +24 -0
  98. package/typed/utils/grid-aggregation-utils.d.ts.map +1 -0
  99. package/typed/utils/prop-utils.d.ts +2 -0
  100. package/typed/utils/prop-utils.d.ts.map +1 -0
  101. package/typed/utils/resource-utils.d.ts +4 -0
  102. package/typed/utils/resource-utils.d.ts.map +1 -0
  103. package/typed/utils/scale-utils.d.ts +15 -0
  104. package/typed/utils/scale-utils.d.ts.map +1 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@deck.gl/aggregation-layers",
3
3
  "description": "deck.gl layers that aggregate the input data into alternative representations",
4
4
  "license": "MIT",
5
- "version": "8.8.0-alpha.5",
5
+ "version": "8.8.0-alpha.6",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -31,12 +31,12 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@luma.gl/shadertools": "^8.5.13",
34
- "@math.gl/web-mercator": "3.6.0-alpha.5",
34
+ "@math.gl/web-mercator": "3.6.0-alpha.8",
35
35
  "d3-hexbin": "^0.2.1"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@deck.gl/core": "^8.0.0",
39
39
  "@deck.gl/layers": "^8.0.0"
40
40
  },
41
- "gitHead": "a5e210f62321ab78b7cacbcd0614e0ffcdf6bca7"
41
+ "gitHead": "6885ccab01c91a7632385f566c9377f8ae387e7c"
42
42
  }
@@ -80,9 +80,14 @@ export function getTextureCoordinates(point, bounds) {
80
80
 
81
81
  // Returns format and type for creating texture objects
82
82
  export function getTextureParams({gl, floatTargetSupport}) {
83
- return {
84
- // format: should be RGBA32F on WebGL2 (float textures), RGBA in WebGL1 for float or non float textures
85
- format: isWebGL2(gl) ? GL.RGBA32F : GL.RGBA,
86
- type: floatTargetSupport ? GL.FLOAT : GL.UNSIGNED_BYTE
87
- };
83
+ return floatTargetSupport
84
+ ? {
85
+ // format: should be RGBA32F on WebGL2 (float textures), RGBA in WebGL1 for float or non float textures
86
+ format: isWebGL2(gl) ? GL.RGBA32F : GL.RGBA,
87
+ type: GL.FLOAT
88
+ }
89
+ : {
90
+ format: GL.RGBA,
91
+ type: GL.UNSIGNED_BYTE
92
+ };
88
93
  }
@@ -72,7 +72,11 @@ const defaultProps = {
72
72
  const REQUIRED_FEATURES = [
73
73
  FEATURES.BLEND_EQUATION_MINMAX, // max weight calculation
74
74
  FEATURES.TEXTURE_FLOAT // weight-map as texture
75
- // FEATURES.FLOAT_BLEND, // implictly supported when TEXTURE_FLOAT is supported
75
+ ];
76
+
77
+ const FLOAT_TARGET_FEATURES = [
78
+ FEATURES.COLOR_ATTACHMENT_RGBA32F, // ability to render to float texture
79
+ FEATURES.FLOAT_BLEND // ability to blend when rendering to float texture
76
80
  ];
77
81
 
78
82
  const DIMENSIONS = {
@@ -266,7 +270,7 @@ export default class HeatmapLayer extends AggregationLayer {
266
270
  const {weightsTextureSize} = this.props;
267
271
 
268
272
  const textureSize = Math.min(weightsTextureSize, getParameters(gl, gl.MAX_TEXTURE_SIZE));
269
- const floatTargetSupport = hasFeatures(gl, FEATURES.COLOR_ATTACHMENT_RGBA32F);
273
+ const floatTargetSupport = hasFeatures(gl, FLOAT_TARGET_FEATURES);
270
274
  const {format, type} = getTextureParams({gl, floatTargetSupport});
271
275
  const weightsScale = floatTargetSupport ? 1 : 1 / 255;
272
276
  this.setState({textureSize, format, type, weightsScale});
@@ -0,0 +1,33 @@
1
+ declare class AggregationLayer extends CompositeLayer<any> {
2
+ constructor(...propObjects: Partial<any>[]);
3
+ getAttributes(): {
4
+ [id: string]: import("modules/core/src/lib/attribute/shader-attribute").IShaderAttribute;
5
+ };
6
+ getModuleSettings(): any;
7
+ updateShaders(shaders: any): void;
8
+ /**
9
+ * Checks if aggregation is dirty
10
+ * @param {Object} updateOpts - object {props, oldProps, changeFlags}
11
+ * @param {Object} params - object {dimension, compareAll}
12
+ * @param {Object} params.dimension - {props, accessors} array of props and/or accessors
13
+ * @param {Boolean} params.compareAll - when `true` it will include non layer props for comparision
14
+ * @returns {Boolean} - returns true if dimensions' prop or accessor is changed
15
+ **/
16
+ isAggregationDirty(updateOpts: any, params?: {
17
+ dimension: any;
18
+ compareAll: boolean;
19
+ }): boolean;
20
+ /**
21
+ * Checks if an attribute is changed
22
+ * @param {String} name - name of the attribute
23
+ * @returns {Boolean} - `true` if attribute `name` is changed, `false` otherwise,
24
+ * If `name` is not passed or `undefiend`, `true` if any attribute is changed, `false` otherwise
25
+ **/
26
+ isAttributeChanged(name: string): boolean;
27
+ }
28
+ declare namespace AggregationLayer {
29
+ const layerName: string;
30
+ }
31
+ export default AggregationLayer;
32
+ import { CompositeLayer } from '@deck.gl/core/typed';
33
+ //# sourceMappingURL=aggregation-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregation-layer.d.ts","sourceRoot":"","sources":["../src/aggregation-layer.js"],"names":[],"mappings":"AAwBA;IAdoB,4CAEN;IA4CZ;;MAEC;IAED,yBAYC;IAED,kCAEC;IAED;;;;;;;QAOI;IACJ;;;gBAuCC;IAED;;;;;QAKI;IACJ,0CAOC;CAWF"}
@@ -0,0 +1,39 @@
1
+ declare class ContourLayer extends GridAggregationLayer {
2
+ _updateAccessors(opts: any): void;
3
+ _resetResults(): void;
4
+ _generateContours(): void;
5
+ _updateThresholdData(props: any): void;
6
+ }
7
+ declare namespace ContourLayer {
8
+ export const layerName: string;
9
+ export { defaultProps };
10
+ }
11
+ export default ContourLayer;
12
+ import GridAggregationLayer from "../grid-aggregation-layer";
13
+ declare namespace defaultProps {
14
+ namespace cellSize {
15
+ const type: string;
16
+ const min: number;
17
+ const max: number;
18
+ const value: number;
19
+ }
20
+ namespace getPosition {
21
+ const type_1: string;
22
+ export { type_1 as type };
23
+ export function value_1(x: any): any;
24
+ export { value_1 as value };
25
+ }
26
+ namespace getWeight {
27
+ const type_2: string;
28
+ export { type_2 as type };
29
+ const value_2: number;
30
+ export { value_2 as value };
31
+ }
32
+ const gpuAggregation: boolean;
33
+ const aggregation: string;
34
+ const contours: {
35
+ threshold: number;
36
+ }[];
37
+ const zOffset: number;
38
+ }
39
+ //# sourceMappingURL=contour-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contour-layer.d.ts","sourceRoot":"","sources":["../../src/contour-layer/contour-layer.js"],"names":[],"mappings":"AA4DA;IAiKE,kCAQC;IAED,sBAKC;IAID,0BAoBC;IAED,uCAaC;CACF;;;;;;;;;;;;;;;;;QA/OwC,qCAAe"}
@@ -0,0 +1,19 @@
1
+ export function generateContours({ thresholdData, colors, cellWeights, gridSize, gridOrigin, cellSize }: {
2
+ thresholdData: any;
3
+ colors: any;
4
+ cellWeights: any;
5
+ gridSize: any;
6
+ gridOrigin: any;
7
+ cellSize: any;
8
+ }): {
9
+ contourSegments: {
10
+ start: any;
11
+ end: any;
12
+ contour: any;
13
+ }[];
14
+ contourPolygons: {
15
+ vertices: any;
16
+ contour: any;
17
+ }[];
18
+ };
19
+ //# sourceMappingURL=contour-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contour-utils.d.ts","sourceRoot":"","sources":["../../src/contour-layer/contour-utils.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;EAiEC"}
@@ -0,0 +1,32 @@
1
+ export const ISOLINES_CODE_OFFSET_MAP: {
2
+ 0: never[];
3
+ 1: number[][][];
4
+ 2: number[][][];
5
+ 3: number[][][];
6
+ 4: number[][][];
7
+ 5: {
8
+ 0: number[][][];
9
+ 1: number[][][];
10
+ };
11
+ 6: number[][][];
12
+ 7: number[][][];
13
+ 8: number[][][];
14
+ 9: number[][][];
15
+ 10: {
16
+ 0: number[][][];
17
+ 1: number[][][];
18
+ };
19
+ 11: number[][][];
20
+ 12: number[][][];
21
+ 13: number[][][];
22
+ 14: number[][][];
23
+ 15: never[];
24
+ };
25
+ export const ISOBANDS_CODE_OFFSET_MAP: {
26
+ [x: number]: number[][][] | {
27
+ 0: number[][][];
28
+ 1: number[][][];
29
+ 2: number[][][];
30
+ };
31
+ };
32
+ //# sourceMappingURL=marching-squares-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marching-squares-codes.d.ts","sourceRoot":"","sources":["../../src/contour-layer/marching-squares-codes.js"],"names":[],"mappings":"AAsJA;;;;;;;;;;;;;;;;;;;;;;;EAyCE;AAMF;;;;;;EAqKE"}
@@ -0,0 +1,10 @@
1
+ export function getCode(opts: any): {
2
+ code: number;
3
+ meanCode: number;
4
+ };
5
+ export function getVertices(opts: any): any[];
6
+ export namespace CONTOUR_TYPE {
7
+ const ISO_LINES: number;
8
+ const ISO_BANDS: number;
9
+ }
10
+ //# sourceMappingURL=marching-squares.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marching-squares.d.ts","sourceRoot":"","sources":["../../src/contour-layer/marching-squares.js"],"names":[],"mappings":"AAkCA;;;EAyEC;AAKD,8CA4DC"}
@@ -0,0 +1,131 @@
1
+ declare class CPUGridLayer extends AggregationLayer {
2
+ _onGetSublayerColor(cell: any): any;
3
+ _onGetSublayerElevation(cell: any): any;
4
+ _getSublayerUpdateTriggers(): any;
5
+ }
6
+ declare namespace CPUGridLayer {
7
+ export const layerName: string;
8
+ export { defaultProps };
9
+ }
10
+ export default CPUGridLayer;
11
+ import AggregationLayer from "../aggregation-layer";
12
+ declare namespace defaultProps {
13
+ export const colorDomain: null;
14
+ export { defaultColorRange as colorRange };
15
+ export namespace getColorValue {
16
+ const type: string;
17
+ const value: null;
18
+ }
19
+ export namespace getColorWeight {
20
+ const type_1: string;
21
+ export { type_1 as type };
22
+ const value_1: number;
23
+ export { value_1 as value };
24
+ }
25
+ export const colorAggregation: string;
26
+ export namespace lowerPercentile {
27
+ const type_2: string;
28
+ export { type_2 as type };
29
+ export const min: number;
30
+ export const max: number;
31
+ const value_2: number;
32
+ export { value_2 as value };
33
+ }
34
+ export namespace upperPercentile {
35
+ const type_3: string;
36
+ export { type_3 as type };
37
+ const min_1: number;
38
+ export { min_1 as min };
39
+ const max_1: number;
40
+ export { max_1 as max };
41
+ const value_3: number;
42
+ export { value_3 as value };
43
+ }
44
+ export const colorScaleType: string;
45
+ export { nop as onSetColorDomain };
46
+ export const elevationDomain: null;
47
+ export const elevationRange: number[];
48
+ export namespace getElevationValue {
49
+ const type_4: string;
50
+ export { type_4 as type };
51
+ const value_4: null;
52
+ export { value_4 as value };
53
+ }
54
+ export namespace getElevationWeight {
55
+ const type_5: string;
56
+ export { type_5 as type };
57
+ const value_5: number;
58
+ export { value_5 as value };
59
+ }
60
+ export const elevationAggregation: string;
61
+ export namespace elevationLowerPercentile {
62
+ const type_6: string;
63
+ export { type_6 as type };
64
+ const min_2: number;
65
+ export { min_2 as min };
66
+ const max_2: number;
67
+ export { max_2 as max };
68
+ const value_6: number;
69
+ export { value_6 as value };
70
+ }
71
+ export namespace elevationUpperPercentile {
72
+ const type_7: string;
73
+ export { type_7 as type };
74
+ const min_3: number;
75
+ export { min_3 as min };
76
+ const max_3: number;
77
+ export { max_3 as max };
78
+ const value_7: number;
79
+ export { value_7 as value };
80
+ }
81
+ export namespace elevationScale {
82
+ const type_8: string;
83
+ export { type_8 as type };
84
+ const min_4: number;
85
+ export { min_4 as min };
86
+ const value_8: number;
87
+ export { value_8 as value };
88
+ }
89
+ export const elevationScaleType: string;
90
+ export { nop as onSetElevationDomain };
91
+ export { pointToDensityGridDataCPU as gridAggregator };
92
+ export namespace cellSize {
93
+ const type_9: string;
94
+ export { type_9 as type };
95
+ const min_5: number;
96
+ export { min_5 as min };
97
+ const max_4: number;
98
+ export { max_4 as max };
99
+ const value_9: number;
100
+ export { value_9 as value };
101
+ }
102
+ export namespace coverage {
103
+ const type_10: string;
104
+ export { type_10 as type };
105
+ const min_6: number;
106
+ export { min_6 as min };
107
+ const max_5: number;
108
+ export { max_5 as max };
109
+ const value_10: number;
110
+ export { value_10 as value };
111
+ }
112
+ export namespace getPosition {
113
+ const type_11: string;
114
+ export { type_11 as type };
115
+ export function value_11(x: any): any;
116
+ export { value_11 as value };
117
+ }
118
+ export const extruded: boolean;
119
+ export const material: boolean;
120
+ export namespace _filterData {
121
+ const type_12: string;
122
+ export { type_12 as type };
123
+ const value_12: null;
124
+ export { value_12 as value };
125
+ export const optional: boolean;
126
+ }
127
+ }
128
+ import { defaultColorRange } from "../utils/color-utils";
129
+ declare function nop(): void;
130
+ import { pointToDensityGridDataCPU } from "./grid-aggregator";
131
+ //# sourceMappingURL=cpu-grid-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpu-grid-layer.d.ts","sourceRoot":"","sources":["../../src/cpu-grid-layer/cpu-grid-layer.js"],"names":[],"mappings":"AAsEA;IAoCE,oCAEC;IAGD,wCAEC;IAED,kCAEC;CAgCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAzFwC,sCAAe;;;;;;;;;;;;;;AA/BxD,6BAAiB"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Calculate density grid from an array of points
3
+ * @param {Object} props - object containing :
4
+ * @param {Iterable} [props.data] - data objects to be aggregated
5
+ * @param {Integer} [props.cellSize] - size of the grid cell
6
+ *
7
+ * @param {Object} aggregationParams - object containing :
8
+ * @param {Object} gridOffset - {xOffset, yOffset} cell size in meters
9
+ * @param {Integer} width - width of the grid
10
+ * @param {Integer} height - height of the grid
11
+ * @param {Boolean} projectPoints - `true` if doing screen space projection, `false` otherwise
12
+ * @param {Array} attributes - attributes array containing position values
13
+ * @param {Viewport} viewport - viewport to be used for projection
14
+ * @param {Array} posOffset - [xOffset, yOffset] offset to be applied to positions to get cell index
15
+ * @param {Object} boundingBox - {xMin, yMin, xMax, yMax} bounding box of input data
16
+ *
17
+ * @returns {object} - grid data, cell dimension
18
+ */
19
+ export function pointToDensityGridDataCPU(props: {
20
+ data?: Iterable<any> | undefined;
21
+ cellSize?: any;
22
+ }, aggregationParams: any): object;
23
+ //# sourceMappingURL=grid-aggregator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid-aggregator.d.ts","sourceRoot":"","sources":["../../src/cpu-grid-layer/grid-aggregator.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;GAiBG;AACH;IAf4B,IAAI;IACL,QAAQ;4BAYtB,MAAM,CAWlB"}
@@ -0,0 +1,3 @@
1
+ declare var _default: "#version 300 es\n#define SHADER_NAME gpu-grid-cell-layer-fragment-shader\n\nprecision highp float;\n\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n fragColor = vColor;\n fragColor = picking_filterColor(fragColor);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=gpu-grid-cell-layer-fragment.glsl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu-grid-cell-layer-fragment.glsl.d.ts","sourceRoot":"","sources":["../../src/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ declare var _default: "#version 300 es\n#define SHADER_NAME gpu-grid-cell-layer-vertex-shader\n#define RANGE_COUNT 6\n\nin vec3 positions;\nin vec3 normals;\n\nin vec4 colors;\nin vec4 elevations;\nin vec3 instancePickingColors;\n\n// Custom uniforms\nuniform vec2 offset;\nuniform bool extruded;\nuniform float cellSize;\nuniform float coverage;\nuniform float opacity;\nuniform float elevationScale;\n\nuniform ivec2 gridSize;\nuniform vec2 gridOrigin;\nuniform vec2 gridOriginLow;\nuniform vec2 gridOffset;\nuniform vec2 gridOffsetLow;\nuniform vec4 colorRange[RANGE_COUNT];\nuniform vec2 elevationRange;\n\n// Domain uniforms\nuniform vec2 colorDomain;\nuniform bool colorDomainValid;\nuniform vec2 elevationDomain;\nuniform bool elevationDomainValid;\n\nlayout(std140) uniform;\nuniform ColorData\n{\n vec4 maxMinCount;\n} colorData;\nuniform ElevationData\n{\n vec4 maxMinCount;\n} elevationData;\n\n#define EPSILON 0.00001\n\n// Result\nout vec4 vColor;\n\nvec4 quantizeScale(vec2 domain, vec4 range[RANGE_COUNT], float value) {\n vec4 outColor = vec4(0., 0., 0., 0.);\n if (value >= (domain.x - EPSILON) && value <= (domain.y + EPSILON)) {\n float domainRange = domain.y - domain.x;\n if (domainRange <= 0.) {\n outColor = colorRange[0];\n } else {\n float rangeCount = float(RANGE_COUNT);\n float rangeStep = domainRange / rangeCount;\n float idx = floor((value - domain.x) / rangeStep);\n idx = clamp(idx, 0., rangeCount - 1.);\n int intIdx = int(idx);\n outColor = colorRange[intIdx];\n }\n }\n return outColor;\n}\n\nfloat linearScale(vec2 domain, vec2 range, float value) {\n if (value >= (domain.x - EPSILON) && value <= (domain.y + EPSILON)) {\n return ((value - domain.x) / (domain.y - domain.x)) * (range.y - range.x) + range.x;\n }\n return -1.;\n}\n\nvoid main(void) {\n vec2 clrDomain = colorDomainValid ? colorDomain : vec2(colorData.maxMinCount.a, colorData.maxMinCount.r);\n vec4 color = quantizeScale(clrDomain, colorRange, colors.r);\n\n float elevation = 0.0;\n\n if (extruded) {\n vec2 elvDomain = elevationDomainValid ? elevationDomain : vec2(elevationData.maxMinCount.a, elevationData.maxMinCount.r);\n elevation = linearScale(elvDomain, elevationRange, elevations.r);\n elevation = elevation * (positions.z + 1.0) / 2.0 * elevationScale;\n }\n\n // if aggregated color or elevation is 0 do not render\n float shouldRender = float(color.r > 0.0 && elevations.r >= 0.0);\n float dotRadius = cellSize / 2. * coverage * shouldRender;\n\n int yIndex = (gl_InstanceID / gridSize[0]);\n int xIndex = gl_InstanceID - (yIndex * gridSize[0]);\n\n vec2 instancePositionXFP64 = mul_fp64(vec2(gridOffset[0], gridOffsetLow[0]), vec2(float(xIndex), 0.));\n instancePositionXFP64 = sum_fp64(instancePositionXFP64, vec2(gridOrigin[0], gridOriginLow[0]));\n vec2 instancePositionYFP64 = mul_fp64(vec2(gridOffset[1], gridOffsetLow[1]), vec2(float(yIndex), 0.));\n instancePositionYFP64 = sum_fp64(instancePositionYFP64, vec2(gridOrigin[1], gridOriginLow[1]));\n\n vec3 centroidPosition = vec3(instancePositionXFP64[0], instancePositionYFP64[0], elevation);\n vec3 centroidPosition64Low = vec3(instancePositionXFP64[1], instancePositionYFP64[1], 0.0);\n geometry.worldPosition = centroidPosition;\n vec3 pos = vec3(project_size(positions.xy + offset) * dotRadius, 0.);\n\n // Set color to be rendered to picking fbo (also used to check for selection highlight).\n picking_setPickingColor(instancePickingColors);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n\n // Light calculations\n // Worldspace is the linear space after Mercator projection\n\n vec3 normals_commonspace = project_normal(normals);\n\n if (extruded) {\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, normals_commonspace);\n vColor = vec4(lightColor, color.a * opacity) / 255.;\n } else {\n vColor = vec4(color.rgb, color.a * opacity) / 255.;\n }\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=gpu-grid-cell-layer-vertex.glsl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu-grid-cell-layer-vertex.glsl.d.ts","sourceRoot":"","sources":["../../src/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js"],"names":[],"mappings":""}
@@ -0,0 +1,85 @@
1
+ declare class GPUGridCellLayer extends Layer<any> {
2
+ constructor(...propObjects: Partial<any>[]);
3
+ _getModel(gl: any): any;
4
+ bindUniformBuffers(colorMaxMinBuffer: any, elevationMaxMinBuffer: any): void;
5
+ unbindUniformBuffers(colorMaxMinBuffer: any, elevationMaxMinBuffer: any): void;
6
+ getDomainUniforms(): {
7
+ colorDomainValid: boolean;
8
+ colorDomain: any;
9
+ elevationDomainValid: boolean;
10
+ elevationDomain: any;
11
+ };
12
+ _setupUniformBuffer(model: any): void;
13
+ }
14
+ declare namespace GPUGridCellLayer {
15
+ export const layerName: string;
16
+ export { defaultProps };
17
+ }
18
+ export default GPUGridCellLayer;
19
+ import { Layer } from '@deck.gl/core/typed';
20
+ declare namespace defaultProps {
21
+ export const colorDomain: null;
22
+ export { defaultColorRange as colorRange };
23
+ export const elevationDomain: null;
24
+ export const elevationRange: number[];
25
+ export namespace elevationScale {
26
+ const type: string;
27
+ const min: number;
28
+ const value: number;
29
+ }
30
+ export namespace gridSize {
31
+ const type_1: string;
32
+ export { type_1 as type };
33
+ const min_1: number;
34
+ export { min_1 as min };
35
+ const value_1: number[];
36
+ export { value_1 as value };
37
+ }
38
+ export namespace gridOrigin {
39
+ const type_2: string;
40
+ export { type_2 as type };
41
+ const min_2: number;
42
+ export { min_2 as min };
43
+ const value_2: number[];
44
+ export { value_2 as value };
45
+ }
46
+ export namespace gridOffset {
47
+ const type_3: string;
48
+ export { type_3 as type };
49
+ const min_3: number;
50
+ export { min_3 as min };
51
+ const value_3: number[];
52
+ export { value_3 as value };
53
+ }
54
+ export namespace cellSize {
55
+ const type_4: string;
56
+ export { type_4 as type };
57
+ const min_4: number;
58
+ export { min_4 as min };
59
+ export const max: number;
60
+ const value_4: number;
61
+ export { value_4 as value };
62
+ }
63
+ export namespace offset {
64
+ const type_5: string;
65
+ export { type_5 as type };
66
+ const min_5: number;
67
+ export { min_5 as min };
68
+ const value_5: number[];
69
+ export { value_5 as value };
70
+ }
71
+ export namespace coverage {
72
+ const type_6: string;
73
+ export { type_6 as type };
74
+ const min_6: number;
75
+ export { min_6 as min };
76
+ const max_1: number;
77
+ export { max_1 as max };
78
+ const value_6: number;
79
+ export { value_6 as value };
80
+ }
81
+ export const extruded: boolean;
82
+ export const material: boolean;
83
+ }
84
+ import { defaultColorRange } from "../utils/color-utils";
85
+ //# sourceMappingURL=gpu-grid-cell-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu-grid-cell-layer.d.ts","sourceRoot":"","sources":["../../src/gpu-grid-layer/gpu-grid-cell-layer.js"],"names":[],"mappings":"AAuDA;IA7CoB,4CAEN;IAsEZ,wBAOC;IA2CD,6EAGC;IAED,+EAGC;IAED;;;;;MAgBC;IAED,sCAQC;CACF"}
@@ -0,0 +1,65 @@
1
+ declare class GPUGridLayer extends GridAggregationLayer {
2
+ getHashKeyForIndex(index: any): string;
3
+ getPositionForIndex(index: any): any[];
4
+ _updateAccessors(opts: any): void;
5
+ }
6
+ declare namespace GPUGridLayer {
7
+ export const layerName: string;
8
+ export { defaultProps };
9
+ }
10
+ export default GPUGridLayer;
11
+ import GridAggregationLayer from "../grid-aggregation-layer";
12
+ declare namespace defaultProps {
13
+ export const colorDomain: null;
14
+ export { defaultColorRange as colorRange };
15
+ export namespace getColorWeight {
16
+ const type: string;
17
+ const value: number;
18
+ }
19
+ export const colorAggregation: string;
20
+ export const elevationDomain: null;
21
+ export const elevationRange: number[];
22
+ export namespace getElevationWeight {
23
+ const type_1: string;
24
+ export { type_1 as type };
25
+ const value_1: number;
26
+ export { value_1 as value };
27
+ }
28
+ export const elevationAggregation: string;
29
+ export namespace elevationScale {
30
+ const type_2: string;
31
+ export { type_2 as type };
32
+ export const min: number;
33
+ const value_2: number;
34
+ export { value_2 as value };
35
+ }
36
+ export namespace cellSize {
37
+ const type_3: string;
38
+ export { type_3 as type };
39
+ const min_1: number;
40
+ export { min_1 as min };
41
+ export const max: number;
42
+ const value_3: number;
43
+ export { value_3 as value };
44
+ }
45
+ export namespace coverage {
46
+ const type_4: string;
47
+ export { type_4 as type };
48
+ const min_2: number;
49
+ export { min_2 as min };
50
+ const max_1: number;
51
+ export { max_1 as max };
52
+ const value_4: number;
53
+ export { value_4 as value };
54
+ }
55
+ export namespace getPosition {
56
+ const type_5: string;
57
+ export { type_5 as type };
58
+ export function value_5(x: any): any;
59
+ export { value_5 as value };
60
+ }
61
+ export const extruded: boolean;
62
+ export const material: boolean;
63
+ }
64
+ import { defaultColorRange } from "../utils/color-utils";
65
+ //# sourceMappingURL=gpu-grid-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu-grid-layer.d.ts","sourceRoot":"","sources":["../../src/gpu-grid-layer/gpu-grid-layer.js"],"names":[],"mappings":"AAmEA;IAgEE,uCAgBC;IAED,uCAWC;IA6KD,kCAKC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAlSwC,qCAAe"}
@@ -0,0 +1,19 @@
1
+ declare class GridAggregationLayer extends AggregationLayer {
2
+ updateAggregationState(opts: any): void;
3
+ allocateResources(numRow: any, numCol: any): void;
4
+ updateResults({ aggregationData, maxMinData, maxData, minData }: {
5
+ aggregationData: any;
6
+ maxMinData: any;
7
+ maxData: any;
8
+ minData: any;
9
+ }): void;
10
+ _updateAggregation(opts: any): void;
11
+ _updateWeightBins(): void;
12
+ _uploadAggregationResults(): void;
13
+ }
14
+ declare namespace GridAggregationLayer {
15
+ const layerName: string;
16
+ }
17
+ export default GridAggregationLayer;
18
+ import AggregationLayer from "./aggregation-layer";
19
+ //# sourceMappingURL=grid-aggregation-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid-aggregation-layer.d.ts","sourceRoot":"","sources":["../src/grid-aggregation-layer.js"],"names":[],"mappings":"AA4BA;IA2DE,wCAGC;IAED,kDAoBC;IAED;;;;;aAQC;IAID,oCA8CC;IAED,0BAKC;IAED,kCAmBC;CACF"}