@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,79 +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-to-grid-vs
24
-
25
- in vec3 positions;
26
- in vec3 positions64Low;
27
- in vec3 weights;
28
- uniform vec2 cellSize;
29
- uniform vec2 gridSize;
30
- uniform bool projectPoints;
31
- uniform vec2 translation;
32
- uniform vec3 scaling;
33
-
34
- out vec3 vWeights;
35
-
36
- vec2 project_to_pixel(vec4 pos) {
37
- vec4 result;
38
- pos.xy = pos.xy/pos.w;
39
- result = pos + vec4(translation, 0., 0.);
40
- result.xy = scaling.z > 0. ? result.xy * scaling.xy : result.xy;
41
- return result.xy;
42
- }
43
-
44
- void main(void) {
45
-
46
- vWeights = weights;
47
-
48
- vec4 windowPos = vec4(positions, 1.);
49
- if (projectPoints) {
50
- windowPos = project_position_to_clipspace(positions, positions64Low, vec3(0));
51
- }
52
-
53
- vec2 pos = project_to_pixel(windowPos);
54
-
55
- vec2 pixelXY64[2];
56
- pixelXY64[0] = vec2(pos.x, 0.);
57
- pixelXY64[1] = vec2(pos.y, 0.);
58
-
59
- // Transform (0,0):windowSize -> (0, 0): gridSize
60
- vec2 gridXY64[2];
61
- gridXY64[0] = div_fp64(pixelXY64[0], vec2(cellSize.x, 0));
62
- gridXY64[1] = div_fp64(pixelXY64[1], vec2(cellSize.y, 0));
63
- float x = floor(gridXY64[0].x);
64
- float y = floor(gridXY64[1].x);
65
- pos = vec2(x, y);
66
-
67
- // Transform (0,0):gridSize -> (-1, -1):(1,1)
68
- pos = (pos * (2., 2.) / (gridSize)) - (1., 1.);
69
-
70
- // Move to pixel center, pixel-size in screen sapce (2/gridSize) * 0.5 => 1/gridSize
71
- vec2 offset = 1.0 / gridSize;
72
- pos = pos + offset;
73
-
74
- gl_Position = vec4(pos, 0.0, 1.0);
75
-
76
- // Enforce default value for ANGLE issue (https://bugs.chromium.org/p/angleproject/issues/detail?id=3941)
77
- gl_PointSize = 1.0;
78
- }
79
- `;
@@ -1,46 +0,0 @@
1
- import {GL} from '@luma.gl/constants';
2
- import {AGGREGATION_OPERATION} from '../aggregation-operation-utils';
3
-
4
- export const DEFAULT_RUN_PARAMS = {
5
- projectPoints: false,
6
- viewport: null,
7
- createBufferObjects: true,
8
- moduleSettings: {}
9
- };
10
-
11
- export const MAX_32_BIT_FLOAT = 3.402823466e38;
12
- export const MIN_BLEND_EQUATION = [GL.MIN, GL.FUNC_ADD];
13
- export const MAX_BLEND_EQUATION = [GL.MAX, GL.FUNC_ADD];
14
- export const MAX_MIN_BLEND_EQUATION = [GL.MAX, GL.MIN];
15
- export const EQUATION_MAP = {
16
- [AGGREGATION_OPERATION.SUM]: GL.FUNC_ADD,
17
- [AGGREGATION_OPERATION.MEAN]: GL.FUNC_ADD,
18
- [AGGREGATION_OPERATION.MIN]: MIN_BLEND_EQUATION,
19
- [AGGREGATION_OPERATION.MAX]: MAX_BLEND_EQUATION
20
- };
21
-
22
- export const ELEMENTCOUNT = 4;
23
- export const DEFAULT_WEIGHT_PARAMS = {
24
- size: 1,
25
- operation: AGGREGATION_OPERATION.SUM,
26
- needMin: false,
27
- needMax: false,
28
- combineMaxMin: false
29
- };
30
-
31
- export const PIXEL_SIZE = 4; // RGBA32F
32
- export const WEIGHT_SIZE = 3;
33
-
34
- export const MAX_MIN_TEXTURE_OPTS = {
35
- format: GL.RGBA32F,
36
- type: GL.FLOAT,
37
- border: 0,
38
- mipmaps: false,
39
- sampler: {
40
- minFilter: 'nearest',
41
- magFilter: 'nearest'
42
- },
43
- dataFormat: GL.RGBA,
44
- width: 1,
45
- height: 1
46
- };
@@ -1,155 +0,0 @@
1
- # GPUGridAggregator Class (Advanced) (WebGL2)
2
-
3
- `GPUGridAggregator` performs grid aggregation on GPU. Aggregation can be performed either in world space or in screen space.
4
-
5
- # Usage (Aggregation in World space)
6
- ```
7
- const aggregator = new GPUGridAggregator(device);
8
-
9
- const results = aggregator.run({
10
- attributes, // position and weight attributes
11
- weights: {
12
- weight1: {
13
- operation: AGGREGATION_OPERATION.MEAN,
14
- needMax: true,
15
- }
16
- },
17
- cellSize: [50, 50],
18
- width: 500,
19
- height: 500
20
- });
21
-
22
- // results.weight1.aggregationBuffer contains, one aggregated value for each grid cell, which is equal to mean weight of all sample points that fall into that grid cell.
23
- // results.weight1.maxBuffer contains max mean value of all grid cells.
24
-
25
- ```
26
-
27
- # Usage (Aggregation in Screen space)
28
-
29
- You can also perform aggregation in screen space by provide a viewport and set `projectPoints` to true. Aggregator will first project positions and then aggregate them in screen space.
30
-
31
- ```
32
- const aggregator = new GPUGridAggregator(device);
33
-
34
- const results = aggregator.run({
35
- attributes, // position and weight attributes
36
- weights: {
37
- weight1: {
38
- operation: AGGREGATION_OPERATION.MEAN,
39
- needMax: true,
40
- }
41
- },
42
- cellSize: [50, 50],
43
- width: 500,
44
- height: 500,
45
- viewport,
46
- projectPoints: true
47
- });
48
-
49
- // results.weight1.aggregationBuffer contains, one aggregated value for each grid cell, which is equal to mean weight of all sample points that fall into that grid cell.
50
- // results.weight1.maxBuffer contains max mean value of all grid cells.
51
-
52
- ```
53
-
54
- ## Methods
55
-
56
- ### constructor
57
-
58
- ‘ScreenGridAggregator’ constructor takes following arguments and constructs an object.
59
-
60
- * device (WebGLContext) : used for querying WebGL features and creating required webgl resources.
61
- * opts (Object) : Optionally contains and ‘id’ and ‘sahderCache’ object for caching/re-using shaders.
62
-
63
-
64
- ### run
65
-
66
- Performs aggregation either on CPU or GPU based on the provided options and browser’s WebGL capabilities.
67
-
68
- ```js
69
- const results = gpuGridAggregator.run({
70
- positions,
71
- weights,
72
- cellSize: [5, 5],
73
- viewport,
74
- changeFlags,
75
- projectPoints: true,
76
- translation,
77
- scaling
78
- });
79
- ```
80
-
81
- Parameters:
82
- * positions (Array) : Array of points in world space (lng, lat).
83
- * weights (Object) : Object contains one or more weights. Key represents id and corresponding object represents the weight. Each weight object contains following values:
84
-
85
- * `values` (Array, Float32Array or Buffer) : Contains weight values for all points, there should be 3 floats for each point, un-used values can be 0.
86
- * `size` (Number, default: 1, minValue: 1, maxValue: 3) : Size of a single weight instance. Determines how many distinct weights exist in the array.
87
- * `operation` (Enum {SUM, MEAN, MIN or MAX}, default: SUM) : Defines aggregation operation.
88
- * `needMin` (Boolean, default: false) : when true additional aggregation steps are performed to calculate minimum of all aggregation values and total count, result object will contain minBuffer.
89
- * `needMax` (Boolean, default: false) : when true additional aggregation steps are performed to calculate maximum of all aggregation values and total count, result object will contain maxBuffer.
90
- * `combineMaxMin` (Boolean, default: false) : Applicable only when `needMin` and `needMax` are set. When true, both min and max values are calculated in single aggregation step using `blendEquationSeparate` WebGL API. But since Alpha channel can only contain one float, it will only provide minimum value for first weight in Alpha channel and RGB channels store maximum value up to 3 weights. Also when selected total count is not available. Result object will contain maxMinBuffer.
91
-
92
- * cellSize: (Array) : Size of the cell, cellSize[0] is width and cellSize[1] is height.
93
- * width: (Number, Optional) : Grid width in pixels, deduced from ‘viewport’ when not provided.
94
- * height: (Number, Optional) : Grid height in pixels, deduced from ‘viewport’ when not provided.
95
- * viewport: (Object, Viewport) : Contains size of viewport and also used to perform projection.
96
- * changeFlags: (Object, Optional) : Object with following keyed values, that determine whether to re-create internal WebGL resources for performing aggregation compared to last run. If no value is provided, all flags are treated to be true.
97
- * dataChanged (Bool) : should be set to true when data is changed.
98
- * viewportChanged (Bool) : should be set to true when viewport is changed.
99
- * cellSizeChagned (Bool) : should be set to true when cellSize is changed.
100
- * countsBuffer: (Buffer, optional) : used to update aggregation data per grid, details in Output section.
101
- * maxCountBuffer: (Buffer, optional) : used to update total aggregation data, details in Output section.
102
- * projectPoints (Bool) : when true performs aggregation in screen space.
103
- * translation (Array) : [xOffset, yOffset], used to translate input positions before aggregating them (for example, lng/lat can be moved to +ve range).
104
- * scaling (Array) : [xScale, yScale, isScalingValid] : `xScale`, `yScale` define scaling to be applied before aggregating. Scaling is applied only when `isScalingValie` is > 0.
105
- * createBufferObjects (Bool, options, default: true) : Only applicable when aggregation is performed on CPU. When set to false, aggregated data is not uploaded into Buffer objects. In a typical use case, Applications need data in `Buffer` objects to use them in next rendering cycle, hence by default its value is true, but if needed this step can be avoided by setting this flag to false.
106
-
107
- NOTE: When doing screen space aggregation, i.e projectPoints is true, `translation` and `scaling` should be set to transformation required for camera space (NDC) to screen (pixel) space.
108
-
109
- Returns:
110
- * An object, where key represents `id` of the weight and value contains following aggregated data.
111
-
112
- * `aggregationBuffer` (Buffer) : Aggregated values per grid cell, aggregation is performed as per specified `operation`. Size of the buffer is 4, with R, G and B channel corresponds to aggregated weights. When input `size` is < 3, G or B channels contain undefined values. Alpha channel contains count of points aggregated into this cell. (R: weight#1 G: weight#2 B: weight#3 A: count)
113
-
114
- * `aggregationTexture` (Texture) : When aggregation is performed on GPU, contains above data as form of texture, useful for applications that want to consume the texture instead of buffer. This value is `null` when aggregation is performed on CPU.
115
-
116
- * `minBuffer` (Buffer, optional) : Contains data for one pixel with R, G, B and A channels contain min value of all aggregated grid cells. When aggregation is performed on CPU, `minBuffer` is `null` but `minData` Array is returned with same data. This value is `null` when `needMin` is false. (R: weight#1 min value G: weight#2 min value B: weight#3 min value A: total count)
117
-
118
- * `minTexture` (Texture2D, optional) : Texture2D object (1X1 size with RGBA_FLOAT_32 format) contains same data as `minBuffer`.
119
-
120
- * `maxBuffer` (Buffer, optional) : Contains data for one pixel with R, G, B and A channels contain max value of all aggregated grid cells. When aggregation is performed on CPU, `maxBuffer` is `null` but `maxData` Array is returned with same data. This value is `null` when `needMax` is false. (R: weight#1 max value G: weight#2 max value B: weight#3 max value A: total count)
121
-
122
- * `maxTexture` (Texture2D, optional) : Texture2D object (1X1 size with RGBA_FLOAT_32 format) contains same data as `maxBuffer`.
123
-
124
- * `maxMinBuffer` (Buffer, optional) : Contains data for one pixel, with RGB channels contains max value of all aggregated grid cells and A channel contains minimum value of all aggregated grid cells. When `combineMaxMin` is `false` this value will be `null`. (R: weight#1 max value G: weight#2 max value B: weight#3 max value A: weight#1 min value)
125
-
126
- * `maxMinTexture` (Texture2D, optional) : Texture2D object (1X1 size with RGBA_FLOAT_32 format) contains same data as `maxMinBuffer`.
127
-
128
- NOTES:
129
- * `minBuffer`, `maxBuffer` and `maxMinBuffer` are usually consumed by setting them as uniform buffer object or read by the CPU.
130
- * Aggregation data per cell, is always in `Buffer` objects to provide common API irrespective of whether aggregation is performed on CPU or GPU.
131
- * Min-max aggregation results is provided in form of `Texture2D` and `Buffer` objects whether aggregation is performed on CPU or GPU.
132
- * When aggregation is performed on CPU, min-max aggregation results are also provided in form of Float32Arrays.
133
-
134
-
135
- ### getData
136
-
137
- Reads aggregation results from GPU memory (Buffer) to CPU memory (Typed Arrays).
138
-
139
- ```js
140
- const aggregationResults = gpuGridAggregator.getData('weightId');
141
- ```
142
-
143
- Parameters:
144
- * `weightId` (String) : `id` of the weight for which aggregation data is needed.
145
-
146
- Returns:
147
- An object with aggregation results in CPU memory (Typed Arrays). Returned object contains following values :
148
- * `aggregationData` : Aggregated data per grid cell.
149
- Following additional arrays exist if they were requested when aggregation is performed.
150
- * `minData` : Min aggregation results.
151
- * `maxData` : Max aggregation results.
152
- * `maxMinData` : Combined max min aggregation results.
153
-
154
- Note:
155
- When aggregation is performed on GPU, `getData` performs Buffer read and can potentially an expensive operation due to CPU and GPU sync, in such cases data is also cached to avoid reading from GPU memory for subsequent calls.