@deck.gl/aggregation-layers 9.0.34 → 9.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) 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 +69 -0
  4. package/dist/common/aggregator/aggregator.d.ts +76 -0
  5. package/dist/common/aggregator/aggregator.d.ts.map +1 -0
  6. package/dist/common/aggregator/aggregator.js +4 -0
  7. package/dist/common/aggregator/cpu-aggregator/aggregate.d.ts +27 -0
  8. package/dist/common/aggregator/cpu-aggregator/aggregate.d.ts.map +1 -0
  9. package/dist/common/aggregator/cpu-aggregator/aggregate.js +66 -0
  10. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.d.ts +70 -0
  11. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.d.ts.map +1 -0
  12. package/dist/common/aggregator/cpu-aggregator/cpu-aggregator.js +139 -0
  13. package/dist/common/aggregator/cpu-aggregator/sort-bins.d.ts +15 -0
  14. package/dist/common/aggregator/cpu-aggregator/sort-bins.d.ts.map +1 -0
  15. package/dist/common/aggregator/cpu-aggregator/sort-bins.js +43 -0
  16. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.d.ts +21 -0
  17. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.d.ts.map +1 -0
  18. package/dist/common/aggregator/cpu-aggregator/vertex-accessor.js +55 -0
  19. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.d.ts +18 -0
  20. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.d.ts.map +1 -0
  21. package/dist/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.js +20 -0
  22. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.d.ts +14 -0
  23. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.d.ts.map +1 -0
  24. package/dist/common/aggregator/gpu-aggregator/bin-sorter-uniforms.js +17 -0
  25. package/dist/common/aggregator/gpu-aggregator/utils.d.ts +6 -0
  26. package/dist/common/aggregator/gpu-aggregator/utils.d.ts.map +1 -0
  27. package/dist/common/aggregator/gpu-aggregator/utils.js +24 -0
  28. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.d.ts +24 -0
  29. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.d.ts.map +1 -0
  30. package/dist/common/aggregator/gpu-aggregator/webgl-aggregation-transform.js +215 -0
  31. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.d.ts +81 -0
  32. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.d.ts.map +1 -0
  33. package/dist/common/aggregator/gpu-aggregator/webgl-aggregator.js +201 -0
  34. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.d.ts +38 -0
  35. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.d.ts.map +1 -0
  36. package/dist/common/aggregator/gpu-aggregator/webgl-bin-sorter.js +223 -0
  37. package/dist/common/aggregator/index.d.ts +6 -0
  38. package/dist/common/aggregator/index.d.ts.map +1 -0
  39. package/dist/common/aggregator/index.js +5 -0
  40. package/dist/common/types.d.ts +11 -0
  41. package/dist/common/types.d.ts.map +1 -0
  42. package/dist/common/types.js +4 -0
  43. package/dist/common/utils/bounds-utils.d.ts +10 -0
  44. package/dist/common/utils/bounds-utils.d.ts.map +1 -0
  45. package/dist/common/utils/bounds-utils.js +20 -0
  46. package/dist/common/utils/color-utils.d.ts +10 -0
  47. package/dist/common/utils/color-utils.d.ts.map +1 -0
  48. package/dist/common/utils/color-utils.js +65 -0
  49. package/dist/common/utils/prop-utils.d.ts.map +1 -0
  50. package/dist/common/utils/prop-utils.js +12 -0
  51. package/dist/common/utils/scale-utils.d.ts +46 -0
  52. package/dist/common/utils/scale-utils.d.ts.map +1 -0
  53. package/dist/common/utils/scale-utils.js +180 -0
  54. package/dist/contour-layer/bin-options-uniforms.d.ts +13 -0
  55. package/dist/contour-layer/bin-options-uniforms.d.ts.map +1 -0
  56. package/dist/contour-layer/bin-options-uniforms.js +17 -0
  57. package/dist/contour-layer/contour-layer.d.ts +42 -50
  58. package/dist/contour-layer/contour-layer.d.ts.map +1 -1
  59. package/dist/contour-layer/contour-layer.js +232 -192
  60. package/dist/contour-layer/contour-utils.d.ts +36 -15
  61. package/dist/contour-layer/contour-utils.d.ts.map +1 -1
  62. package/dist/contour-layer/contour-utils.js +24 -29
  63. package/dist/contour-layer/marching-squares-codes.d.ts.map +1 -1
  64. package/dist/contour-layer/marching-squares-codes.js +3 -0
  65. package/dist/contour-layer/marching-squares.d.ts +22 -6
  66. package/dist/contour-layer/marching-squares.d.ts.map +1 -1
  67. package/dist/contour-layer/marching-squares.js +71 -68
  68. package/dist/contour-layer/value-reader.d.ts +10 -0
  69. package/dist/contour-layer/value-reader.d.ts.map +1 -0
  70. package/dist/contour-layer/value-reader.js +46 -0
  71. package/dist/dist.dev.js +4842 -4081
  72. package/dist/grid-layer/bin-options-uniforms.d.ts +13 -0
  73. package/dist/grid-layer/bin-options-uniforms.d.ts.map +1 -0
  74. package/dist/grid-layer/bin-options-uniforms.js +17 -0
  75. package/dist/grid-layer/grid-cell-layer-vertex.glsl.d.ts +3 -0
  76. package/dist/grid-layer/grid-cell-layer-vertex.glsl.d.ts.map +1 -0
  77. package/dist/grid-layer/grid-cell-layer-vertex.glsl.js +51 -0
  78. package/dist/grid-layer/grid-cell-layer.d.ts +32 -0
  79. package/dist/grid-layer/grid-cell-layer.d.ts.map +1 -0
  80. package/dist/grid-layer/grid-cell-layer.js +93 -0
  81. package/dist/grid-layer/grid-layer-uniforms.d.ts +21 -0
  82. package/dist/grid-layer/grid-layer-uniforms.d.ts.map +1 -0
  83. package/dist/grid-layer/grid-layer-uniforms.js +23 -0
  84. package/dist/grid-layer/grid-layer.d.ts +175 -13
  85. package/dist/grid-layer/grid-layer.d.ts.map +1 -1
  86. package/dist/grid-layer/grid-layer.js +342 -46
  87. package/dist/{aggregation-layer.d.ts → heatmap-layer/aggregation-layer.d.ts} +1 -0
  88. package/dist/heatmap-layer/aggregation-layer.d.ts.map +1 -0
  89. package/dist/{aggregation-layer.js → heatmap-layer/aggregation-layer.js} +6 -21
  90. package/dist/heatmap-layer/heatmap-layer-uniforms.d.ts +30 -0
  91. package/dist/heatmap-layer/heatmap-layer-uniforms.d.ts.map +1 -0
  92. package/dist/heatmap-layer/heatmap-layer-uniforms.js +32 -0
  93. package/dist/heatmap-layer/heatmap-layer-utils.d.ts +1 -1
  94. package/dist/heatmap-layer/heatmap-layer-utils.d.ts.map +1 -1
  95. package/dist/heatmap-layer/heatmap-layer-utils.js +3 -0
  96. package/dist/heatmap-layer/heatmap-layer.d.ts +6 -4
  97. package/dist/heatmap-layer/heatmap-layer.d.ts.map +1 -1
  98. package/dist/heatmap-layer/heatmap-layer.js +43 -33
  99. package/dist/heatmap-layer/max-fs.glsl.d.ts.map +1 -1
  100. package/dist/heatmap-layer/max-fs.glsl.js +3 -0
  101. package/dist/heatmap-layer/max-vs.glsl.d.ts +1 -1
  102. package/dist/heatmap-layer/max-vs.glsl.d.ts.map +1 -1
  103. package/dist/heatmap-layer/max-vs.glsl.js +6 -4
  104. package/dist/heatmap-layer/triangle-layer-fragment.glsl.d.ts +1 -1
  105. package/dist/heatmap-layer/triangle-layer-fragment.glsl.d.ts.map +1 -1
  106. package/dist/heatmap-layer/triangle-layer-fragment.glsl.js +5 -23
  107. package/dist/heatmap-layer/triangle-layer-uniforms.d.ts +22 -0
  108. package/dist/heatmap-layer/triangle-layer-uniforms.d.ts.map +1 -0
  109. package/dist/heatmap-layer/triangle-layer-uniforms.js +22 -0
  110. package/dist/heatmap-layer/triangle-layer-vertex.glsl.d.ts +1 -1
  111. package/dist/heatmap-layer/triangle-layer-vertex.glsl.d.ts.map +1 -1
  112. package/dist/heatmap-layer/triangle-layer-vertex.glsl.js +10 -30
  113. package/dist/heatmap-layer/triangle-layer.d.ts +4 -10
  114. package/dist/heatmap-layer/triangle-layer.d.ts.map +1 -1
  115. package/dist/heatmap-layer/triangle-layer.js +17 -30
  116. package/dist/heatmap-layer/weights-fs.glsl.d.ts.map +1 -1
  117. package/dist/heatmap-layer/weights-fs.glsl.js +3 -0
  118. package/dist/heatmap-layer/weights-vs.glsl.d.ts +1 -1
  119. package/dist/heatmap-layer/weights-vs.glsl.d.ts.map +1 -1
  120. package/dist/heatmap-layer/weights-vs.glsl.js +6 -7
  121. package/dist/hexagon-layer/bin-options-uniforms.d.ts +14 -0
  122. package/dist/hexagon-layer/bin-options-uniforms.d.ts.map +1 -0
  123. package/dist/hexagon-layer/bin-options-uniforms.js +17 -0
  124. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.d.ts +3 -0
  125. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.d.ts.map +1 -0
  126. package/dist/hexagon-layer/hexagon-cell-layer-vertex.glsl.js +55 -0
  127. package/dist/hexagon-layer/hexagon-cell-layer.d.ts +29 -0
  128. package/dist/hexagon-layer/hexagon-cell-layer.d.ts.map +1 -0
  129. package/dist/hexagon-layer/hexagon-cell-layer.js +94 -0
  130. package/dist/hexagon-layer/hexagon-layer-uniforms.d.ts +19 -0
  131. package/dist/hexagon-layer/hexagon-layer-uniforms.d.ts.map +1 -0
  132. package/dist/hexagon-layer/hexagon-layer-uniforms.js +21 -0
  133. package/dist/hexagon-layer/hexagon-layer.d.ts +84 -54
  134. package/dist/hexagon-layer/hexagon-layer.d.ts.map +1 -1
  135. package/dist/hexagon-layer/hexagon-layer.js +307 -123
  136. package/dist/hexagon-layer/hexbin.d.ts +17 -0
  137. package/dist/hexagon-layer/hexbin.d.ts.map +1 -0
  138. package/dist/hexagon-layer/hexbin.js +69 -0
  139. package/dist/index.cjs +3025 -2946
  140. package/dist/index.cjs.map +4 -4
  141. package/dist/index.d.ts +7 -13
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.js +5 -27
  144. package/dist/screen-grid-layer/bin-options-uniforms.d.ts +11 -0
  145. package/dist/screen-grid-layer/bin-options-uniforms.d.ts.map +1 -0
  146. package/dist/screen-grid-layer/bin-options-uniforms.js +15 -0
  147. package/dist/screen-grid-layer/screen-grid-cell-layer.d.ts +11 -16
  148. package/dist/screen-grid-layer/screen-grid-cell-layer.d.ts.map +1 -1
  149. package/dist/screen-grid-layer/screen-grid-cell-layer.js +52 -134
  150. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts +1 -1
  151. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.d.ts.map +1 -1
  152. package/dist/screen-grid-layer/screen-grid-layer-fragment.glsl.js +4 -24
  153. package/dist/screen-grid-layer/screen-grid-layer-uniforms.d.ts +17 -0
  154. package/dist/screen-grid-layer/screen-grid-layer-uniforms.d.ts.map +1 -0
  155. package/dist/screen-grid-layer/screen-grid-layer-uniforms.js +19 -0
  156. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts +1 -1
  157. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.d.ts.map +1 -1
  158. package/dist/screen-grid-layer/screen-grid-layer-vertex.glsl.js +21 -62
  159. package/dist/screen-grid-layer/screen-grid-layer.d.ts +33 -40
  160. package/dist/screen-grid-layer/screen-grid-layer.d.ts.map +1 -1
  161. package/dist/screen-grid-layer/screen-grid-layer.js +157 -174
  162. package/dist.min.js +401 -382
  163. package/package.json +10 -9
  164. package/src/common/aggregation-layer.ts +107 -0
  165. package/src/common/aggregator/aggregator.ts +88 -0
  166. package/src/common/aggregator/cpu-aggregator/aggregate.ts +101 -0
  167. package/src/common/aggregator/cpu-aggregator/cpu-aggregator.ts +203 -0
  168. package/src/common/aggregator/cpu-aggregator/sort-bins.ts +63 -0
  169. package/src/common/aggregator/cpu-aggregator/vertex-accessor.ts +86 -0
  170. package/src/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.ts +33 -0
  171. package/src/common/aggregator/gpu-aggregator/bin-sorter-uniforms.ts +27 -0
  172. package/src/common/aggregator/gpu-aggregator/utils.ts +27 -0
  173. package/src/common/aggregator/gpu-aggregator/webgl-aggregation-transform.ts +247 -0
  174. package/src/common/aggregator/gpu-aggregator/webgl-aggregator.ts +274 -0
  175. package/src/common/aggregator/gpu-aggregator/webgl-bin-sorter.ts +258 -0
  176. package/src/common/aggregator/index.ts +10 -0
  177. package/src/{types.ts → common/types.ts} +10 -4
  178. package/src/common/utils/bounds-utils.ts +34 -0
  179. package/src/common/utils/color-utils.ts +86 -0
  180. package/src/common/utils/prop-utils.ts +13 -0
  181. package/src/common/utils/scale-utils.ts +236 -0
  182. package/src/contour-layer/bin-options-uniforms.ts +26 -0
  183. package/src/contour-layer/contour-layer.ts +300 -265
  184. package/src/contour-layer/contour-utils.ts +68 -39
  185. package/src/contour-layer/marching-squares-codes.ts +4 -0
  186. package/src/contour-layer/marching-squares.ts +93 -82
  187. package/src/contour-layer/value-reader.ts +65 -0
  188. package/src/grid-layer/bin-options-uniforms.ts +26 -0
  189. package/src/grid-layer/grid-cell-layer-vertex.glsl.ts +68 -0
  190. package/src/grid-layer/grid-cell-layer.ts +141 -0
  191. package/src/grid-layer/grid-layer-uniforms.ts +37 -0
  192. package/src/grid-layer/grid-layer.ts +614 -73
  193. package/src/{aggregation-layer.ts → heatmap-layer/aggregation-layer.ts} +6 -21
  194. package/src/heatmap-layer/heatmap-layer-uniforms.ts +50 -0
  195. package/src/heatmap-layer/heatmap-layer-utils.ts +9 -1
  196. package/src/heatmap-layer/heatmap-layer.ts +59 -36
  197. package/src/heatmap-layer/max-fs.glsl.ts +4 -0
  198. package/src/heatmap-layer/max-vs.glsl.ts +7 -4
  199. package/src/heatmap-layer/triangle-layer-fragment.glsl.ts +5 -23
  200. package/src/heatmap-layer/triangle-layer-uniforms.ts +37 -0
  201. package/src/heatmap-layer/triangle-layer-vertex.glsl.ts +10 -30
  202. package/src/heatmap-layer/triangle-layer.ts +26 -31
  203. package/src/heatmap-layer/weights-fs.glsl.ts +4 -0
  204. package/src/heatmap-layer/weights-vs.glsl.ts +7 -7
  205. package/src/hexagon-layer/bin-options-uniforms.ts +27 -0
  206. package/src/hexagon-layer/hexagon-cell-layer-vertex.glsl.ts +73 -0
  207. package/src/hexagon-layer/hexagon-cell-layer.ts +141 -0
  208. package/src/hexagon-layer/hexagon-layer-uniforms.ts +34 -0
  209. package/src/hexagon-layer/hexagon-layer.ts +454 -186
  210. package/src/hexagon-layer/hexbin.ts +79 -0
  211. package/src/index.ts +21 -34
  212. package/src/screen-grid-layer/bin-options-uniforms.ts +23 -0
  213. package/src/screen-grid-layer/screen-grid-cell-layer.ts +71 -156
  214. package/src/screen-grid-layer/screen-grid-layer-fragment.glsl.ts +4 -24
  215. package/src/screen-grid-layer/screen-grid-layer-uniforms.ts +31 -0
  216. package/src/screen-grid-layer/screen-grid-layer-vertex.glsl.ts +21 -64
  217. package/src/screen-grid-layer/screen-grid-layer.ts +194 -222
  218. package/dist/aggregation-layer.d.ts.map +0 -1
  219. package/dist/cpu-grid-layer/cpu-grid-layer.d.ts +0 -158
  220. package/dist/cpu-grid-layer/cpu-grid-layer.d.ts.map +0 -1
  221. package/dist/cpu-grid-layer/cpu-grid-layer.js +0 -130
  222. package/dist/cpu-grid-layer/grid-aggregator.d.ts +0 -35
  223. package/dist/cpu-grid-layer/grid-aggregator.d.ts.map +0 -1
  224. package/dist/cpu-grid-layer/grid-aggregator.js +0 -141
  225. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts +0 -3
  226. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.d.ts.map +0 -1
  227. package/dist/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.js +0 -30
  228. package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts +0 -3
  229. package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.d.ts.map +0 -1
  230. package/dist/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.js +0 -112
  231. package/dist/gpu-grid-layer/gpu-grid-cell-layer.d.ts +0 -48
  232. package/dist/gpu-grid-layer/gpu-grid-cell-layer.d.ts.map +0 -1
  233. package/dist/gpu-grid-layer/gpu-grid-cell-layer.js +0 -146
  234. package/dist/gpu-grid-layer/gpu-grid-layer.d.ts +0 -99
  235. package/dist/gpu-grid-layer/gpu-grid-layer.d.ts.map +0 -1
  236. package/dist/gpu-grid-layer/gpu-grid-layer.js +0 -289
  237. package/dist/grid-aggregation-layer.d.ts +0 -67
  238. package/dist/grid-aggregation-layer.d.ts.map +0 -1
  239. package/dist/grid-aggregation-layer.js +0 -173
  240. package/dist/hexagon-layer/hexagon-aggregator.d.ts +0 -27
  241. package/dist/hexagon-layer/hexagon-aggregator.d.ts.map +0 -1
  242. package/dist/hexagon-layer/hexagon-aggregator.js +0 -112
  243. package/dist/types.d.ts +0 -12
  244. package/dist/types.d.ts.map +0 -1
  245. package/dist/types.js +0 -1
  246. package/dist/utils/aggregation-operation-utils.d.ts +0 -19
  247. package/dist/utils/aggregation-operation-utils.d.ts.map +0 -1
  248. package/dist/utils/aggregation-operation-utils.js +0 -94
  249. package/dist/utils/bin-sorter.d.ts +0 -52
  250. package/dist/utils/bin-sorter.d.ts.map +0 -1
  251. package/dist/utils/bin-sorter.js +0 -167
  252. package/dist/utils/color-utils.d.ts +0 -3
  253. package/dist/utils/color-utils.d.ts.map +0 -1
  254. package/dist/utils/color-utils.js +0 -53
  255. package/dist/utils/cpu-aggregator.d.ts +0 -169
  256. package/dist/utils/cpu-aggregator.d.ts.map +0 -1
  257. package/dist/utils/cpu-aggregator.js +0 -421
  258. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts +0 -3
  259. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.d.ts.map +0 -1
  260. package/dist/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.js +0 -36
  261. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts +0 -3
  262. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.d.ts.map +0 -1
  263. package/dist/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.js +0 -42
  264. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts +0 -3
  265. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.d.ts.map +0 -1
  266. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.js +0 -30
  267. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts +0 -3
  268. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.d.ts.map +0 -1
  269. package/dist/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.js +0 -61
  270. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts +0 -38
  271. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.d.ts.map +0 -1
  272. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.js +0 -41
  273. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts +0 -1
  274. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.d.ts.map +0 -1
  275. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.js +0 -1
  276. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts +0 -76
  277. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.d.ts.map +0 -1
  278. package/dist/utils/gpu-grid-aggregation/gpu-grid-aggregator.js +0 -555
  279. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts +0 -3
  280. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.d.ts.map +0 -1
  281. package/dist/utils/gpu-grid-aggregation/transform-mean-vs.glsl.js +0 -32
  282. package/dist/utils/grid-aggregation-utils.d.ts +0 -30
  283. package/dist/utils/grid-aggregation-utils.d.ts.map +0 -1
  284. package/dist/utils/grid-aggregation-utils.js +0 -114
  285. package/dist/utils/prop-utils.d.ts.map +0 -1
  286. package/dist/utils/prop-utils.js +0 -28
  287. package/dist/utils/resource-utils.d.ts +0 -14
  288. package/dist/utils/resource-utils.d.ts.map +0 -1
  289. package/dist/utils/resource-utils.js +0 -38
  290. package/dist/utils/scale-utils.d.ts +0 -15
  291. package/dist/utils/scale-utils.d.ts.map +0 -1
  292. package/dist/utils/scale-utils.js +0 -184
  293. package/src/cpu-grid-layer/cpu-grid-layer.ts +0 -329
  294. package/src/cpu-grid-layer/grid-aggregator.ts +0 -184
  295. package/src/gpu-grid-layer/gpu-grid-cell-layer-fragment.glsl.ts +0 -35
  296. package/src/gpu-grid-layer/gpu-grid-cell-layer-vertex.glsl.ts +0 -143
  297. package/src/gpu-grid-layer/gpu-grid-cell-layer.ts +0 -201
  298. package/src/gpu-grid-layer/gpu-grid-layer.ts +0 -455
  299. package/src/grid-aggregation-layer.ts +0 -243
  300. package/src/hexagon-layer/hexagon-aggregator.ts +0 -127
  301. package/src/utils/aggregation-operation-utils.ts +0 -118
  302. package/src/utils/bin-sorter.ts +0 -218
  303. package/src/utils/color-utils.ts +0 -57
  304. package/src/utils/cpu-aggregator.ts +0 -503
  305. package/src/utils/gpu-grid-aggregation/aggregate-all-fs.glsl.ts +0 -40
  306. package/src/utils/gpu-grid-aggregation/aggregate-all-vs.glsl.ts +0 -54
  307. package/src/utils/gpu-grid-aggregation/aggregate-to-grid-fs.glsl.ts +0 -35
  308. package/src/utils/gpu-grid-aggregation/aggregate-to-grid-vs.glsl.ts +0 -79
  309. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator-constants.ts +0 -46
  310. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator-utils.ts +0 -0
  311. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.md +0 -155
  312. package/src/utils/gpu-grid-aggregation/gpu-grid-aggregator.ts +0 -690
  313. package/src/utils/gpu-grid-aggregation/transform-mean-vs.glsl.ts +0 -38
  314. package/src/utils/grid-aggregation-utils.ts +0 -147
  315. package/src/utils/prop-utils.ts +0 -29
  316. package/src/utils/resource-utils.ts +0 -53
  317. package/src/utils/scale-utils.js +0 -219
  318. /package/dist/{utils → common/utils}/prop-utils.d.ts +0 -0
@@ -1,38 +0,0 @@
1
- // Copyright (c) 2015 - 2018 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
-
21
- export default `\
22
- #version 300 es
23
- #define SHADER_NAME gpu-aggregation-transform-mean-vs
24
- in vec4 aggregationValues;
25
- out vec4 meanValues;
26
-
27
- void main()
28
- {
29
- // TODO: Use 64-bit division ?? not needed given this is aggregation ??
30
- bool isCellValid = bool(aggregationValues.w > 0.);
31
- // aggregationValues: XYZ contain aggregated values, W contains count
32
- meanValues.xyz = isCellValid ? aggregationValues.xyz/aggregationValues.w : vec3(0, 0, 0);
33
- meanValues.w = aggregationValues.w;
34
-
35
- // Enforce default value for ANGLE issue (https://bugs.chromium.org/p/angleproject/issues/detail?id=3941)
36
- gl_PointSize = 1.0;
37
- }
38
- `;
@@ -1,147 +0,0 @@
1
- import {log, COORDINATE_SYSTEM} from '@deck.gl/core';
2
- const R_EARTH = 6378000;
3
-
4
- function toFinite(n) {
5
- return Number.isFinite(n) ? n : 0;
6
- }
7
-
8
- // Parse input data to build positions, wights and bounding box.
9
- /* eslint-disable-next-line max-statements */
10
- export function getBoundingBox(attributes, vertexCount) {
11
- // TODO - value might not exist (e.g. attribute transition)
12
- const positions = attributes.positions.value;
13
-
14
- let yMin = Infinity;
15
- let yMax = -Infinity;
16
- let xMin = Infinity;
17
- let xMax = -Infinity;
18
- let y;
19
- let x;
20
-
21
- for (let i = 0; i < vertexCount; i++) {
22
- x = positions[i * 3];
23
- y = positions[i * 3 + 1];
24
- yMin = y < yMin ? y : yMin;
25
- yMax = y > yMax ? y : yMax;
26
- xMin = x < xMin ? x : xMin;
27
- xMax = x > xMax ? x : xMax;
28
- }
29
-
30
- const boundingBox = {
31
- xMin: toFinite(xMin),
32
- xMax: toFinite(xMax),
33
- yMin: toFinite(yMin),
34
- yMax: toFinite(yMax)
35
- };
36
-
37
- return boundingBox;
38
- }
39
- /* eslint-enable max-statements */
40
-
41
- // Returns XY translation for positions to peform aggregation in +ve sapce
42
- function getTranslation(boundingBox, gridOffset, coordinateSystem, viewport) {
43
- const {width, height} = viewport;
44
-
45
- // Origin to define grid
46
- // DEFAULT coordinate system is treated as LNGLAT
47
- const worldOrigin =
48
- coordinateSystem === COORDINATE_SYSTEM.CARTESIAN ? [-width / 2, -height / 2] : [-180, -90];
49
-
50
- // Other coordinate systems not supported/verified yet
51
- log.assert(
52
- coordinateSystem === COORDINATE_SYSTEM.CARTESIAN ||
53
- coordinateSystem === COORDINATE_SYSTEM.LNGLAT ||
54
- coordinateSystem === COORDINATE_SYSTEM.DEFAULT
55
- );
56
-
57
- const {xMin, yMin} = boundingBox;
58
- return [
59
- // Align origin to match grid cell boundaries in CPU and GPU aggregations
60
- -1 * (alignToCell(xMin - worldOrigin[0], gridOffset.xOffset) + worldOrigin[0]),
61
- -1 * (alignToCell(yMin - worldOrigin[1], gridOffset.yOffset) + worldOrigin[1])
62
- ];
63
- }
64
-
65
- // Aligns `inValue` to given `cellSize`
66
- export function alignToCell(inValue, cellSize) {
67
- const sign = inValue < 0 ? -1 : 1;
68
-
69
- let value = sign < 0 ? Math.abs(inValue) + cellSize : Math.abs(inValue);
70
-
71
- value = Math.floor(value / cellSize) * cellSize;
72
-
73
- return value * sign;
74
- }
75
-
76
- /**
77
- * Based on geometric center of sample points, calculate cellSize in lng/lat (degree) space
78
- * @param {object} boundingBox - {xMin, yMin, xMax, yMax} contains bounding box of data
79
- * @param {number} cellSize - grid cell size in meters
80
- * @param {boolean, optional} converToDegrees - when true offsets are converted from meters to lng/lat (degree) space
81
- * @returns {xOffset, yOffset} - cellSize size
82
- */
83
-
84
- export function getGridOffset(boundingBox, cellSize, convertToMeters = true) {
85
- if (!convertToMeters) {
86
- return {xOffset: cellSize, yOffset: cellSize};
87
- }
88
-
89
- const {yMin, yMax} = boundingBox;
90
- const centerLat = (yMin + yMax) / 2;
91
-
92
- return calculateGridLatLonOffset(cellSize, centerLat);
93
- }
94
-
95
- export function getGridParams(boundingBox, cellSize, viewport, coordinateSystem) {
96
- const gridOffset = getGridOffset(
97
- boundingBox,
98
- cellSize,
99
- coordinateSystem !== COORDINATE_SYSTEM.CARTESIAN
100
- );
101
-
102
- const translation = getTranslation(boundingBox, gridOffset, coordinateSystem, viewport);
103
-
104
- const {xMin, yMin, xMax, yMax} = boundingBox;
105
-
106
- const width = xMax - xMin + gridOffset.xOffset;
107
- const height = yMax - yMin + gridOffset.yOffset;
108
-
109
- const numCol = Math.ceil(width / gridOffset.xOffset);
110
- const numRow = Math.ceil(height / gridOffset.yOffset);
111
- return {gridOffset, translation, width, height, numCol, numRow};
112
- }
113
-
114
- /**
115
- * calculate grid layer cell size in lat lon based on world unit size
116
- * and current latitude
117
- * @param {number} cellSize
118
- * @param {number} latitude
119
- * @returns {object} - lat delta and lon delta
120
- */
121
- function calculateGridLatLonOffset(cellSize, latitude) {
122
- const yOffset = calculateLatOffset(cellSize);
123
- const xOffset = calculateLonOffset(latitude, cellSize);
124
- return {yOffset, xOffset};
125
- }
126
-
127
- /**
128
- * with a given x-km change, calculate the increment of latitude
129
- * based on stackoverflow http://stackoverflow.com/questions/7477003
130
- * @param {number} dy - change in km
131
- * @return {number} - increment in latitude
132
- */
133
- function calculateLatOffset(dy) {
134
- return (dy / R_EARTH) * (180 / Math.PI);
135
- }
136
-
137
- /**
138
- * with a given x-km change, and current latitude
139
- * calculate the increment of longitude
140
- * based on stackoverflow http://stackoverflow.com/questions/7477003
141
- * @param {number} lat - latitude of current location (based on city)
142
- * @param {number} dx - change in km
143
- * @return {number} - increment in longitude
144
- */
145
- function calculateLonOffset(lat, dx) {
146
- return ((dx / R_EARTH) * (180 / Math.PI)) / Math.cos((lat * Math.PI) / 180);
147
- }
@@ -1,29 +0,0 @@
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
-
21
- export function filterProps(props, filterKeys) {
22
- const filteredProps = {};
23
- for (const key in props) {
24
- if (!filterKeys.includes(key)) {
25
- filteredProps[key] = props[key];
26
- }
27
- }
28
- return filteredProps;
29
- }
@@ -1,53 +0,0 @@
1
- import {Device, SamplerProps} from '@luma.gl/core';
2
-
3
- const DEFAULT_PARAMETERS: SamplerProps = {
4
- minFilter: 'nearest',
5
- magFilter: 'nearest'
6
- };
7
-
8
- type FloatTextureOptions = {
9
- id: string;
10
- width?: number;
11
- height?: number;
12
- data?: any;
13
- unpackFlipY?: boolean;
14
- parameters?: SamplerProps;
15
- };
16
-
17
- // TODO - not working
18
- export function getFloatTexture(device: Device, opts: FloatTextureOptions) {
19
- const {width = 1, height = 1, data = null, parameters = DEFAULT_PARAMETERS} = opts;
20
- const texture = device.createTexture({
21
- data,
22
- format: 'rgba32float', // device.info.type === 'webgl2' ? 'rgba32float' : GL.RGBA,
23
- // type: GL.FLOAT,
24
- // border: 0,
25
- mipmaps: false,
26
- sampler: parameters,
27
- // dataFormat: GL.RGBA,
28
- width,
29
- height
30
- // ts-expect-error
31
- // unpackFlipY
32
- });
33
- return texture;
34
- }
35
-
36
- export function getFramebuffer(device: Device, opts) {
37
- const {id, width = 1, height = 1, texture} = opts;
38
- const fb = device.createFramebuffer({
39
- id,
40
- width,
41
- height,
42
- colorAttachments: [texture]
43
- });
44
-
45
- return fb;
46
- }
47
-
48
- export function getFloatArray(array, size, fillValue = 0) {
49
- if (!array || array.length < size) {
50
- return new Float32Array(size).fill(fillValue);
51
- }
52
- return array;
53
- }
@@ -1,219 +0,0 @@
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
-
21
- import {log} from '@deck.gl/core';
22
-
23
- // a scale function wrapper just like d3-scales
24
- export function getScale(domain, range, scaleFunction) {
25
- const scale = scaleFunction;
26
- scale.domain = () => domain;
27
- scale.range = () => range;
28
-
29
- return scale;
30
- }
31
-
32
- // Quantize scale is similar to linear scales,
33
- // except it uses a discrete rather than continuous range
34
- // return a quantize scale function
35
- export function getQuantizeScale(domain, range) {
36
- const scaleFunction = value => quantizeScale(domain, range, value);
37
-
38
- return getScale(domain, range, scaleFunction);
39
- }
40
-
41
- // return a linear scale function
42
- export function getLinearScale(domain, range) {
43
- const scaleFunction = value => linearScale(domain, range, value);
44
-
45
- return getScale(domain, range, scaleFunction);
46
- }
47
-
48
- export function getQuantileScale(domain, range) {
49
- // calculate threshold
50
- const sortedDomain = domain.sort(ascending);
51
- let i = 0;
52
- const n = Math.max(1, range.length);
53
- const thresholds = new Array(n - 1);
54
- while (++i < n) {
55
- thresholds[i - 1] = threshold(sortedDomain, i / n);
56
- }
57
-
58
- const scaleFunction = value => thresholdsScale(thresholds, range, value);
59
- scaleFunction.thresholds = () => thresholds;
60
-
61
- return getScale(domain, range, scaleFunction);
62
- }
63
-
64
- function ascending(a, b) {
65
- return a - b;
66
- }
67
-
68
- function threshold(domain, fraction) {
69
- const domainLength = domain.length;
70
- if (fraction <= 0 || domainLength < 2) {
71
- return domain[0];
72
- }
73
- if (fraction >= 1) {
74
- return domain[domainLength - 1];
75
- }
76
-
77
- const domainFraction = (domainLength - 1) * fraction;
78
- const lowIndex = Math.floor(domainFraction);
79
- const low = domain[lowIndex];
80
- const high = domain[lowIndex + 1];
81
- return low + (high - low) * (domainFraction - lowIndex);
82
- }
83
-
84
- function bisectRight(a, x) {
85
- let lo = 0;
86
- let hi = a.length;
87
- while (lo < hi) {
88
- const mid = (lo + hi) >>> 1;
89
- if (ascending(a[mid], x) > 0) {
90
- hi = mid;
91
- } else {
92
- lo = mid + 1;
93
- }
94
- }
95
- return lo;
96
- }
97
-
98
- // return a quantize scale function
99
- function thresholdsScale(thresholds, range, value) {
100
- return range[bisectRight(thresholds, value)];
101
- }
102
-
103
- // ordinal Scale
104
- function ordinalScale(domain, domainMap, range, value) {
105
- const key = `${value}`;
106
- let d = domainMap.get(key);
107
- if (d === undefined) {
108
- // update the domain
109
- d = domain.push(value);
110
- domainMap.set(key, d);
111
- }
112
- return range[(d - 1) % range.length];
113
- }
114
-
115
- export function getOrdinalScale(domain, range) {
116
- const domainMap = new Map();
117
- const uniqueDomain = [];
118
- for (const d of domain) {
119
- const key = `${d}`;
120
- if (!domainMap.has(key)) {
121
- domainMap.set(key, uniqueDomain.push(d));
122
- }
123
- }
124
-
125
- const scaleFunction = value => ordinalScale(uniqueDomain, domainMap, range, value);
126
-
127
- return getScale(domain, range, scaleFunction);
128
- }
129
-
130
- // Quantize scale is similar to linear scales,
131
- // except it uses a discrete rather than continuous range
132
- export function quantizeScale(domain, range, value) {
133
- const domainRange = domain[1] - domain[0];
134
- if (domainRange <= 0) {
135
- log.warn('quantizeScale: invalid domain, returning range[0]')();
136
- return range[0];
137
- }
138
- const step = domainRange / range.length;
139
- const idx = Math.floor((value - domain[0]) / step);
140
- const clampIdx = Math.max(Math.min(idx, range.length - 1), 0);
141
-
142
- return range[clampIdx];
143
- }
144
-
145
- // Linear scale maps continuous domain to continuous range
146
- export function linearScale(domain, range, value) {
147
- return ((value - domain[0]) / (domain[1] - domain[0])) * (range[1] - range[0]) + range[0];
148
- }
149
-
150
- // get scale domains
151
- function notNullOrUndefined(d) {
152
- return d !== undefined && d !== null;
153
- }
154
-
155
- export function unique(values) {
156
- const results = [];
157
- values.forEach(v => {
158
- if (!results.includes(v) && notNullOrUndefined(v)) {
159
- results.push(v);
160
- }
161
- });
162
-
163
- return results;
164
- }
165
-
166
- function getTruthyValues(data, valueAccessor) {
167
- const values = typeof valueAccessor === 'function' ? data.map(valueAccessor) : data;
168
- return values.filter(notNullOrUndefined);
169
- }
170
-
171
- export function getLinearDomain(data, valueAccessor) {
172
- const sorted = getTruthyValues(data, valueAccessor).sort();
173
- return sorted.length ? [sorted[0], sorted[sorted.length - 1]] : [0, 0];
174
- }
175
-
176
- export function getQuantileDomain(data, valueAccessor) {
177
- return getTruthyValues(data, valueAccessor);
178
- }
179
-
180
- export function getOrdinalDomain(data, valueAccessor) {
181
- return unique(getTruthyValues(data, valueAccessor));
182
- }
183
-
184
- export function getScaleDomain(scaleType, data, valueAccessor) {
185
- switch (scaleType) {
186
- case 'quantize':
187
- case 'linear':
188
- return getLinearDomain(data, valueAccessor);
189
-
190
- case 'quantile':
191
- return getQuantileDomain(data, valueAccessor);
192
-
193
- case 'ordinal':
194
- return getOrdinalDomain(data, valueAccessor);
195
-
196
- default:
197
- return getLinearDomain(data, valueAccessor);
198
- }
199
- }
200
-
201
- export function clamp(value, min, max) {
202
- return Math.max(min, Math.min(max, value));
203
- }
204
-
205
- export function getScaleFunctionByScaleType(scaleType) {
206
- switch (scaleType) {
207
- case 'quantize':
208
- return getQuantizeScale;
209
- case 'linear':
210
- return getLinearScale;
211
- case 'quantile':
212
- return getQuantileScale;
213
- case 'ordinal':
214
- return getOrdinalScale;
215
-
216
- default:
217
- return getQuantizeScale;
218
- }
219
- }
File without changes