@deck.gl/aggregation-layers 9.0.40 → 9.1.0-beta.3
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/common/aggregation-layer.d.ts +30 -0
- package/dist/common/aggregation-layer.d.ts.map +1 -0
- package/dist/common/aggregation-layer.js +70 -0
- package/dist/common/aggregation-layer.js.map +1 -0
- package/dist/common/aggregator/aggregator.d.ts +76 -0
- package/dist/common/aggregator/aggregator.d.ts.map +1 -0
- package/dist/common/aggregator/aggregator.js +5 -0
- package/dist/common/aggregator/aggregator.js.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/aggregate.d.ts +27 -0
- package/dist/common/aggregator/cpu-aggregator/aggregate.d.ts.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/aggregate.js +67 -0
- package/dist/common/aggregator/cpu-aggregator/aggregate.js.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.d.ts +70 -0
- package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.d.ts.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.js +140 -0
- package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.js.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/sort-bins.d.ts +15 -0
- package/dist/common/aggregator/cpu-aggregator/sort-bins.d.ts.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/sort-bins.js +44 -0
- package/dist/common/aggregator/cpu-aggregator/sort-bins.js.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/vertex-accessor.d.ts +21 -0
- package/dist/common/aggregator/cpu-aggregator/vertex-accessor.d.ts.map +1 -0
- package/dist/common/aggregator/cpu-aggregator/vertex-accessor.js +56 -0
- package/dist/common/aggregator/cpu-aggregator/vertex-accessor.js.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.d.ts +18 -0
- package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.d.ts.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.js +21 -0
- package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.js.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.d.ts +14 -0
- package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.d.ts.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.js +18 -0
- package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.js.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/utils.d.ts +6 -0
- package/dist/common/aggregator/gpu-aggregator/utils.d.ts.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/utils.js +25 -0
- package/dist/common/aggregator/gpu-aggregator/utils.js.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.d.ts +24 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.d.ts.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.js +216 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.js.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.d.ts +81 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.d.ts.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.js +202 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.js.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.d.ts +38 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.d.ts.map +1 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.js +224 -0
- package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.js.map +1 -0
- package/dist/common/aggregator/index.d.ts +6 -0
- package/dist/common/aggregator/index.d.ts.map +1 -0
- package/dist/common/aggregator/index.js +6 -0
- package/dist/common/aggregator/index.js.map +1 -0
- package/dist/common/types.d.ts +11 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/types.js +5 -0
- package/dist/common/types.js.map +1 -0
- package/dist/common/utils/bounds-utils.d.ts +10 -0
- package/dist/common/utils/bounds-utils.d.ts.map +1 -0
- package/dist/common/utils/bounds-utils.js +21 -0
- package/dist/common/utils/bounds-utils.js.map +1 -0
- package/dist/common/utils/color-utils.d.ts +10 -0
- package/dist/common/utils/color-utils.d.ts.map +1 -0
- package/dist/common/utils/color-utils.js +66 -0
- package/dist/common/utils/color-utils.js.map +1 -0
- package/dist/common/utils/prop-utils.d.ts.map +1 -0
- package/dist/common/utils/prop-utils.js +13 -0
- package/dist/common/utils/prop-utils.js.map +1 -0
- package/dist/common/utils/scale-utils.d.ts +46 -0
- package/dist/common/utils/scale-utils.d.ts.map +1 -0
- package/dist/common/utils/scale-utils.js +181 -0
- package/dist/common/utils/scale-utils.js.map +1 -0
- package/dist/contour-layer/bin-options-uniforms.d.ts +13 -0
- package/dist/contour-layer/bin-options-uniforms.d.ts.map +1 -0
- package/dist/contour-layer/bin-options-uniforms.js +18 -0
- package/dist/contour-layer/bin-options-uniforms.js.map +1 -0
- package/dist/contour-layer/contour-layer.d.ts +42 -50
- package/dist/contour-layer/contour-layer.d.ts.map +1 -1
- package/dist/contour-layer/contour-layer.js +233 -192
- package/dist/contour-layer/contour-layer.js.map +1 -0
- package/dist/contour-layer/contour-utils.d.ts +36 -15
- package/dist/contour-layer/contour-utils.d.ts.map +1 -1
- package/dist/contour-layer/contour-utils.js +25 -29
- package/dist/contour-layer/contour-utils.js.map +1 -0
- package/dist/contour-layer/marching-squares-codes.d.ts.map +1 -1
- package/dist/contour-layer/marching-squares-codes.js +4 -0
- package/dist/contour-layer/marching-squares-codes.js.map +1 -0
- package/dist/contour-layer/marching-squares.d.ts +22 -6
- package/dist/contour-layer/marching-squares.d.ts.map +1 -1
- package/dist/contour-layer/marching-squares.js +72 -68
- package/dist/contour-layer/marching-squares.js.map +1 -0
- package/dist/contour-layer/value-reader.d.ts +10 -0
- package/dist/contour-layer/value-reader.d.ts.map +1 -0
- package/dist/contour-layer/value-reader.js +47 -0
- package/dist/contour-layer/value-reader.js.map +1 -0
- package/dist/dist.dev.js +4844 -4083
- package/dist/grid-layer/bin-options-uniforms.d.ts +13 -0
- package/dist/grid-layer/bin-options-uniforms.d.ts.map +1 -0
- package/dist/grid-layer/bin-options-uniforms.js +18 -0
- package/dist/grid-layer/bin-options-uniforms.js.map +1 -0
- package/dist/grid-layer/grid-cell-layer-vertex.glsl.d.ts +3 -0
- package/dist/grid-layer/grid-cell-layer-vertex.glsl.d.ts.map +1 -0
- package/dist/grid-layer/grid-cell-layer-vertex.glsl.js +52 -0
- package/dist/grid-layer/grid-cell-layer-vertex.glsl.js.map +1 -0
- package/dist/grid-layer/grid-cell-layer.d.ts +32 -0
- package/dist/grid-layer/grid-cell-layer.d.ts.map +1 -0
- package/dist/grid-layer/grid-cell-layer.js +94 -0
- package/dist/grid-layer/grid-cell-layer.js.map +1 -0
- package/dist/grid-layer/grid-layer-uniforms.d.ts +21 -0
- package/dist/grid-layer/grid-layer-uniforms.d.ts.map +1 -0
- package/dist/grid-layer/grid-layer-uniforms.js +24 -0
- package/dist/grid-layer/grid-layer-uniforms.js.map +1 -0
- package/dist/grid-layer/grid-layer.d.ts +176 -14
- package/dist/grid-layer/grid-layer.d.ts.map +1 -1
- package/dist/grid-layer/grid-layer.js +343 -46
- package/dist/grid-layer/grid-layer.js.map +1 -0
- package/dist/{aggregation-layer.d.ts → heatmap-layer/aggregation-layer.d.ts} +1 -0
- package/dist/heatmap-layer/aggregation-layer.d.ts.map +1 -0
- package/dist/{aggregation-layer.js → heatmap-layer/aggregation-layer.js} +7 -21
- package/dist/heatmap-layer/aggregation-layer.js.map +1 -0
- package/dist/heatmap-layer/heatmap-layer-uniforms.d.ts +30 -0
- package/dist/heatmap-layer/heatmap-layer-uniforms.d.ts.map +1 -0
- package/dist/heatmap-layer/heatmap-layer-uniforms.js +33 -0
- package/dist/heatmap-layer/heatmap-layer-uniforms.js.map +1 -0
- package/dist/heatmap-layer/heatmap-layer-utils.d.ts +1 -1
- package/dist/heatmap-layer/heatmap-layer-utils.d.ts.map +1 -1
- package/dist/heatmap-layer/heatmap-layer-utils.js +4 -0
- package/dist/heatmap-layer/heatmap-layer-utils.js.map +1 -0
- package/dist/heatmap-layer/heatmap-layer.d.ts +6 -4
- package/dist/heatmap-layer/heatmap-layer.d.ts.map +1 -1
- package/dist/heatmap-layer/heatmap-layer.js +44 -33
- package/dist/heatmap-layer/heatmap-layer.js.map +1 -0
- package/dist/heatmap-layer/max-fs.glsl.d.ts.map +1 -1
- package/dist/heatmap-layer/max-fs.glsl.js +4 -0
- package/dist/heatmap-layer/max-fs.glsl.js.map +1 -0
- package/dist/heatmap-layer/max-vs.glsl.d.ts +1 -1
- package/dist/heatmap-layer/max-vs.glsl.d.ts.map +1 -1
- package/dist/heatmap-layer/max-vs.glsl.js +7 -4
- package/dist/heatmap-layer/max-vs.glsl.js.map +1 -0
- package/dist/heatmap-layer/triangle-layer-fragment.glsl.d.ts +1 -1
- package/dist/heatmap-layer/triangle-layer-fragment.glsl.d.ts.map +1 -1
- package/dist/heatmap-layer/triangle-layer-fragment.glsl.js +6 -23
- package/dist/heatmap-layer/triangle-layer-fragment.glsl.js.map +1 -0
- package/dist/heatmap-layer/triangle-layer-uniforms.d.ts +22 -0
- package/dist/heatmap-layer/triangle-layer-uniforms.d.ts.map +1 -0
- package/dist/heatmap-layer/triangle-layer-uniforms.js +23 -0
- package/dist/heatmap-layer/triangle-layer-uniforms.js.map +1 -0
- package/dist/heatmap-layer/triangle-layer-vertex.glsl.d.ts +1 -1
- package/dist/heatmap-layer/triangle-layer-vertex.glsl.d.ts.map +1 -1
- package/dist/heatmap-layer/triangle-layer-vertex.glsl.js +11 -30
- package/dist/heatmap-layer/triangle-layer-vertex.glsl.js.map +1 -0
- package/dist/heatmap-layer/triangle-layer.d.ts +4 -10
- package/dist/heatmap-layer/triangle-layer.d.ts.map +1 -1
- package/dist/heatmap-layer/triangle-layer.js +18 -30
- package/dist/heatmap-layer/triangle-layer.js.map +1 -0
- package/dist/heatmap-layer/weights-fs.glsl.d.ts.map +1 -1
- package/dist/heatmap-layer/weights-fs.glsl.js +4 -0
- package/dist/heatmap-layer/weights-fs.glsl.js.map +1 -0
- package/dist/heatmap-layer/weights-vs.glsl.d.ts +1 -1
- package/dist/heatmap-layer/weights-vs.glsl.d.ts.map +1 -1
- package/dist/heatmap-layer/weights-vs.glsl.js +7 -7
- package/dist/heatmap-layer/weights-vs.glsl.js.map +1 -0
- package/dist/hexagon-layer/bin-options-uniforms.d.ts +14 -0
- package/dist/hexagon-layer/bin-options-uniforms.d.ts.map +1 -0
- package/dist/hexagon-layer/bin-options-uniforms.js +18 -0
- package/dist/hexagon-layer/bin-options-uniforms.js.map +1 -0
- package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.d.ts +3 -0
- package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.d.ts.map +1 -0
- package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.js +56 -0
- package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.js.map +1 -0
- package/dist/hexagon-layer/hexagon-cell-layer.d.ts +29 -0
- package/dist/hexagon-layer/hexagon-cell-layer.d.ts.map +1 -0
- package/dist/hexagon-layer/hexagon-cell-layer.js +95 -0
- package/dist/hexagon-layer/hexagon-cell-layer.js.map +1 -0
- package/dist/hexagon-layer/hexagon-layer-uniforms.d.ts +19 -0
- package/dist/hexagon-layer/hexagon-layer-uniforms.d.ts.map +1 -0
- package/dist/hexagon-layer/hexagon-layer-uniforms.js +22 -0
- package/dist/hexagon-layer/hexagon-layer-uniforms.js.map +1 -0
- package/dist/hexagon-layer/hexagon-layer.d.ts +84 -54
- package/dist/hexagon-layer/hexagon-layer.d.ts.map +1 -1
- package/dist/hexagon-layer/hexagon-layer.js +308 -123
- package/dist/hexagon-layer/hexagon-layer.js.map +1 -0
- package/dist/hexagon-layer/hexbin.d.ts +17 -0
- package/dist/hexagon-layer/hexbin.d.ts.map +1 -0
- package/dist/hexagon-layer/hexbin.js +70 -0
- package/dist/hexagon-layer/hexbin.js.map +1 -0
- package/dist/index.cjs +3026 -2947
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +7 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -27
- package/dist/index.js.map +1 -0
- package/dist/screen-grid-layer/bin-options-uniforms.d.ts +11 -0
- package/dist/screen-grid-layer/bin-options-uniforms.d.ts.map +1 -0
- package/dist/screen-grid-layer/bin-options-uniforms.js +16 -0
- package/dist/screen-grid-layer/bin-options-uniforms.js.map +1 -0
- package/dist/screen-grid-layer/screen-grid-cell-layer.d.ts +11 -16
- package/dist/screen-grid-layer/screen-grid-cell-layer.d.ts.map +1 -1
- package/dist/screen-grid-layer/screen-grid-cell-layer.js +53 -134
- package/dist/screen-grid-layer/screen-grid-cell-layer.js.map +1 -0
- package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts +1 -1
- package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts.map +1 -1
- package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.js +5 -24
- package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.js.map +1 -0
- package/dist/screen-grid-layer/screen-grid-layer-uniforms.d.ts +17 -0
- package/dist/screen-grid-layer/screen-grid-layer-uniforms.d.ts.map +1 -0
- package/dist/screen-grid-layer/screen-grid-layer-uniforms.js +20 -0
- package/dist/screen-grid-layer/screen-grid-layer-uniforms.js.map +1 -0
- package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts +1 -1
- package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts.map +1 -1
- package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.js +22 -62
- package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.js.map +1 -0
- package/dist/screen-grid-layer/screen-grid-layer.d.ts +33 -40
- package/dist/screen-grid-layer/screen-grid-layer.d.ts.map +1 -1
- package/dist/screen-grid-layer/screen-grid-layer.js +158 -174
- package/dist/screen-grid-layer/screen-grid-layer.js.map +1 -0
- package/dist.min.js +401 -382
- package/package.json +10 -9
- package/src/common/aggregation-layer.ts +107 -0
- package/src/common/aggregator/aggregator.ts +88 -0
- package/src/common/aggregator/cpu-aggregator/aggregate.ts +101 -0
- package/src/common/aggregator/cpu-aggregator/cpu-aggregator.ts +203 -0
- package/src/common/aggregator/cpu-aggregator/sort-bins.ts +63 -0
- package/src/common/aggregator/cpu-aggregator/vertex-accessor.ts +86 -0
- package/src/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.ts +33 -0
- package/src/common/aggregator/gpu-aggregator/bin-sorter-uniforms.ts +27 -0
- package/src/common/aggregator/gpu-aggregator/utils.ts +27 -0
- package/src/common/aggregator/gpu-aggregator/webgl-aggregation-transform.ts +247 -0
- package/src/common/aggregator/gpu-aggregator/webgl-aggregator.ts +274 -0
- package/src/common/aggregator/gpu-aggregator/webgl-bin-sorter.ts +258 -0
- package/src/common/aggregator/index.ts +10 -0
- package/src/{types.ts → common/types.ts} +10 -4
- package/src/common/utils/bounds-utils.ts +34 -0
- package/src/common/utils/color-utils.ts +86 -0
- package/src/common/utils/prop-utils.ts +13 -0
- package/src/common/utils/scale-utils.ts +236 -0
- package/src/contour-layer/bin-options-uniforms.ts +26 -0
- package/src/contour-layer/contour-layer.ts +300 -265
- package/src/contour-layer/contour-utils.ts +68 -39
- package/src/contour-layer/marching-squares-codes.ts +4 -0
- package/src/contour-layer/marching-squares.ts +93 -82
- package/src/contour-layer/value-reader.ts +65 -0
- package/src/grid-layer/bin-options-uniforms.ts +26 -0
- package/src/grid-layer/grid-cell-layer-vertex.glsl.ts +68 -0
- package/src/grid-layer/grid-cell-layer.ts +141 -0
- package/src/grid-layer/grid-layer-uniforms.ts +37 -0
- package/src/grid-layer/grid-layer.ts +614 -73
- package/src/{aggregation-layer.ts → heatmap-layer/aggregation-layer.ts} +6 -21
- package/src/heatmap-layer/heatmap-layer-uniforms.ts +50 -0
- package/src/heatmap-layer/heatmap-layer-utils.ts +9 -1
- package/src/heatmap-layer/heatmap-layer.ts +59 -36
- package/src/heatmap-layer/max-fs.glsl.ts +4 -0
- package/src/heatmap-layer/max-vs.glsl.ts +7 -4
- package/src/heatmap-layer/triangle-layer-fragment.glsl.ts +5 -23
- package/src/heatmap-layer/triangle-layer-uniforms.ts +37 -0
- package/src/heatmap-layer/triangle-layer-vertex.glsl.ts +10 -30
- package/src/heatmap-layer/triangle-layer.ts +26 -31
- package/src/heatmap-layer/weights-fs.glsl.ts +4 -0
- package/src/heatmap-layer/weights-vs.glsl.ts +7 -7
- package/src/hexagon-layer/bin-options-uniforms.ts +27 -0
- package/src/hexagon-layer/hexagon-cell-layer-vertex.glsl.ts +73 -0
- package/src/hexagon-layer/hexagon-cell-layer.ts +141 -0
- package/src/hexagon-layer/hexagon-layer-uniforms.ts +34 -0
- package/src/hexagon-layer/hexagon-layer.ts +454 -186
- package/src/hexagon-layer/hexbin.ts +79 -0
- package/src/index.ts +21 -34
- package/src/screen-grid-layer/bin-options-uniforms.ts +23 -0
- package/src/screen-grid-layer/screen-grid-cell-layer.ts +71 -156
- package/src/screen-grid-layer/screen-grid-layer-fragment.glsl.ts +4 -24
- package/src/screen-grid-layer/screen-grid-layer-uniforms.ts +31 -0
- package/src/screen-grid-layer/screen-grid-layer-vertex.glsl.ts +21 -64
- package/src/screen-grid-layer/screen-grid-layer.ts +194 -222
- package/dist/aggregation-layer.d.ts.map +0 -1
- package/dist/cpu-grid-layer/cpu-grid-layer.d.ts +0 -158
- package/dist/cpu-grid-layer/cpu-grid-layer.d.ts.map +0 -1
- package/dist/cpu-grid-layer/cpu-grid-layer.js +0 -130
- package/dist/cpu-grid-layer/grid-aggregator.d.ts +0 -35
- package/dist/cpu-grid-layer/grid-aggregator.d.ts.map +0 -1
- package/dist/cpu-grid-layer/grid-aggregator.js +0 -141
- package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts +0 -3
- package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts.map +0 -1
- package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +0 -30
- package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts +0 -3
- package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts.map +0 -1
- package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +0 -112
- package/dist/gpu-grid-layer/gpu-grid-cell-layer.d.ts +0 -48
- package/dist/gpu-grid-layer/gpu-grid-cell-layer.d.ts.map +0 -1
- package/dist/gpu-grid-layer/gpu-grid-cell-layer.js +0 -146
- package/dist/gpu-grid-layer/gpu-grid-layer.d.ts +0 -99
- package/dist/gpu-grid-layer/gpu-grid-layer.d.ts.map +0 -1
- package/dist/gpu-grid-layer/gpu-grid-layer.js +0 -289
- package/dist/grid-aggregation-layer.d.ts +0 -67
- package/dist/grid-aggregation-layer.d.ts.map +0 -1
- package/dist/grid-aggregation-layer.js +0 -173
- package/dist/hexagon-layer/hexagon-aggregator.d.ts +0 -27
- package/dist/hexagon-layer/hexagon-aggregator.d.ts.map +0 -1
- package/dist/hexagon-layer/hexagon-aggregator.js +0 -112
- package/dist/types.d.ts +0 -12
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- package/dist/utils/aggregation-operation-utils.d.ts +0 -19
- package/dist/utils/aggregation-operation-utils.d.ts.map +0 -1
- package/dist/utils/aggregation-operation-utils.js +0 -94
- package/dist/utils/bin-sorter.d.ts +0 -52
- package/dist/utils/bin-sorter.d.ts.map +0 -1
- package/dist/utils/bin-sorter.js +0 -167
- package/dist/utils/color-utils.d.ts +0 -3
- package/dist/utils/color-utils.d.ts.map +0 -1
- package/dist/utils/color-utils.js +0 -53
- package/dist/utils/cpu-aggregator.d.ts +0 -169
- package/dist/utils/cpu-aggregator.d.ts.map +0 -1
- package/dist/utils/cpu-aggregator.js +0 -421
- package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts +0 -3
- package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +0 -36
- package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts +0 -3
- package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +0 -42
- package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts +0 -3
- package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +0 -30
- package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts +0 -3
- package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js +0 -61
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts +0 -38
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +0 -41
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts +0 -1
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +0 -1
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts +0 -76
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +0 -555
- package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts +0 -3
- package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts.map +0 -1
- package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +0 -32
- package/dist/utils/grid-aggregation-utils.d.ts +0 -30
- package/dist/utils/grid-aggregation-utils.d.ts.map +0 -1
- package/dist/utils/grid-aggregation-utils.js +0 -114
- package/dist/utils/prop-utils.d.ts.map +0 -1
- package/dist/utils/prop-utils.js +0 -28
- package/dist/utils/resource-utils.d.ts +0 -14
- package/dist/utils/resource-utils.d.ts.map +0 -1
- package/dist/utils/resource-utils.js +0 -38
- package/dist/utils/scale-utils.d.ts +0 -15
- package/dist/utils/scale-utils.d.ts.map +0 -1
- package/dist/utils/scale-utils.js +0 -184
- package/src/cpu-grid-layer/cpu-grid-layer.ts +0 -329
- package/src/cpu-grid-layer/grid-aggregator.ts +0 -184
- package/src/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.ts +0 -35
- package/src/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.ts +0 -143
- package/src/gpu-grid-layer/gpu-grid-cell-layer.ts +0 -201
- package/src/gpu-grid-layer/gpu-grid-layer.ts +0 -455
- package/src/grid-aggregation-layer.ts +0 -243
- package/src/hexagon-layer/hexagon-aggregator.ts +0 -127
- package/src/utils/aggregation-operation-utils.ts +0 -118
- package/src/utils/bin-sorter.ts +0 -218
- package/src/utils/color-utils.ts +0 -57
- package/src/utils/cpu-aggregator.ts +0 -503
- package/src/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.ts +0 -40
- package/src/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.ts +0 -54
- package/src/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.ts +0 -35
- package/src/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.ts +0 -79
- package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.ts +0 -46
- package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.ts +0 -0
- package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.md +0 -155
- package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.ts +0 -690
- package/src/utils/gpu-grid-aggregation/transform-mean-vs.glsl.ts +0 -38
- package/src/utils/grid-aggregation-utils.ts +0 -147
- package/src/utils/prop-utils.ts +0 -29
- package/src/utils/resource-utils.ts +0 -53
- package/src/utils/scale-utils.js +0 -219
- /package/dist/{utils → common/utils}/prop-utils.d.ts +0 -0
|
@@ -1,64 +1,361 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { log, createIterable, project32, Viewport } from '@deck.gl/core';
|
|
5
|
+
import { WebGLAggregator, CPUAggregator } from "../common/aggregator/index.js";
|
|
6
|
+
import AggregationLayer from "../common/aggregation-layer.js";
|
|
7
|
+
import { defaultColorRange } from "../common/utils/color-utils.js";
|
|
8
|
+
import { AttributeWithScale } from "../common/utils/scale-utils.js";
|
|
9
|
+
import { getBinIdRange } from "../common/utils/bounds-utils.js";
|
|
10
|
+
import { GridCellLayer } from "./grid-cell-layer.js";
|
|
11
|
+
import { binOptionsUniforms } from "./bin-options-uniforms.js";
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
13
|
+
function noop() { }
|
|
5
14
|
const defaultProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
gpuAggregation: true,
|
|
16
|
+
// color
|
|
17
|
+
colorDomain: null,
|
|
18
|
+
colorRange: defaultColorRange,
|
|
19
|
+
getColorValue: { type: 'accessor', value: null }, // default value is calculated from `getColorWeight` and `colorAggregation`
|
|
20
|
+
getColorWeight: { type: 'accessor', value: 1 },
|
|
21
|
+
colorAggregation: 'SUM',
|
|
22
|
+
lowerPercentile: { type: 'number', min: 0, max: 100, value: 0 },
|
|
23
|
+
upperPercentile: { type: 'number', min: 0, max: 100, value: 100 },
|
|
24
|
+
colorScaleType: 'quantize',
|
|
25
|
+
onSetColorDomain: noop,
|
|
26
|
+
// elevation
|
|
27
|
+
elevationDomain: null,
|
|
28
|
+
elevationRange: [0, 1000],
|
|
29
|
+
getElevationValue: { type: 'accessor', value: null }, // default value is calculated from `getElevationWeight` and `elevationAggregation`
|
|
30
|
+
getElevationWeight: { type: 'accessor', value: 1 },
|
|
31
|
+
elevationAggregation: 'SUM',
|
|
32
|
+
elevationScale: { type: 'number', min: 0, value: 1 },
|
|
33
|
+
elevationLowerPercentile: { type: 'number', min: 0, max: 100, value: 0 },
|
|
34
|
+
elevationUpperPercentile: { type: 'number', min: 0, max: 100, value: 100 },
|
|
35
|
+
elevationScaleType: 'linear',
|
|
36
|
+
onSetElevationDomain: noop,
|
|
37
|
+
// grid
|
|
38
|
+
cellSize: { type: 'number', min: 0, value: 1000 },
|
|
39
|
+
coverage: { type: 'number', min: 0, max: 1, value: 1 },
|
|
40
|
+
getPosition: { type: 'accessor', value: (x) => x.position },
|
|
41
|
+
gridAggregator: { type: 'function', optional: true, value: null },
|
|
42
|
+
extruded: false,
|
|
43
|
+
// Optional material for 'lighting' shader module
|
|
44
|
+
material: true
|
|
9
45
|
};
|
|
10
46
|
/** Aggregate data into a grid-based heatmap. The color and height of a cell are determined based on the objects it contains. */
|
|
11
|
-
class GridLayer extends
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
47
|
+
class GridLayer extends AggregationLayer {
|
|
48
|
+
getAggregatorType() {
|
|
49
|
+
const { gpuAggregation, gridAggregator, getColorValue, getElevationValue } = this.props;
|
|
50
|
+
if (gpuAggregation && (gridAggregator || getColorValue || getElevationValue)) {
|
|
51
|
+
// If these features are desired by the app, the user should explicitly use CPU aggregation
|
|
52
|
+
log.warn('Features not supported by GPU aggregation, falling back to CPU')();
|
|
53
|
+
return 'cpu';
|
|
54
|
+
}
|
|
55
|
+
if (
|
|
56
|
+
// GPU aggregation is requested
|
|
57
|
+
gpuAggregation &&
|
|
58
|
+
// GPU aggregation is supported by the device
|
|
59
|
+
WebGLAggregator.isSupported(this.context.device)) {
|
|
60
|
+
return 'gpu';
|
|
61
|
+
}
|
|
62
|
+
return 'cpu';
|
|
16
63
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
64
|
+
createAggregator(type) {
|
|
65
|
+
if (type === 'cpu') {
|
|
66
|
+
const { gridAggregator, cellSize } = this.props;
|
|
67
|
+
return new CPUAggregator({
|
|
68
|
+
dimensions: 2,
|
|
69
|
+
getBin: {
|
|
70
|
+
sources: ['positions'],
|
|
71
|
+
getValue: ({ positions }, index, opts) => {
|
|
72
|
+
if (gridAggregator) {
|
|
73
|
+
return gridAggregator(positions, cellSize);
|
|
74
|
+
}
|
|
75
|
+
const viewport = this.state.aggregatorViewport;
|
|
76
|
+
// project to common space
|
|
77
|
+
const p = viewport.projectPosition(positions);
|
|
78
|
+
const { cellSizeCommon, cellOriginCommon } = opts;
|
|
79
|
+
return [
|
|
80
|
+
Math.floor((p[0] - cellOriginCommon[0]) / cellSizeCommon[0]),
|
|
81
|
+
Math.floor((p[1] - cellOriginCommon[1]) / cellSizeCommon[1])
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
getValue: [
|
|
86
|
+
{ sources: ['colorWeights'], getValue: ({ colorWeights }) => colorWeights },
|
|
87
|
+
{ sources: ['elevationWeights'], getValue: ({ elevationWeights }) => elevationWeights }
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return new WebGLAggregator(this.context.device, {
|
|
92
|
+
dimensions: 2,
|
|
93
|
+
channelCount: 2,
|
|
94
|
+
bufferLayout: this.getAttributeManager().getBufferLayouts({ isInstanced: false }),
|
|
95
|
+
...super.getShaders({
|
|
96
|
+
modules: [project32, binOptionsUniforms],
|
|
97
|
+
vs: /* glsl */ `
|
|
98
|
+
in vec3 positions;
|
|
99
|
+
in vec3 positions64Low;
|
|
100
|
+
in float colorWeights;
|
|
101
|
+
in float elevationWeights;
|
|
102
|
+
|
|
103
|
+
void getBin(out ivec2 binId) {
|
|
104
|
+
vec3 positionCommon = project_position(positions, positions64Low);
|
|
105
|
+
vec2 gridCoords = floor(positionCommon.xy / binOptions.cellSizeCommon);
|
|
106
|
+
binId = ivec2(gridCoords);
|
|
107
|
+
}
|
|
108
|
+
void getValue(out vec2 value) {
|
|
109
|
+
value = vec2(colorWeights, elevationWeights);
|
|
110
|
+
}
|
|
111
|
+
`
|
|
112
|
+
})
|
|
22
113
|
});
|
|
23
114
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
115
|
+
initializeState() {
|
|
116
|
+
super.initializeState();
|
|
117
|
+
const attributeManager = this.getAttributeManager();
|
|
118
|
+
attributeManager.add({
|
|
119
|
+
positions: {
|
|
120
|
+
size: 3,
|
|
121
|
+
accessor: 'getPosition',
|
|
122
|
+
type: 'float64',
|
|
123
|
+
fp64: this.use64bitPositions()
|
|
124
|
+
},
|
|
125
|
+
colorWeights: { size: 1, accessor: 'getColorWeight' },
|
|
126
|
+
elevationWeights: { size: 1, accessor: 'getElevationWeight' }
|
|
35
127
|
});
|
|
36
128
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
129
|
+
updateState(params) {
|
|
130
|
+
const aggregatorChanged = super.updateState(params);
|
|
131
|
+
const { props, oldProps, changeFlags } = params;
|
|
132
|
+
const { aggregator } = this.state;
|
|
133
|
+
if ((changeFlags.dataChanged || !this.state.dataAsArray) &&
|
|
134
|
+
(props.getColorValue || props.getElevationValue)) {
|
|
135
|
+
// Convert data to array
|
|
136
|
+
this.state.dataAsArray = Array.from(createIterable(props.data).iterable);
|
|
137
|
+
}
|
|
138
|
+
if (aggregatorChanged ||
|
|
139
|
+
changeFlags.dataChanged ||
|
|
140
|
+
props.cellSize !== oldProps.cellSize ||
|
|
141
|
+
props.getColorValue !== oldProps.getColorValue ||
|
|
142
|
+
props.getElevationValue !== oldProps.getElevationValue ||
|
|
143
|
+
props.colorAggregation !== oldProps.colorAggregation ||
|
|
144
|
+
props.elevationAggregation !== oldProps.elevationAggregation) {
|
|
145
|
+
this._updateBinOptions();
|
|
146
|
+
const { cellSizeCommon, cellOriginCommon, binIdRange, dataAsArray } = this.state;
|
|
147
|
+
aggregator.setProps({
|
|
148
|
+
// @ts-expect-error only used by GPUAggregator
|
|
149
|
+
binIdRange,
|
|
150
|
+
pointCount: this.getNumInstances(),
|
|
151
|
+
operations: [props.colorAggregation, props.elevationAggregation],
|
|
152
|
+
binOptions: {
|
|
153
|
+
cellSizeCommon,
|
|
154
|
+
cellOriginCommon
|
|
155
|
+
},
|
|
156
|
+
onUpdate: this._onAggregationUpdate.bind(this)
|
|
157
|
+
});
|
|
158
|
+
if (dataAsArray) {
|
|
159
|
+
const { getColorValue, getElevationValue } = this.props;
|
|
160
|
+
aggregator.setProps({
|
|
161
|
+
// @ts-expect-error only used by CPUAggregator
|
|
162
|
+
customOperations: [
|
|
163
|
+
getColorValue &&
|
|
164
|
+
((indices) => getColorValue(indices.map(i => dataAsArray[i]), { indices, data: props.data })),
|
|
165
|
+
getElevationValue &&
|
|
166
|
+
((indices) => getElevationValue(indices.map(i => dataAsArray[i]), { indices, data: props.data }))
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (changeFlags.updateTriggersChanged && changeFlags.updateTriggersChanged.getColorValue) {
|
|
172
|
+
aggregator.setNeedsUpdate(0);
|
|
173
|
+
}
|
|
174
|
+
if (changeFlags.updateTriggersChanged && changeFlags.updateTriggersChanged.getElevationValue) {
|
|
175
|
+
aggregator.setNeedsUpdate(1);
|
|
176
|
+
}
|
|
177
|
+
return aggregatorChanged;
|
|
178
|
+
}
|
|
179
|
+
_updateBinOptions() {
|
|
180
|
+
const bounds = this.getBounds();
|
|
181
|
+
const cellSizeCommon = [1, 1];
|
|
182
|
+
let cellOriginCommon = [0, 0];
|
|
183
|
+
let binIdRange = [
|
|
184
|
+
[0, 1],
|
|
185
|
+
[0, 1]
|
|
186
|
+
];
|
|
187
|
+
let viewport = this.context.viewport;
|
|
188
|
+
if (bounds && Number.isFinite(bounds[0][0])) {
|
|
189
|
+
let centroid = [(bounds[0][0] + bounds[1][0]) / 2, (bounds[0][1] + bounds[1][1]) / 2];
|
|
190
|
+
const { cellSize } = this.props;
|
|
191
|
+
const { unitsPerMeter } = viewport.getDistanceScales(centroid);
|
|
192
|
+
cellSizeCommon[0] = unitsPerMeter[0] * cellSize;
|
|
193
|
+
cellSizeCommon[1] = unitsPerMeter[1] * cellSize;
|
|
194
|
+
// Offset common space to center at the origin of the grid cell where the data center is in
|
|
195
|
+
// This improves precision without affecting the cell positions
|
|
196
|
+
const centroidCommon = viewport.projectFlat(centroid);
|
|
197
|
+
cellOriginCommon = [
|
|
198
|
+
Math.floor(centroidCommon[0] / cellSizeCommon[0]) * cellSizeCommon[0],
|
|
199
|
+
Math.floor(centroidCommon[1] / cellSizeCommon[1]) * cellSizeCommon[1]
|
|
200
|
+
];
|
|
201
|
+
centroid = viewport.unprojectFlat(cellOriginCommon);
|
|
202
|
+
const ViewportType = viewport.constructor;
|
|
203
|
+
// We construct a viewport for the GPU aggregator's project module
|
|
204
|
+
// This viewport is determined by data
|
|
205
|
+
// removes arbitrary precision variance that depends on initial view state
|
|
206
|
+
viewport = viewport.isGeospatial
|
|
207
|
+
? new ViewportType({ longitude: centroid[0], latitude: centroid[1], zoom: 12 })
|
|
208
|
+
: new Viewport({ position: [centroid[0], centroid[1], 0], zoom: 12 });
|
|
209
|
+
// Round to the nearest 32-bit float to match CPU and GPU results
|
|
210
|
+
cellOriginCommon = [Math.fround(viewport.center[0]), Math.fround(viewport.center[1])];
|
|
211
|
+
binIdRange = getBinIdRange({
|
|
212
|
+
dataBounds: bounds,
|
|
213
|
+
getBinId: (p) => {
|
|
214
|
+
const positionCommon = viewport.projectFlat(p);
|
|
215
|
+
return [
|
|
216
|
+
Math.floor((positionCommon[0] - cellOriginCommon[0]) / cellSizeCommon[0]),
|
|
217
|
+
Math.floor((positionCommon[1] - cellOriginCommon[1]) / cellSizeCommon[1])
|
|
218
|
+
];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
43
221
|
}
|
|
44
|
-
|
|
45
|
-
|
|
222
|
+
this.setState({ cellSizeCommon, cellOriginCommon, binIdRange, aggregatorViewport: viewport });
|
|
223
|
+
}
|
|
224
|
+
draw(opts) {
|
|
225
|
+
// Replaces render time viewport with our own
|
|
226
|
+
if (opts.shaderModuleProps.project) {
|
|
227
|
+
opts.shaderModuleProps.project.viewport = this.state.aggregatorViewport;
|
|
228
|
+
}
|
|
229
|
+
super.draw(opts);
|
|
230
|
+
}
|
|
231
|
+
_onAggregationUpdate({ channel }) {
|
|
232
|
+
const props = this.getCurrentLayer().props;
|
|
233
|
+
const { aggregator } = this.state;
|
|
234
|
+
if (channel === 0) {
|
|
235
|
+
const result = aggregator.getResult(0);
|
|
236
|
+
this.setState({
|
|
237
|
+
colors: new AttributeWithScale(result, aggregator.binCount)
|
|
238
|
+
});
|
|
239
|
+
props.onSetColorDomain(aggregator.getResultDomain(0));
|
|
46
240
|
}
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
241
|
+
else if (channel === 1) {
|
|
242
|
+
const result = aggregator.getResult(1);
|
|
243
|
+
this.setState({
|
|
244
|
+
elevations: new AttributeWithScale(result, aggregator.binCount)
|
|
245
|
+
});
|
|
246
|
+
props.onSetElevationDomain(aggregator.getResultDomain(1));
|
|
50
247
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
248
|
+
}
|
|
249
|
+
onAttributeChange(id) {
|
|
250
|
+
const { aggregator } = this.state;
|
|
251
|
+
switch (id) {
|
|
252
|
+
case 'positions':
|
|
253
|
+
aggregator.setNeedsUpdate();
|
|
254
|
+
this._updateBinOptions();
|
|
255
|
+
const { cellSizeCommon, cellOriginCommon, binIdRange } = this.state;
|
|
256
|
+
aggregator.setProps({
|
|
257
|
+
// @ts-expect-error only used by GPUAggregator
|
|
258
|
+
binIdRange,
|
|
259
|
+
binOptions: {
|
|
260
|
+
cellSizeCommon,
|
|
261
|
+
cellOriginCommon
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
break;
|
|
265
|
+
case 'colorWeights':
|
|
266
|
+
aggregator.setNeedsUpdate(0);
|
|
267
|
+
break;
|
|
268
|
+
case 'elevationWeights':
|
|
269
|
+
aggregator.setNeedsUpdate(1);
|
|
270
|
+
break;
|
|
271
|
+
default:
|
|
272
|
+
// This should not happen
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
renderLayers() {
|
|
276
|
+
const { aggregator, cellOriginCommon, cellSizeCommon } = this.state;
|
|
277
|
+
const { elevationScale, colorRange, elevationRange, extruded, coverage, material, transitions, colorScaleType, lowerPercentile, upperPercentile, colorDomain, elevationScaleType, elevationLowerPercentile, elevationUpperPercentile, elevationDomain } = this.props;
|
|
278
|
+
const CellLayerClass = this.getSubLayerClass('cells', GridCellLayer);
|
|
279
|
+
const binAttribute = aggregator.getBins();
|
|
280
|
+
const colors = this.state.colors?.update({
|
|
281
|
+
scaleType: colorScaleType,
|
|
282
|
+
lowerPercentile,
|
|
283
|
+
upperPercentile
|
|
284
|
+
});
|
|
285
|
+
const elevations = this.state.elevations?.update({
|
|
286
|
+
scaleType: elevationScaleType,
|
|
287
|
+
lowerPercentile: elevationLowerPercentile,
|
|
288
|
+
upperPercentile: elevationUpperPercentile
|
|
289
|
+
});
|
|
290
|
+
if (!colors || !elevations) {
|
|
291
|
+
return null;
|
|
54
292
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
293
|
+
return new CellLayerClass(this.getSubLayerProps({
|
|
294
|
+
id: 'cells'
|
|
295
|
+
}), {
|
|
296
|
+
data: {
|
|
297
|
+
length: aggregator.binCount,
|
|
298
|
+
attributes: {
|
|
299
|
+
getBin: binAttribute,
|
|
300
|
+
getColorValue: colors.attribute,
|
|
301
|
+
getElevationValue: elevations.attribute
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
// Data has changed shallowly, but we likely don't need to update the attributes
|
|
305
|
+
dataComparator: (data, oldData) => data.length === oldData.length,
|
|
306
|
+
updateTriggers: {
|
|
307
|
+
getBin: [binAttribute],
|
|
308
|
+
getColorValue: [colors.attribute],
|
|
309
|
+
getElevationValue: [elevations.attribute]
|
|
310
|
+
},
|
|
311
|
+
cellOriginCommon,
|
|
312
|
+
cellSizeCommon,
|
|
313
|
+
elevationScale,
|
|
314
|
+
colorRange,
|
|
315
|
+
colorScaleType,
|
|
316
|
+
elevationRange,
|
|
317
|
+
extruded,
|
|
318
|
+
coverage,
|
|
319
|
+
material,
|
|
320
|
+
colorDomain: colors.domain || colorDomain || aggregator.getResultDomain(0),
|
|
321
|
+
elevationDomain: elevations.domain || elevationDomain || aggregator.getResultDomain(1),
|
|
322
|
+
colorCutoff: colors.cutoff,
|
|
323
|
+
elevationCutoff: elevations.cutoff,
|
|
324
|
+
transitions: transitions && {
|
|
325
|
+
getFillColor: transitions.getColorValue || transitions.getColorWeight,
|
|
326
|
+
getElevation: transitions.getElevationValue || transitions.getElevationWeight
|
|
327
|
+
},
|
|
328
|
+
// Extensions are already handled by the GPUAggregator, do not pass it down
|
|
329
|
+
extensions: []
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
getPickingInfo(params) {
|
|
333
|
+
const info = params.info;
|
|
334
|
+
const { index } = info;
|
|
335
|
+
if (index >= 0) {
|
|
336
|
+
const bin = this.state.aggregator.getBin(index);
|
|
337
|
+
let object;
|
|
338
|
+
if (bin) {
|
|
339
|
+
object = {
|
|
340
|
+
col: bin.id[0],
|
|
341
|
+
row: bin.id[1],
|
|
342
|
+
colorValue: bin.value[0],
|
|
343
|
+
elevationValue: bin.value[1],
|
|
344
|
+
count: bin.count
|
|
345
|
+
};
|
|
346
|
+
if (bin.pointIndices) {
|
|
347
|
+
object.pointIndices = bin.pointIndices;
|
|
348
|
+
object.points = Array.isArray(this.props.data)
|
|
349
|
+
? bin.pointIndices.map(i => this.props.data[i])
|
|
350
|
+
: [];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
info.object = object;
|
|
58
354
|
}
|
|
59
|
-
return
|
|
355
|
+
return info;
|
|
60
356
|
}
|
|
61
357
|
}
|
|
62
358
|
GridLayer.layerName = 'GridLayer';
|
|
63
359
|
GridLayer.defaultProps = defaultProps;
|
|
64
360
|
export default GridLayer;
|
|
361
|
+
//# sourceMappingURL=grid-layer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-layer.js","sourceRoot":"","sources":["../../src/grid-layer/grid-layer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EACL,GAAG,EAKH,cAAc,EAGd,SAAS,EAIT,QAAQ,EAGT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAE,aAAa,EAAuB,sCAAmC;AAChG,OAAO,gBAAgB,uCAAoC;AAE3D,OAAO,EAAC,iBAAiB,EAAC,uCAAoC;AAC9D,OAAO,EAAC,kBAAkB,EAAC,uCAAoC;AAC/D,OAAO,EAAC,aAAa,EAAC,wCAAqC;AAE3D,OAAO,EAAC,aAAa,EAAC,6BAA0B;AAChD,OAAO,EAAa,kBAAkB,EAAC,kCAA+B;AAEtE,gEAAgE;AAChE,SAAS,IAAI,KAAI,CAAC;AAElB,MAAM,YAAY,GAAiC;IACjD,cAAc,EAAE,IAAI;IAEpB,QAAQ;IACR,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,iBAAiB;IAC7B,aAAa,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE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AC,CAAC,CAAC;oBACd,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oBACd,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;oBACxB,cAAc,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC5B,KAAK,EAAE,GAAG,CAAC,KAAK;iBACjB,CAAC;gBACF,IAAI,GAAG,CAAC,YAAY,EAAE,CAAC;oBACrB,MAAM,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;oBACvC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;wBAC5C,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAE,IAAI,CAAC,KAAK,CAAC,IAAgB,CAAC,CAAC,CAAC,CAAC;wBAC5D,CAAC,CAAC,EAAE,CAAC;gBACT,CAAC;YACH,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;AA/XM,mBAAS,GAAG,WAAW,CAAC;AACxB,sBAAY,GAAG,YAAY,CAAC;eALhB,SAAS"}
|
|
@@ -2,6 +2,7 @@ import { CompositeLayer, AttributeManager, LayerDataSource, UpdateParameters, Co
|
|
|
2
2
|
export type AggregationLayerProps<DataT> = CompositeLayerProps & {
|
|
3
3
|
data: LayerDataSource<DataT>;
|
|
4
4
|
};
|
|
5
|
+
/** Legacy AggregationLayer, to be removed in v9.1 */
|
|
5
6
|
export default abstract class AggregationLayer<DataT, ExtraPropsT extends {} = {}> extends CompositeLayer<Required<AggregationLayer<DataT>> & ExtraPropsT> {
|
|
6
7
|
static layerName: string;
|
|
7
8
|
state: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregation-layer.d.ts","sourceRoot":"","sources":["../../src/heatmap-layer/aggregation-layer.ts"],"names":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
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
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.
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
20
4
|
import { CompositeLayer, AttributeManager, _compareProps as compareProps } from '@deck.gl/core';
|
|
21
|
-
import { filterProps } from "
|
|
5
|
+
import { filterProps } from "../common/utils/prop-utils.js";
|
|
6
|
+
/** Legacy AggregationLayer, to be removed in v9.1 */
|
|
22
7
|
class AggregationLayer extends CompositeLayer {
|
|
23
8
|
initializeAggregationLayer(dimensions) {
|
|
24
9
|
super.initializeState(this.context);
|
|
@@ -52,7 +37,7 @@ class AggregationLayer extends CompositeLayer {
|
|
|
52
37
|
getModuleSettings() {
|
|
53
38
|
// For regular layer draw this happens during draw cycle (_drawLayersInViewport) not during update cycle
|
|
54
39
|
// For aggregation layers this is called during updateState to update aggregation data
|
|
55
|
-
// NOTE: it is similar to LayerPass.
|
|
40
|
+
// NOTE: it is similar to LayerPass._getShaderModuleProps() but doesn't inlcude `effects` it is not needed for aggregation
|
|
56
41
|
const { viewport, mousePosition, device } = this.context;
|
|
57
42
|
const moduleSettings = Object.assign(Object.create(this.props), {
|
|
58
43
|
viewport,
|
|
@@ -152,3 +137,4 @@ function isObjectEmpty(obj) {
|
|
|
152
137
|
}
|
|
153
138
|
return isEmpty;
|
|
154
139
|
}
|
|
140
|
+
//# sourceMappingURL=aggregation-layer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregation-layer.js","sourceRoot":"","sources":["../../src/heatmap-layer/aggregation-layer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EACL,cAAc,EACd,gBAAgB,EAEhB,aAAa,IAAI,YAAY,EAI9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,WAAW,EAAC,sCAAmC;AAMvD,qDAAqD;AACrD,MAA8B,gBAG5B,SAAQ,cAA+D;IASvE,0BAA0B,CAAC,UAAe;QACxC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEpC,IAAI,CAAC,QAAQ,CAAC;YACZ,kEAAkE;YAClE,WAAW,EAAE,WAAW,CAAE,IAAI,CAAC,WAAmB,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YACrF,UAAU;SACX,CAAC,CAAC;IACL,CAAC;IAED,WAAW,CAAC,IAA4B;QACtC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxB,MAAM,EAAC,WAAW,EAAC,GAAG,IAAI,CAAC;QAC3B,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC;YAClC,MAAM,OAAO,GAAG,IAAI,C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CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,iBAAiB,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IACpE,CAAC;IAED,UAAU;IAEV,8EAA8E;IAC9E,oBAAoB;QAClB,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC/C,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;SAC1B,CAAC,CAAC;IACL,CAAC;;AA3IM,0BAAS,GAAG,kBAAkB,CAAC;eAJV,gBAAgB;AAkJ9C,iBAAiB;AAEjB,0DAA0D;AAC1D,SAAS,aAAa,CAAC,GAAG;IACxB,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,6DAA6D;IAC7D,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,OAAO,GAAG,KAAK,CAAC;QAChB,MAAM;IACR,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Texture } from '@luma.gl/core';
|
|
2
|
+
export type WeightProps = {
|
|
3
|
+
commonBounds: [number, number, number, number];
|
|
4
|
+
radiusPixels: number;
|
|
5
|
+
textureWidth: number;
|
|
6
|
+
weightsScale: number;
|
|
7
|
+
weightsTexture: Texture;
|
|
8
|
+
};
|
|
9
|
+
export declare const weightUniforms: {
|
|
10
|
+
readonly name: "weight";
|
|
11
|
+
readonly vs: "uniform weightUniforms {\n vec4 commonBounds;\n float radiusPixels;\n float textureWidth;\n float weightsScale;\n} weight;\n";
|
|
12
|
+
readonly uniformTypes: {
|
|
13
|
+
readonly commonBounds: "vec4<f32>";
|
|
14
|
+
readonly radiusPixels: "f32";
|
|
15
|
+
readonly textureWidth: "f32";
|
|
16
|
+
readonly weightsScale: "f32";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type MaxWeightProps = {
|
|
20
|
+
inTexture: Texture;
|
|
21
|
+
textureSize: number;
|
|
22
|
+
};
|
|
23
|
+
export declare const maxWeightUniforms: {
|
|
24
|
+
readonly name: "maxWeight";
|
|
25
|
+
readonly vs: "uniform maxWeightUniforms {\n float textureSize;\n} maxWeight;\n";
|
|
26
|
+
readonly uniformTypes: {
|
|
27
|
+
readonly textureSize: "f32";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=heatmap-layer-uniforms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heatmap-layer-uniforms.d.ts","sourceRoot":"","sources":["../../src/heatmap-layer/heatmap-layer-uniforms.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAWtC,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;CASmB,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;CAUmB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
const uniformBlock = `\
|
|
5
|
+
uniform weightUniforms {
|
|
6
|
+
vec4 commonBounds;
|
|
7
|
+
float radiusPixels;
|
|
8
|
+
float textureWidth;
|
|
9
|
+
float weightsScale;
|
|
10
|
+
} weight;
|
|
11
|
+
`;
|
|
12
|
+
export const weightUniforms = {
|
|
13
|
+
name: 'weight',
|
|
14
|
+
vs: uniformBlock,
|
|
15
|
+
uniformTypes: {
|
|
16
|
+
commonBounds: 'vec4<f32>',
|
|
17
|
+
radiusPixels: 'f32',
|
|
18
|
+
textureWidth: 'f32',
|
|
19
|
+
weightsScale: 'f32'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const maxWeightUniforms = {
|
|
23
|
+
name: 'maxWeight',
|
|
24
|
+
vs: `\
|
|
25
|
+
uniform maxWeightUniforms {
|
|
26
|
+
float textureSize;
|
|
27
|
+
} maxWeight;
|
|
28
|
+
`,
|
|
29
|
+
uniformTypes: {
|
|
30
|
+
textureSize: 'f32'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=heatmap-layer-uniforms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heatmap-layer-uniforms.js","sourceRoot":"","sources":["../../src/heatmap-layer/heatmap-layer-uniforms.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAKpC,MAAM,YAAY,GAAG;;;;;;;CAOpB,CAAC;AASF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,QAAQ;IACd,EAAE,EAAE,YAAY;IAChB,YAAY,EAAE;QACZ,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,KAAK;KACpB;CAC2C,CAAC;AAO/C,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE;;;;CAIL;IACC,YAAY,EAAE;QACZ,WAAW,EAAE,KAAK;KACnB;CAC8C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function getBounds(points: number[][]): number[];
|
|
2
2
|
export declare function boundsContain(currentBounds: number[], targetBounds: number[]): boolean;
|
|
3
3
|
export declare function packVertices(points: number[][], dimensions?: number): Float32Array;
|
|
4
|
-
export declare function scaleToAspectRatio(boundingBox: number
|
|
4
|
+
export declare function scaleToAspectRatio(boundingBox: [number, number, number, number], width: number, height: number): [number, number, number, number];
|
|
5
5
|
export declare function getTextureCoordinates(point: number[], bounds: number[]): number[];
|
|
6
6
|
//# sourceMappingURL=heatmap-layer-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heatmap-layer-utils.d.ts","sourceRoot":"","sources":["../../src/heatmap-layer/heatmap-layer-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"heatmap-layer-utils.d.ts","sourceRoot":"","sources":["../../src/heatmap-layer/heatmap-layer-utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,CAWtD;AAGD,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAUtF;AAKD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,GAAE,MAAU,GAAG,YAAY,CAQrF;AAGD,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC7C,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CA6BlC;AAGD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAGtE"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
export function getBounds(points) {
|
|
2
5
|
// Now build bounding box in world space (aligned to world coordiante system)
|
|
3
6
|
const x = points.map(p => p[0]);
|
|
@@ -61,3 +64,4 @@ export function getTextureCoordinates(point, bounds) {
|
|
|
61
64
|
const [xMin, yMin, xMax, yMax] = bounds;
|
|
62
65
|
return [(point[0] - xMin) / (xMax - xMin), (point[1] - yMin) / (yMax - yMin)];
|
|
63
66
|
}
|
|
67
|
+
//# sourceMappingURL=heatmap-layer-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heatmap-layer-utils.js","sourceRoot":"","sources":["../../src/heatmap-layer/heatmap-layer-utils.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,MAAM,UAAU,SAAS,CAAC,MAAkB;IAC1C,6EAA6E;IAC7E,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAErC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,aAAa,CAAC,aAAuB,EAAE,YAAsB;IAC3E,IACE,YAAY,CAAC,CAAC,CAAC,IAAI,a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