@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.
Files changed (372) hide show
  1. package/dist/common/aggregation-layer.d.ts +30 -0
  2. package/dist/common/aggregation-layer.d.ts.map +1 -0
  3. package/dist/common/aggregation-layer.js +70 -0
  4. package/dist/common/aggregation-layer.js.map +1 -0
  5. package/dist/common/aggregator/aggregator.d.ts +76 -0
  6. package/dist/common/aggregator/aggregator.d.ts.map +1 -0
  7. package/dist/common/aggregator/aggregator.js +5 -0
  8. package/dist/common/aggregator/aggregator.js.map +1 -0
  9. package/dist/common/aggregator/cpu-aggregator/aggregate.d.ts +27 -0
  10. package/dist/common/aggregator/cpu-aggregator/aggregate.d.ts.map +1 -0
  11. package/dist/common/aggregator/cpu-aggregator/aggregate.js +67 -0
  12. package/dist/common/aggregator/cpu-aggregator/aggregate.js.map +1 -0
  13. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.d.ts +70 -0
  14. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.d.ts.map +1 -0
  15. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.js +140 -0
  16. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.js.map +1 -0
  17. package/dist/common/aggregator/cpu-aggregator/sort-bins.d.ts +15 -0
  18. package/dist/common/aggregator/cpu-aggregator/sort-bins.d.ts.map +1 -0
  19. package/dist/common/aggregator/cpu-aggregator/sort-bins.js +44 -0
  20. package/dist/common/aggregator/cpu-aggregator/sort-bins.js.map +1 -0
  21. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.d.ts +21 -0
  22. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.d.ts.map +1 -0
  23. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.js +56 -0
  24. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.js.map +1 -0
  25. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.d.ts +18 -0
  26. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.d.ts.map +1 -0
  27. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.js +21 -0
  28. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.js.map +1 -0
  29. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.d.ts +14 -0
  30. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.d.ts.map +1 -0
  31. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.js +18 -0
  32. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.js.map +1 -0
  33. package/dist/common/aggregator/gpu-aggregator/utils.d.ts +6 -0
  34. package/dist/common/aggregator/gpu-aggregator/utils.d.ts.map +1 -0
  35. package/dist/common/aggregator/gpu-aggregator/utils.js +25 -0
  36. package/dist/common/aggregator/gpu-aggregator/utils.js.map +1 -0
  37. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.d.ts +24 -0
  38. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.d.ts.map +1 -0
  39. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.js +216 -0
  40. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.js.map +1 -0
  41. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.d.ts +81 -0
  42. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.d.ts.map +1 -0
  43. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.js +202 -0
  44. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.js.map +1 -0
  45. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.d.ts +38 -0
  46. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.d.ts.map +1 -0
  47. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.js +224 -0
  48. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.js.map +1 -0
  49. package/dist/common/aggregator/index.d.ts +6 -0
  50. package/dist/common/aggregator/index.d.ts.map +1 -0
  51. package/dist/common/aggregator/index.js +6 -0
  52. package/dist/common/aggregator/index.js.map +1 -0
  53. package/dist/common/types.d.ts +11 -0
  54. package/dist/common/types.d.ts.map +1 -0
  55. package/dist/common/types.js +5 -0
  56. package/dist/common/types.js.map +1 -0
  57. package/dist/common/utils/bounds-utils.d.ts +10 -0
  58. package/dist/common/utils/bounds-utils.d.ts.map +1 -0
  59. package/dist/common/utils/bounds-utils.js +21 -0
  60. package/dist/common/utils/bounds-utils.js.map +1 -0
  61. package/dist/common/utils/color-utils.d.ts +10 -0
  62. package/dist/common/utils/color-utils.d.ts.map +1 -0
  63. package/dist/common/utils/color-utils.js +66 -0
  64. package/dist/common/utils/color-utils.js.map +1 -0
  65. package/dist/common/utils/prop-utils.d.ts.map +1 -0
  66. package/dist/common/utils/prop-utils.js +13 -0
  67. package/dist/common/utils/prop-utils.js.map +1 -0
  68. package/dist/common/utils/scale-utils.d.ts +46 -0
  69. package/dist/common/utils/scale-utils.d.ts.map +1 -0
  70. package/dist/common/utils/scale-utils.js +181 -0
  71. package/dist/common/utils/scale-utils.js.map +1 -0
  72. package/dist/contour-layer/bin-options-uniforms.d.ts +13 -0
  73. package/dist/contour-layer/bin-options-uniforms.d.ts.map +1 -0
  74. package/dist/contour-layer/bin-options-uniforms.js +18 -0
  75. package/dist/contour-layer/bin-options-uniforms.js.map +1 -0
  76. package/dist/contour-layer/contour-layer.d.ts +42 -50
  77. package/dist/contour-layer/contour-layer.d.ts.map +1 -1
  78. package/dist/contour-layer/contour-layer.js +233 -192
  79. package/dist/contour-layer/contour-layer.js.map +1 -0
  80. package/dist/contour-layer/contour-utils.d.ts +36 -15
  81. package/dist/contour-layer/contour-utils.d.ts.map +1 -1
  82. package/dist/contour-layer/contour-utils.js +25 -29
  83. package/dist/contour-layer/contour-utils.js.map +1 -0
  84. package/dist/contour-layer/marching-squares-codes.d.ts.map +1 -1
  85. package/dist/contour-layer/marching-squares-codes.js +4 -0
  86. package/dist/contour-layer/marching-squares-codes.js.map +1 -0
  87. package/dist/contour-layer/marching-squares.d.ts +22 -6
  88. package/dist/contour-layer/marching-squares.d.ts.map +1 -1
  89. package/dist/contour-layer/marching-squares.js +72 -68
  90. package/dist/contour-layer/marching-squares.js.map +1 -0
  91. package/dist/contour-layer/value-reader.d.ts +10 -0
  92. package/dist/contour-layer/value-reader.d.ts.map +1 -0
  93. package/dist/contour-layer/value-reader.js +47 -0
  94. package/dist/contour-layer/value-reader.js.map +1 -0
  95. package/dist/dist.dev.js +4844 -4083
  96. package/dist/grid-layer/bin-options-uniforms.d.ts +13 -0
  97. package/dist/grid-layer/bin-options-uniforms.d.ts.map +1 -0
  98. package/dist/grid-layer/bin-options-uniforms.js +18 -0
  99. package/dist/grid-layer/bin-options-uniforms.js.map +1 -0
  100. package/dist/grid-layer/grid-cell-layer-vertex.glsl.d.ts +3 -0
  101. package/dist/grid-layer/grid-cell-layer-vertex.glsl.d.ts.map +1 -0
  102. package/dist/grid-layer/grid-cell-layer-vertex.glsl.js +52 -0
  103. package/dist/grid-layer/grid-cell-layer-vertex.glsl.js.map +1 -0
  104. package/dist/grid-layer/grid-cell-layer.d.ts +32 -0
  105. package/dist/grid-layer/grid-cell-layer.d.ts.map +1 -0
  106. package/dist/grid-layer/grid-cell-layer.js +94 -0
  107. package/dist/grid-layer/grid-cell-layer.js.map +1 -0
  108. package/dist/grid-layer/grid-layer-uniforms.d.ts +21 -0
  109. package/dist/grid-layer/grid-layer-uniforms.d.ts.map +1 -0
  110. package/dist/grid-layer/grid-layer-uniforms.js +24 -0
  111. package/dist/grid-layer/grid-layer-uniforms.js.map +1 -0
  112. package/dist/grid-layer/grid-layer.d.ts +176 -14
  113. package/dist/grid-layer/grid-layer.d.ts.map +1 -1
  114. package/dist/grid-layer/grid-layer.js +343 -46
  115. package/dist/grid-layer/grid-layer.js.map +1 -0
  116. package/dist/{aggregation-layer.d.ts → heatmap-layer/aggregation-layer.d.ts} +1 -0
  117. package/dist/heatmap-layer/aggregation-layer.d.ts.map +1 -0
  118. package/dist/{aggregation-layer.js → heatmap-layer/aggregation-layer.js} +7 -21
  119. package/dist/heatmap-layer/aggregation-layer.js.map +1 -0
  120. package/dist/heatmap-layer/heatmap-layer-uniforms.d.ts +30 -0
  121. package/dist/heatmap-layer/heatmap-layer-uniforms.d.ts.map +1 -0
  122. package/dist/heatmap-layer/heatmap-layer-uniforms.js +33 -0
  123. package/dist/heatmap-layer/heatmap-layer-uniforms.js.map +1 -0
  124. package/dist/heatmap-layer/heatmap-layer-utils.d.ts +1 -1
  125. package/dist/heatmap-layer/heatmap-layer-utils.d.ts.map +1 -1
  126. package/dist/heatmap-layer/heatmap-layer-utils.js +4 -0
  127. package/dist/heatmap-layer/heatmap-layer-utils.js.map +1 -0
  128. package/dist/heatmap-layer/heatmap-layer.d.ts +6 -4
  129. package/dist/heatmap-layer/heatmap-layer.d.ts.map +1 -1
  130. package/dist/heatmap-layer/heatmap-layer.js +44 -33
  131. package/dist/heatmap-layer/heatmap-layer.js.map +1 -0
  132. package/dist/heatmap-layer/max-fs.glsl.d.ts.map +1 -1
  133. package/dist/heatmap-layer/max-fs.glsl.js +4 -0
  134. package/dist/heatmap-layer/max-fs.glsl.js.map +1 -0
  135. package/dist/heatmap-layer/max-vs.glsl.d.ts +1 -1
  136. package/dist/heatmap-layer/max-vs.glsl.d.ts.map +1 -1
  137. package/dist/heatmap-layer/max-vs.glsl.js +7 -4
  138. package/dist/heatmap-layer/max-vs.glsl.js.map +1 -0
  139. package/dist/heatmap-layer/triangle-layer-fragment.glsl.d.ts +1 -1
  140. package/dist/heatmap-layer/triangle-layer-fragment.glsl.d.ts.map +1 -1
  141. package/dist/heatmap-layer/triangle-layer-fragment.glsl.js +6 -23
  142. package/dist/heatmap-layer/triangle-layer-fragment.glsl.js.map +1 -0
  143. package/dist/heatmap-layer/triangle-layer-uniforms.d.ts +22 -0
  144. package/dist/heatmap-layer/triangle-layer-uniforms.d.ts.map +1 -0
  145. package/dist/heatmap-layer/triangle-layer-uniforms.js +23 -0
  146. package/dist/heatmap-layer/triangle-layer-uniforms.js.map +1 -0
  147. package/dist/heatmap-layer/triangle-layer-vertex.glsl.d.ts +1 -1
  148. package/dist/heatmap-layer/triangle-layer-vertex.glsl.d.ts.map +1 -1
  149. package/dist/heatmap-layer/triangle-layer-vertex.glsl.js +11 -30
  150. package/dist/heatmap-layer/triangle-layer-vertex.glsl.js.map +1 -0
  151. package/dist/heatmap-layer/triangle-layer.d.ts +4 -10
  152. package/dist/heatmap-layer/triangle-layer.d.ts.map +1 -1
  153. package/dist/heatmap-layer/triangle-layer.js +18 -30
  154. package/dist/heatmap-layer/triangle-layer.js.map +1 -0
  155. package/dist/heatmap-layer/weights-fs.glsl.d.ts.map +1 -1
  156. package/dist/heatmap-layer/weights-fs.glsl.js +4 -0
  157. package/dist/heatmap-layer/weights-fs.glsl.js.map +1 -0
  158. package/dist/heatmap-layer/weights-vs.glsl.d.ts +1 -1
  159. package/dist/heatmap-layer/weights-vs.glsl.d.ts.map +1 -1
  160. package/dist/heatmap-layer/weights-vs.glsl.js +7 -7
  161. package/dist/heatmap-layer/weights-vs.glsl.js.map +1 -0
  162. package/dist/hexagon-layer/bin-options-uniforms.d.ts +14 -0
  163. package/dist/hexagon-layer/bin-options-uniforms.d.ts.map +1 -0
  164. package/dist/hexagon-layer/bin-options-uniforms.js +18 -0
  165. package/dist/hexagon-layer/bin-options-uniforms.js.map +1 -0
  166. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.d.ts +3 -0
  167. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.d.ts.map +1 -0
  168. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.js +56 -0
  169. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.js.map +1 -0
  170. package/dist/hexagon-layer/hexagon-cell-layer.d.ts +29 -0
  171. package/dist/hexagon-layer/hexagon-cell-layer.d.ts.map +1 -0
  172. package/dist/hexagon-layer/hexagon-cell-layer.js +95 -0
  173. package/dist/hexagon-layer/hexagon-cell-layer.js.map +1 -0
  174. package/dist/hexagon-layer/hexagon-layer-uniforms.d.ts +19 -0
  175. package/dist/hexagon-layer/hexagon-layer-uniforms.d.ts.map +1 -0
  176. package/dist/hexagon-layer/hexagon-layer-uniforms.js +22 -0
  177. package/dist/hexagon-layer/hexagon-layer-uniforms.js.map +1 -0
  178. package/dist/hexagon-layer/hexagon-layer.d.ts +84 -54
  179. package/dist/hexagon-layer/hexagon-layer.d.ts.map +1 -1
  180. package/dist/hexagon-layer/hexagon-layer.js +308 -123
  181. package/dist/hexagon-layer/hexagon-layer.js.map +1 -0
  182. package/dist/hexagon-layer/hexbin.d.ts +17 -0
  183. package/dist/hexagon-layer/hexbin.d.ts.map +1 -0
  184. package/dist/hexagon-layer/hexbin.js +70 -0
  185. package/dist/hexagon-layer/hexbin.js.map +1 -0
  186. package/dist/index.cjs +3026 -2947
  187. package/dist/index.cjs.map +4 -4
  188. package/dist/index.d.ts +7 -13
  189. package/dist/index.d.ts.map +1 -1
  190. package/dist/index.js +6 -27
  191. package/dist/index.js.map +1 -0
  192. package/dist/screen-grid-layer/bin-options-uniforms.d.ts +11 -0
  193. package/dist/screen-grid-layer/bin-options-uniforms.d.ts.map +1 -0
  194. package/dist/screen-grid-layer/bin-options-uniforms.js +16 -0
  195. package/dist/screen-grid-layer/bin-options-uniforms.js.map +1 -0
  196. package/dist/screen-grid-layer/screen-grid-cell-layer.d.ts +11 -16
  197. package/dist/screen-grid-layer/screen-grid-cell-layer.d.ts.map +1 -1
  198. package/dist/screen-grid-layer/screen-grid-cell-layer.js +53 -134
  199. package/dist/screen-grid-layer/screen-grid-cell-layer.js.map +1 -0
  200. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts +1 -1
  201. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts.map +1 -1
  202. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.js +5 -24
  203. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.js.map +1 -0
  204. package/dist/screen-grid-layer/screen-grid-layer-uniforms.d.ts +17 -0
  205. package/dist/screen-grid-layer/screen-grid-layer-uniforms.d.ts.map +1 -0
  206. package/dist/screen-grid-layer/screen-grid-layer-uniforms.js +20 -0
  207. package/dist/screen-grid-layer/screen-grid-layer-uniforms.js.map +1 -0
  208. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts +1 -1
  209. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts.map +1 -1
  210. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.js +22 -62
  211. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.js.map +1 -0
  212. package/dist/screen-grid-layer/screen-grid-layer.d.ts +33 -40
  213. package/dist/screen-grid-layer/screen-grid-layer.d.ts.map +1 -1
  214. package/dist/screen-grid-layer/screen-grid-layer.js +158 -174
  215. package/dist/screen-grid-layer/screen-grid-layer.js.map +1 -0
  216. package/dist.min.js +401 -382
  217. package/package.json +10 -9
  218. package/src/common/aggregation-layer.ts +107 -0
  219. package/src/common/aggregator/aggregator.ts +88 -0
  220. package/src/common/aggregator/cpu-aggregator/aggregate.ts +101 -0
  221. package/src/common/aggregator/cpu-aggregator/cpu-aggregator.ts +203 -0
  222. package/src/common/aggregator/cpu-aggregator/sort-bins.ts +63 -0
  223. package/src/common/aggregator/cpu-aggregator/vertex-accessor.ts +86 -0
  224. package/src/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.ts +33 -0
  225. package/src/common/aggregator/gpu-aggregator/bin-sorter-uniforms.ts +27 -0
  226. package/src/common/aggregator/gpu-aggregator/utils.ts +27 -0
  227. package/src/common/aggregator/gpu-aggregator/webgl-aggregation-transform.ts +247 -0
  228. package/src/common/aggregator/gpu-aggregator/webgl-aggregator.ts +274 -0
  229. package/src/common/aggregator/gpu-aggregator/webgl-bin-sorter.ts +258 -0
  230. package/src/common/aggregator/index.ts +10 -0
  231. package/src/{types.ts → common/types.ts} +10 -4
  232. package/src/common/utils/bounds-utils.ts +34 -0
  233. package/src/common/utils/color-utils.ts +86 -0
  234. package/src/common/utils/prop-utils.ts +13 -0
  235. package/src/common/utils/scale-utils.ts +236 -0
  236. package/src/contour-layer/bin-options-uniforms.ts +26 -0
  237. package/src/contour-layer/contour-layer.ts +300 -265
  238. package/src/contour-layer/contour-utils.ts +68 -39
  239. package/src/contour-layer/marching-squares-codes.ts +4 -0
  240. package/src/contour-layer/marching-squares.ts +93 -82
  241. package/src/contour-layer/value-reader.ts +65 -0
  242. package/src/grid-layer/bin-options-uniforms.ts +26 -0
  243. package/src/grid-layer/grid-cell-layer-vertex.glsl.ts +68 -0
  244. package/src/grid-layer/grid-cell-layer.ts +141 -0
  245. package/src/grid-layer/grid-layer-uniforms.ts +37 -0
  246. package/src/grid-layer/grid-layer.ts +614 -73
  247. package/src/{aggregation-layer.ts → heatmap-layer/aggregation-layer.ts} +6 -21
  248. package/src/heatmap-layer/heatmap-layer-uniforms.ts +50 -0
  249. package/src/heatmap-layer/heatmap-layer-utils.ts +9 -1
  250. package/src/heatmap-layer/heatmap-layer.ts +59 -36
  251. package/src/heatmap-layer/max-fs.glsl.ts +4 -0
  252. package/src/heatmap-layer/max-vs.glsl.ts +7 -4
  253. package/src/heatmap-layer/triangle-layer-fragment.glsl.ts +5 -23
  254. package/src/heatmap-layer/triangle-layer-uniforms.ts +37 -0
  255. package/src/heatmap-layer/triangle-layer-vertex.glsl.ts +10 -30
  256. package/src/heatmap-layer/triangle-layer.ts +26 -31
  257. package/src/heatmap-layer/weights-fs.glsl.ts +4 -0
  258. package/src/heatmap-layer/weights-vs.glsl.ts +7 -7
  259. package/src/hexagon-layer/bin-options-uniforms.ts +27 -0
  260. package/src/hexagon-layer/hexagon-cell-layer-vertex.glsl.ts +73 -0
  261. package/src/hexagon-layer/hexagon-cell-layer.ts +141 -0
  262. package/src/hexagon-layer/hexagon-layer-uniforms.ts +34 -0
  263. package/src/hexagon-layer/hexagon-layer.ts +454 -186
  264. package/src/hexagon-layer/hexbin.ts +79 -0
  265. package/src/index.ts +21 -34
  266. package/src/screen-grid-layer/bin-options-uniforms.ts +23 -0
  267. package/src/screen-grid-layer/screen-grid-cell-layer.ts +71 -156
  268. package/src/screen-grid-layer/screen-grid-layer-fragment.glsl.ts +4 -24
  269. package/src/screen-grid-layer/screen-grid-layer-uniforms.ts +31 -0
  270. package/src/screen-grid-layer/screen-grid-layer-vertex.glsl.ts +21 -64
  271. package/src/screen-grid-layer/screen-grid-layer.ts +194 -222
  272. package/dist/aggregation-layer.d.ts.map +0 -1
  273. package/dist/cpu-grid-layer/cpu-grid-layer.d.ts +0 -158
  274. package/dist/cpu-grid-layer/cpu-grid-layer.d.ts.map +0 -1
  275. package/dist/cpu-grid-layer/cpu-grid-layer.js +0 -130
  276. package/dist/cpu-grid-layer/grid-aggregator.d.ts +0 -35
  277. package/dist/cpu-grid-layer/grid-aggregator.d.ts.map +0 -1
  278. package/dist/cpu-grid-layer/grid-aggregator.js +0 -141
  279. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts +0 -3
  280. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts.map +0 -1
  281. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +0 -30
  282. package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts +0 -3
  283. package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts.map +0 -1
  284. package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +0 -112
  285. package/dist/gpu-grid-layer/gpu-grid-cell-layer.d.ts +0 -48
  286. package/dist/gpu-grid-layer/gpu-grid-cell-layer.d.ts.map +0 -1
  287. package/dist/gpu-grid-layer/gpu-grid-cell-layer.js +0 -146
  288. package/dist/gpu-grid-layer/gpu-grid-layer.d.ts +0 -99
  289. package/dist/gpu-grid-layer/gpu-grid-layer.d.ts.map +0 -1
  290. package/dist/gpu-grid-layer/gpu-grid-layer.js +0 -289
  291. package/dist/grid-aggregation-layer.d.ts +0 -67
  292. package/dist/grid-aggregation-layer.d.ts.map +0 -1
  293. package/dist/grid-aggregation-layer.js +0 -173
  294. package/dist/hexagon-layer/hexagon-aggregator.d.ts +0 -27
  295. package/dist/hexagon-layer/hexagon-aggregator.d.ts.map +0 -1
  296. package/dist/hexagon-layer/hexagon-aggregator.js +0 -112
  297. package/dist/types.d.ts +0 -12
  298. package/dist/types.d.ts.map +0 -1
  299. package/dist/types.js +0 -1
  300. package/dist/utils/aggregation-operation-utils.d.ts +0 -19
  301. package/dist/utils/aggregation-operation-utils.d.ts.map +0 -1
  302. package/dist/utils/aggregation-operation-utils.js +0 -94
  303. package/dist/utils/bin-sorter.d.ts +0 -52
  304. package/dist/utils/bin-sorter.d.ts.map +0 -1
  305. package/dist/utils/bin-sorter.js +0 -167
  306. package/dist/utils/color-utils.d.ts +0 -3
  307. package/dist/utils/color-utils.d.ts.map +0 -1
  308. package/dist/utils/color-utils.js +0 -53
  309. package/dist/utils/cpu-aggregator.d.ts +0 -169
  310. package/dist/utils/cpu-aggregator.d.ts.map +0 -1
  311. package/dist/utils/cpu-aggregator.js +0 -421
  312. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts +0 -3
  313. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts.map +0 -1
  314. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +0 -36
  315. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts +0 -3
  316. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts.map +0 -1
  317. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +0 -42
  318. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts +0 -3
  319. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts.map +0 -1
  320. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +0 -30
  321. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts +0 -3
  322. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts.map +0 -1
  323. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js +0 -61
  324. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts +0 -38
  325. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts.map +0 -1
  326. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +0 -41
  327. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts +0 -1
  328. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts.map +0 -1
  329. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +0 -1
  330. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts +0 -76
  331. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts.map +0 -1
  332. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +0 -555
  333. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts +0 -3
  334. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts.map +0 -1
  335. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +0 -32
  336. package/dist/utils/grid-aggregation-utils.d.ts +0 -30
  337. package/dist/utils/grid-aggregation-utils.d.ts.map +0 -1
  338. package/dist/utils/grid-aggregation-utils.js +0 -114
  339. package/dist/utils/prop-utils.d.ts.map +0 -1
  340. package/dist/utils/prop-utils.js +0 -28
  341. package/dist/utils/resource-utils.d.ts +0 -14
  342. package/dist/utils/resource-utils.d.ts.map +0 -1
  343. package/dist/utils/resource-utils.js +0 -38
  344. package/dist/utils/scale-utils.d.ts +0 -15
  345. package/dist/utils/scale-utils.d.ts.map +0 -1
  346. package/dist/utils/scale-utils.js +0 -184
  347. package/src/cpu-grid-layer/cpu-grid-layer.ts +0 -329
  348. package/src/cpu-grid-layer/grid-aggregator.ts +0 -184
  349. package/src/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.ts +0 -35
  350. package/src/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.ts +0 -143
  351. package/src/gpu-grid-layer/gpu-grid-cell-layer.ts +0 -201
  352. package/src/gpu-grid-layer/gpu-grid-layer.ts +0 -455
  353. package/src/grid-aggregation-layer.ts +0 -243
  354. package/src/hexagon-layer/hexagon-aggregator.ts +0 -127
  355. package/src/utils/aggregation-operation-utils.ts +0 -118
  356. package/src/utils/bin-sorter.ts +0 -218
  357. package/src/utils/color-utils.ts +0 -57
  358. package/src/utils/cpu-aggregator.ts +0 -503
  359. package/src/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.ts +0 -40
  360. package/src/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.ts +0 -54
  361. package/src/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.ts +0 -35
  362. package/src/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.ts +0 -79
  363. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.ts +0 -46
  364. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.ts +0 -0
  365. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.md +0 -155
  366. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.ts +0 -690
  367. package/src/utils/gpu-grid-aggregation/transform-mean-vs.glsl.ts +0 -38
  368. package/src/utils/grid-aggregation-utils.ts +0 -147
  369. package/src/utils/prop-utils.ts +0 -29
  370. package/src/utils/resource-utils.ts +0 -53
  371. package/src/utils/scale-utils.js +0 -219
  372. /package/dist/{utils → common/utils}/prop-utils.d.ts +0 -0
@@ -1,72 +1,32 @@
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
- export default `\
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ export default /* glsl */ `\
21
5
  #version 300 es
22
6
  #define SHADER_NAME screen-grid-layer-vertex-shader
23
7
  #define RANGE_COUNT 6
24
- in vec3 positions;
25
- in vec3 instancePositions;
26
- in vec4 instanceCounts;
8
+ in vec2 positions;
9
+ in vec2 instancePositions;
10
+ in float instanceWeights;
27
11
  in vec3 instancePickingColors;
28
- uniform float opacity;
29
- uniform vec3 cellScale;
30
- uniform vec4 minColor;
31
- uniform vec4 maxColor;
32
- uniform vec4 colorRange[RANGE_COUNT];
33
- uniform vec2 colorDomain;
34
- uniform bool shouldUseMinMax;
35
- uniform sampler2D maxTexture;
12
+ uniform sampler2D colorRange;
36
13
  out vec4 vColor;
37
- out float vSampleCount;
38
- vec4 quantizeScale(vec2 domain, vec4 range[RANGE_COUNT], float value) {
39
- vec4 outColor = vec4(0., 0., 0., 0.);
40
- if (value >= domain.x && value <= domain.y) {
41
- float domainRange = domain.y - domain.x;
42
- if (domainRange <= 0.) {
43
- outColor = colorRange[0];
44
- } else {
45
- float rangeCount = float(RANGE_COUNT);
46
- float rangeStep = domainRange / rangeCount;
47
- float idx = floor((value - domain.x) / rangeStep);
48
- idx = clamp(idx, 0., rangeCount - 1.);
49
- int intIdx = int(idx);
50
- outColor = colorRange[intIdx];
51
- }
52
- }
53
- outColor = outColor / 255.;
54
- return outColor;
14
+ vec4 interp(float value, vec2 domain, sampler2D range) {
15
+ float r = (value - domain.x) / (domain.y - domain.x);
16
+ return texture(range, vec2(r, 0.5));
55
17
  }
56
18
  void main(void) {
57
- vSampleCount = instanceCounts.a;
58
- float weight = instanceCounts.r;
59
- float maxWeight = texture(maxTexture, vec2(0.5)).r;
60
- float step = weight / maxWeight;
61
- vec4 minMaxColor = mix(minColor, maxColor, step) / 255.;
62
- vec2 domain = colorDomain;
63
- float domainMaxValid = float(colorDomain.y != 0.);
64
- domain.y = mix(maxWeight, colorDomain.y, domainMaxValid);
65
- vec4 rangeColor = quantizeScale(domain, colorRange, weight);
66
- float rangeMinMax = float(shouldUseMinMax);
67
- vec4 color = mix(rangeColor, minMaxColor, rangeMinMax);
68
- vColor = vec4(color.rgb, color.a * opacity);
19
+ if (isnan(instanceWeights)) {
20
+ gl_Position = vec4(0.);
21
+ return;
22
+ }
23
+ vec2 pos = instancePositions * screenGrid.gridSizeClipspace + positions * screenGrid.cellSizeClipspace;
24
+ pos.x = pos.x - 1.0;
25
+ pos.y = 1.0 - pos.y;
26
+ gl_Position = vec4(pos, 0., 1.);
27
+ vColor = interp(instanceWeights, screenGrid.colorDomain, colorRange);
28
+ vColor.a *= layer.opacity;
69
29
  picking_setPickingColor(instancePickingColors);
70
- gl_Position = vec4(instancePositions + positions * cellScale, 1.);
71
30
  }
72
31
  `;
32
+ //# sourceMappingURL=screen-grid-layer-vertex.glsl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen-grid-layer-vertex.glsl.js","sourceRoot":"","sources":["../../src/screen-grid-layer/screen-grid-layer-vertex.glsl.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,eAAe,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCvB"}
@@ -1,8 +1,8 @@
1
- import { Accessor, Color, GetPickingInfoParams, Layer, LayerContext, LayersList, PickingInfo, Position, UpdateParameters, DefaultProps } from '@deck.gl/core';
2
- import type { Buffer, Texture } from '@luma.gl/core';
3
- import GridAggregationLayer, { GridAggregationLayerProps } from "../grid-aggregation-layer.js";
1
+ import { Accessor, Color, GetPickingInfoParams, CompositeLayerProps, Layer, LayersList, PickingInfo, Position, UpdateParameters, DefaultProps } from '@deck.gl/core';
2
+ import { WebGLAggregator, CPUAggregator, AggregationOperation } from "../common/aggregator/index.js";
3
+ import AggregationLayer from "../common/aggregation-layer.js";
4
4
  /** All properties supported by ScreenGridLayer. */
5
- export type ScreenGridLayerProps<DataT = unknown> = _ScreenGridLayerProps<DataT> & GridAggregationLayerProps<DataT>;
5
+ export type ScreenGridLayerProps<DataT = unknown> = _ScreenGridLayerProps<DataT> & CompositeLayerProps;
6
6
  /** Properties added by ScreenGridLayer. */
7
7
  export type _ScreenGridLayerProps<DataT> = {
8
8
  /**
@@ -15,18 +15,6 @@ export type _ScreenGridLayerProps<DataT> = {
15
15
  * @default 2
16
16
  */
17
17
  cellMarginPixels?: number;
18
- /**
19
- * Expressed as an rgba array, minimal color that could be rendered by a tile.
20
- * @default [0, 0, 0, 255]
21
- * @deprecated Deprecated in version 5.2.0, use `colorRange` and `colorDomain` instead.
22
- */
23
- minColor?: Color | null;
24
- /**
25
- * Expressed as an rgba array, maximal color that could be rendered by a tile.
26
- * @default [0, 255, 0, 255]
27
- * @deprecated Deprecated in version 5.2.0, use `colorRange` and `colorDomain` instead.
28
- */
29
- maxColor?: Color | null;
30
18
  /**
31
19
  * Color scale input domain. The color scale maps continues numeric domain into discrete color range.
32
20
  * @default [1, max(weight)]
@@ -38,6 +26,12 @@ export type _ScreenGridLayerProps<DataT> = {
38
26
  * @default `6-class YlOrRd` - [colorbrewer](http://colorbrewer2.org/#type=sequential&scheme=YlOrRd&n=6)
39
27
  */
40
28
  colorRange?: Color[];
29
+ /**
30
+ * Scaling function used to determine the color of the grid cell.
31
+ * Supported Values are 'quantize', 'linear', 'quantile' and 'ordinal'.
32
+ * @default 'quantize'
33
+ */
34
+ colorScaleType?: 'linear' | 'quantize';
41
35
  /**
42
36
  * Method called to retrieve the position of each object.
43
37
  *
@@ -58,38 +52,37 @@ export type _ScreenGridLayerProps<DataT> = {
58
52
  gpuAggregation?: boolean;
59
53
  /**
60
54
  * Defines the type of aggregation operation
61
- *
62
- * V valid values are 'SUM', 'MEAN', 'MIN' and 'MAX'.
55
+ * Valid values are 'SUM', 'MEAN', 'MIN', 'MAX', 'COUNT'.
63
56
  *
64
57
  * @default 'SUM'
65
58
  */
66
- aggregation?: 'SUM' | 'MEAN' | 'MIN' | 'MAX';
59
+ aggregation?: AggregationOperation;
67
60
  };
61
+ export type ScreenGridLayerPickingInfo<DataT> = PickingInfo<{
62
+ /** Column index of the picked cell, starting from 0 at the left of the viewport */
63
+ col: number;
64
+ /** Row index of the picked cell, starting from 0 at the top of the viewport */
65
+ row: number;
66
+ /** Aggregated value */
67
+ value: number;
68
+ /** Number of data points in the picked cell */
69
+ count: number;
70
+ /** Indices of the data objects in the picked cell. Only available if using CPU aggregation. */
71
+ pointIndices?: number[];
72
+ /** The data objects in the picked cell. Only available if using CPU aggregation and layer data is an array. */
73
+ points?: DataT[];
74
+ }>;
68
75
  /** Aggregates data into histogram bins and renders them as a grid. */
69
- export default class ScreenGridLayer<DataT = any, ExtraProps extends {} = {}> extends GridAggregationLayer<DataT, ExtraProps & Required<_ScreenGridLayerProps<DataT>>> {
76
+ export default class ScreenGridLayer<DataT = any, ExtraProps extends {} = {}> extends AggregationLayer<DataT, ExtraProps & Required<_ScreenGridLayerProps<DataT>>> {
70
77
  static layerName: string;
71
78
  static defaultProps: DefaultProps<ScreenGridLayerProps<unknown>>;
72
- state: GridAggregationLayer<DataT>['state'] & {
73
- supported: boolean;
74
- gpuGridAggregator?: any;
75
- gpuAggregation?: any;
76
- weights?: any;
77
- maxTexture?: Texture;
78
- aggregationBuffer?: Buffer;
79
- maxBuffer?: Buffer;
80
- };
79
+ getAggregatorType(): string;
80
+ createAggregator(type: string): WebGLAggregator | CPUAggregator;
81
81
  initializeState(): void;
82
82
  shouldUpdateState({ changeFlags }: UpdateParameters<this>): boolean;
83
- updateState(opts: UpdateParameters<this>): void;
84
- renderLayers(): LayersList | Layer;
85
- finalizeState(context: LayerContext): void;
86
- getPickingInfo({ info }: GetPickingInfoParams): PickingInfo;
87
- updateResults({ aggregationData, maxData }: {
88
- aggregationData: any;
89
- maxData: any;
90
- }): void;
91
- updateAggregationState(opts: any): void;
92
- _updateAccessors(opts: any): void;
93
- _resetResults(): void;
83
+ updateState(params: UpdateParameters<this>): boolean;
84
+ onAttributeChange(id: string): void;
85
+ renderLayers(): LayersList | Layer | null;
86
+ getPickingInfo(params: GetPickingInfoParams): ScreenGridLayerPickingInfo<DataT>;
94
87
  }
95
88
  //# sourceMappingURL=screen-grid-layer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen-grid-layer.d.ts","sourceRoot":"","sources":["../../src/screen-grid-layer/screen-grid-layer.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,QAAQ,EACR,KAAK,EACL,oBAAoB,EACpB,KAAK,EACL,YAAY,EACZ,UAAU,EAEV,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,oBAAoB,EAAE,EAAC,yBAAyB,EAAC,qCAAkC;AAuB1F,mDAAmD;AACnD,MAAM,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iBAAiB,IAAI,MAAM;IAM3B,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,aAAa;IA6C/D,eAAe;IAgBf,iBAAiB,CAAC,EAAC,WAAW,EAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAIvD,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAyC1C,iBAAiB,CAAC,EAAE,EAAE,MAAM;IAgB5B,YAAY,IAAI,UAAU,GAAG,KAAK,GAAG,IAAI;IAqCzC,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,0BAA0B,CAAC,KAAK,CAAC;CAyBhF"}
@@ -1,210 +1,194 @@
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 { log } from '@deck.gl/core';
21
- import GPUGridAggregator from "../utils/gpu-grid-aggregation/gpu-grid-aggregator.js";
22
- import { AGGREGATION_OPERATION, getValueFunc } from "../utils/aggregation-operation-utils.js";
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { project32 } from '@deck.gl/core';
5
+ import { WebGLAggregator, CPUAggregator } from "../common/aggregator/index.js";
6
+ import AggregationLayer from "../common/aggregation-layer.js";
23
7
  import ScreenGridCellLayer from "./screen-grid-cell-layer.js";
24
- import GridAggregationLayer from "../grid-aggregation-layer.js";
25
- import { getFloatTexture } from "../utils/resource-utils.js";
8
+ import { binOptionsUniforms } from "./bin-options-uniforms.js";
9
+ import { defaultColorRange } from "../common/utils/color-utils.js";
26
10
  const defaultProps = {
27
- ...ScreenGridCellLayer.defaultProps,
11
+ cellSizePixels: { type: 'number', value: 100, min: 1 },
12
+ cellMarginPixels: { type: 'number', value: 2, min: 0 },
13
+ colorRange: defaultColorRange,
14
+ colorScaleType: 'linear',
28
15
  getPosition: { type: 'accessor', value: (d) => d.position },
29
16
  getWeight: { type: 'accessor', value: 1 },
30
- gpuAggregation: false, // TODO(v9): Re-enable GPU aggregation.
17
+ gpuAggregation: true,
31
18
  aggregation: 'SUM'
32
19
  };
33
- const POSITION_ATTRIBUTE_NAME = 'positions';
34
- const DIMENSIONS = {
35
- data: {
36
- props: ['cellSizePixels']
37
- },
38
- weights: {
39
- props: ['aggregation'],
40
- accessors: ['getWeight']
41
- }
42
- };
43
20
  /** Aggregates data into histogram bins and renders them as a grid. */
44
- class ScreenGridLayer extends GridAggregationLayer {
45
- initializeState() {
46
- super.initializeAggregationLayer({
47
- dimensions: DIMENSIONS,
48
- // @ts-expect-error
49
- getCellSize: props => props.cellSizePixels // TODO
50
- });
51
- const weights = {
52
- count: {
53
- size: 1,
54
- operation: AGGREGATION_OPERATION.SUM,
55
- needMax: true,
56
- maxTexture: getFloatTexture(this.context.device, { id: `${this.id}-max-texture` })
57
- }
58
- };
59
- this.setState({
60
- supported: true,
61
- projectPoints: true, // aggregation in screen space
62
- weights,
63
- subLayerData: { attributes: {} },
64
- maxTexture: weights.count.maxTexture,
65
- positionAttributeName: 'positions',
66
- posOffset: [0, 0],
67
- translation: [1, -1]
21
+ class ScreenGridLayer extends AggregationLayer {
22
+ getAggregatorType() {
23
+ return this.props.gpuAggregation && WebGLAggregator.isSupported(this.context.device)
24
+ ? 'gpu'
25
+ : 'cpu';
26
+ }
27
+ createAggregator(type) {
28
+ if (type === 'cpu' || !WebGLAggregator.isSupported(this.context.device)) {
29
+ return new CPUAggregator({
30
+ dimensions: 2,
31
+ getBin: {
32
+ sources: ['positions'],
33
+ getValue: ({ positions }, index, opts) => {
34
+ const viewport = this.context.viewport;
35
+ const p = viewport.project(positions);
36
+ const cellSizePixels = opts.cellSizePixels;
37
+ if (p[0] < 0 || p[0] >= viewport.width || p[1] < 0 || p[1] >= viewport.height) {
38
+ // Not on screen
39
+ return null;
40
+ }
41
+ return [Math.floor(p[0] / cellSizePixels), Math.floor(p[1] / cellSizePixels)];
42
+ }
43
+ },
44
+ getValue: [{ sources: ['counts'], getValue: ({ counts }) => counts }]
45
+ });
46
+ }
47
+ return new WebGLAggregator(this.context.device, {
48
+ dimensions: 2,
49
+ channelCount: 1,
50
+ bufferLayout: this.getAttributeManager().getBufferLayouts({ isInstanced: false }),
51
+ ...super.getShaders({
52
+ modules: [project32, binOptionsUniforms],
53
+ vs: `
54
+ in vec3 positions;
55
+ in vec3 positions64Low;
56
+ in float counts;
57
+
58
+ void getBin(out ivec2 binId) {
59
+ vec4 pos = project_position_to_clipspace(positions, positions64Low, vec3(0.0));
60
+ vec2 screenCoords = vec2(pos.x / pos.w + 1.0, 1.0 - pos.y / pos.w) / 2.0 * project.viewportSize / project.devicePixelRatio;
61
+ vec2 gridCoords = floor(screenCoords / binOptions.cellSizePixels);
62
+ binId = ivec2(gridCoords);
63
+ }
64
+ void getValue(out float weight) {
65
+ weight = counts;
66
+ }
67
+ `
68
+ })
68
69
  });
70
+ }
71
+ initializeState() {
72
+ super.initializeState();
69
73
  const attributeManager = this.getAttributeManager();
70
74
  attributeManager.add({
71
- [POSITION_ATTRIBUTE_NAME]: {
75
+ positions: {
72
76
  size: 3,
73
77
  accessor: 'getPosition',
74
78
  type: 'float64',
75
79
  fp64: this.use64bitPositions()
76
80
  },
77
81
  // this attribute is used in gpu aggregation path only
78
- count: { size: 3, accessor: 'getWeight' }
82
+ counts: { size: 1, accessor: 'getWeight' }
79
83
  });
80
84
  }
81
85
  shouldUpdateState({ changeFlags }) {
82
- return this.state.supported && changeFlags.somethingChanged;
86
+ return changeFlags.somethingChanged;
83
87
  }
84
- updateState(opts) {
85
- super.updateState(opts);
88
+ updateState(params) {
89
+ const aggregatorChanged = super.updateState(params);
90
+ const { props, oldProps, changeFlags } = params;
91
+ const { cellSizePixels, aggregation } = props;
92
+ if (aggregatorChanged ||
93
+ changeFlags.dataChanged ||
94
+ changeFlags.updateTriggersChanged ||
95
+ changeFlags.viewportChanged ||
96
+ aggregation !== oldProps.aggregation ||
97
+ cellSizePixels !== oldProps.cellSizePixels) {
98
+ const { width, height } = this.context.viewport;
99
+ const { aggregator } = this.state;
100
+ if (aggregator instanceof WebGLAggregator) {
101
+ aggregator.setProps({
102
+ binIdRange: [
103
+ [0, Math.ceil(width / cellSizePixels)],
104
+ [0, Math.ceil(height / cellSizePixels)]
105
+ ]
106
+ });
107
+ }
108
+ aggregator.setProps({
109
+ pointCount: this.getNumInstances(),
110
+ operations: [aggregation],
111
+ binOptions: {
112
+ cellSizePixels
113
+ }
114
+ });
115
+ }
116
+ if (changeFlags.viewportChanged) {
117
+ // Rerun aggregation on viewport change
118
+ this.state.aggregator.setNeedsUpdate();
119
+ }
120
+ return aggregatorChanged;
86
121
  }
87
- renderLayers() {
88
- if (!this.state.supported) {
89
- return [];
122
+ onAttributeChange(id) {
123
+ const { aggregator } = this.state;
124
+ switch (id) {
125
+ case 'positions':
126
+ aggregator.setNeedsUpdate();
127
+ break;
128
+ case 'counts':
129
+ aggregator.setNeedsUpdate(0);
130
+ break;
131
+ default:
132
+ // This should not happen
90
133
  }
91
- const { maxTexture, numRow, numCol, weights } = this.state;
92
- const { updateTriggers } = this.props;
93
- const { aggregationBuffer } = weights.count;
134
+ }
135
+ renderLayers() {
136
+ const { aggregator } = this.state;
94
137
  const CellLayerClass = this.getSubLayerClass('cells', ScreenGridCellLayer);
138
+ const binAttribute = aggregator.getBins();
139
+ const weightAttribute = aggregator.getResult(0);
95
140
  return new CellLayerClass(this.props, this.getSubLayerProps({
96
- id: 'cell-layer',
97
- updateTriggers
141
+ id: 'cell-layer'
98
142
  }), {
99
- data: { attributes: { instanceCounts: aggregationBuffer } },
100
- maxTexture,
101
- numInstances: numRow * numCol
143
+ data: {
144
+ length: aggregator.binCount,
145
+ attributes: {
146
+ getBin: binAttribute,
147
+ getWeight: weightAttribute
148
+ }
149
+ },
150
+ // Data has changed shallowly, but we likely don't need to update the attributes
151
+ dataComparator: (data, oldData) => data.length === oldData.length,
152
+ updateTriggers: {
153
+ getBin: [binAttribute],
154
+ getWeight: [weightAttribute]
155
+ },
156
+ parameters: {
157
+ depthWriteEnabled: false,
158
+ ...this.props.parameters
159
+ },
160
+ // Evaluate domain at draw() time
161
+ colorDomain: () => this.props.colorDomain || aggregator.getResultDomain(0),
162
+ // Extensions are already handled by the GPUAggregator, do not pass it down
163
+ extensions: []
102
164
  });
103
165
  }
104
- finalizeState(context) {
105
- super.finalizeState(context);
106
- const { aggregationBuffer, maxBuffer, maxTexture } = this.state;
107
- aggregationBuffer?.delete();
108
- maxBuffer?.delete();
109
- maxTexture?.delete();
110
- }
111
- getPickingInfo({ info }) {
166
+ getPickingInfo(params) {
167
+ const info = params.info;
112
168
  const { index } = info;
113
169
  if (index >= 0) {
114
- const { gpuGridAggregator, gpuAggregation, weights } = this.state;
115
- // Get count aggregation results
116
- const aggregationResults = gpuAggregation
117
- ? gpuGridAggregator.getData('count')
118
- : weights.count;
119
- // Each instance (one cell) is aggregated into single pixel,
120
- // Get current instance's aggregation details.
121
- info.object = GPUGridAggregator.getAggregationData({
122
- pixelIndex: index,
123
- ...aggregationResults
124
- });
125
- }
126
- return info;
127
- }
128
- // Aggregation Overrides
129
- updateResults({ aggregationData, maxData }) {
130
- const { count } = this.state.weights;
131
- count.aggregationData = aggregationData;
132
- count.aggregationBuffer.write(aggregationData);
133
- count.maxData = maxData;
134
- count.maxTexture.setImageData({ data: maxData });
135
- }
136
- /* eslint-disable complexity, max-statements */
137
- updateAggregationState(opts) {
138
- const cellSize = opts.props.cellSizePixels;
139
- const cellSizeChanged = opts.oldProps.cellSizePixels !== cellSize;
140
- const { viewportChanged } = opts.changeFlags;
141
- let gpuAggregation = opts.props.gpuAggregation;
142
- if (this.state.gpuAggregation !== opts.props.gpuAggregation) {
143
- if (gpuAggregation && !GPUGridAggregator.isSupported(this.context.device)) {
144
- log.warn('GPU Grid Aggregation not supported, falling back to CPU')();
145
- gpuAggregation = false;
170
+ const bin = this.state.aggregator.getBin(index);
171
+ let object;
172
+ if (bin) {
173
+ object = {
174
+ col: bin.id[0],
175
+ row: bin.id[1],
176
+ value: bin.value[0],
177
+ count: bin.count
178
+ };
179
+ if (bin.pointIndices) {
180
+ object.pointIndices = bin.pointIndices;
181
+ object.points = Array.isArray(this.props.data)
182
+ ? bin.pointIndices.map(i => this.props.data[i])
183
+ : [];
184
+ }
146
185
  }
186
+ info.object = object;
147
187
  }
148
- const gpuAggregationChanged = gpuAggregation !== this.state.gpuAggregation;
149
- this.setState({
150
- gpuAggregation
151
- });
152
- const positionsChanged = this.isAttributeChanged(POSITION_ATTRIBUTE_NAME);
153
- const { dimensions } = this.state;
154
- const { data, weights } = dimensions;
155
- const aggregationDataDirty = positionsChanged ||
156
- gpuAggregationChanged ||
157
- viewportChanged ||
158
- this.isAggregationDirty(opts, {
159
- compareAll: gpuAggregation, // check for all (including extentions props) when using gpu aggregation
160
- dimension: data
161
- });
162
- const aggregationWeightsDirty = this.isAggregationDirty(opts, { dimension: weights });
163
- this.setState({
164
- aggregationDataDirty,
165
- aggregationWeightsDirty
166
- });
167
- const { viewport } = this.context;
168
- if (viewportChanged || cellSizeChanged) {
169
- const { width, height } = viewport;
170
- const numCol = Math.ceil(width / cellSize);
171
- const numRow = Math.ceil(height / cellSize);
172
- this.allocateResources(numRow, numCol);
173
- this.setState({
174
- // transformation from clipspace to screen(pixel) space
175
- scaling: [width / 2, -height / 2, 1],
176
- gridOffset: { xOffset: cellSize, yOffset: cellSize },
177
- width,
178
- height,
179
- numCol,
180
- numRow
181
- });
182
- }
183
- if (aggregationWeightsDirty) {
184
- this._updateAccessors(opts);
185
- }
186
- if (aggregationDataDirty || aggregationWeightsDirty) {
187
- this._resetResults();
188
- }
189
- }
190
- /* eslint-enable complexity, max-statements */
191
- // Private
192
- _updateAccessors(opts) {
193
- const { getWeight, aggregation, data } = opts.props;
194
- const { count } = this.state.weights;
195
- if (count) {
196
- count.getWeight = getWeight;
197
- count.operation = AGGREGATION_OPERATION[aggregation];
198
- }
199
- this.setState({ getValue: getValueFunc(aggregation, getWeight, { data }) });
200
- }
201
- _resetResults() {
202
- const { count } = this.state.weights;
203
- if (count) {
204
- count.aggregationData = null;
205
- }
188
+ return info;
206
189
  }
207
190
  }
208
191
  ScreenGridLayer.layerName = 'ScreenGridLayer';
209
192
  ScreenGridLayer.defaultProps = defaultProps;
210
193
  export default ScreenGridLayer;
194
+ //# sourceMappingURL=screen-grid-layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen-grid-layer.js","sourceRoot":"","sources":["../../src/screen-grid-layer/screen-grid-layer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAML,SAAS,EAMV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAE,aAAa,EAAuB,sCAAmC;AAChG,OAAO,gBAAgB,uCAAoC;AAC3D,OAAO,mBAAmB,oCAAiC;AAC3D,OAAO,EAAa,kBAAkB,EAAC,kCAA+B;AACtE,OAAO,EAAC,iBAAiB,EAAC,uCAAoC;AA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