@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 +1 @@
1
- {"version":3,"file":"hexagon-layer.d.ts","sourceRoot":"","sources":["../../src/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;IACxB,+GAA+G;IAC/G,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,CAAC,CAAC;AAEH,gIAAgI;AAChI,MAAM,CAAC,OAAO,OAAO,YAAY,CAC/B,KAAK,GAAG,GAAG,EACX,WAAW,SAAS,EAAE,GAAG,EAAE,CAC3B,SAAQ,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IAClF,MAAM,CAAC,SAAS,SAAkB;IAClC,MAAM,CAAC,YAAY,2CAAgB;IAEnC,KAAK,EAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GACtC,UAAU,GAAG;QAEX,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC;QAEtB,MAAM,CAAC,EAAE,kBAAkB,CAAC;QAC5B,UAAU,CAAC,EAAE,kBAAkB,CAAC;QAEhC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QAC/B,kBAAkB,EAAE,QAAQ,CAAC;KAC9B,CAAC;IAEJ,iBAAiB,IAAI,MAAM;IAmB3B,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,aAAa;IAqD/D,eAAe;IAgBf,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAmE1C,OAAO,CAAC,iBAAiB;IA8ChB,IAAI,CAAC,IAAI,KAAA;IAQlB,OAAO,CAAC,oBAAoB;IAkB5B,iBAAiB,CAAC,EAAE,EAAE,MAAM;IA+B5B,YAAY,IAAI,UAAU,GAAG,KAAK,GAAG,IAAI;IAkFzC,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,uBAAuB,CAAC,KAAK,CAAC;CAiC7E"}
@@ -1,174 +1,359 @@
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 { ColumnLayer } from '@deck.gl/layers';
22
- import { defaultColorRange } from "../utils/color-utils.js";
23
- import { pointToHexbin } from "./hexagon-aggregator.js";
24
- import CPUAggregator from "../utils/cpu-aggregator.js";
25
- import AggregationLayer from "../aggregation-layer.js";
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 HexagonCellLayer from "./hexagon-cell-layer.js";
11
+ import { pointToHexbin, HexbinVertices, getHexbinCentroid, pointToHexbinGLSL } from "./hexbin.js";
12
+ import { binOptionsUniforms } from "./bin-options-uniforms.js";
26
13
  // eslint-disable-next-line @typescript-eslint/no-empty-function
27
- function nop() { }
14
+ function noop() { }
28
15
  const defaultProps = {
16
+ gpuAggregation: true,
29
17
  // color
30
18
  colorDomain: null,
31
19
  colorRange: defaultColorRange,
32
- getColorValue: { type: 'accessor', value: null }, // default value is calcuated from `getColorWeight` and `colorAggregation`
20
+ getColorValue: { type: 'accessor', value: null }, // default value is calculated from `getColorWeight` and `colorAggregation`
33
21
  getColorWeight: { type: 'accessor', value: 1 },
34
22
  colorAggregation: 'SUM',
35
- lowerPercentile: { type: 'number', value: 0, min: 0, max: 100 },
36
- upperPercentile: { type: 'number', value: 100, min: 0, max: 100 },
23
+ lowerPercentile: { type: 'number', min: 0, max: 100, value: 0 },
24
+ upperPercentile: { type: 'number', min: 0, max: 100, value: 100 },
37
25
  colorScaleType: 'quantize',
38
- onSetColorDomain: nop,
26
+ onSetColorDomain: noop,
39
27
  // elevation
40
28
  elevationDomain: null,
41
29
  elevationRange: [0, 1000],
42
- getElevationValue: { type: 'accessor', value: null }, // default value is calcuated from `getElevationWeight` and `elevationAggregation`
30
+ getElevationValue: { type: 'accessor', value: null }, // default value is calculated from `getElevationWeight` and `elevationAggregation`
43
31
  getElevationWeight: { type: 'accessor', value: 1 },
44
32
  elevationAggregation: 'SUM',
45
- elevationLowerPercentile: { type: 'number', value: 0, min: 0, max: 100 },
46
- elevationUpperPercentile: { type: 'number', value: 100, min: 0, max: 100 },
47
33
  elevationScale: { type: 'number', min: 0, value: 1 },
34
+ elevationLowerPercentile: { type: 'number', min: 0, max: 100, value: 0 },
35
+ elevationUpperPercentile: { type: 'number', min: 0, max: 100, value: 100 },
48
36
  elevationScaleType: 'linear',
49
- onSetElevationDomain: nop,
50
- radius: { type: 'number', value: 1000, min: 1 },
37
+ onSetElevationDomain: noop,
38
+ // hexbin
39
+ radius: { type: 'number', min: 1, value: 1000 },
51
40
  coverage: { type: 'number', min: 0, max: 1, value: 1 },
52
- extruded: false,
53
- hexagonAggregator: pointToHexbin,
54
41
  getPosition: { type: 'accessor', value: (x) => x.position },
42
+ hexagonAggregator: { type: 'function', optional: true, value: null },
43
+ extruded: false,
55
44
  // Optional material for 'lighting' shader module
56
- material: true,
57
- // data filter
58
- _filterData: { type: 'function', value: null, optional: true }
45
+ material: true
59
46
  };
60
- /** Aggregates data into a hexagon-based heatmap. The color and height of a hexagon are determined based on the objects it contains. */
47
+ /** Aggregate data into a grid-based heatmap. The color and height of a cell are determined based on the objects it contains. */
61
48
  class HexagonLayer extends AggregationLayer {
62
- initializeState() {
63
- const cpuAggregator = new CPUAggregator({
64
- getAggregator: props => props.hexagonAggregator,
65
- getCellSize: props => props.radius
49
+ getAggregatorType() {
50
+ const { gpuAggregation, hexagonAggregator, getColorValue, getElevationValue } = this.props;
51
+ if (gpuAggregation && (hexagonAggregator || getColorValue || getElevationValue)) {
52
+ // If these features are desired by the app, the user should explicitly use CPU aggregation
53
+ log.warn('Features not supported by GPU aggregation, falling back to CPU')();
54
+ return 'cpu';
55
+ }
56
+ if (
57
+ // GPU aggregation is requested
58
+ gpuAggregation &&
59
+ // GPU aggregation is supported by the device
60
+ WebGLAggregator.isSupported(this.context.device)) {
61
+ return 'gpu';
62
+ }
63
+ return 'cpu';
64
+ }
65
+ createAggregator(type) {
66
+ if (type === 'cpu') {
67
+ const { hexagonAggregator, radius } = this.props;
68
+ return new CPUAggregator({
69
+ dimensions: 2,
70
+ getBin: {
71
+ sources: ['positions'],
72
+ getValue: ({ positions }, index, opts) => {
73
+ if (hexagonAggregator) {
74
+ return hexagonAggregator(positions, radius);
75
+ }
76
+ const viewport = this.state.aggregatorViewport;
77
+ // project to common space
78
+ const p = viewport.projectPosition(positions);
79
+ const { radiusCommon, hexOriginCommon } = opts;
80
+ return pointToHexbin([p[0] - hexOriginCommon[0], p[1] - hexOriginCommon[1]], radiusCommon);
81
+ }
82
+ },
83
+ getValue: [
84
+ { sources: ['colorWeights'], getValue: ({ colorWeights }) => colorWeights },
85
+ { sources: ['elevationWeights'], getValue: ({ elevationWeights }) => elevationWeights }
86
+ ]
87
+ });
88
+ }
89
+ return new WebGLAggregator(this.context.device, {
90
+ dimensions: 2,
91
+ channelCount: 2,
92
+ bufferLayout: this.getAttributeManager().getBufferLayouts({ isInstanced: false }),
93
+ ...super.getShaders({
94
+ modules: [project32, binOptionsUniforms],
95
+ vs: /* glsl */ `
96
+ in vec3 positions;
97
+ in vec3 positions64Low;
98
+ in float colorWeights;
99
+ in float elevationWeights;
100
+
101
+ ${pointToHexbinGLSL}
102
+
103
+ void getBin(out ivec2 binId) {
104
+ vec3 positionCommon = project_position(positions, positions64Low);
105
+ binId = pointToHexbin(positionCommon.xy, binOptions.radiusCommon);
106
+ }
107
+ void getValue(out vec2 value) {
108
+ value = vec2(colorWeights, elevationWeights);
109
+ }
110
+ `
111
+ })
66
112
  });
67
- this.state = {
68
- cpuAggregator,
69
- aggregatorState: cpuAggregator.state,
70
- vertices: null
71
- };
113
+ }
114
+ initializeState() {
115
+ super.initializeState();
72
116
  const attributeManager = this.getAttributeManager();
73
117
  attributeManager.add({
74
- positions: { size: 3, type: 'float64', accessor: 'getPosition' }
118
+ positions: {
119
+ size: 3,
120
+ accessor: 'getPosition',
121
+ type: 'float64',
122
+ fp64: this.use64bitPositions()
123
+ },
124
+ colorWeights: { size: 1, accessor: 'getColorWeight' },
125
+ elevationWeights: { size: 1, accessor: 'getElevationWeight' }
75
126
  });
76
- // color and elevation attributes can't be added as attributes
77
- // they are calculated using 'getValue' accessor that takes an array of pints.
78
127
  }
79
- updateState(opts) {
80
- super.updateState(opts);
81
- if (opts.changeFlags.propsOrDataChanged) {
82
- const aggregatorState = this.state.cpuAggregator.updateState(opts, {
83
- viewport: this.context.viewport,
84
- attributes: this.getAttributes()
128
+ updateState(params) {
129
+ const aggregatorChanged = super.updateState(params);
130
+ const { props, oldProps, changeFlags } = params;
131
+ const { aggregator } = this.state;
132
+ if ((changeFlags.dataChanged || !this.state.dataAsArray) &&
133
+ (props.getColorValue || props.getElevationValue)) {
134
+ // Convert data to array
135
+ this.state.dataAsArray = Array.from(createIterable(props.data).iterable);
136
+ }
137
+ if (aggregatorChanged ||
138
+ changeFlags.dataChanged ||
139
+ props.radius !== oldProps.radius ||
140
+ props.getColorValue !== oldProps.getColorValue ||
141
+ props.getElevationValue !== oldProps.getElevationValue ||
142
+ props.colorAggregation !== oldProps.colorAggregation ||
143
+ props.elevationAggregation !== oldProps.elevationAggregation) {
144
+ this._updateBinOptions();
145
+ const { radiusCommon, hexOriginCommon, binIdRange, dataAsArray } = this.state;
146
+ aggregator.setProps({
147
+ // @ts-expect-error only used by GPUAggregator
148
+ binIdRange,
149
+ pointCount: this.getNumInstances(),
150
+ operations: [props.colorAggregation, props.elevationAggregation],
151
+ binOptions: {
152
+ radiusCommon,
153
+ hexOriginCommon
154
+ },
155
+ onUpdate: this._onAggregationUpdate.bind(this)
85
156
  });
86
- if (this.state.aggregatorState.layerData !== aggregatorState.layerData) {
87
- // if user provided custom aggregator and returns hexagonVertices,
88
- // Need to recalculate radius and angle based on vertices
89
- // @ts-expect-error
90
- const { hexagonVertices } = aggregatorState.layerData || {};
91
- this.setState({
92
- vertices: hexagonVertices && this.convertLatLngToMeterOffset(hexagonVertices)
157
+ if (dataAsArray) {
158
+ const { getColorValue, getElevationValue } = this.props;
159
+ aggregator.setProps({
160
+ // @ts-expect-error only used by CPUAggregator
161
+ customOperations: [
162
+ getColorValue &&
163
+ ((indices) => getColorValue(indices.map(i => dataAsArray[i]), { indices, data: props.data })),
164
+ getElevationValue &&
165
+ ((indices) => getElevationValue(indices.map(i => dataAsArray[i]), { indices, data: props.data }))
166
+ ]
93
167
  });
94
168
  }
95
- this.setState({
96
- // make a copy of the internal state of cpuAggregator for testing
97
- aggregatorState
98
- });
99
169
  }
170
+ if (changeFlags.updateTriggersChanged && changeFlags.updateTriggersChanged.getColorValue) {
171
+ aggregator.setNeedsUpdate(0);
172
+ }
173
+ if (changeFlags.updateTriggersChanged && changeFlags.updateTriggersChanged.getElevationValue) {
174
+ aggregator.setNeedsUpdate(1);
175
+ }
176
+ return aggregatorChanged;
100
177
  }
101
- convertLatLngToMeterOffset(hexagonVertices) {
102
- const { viewport } = this.context;
103
- if (Array.isArray(hexagonVertices) && hexagonVertices.length === 6) {
104
- // get centroid of hexagons
105
- const vertex0 = hexagonVertices[0];
106
- const vertex3 = hexagonVertices[3];
107
- const centroid = [(vertex0[0] + vertex3[0]) / 2, (vertex0[1] + vertex3[1]) / 2];
108
- const centroidFlat = viewport.projectFlat(centroid);
109
- const { metersPerUnit } = viewport.getDistanceScales(centroid);
110
- // offset all points by centroid to meter offset
111
- const vertices = hexagonVertices.map(vt => {
112
- const vtFlat = viewport.projectFlat(vt);
113
- return [
114
- (vtFlat[0] - centroidFlat[0]) * metersPerUnit[0],
115
- (vtFlat[1] - centroidFlat[1]) * metersPerUnit[1]
116
- ];
178
+ _updateBinOptions() {
179
+ const bounds = this.getBounds();
180
+ let radiusCommon = 1;
181
+ let hexOriginCommon = [0, 0];
182
+ let binIdRange = [
183
+ [0, 1],
184
+ [0, 1]
185
+ ];
186
+ let viewport = this.context.viewport;
187
+ if (bounds && Number.isFinite(bounds[0][0])) {
188
+ let centroid = [(bounds[0][0] + bounds[1][0]) / 2, (bounds[0][1] + bounds[1][1]) / 2];
189
+ const { radius } = this.props;
190
+ const { unitsPerMeter } = viewport.getDistanceScales(centroid);
191
+ radiusCommon = unitsPerMeter[0] * radius;
192
+ // Use the centroid of the hex at the center of the data
193
+ // This offsets the common space without changing the bins
194
+ const centerHex = pointToHexbin(viewport.projectFlat(centroid), radiusCommon);
195
+ centroid = viewport.unprojectFlat(getHexbinCentroid(centerHex, radiusCommon));
196
+ const ViewportType = viewport.constructor;
197
+ // We construct a viewport for the GPU aggregator's project module
198
+ // This viewport is determined by data
199
+ // removes arbitrary precision variance that depends on initial view state
200
+ viewport = viewport.isGeospatial
201
+ ? new ViewportType({ longitude: centroid[0], latitude: centroid[1], zoom: 12 })
202
+ : new Viewport({ position: [centroid[0], centroid[1], 0], zoom: 12 });
203
+ hexOriginCommon = [Math.fround(viewport.center[0]), Math.fround(viewport.center[1])];
204
+ binIdRange = getBinIdRange({
205
+ dataBounds: bounds,
206
+ getBinId: (p) => {
207
+ const positionCommon = viewport.projectFlat(p);
208
+ positionCommon[0] -= hexOriginCommon[0];
209
+ positionCommon[1] -= hexOriginCommon[1];
210
+ return pointToHexbin(positionCommon, radiusCommon);
211
+ },
212
+ padding: 1
117
213
  });
118
- return vertices;
119
214
  }
120
- log.error('HexagonLayer: hexagonVertices needs to be an array of 6 points')();
121
- return null;
215
+ this.setState({ radiusCommon, hexOriginCommon, binIdRange, aggregatorViewport: viewport });
122
216
  }
123
- getPickingInfo({ info }) {
124
- return this.state.cpuAggregator.getPickingInfo({ info });
125
- }
126
- // create a method for testing
127
- _onGetSublayerColor(cell) {
128
- return this.state.cpuAggregator.getAccessor('fillColor')(cell);
217
+ draw(opts) {
218
+ // Replaces render time viewport with our own
219
+ if (opts.shaderModuleProps.project) {
220
+ opts.shaderModuleProps.project.viewport = this.state.aggregatorViewport;
221
+ }
222
+ super.draw(opts);
129
223
  }
130
- // create a method for testing
131
- _onGetSublayerElevation(cell) {
132
- return this.state.cpuAggregator.getAccessor('elevation')(cell);
224
+ _onAggregationUpdate({ channel }) {
225
+ const props = this.getCurrentLayer().props;
226
+ const { aggregator } = this.state;
227
+ if (channel === 0) {
228
+ const result = aggregator.getResult(0);
229
+ this.setState({
230
+ colors: new AttributeWithScale(result, aggregator.binCount)
231
+ });
232
+ props.onSetColorDomain(aggregator.getResultDomain(0));
233
+ }
234
+ else if (channel === 1) {
235
+ const result = aggregator.getResult(1);
236
+ this.setState({
237
+ elevations: new AttributeWithScale(result, aggregator.binCount)
238
+ });
239
+ props.onSetElevationDomain(aggregator.getResultDomain(1));
240
+ }
133
241
  }
134
- _getSublayerUpdateTriggers() {
135
- return this.state.cpuAggregator.getUpdateTriggers(this.props);
242
+ onAttributeChange(id) {
243
+ const { aggregator } = this.state;
244
+ switch (id) {
245
+ case 'positions':
246
+ aggregator.setNeedsUpdate();
247
+ this._updateBinOptions();
248
+ const { radiusCommon, hexOriginCommon, binIdRange } = this.state;
249
+ aggregator.setProps({
250
+ // @ts-expect-error only used by GPUAggregator
251
+ binIdRange,
252
+ binOptions: {
253
+ radiusCommon,
254
+ hexOriginCommon
255
+ }
256
+ });
257
+ break;
258
+ case 'colorWeights':
259
+ aggregator.setNeedsUpdate(0);
260
+ break;
261
+ case 'elevationWeights':
262
+ aggregator.setNeedsUpdate(1);
263
+ break;
264
+ default:
265
+ // This should not happen
266
+ }
136
267
  }
137
268
  renderLayers() {
138
- const { elevationScale, extruded, coverage, material, transitions } = this.props;
139
- const { aggregatorState, vertices } = this.state;
140
- const SubLayerClass = this.getSubLayerClass('hexagon-cell', ColumnLayer);
141
- const updateTriggers = this._getSublayerUpdateTriggers();
142
- const geometry = vertices
143
- ? { vertices, radius: 1 }
144
- : {
145
- // default geometry
146
- // @ts-expect-error TODO - undefined property?
147
- radius: aggregatorState.layerData.radiusCommon || 1,
148
- radiusUnits: 'common',
149
- angle: 90
150
- };
151
- return new SubLayerClass({
152
- ...geometry,
269
+ const { aggregator, radiusCommon, hexOriginCommon } = this.state;
270
+ const { elevationScale, colorRange, elevationRange, extruded, coverage, material, transitions, colorScaleType, lowerPercentile, upperPercentile, colorDomain, elevationScaleType, elevationLowerPercentile, elevationUpperPercentile, elevationDomain } = this.props;
271
+ const CellLayerClass = this.getSubLayerClass('cells', HexagonCellLayer);
272
+ const binAttribute = aggregator.getBins();
273
+ const colors = this.state.colors?.update({
274
+ scaleType: colorScaleType,
275
+ lowerPercentile,
276
+ upperPercentile
277
+ });
278
+ const elevations = this.state.elevations?.update({
279
+ scaleType: elevationScaleType,
280
+ lowerPercentile: elevationLowerPercentile,
281
+ upperPercentile: elevationUpperPercentile
282
+ });
283
+ if (!colors || !elevations) {
284
+ return null;
285
+ }
286
+ return new CellLayerClass(this.getSubLayerProps({
287
+ id: 'cells'
288
+ }), {
289
+ data: {
290
+ length: aggregator.binCount,
291
+ attributes: {
292
+ getBin: binAttribute,
293
+ getColorValue: colors.attribute,
294
+ getElevationValue: elevations.attribute
295
+ }
296
+ },
297
+ // Data has changed shallowly, but we likely don't need to update the attributes
298
+ dataComparator: (data, oldData) => data.length === oldData.length,
299
+ updateTriggers: {
300
+ getBin: [binAttribute],
301
+ getColorValue: [colors.attribute],
302
+ getElevationValue: [elevations.attribute]
303
+ },
153
304
  diskResolution: 6,
305
+ vertices: HexbinVertices,
306
+ radius: radiusCommon,
307
+ hexOriginCommon,
154
308
  elevationScale,
309
+ colorRange,
310
+ colorScaleType,
311
+ elevationRange,
155
312
  extruded,
156
313
  coverage,
157
314
  material,
158
- getFillColor: this._onGetSublayerColor.bind(this),
159
- getElevation: this._onGetSublayerElevation.bind(this),
315
+ colorDomain: colors.domain || colorDomain || aggregator.getResultDomain(0),
316
+ elevationDomain: elevations.domain || elevationDomain || aggregator.getResultDomain(1),
317
+ colorCutoff: colors.cutoff,
318
+ elevationCutoff: elevations.cutoff,
160
319
  transitions: transitions && {
161
320
  getFillColor: transitions.getColorValue || transitions.getColorWeight,
162
321
  getElevation: transitions.getElevationValue || transitions.getElevationWeight
163
- }
164
- }, this.getSubLayerProps({
165
- id: 'hexagon-cell',
166
- updateTriggers
167
- }), {
168
- data: aggregatorState.layerData.data
322
+ },
323
+ // Extensions are already handled by the GPUAggregator, do not pass it down
324
+ extensions: []
169
325
  });
170
326
  }
327
+ getPickingInfo(params) {
328
+ const info = params.info;
329
+ const { index } = info;
330
+ if (index >= 0) {
331
+ const bin = this.state.aggregator.getBin(index);
332
+ let object;
333
+ if (bin) {
334
+ const centroidCommon = getHexbinCentroid(bin.id, this.state.radiusCommon);
335
+ const centroid = this.context.viewport.unprojectFlat(centroidCommon);
336
+ object = {
337
+ col: bin.id[0],
338
+ row: bin.id[1],
339
+ position: centroid,
340
+ colorValue: bin.value[0],
341
+ elevationValue: bin.value[1],
342
+ count: bin.count
343
+ };
344
+ if (bin.pointIndices) {
345
+ object.pointIndices = bin.pointIndices;
346
+ object.points = Array.isArray(this.props.data)
347
+ ? bin.pointIndices.map(i => this.props.data[i])
348
+ : [];
349
+ }
350
+ }
351
+ info.object = object;
352
+ }
353
+ return info;
354
+ }
171
355
  }
172
356
  HexagonLayer.layerName = 'HexagonLayer';
173
357
  HexagonLayer.defaultProps = defaultProps;
174
358
  export default HexagonLayer;
359
+ //# sourceMappingURL=hexagon-layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hexagon-layer.js","sourceRoot":"","sources":["../../src/hexagon-layer/hexagon-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,gBAAgB,gCAA6B;AACpD,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAC,oBAAiB;AAC7F,OAAO,EAAa,kBAAkB,EAAC,kCAA+B;AAEtE,gEAAgE;AAChE,SAAS,IAAI,KAAI,CAAC;AAElB,MAAM,YAAY,GAAoC;IACpD,cAAc,EAAE,IAAI;IAEpB,QAAQ;IACR,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,iBAAiB;IAC7B,aAAa,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAC,EAAE,2EAA2E;IAC3H,cAAc,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAC;IAC5C,gBAAgB,EAAE,KAAK;IACvB,eAAe,EAAE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,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;;AAnYM,sBAAS,GAAG,cAAc,CAAC;AAC3B,yBAAY,GAAG,YAAY,CAAC;eALhB,YAAY"}
@@ -0,0 +1,17 @@
1
+ type HexBin = [i: number, j: number];
2
+ type Point = [x: number, y: number];
3
+ export declare const HexbinVertices: number[][];
4
+ /**
5
+ * Adapted from d3-hexbin
6
+ * Copyright Mike Bostock, 2012-2016
7
+ All rights reserved.
8
+ * https://github.com/d3/d3-hexbin/blob/master/src/hexbin.js
9
+ *
10
+ * Returns the hexbin that a point (x,y) falls into
11
+ */
12
+ export declare function pointToHexbin([px, py]: Point, radius: number): HexBin;
13
+ export declare const pointToHexbinGLSL: string;
14
+ export declare function getHexbinCentroid([i, j]: HexBin, radius: number): Point;
15
+ export declare const getHexbinCentroidGLSL: string;
16
+ export {};
17
+ //# sourceMappingURL=hexbin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hexbin.d.ts","sourceRoot":"","sources":["../../src/hexagon-layer/hexbin.ts"],"names":[],"mappings":"AAQA,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AACrC,KAAK,KAAK,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpC,eAAO,MAAM,cAAc,YAGzB,CAAC;AAEH;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAiBrE;AAED,eAAO,MAAM,iBAAiB,QAsB7B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAEvE;AAED,eAAO,MAAM,qBAAqB,QAOjC,CAAC"}
@@ -0,0 +1,70 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ const THIRD_PI = Math.PI / 3;
5
+ const DIST_X = 2 * Math.sin(THIRD_PI);
6
+ const DIST_Y = 1.5;
7
+ export const HexbinVertices = Array.from({ length: 6 }, (_, i) => {
8
+ const angle = i * THIRD_PI;
9
+ return [Math.sin(angle), -Math.cos(angle)];
10
+ });
11
+ /**
12
+ * Adapted from d3-hexbin
13
+ * Copyright Mike Bostock, 2012-2016
14
+ All rights reserved.
15
+ * https://github.com/d3/d3-hexbin/blob/master/src/hexbin.js
16
+ *
17
+ * Returns the hexbin that a point (x,y) falls into
18
+ */
19
+ export function pointToHexbin([px, py], radius) {
20
+ let pj = Math.round((py = py / radius / DIST_Y));
21
+ let pi = Math.round((px = px / radius / DIST_X - (pj & 1) / 2));
22
+ const py1 = py - pj;
23
+ if (Math.abs(py1) * 3 > 1) {
24
+ const px1 = px - pi;
25
+ const pi2 = pi + (px < pi ? -1 : 1) / 2;
26
+ const pj2 = pj + (py < pj ? -1 : 1);
27
+ const px2 = px - pi2;
28
+ const py2 = py - pj2;
29
+ if (px1 * px1 + py1 * py1 > px2 * px2 + py2 * py2) {
30
+ pi = pi2 + (pj & 1 ? 1 : -1) / 2;
31
+ pj = pj2;
32
+ }
33
+ }
34
+ return [pi, pj];
35
+ }
36
+ export const pointToHexbinGLSL = /* glsl */ `
37
+ const vec2 DIST = vec2(${DIST_X}, ${DIST_Y});
38
+
39
+ ivec2 pointToHexbin(vec2 p, float radius) {
40
+ p /= radius * DIST;
41
+ float pj = round(p.y);
42
+ float pjm2 = mod(pj, 2.0);
43
+ p.x -= pjm2 * 0.5;
44
+ float pi = round(p.x);
45
+ vec2 d1 = p - vec2(pi, pj);
46
+
47
+ if (abs(d1.y) * 3. > 1.) {
48
+ vec2 v2 = step(0.0, d1) - 0.5;
49
+ v2.y *= 2.0;
50
+ vec2 d2 = d1 - v2;
51
+ if (dot(d1, d1) > dot(d2, d2)) {
52
+ pi += v2.x + pjm2 - 0.5;
53
+ pj += v2.y;
54
+ }
55
+ }
56
+ return ivec2(pi, pj);
57
+ }
58
+ `;
59
+ export function getHexbinCentroid([i, j], radius) {
60
+ return [(i + (j & 1) / 2) * radius * DIST_X, j * radius * DIST_Y];
61
+ }
62
+ export const getHexbinCentroidGLSL = `
63
+ const vec2 DIST = vec2(${DIST_X}, ${DIST_Y});
64
+
65
+ vec2 hexbinCentroid(vec2 binId, float radius) {
66
+ binId.x += fract(binId.y * 0.5);
67
+ return binId * DIST * radius;
68
+ }
69
+ `;
70
+ //# sourceMappingURL=hexbin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hexbin.js","sourceRoot":"","sources":["../../src/hexagon-layer/hexbin.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7B,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtC,MAAM,MAAM,GAAG,GAAG,CAAC;AAKnB,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7C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