@deck.gl/aggregation-layers 8.8.0-alpha.4 → 8.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.dev.js +766 -649
- package/dist/es5/aggregation-layer.js +19 -7
- package/dist/es5/aggregation-layer.js.map +1 -1
- package/dist/es5/contour-layer/contour-layer.js +5 -5
- package/dist/es5/contour-layer/contour-layer.js.map +1 -1
- package/dist/es5/contour-layer/contour-utils.js +1 -1
- package/dist/es5/contour-layer/contour-utils.js.map +1 -1
- package/dist/es5/contour-layer/marching-squares-codes.js.map +1 -1
- package/dist/es5/contour-layer/marching-squares.js.map +1 -1
- package/dist/es5/cpu-grid-layer/cpu-grid-layer.js +5 -3
- package/dist/es5/cpu-grid-layer/cpu-grid-layer.js.map +1 -1
- package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +1 -1
- package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer.js +8 -8
- package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer.js.map +1 -1
- package/dist/es5/gpu-grid-layer/gpu-grid-layer.js +12 -12
- package/dist/es5/gpu-grid-layer/gpu-grid-layer.js.map +1 -1
- package/dist/es5/grid-aggregation-layer.js +25 -12
- package/dist/es5/grid-aggregation-layer.js.map +1 -1
- package/dist/es5/grid-layer/grid-layer.js +18 -9
- package/dist/es5/grid-layer/grid-layer.js.map +1 -1
- package/dist/es5/heatmap-layer/heatmap-layer-utils.js +5 -2
- package/dist/es5/heatmap-layer/heatmap-layer-utils.js.map +1 -1
- package/dist/es5/heatmap-layer/heatmap-layer.js +19 -7
- package/dist/es5/heatmap-layer/heatmap-layer.js.map +1 -1
- package/dist/es5/heatmap-layer/max-vs.glsl.js +1 -1
- package/dist/es5/heatmap-layer/triangle-layer-fragment.glsl.js +1 -1
- package/dist/es5/heatmap-layer/triangle-layer-vertex.glsl.js +1 -1
- package/dist/es5/heatmap-layer/triangle-layer.js +7 -7
- package/dist/es5/heatmap-layer/triangle-layer.js.map +1 -1
- package/dist/es5/heatmap-layer/weights-fs.glsl.js +1 -1
- package/dist/es5/heatmap-layer/weights-vs.glsl.js +1 -1
- package/dist/es5/hexagon-layer/hexagon-layer.js +16 -5
- package/dist/es5/hexagon-layer/hexagon-layer.js.map +1 -1
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/screen-grid-layer/screen-grid-cell-layer.js +26 -19
- package/dist/es5/screen-grid-layer/screen-grid-cell-layer.js.map +1 -1
- package/dist/es5/screen-grid-layer/screen-grid-layer-vertex.glsl.js +1 -1
- package/dist/es5/screen-grid-layer/screen-grid-layer.js +18 -8
- package/dist/es5/screen-grid-layer/screen-grid-layer.js.map +1 -1
- package/dist/es5/types.js +2 -0
- package/dist/es5/types.js.map +1 -0
- package/dist/es5/utils/bin-sorter.js +9 -0
- package/dist/es5/utils/bin-sorter.js.map +1 -1
- package/dist/esm/aggregation-layer.js +12 -5
- package/dist/esm/aggregation-layer.js.map +1 -1
- package/dist/esm/contour-layer/contour-layer.js +6 -3
- package/dist/esm/contour-layer/contour-layer.js.map +1 -1
- package/dist/esm/contour-layer/contour-utils.js +1 -1
- package/dist/esm/contour-layer/contour-utils.js.map +1 -1
- package/dist/esm/contour-layer/marching-squares-codes.js.map +1 -1
- package/dist/esm/contour-layer/marching-squares.js.map +1 -1
- package/dist/esm/cpu-grid-layer/cpu-grid-layer.js +6 -3
- package/dist/esm/cpu-grid-layer/cpu-grid-layer.js.map +1 -1
- package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js.map +1 -1
- package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +1 -1
- package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js.map +1 -1
- package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer.js +8 -6
- package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer.js.map +1 -1
- package/dist/esm/gpu-grid-layer/gpu-grid-layer.js +11 -9
- package/dist/esm/gpu-grid-layer/gpu-grid-layer.js.map +1 -1
- package/dist/esm/grid-aggregation-layer.js +13 -5
- package/dist/esm/grid-aggregation-layer.js.map +1 -1
- package/dist/esm/grid-layer/grid-layer.js +15 -8
- package/dist/esm/grid-layer/grid-layer.js.map +1 -1
- package/dist/esm/heatmap-layer/heatmap-layer-utils.js +5 -2
- package/dist/esm/heatmap-layer/heatmap-layer-utils.js.map +1 -1
- package/dist/esm/heatmap-layer/heatmap-layer.js +24 -14
- package/dist/esm/heatmap-layer/heatmap-layer.js.map +1 -1
- package/dist/esm/heatmap-layer/max-fs.glsl.js.map +1 -1
- package/dist/esm/heatmap-layer/max-vs.glsl.js +1 -1
- package/dist/esm/heatmap-layer/max-vs.glsl.js.map +1 -1
- package/dist/esm/heatmap-layer/triangle-layer-fragment.glsl.js +1 -1
- package/dist/esm/heatmap-layer/triangle-layer-fragment.glsl.js.map +1 -1
- package/dist/esm/heatmap-layer/triangle-layer-vertex.glsl.js +1 -1
- package/dist/esm/heatmap-layer/triangle-layer-vertex.glsl.js.map +1 -1
- package/dist/esm/heatmap-layer/triangle-layer.js +6 -5
- package/dist/esm/heatmap-layer/triangle-layer.js.map +1 -1
- package/dist/esm/heatmap-layer/weights-fs.glsl.js +1 -1
- package/dist/esm/heatmap-layer/weights-fs.glsl.js.map +1 -1
- package/dist/esm/heatmap-layer/weights-vs.glsl.js +1 -1
- package/dist/esm/heatmap-layer/weights-vs.glsl.js.map +1 -1
- package/dist/esm/hexagon-layer/hexagon-layer.js +11 -2
- package/dist/esm/hexagon-layer/hexagon-layer.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/screen-grid-layer/screen-grid-cell-layer.js +16 -10
- package/dist/esm/screen-grid-layer/screen-grid-cell-layer.js.map +1 -1
- package/dist/esm/screen-grid-layer/screen-grid-layer-fragment.glsl.js.map +1 -1
- package/dist/esm/screen-grid-layer/screen-grid-layer-vertex.glsl.js +1 -1
- package/dist/esm/screen-grid-layer/screen-grid-layer-vertex.glsl.js.map +1 -1
- package/dist/esm/screen-grid-layer/screen-grid-layer.js +15 -7
- package/dist/esm/screen-grid-layer/screen-grid-layer.js.map +1 -1
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils/bin-sorter.js +16 -0
- package/dist/esm/utils/bin-sorter.js.map +1 -1
- package/dist.min.js +1 -1
- package/package.json +7 -4
- package/src/{aggregation-layer.js → aggregation-layer.ts} +32 -15
- package/src/contour-layer/{contour-layer.js → contour-layer.ts} +95 -15
- package/src/contour-layer/{contour-utils.js → contour-utils.ts} +11 -5
- package/src/contour-layer/{marching-squares-codes.js → marching-squares-codes.ts} +0 -0
- package/src/contour-layer/{marching-squares.js → marching-squares.ts} +6 -6
- package/src/cpu-grid-layer/cpu-grid-layer.ts +310 -0
- package/src/gpu-grid-layer/{gpu-grid-cell-layer-fragment.glsl.js → gpu-grid-cell-layer-fragment.glsl.ts} +0 -0
- package/src/gpu-grid-layer/{gpu-grid-cell-layer-vertex.glsl.js → gpu-grid-cell-layer-vertex.glsl.ts} +0 -0
- package/src/gpu-grid-layer/{gpu-grid-cell-layer.js → gpu-grid-cell-layer.ts} +22 -14
- package/src/gpu-grid-layer/{gpu-grid-layer.js → gpu-grid-layer.ts} +122 -17
- package/src/{grid-aggregation-layer.js → grid-aggregation-layer.ts} +25 -13
- package/src/grid-layer/{grid-layer.js → grid-layer.ts} +38 -13
- package/src/heatmap-layer/{heatmap-layer-utils.js → heatmap-layer-utils.ts} +15 -10
- package/src/heatmap-layer/{heatmap-layer.js → heatmap-layer.ts} +144 -31
- package/src/heatmap-layer/{max-fs.glsl.js → max-fs.glsl.ts} +0 -0
- package/src/heatmap-layer/{max-vs.glsl.js → max-vs.glsl.ts} +0 -0
- package/src/heatmap-layer/{triangle-layer-fragment.glsl.js → triangle-layer-fragment.glsl.ts} +0 -0
- package/src/heatmap-layer/{triangle-layer-vertex.glsl.js → triangle-layer-vertex.glsl.ts} +0 -0
- package/src/heatmap-layer/{triangle-layer.js → triangle-layer.ts} +20 -10
- package/src/heatmap-layer/{weights-fs.glsl.js → weights-fs.glsl.ts} +0 -0
- package/src/heatmap-layer/{weights-vs.glsl.js → weights-vs.glsl.ts} +0 -0
- package/src/hexagon-layer/{hexagon-layer.js → hexagon-layer.ts} +174 -9
- package/src/index.ts +9 -0
- package/src/screen-grid-layer/{screen-grid-cell-layer.js → screen-grid-cell-layer.ts} +31 -14
- package/src/screen-grid-layer/{screen-grid-layer-fragment.glsl.js → screen-grid-layer-fragment.glsl.ts} +0 -0
- package/src/screen-grid-layer/{screen-grid-layer-vertex.glsl.js → screen-grid-layer-vertex.glsl.ts} +0 -0
- package/src/screen-grid-layer/{screen-grid-layer.js → screen-grid-layer.ts} +117 -15
- package/src/types.ts +10 -0
- package/src/utils/{bin-sorter.js → bin-sorter.ts} +26 -11
- package/typed/aggregation-layer.d.ts +38 -0
- package/typed/aggregation-layer.d.ts.map +1 -0
- package/typed/aggregation-layer.js +151 -0
- package/typed/contour-layer/contour-layer.d.ts +95 -0
- package/typed/contour-layer/contour-layer.d.ts.map +1 -0
- package/typed/contour-layer/contour-layer.js +234 -0
- package/typed/contour-layer/contour-utils.d.ts +18 -0
- package/typed/contour-layer/contour-utils.d.ts.map +1 -0
- package/typed/contour-layer/contour-utils.js +64 -0
- package/typed/contour-layer/marching-squares-codes.d.ts +32 -0
- package/typed/contour-layer/marching-squares-codes.d.ts.map +1 -0
- package/typed/contour-layer/marching-squares-codes.js +337 -0
- package/typed/contour-layer/marching-squares.d.ts +10 -0
- package/typed/contour-layer/marching-squares.d.ts.map +1 -0
- package/typed/contour-layer/marching-squares.js +147 -0
- package/typed/cpu-grid-layer/cpu-grid-layer.d.ts +226 -0
- package/typed/cpu-grid-layer/cpu-grid-layer.d.ts.map +1 -0
- package/typed/cpu-grid-layer/cpu-grid-layer.js +129 -0
- package/typed/cpu-grid-layer/grid-aggregator.d.ts +23 -0
- package/typed/cpu-grid-layer/grid-aggregator.d.ts.map +1 -0
- package/typed/cpu-grid-layer/grid-aggregator.js +141 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts +3 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts.map +1 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +34 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts +3 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts.map +1 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +141 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer.d.ts +71 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer.d.ts.map +1 -0
- package/typed/gpu-grid-layer/gpu-grid-cell-layer.js +143 -0
- package/typed/gpu-grid-layer/gpu-grid-layer.d.ts +134 -0
- package/typed/gpu-grid-layer/gpu-grid-layer.d.ts.map +1 -0
- package/typed/gpu-grid-layer/gpu-grid-layer.js +289 -0
- package/typed/grid-aggregation-layer.d.ts +32 -0
- package/typed/grid-aggregation-layer.d.ts.map +1 -0
- package/typed/grid-aggregation-layer.js +172 -0
- package/typed/grid-layer/grid-layer.d.ts +112 -0
- package/typed/grid-layer/grid-layer.d.ts.map +1 -0
- package/typed/grid-layer/grid-layer.js +60 -0
- package/typed/heatmap-layer/heatmap-layer-utils.d.ts +13 -0
- package/typed/heatmap-layer/heatmap-layer-utils.d.ts.map +1 -0
- package/typed/heatmap-layer/heatmap-layer-utils.js +78 -0
- package/typed/heatmap-layer/heatmap-layer.d.ts +161 -0
- package/typed/heatmap-layer/heatmap-layer.d.ts.map +1 -0
- package/typed/heatmap-layer/heatmap-layer.js +478 -0
- package/typed/heatmap-layer/max-fs.glsl.d.ts +3 -0
- package/typed/heatmap-layer/max-fs.glsl.d.ts.map +1 -0
- package/typed/heatmap-layer/max-fs.glsl.js +7 -0
- package/typed/heatmap-layer/max-vs.glsl.d.ts +3 -0
- package/typed/heatmap-layer/max-vs.glsl.d.ts.map +1 -0
- package/typed/heatmap-layer/max-vs.glsl.js +12 -0
- package/typed/heatmap-layer/triangle-layer-fragment.glsl.d.ts +3 -0
- package/typed/heatmap-layer/triangle-layer-fragment.glsl.d.ts.map +1 -0
- package/typed/heatmap-layer/triangle-layer-fragment.glsl.js +58 -0
- package/typed/heatmap-layer/triangle-layer-vertex.glsl.d.ts +3 -0
- package/typed/heatmap-layer/triangle-layer-vertex.glsl.d.ts.map +1 -0
- package/typed/heatmap-layer/triangle-layer-vertex.glsl.js +51 -0
- package/typed/heatmap-layer/triangle-layer.d.ts +27 -0
- package/typed/heatmap-layer/triangle-layer.d.ts.map +1 -0
- package/typed/heatmap-layer/triangle-layer.js +67 -0
- package/typed/heatmap-layer/weights-fs.glsl.d.ts +3 -0
- package/typed/heatmap-layer/weights-fs.glsl.d.ts.map +1 -0
- package/typed/heatmap-layer/weights-fs.glsl.js +19 -0
- package/typed/heatmap-layer/weights-vs.glsl.d.ts +3 -0
- package/typed/heatmap-layer/weights-vs.glsl.d.ts.map +1 -0
- package/typed/heatmap-layer/weights-vs.glsl.js +23 -0
- package/typed/hexagon-layer/hexagon-aggregator.d.ts +24 -0
- package/typed/hexagon-layer/hexagon-aggregator.d.ts.map +1 -0
- package/typed/hexagon-layer/hexagon-aggregator.js +112 -0
- package/typed/hexagon-layer/hexagon-layer.d.ts +237 -0
- package/typed/hexagon-layer/hexagon-layer.d.ts.map +1 -0
- package/typed/hexagon-layer/hexagon-layer.js +171 -0
- package/typed/index.d.ts +20 -0
- package/typed/index.d.ts.map +1 -0
- package/typed/index.js +33 -0
- package/typed/package.json +6 -0
- package/typed/screen-grid-layer/screen-grid-cell-layer.d.ts +54 -0
- package/typed/screen-grid-layer/screen-grid-cell-layer.d.ts.map +1 -0
- package/typed/screen-grid-layer/screen-grid-cell-layer.js +159 -0
- package/typed/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts +3 -0
- package/typed/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts.map +1 -0
- package/typed/screen-grid-layer/screen-grid-layer-fragment.glsl.js +37 -0
- package/typed/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts +3 -0
- package/typed/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts.map +1 -0
- package/typed/screen-grid-layer/screen-grid-layer-vertex.glsl.js +83 -0
- package/typed/screen-grid-layer/screen-grid-layer.d.ts +117 -0
- package/typed/screen-grid-layer/screen-grid-layer.d.ts.map +1 -0
- package/typed/screen-grid-layer/screen-grid-layer.js +216 -0
- package/typed/types.d.ts +11 -0
- package/typed/types.d.ts.map +1 -0
- package/typed/types.js +1 -0
- package/typed/utils/aggregation-operation-utils.d.ts +13 -0
- package/typed/utils/aggregation-operation-utils.d.ts.map +1 -0
- package/typed/utils/aggregation-operation-utils.js +94 -0
- package/typed/utils/bin-sorter.d.ts +52 -0
- package/typed/utils/bin-sorter.d.ts.map +1 -0
- package/typed/utils/bin-sorter.js +167 -0
- package/typed/utils/color-utils.d.ts +3 -0
- package/typed/utils/color-utils.d.ts.map +1 -0
- package/typed/utils/color-utils.js +53 -0
- package/typed/utils/cpu-aggregator.d.ts +155 -0
- package/typed/utils/cpu-aggregator.d.ts.map +1 -0
- package/typed/utils/cpu-aggregator.js +417 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts +3 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +39 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts +3 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +53 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts +3 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +31 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts +3 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js +77 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts +36 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +41 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts +1 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +1 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts +66 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +562 -0
- package/typed/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts +3 -0
- package/typed/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts.map +1 -0
- package/typed/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +36 -0
- package/typed/utils/grid-aggregation-utils.d.ts +24 -0
- package/typed/utils/grid-aggregation-utils.d.ts.map +1 -0
- package/typed/utils/grid-aggregation-utils.js +114 -0
- package/typed/utils/prop-utils.d.ts +2 -0
- package/typed/utils/prop-utils.d.ts.map +1 -0
- package/typed/utils/prop-utils.js +28 -0
- package/typed/utils/resource-utils.d.ts +4 -0
- package/typed/utils/resource-utils.d.ts.map +1 -0
- package/typed/utils/resource-utils.js +40 -0
- package/typed/utils/scale-utils.d.ts +15 -0
- package/typed/utils/scale-utils.d.ts.map +1 -0
- package/typed/utils/scale-utils.js +184 -0
- package/src/cpu-grid-layer/cpu-grid-layer.js +0 -153
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Copyright (c) 2015 - 2019 Uber Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
// in the Software without restriction, including without limitation the rights
|
|
6
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
// furnished to do so, subject to the following conditions:
|
|
9
|
+
//
|
|
10
|
+
// The above copyright notice and this permission notice shall be included in
|
|
11
|
+
// all copies or substantial portions of the Software.
|
|
12
|
+
//
|
|
13
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
// THE SOFTWARE.
|
|
20
|
+
import GL from '@luma.gl/constants';
|
|
21
|
+
import { Model, Geometry } from '@luma.gl/core';
|
|
22
|
+
import { Layer, project32 } from '@deck.gl/core';
|
|
23
|
+
import vs from './triangle-layer-vertex.glsl';
|
|
24
|
+
import fs from './triangle-layer-fragment.glsl';
|
|
25
|
+
export default class TriangleLayer extends Layer {
|
|
26
|
+
getShaders() {
|
|
27
|
+
return { vs, fs, modules: [project32] };
|
|
28
|
+
}
|
|
29
|
+
initializeState({ gl }) {
|
|
30
|
+
const attributeManager = this.getAttributeManager();
|
|
31
|
+
attributeManager.add({
|
|
32
|
+
positions: { size: 3, noAlloc: true },
|
|
33
|
+
texCoords: { size: 2, noAlloc: true }
|
|
34
|
+
});
|
|
35
|
+
this.setState({
|
|
36
|
+
model: this._getModel(gl)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
_getModel(gl) {
|
|
40
|
+
const { vertexCount } = this.props;
|
|
41
|
+
return new Model(gl, {
|
|
42
|
+
...this.getShaders(),
|
|
43
|
+
id: this.props.id,
|
|
44
|
+
geometry: new Geometry({
|
|
45
|
+
drawMode: GL.TRIANGLE_FAN,
|
|
46
|
+
vertexCount
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
draw({ uniforms }) {
|
|
51
|
+
const { model } = this.state;
|
|
52
|
+
const { texture, maxTexture, colorTexture, intensity, threshold, aggregationMode, colorDomain } = this.props;
|
|
53
|
+
model
|
|
54
|
+
.setUniforms({
|
|
55
|
+
...uniforms,
|
|
56
|
+
texture,
|
|
57
|
+
maxTexture,
|
|
58
|
+
colorTexture,
|
|
59
|
+
intensity,
|
|
60
|
+
threshold,
|
|
61
|
+
aggregationMode,
|
|
62
|
+
colorDomain
|
|
63
|
+
})
|
|
64
|
+
.draw();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
TriangleLayer.layerName = 'TriangleLayer';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "varying vec4 weightsTexture;\n// Epanechnikov function, keeping for reference\n// float epanechnikovKDE(float u) {\n// return 0.75 * (1.0 - u * u);\n// }\nfloat gaussianKDE(float u){\n return pow(2.71828, -u*u/0.05555)/(1.77245385*0.166666);\n}\nvoid main()\n{\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n if (dist > 0.5) {\n discard;\n }\n gl_FragColor = weightsTexture * gaussianKDE(2. * dist);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=weights-fs.glsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weights-fs.glsl.d.ts","sourceRoot":"","sources":["../../src/heatmap-layer/weights-fs.glsl.ts"],"names":[],"mappings":";AAAA,wBAkBE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default `\
|
|
2
|
+
varying vec4 weightsTexture;
|
|
3
|
+
// Epanechnikov function, keeping for reference
|
|
4
|
+
// float epanechnikovKDE(float u) {
|
|
5
|
+
// return 0.75 * (1.0 - u * u);
|
|
6
|
+
// }
|
|
7
|
+
float gaussianKDE(float u){
|
|
8
|
+
return pow(2.71828, -u*u/0.05555)/(1.77245385*0.166666);
|
|
9
|
+
}
|
|
10
|
+
void main()
|
|
11
|
+
{
|
|
12
|
+
float dist = length(gl_PointCoord - vec2(0.5, 0.5));
|
|
13
|
+
if (dist > 0.5) {
|
|
14
|
+
discard;
|
|
15
|
+
}
|
|
16
|
+
gl_FragColor = weightsTexture * gaussianKDE(2. * dist);
|
|
17
|
+
DECKGL_FILTER_COLOR(gl_FragColor, geometry);
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "attribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float weights;\nvarying vec4 weightsTexture;\nuniform float radiusPixels;\nuniform float textureWidth;\nuniform vec4 commonBounds;\nuniform float weightsScale;\nvoid main()\n{\n weightsTexture = vec4(weights * weightsScale, 0., 0., 1.);\n\n float radiusTexels = project_pixel_size(radiusPixels) * textureWidth / (commonBounds.z - commonBounds.x);\n gl_PointSize = radiusTexels * 2.;\n\n vec3 commonPosition = project_position(positions, positions64Low);\n\n // map xy from commonBounds to [-1, 1]\n gl_Position.xy = (commonPosition.xy - commonBounds.xy) / (commonBounds.zw - commonBounds.xy) ;\n gl_Position.xy = (gl_Position.xy * 2.) - (1.);\n}\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=weights-vs.glsl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weights-vs.glsl.d.ts","sourceRoot":"","sources":["../../src/heatmap-layer/weights-vs.glsl.ts"],"names":[],"mappings":";AAAA,wBAsBE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default `\
|
|
2
|
+
attribute vec3 positions;
|
|
3
|
+
attribute vec3 positions64Low;
|
|
4
|
+
attribute float weights;
|
|
5
|
+
varying vec4 weightsTexture;
|
|
6
|
+
uniform float radiusPixels;
|
|
7
|
+
uniform float textureWidth;
|
|
8
|
+
uniform vec4 commonBounds;
|
|
9
|
+
uniform float weightsScale;
|
|
10
|
+
void main()
|
|
11
|
+
{
|
|
12
|
+
weightsTexture = vec4(weights * weightsScale, 0., 0., 1.);
|
|
13
|
+
|
|
14
|
+
float radiusTexels = project_pixel_size(radiusPixels) * textureWidth / (commonBounds.z - commonBounds.x);
|
|
15
|
+
gl_PointSize = radiusTexels * 2.;
|
|
16
|
+
|
|
17
|
+
vec3 commonPosition = project_position(positions, positions64Low);
|
|
18
|
+
|
|
19
|
+
// map xy from commonBounds to [-1, 1]
|
|
20
|
+
gl_Position.xy = (commonPosition.xy - commonBounds.xy) / (commonBounds.zw - commonBounds.xy) ;
|
|
21
|
+
gl_Position.xy = (gl_Position.xy * 2.) - (1.);
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use d3-hexbin to performs hexagonal binning from geo points to hexagons
|
|
3
|
+
* @param {Iterable} data - array of points
|
|
4
|
+
* @param {Number} radius - hexagon radius in meter
|
|
5
|
+
* @param {function} getPosition - get points lon lat
|
|
6
|
+
* @param {Object} viewport - current viewport object
|
|
7
|
+
|
|
8
|
+
* @return {Object} - hexagons and countRange
|
|
9
|
+
*/
|
|
10
|
+
export function pointToHexbin(props: any, aggregationParams: any): any;
|
|
11
|
+
/**
|
|
12
|
+
* Get the bounding box of all data points
|
|
13
|
+
*/
|
|
14
|
+
export function getPointsCenter(data: any, aggregationParams: any): number[] | null;
|
|
15
|
+
/**
|
|
16
|
+
* Get radius in mercator world space coordinates from meter
|
|
17
|
+
* @param {Number} radius - in meter
|
|
18
|
+
* @param {Object} viewport - current viewport object
|
|
19
|
+
* @param {Array<Number>} center - data center
|
|
20
|
+
|
|
21
|
+
* @return {Number} radius in mercator world spcae coordinates
|
|
22
|
+
*/
|
|
23
|
+
export function getRadiusInCommon(radius: number, viewport: any, center: Array<number>): number;
|
|
24
|
+
//# sourceMappingURL=hexagon-aggregator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hexagon-aggregator.d.ts","sourceRoot":"","sources":["../../src/hexagon-layer/hexagon-aggregator.js"],"names":[],"mappings":"AAuBA;;;;;;;;GAQG;AACH,uEA2CC;AAED;;GAEG;AACH,oFA4BC;AAED;;;;;;;GAOG;AACH,yEAJW,aAAa,UAQvB"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
// in the Software without restriction, including without limitation the rights
|
|
6
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
// furnished to do so, subject to the following conditions:
|
|
9
|
+
//
|
|
10
|
+
// The above copyright notice and this permission notice shall be included in
|
|
11
|
+
// all copies or substantial portions of the Software.
|
|
12
|
+
//
|
|
13
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
// THE SOFTWARE.
|
|
20
|
+
import { hexbin } from 'd3-hexbin';
|
|
21
|
+
import { createIterable, log } from '@deck.gl/core';
|
|
22
|
+
/**
|
|
23
|
+
* Use d3-hexbin to performs hexagonal binning from geo points to hexagons
|
|
24
|
+
* @param {Iterable} data - array of points
|
|
25
|
+
* @param {Number} radius - hexagon radius in meter
|
|
26
|
+
* @param {function} getPosition - get points lon lat
|
|
27
|
+
* @param {Object} viewport - current viewport object
|
|
28
|
+
|
|
29
|
+
* @return {Object} - hexagons and countRange
|
|
30
|
+
*/
|
|
31
|
+
export function pointToHexbin(props, aggregationParams) {
|
|
32
|
+
const { data, radius } = props;
|
|
33
|
+
const { viewport, attributes } = aggregationParams;
|
|
34
|
+
// get hexagon radius in mercator world unit
|
|
35
|
+
const centerLngLat = data.length ? getPointsCenter(data, aggregationParams) : null;
|
|
36
|
+
const radiusCommon = getRadiusInCommon(radius, viewport, centerLngLat);
|
|
37
|
+
// add world space coordinates to points
|
|
38
|
+
const screenPoints = [];
|
|
39
|
+
const { iterable, objectInfo } = createIterable(data);
|
|
40
|
+
const positions = attributes.positions.value;
|
|
41
|
+
const { size } = attributes.positions.getAccessor();
|
|
42
|
+
for (const object of iterable) {
|
|
43
|
+
objectInfo.index++;
|
|
44
|
+
const posIndex = objectInfo.index * size;
|
|
45
|
+
const position = [positions[posIndex], positions[posIndex + 1]];
|
|
46
|
+
const arrayIsFinite = Number.isFinite(position[0]) && Number.isFinite(position[1]);
|
|
47
|
+
if (arrayIsFinite) {
|
|
48
|
+
screenPoints.push({
|
|
49
|
+
screenCoord: viewport.projectFlat(position),
|
|
50
|
+
source: object,
|
|
51
|
+
index: objectInfo.index
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
log.warn('HexagonLayer: invalid position')();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const newHexbin = hexbin()
|
|
59
|
+
.radius(radiusCommon)
|
|
60
|
+
.x(d => d.screenCoord[0])
|
|
61
|
+
.y(d => d.screenCoord[1]);
|
|
62
|
+
const hexagonBins = newHexbin(screenPoints);
|
|
63
|
+
return {
|
|
64
|
+
hexagons: hexagonBins.map((hex, index) => ({
|
|
65
|
+
position: viewport.unprojectFlat([hex.x, hex.y]),
|
|
66
|
+
points: hex,
|
|
67
|
+
index
|
|
68
|
+
})),
|
|
69
|
+
radiusCommon
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get the bounding box of all data points
|
|
74
|
+
*/
|
|
75
|
+
export function getPointsCenter(data, aggregationParams) {
|
|
76
|
+
const { attributes } = aggregationParams;
|
|
77
|
+
const positions = attributes.positions.value;
|
|
78
|
+
const { size } = attributes.positions.getAccessor();
|
|
79
|
+
let minX = Infinity;
|
|
80
|
+
let minY = Infinity;
|
|
81
|
+
let maxX = -Infinity;
|
|
82
|
+
let maxY = -Infinity;
|
|
83
|
+
let i;
|
|
84
|
+
for (i = 0; i < size * data.length; i += size) {
|
|
85
|
+
const x = positions[i];
|
|
86
|
+
const y = positions[i + 1];
|
|
87
|
+
const arrayIsFinite = Number.isFinite(x) && Number.isFinite(y);
|
|
88
|
+
if (arrayIsFinite) {
|
|
89
|
+
minX = Math.min(x, minX);
|
|
90
|
+
maxX = Math.max(x, maxX);
|
|
91
|
+
minY = Math.min(y, minY);
|
|
92
|
+
maxY = Math.max(y, maxY);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// return center
|
|
96
|
+
return [minX, minY, maxX, maxY].every(Number.isFinite)
|
|
97
|
+
? [(minX + maxX) / 2, (minY + maxY) / 2]
|
|
98
|
+
: null;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get radius in mercator world space coordinates from meter
|
|
102
|
+
* @param {Number} radius - in meter
|
|
103
|
+
* @param {Object} viewport - current viewport object
|
|
104
|
+
* @param {Array<Number>} center - data center
|
|
105
|
+
|
|
106
|
+
* @return {Number} radius in mercator world spcae coordinates
|
|
107
|
+
*/
|
|
108
|
+
export function getRadiusInCommon(radius, viewport, center) {
|
|
109
|
+
const { unitsPerMeter } = viewport.getDistanceScales(center);
|
|
110
|
+
// x, y distance should be the same
|
|
111
|
+
return radius * unitsPerMeter[0];
|
|
112
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { Accessor, AccessorFunction, Color, Position, UpdateParameters } from '@deck.gl/core/typed';
|
|
2
|
+
import { ColumnLayer, _MaterialProps as MaterialProps } from '@deck.gl/layers/typed';
|
|
3
|
+
import { pointToHexbin } from './hexagon-aggregator';
|
|
4
|
+
import CPUAggregator from '../utils/cpu-aggregator';
|
|
5
|
+
import AggregationLayer, { AggregationLayerProps } from '../aggregation-layer';
|
|
6
|
+
import { AggregateAccessor } from '../types';
|
|
7
|
+
declare function nop(): void;
|
|
8
|
+
/** All properties supported by by HexagonLayer. */
|
|
9
|
+
export declare type HexagonLayerProps<DataT = any> = _HexagonLayerProps<DataT> & AggregationLayerProps<DataT>;
|
|
10
|
+
/** Properties added by HexagonLayer. */
|
|
11
|
+
declare type _HexagonLayerProps<DataT = any> = {
|
|
12
|
+
/**
|
|
13
|
+
* Radius of hexagon bin in meters. The hexagons are pointy-topped (rather than flat-topped).
|
|
14
|
+
* @default 1000
|
|
15
|
+
*/
|
|
16
|
+
radius?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Function to aggregate data into hexagonal bins.
|
|
19
|
+
* @default d3-hexbin
|
|
20
|
+
*/
|
|
21
|
+
hexagonAggregator?: () => any;
|
|
22
|
+
/**
|
|
23
|
+
* Color scale input domain.
|
|
24
|
+
* @default [min(colorWeight), max(colorWeight)]
|
|
25
|
+
*/
|
|
26
|
+
colorDomain?: number[];
|
|
27
|
+
/**
|
|
28
|
+
* Specified as an array of colors [color1, color2, ...].
|
|
29
|
+
* @default `6-class YlOrRd` - [colorbrewer](http://colorbrewer2.org/#type=sequential&scheme=YlOrRd&n=6)
|
|
30
|
+
*/
|
|
31
|
+
colorRange?: Color[];
|
|
32
|
+
/**
|
|
33
|
+
* Hexagon radius multiplier, clamped between 0 - 1.
|
|
34
|
+
* @default 1
|
|
35
|
+
*/
|
|
36
|
+
coverage?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Elevation scale input domain. The elevation scale is a linear scale that maps number of counts to elevation.
|
|
39
|
+
* @default [0, max(elevationWeight)]
|
|
40
|
+
*/
|
|
41
|
+
elevationDomain?: number[];
|
|
42
|
+
/**
|
|
43
|
+
* Elevation scale output range.
|
|
44
|
+
* @default [0, 1000]
|
|
45
|
+
*/
|
|
46
|
+
elevationRange?: number[];
|
|
47
|
+
/**
|
|
48
|
+
* Hexagon elevation multiplier.
|
|
49
|
+
* @default 1
|
|
50
|
+
*/
|
|
51
|
+
elevationScale?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Whether to enable cell elevation. If set to false, all cell will be flat.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
extruded?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Filter bins and re-calculate color by `upperPercentile`.
|
|
59
|
+
* Hexagons with color value larger than the `upperPercentile` will be hidden.
|
|
60
|
+
* @default 100
|
|
61
|
+
*/
|
|
62
|
+
upperPercentile?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Filter bins and re-calculate color by `lowerPercentile`.
|
|
65
|
+
* Hexagons with color value smaller than the `lowerPercentile` will be hidden.
|
|
66
|
+
* @default 0
|
|
67
|
+
*/
|
|
68
|
+
lowerPercentile?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Filter bins and re-calculate elevation by `elevationUpperPercentile`.
|
|
71
|
+
* Hexagons with elevation value larger than the `elevationUpperPercentile` will be hidden.
|
|
72
|
+
* @default 100
|
|
73
|
+
*/
|
|
74
|
+
elevationUpperPercentile?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Filter bins and re-calculate elevation by `elevationLowerPercentile`.
|
|
77
|
+
* Hexagons with elevation value larger than the `elevationLowerPercentile` will be hidden.
|
|
78
|
+
* @default 0
|
|
79
|
+
*/
|
|
80
|
+
elevationLowerPercentile?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Scaling function used to determine the color of the grid cell, default value is 'quantize'.
|
|
83
|
+
* Supported Values are 'quantize', 'quantile' and 'ordinal'.
|
|
84
|
+
* @default 'quantize'
|
|
85
|
+
*/
|
|
86
|
+
colorScaleType?: 'quantize' | 'quantile' | 'ordinal';
|
|
87
|
+
/**
|
|
88
|
+
* This is an object that contains material props
|
|
89
|
+
* for [lighting effect](/docs/api-reference/core/lighting-effect.md) applied on extruded polygons.
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
material?: MaterialProps | boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Defines the operation used to aggregate all data object weights to calculate a cell's color value.
|
|
95
|
+
* @default 'SUM'
|
|
96
|
+
*/
|
|
97
|
+
colorAggregation?: 'SUM' | 'MEAN' | 'MIN' | 'MAX';
|
|
98
|
+
/**
|
|
99
|
+
* Defines the operation used to aggregate all data object weights to calculate a cell's elevation value.
|
|
100
|
+
* @default 'SUM'
|
|
101
|
+
*/
|
|
102
|
+
elevationAggregation?: 'SUM' | 'MEAN' | 'MIN' | 'MAX';
|
|
103
|
+
/**
|
|
104
|
+
* Method called to retrieve the position of each object.
|
|
105
|
+
* @default object => object.position
|
|
106
|
+
*/
|
|
107
|
+
getPosition?: AccessorFunction<DataT, Position>;
|
|
108
|
+
/**
|
|
109
|
+
* The weight of a data object used to calculate the color value for a bin.
|
|
110
|
+
* @default 1
|
|
111
|
+
*/
|
|
112
|
+
getColorWeight?: Accessor<DataT, number>;
|
|
113
|
+
/**
|
|
114
|
+
* After data objects are aggregated into bins, this accessor is called on each cell to get the value that its color is based on.
|
|
115
|
+
* @default null
|
|
116
|
+
*/
|
|
117
|
+
getColorValue?: AggregateAccessor<DataT> | null;
|
|
118
|
+
/**
|
|
119
|
+
* The weight of a data object used to calculate the elevation value for a bin.
|
|
120
|
+
* @default 1
|
|
121
|
+
*/
|
|
122
|
+
getElevationWeight?: Accessor<DataT, number>;
|
|
123
|
+
/**
|
|
124
|
+
* After data objects are aggregated into bins, this accessor is called on each cell to get the value that its elevation is based on.
|
|
125
|
+
* @default null
|
|
126
|
+
*/
|
|
127
|
+
getElevationValue?: AggregateAccessor<DataT> | null;
|
|
128
|
+
/**
|
|
129
|
+
* This callback will be called when cell color domain has been calculated.
|
|
130
|
+
* @default () => {}
|
|
131
|
+
*/
|
|
132
|
+
onSetColorDomain?: (minMax: [number, number]) => void;
|
|
133
|
+
/**
|
|
134
|
+
* This callback will be called when cell elevation domain has been calculated.
|
|
135
|
+
* @default () => {}
|
|
136
|
+
*/
|
|
137
|
+
onSetElevationDomain?: (minMax: [number, number]) => void;
|
|
138
|
+
};
|
|
139
|
+
export default class HexagonLayer<ExtraPropsT = {}> extends AggregationLayer<ExtraPropsT & Required<_HexagonLayerProps>> {
|
|
140
|
+
static layerName: string;
|
|
141
|
+
static defaultProps: {
|
|
142
|
+
colorDomain: null;
|
|
143
|
+
colorRange: number[][];
|
|
144
|
+
getColorValue: {
|
|
145
|
+
type: string;
|
|
146
|
+
value: null;
|
|
147
|
+
};
|
|
148
|
+
getColorWeight: {
|
|
149
|
+
type: string;
|
|
150
|
+
value: number;
|
|
151
|
+
};
|
|
152
|
+
colorAggregation: string;
|
|
153
|
+
lowerPercentile: {
|
|
154
|
+
type: string;
|
|
155
|
+
value: number;
|
|
156
|
+
min: number;
|
|
157
|
+
max: number;
|
|
158
|
+
};
|
|
159
|
+
upperPercentile: {
|
|
160
|
+
type: string;
|
|
161
|
+
value: number;
|
|
162
|
+
min: number;
|
|
163
|
+
max: number;
|
|
164
|
+
};
|
|
165
|
+
colorScaleType: string;
|
|
166
|
+
onSetColorDomain: typeof nop;
|
|
167
|
+
elevationDomain: null;
|
|
168
|
+
elevationRange: number[];
|
|
169
|
+
getElevationValue: {
|
|
170
|
+
type: string;
|
|
171
|
+
value: null;
|
|
172
|
+
};
|
|
173
|
+
getElevationWeight: {
|
|
174
|
+
type: string;
|
|
175
|
+
value: number;
|
|
176
|
+
};
|
|
177
|
+
elevationAggregation: string;
|
|
178
|
+
elevationLowerPercentile: {
|
|
179
|
+
type: string;
|
|
180
|
+
value: number;
|
|
181
|
+
min: number;
|
|
182
|
+
max: number;
|
|
183
|
+
};
|
|
184
|
+
elevationUpperPercentile: {
|
|
185
|
+
type: string;
|
|
186
|
+
value: number;
|
|
187
|
+
min: number;
|
|
188
|
+
max: number;
|
|
189
|
+
};
|
|
190
|
+
elevationScale: {
|
|
191
|
+
type: string;
|
|
192
|
+
min: number;
|
|
193
|
+
value: number;
|
|
194
|
+
};
|
|
195
|
+
elevationScaleType: string;
|
|
196
|
+
onSetElevationDomain: typeof nop;
|
|
197
|
+
radius: {
|
|
198
|
+
type: string;
|
|
199
|
+
value: number;
|
|
200
|
+
min: number;
|
|
201
|
+
};
|
|
202
|
+
coverage: {
|
|
203
|
+
type: string;
|
|
204
|
+
min: number;
|
|
205
|
+
max: number;
|
|
206
|
+
value: number;
|
|
207
|
+
};
|
|
208
|
+
extruded: boolean;
|
|
209
|
+
hexagonAggregator: typeof pointToHexbin;
|
|
210
|
+
getPosition: {
|
|
211
|
+
type: string;
|
|
212
|
+
value: (x: any) => any;
|
|
213
|
+
};
|
|
214
|
+
material: boolean;
|
|
215
|
+
_filterData: {
|
|
216
|
+
type: string;
|
|
217
|
+
value: null;
|
|
218
|
+
optional: boolean;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
state: AggregationLayer['state'] & {
|
|
222
|
+
cpuAggregator: CPUAggregator;
|
|
223
|
+
aggregatorState: any;
|
|
224
|
+
};
|
|
225
|
+
initializeState(): void;
|
|
226
|
+
updateState(opts: UpdateParameters<this>): void;
|
|
227
|
+
convertLatLngToMeterOffset(hexagonVertices: any): number[][] | null;
|
|
228
|
+
getPickingInfo({ info }: {
|
|
229
|
+
info: any;
|
|
230
|
+
}): any;
|
|
231
|
+
_onGetSublayerColor(cell: any): any;
|
|
232
|
+
_onGetSublayerElevation(cell: any): any;
|
|
233
|
+
_getSublayerUpdateTriggers(): {};
|
|
234
|
+
renderLayers(): ColumnLayer<any, {}>;
|
|
235
|
+
}
|
|
236
|
+
export {};
|
|
237
|
+
//# sourceMappingURL=hexagon-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hexagon-layer.d.ts","sourceRoot":"","sources":["../../src/hexagon-layer/hexagon-layer.ts"],"names":[],"mappings":"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"}
|