@deck.gl/aggregation-layers 9.0.0-beta.2 → 9.0.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 (323) hide show
  1. package/dist/aggregation-layer.js +153 -0
  2. package/dist/contour-layer/contour-layer.js +241 -0
  3. package/dist/contour-layer/contour-utils.js +64 -0
  4. package/dist/contour-layer/marching-squares-codes.js +337 -0
  5. package/dist/contour-layer/marching-squares.js +147 -0
  6. package/dist/cpu-grid-layer/cpu-grid-layer.js +130 -0
  7. package/dist/cpu-grid-layer/grid-aggregator.js +141 -0
  8. package/dist/dist.dev.js +1296 -13614
  9. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +34 -0
  10. package/dist/{esm/gpu-grid-layer → gpu-grid-layer}/gpu-grid-cell-layer-vertex.glsl.js +20 -1
  11. package/dist/gpu-grid-layer/gpu-grid-cell-layer.js +145 -0
  12. package/dist/gpu-grid-layer/gpu-grid-layer.js +288 -0
  13. package/dist/grid-aggregation-layer.js +172 -0
  14. package/dist/grid-layer/grid-layer.js +63 -0
  15. package/dist/heatmap-layer/heatmap-layer-utils.js +63 -0
  16. package/dist/heatmap-layer/heatmap-layer.js +471 -0
  17. package/dist/{esm/heatmap-layer → heatmap-layer}/max-fs.glsl.js +0 -1
  18. package/dist/{esm/heatmap-layer → heatmap-layer}/max-vs.glsl.js +0 -1
  19. package/dist/heatmap-layer/triangle-layer-fragment.glsl.js +61 -0
  20. package/dist/heatmap-layer/triangle-layer-vertex.glsl.js +52 -0
  21. package/dist/heatmap-layer/triangle-layer.js +59 -0
  22. package/dist/{esm/heatmap-layer → heatmap-layer}/weights-fs.glsl.js +0 -1
  23. package/dist/{esm/heatmap-layer → heatmap-layer}/weights-vs.glsl.js +0 -1
  24. package/dist/hexagon-layer/hexagon-aggregator.js +112 -0
  25. package/dist/hexagon-layer/hexagon-layer.js +174 -0
  26. package/dist/index.cjs +4494 -0
  27. package/dist/index.cjs.map +7 -0
  28. package/dist/index.js +32 -0
  29. package/dist/screen-grid-layer/screen-grid-cell-layer.js +166 -0
  30. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.js +40 -0
  31. package/dist/{esm/screen-grid-layer → screen-grid-layer}/screen-grid-layer-vertex.glsl.js +19 -1
  32. package/dist/screen-grid-layer/screen-grid-layer.js +216 -0
  33. package/dist/types.js +1 -0
  34. package/dist/utils/aggregation-operation-utils.js +94 -0
  35. package/dist/utils/bin-sorter.js +167 -0
  36. package/dist/utils/color-utils.js +53 -0
  37. package/dist/utils/cpu-aggregator.js +421 -0
  38. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +39 -0
  39. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +53 -0
  40. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +34 -0
  41. package/dist/{esm/utils → utils}/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js +19 -1
  42. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +41 -0
  43. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +1 -0
  44. package/{typed → dist}/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts.map +1 -1
  45. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +566 -0
  46. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +37 -0
  47. package/dist/utils/grid-aggregation-utils.js +114 -0
  48. package/dist/utils/prop-utils.js +28 -0
  49. package/dist/utils/resource-utils.js +38 -0
  50. package/dist/utils/scale-utils.js +184 -0
  51. package/dist.min.js +60 -174
  52. package/package.json +18 -11
  53. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.ts +10 -13
  54. package/dist/es5/aggregation-layer.js +0 -215
  55. package/dist/es5/aggregation-layer.js.map +0 -1
  56. package/dist/es5/contour-layer/contour-layer.js +0 -353
  57. package/dist/es5/contour-layer/contour-layer.js.map +0 -1
  58. package/dist/es5/contour-layer/contour-utils.js +0 -110
  59. package/dist/es5/contour-layer/contour-utils.js.map +0 -1
  60. package/dist/es5/contour-layer/marching-squares-codes.js +0 -152
  61. package/dist/es5/contour-layer/marching-squares-codes.js.map +0 -1
  62. package/dist/es5/contour-layer/marching-squares.js +0 -168
  63. package/dist/es5/contour-layer/marching-squares.js.map +0 -1
  64. package/dist/es5/cpu-grid-layer/cpu-grid-layer.js +0 -235
  65. package/dist/es5/cpu-grid-layer/cpu-grid-layer.js.map +0 -1
  66. package/dist/es5/cpu-grid-layer/grid-aggregator.js +0 -180
  67. package/dist/es5/cpu-grid-layer/grid-aggregator.js.map +0 -1
  68. package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +0 -9
  69. package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js.map +0 -1
  70. package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +0 -9
  71. package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js.map +0 -1
  72. package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer.js +0 -247
  73. package/dist/es5/gpu-grid-layer/gpu-grid-cell-layer.js.map +0 -1
  74. package/dist/es5/gpu-grid-layer/gpu-grid-layer.js +0 -424
  75. package/dist/es5/gpu-grid-layer/gpu-grid-layer.js.map +0 -1
  76. package/dist/es5/grid-aggregation-layer.js +0 -280
  77. package/dist/es5/grid-aggregation-layer.js.map +0 -1
  78. package/dist/es5/grid-layer/grid-layer.js +0 -125
  79. package/dist/es5/grid-layer/grid-layer.js.map +0 -1
  80. package/dist/es5/heatmap-layer/heatmap-layer-utils.js +0 -107
  81. package/dist/es5/heatmap-layer/heatmap-layer-utils.js.map +0 -1
  82. package/dist/es5/heatmap-layer/heatmap-layer.js +0 -678
  83. package/dist/es5/heatmap-layer/heatmap-layer.js.map +0 -1
  84. package/dist/es5/heatmap-layer/max-fs.glsl.js +0 -9
  85. package/dist/es5/heatmap-layer/max-fs.glsl.js.map +0 -1
  86. package/dist/es5/heatmap-layer/max-vs.glsl.js +0 -9
  87. package/dist/es5/heatmap-layer/max-vs.glsl.js.map +0 -1
  88. package/dist/es5/heatmap-layer/triangle-layer-fragment.glsl.js +0 -9
  89. package/dist/es5/heatmap-layer/triangle-layer-fragment.glsl.js.map +0 -1
  90. package/dist/es5/heatmap-layer/triangle-layer-vertex.glsl.js +0 -9
  91. package/dist/es5/heatmap-layer/triangle-layer-vertex.glsl.js.map +0 -1
  92. package/dist/es5/heatmap-layer/triangle-layer.js +0 -121
  93. package/dist/es5/heatmap-layer/triangle-layer.js.map +0 -1
  94. package/dist/es5/heatmap-layer/weights-fs.glsl.js +0 -9
  95. package/dist/es5/heatmap-layer/weights-fs.glsl.js.map +0 -1
  96. package/dist/es5/heatmap-layer/weights-vs.glsl.js +0 -9
  97. package/dist/es5/heatmap-layer/weights-vs.glsl.js.map +0 -1
  98. package/dist/es5/hexagon-layer/hexagon-aggregator.js +0 -118
  99. package/dist/es5/hexagon-layer/hexagon-aggregator.js.map +0 -1
  100. package/dist/es5/hexagon-layer/hexagon-layer.js +0 -289
  101. package/dist/es5/hexagon-layer/hexagon-layer.js.map +0 -1
  102. package/dist/es5/index.js +0 -104
  103. package/dist/es5/index.js.map +0 -1
  104. package/dist/es5/screen-grid-layer/screen-grid-cell-layer.js +0 -244
  105. package/dist/es5/screen-grid-layer/screen-grid-cell-layer.js.map +0 -1
  106. package/dist/es5/screen-grid-layer/screen-grid-layer-fragment.glsl.js +0 -9
  107. package/dist/es5/screen-grid-layer/screen-grid-layer-fragment.glsl.js.map +0 -1
  108. package/dist/es5/screen-grid-layer/screen-grid-layer-vertex.glsl.js +0 -9
  109. package/dist/es5/screen-grid-layer/screen-grid-layer-vertex.glsl.js.map +0 -1
  110. package/dist/es5/screen-grid-layer/screen-grid-layer.js +0 -317
  111. package/dist/es5/screen-grid-layer/screen-grid-layer.js.map +0 -1
  112. package/dist/es5/types.js +0 -2
  113. package/dist/es5/types.js.map +0 -1
  114. package/dist/es5/utils/aggregation-operation-utils.js +0 -123
  115. package/dist/es5/utils/aggregation-operation-utils.js.map +0 -1
  116. package/dist/es5/utils/bin-sorter.js +0 -248
  117. package/dist/es5/utils/bin-sorter.js.map +0 -1
  118. package/dist/es5/utils/color-utils.js +0 -39
  119. package/dist/es5/utils/color-utils.js.map +0 -1
  120. package/dist/es5/utils/cpu-aggregator.js +0 -496
  121. package/dist/es5/utils/cpu-aggregator.js.map +0 -1
  122. package/dist/es5/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +0 -9
  123. package/dist/es5/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js.map +0 -1
  124. package/dist/es5/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +0 -9
  125. package/dist/es5/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js.map +0 -1
  126. package/dist/es5/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +0 -9
  127. package/dist/es5/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js.map +0 -1
  128. package/dist/es5/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js +0 -9
  129. package/dist/es5/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js.map +0 -1
  130. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +0 -63
  131. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js.map +0 -1
  132. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +0 -2
  133. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js.map +0 -1
  134. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +0 -732
  135. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator.js.map +0 -1
  136. package/dist/es5/utils/gpu-grid-aggregation/gpu-grid-aggregator.md +0 -155
  137. package/dist/es5/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +0 -9
  138. package/dist/es5/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js.map +0 -1
  139. package/dist/es5/utils/grid-aggregation-utils.js +0 -118
  140. package/dist/es5/utils/grid-aggregation-utils.js.map +0 -1
  141. package/dist/es5/utils/prop-utils.js +0 -19
  142. package/dist/es5/utils/prop-utils.js.map +0 -1
  143. package/dist/es5/utils/resource-utils.js +0 -59
  144. package/dist/es5/utils/resource-utils.js.map +0 -1
  145. package/dist/es5/utils/scale-utils.js +0 -254
  146. package/dist/es5/utils/scale-utils.js.map +0 -1
  147. package/dist/esm/aggregation-layer.js +0 -156
  148. package/dist/esm/aggregation-layer.js.map +0 -1
  149. package/dist/esm/contour-layer/contour-layer.js +0 -316
  150. package/dist/esm/contour-layer/contour-layer.js.map +0 -1
  151. package/dist/esm/contour-layer/contour-utils.js +0 -81
  152. package/dist/esm/contour-layer/contour-utils.js.map +0 -1
  153. package/dist/esm/contour-layer/marching-squares-codes.js +0 -219
  154. package/dist/esm/contour-layer/marching-squares-codes.js.map +0 -1
  155. package/dist/esm/contour-layer/marching-squares.js +0 -151
  156. package/dist/esm/contour-layer/marching-squares.js.map +0 -1
  157. package/dist/esm/cpu-grid-layer/cpu-grid-layer.js +0 -186
  158. package/dist/esm/cpu-grid-layer/cpu-grid-layer.js.map +0 -1
  159. package/dist/esm/cpu-grid-layer/grid-aggregator.js +0 -142
  160. package/dist/esm/cpu-grid-layer/grid-aggregator.js.map +0 -1
  161. package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +0 -16
  162. package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js.map +0 -1
  163. package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js.map +0 -1
  164. package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer.js +0 -196
  165. package/dist/esm/gpu-grid-layer/gpu-grid-cell-layer.js.map +0 -1
  166. package/dist/esm/gpu-grid-layer/gpu-grid-layer.js +0 -399
  167. package/dist/esm/gpu-grid-layer/gpu-grid-layer.js.map +0 -1
  168. package/dist/esm/grid-aggregation-layer.js +0 -240
  169. package/dist/esm/grid-aggregation-layer.js.map +0 -1
  170. package/dist/esm/grid-layer/grid-layer.js +0 -80
  171. package/dist/esm/grid-layer/grid-layer.js.map +0 -1
  172. package/dist/esm/heatmap-layer/heatmap-layer-utils.js +0 -55
  173. package/dist/esm/heatmap-layer/heatmap-layer-utils.js.map +0 -1
  174. package/dist/esm/heatmap-layer/heatmap-layer.js +0 -638
  175. package/dist/esm/heatmap-layer/heatmap-layer.js.map +0 -1
  176. package/dist/esm/heatmap-layer/max-fs.glsl.js.map +0 -1
  177. package/dist/esm/heatmap-layer/max-vs.glsl.js.map +0 -1
  178. package/dist/esm/heatmap-layer/triangle-layer-fragment.glsl.js +0 -43
  179. package/dist/esm/heatmap-layer/triangle-layer-fragment.glsl.js.map +0 -1
  180. package/dist/esm/heatmap-layer/triangle-layer-vertex.glsl.js +0 -33
  181. package/dist/esm/heatmap-layer/triangle-layer-vertex.glsl.js.map +0 -1
  182. package/dist/esm/heatmap-layer/triangle-layer.js +0 -78
  183. package/dist/esm/heatmap-layer/triangle-layer.js.map +0 -1
  184. package/dist/esm/heatmap-layer/weights-fs.glsl.js.map +0 -1
  185. package/dist/esm/heatmap-layer/weights-vs.glsl.js.map +0 -1
  186. package/dist/esm/hexagon-layer/hexagon-aggregator.js +0 -87
  187. package/dist/esm/hexagon-layer/hexagon-aggregator.js.map +0 -1
  188. package/dist/esm/hexagon-layer/hexagon-layer.js +0 -232
  189. package/dist/esm/hexagon-layer/hexagon-layer.js.map +0 -1
  190. package/dist/esm/index.js +0 -13
  191. package/dist/esm/index.js.map +0 -1
  192. package/dist/esm/screen-grid-layer/screen-grid-cell-layer.js +0 -203
  193. package/dist/esm/screen-grid-layer/screen-grid-cell-layer.js.map +0 -1
  194. package/dist/esm/screen-grid-layer/screen-grid-layer-fragment.glsl.js +0 -21
  195. package/dist/esm/screen-grid-layer/screen-grid-layer-fragment.glsl.js.map +0 -1
  196. package/dist/esm/screen-grid-layer/screen-grid-layer-vertex.glsl.js.map +0 -1
  197. package/dist/esm/screen-grid-layer/screen-grid-layer.js +0 -285
  198. package/dist/esm/screen-grid-layer/screen-grid-layer.js.map +0 -1
  199. package/dist/esm/types.js +0 -2
  200. package/dist/esm/types.js.map +0 -1
  201. package/dist/esm/utils/aggregation-operation-utils.js +0 -91
  202. package/dist/esm/utils/aggregation-operation-utils.js.map +0 -1
  203. package/dist/esm/utils/bin-sorter.js +0 -165
  204. package/dist/esm/utils/bin-sorter.js.map +0 -1
  205. package/dist/esm/utils/color-utils.js +0 -28
  206. package/dist/esm/utils/color-utils.js.map +0 -1
  207. package/dist/esm/utils/cpu-aggregator.js +0 -487
  208. package/dist/esm/utils/cpu-aggregator.js.map +0 -1
  209. package/dist/esm/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +0 -21
  210. package/dist/esm/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js.map +0 -1
  211. package/dist/esm/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +0 -35
  212. package/dist/esm/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js.map +0 -1
  213. package/dist/esm/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +0 -16
  214. package/dist/esm/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js.map +0 -1
  215. package/dist/esm/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js.map +0 -1
  216. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +0 -42
  217. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js.map +0 -1
  218. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +0 -2
  219. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js.map +0 -1
  220. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +0 -720
  221. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator.js.map +0 -1
  222. package/dist/esm/utils/gpu-grid-aggregation/gpu-grid-aggregator.md +0 -155
  223. package/dist/esm/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +0 -19
  224. package/dist/esm/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js.map +0 -1
  225. package/dist/esm/utils/grid-aggregation-utils.js +0 -109
  226. package/dist/esm/utils/grid-aggregation-utils.js.map +0 -1
  227. package/dist/esm/utils/prop-utils.js +0 -12
  228. package/dist/esm/utils/prop-utils.js.map +0 -1
  229. package/dist/esm/utils/resource-utils.js +0 -44
  230. package/dist/esm/utils/resource-utils.js.map +0 -1
  231. package/dist/esm/utils/scale-utils.js +0 -192
  232. package/dist/esm/utils/scale-utils.js.map +0 -1
  233. /package/{typed → dist}/aggregation-layer.d.ts +0 -0
  234. /package/{typed → dist}/aggregation-layer.d.ts.map +0 -0
  235. /package/{typed → dist}/contour-layer/contour-layer.d.ts +0 -0
  236. /package/{typed → dist}/contour-layer/contour-layer.d.ts.map +0 -0
  237. /package/{typed → dist}/contour-layer/contour-utils.d.ts +0 -0
  238. /package/{typed → dist}/contour-layer/contour-utils.d.ts.map +0 -0
  239. /package/{typed → dist}/contour-layer/marching-squares-codes.d.ts +0 -0
  240. /package/{typed → dist}/contour-layer/marching-squares-codes.d.ts.map +0 -0
  241. /package/{typed → dist}/contour-layer/marching-squares.d.ts +0 -0
  242. /package/{typed → dist}/contour-layer/marching-squares.d.ts.map +0 -0
  243. /package/{typed → dist}/cpu-grid-layer/cpu-grid-layer.d.ts +0 -0
  244. /package/{typed → dist}/cpu-grid-layer/cpu-grid-layer.d.ts.map +0 -0
  245. /package/{typed → dist}/cpu-grid-layer/grid-aggregator.d.ts +0 -0
  246. /package/{typed → dist}/cpu-grid-layer/grid-aggregator.d.ts.map +0 -0
  247. /package/{typed → dist}/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts +0 -0
  248. /package/{typed → dist}/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts.map +0 -0
  249. /package/{typed → dist}/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts +0 -0
  250. /package/{typed → dist}/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts.map +0 -0
  251. /package/{typed → dist}/gpu-grid-layer/gpu-grid-cell-layer.d.ts +0 -0
  252. /package/{typed → dist}/gpu-grid-layer/gpu-grid-cell-layer.d.ts.map +0 -0
  253. /package/{typed → dist}/gpu-grid-layer/gpu-grid-layer.d.ts +0 -0
  254. /package/{typed → dist}/gpu-grid-layer/gpu-grid-layer.d.ts.map +0 -0
  255. /package/{typed → dist}/grid-aggregation-layer.d.ts +0 -0
  256. /package/{typed → dist}/grid-aggregation-layer.d.ts.map +0 -0
  257. /package/{typed → dist}/grid-layer/grid-layer.d.ts +0 -0
  258. /package/{typed → dist}/grid-layer/grid-layer.d.ts.map +0 -0
  259. /package/{typed → dist}/heatmap-layer/heatmap-layer-utils.d.ts +0 -0
  260. /package/{typed → dist}/heatmap-layer/heatmap-layer-utils.d.ts.map +0 -0
  261. /package/{typed → dist}/heatmap-layer/heatmap-layer.d.ts +0 -0
  262. /package/{typed → dist}/heatmap-layer/heatmap-layer.d.ts.map +0 -0
  263. /package/{typed → dist}/heatmap-layer/max-fs.glsl.d.ts +0 -0
  264. /package/{typed → dist}/heatmap-layer/max-fs.glsl.d.ts.map +0 -0
  265. /package/{typed → dist}/heatmap-layer/max-vs.glsl.d.ts +0 -0
  266. /package/{typed → dist}/heatmap-layer/max-vs.glsl.d.ts.map +0 -0
  267. /package/{typed → dist}/heatmap-layer/triangle-layer-fragment.glsl.d.ts +0 -0
  268. /package/{typed → dist}/heatmap-layer/triangle-layer-fragment.glsl.d.ts.map +0 -0
  269. /package/{typed → dist}/heatmap-layer/triangle-layer-vertex.glsl.d.ts +0 -0
  270. /package/{typed → dist}/heatmap-layer/triangle-layer-vertex.glsl.d.ts.map +0 -0
  271. /package/{typed → dist}/heatmap-layer/triangle-layer.d.ts +0 -0
  272. /package/{typed → dist}/heatmap-layer/triangle-layer.d.ts.map +0 -0
  273. /package/{typed → dist}/heatmap-layer/weights-fs.glsl.d.ts +0 -0
  274. /package/{typed → dist}/heatmap-layer/weights-fs.glsl.d.ts.map +0 -0
  275. /package/{typed → dist}/heatmap-layer/weights-vs.glsl.d.ts +0 -0
  276. /package/{typed → dist}/heatmap-layer/weights-vs.glsl.d.ts.map +0 -0
  277. /package/{typed → dist}/hexagon-layer/hexagon-aggregator.d.ts +0 -0
  278. /package/{typed → dist}/hexagon-layer/hexagon-aggregator.d.ts.map +0 -0
  279. /package/{typed → dist}/hexagon-layer/hexagon-layer.d.ts +0 -0
  280. /package/{typed → dist}/hexagon-layer/hexagon-layer.d.ts.map +0 -0
  281. /package/{typed → dist}/index.d.ts +0 -0
  282. /package/{typed → dist}/index.d.ts.map +0 -0
  283. /package/{typed → dist}/screen-grid-layer/screen-grid-cell-layer.d.ts +0 -0
  284. /package/{typed → dist}/screen-grid-layer/screen-grid-cell-layer.d.ts.map +0 -0
  285. /package/{typed → dist}/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts +0 -0
  286. /package/{typed → dist}/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts.map +0 -0
  287. /package/{typed → dist}/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts +0 -0
  288. /package/{typed → dist}/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts.map +0 -0
  289. /package/{typed → dist}/screen-grid-layer/screen-grid-layer.d.ts +0 -0
  290. /package/{typed → dist}/screen-grid-layer/screen-grid-layer.d.ts.map +0 -0
  291. /package/{typed → dist}/types.d.ts +0 -0
  292. /package/{typed → dist}/types.d.ts.map +0 -0
  293. /package/{typed → dist}/utils/aggregation-operation-utils.d.ts +0 -0
  294. /package/{typed → dist}/utils/aggregation-operation-utils.d.ts.map +0 -0
  295. /package/{typed → dist}/utils/bin-sorter.d.ts +0 -0
  296. /package/{typed → dist}/utils/bin-sorter.d.ts.map +0 -0
  297. /package/{typed → dist}/utils/color-utils.d.ts +0 -0
  298. /package/{typed → dist}/utils/color-utils.d.ts.map +0 -0
  299. /package/{typed → dist}/utils/cpu-aggregator.d.ts +0 -0
  300. /package/{typed → dist}/utils/cpu-aggregator.d.ts.map +0 -0
  301. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts +0 -0
  302. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts.map +0 -0
  303. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts +0 -0
  304. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts.map +0 -0
  305. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts +0 -0
  306. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts.map +0 -0
  307. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts +0 -0
  308. /package/{typed → dist}/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts.map +0 -0
  309. /package/{typed → dist}/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts +0 -0
  310. /package/{typed → dist}/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts.map +0 -0
  311. /package/{typed → dist}/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts +0 -0
  312. /package/{typed → dist}/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts.map +0 -0
  313. /package/{typed → dist}/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts +0 -0
  314. /package/{typed → dist}/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts +0 -0
  315. /package/{typed → dist}/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts.map +0 -0
  316. /package/{typed → dist}/utils/grid-aggregation-utils.d.ts +0 -0
  317. /package/{typed → dist}/utils/grid-aggregation-utils.d.ts.map +0 -0
  318. /package/{typed → dist}/utils/prop-utils.d.ts +0 -0
  319. /package/{typed → dist}/utils/prop-utils.d.ts.map +0 -0
  320. /package/{typed → dist}/utils/resource-utils.d.ts +0 -0
  321. /package/{typed → dist}/utils/resource-utils.d.ts.map +0 -0
  322. /package/{typed → dist}/utils/scale-utils.d.ts +0 -0
  323. /package/{typed → dist}/utils/scale-utils.d.ts.map +0 -0
@@ -0,0 +1,52 @@
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
+ // Inspired by screen-grid-layer vertex shader in deck.gl
21
+ export default `\
22
+ #version 300 es
23
+ #define SHADER_NAME heatp-map-layer-vertex-shader
24
+
25
+ uniform sampler2D maxTexture;
26
+ uniform float intensity;
27
+ uniform vec2 colorDomain;
28
+ uniform float threshold;
29
+ uniform float aggregationMode;
30
+
31
+ in vec3 positions;
32
+ in vec2 texCoords;
33
+
34
+ out vec2 vTexCoords;
35
+ out float vIntensityMin;
36
+ out float vIntensityMax;
37
+
38
+ void main(void) {
39
+ gl_Position = project_position_to_clipspace(positions, vec3(0.0), vec3(0.0));
40
+ vTexCoords = texCoords;
41
+ vec4 maxTexture = texture(maxTexture, vec2(0.5));
42
+ float maxValue = aggregationMode < 0.5 ? maxTexture.r : maxTexture.g;
43
+ float minValue = maxValue * threshold;
44
+ if (colorDomain[1] > 0.) {
45
+ // if user specified custom domain use it.
46
+ maxValue = colorDomain[1];
47
+ minValue = colorDomain[0];
48
+ }
49
+ vIntensityMax = intensity / maxValue;
50
+ vIntensityMin = intensity / minValue;
51
+ }
52
+ `;
@@ -0,0 +1,59 @@
1
+ // Copyright (c) 2015 - 2019 Uber Technologies, Inc.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to deal
5
+ // in the Software without restriction, including without limitation the rights
6
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ // copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ import { Model } from '@luma.gl/engine';
21
+ import { Layer, project32 } from '@deck.gl/core';
22
+ import vs from "./triangle-layer-vertex.glsl.js";
23
+ import fs from "./triangle-layer-fragment.glsl.js";
24
+ export default class TriangleLayer extends Layer {
25
+ static { this.layerName = 'TriangleLayer'; }
26
+ getShaders() {
27
+ return { vs, fs, modules: [project32] };
28
+ }
29
+ initializeState({ device }) {
30
+ this.setState({ model: this._getModel(device) });
31
+ }
32
+ _getModel(device) {
33
+ const { vertexCount, data, weightsTexture, maxTexture, colorTexture } = this.props;
34
+ return new Model(device, {
35
+ ...this.getShaders(),
36
+ id: this.props.id,
37
+ bindings: { weightsTexture, maxTexture, colorTexture },
38
+ attributes: data.attributes,
39
+ bufferLayout: [
40
+ { name: 'positions', format: 'float32x3' },
41
+ { name: 'texCoords', format: 'float32x2' }
42
+ ],
43
+ topology: 'triangle-fan-webgl',
44
+ vertexCount
45
+ });
46
+ }
47
+ draw({ uniforms }) {
48
+ const { model } = this.state;
49
+ const { intensity, threshold, aggregationMode, colorDomain } = this.props;
50
+ model.setUniforms({
51
+ ...uniforms,
52
+ intensity,
53
+ threshold,
54
+ aggregationMode,
55
+ colorDomain
56
+ });
57
+ model.draw(this.context.renderPass);
58
+ }
59
+ }
@@ -19,4 +19,3 @@ void main()
19
19
  DECKGL_FILTER_COLOR(fragColor, geometry);
20
20
  }
21
21
  `;
22
- //# sourceMappingURL=weights-fs.glsl.js.map
@@ -24,4 +24,3 @@ void main()
24
24
  gl_Position.w = 1.0;
25
25
  }
26
26
  `;
27
- //# sourceMappingURL=weights-vs.glsl.js.map
@@ -0,0 +1,112 @@
1
+ // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to deal
5
+ // in the Software without restriction, including without limitation the rights
6
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ // copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ import { hexbin } from 'd3-hexbin';
21
+ import { createIterable, log } from '@deck.gl/core';
22
+ /**
23
+ * Use d3-hexbin to performs hexagonal binning from geo points to hexagons
24
+ * @param {Iterable} data - array of points
25
+ * @param {Number} radius - hexagon radius in meter
26
+ * @param {function} getPosition - get points lon lat
27
+ * @param {Object} viewport - current viewport object
28
+
29
+ * @return {Object} - hexagons and countRange
30
+ */
31
+ export function pointToHexbin(props, aggregationParams) {
32
+ const { data, radius } = props;
33
+ const { viewport, attributes } = aggregationParams;
34
+ // get hexagon radius in mercator world unit
35
+ const centerLngLat = data.length ? getPointsCenter(data, aggregationParams) : null;
36
+ const radiusCommon = getRadiusInCommon(radius, viewport, centerLngLat);
37
+ // add world space coordinates to points
38
+ const screenPoints = [];
39
+ const { iterable, objectInfo } = createIterable(data);
40
+ const positions = attributes.positions.value;
41
+ const { size } = attributes.positions.getAccessor();
42
+ for (const object of iterable) {
43
+ objectInfo.index++;
44
+ const posIndex = objectInfo.index * size;
45
+ const position = [positions[posIndex], positions[posIndex + 1]];
46
+ const arrayIsFinite = Number.isFinite(position[0]) && Number.isFinite(position[1]);
47
+ if (arrayIsFinite) {
48
+ screenPoints.push({
49
+ screenCoord: viewport.projectFlat(position),
50
+ source: object,
51
+ index: objectInfo.index
52
+ });
53
+ }
54
+ else {
55
+ log.warn('HexagonLayer: invalid position')();
56
+ }
57
+ }
58
+ const newHexbin = hexbin()
59
+ .radius(radiusCommon)
60
+ .x(d => d.screenCoord[0])
61
+ .y(d => d.screenCoord[1]);
62
+ const hexagonBins = newHexbin(screenPoints);
63
+ return {
64
+ hexagons: hexagonBins.map((hex, index) => ({
65
+ position: viewport.unprojectFlat([hex.x, hex.y]),
66
+ points: hex,
67
+ index
68
+ })),
69
+ radiusCommon
70
+ };
71
+ }
72
+ /**
73
+ * Get the bounding box of all data points
74
+ */
75
+ export function getPointsCenter(data, aggregationParams) {
76
+ const { attributes } = aggregationParams;
77
+ const positions = attributes.positions.value;
78
+ const { size } = attributes.positions.getAccessor();
79
+ let minX = Infinity;
80
+ let minY = Infinity;
81
+ let maxX = -Infinity;
82
+ let maxY = -Infinity;
83
+ let i;
84
+ for (i = 0; i < size * data.length; i += size) {
85
+ const x = positions[i];
86
+ const y = positions[i + 1];
87
+ const arrayIsFinite = Number.isFinite(x) && Number.isFinite(y);
88
+ if (arrayIsFinite) {
89
+ minX = Math.min(x, minX);
90
+ maxX = Math.max(x, maxX);
91
+ minY = Math.min(y, minY);
92
+ maxY = Math.max(y, maxY);
93
+ }
94
+ }
95
+ // return center
96
+ return [minX, minY, maxX, maxY].every(Number.isFinite)
97
+ ? [(minX + maxX) / 2, (minY + maxY) / 2]
98
+ : null;
99
+ }
100
+ /**
101
+ * Get radius in mercator world space coordinates from meter
102
+ * @param {Number} radius - in meter
103
+ * @param {Object} viewport - current viewport object
104
+ * @param {Array<Number>} center - data center
105
+
106
+ * @return {Number} radius in mercator world spcae coordinates
107
+ */
108
+ export function getRadiusInCommon(radius, viewport, center) {
109
+ const { unitsPerMeter } = viewport.getDistanceScales(center);
110
+ // x, y distance should be the same
111
+ return radius * unitsPerMeter[0];
112
+ }
@@ -0,0 +1,174 @@
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 { GL } from '@luma.gl/constants';
23
+ import { defaultColorRange } from "../utils/color-utils.js";
24
+ import { pointToHexbin } from "./hexagon-aggregator.js";
25
+ import CPUAggregator from "../utils/cpu-aggregator.js";
26
+ import AggregationLayer from "../aggregation-layer.js";
27
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
28
+ function nop() { }
29
+ const defaultProps = {
30
+ // color
31
+ colorDomain: null,
32
+ colorRange: defaultColorRange,
33
+ getColorValue: { type: 'accessor', value: null }, // default value is calcuated from `getColorWeight` and `colorAggregation`
34
+ getColorWeight: { type: 'accessor', value: 1 },
35
+ colorAggregation: 'SUM',
36
+ lowerPercentile: { type: 'number', value: 0, min: 0, max: 100 },
37
+ upperPercentile: { type: 'number', value: 100, min: 0, max: 100 },
38
+ colorScaleType: 'quantize',
39
+ onSetColorDomain: nop,
40
+ // elevation
41
+ elevationDomain: null,
42
+ elevationRange: [0, 1000],
43
+ getElevationValue: { type: 'accessor', value: null }, // default value is calcuated from `getElevationWeight` and `elevationAggregation`
44
+ getElevationWeight: { type: 'accessor', value: 1 },
45
+ elevationAggregation: 'SUM',
46
+ elevationLowerPercentile: { type: 'number', value: 0, min: 0, max: 100 },
47
+ elevationUpperPercentile: { type: 'number', value: 100, min: 0, max: 100 },
48
+ elevationScale: { type: 'number', min: 0, value: 1 },
49
+ elevationScaleType: 'linear',
50
+ onSetElevationDomain: nop,
51
+ radius: { type: 'number', value: 1000, min: 1 },
52
+ coverage: { type: 'number', min: 0, max: 1, value: 1 },
53
+ extruded: false,
54
+ hexagonAggregator: pointToHexbin,
55
+ getPosition: { type: 'accessor', value: (x) => x.position },
56
+ // Optional material for 'lighting' shader module
57
+ material: true,
58
+ // data filter
59
+ _filterData: { type: 'function', value: null, optional: true }
60
+ };
61
+ /** Aggregates data into a hexagon-based heatmap. The color and height of a hexagon are determined based on the objects it contains. */
62
+ export default class HexagonLayer extends AggregationLayer {
63
+ static { this.layerName = 'HexagonLayer'; }
64
+ static { this.defaultProps = defaultProps; }
65
+ initializeState() {
66
+ const cpuAggregator = new CPUAggregator({
67
+ getAggregator: props => props.hexagonAggregator,
68
+ getCellSize: props => props.radius
69
+ });
70
+ this.state = {
71
+ cpuAggregator,
72
+ aggregatorState: cpuAggregator.state,
73
+ vertices: null
74
+ };
75
+ const attributeManager = this.getAttributeManager();
76
+ attributeManager.add({
77
+ positions: { size: 3, type: GL.DOUBLE, accessor: 'getPosition' }
78
+ });
79
+ // color and elevation attributes can't be added as attributes
80
+ // they are calculated using 'getValue' accessor that takes an array of pints.
81
+ }
82
+ updateState(opts) {
83
+ super.updateState(opts);
84
+ if (opts.changeFlags.propsOrDataChanged) {
85
+ const aggregatorState = this.state.cpuAggregator.updateState(opts, {
86
+ viewport: this.context.viewport,
87
+ attributes: this.getAttributes()
88
+ });
89
+ if (this.state.aggregatorState.layerData !== aggregatorState.layerData) {
90
+ // if user provided custom aggregator and returns hexagonVertices,
91
+ // Need to recalculate radius and angle based on vertices
92
+ // @ts-expect-error
93
+ const { hexagonVertices } = aggregatorState.layerData || {};
94
+ this.setState({
95
+ vertices: hexagonVertices && this.convertLatLngToMeterOffset(hexagonVertices)
96
+ });
97
+ }
98
+ this.setState({
99
+ // make a copy of the internal state of cpuAggregator for testing
100
+ aggregatorState
101
+ });
102
+ }
103
+ }
104
+ convertLatLngToMeterOffset(hexagonVertices) {
105
+ const { viewport } = this.context;
106
+ if (Array.isArray(hexagonVertices) && hexagonVertices.length === 6) {
107
+ // get centroid of hexagons
108
+ const vertex0 = hexagonVertices[0];
109
+ const vertex3 = hexagonVertices[3];
110
+ const centroid = [(vertex0[0] + vertex3[0]) / 2, (vertex0[1] + vertex3[1]) / 2];
111
+ const centroidFlat = viewport.projectFlat(centroid);
112
+ const { metersPerUnit } = viewport.getDistanceScales(centroid);
113
+ // offset all points by centroid to meter offset
114
+ const vertices = hexagonVertices.map(vt => {
115
+ const vtFlat = viewport.projectFlat(vt);
116
+ return [
117
+ (vtFlat[0] - centroidFlat[0]) * metersPerUnit[0],
118
+ (vtFlat[1] - centroidFlat[1]) * metersPerUnit[1]
119
+ ];
120
+ });
121
+ return vertices;
122
+ }
123
+ log.error('HexagonLayer: hexagonVertices needs to be an array of 6 points')();
124
+ return null;
125
+ }
126
+ getPickingInfo({ info }) {
127
+ return this.state.cpuAggregator.getPickingInfo({ info });
128
+ }
129
+ // create a method for testing
130
+ _onGetSublayerColor(cell) {
131
+ return this.state.cpuAggregator.getAccessor('fillColor')(cell);
132
+ }
133
+ // create a method for testing
134
+ _onGetSublayerElevation(cell) {
135
+ return this.state.cpuAggregator.getAccessor('elevation')(cell);
136
+ }
137
+ _getSublayerUpdateTriggers() {
138
+ return this.state.cpuAggregator.getUpdateTriggers(this.props);
139
+ }
140
+ renderLayers() {
141
+ const { elevationScale, extruded, coverage, material, transitions } = this.props;
142
+ const { aggregatorState, vertices } = this.state;
143
+ const SubLayerClass = this.getSubLayerClass('hexagon-cell', ColumnLayer);
144
+ const updateTriggers = this._getSublayerUpdateTriggers();
145
+ const geometry = vertices
146
+ ? { vertices, radius: 1 }
147
+ : {
148
+ // default geometry
149
+ // @ts-expect-error TODO - undefined property?
150
+ radius: aggregatorState.layerData.radiusCommon || 1,
151
+ radiusUnits: 'common',
152
+ angle: 90
153
+ };
154
+ return new SubLayerClass({
155
+ ...geometry,
156
+ diskResolution: 6,
157
+ elevationScale,
158
+ extruded,
159
+ coverage,
160
+ material,
161
+ getFillColor: this._onGetSublayerColor.bind(this),
162
+ getElevation: this._onGetSublayerElevation.bind(this),
163
+ transitions: transitions && {
164
+ getFillColor: transitions.getColorValue || transitions.getColorWeight,
165
+ getElevation: transitions.getElevationValue || transitions.getElevationWeight
166
+ }
167
+ }, this.getSubLayerProps({
168
+ id: 'hexagon-cell',
169
+ updateTriggers
170
+ }), {
171
+ data: aggregatorState.layerData.data
172
+ });
173
+ }
174
+ }