@antv/l7-layers 2.9.24 → 2.9.26-alpha.0

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 (579) hide show
  1. package/package.json +6 -6
  2. package/es/Geometry/index.d.ts +0 -19
  3. package/es/Geometry/index.js +0 -106
  4. package/es/Geometry/models/billboard.d.ts +0 -26
  5. package/es/Geometry/models/billboard.js +0 -232
  6. package/es/Geometry/models/index.d.ts +0 -5
  7. package/es/Geometry/models/index.js +0 -9
  8. package/es/Geometry/models/plane.d.ts +0 -45
  9. package/es/Geometry/models/plane.js +0 -421
  10. package/es/Geometry/models/sprite.d.ts +0 -47
  11. package/es/Geometry/models/sprite.js +0 -304
  12. package/es/Geometry/shaders/billboard_frag.glsl +0 -13
  13. package/es/Geometry/shaders/billboard_vert.glsl +0 -50
  14. package/es/Geometry/shaders/plane_frag.glsl +0 -22
  15. package/es/Geometry/shaders/plane_vert.glsl +0 -53
  16. package/es/Geometry/shaders/sprite_frag.glsl +0 -21
  17. package/es/Geometry/shaders/sprite_vert.glsl +0 -28
  18. package/es/canvas/index.d.ts +0 -19
  19. package/es/canvas/index.js +0 -91
  20. package/es/canvas/models/canvas.d.ts +0 -18
  21. package/es/canvas/models/canvas.js +0 -212
  22. package/es/canvas/models/index.d.ts +0 -5
  23. package/es/canvas/models/index.js +0 -5
  24. package/es/citybuliding/building.d.ts +0 -17
  25. package/es/citybuliding/building.js +0 -88
  26. package/es/citybuliding/models/build.d.ts +0 -22
  27. package/es/citybuliding/models/build.js +0 -188
  28. package/es/citybuliding/shaders/build_frag.glsl +0 -117
  29. package/es/citybuliding/shaders/build_vert.glsl +0 -54
  30. package/es/core/BaseLayer.d.ts +0 -208
  31. package/es/core/BaseLayer.js +0 -1409
  32. package/es/core/BaseModel.d.ts +0 -140
  33. package/es/core/BaseModel.js +0 -486
  34. package/es/core/interface.d.ts +0 -201
  35. package/es/core/interface.js +0 -30
  36. package/es/core/schema.d.ts +0 -27
  37. package/es/core/schema.js +0 -25
  38. package/es/core/shape/Path.d.ts +0 -39
  39. package/es/core/shape/Path.js +0 -62
  40. package/es/core/shape/extrude.d.ts +0 -17
  41. package/es/core/shape/extrude.js +0 -148
  42. package/es/core/triangulation.d.ts +0 -122
  43. package/es/core/triangulation.js +0 -491
  44. package/es/earth/index.d.ts +0 -17
  45. package/es/earth/index.js +0 -91
  46. package/es/earth/models/atmosphere.d.ts +0 -9
  47. package/es/earth/models/atmosphere.js +0 -138
  48. package/es/earth/models/base.d.ts +0 -16
  49. package/es/earth/models/base.js +0 -212
  50. package/es/earth/models/bloomsphere.d.ts +0 -9
  51. package/es/earth/models/bloomsphere.js +0 -138
  52. package/es/earth/shaders/atmosphere_frag.glsl +0 -17
  53. package/es/earth/shaders/atmosphere_vert.glsl +0 -26
  54. package/es/earth/shaders/base_frag.glsl +0 -13
  55. package/es/earth/shaders/base_vert.glsl +0 -52
  56. package/es/earth/shaders/bloomsphere_frag.glsl +0 -15
  57. package/es/earth/shaders/bloomsphere_vert.glsl +0 -20
  58. package/es/earth/utils.d.ts +0 -26
  59. package/es/earth/utils.js +0 -104
  60. package/es/heatmap/index.d.ts +0 -21
  61. package/es/heatmap/index.js +0 -145
  62. package/es/heatmap/models/grid.d.ts +0 -8
  63. package/es/heatmap/models/grid.js +0 -108
  64. package/es/heatmap/models/grid3d.d.ts +0 -8
  65. package/es/heatmap/models/grid3d.js +0 -147
  66. package/es/heatmap/models/heatmap.d.ts +0 -24
  67. package/es/heatmap/models/heatmap.js +0 -464
  68. package/es/heatmap/models/hexagon.d.ts +0 -8
  69. package/es/heatmap/models/hexagon.js +0 -111
  70. package/es/heatmap/models/index.d.ts +0 -5
  71. package/es/heatmap/models/index.js +0 -12
  72. package/es/heatmap/shaders/grid_vert.glsl +0 -42
  73. package/es/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
  74. package/es/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
  75. package/es/heatmap/shaders/heatmap_frag.glsl +0 -47
  76. package/es/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
  77. package/es/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
  78. package/es/heatmap/shaders/heatmap_vert.glsl +0 -10
  79. package/es/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
  80. package/es/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
  81. package/es/heatmap/shaders/hexagon_frag.glsl +0 -12
  82. package/es/heatmap/shaders/hexagon_vert.glsl +0 -41
  83. package/es/heatmap/triangulation.d.ts +0 -5
  84. package/es/heatmap/triangulation.js +0 -38
  85. package/es/image/index.d.ts +0 -19
  86. package/es/image/index.js +0 -103
  87. package/es/image/models/dataImage.d.ts +0 -22
  88. package/es/image/models/dataImage.js +0 -225
  89. package/es/image/models/image.d.ts +0 -19
  90. package/es/image/models/image.js +0 -169
  91. package/es/image/models/index.d.ts +0 -5
  92. package/es/image/models/index.js +0 -7
  93. package/es/image/shaders/dataImage_frag.glsl +0 -38
  94. package/es/image/shaders/image_frag.glsl +0 -9
  95. package/es/image/shaders/image_vert.glsl +0 -17
  96. package/es/index.d.ts +0 -16
  97. package/es/index.js +0 -106
  98. package/es/line/index.d.ts +0 -25
  99. package/es/line/index.js +0 -119
  100. package/es/line/models/arc.d.ts +0 -17
  101. package/es/line/models/arc.js +0 -356
  102. package/es/line/models/arc_3d.d.ts +0 -17
  103. package/es/line/models/arc_3d.js +0 -335
  104. package/es/line/models/earthArc_3d.d.ts +0 -17
  105. package/es/line/models/earthArc_3d.js +0 -338
  106. package/es/line/models/great_circle.d.ts +0 -12
  107. package/es/line/models/great_circle.js +0 -294
  108. package/es/line/models/half.d.ts +0 -18
  109. package/es/line/models/half.js +0 -282
  110. package/es/line/models/index.d.ts +0 -5
  111. package/es/line/models/index.js +0 -25
  112. package/es/line/models/line.d.ts +0 -21
  113. package/es/line/models/line.js +0 -442
  114. package/es/line/models/linearline.d.ts +0 -11
  115. package/es/line/models/linearline.js +0 -276
  116. package/es/line/models/simpleLine.d.ts +0 -14
  117. package/es/line/models/simpleLine.js +0 -233
  118. package/es/line/models/tile.d.ts +0 -11
  119. package/es/line/models/tile.js +0 -351
  120. package/es/line/models/wall.d.ts +0 -12
  121. package/es/line/models/wall.js +0 -329
  122. package/es/line/shaders/arc_chunks.vert.glsl +0 -21
  123. package/es/line/shaders/dash/arc_dash_frag.glsl +0 -28
  124. package/es/line/shaders/dash/arc_dash_vert.glsl +0 -148
  125. package/es/line/shaders/dash/line_dash_frag.glsl +0 -31
  126. package/es/line/shaders/dash/line_dash_vert.glsl +0 -93
  127. package/es/line/shaders/half/line_half_frag.glsl +0 -53
  128. package/es/line/shaders/half/line_half_vert.glsl +0 -169
  129. package/es/line/shaders/line_arc2d_vert.glsl +0 -114
  130. package/es/line/shaders/line_arc_3d_frag.glsl +0 -103
  131. package/es/line/shaders/line_arc_3d_vert.glsl +0 -207
  132. package/es/line/shaders/line_arc_frag.glsl +0 -89
  133. package/es/line/shaders/line_arc_great_circle_frag.glsl +0 -101
  134. package/es/line/shaders/line_arc_great_circle_vert.glsl +0 -215
  135. package/es/line/shaders/line_arc_vert.glsl +0 -176
  136. package/es/line/shaders/line_bezier_vert.glsl +0 -85
  137. package/es/line/shaders/line_frag.glsl +0 -100
  138. package/es/line/shaders/line_vert.glsl +0 -192
  139. package/es/line/shaders/linear/arc3d_linear_frag.glsl +0 -47
  140. package/es/line/shaders/linear/arc3d_linear_vert.glsl +0 -207
  141. package/es/line/shaders/linear/arc_linear_frag.glsl +0 -38
  142. package/es/line/shaders/linear/arc_linear_vert.glsl +0 -138
  143. package/es/line/shaders/linear/line_linear_frag.glsl +0 -27
  144. package/es/line/shaders/linearLine/line_linear_frag.glsl +0 -20
  145. package/es/line/shaders/linearLine/line_linear_vert.glsl +0 -112
  146. package/es/line/shaders/simple/simpleline_frag.glsl +0 -10
  147. package/es/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
  148. package/es/line/shaders/simple/simpleline_vert.glsl +0 -79
  149. package/es/line/shaders/tile/line_tile_frag.glsl +0 -79
  150. package/es/line/shaders/tile/line_tile_vert.glsl +0 -210
  151. package/es/line/shaders/wall_frag.glsl +0 -93
  152. package/es/line/shaders/wall_vert.glsl +0 -111
  153. package/es/mask/index.d.ts +0 -18
  154. package/es/mask/index.js +0 -82
  155. package/es/mask/models/fill.d.ts +0 -11
  156. package/es/mask/models/fill.js +0 -121
  157. package/es/mask/models/index.d.ts +0 -5
  158. package/es/mask/models/index.js +0 -5
  159. package/es/mask/shaders/mask_frag.glsl +0 -7
  160. package/es/mask/shaders/mask_vert.glsl +0 -22
  161. package/es/plugins/DataMappingPlugin.d.ts +0 -18
  162. package/es/plugins/DataMappingPlugin.js +0 -345
  163. package/es/plugins/DataSourcePlugin.d.ts +0 -7
  164. package/es/plugins/DataSourcePlugin.js +0 -89
  165. package/es/plugins/FeatureScalePlugin.d.ts +0 -25
  166. package/es/plugins/FeatureScalePlugin.js +0 -325
  167. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -7
  168. package/es/plugins/LayerAnimateStylePlugin.js +0 -49
  169. package/es/plugins/LayerModelPlugin.d.ts +0 -10
  170. package/es/plugins/LayerModelPlugin.js +0 -71
  171. package/es/plugins/LayerStylePlugin.d.ts +0 -8
  172. package/es/plugins/LayerStylePlugin.js +0 -39
  173. package/es/plugins/LightingPlugin.d.ts +0 -36
  174. package/es/plugins/LightingPlugin.js +0 -110
  175. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -24
  176. package/es/plugins/MultiPassRendererPlugin.js +0 -77
  177. package/es/plugins/PixelPickingPlugin.d.ts +0 -8
  178. package/es/plugins/PixelPickingPlugin.js +0 -146
  179. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -11
  180. package/es/plugins/RegisterStyleAttributePlugin.js +0 -105
  181. package/es/plugins/ShaderUniformPlugin.d.ts +0 -17
  182. package/es/plugins/ShaderUniformPlugin.js +0 -107
  183. package/es/plugins/UpdateModelPlugin.d.ts +0 -8
  184. package/es/plugins/UpdateModelPlugin.js +0 -31
  185. package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -12
  186. package/es/plugins/UpdateStyleAttributePlugin.js +0 -87
  187. package/es/point/index.d.ts +0 -30
  188. package/es/point/index.js +0 -222
  189. package/es/point/models/earthExtrude.d.ts +0 -24
  190. package/es/point/models/earthExtrude.js +0 -279
  191. package/es/point/models/earthFill.d.ts +0 -11
  192. package/es/point/models/earthFill.js +0 -258
  193. package/es/point/models/extrude.d.ts +0 -24
  194. package/es/point/models/extrude.js +0 -298
  195. package/es/point/models/fill.d.ts +0 -40
  196. package/es/point/models/fill.js +0 -404
  197. package/es/point/models/fillmage.d.ts +0 -25
  198. package/es/point/models/fillmage.js +0 -367
  199. package/es/point/models/image.d.ts +0 -11
  200. package/es/point/models/image.js +0 -239
  201. package/es/point/models/index.d.ts +0 -5
  202. package/es/point/models/index.js +0 -28
  203. package/es/point/models/normal.d.ts +0 -17
  204. package/es/point/models/normal.js +0 -177
  205. package/es/point/models/radar.d.ts +0 -24
  206. package/es/point/models/radar.js +0 -297
  207. package/es/point/models/simplePoint.d.ts +0 -17
  208. package/es/point/models/simplePoint.js +0 -188
  209. package/es/point/models/text.d.ts +0 -57
  210. package/es/point/models/text.js +0 -622
  211. package/es/point/models/tile.d.ts +0 -22
  212. package/es/point/models/tile.js +0 -309
  213. package/es/point/shaders/animate/wave_frag.glsl +0 -65
  214. package/es/point/shaders/earth/extrude_frag.glsl +0 -44
  215. package/es/point/shaders/earth/extrude_vert.glsl +0 -140
  216. package/es/point/shaders/earth/fill_frag.glsl +0 -86
  217. package/es/point/shaders/earth/fill_vert.glsl +0 -126
  218. package/es/point/shaders/extrude/extrude_frag.glsl +0 -44
  219. package/es/point/shaders/extrude/extrude_vert.glsl +0 -121
  220. package/es/point/shaders/fill_frag.glsl +0 -84
  221. package/es/point/shaders/fill_vert.glsl +0 -189
  222. package/es/point/shaders/image/fillImage_frag.glsl +0 -20
  223. package/es/point/shaders/image/fillImage_vert.glsl +0 -116
  224. package/es/point/shaders/image_frag.glsl +0 -39
  225. package/es/point/shaders/image_vert.glsl +0 -90
  226. package/es/point/shaders/normal_frag.glsl +0 -15
  227. package/es/point/shaders/normal_vert.glsl +0 -79
  228. package/es/point/shaders/radar/radar_frag.glsl +0 -64
  229. package/es/point/shaders/radar/radar_vert.glsl +0 -120
  230. package/es/point/shaders/simplePoint_frag.glsl +0 -53
  231. package/es/point/shaders/simplePoint_vert.glsl +0 -79
  232. package/es/point/shaders/text_frag.glsl +0 -48
  233. package/es/point/shaders/text_vert.glsl +0 -131
  234. package/es/point/shaders/tile/fill_tile_frag.glsl +0 -83
  235. package/es/point/shaders/tile/fill_tile_vert.glsl +0 -181
  236. package/es/point/shape/extrude.d.ts +0 -15
  237. package/es/point/shape/extrude.js +0 -63
  238. package/es/polygon/index.d.ts +0 -19
  239. package/es/polygon/index.js +0 -145
  240. package/es/polygon/models/extrude.d.ts +0 -28
  241. package/es/polygon/models/extrude.js +0 -306
  242. package/es/polygon/models/fill.d.ts +0 -17
  243. package/es/polygon/models/fill.js +0 -211
  244. package/es/polygon/models/index.d.ts +0 -5
  245. package/es/polygon/models/index.js +0 -28
  246. package/es/polygon/models/ocean.d.ts +0 -23
  247. package/es/polygon/models/ocean.js +0 -236
  248. package/es/polygon/models/tile.d.ts +0 -15
  249. package/es/polygon/models/tile.js +0 -133
  250. package/es/polygon/models/water.d.ts +0 -18
  251. package/es/polygon/models/water.js +0 -213
  252. package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
  253. package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
  254. package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
  255. package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
  256. package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
  257. package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
  258. package/es/polygon/shaders/polygon_frag.glsl +0 -12
  259. package/es/polygon/shaders/polygon_linear_frag.glsl +0 -22
  260. package/es/polygon/shaders/polygon_linear_vert.glsl +0 -74
  261. package/es/polygon/shaders/polygon_vert.glsl +0 -66
  262. package/es/polygon/shaders/tile/polygon_tile_frag.glsl +0 -12
  263. package/es/polygon/shaders/tile/polygon_tile_vert.glsl +0 -82
  264. package/es/polygon/shaders/water/polygon_ocean_frag.glsl +0 -248
  265. package/es/polygon/shaders/water/polygon_ocean_vert.glsl +0 -52
  266. package/es/polygon/shaders/water/polygon_water_frag.glsl +0 -73
  267. package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -55
  268. package/es/raster/buffers/triangulation.d.ts +0 -6
  269. package/es/raster/buffers/triangulation.js +0 -28
  270. package/es/raster/index.d.ts +0 -19
  271. package/es/raster/index.js +0 -104
  272. package/es/raster/models/index.d.ts +0 -5
  273. package/es/raster/models/index.js +0 -8
  274. package/es/raster/models/raster.d.ts +0 -21
  275. package/es/raster/models/raster.js +0 -167
  276. package/es/raster/raster.d.ts +0 -30
  277. package/es/raster/raster.js +0 -174
  278. package/es/raster/shaders/raster_2d_frag.glsl +0 -28
  279. package/es/raster/shaders/raster_2d_vert.glsl +0 -18
  280. package/es/raster/shaders/raster_frag.glsl +0 -9
  281. package/es/raster/shaders/raster_vert.glsl +0 -44
  282. package/es/tile/interface.d.ts +0 -28
  283. package/es/tile/interface.js +0 -1
  284. package/es/tile/manager/tileConfigManager.d.ts +0 -17
  285. package/es/tile/manager/tileConfigManager.js +0 -121
  286. package/es/tile/manager/tileLayerManager.d.ts +0 -36
  287. package/es/tile/manager/tileLayerManager.js +0 -311
  288. package/es/tile/manager/tilePickerManager.d.ts +0 -21
  289. package/es/tile/manager/tilePickerManager.js +0 -190
  290. package/es/tile/models/tileModel.d.ts +0 -8
  291. package/es/tile/models/tileModel.js +0 -62
  292. package/es/tile/tileFactory/base.d.ts +0 -44
  293. package/es/tile/tileFactory/base.js +0 -444
  294. package/es/tile/tileFactory/index.d.ts +0 -5
  295. package/es/tile/tileFactory/index.js +0 -29
  296. package/es/tile/tileFactory/line.d.ts +0 -12
  297. package/es/tile/tileFactory/line.js +0 -59
  298. package/es/tile/tileFactory/point.d.ts +0 -12
  299. package/es/tile/tileFactory/point.js +0 -59
  300. package/es/tile/tileFactory/polygon.d.ts +0 -12
  301. package/es/tile/tileFactory/polygon.js +0 -59
  302. package/es/tile/tileFactory/raster.d.ts +0 -12
  303. package/es/tile/tileFactory/raster.js +0 -55
  304. package/es/tile/tileFactory/rasterData.d.ts +0 -12
  305. package/es/tile/tileFactory/rasterData.js +0 -80
  306. package/es/tile/tileFactory/rasterDataLayer.d.ts +0 -19
  307. package/es/tile/tileFactory/rasterDataLayer.js +0 -87
  308. package/es/tile/tileFactory/vectorLayer.d.ts +0 -29
  309. package/es/tile/tileFactory/vectorLayer.js +0 -161
  310. package/es/tile/tileLayer/baseTileLayer.d.ts +0 -47
  311. package/es/tile/tileLayer/baseTileLayer.js +0 -438
  312. package/es/tile/tmsTileLayer.d.ts +0 -7
  313. package/es/tile/tmsTileLayer.js +0 -101
  314. package/es/tile/utils.d.ts +0 -11
  315. package/es/tile/utils.js +0 -127
  316. package/es/utils/blend.d.ts +0 -2
  317. package/es/utils/blend.js +0 -54
  318. package/es/utils/collision-index.d.ts +0 -47
  319. package/es/utils/collision-index.js +0 -102
  320. package/es/utils/dataMappingStyle.d.ts +0 -31
  321. package/es/utils/dataMappingStyle.js +0 -147
  322. package/es/utils/extrude_polyline.d.ts +0 -67
  323. package/es/utils/extrude_polyline.js +0 -611
  324. package/es/utils/grid-index.d.ts +0 -28
  325. package/es/utils/grid-index.js +0 -179
  326. package/es/utils/layerData.d.ts +0 -2
  327. package/es/utils/layerData.js +0 -176
  328. package/es/utils/multiPassRender.d.ts +0 -16
  329. package/es/utils/multiPassRender.js +0 -50
  330. package/es/utils/polylineNormal.d.ts +0 -9
  331. package/es/utils/polylineNormal.js +0 -191
  332. package/es/utils/simpleLine.d.ts +0 -23
  333. package/es/utils/simpleLine.js +0 -103
  334. package/es/utils/symbol-layout.d.ts +0 -43
  335. package/es/utils/symbol-layout.js +0 -299
  336. package/es/utils/updateShape.d.ts +0 -2
  337. package/es/utils/updateShape.js +0 -20
  338. package/es/wind/index.d.ts +0 -20
  339. package/es/wind/index.js +0 -100
  340. package/es/wind/models/index.d.ts +0 -5
  341. package/es/wind/models/index.js +0 -5
  342. package/es/wind/models/utils.d.ts +0 -19
  343. package/es/wind/models/utils.js +0 -226
  344. package/es/wind/models/wind.d.ts +0 -33
  345. package/es/wind/models/wind.js +0 -331
  346. package/es/wind/models/windRender.d.ts +0 -104
  347. package/es/wind/models/windRender.js +0 -357
  348. package/es/wind/models/windShader.d.ts +0 -12
  349. package/es/wind/models/windShader.js +0 -12
  350. package/es/wind/shaders/wind_frag.glsl +0 -9
  351. package/es/wind/shaders/wind_vert.glsl +0 -17
  352. package/lib/Geometry/index.js +0 -82
  353. package/lib/Geometry/models/billboard.js +0 -195
  354. package/lib/Geometry/models/index.js +0 -38
  355. package/lib/Geometry/models/plane.js +0 -307
  356. package/lib/Geometry/models/sprite.js +0 -216
  357. package/lib/Geometry/shaders/billboard_frag.glsl +0 -13
  358. package/lib/Geometry/shaders/billboard_vert.glsl +0 -50
  359. package/lib/Geometry/shaders/plane_frag.glsl +0 -22
  360. package/lib/Geometry/shaders/plane_vert.glsl +0 -53
  361. package/lib/Geometry/shaders/sprite_frag.glsl +0 -21
  362. package/lib/Geometry/shaders/sprite_vert.glsl +0 -28
  363. package/lib/canvas/index.js +0 -69
  364. package/lib/canvas/models/canvas.js +0 -154
  365. package/lib/canvas/models/index.js +0 -34
  366. package/lib/citybuliding/building.js +0 -66
  367. package/lib/citybuliding/models/build.js +0 -157
  368. package/lib/citybuliding/shaders/build_frag.glsl +0 -117
  369. package/lib/citybuliding/shaders/build_vert.glsl +0 -54
  370. package/lib/core/BaseLayer.js +0 -891
  371. package/lib/core/BaseModel.js +0 -325
  372. package/lib/core/interface.js +0 -54
  373. package/lib/core/schema.js +0 -51
  374. package/lib/core/shape/Path.js +0 -100
  375. package/lib/core/shape/extrude.js +0 -139
  376. package/lib/core/triangulation.js +0 -373
  377. package/lib/earth/index.js +0 -69
  378. package/lib/earth/models/atmosphere.js +0 -118
  379. package/lib/earth/models/base.js +0 -162
  380. package/lib/earth/models/bloomsphere.js +0 -118
  381. package/lib/earth/shaders/atmosphere_frag.glsl +0 -17
  382. package/lib/earth/shaders/atmosphere_vert.glsl +0 -26
  383. package/lib/earth/shaders/base_frag.glsl +0 -13
  384. package/lib/earth/shaders/base_vert.glsl +0 -52
  385. package/lib/earth/shaders/bloomsphere_frag.glsl +0 -15
  386. package/lib/earth/shaders/bloomsphere_vert.glsl +0 -20
  387. package/lib/earth/utils.js +0 -116
  388. package/lib/heatmap/index.js +0 -101
  389. package/lib/heatmap/models/grid.js +0 -95
  390. package/lib/heatmap/models/grid3d.js +0 -129
  391. package/lib/heatmap/models/heatmap.js +0 -350
  392. package/lib/heatmap/models/hexagon.js +0 -96
  393. package/lib/heatmap/models/index.js +0 -41
  394. package/lib/heatmap/shaders/grid_vert.glsl +0 -42
  395. package/lib/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
  396. package/lib/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
  397. package/lib/heatmap/shaders/heatmap_frag.glsl +0 -47
  398. package/lib/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
  399. package/lib/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
  400. package/lib/heatmap/shaders/heatmap_vert.glsl +0 -10
  401. package/lib/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
  402. package/lib/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
  403. package/lib/heatmap/shaders/hexagon_frag.glsl +0 -12
  404. package/lib/heatmap/shaders/hexagon_vert.glsl +0 -41
  405. package/lib/heatmap/triangulation.js +0 -61
  406. package/lib/image/index.js +0 -79
  407. package/lib/image/models/dataImage.js +0 -182
  408. package/lib/image/models/image.js +0 -136
  409. package/lib/image/models/index.js +0 -36
  410. package/lib/image/shaders/dataImage_frag.glsl +0 -38
  411. package/lib/image/shaders/image_frag.glsl +0 -9
  412. package/lib/image/shaders/image_vert.glsl +0 -17
  413. package/lib/index.js +0 -100
  414. package/lib/line/index.js +0 -88
  415. package/lib/line/models/arc.js +0 -258
  416. package/lib/line/models/arc_3d.js +0 -247
  417. package/lib/line/models/earthArc_3d.js +0 -248
  418. package/lib/line/models/great_circle.js +0 -219
  419. package/lib/line/models/half.js +0 -214
  420. package/lib/line/models/index.js +0 -54
  421. package/lib/line/models/line.js +0 -330
  422. package/lib/line/models/linearline.js +0 -219
  423. package/lib/line/models/simpleLine.js +0 -184
  424. package/lib/line/models/tile.js +0 -257
  425. package/lib/line/models/wall.js +0 -253
  426. package/lib/line/shaders/arc_chunks.vert.glsl +0 -21
  427. package/lib/line/shaders/dash/arc_dash_frag.glsl +0 -28
  428. package/lib/line/shaders/dash/arc_dash_vert.glsl +0 -148
  429. package/lib/line/shaders/dash/line_dash_frag.glsl +0 -31
  430. package/lib/line/shaders/dash/line_dash_vert.glsl +0 -93
  431. package/lib/line/shaders/half/line_half_frag.glsl +0 -53
  432. package/lib/line/shaders/half/line_half_vert.glsl +0 -169
  433. package/lib/line/shaders/line_arc2d_vert.glsl +0 -114
  434. package/lib/line/shaders/line_arc_3d_frag.glsl +0 -103
  435. package/lib/line/shaders/line_arc_3d_vert.glsl +0 -207
  436. package/lib/line/shaders/line_arc_frag.glsl +0 -89
  437. package/lib/line/shaders/line_arc_great_circle_frag.glsl +0 -101
  438. package/lib/line/shaders/line_arc_great_circle_vert.glsl +0 -215
  439. package/lib/line/shaders/line_arc_vert.glsl +0 -176
  440. package/lib/line/shaders/line_bezier_vert.glsl +0 -85
  441. package/lib/line/shaders/line_frag.glsl +0 -100
  442. package/lib/line/shaders/line_vert.glsl +0 -192
  443. package/lib/line/shaders/linear/arc3d_linear_frag.glsl +0 -47
  444. package/lib/line/shaders/linear/arc3d_linear_vert.glsl +0 -207
  445. package/lib/line/shaders/linear/arc_linear_frag.glsl +0 -38
  446. package/lib/line/shaders/linear/arc_linear_vert.glsl +0 -138
  447. package/lib/line/shaders/linear/line_linear_frag.glsl +0 -27
  448. package/lib/line/shaders/linearLine/line_linear_frag.glsl +0 -20
  449. package/lib/line/shaders/linearLine/line_linear_vert.glsl +0 -112
  450. package/lib/line/shaders/simple/simpleline_frag.glsl +0 -10
  451. package/lib/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
  452. package/lib/line/shaders/simple/simpleline_vert.glsl +0 -79
  453. package/lib/line/shaders/tile/line_tile_frag.glsl +0 -79
  454. package/lib/line/shaders/tile/line_tile_vert.glsl +0 -210
  455. package/lib/line/shaders/wall_frag.glsl +0 -93
  456. package/lib/line/shaders/wall_vert.glsl +0 -111
  457. package/lib/mask/index.js +0 -62
  458. package/lib/mask/models/fill.js +0 -85
  459. package/lib/mask/models/index.js +0 -34
  460. package/lib/mask/shaders/mask_frag.glsl +0 -7
  461. package/lib/mask/shaders/mask_vert.glsl +0 -22
  462. package/lib/plugins/DataMappingPlugin.js +0 -242
  463. package/lib/plugins/DataSourcePlugin.js +0 -93
  464. package/lib/plugins/FeatureScalePlugin.js +0 -259
  465. package/lib/plugins/LayerAnimateStylePlugin.js +0 -58
  466. package/lib/plugins/LayerModelPlugin.js +0 -75
  467. package/lib/plugins/LayerStylePlugin.js +0 -53
  468. package/lib/plugins/LightingPlugin.js +0 -113
  469. package/lib/plugins/MultiPassRendererPlugin.js +0 -67
  470. package/lib/plugins/PixelPickingPlugin.js +0 -118
  471. package/lib/plugins/RegisterStyleAttributePlugin.js +0 -117
  472. package/lib/plugins/ShaderUniformPlugin.js +0 -101
  473. package/lib/plugins/UpdateModelPlugin.js +0 -49
  474. package/lib/plugins/UpdateStyleAttributePlugin.js +0 -80
  475. package/lib/point/index.js +0 -160
  476. package/lib/point/models/earthExtrude.js +0 -217
  477. package/lib/point/models/earthFill.js +0 -208
  478. package/lib/point/models/extrude.js +0 -219
  479. package/lib/point/models/fill.js +0 -289
  480. package/lib/point/models/fillmage.js +0 -274
  481. package/lib/point/models/image.js +0 -182
  482. package/lib/point/models/index.js +0 -56
  483. package/lib/point/models/normal.js +0 -145
  484. package/lib/point/models/radar.js +0 -221
  485. package/lib/point/models/simplePoint.js +0 -153
  486. package/lib/point/models/text.js +0 -414
  487. package/lib/point/models/tile.js +0 -234
  488. package/lib/point/shaders/animate/wave_frag.glsl +0 -65
  489. package/lib/point/shaders/earth/extrude_frag.glsl +0 -44
  490. package/lib/point/shaders/earth/extrude_vert.glsl +0 -140
  491. package/lib/point/shaders/earth/fill_frag.glsl +0 -86
  492. package/lib/point/shaders/earth/fill_vert.glsl +0 -126
  493. package/lib/point/shaders/extrude/extrude_frag.glsl +0 -44
  494. package/lib/point/shaders/extrude/extrude_vert.glsl +0 -121
  495. package/lib/point/shaders/fill_frag.glsl +0 -84
  496. package/lib/point/shaders/fill_vert.glsl +0 -189
  497. package/lib/point/shaders/image/fillImage_frag.glsl +0 -20
  498. package/lib/point/shaders/image/fillImage_vert.glsl +0 -116
  499. package/lib/point/shaders/image_frag.glsl +0 -39
  500. package/lib/point/shaders/image_vert.glsl +0 -90
  501. package/lib/point/shaders/normal_frag.glsl +0 -15
  502. package/lib/point/shaders/normal_vert.glsl +0 -79
  503. package/lib/point/shaders/radar/radar_frag.glsl +0 -64
  504. package/lib/point/shaders/radar/radar_vert.glsl +0 -120
  505. package/lib/point/shaders/simplePoint_frag.glsl +0 -53
  506. package/lib/point/shaders/simplePoint_vert.glsl +0 -79
  507. package/lib/point/shaders/text_frag.glsl +0 -48
  508. package/lib/point/shaders/text_vert.glsl +0 -131
  509. package/lib/point/shaders/tile/fill_tile_frag.glsl +0 -83
  510. package/lib/point/shaders/tile/fill_tile_vert.glsl +0 -181
  511. package/lib/point/shape/extrude.js +0 -74
  512. package/lib/polygon/index.js +0 -108
  513. package/lib/polygon/models/extrude.js +0 -234
  514. package/lib/polygon/models/fill.js +0 -164
  515. package/lib/polygon/models/index.js +0 -56
  516. package/lib/polygon/models/ocean.js +0 -181
  517. package/lib/polygon/models/tile.js +0 -103
  518. package/lib/polygon/models/water.js +0 -160
  519. package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
  520. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
  521. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
  522. package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
  523. package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
  524. package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
  525. package/lib/polygon/shaders/polygon_frag.glsl +0 -12
  526. package/lib/polygon/shaders/polygon_linear_frag.glsl +0 -22
  527. package/lib/polygon/shaders/polygon_linear_vert.glsl +0 -74
  528. package/lib/polygon/shaders/polygon_vert.glsl +0 -66
  529. package/lib/polygon/shaders/tile/polygon_tile_frag.glsl +0 -12
  530. package/lib/polygon/shaders/tile/polygon_tile_vert.glsl +0 -82
  531. package/lib/polygon/shaders/water/polygon_ocean_frag.glsl +0 -248
  532. package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +0 -52
  533. package/lib/polygon/shaders/water/polygon_water_frag.glsl +0 -73
  534. package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -55
  535. package/lib/raster/buffers/triangulation.js +0 -51
  536. package/lib/raster/index.js +0 -78
  537. package/lib/raster/models/index.js +0 -37
  538. package/lib/raster/models/raster.js +0 -139
  539. package/lib/raster/raster.js +0 -136
  540. package/lib/raster/shaders/raster_2d_frag.glsl +0 -28
  541. package/lib/raster/shaders/raster_2d_vert.glsl +0 -18
  542. package/lib/raster/shaders/raster_frag.glsl +0 -9
  543. package/lib/raster/shaders/raster_vert.glsl +0 -44
  544. package/lib/tile/interface.js +0 -17
  545. package/lib/tile/manager/tileConfigManager.js +0 -94
  546. package/lib/tile/manager/tileLayerManager.js +0 -245
  547. package/lib/tile/manager/tilePickerManager.js +0 -132
  548. package/lib/tile/models/tileModel.js +0 -55
  549. package/lib/tile/tileFactory/base.js +0 -343
  550. package/lib/tile/tileFactory/index.js +0 -57
  551. package/lib/tile/tileFactory/line.js +0 -55
  552. package/lib/tile/tileFactory/point.js +0 -55
  553. package/lib/tile/tileFactory/polygon.js +0 -55
  554. package/lib/tile/tileFactory/raster.js +0 -56
  555. package/lib/tile/tileFactory/rasterData.js +0 -81
  556. package/lib/tile/tileFactory/rasterDataLayer.js +0 -65
  557. package/lib/tile/tileFactory/vectorLayer.js +0 -117
  558. package/lib/tile/tileLayer/baseTileLayer.js +0 -248
  559. package/lib/tile/tmsTileLayer.js +0 -74
  560. package/lib/tile/utils.js +0 -132
  561. package/lib/utils/blend.js +0 -85
  562. package/lib/utils/collision-index.js +0 -75
  563. package/lib/utils/dataMappingStyle.js +0 -106
  564. package/lib/utils/extrude_polyline.js +0 -451
  565. package/lib/utils/grid-index.js +0 -136
  566. package/lib/utils/layerData.js +0 -156
  567. package/lib/utils/multiPassRender.js +0 -53
  568. package/lib/utils/polylineNormal.js +0 -178
  569. package/lib/utils/simpleLine.js +0 -101
  570. package/lib/utils/symbol-layout.js +0 -205
  571. package/lib/utils/updateShape.js +0 -53
  572. package/lib/wind/index.js +0 -75
  573. package/lib/wind/models/index.js +0 -34
  574. package/lib/wind/models/utils.js +0 -214
  575. package/lib/wind/models/wind.js +0 -237
  576. package/lib/wind/models/windRender.js +0 -262
  577. package/lib/wind/models/windShader.js +0 -183
  578. package/lib/wind/shaders/wind_frag.glsl +0 -9
  579. package/lib/wind/shaders/wind_vert.glsl +0 -17
@@ -1,451 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/extrude_polyline.ts
20
- var extrude_polyline_exports = {};
21
- __export(extrude_polyline_exports, {
22
- computeMiter: () => computeMiter,
23
- computeNormal: () => computeNormal,
24
- default: () => ExtrudePolyline,
25
- direction: () => direction
26
- });
27
- module.exports = __toCommonJS(extrude_polyline_exports);
28
- var import_l7_utils = require("@antv/l7-utils");
29
- var import_gl_matrix = require("gl-matrix");
30
- var tmp = import_gl_matrix.vec2.create();
31
- var capEnd = import_gl_matrix.vec2.create();
32
- var lineA = import_gl_matrix.vec2.create();
33
- var lineB = import_gl_matrix.vec2.create();
34
- var tangent = import_gl_matrix.vec2.create();
35
- function computeMiter(lineTangent, miter, start, end, halfThick) {
36
- import_gl_matrix.vec2.add(lineTangent, start, end);
37
- import_gl_matrix.vec2.normalize(lineTangent, lineTangent);
38
- miter = import_gl_matrix.vec2.fromValues(-lineTangent[1], lineTangent[0]);
39
- const tmpvec = import_gl_matrix.vec2.fromValues(-start[1], start[0]);
40
- return [halfThick / import_gl_matrix.vec2.dot(miter, tmpvec), miter];
41
- }
42
- function computeNormal(out, dir) {
43
- return import_gl_matrix.vec2.set(out, -dir[1], dir[0]);
44
- }
45
- function direction(out, a, b) {
46
- import_gl_matrix.vec2.sub(out, a, b);
47
- import_gl_matrix.vec2.normalize(out, out);
48
- return out;
49
- }
50
- function isPointEqual(a, b) {
51
- return a[0] === b[0] && a[1] === b[1];
52
- }
53
- var ExtrudePolyline = class {
54
- constructor(opts = {}) {
55
- this.lastFlip = -1;
56
- this.miter = import_gl_matrix.vec2.fromValues(0, 0);
57
- this.started = false;
58
- this.dash = false;
59
- this.totalDistance = 0;
60
- this.currentIndex = 0;
61
- this.join = opts.join || "miter";
62
- this.cap = opts.cap || "butt";
63
- this.miterLimit = opts.miterLimit || 10;
64
- this.thickness = opts.thickness || 1;
65
- this.dash = opts.dash || false;
66
- this.complex = {
67
- positions: [],
68
- indices: [],
69
- normals: [],
70
- startIndex: 0,
71
- indexes: []
72
- };
73
- }
74
- simpleExtrude(points) {
75
- const complex = this.complex;
76
- if (points.length <= 1) {
77
- return complex;
78
- }
79
- this.lastFlip = -1;
80
- this.started = false;
81
- this.normal = null;
82
- this.totalDistance = 0;
83
- const total = points.length;
84
- let count = complex.startIndex;
85
- for (let i = 1; i < total; i++) {
86
- const last = points[i - 1];
87
- const cur = points[i];
88
- const next = i < points.length - 1 ? points[i + 1] : null;
89
- const amt = this.simpleSegment(complex, count, last, cur, next);
90
- count += amt;
91
- }
92
- if (this.dash) {
93
- for (let i = 0; i < complex.positions.length / 6; i++) {
94
- complex.positions[i * 6 + 5] = this.totalDistance;
95
- }
96
- }
97
- complex.startIndex = complex.positions.length / 6;
98
- return complex;
99
- }
100
- simpleExtrude_gaode2(points, originPoints) {
101
- const complex = this.complex;
102
- if (points.length <= 1) {
103
- return complex;
104
- }
105
- this.lastFlip = -1;
106
- this.started = false;
107
- this.normal = null;
108
- this.totalDistance = 0;
109
- const total = points.length;
110
- let count = complex.startIndex;
111
- for (let i = 1; i < total; i++) {
112
- const last = points[i - 1];
113
- last.push(originPoints[i - 1][2] ?? 0);
114
- const originLast = originPoints[i - 1];
115
- const cur = points[i];
116
- cur.push(originPoints[i][2] ?? 0);
117
- const originCur = originPoints[i];
118
- const next = i < points.length - 1 ? [...points[i + 1], originPoints[i + 1][2] ?? 0] : null;
119
- const originNext = i < originPoints.length - 1 ? originPoints[i + 1] : null;
120
- const amt = this.simpleSegment(complex, count, last, cur, next, originLast, originCur, originNext);
121
- count += amt;
122
- }
123
- if (this.dash) {
124
- for (let i = 0; i < complex.positions.length / 6; i++) {
125
- complex.positions[i * 6 + 5] = this.totalDistance;
126
- }
127
- }
128
- complex.startIndex = complex.positions.length / 6;
129
- return complex;
130
- }
131
- extrude_gaode2(points, originPoints) {
132
- const complex = this.complex;
133
- if (points.length <= 1) {
134
- return complex;
135
- }
136
- this.lastFlip = -1;
137
- this.started = false;
138
- this.normal = null;
139
- this.totalDistance = 0;
140
- const total = points.length;
141
- let count = complex.startIndex;
142
- for (let i = 1; i < total; i++) {
143
- const last = points[i - 1];
144
- last.push(originPoints[i - 1][2] ?? 0);
145
- const originLast = originPoints[i - 1];
146
- const cur = points[i];
147
- cur.push(originPoints[i][2] ?? 0);
148
- const originCur = originPoints[i];
149
- const next = i < points.length - 1 ? [...points[i + 1], originPoints[i + 1][2] ?? 0] : null;
150
- const originNext = i < originPoints.length - 1 ? originPoints[i + 1] : null;
151
- const amt = this.segment_gaode2(complex, count, last, cur, next, originLast, originCur, originNext);
152
- count += amt;
153
- }
154
- if (this.dash) {
155
- for (let i = 0; i < complex.positions.length / 6; i++) {
156
- complex.positions[i * 6 + 5] = this.totalDistance;
157
- }
158
- }
159
- complex.startIndex = complex.positions.length / 6;
160
- return complex;
161
- }
162
- extrude(points) {
163
- const complex = this.complex;
164
- if (points.length <= 1) {
165
- return complex;
166
- }
167
- this.lastFlip = -1;
168
- this.started = false;
169
- this.normal = null;
170
- this.totalDistance = 0;
171
- const total = points.length;
172
- let count = complex.startIndex;
173
- for (let i = 1; i < total; i++) {
174
- const last = points[i - 1];
175
- const cur = points[i];
176
- const next = i < points.length - 1 ? points[i + 1] : null;
177
- const amt = this.segment(complex, count, last, cur, next);
178
- count += amt;
179
- }
180
- if (this.dash) {
181
- for (let i = 0; i < complex.positions.length / 6; i++) {
182
- complex.positions[i * 6 + 5] = this.totalDistance;
183
- }
184
- }
185
- complex.startIndex = complex.positions.length / 6;
186
- return complex;
187
- }
188
- simpleSegment(complex, index, last, cur, next) {
189
- let count = 0;
190
- const indices = complex.indices;
191
- const positions = complex.positions;
192
- const normals = complex.normals;
193
- const flatCur = (0, import_l7_utils.aProjectFlat)([cur[0], cur[1]]);
194
- const flatLast = (0, import_l7_utils.aProjectFlat)([last[0], last[1]]);
195
- direction(lineA, flatCur, flatLast);
196
- let segmentDistance = 0;
197
- if (this.dash) {
198
- segmentDistance = this.lineSegmentDistance(flatCur, flatLast);
199
- this.totalDistance += segmentDistance;
200
- }
201
- if (!this.normal) {
202
- this.normal = import_gl_matrix.vec2.create();
203
- computeNormal(this.normal, lineA);
204
- }
205
- if (!this.started) {
206
- this.started = true;
207
- this.extrusions(positions, normals, last, this.normal, this.thickness, this.totalDistance - segmentDistance);
208
- }
209
- indices.push(index + 0, index + 1, index + 2);
210
- if (!next) {
211
- computeNormal(this.normal, lineA);
212
- this.extrusions(positions, normals, cur, this.normal, this.thickness, this.totalDistance);
213
- indices.push(...this.lastFlip === 1 ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
214
- count += 2;
215
- } else {
216
- const flatNext = (0, import_l7_utils.aProjectFlat)([next[0], next[1]]);
217
- if (isPointEqual(flatCur, flatNext)) {
218
- import_gl_matrix.vec2.add(flatNext, flatCur, import_gl_matrix.vec2.normalize(flatNext, import_gl_matrix.vec2.subtract(flatNext, flatCur, flatLast)));
219
- }
220
- direction(lineB, flatNext, flatCur);
221
- const [miterLen, miter] = computeMiter(tangent, import_gl_matrix.vec2.create(), lineA, lineB, this.thickness);
222
- let flip = import_gl_matrix.vec2.dot(tangent, this.normal) < 0 ? -1 : 1;
223
- this.extrusions(positions, normals, cur, miter, miterLen, this.totalDistance);
224
- indices.push(...this.lastFlip === 1 ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
225
- flip = -1;
226
- import_gl_matrix.vec2.copy(this.normal, miter);
227
- count += 2;
228
- this.lastFlip = flip;
229
- }
230
- return count;
231
- }
232
- segment_gaode2(complex, index, last, cur, next, originLast, originCur, originNext) {
233
- let count = 0;
234
- const indices = complex.indices;
235
- const positions = complex.positions;
236
- const normals = complex.normals;
237
- const capSquare = this.cap === "square";
238
- const joinBevel = this.join === "bevel";
239
- const flatCur = (0, import_l7_utils.aProjectFlat)([originCur[0], originCur[1]]);
240
- const flatLast = (0, import_l7_utils.aProjectFlat)([originLast[0], originLast[1]]);
241
- direction(lineA, cur, last);
242
- let segmentDistance = 0;
243
- if (this.dash) {
244
- segmentDistance = this.lineSegmentDistance(flatCur, flatLast);
245
- this.totalDistance += segmentDistance;
246
- }
247
- if (!this.normal) {
248
- this.normal = import_gl_matrix.vec2.create();
249
- computeNormal(this.normal, lineA);
250
- }
251
- if (!this.started) {
252
- this.started = true;
253
- if (capSquare) {
254
- const out1 = import_gl_matrix.vec2.create();
255
- const out2 = import_gl_matrix.vec2.create();
256
- import_gl_matrix.vec2.add(out1, this.normal, lineA);
257
- import_gl_matrix.vec2.add(out2, this.normal, lineA);
258
- normals.push(out2[0], out2[1], 0);
259
- normals.push(out1[0], out1[1], 0);
260
- positions.push(last[0], last[1], last[2] | 0, this.totalDistance - segmentDistance, -this.thickness, last[2] | 0);
261
- this.complex.indexes.push(this.currentIndex);
262
- positions.push(last[0], last[1], last[2] | 0, this.totalDistance - segmentDistance, this.thickness, last[2] | 0);
263
- this.complex.indexes.push(this.currentIndex);
264
- this.currentIndex++;
265
- } else {
266
- this.extrusions(positions, normals, last, this.normal, this.thickness, this.totalDistance - segmentDistance);
267
- }
268
- }
269
- indices.push(index + 0, index + 1, index + 2);
270
- if (!next) {
271
- computeNormal(this.normal, lineA);
272
- if (capSquare) {
273
- const out1 = import_gl_matrix.vec2.create();
274
- const out2 = import_gl_matrix.vec2.create();
275
- import_gl_matrix.vec2.sub(out2, lineA, this.normal);
276
- import_gl_matrix.vec2.add(out1, lineA, this.normal);
277
- normals.push(out2[0], out2[1], 0);
278
- normals.push(out1[0], out1[1], 0);
279
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, this.thickness, cur[2] | 0);
280
- this.complex.indexes.push(this.currentIndex);
281
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, this.thickness, cur[2] | 0);
282
- this.complex.indexes.push(this.currentIndex);
283
- this.currentIndex++;
284
- } else {
285
- this.extrusions(positions, normals, cur, this.normal, this.thickness, this.totalDistance);
286
- }
287
- indices.push(...this.lastFlip === 1 ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
288
- count += 2;
289
- } else {
290
- if (isPointEqual(cur, next)) {
291
- import_gl_matrix.vec2.add(next, cur, import_gl_matrix.vec2.normalize(next, import_gl_matrix.vec2.subtract(next, cur, last)));
292
- }
293
- direction(lineB, next, cur);
294
- const [miterLen, miter] = computeMiter(tangent, import_gl_matrix.vec2.create(), lineA, lineB, this.thickness);
295
- let flip = import_gl_matrix.vec2.dot(tangent, this.normal) < 0 ? -1 : 1;
296
- let bevel = joinBevel;
297
- if (!bevel && this.join === "miter") {
298
- const limit = miterLen;
299
- if (limit > this.miterLimit) {
300
- bevel = true;
301
- }
302
- }
303
- if (bevel) {
304
- normals.push(this.normal[0], this.normal[1], 0);
305
- normals.push(miter[0], miter[1], 0);
306
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, -this.thickness * flip, cur[2] | 0);
307
- this.complex.indexes.push(this.currentIndex);
308
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, this.thickness * flip, cur[2] | 0);
309
- this.complex.indexes.push(this.currentIndex);
310
- this.currentIndex++;
311
- indices.push(...this.lastFlip !== -flip ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
312
- indices.push(index + 2, index + 3, index + 4);
313
- computeNormal(tmp, lineB);
314
- import_gl_matrix.vec2.copy(this.normal, tmp);
315
- normals.push(this.normal[0], this.normal[1], 0);
316
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, -this.thickness * flip, cur[2] | 0);
317
- this.complex.indexes.push(this.currentIndex);
318
- this.currentIndex++;
319
- count += 3;
320
- } else {
321
- this.extrusions(positions, normals, cur, miter, miterLen, this.totalDistance);
322
- indices.push(...this.lastFlip === 1 ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
323
- flip = -1;
324
- import_gl_matrix.vec2.copy(this.normal, miter);
325
- count += 2;
326
- }
327
- this.lastFlip = flip;
328
- }
329
- return count;
330
- }
331
- segment(complex, index, last, cur, next) {
332
- let count = 0;
333
- const indices = complex.indices;
334
- const positions = complex.positions;
335
- const normals = complex.normals;
336
- const capSquare = this.cap === "square";
337
- const joinBevel = this.join === "bevel";
338
- const flatCur = (0, import_l7_utils.aProjectFlat)([cur[0], cur[1]]);
339
- const flatLast = (0, import_l7_utils.aProjectFlat)([last[0], last[1]]);
340
- direction(lineA, flatCur, flatLast);
341
- let segmentDistance = 0;
342
- if (this.dash) {
343
- segmentDistance = this.lineSegmentDistance(flatCur, flatLast);
344
- this.totalDistance += segmentDistance;
345
- }
346
- if (!this.normal) {
347
- this.normal = import_gl_matrix.vec2.create();
348
- computeNormal(this.normal, lineA);
349
- }
350
- if (!this.started) {
351
- this.started = true;
352
- if (capSquare) {
353
- const out1 = import_gl_matrix.vec2.create();
354
- const out2 = import_gl_matrix.vec2.create();
355
- import_gl_matrix.vec2.add(out1, this.normal, lineA);
356
- import_gl_matrix.vec2.add(out2, this.normal, lineA);
357
- normals.push(out2[0], out2[1], 0);
358
- normals.push(out1[0], out1[1], 0);
359
- positions.push(last[0], last[1], last[2] | 0, this.totalDistance - segmentDistance, -this.thickness, last[2] | 0);
360
- this.complex.indexes.push(this.currentIndex);
361
- positions.push(last[0], last[1], last[2] | 0, this.totalDistance - segmentDistance, this.thickness, last[2] | 0);
362
- this.complex.indexes.push(this.currentIndex);
363
- this.currentIndex++;
364
- } else {
365
- this.extrusions(positions, normals, last, this.normal, this.thickness, this.totalDistance - segmentDistance);
366
- }
367
- }
368
- indices.push(index + 0, index + 1, index + 2);
369
- if (!next) {
370
- computeNormal(this.normal, lineA);
371
- if (capSquare) {
372
- const out1 = import_gl_matrix.vec2.create();
373
- const out2 = import_gl_matrix.vec2.create();
374
- import_gl_matrix.vec2.sub(out2, lineA, this.normal);
375
- import_gl_matrix.vec2.add(out1, lineA, this.normal);
376
- normals.push(out2[0], out2[1], 0);
377
- normals.push(out1[0], out1[1], 0);
378
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, this.thickness, cur[2] | 0);
379
- this.complex.indexes.push(this.currentIndex);
380
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, this.thickness, cur[2] | 0);
381
- this.complex.indexes.push(this.currentIndex);
382
- this.currentIndex++;
383
- } else {
384
- this.extrusions(positions, normals, cur, this.normal, this.thickness, this.totalDistance);
385
- }
386
- indices.push(...this.lastFlip === 1 ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
387
- count += 2;
388
- } else {
389
- const flatNext = (0, import_l7_utils.aProjectFlat)([next[0], next[1]]);
390
- if (isPointEqual(flatCur, flatNext)) {
391
- import_gl_matrix.vec2.add(flatNext, flatCur, import_gl_matrix.vec2.normalize(flatNext, import_gl_matrix.vec2.subtract(flatNext, flatCur, flatLast)));
392
- }
393
- direction(lineB, flatNext, flatCur);
394
- const [miterLen, miter] = computeMiter(tangent, import_gl_matrix.vec2.create(), lineA, lineB, this.thickness);
395
- let flip = import_gl_matrix.vec2.dot(tangent, this.normal) < 0 ? -1 : 1;
396
- let bevel = joinBevel;
397
- if (!bevel && this.join === "miter") {
398
- const limit = miterLen;
399
- if (limit > this.miterLimit) {
400
- bevel = true;
401
- }
402
- }
403
- if (bevel) {
404
- normals.push(this.normal[0], this.normal[1], 0);
405
- normals.push(miter[0], miter[1], 0);
406
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, -this.thickness * flip, cur[2] | 0);
407
- this.complex.indexes.push(this.currentIndex);
408
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, this.thickness * flip, cur[2] | 0);
409
- this.complex.indexes.push(this.currentIndex);
410
- this.currentIndex++;
411
- indices.push(...this.lastFlip !== -flip ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
412
- indices.push(index + 2, index + 3, index + 4);
413
- computeNormal(tmp, lineB);
414
- import_gl_matrix.vec2.copy(this.normal, tmp);
415
- normals.push(this.normal[0], this.normal[1], 0);
416
- positions.push(cur[0], cur[1], cur[2] | 0, this.totalDistance, -this.thickness * flip, cur[2] | 0);
417
- this.complex.indexes.push(this.currentIndex);
418
- this.currentIndex++;
419
- count += 3;
420
- } else {
421
- this.extrusions(positions, normals, cur, miter, miterLen, this.totalDistance);
422
- indices.push(...this.lastFlip === 1 ? [index, index + 2, index + 3] : [index + 2, index + 1, index + 3]);
423
- flip = -1;
424
- import_gl_matrix.vec2.copy(this.normal, miter);
425
- count += 2;
426
- }
427
- this.lastFlip = flip;
428
- }
429
- return count;
430
- }
431
- extrusions(positions, normals, point, normal, thickness, distanceRadio) {
432
- normals.push(normal[0], normal[1], 0);
433
- normals.push(normal[0], normal[1], 0);
434
- positions.push(point[0], point[1], point[2] | 0, distanceRadio, -thickness, point[2] | 0);
435
- this.complex.indexes.push(this.currentIndex);
436
- positions.push(point[0], point[1], point[2] | 0, distanceRadio, thickness, point[2] | 0);
437
- this.complex.indexes.push(this.currentIndex);
438
- this.currentIndex++;
439
- }
440
- lineSegmentDistance(b1, a1) {
441
- const dx = a1[0] - b1[0];
442
- const dy = a1[1] - b1[1];
443
- return Math.sqrt(dx * dx + dy * dy);
444
- }
445
- };
446
- // Annotate the CommonJS export names for ESM import in node:
447
- 0 && (module.exports = {
448
- computeMiter,
449
- computeNormal,
450
- direction
451
- });
@@ -1,136 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/grid-index.ts
20
- var grid_index_exports = {};
21
- __export(grid_index_exports, {
22
- default: () => grid_index_default
23
- });
24
- module.exports = __toCommonJS(grid_index_exports);
25
- var GridIndex = class {
26
- constructor(width, height, cellSize) {
27
- this.boxCells = [];
28
- const boxCells = this.boxCells;
29
- this.xCellCount = Math.ceil(width / cellSize);
30
- this.yCellCount = Math.ceil(height / cellSize);
31
- for (let i = 0; i < this.xCellCount * this.yCellCount; i++) {
32
- boxCells.push([]);
33
- }
34
- this.boxKeys = [];
35
- this.bboxes = [];
36
- this.width = width;
37
- this.height = height;
38
- this.xScale = this.xCellCount / width;
39
- this.yScale = this.yCellCount / height;
40
- this.boxUid = 0;
41
- }
42
- insert(key, x1, y1, x2, y2) {
43
- this.forEachCell(x1, y1, x2, y2, this.insertBoxCell, this.boxUid++);
44
- this.boxKeys.push(key);
45
- this.bboxes.push(x1);
46
- this.bboxes.push(y1);
47
- this.bboxes.push(x2);
48
- this.bboxes.push(y2);
49
- }
50
- query(x1, y1, x2, y2, predicate) {
51
- return this.queryHitTest(x1, y1, x2, y2, false, predicate);
52
- }
53
- hitTest(x1, y1, x2, y2, predicate) {
54
- return this.queryHitTest(x1, y1, x2, y2, true, predicate);
55
- }
56
- insertBoxCell(x1, y1, x2, y2, cellIndex, uid) {
57
- this.boxCells[cellIndex].push(uid);
58
- }
59
- queryHitTest(x1, y1, x2, y2, hitTest, predicate) {
60
- if (x2 < 0 || x1 > this.width || y2 < 0 || y1 > this.height) {
61
- return hitTest ? false : [];
62
- }
63
- const result = [];
64
- if (x1 <= 0 && y1 <= 0 && this.width <= x2 && this.height <= y2) {
65
- if (hitTest) {
66
- return true;
67
- }
68
- for (let boxUid = 0; boxUid < this.boxKeys.length; boxUid++) {
69
- result.push({
70
- key: this.boxKeys[boxUid],
71
- x1: this.bboxes[boxUid * 4],
72
- y1: this.bboxes[boxUid * 4 + 1],
73
- x2: this.bboxes[boxUid * 4 + 2],
74
- y2: this.bboxes[boxUid * 4 + 3]
75
- });
76
- }
77
- return predicate ? result.filter(predicate) : result;
78
- }
79
- const queryArgs = {
80
- hitTest,
81
- seenUids: { box: {}, circle: {} }
82
- };
83
- this.forEachCell(x1, y1, x2, y2, this.queryCell, result, queryArgs, predicate);
84
- return hitTest ? result.length > 0 : result;
85
- }
86
- queryCell(x1, y1, x2, y2, cellIndex, result, queryArgs, predicate) {
87
- const seenUids = queryArgs.seenUids;
88
- const boxCell = this.boxCells[cellIndex];
89
- if (boxCell !== null) {
90
- const bboxes = this.bboxes;
91
- for (const boxUid of boxCell) {
92
- if (!seenUids.box[boxUid]) {
93
- seenUids.box[boxUid] = true;
94
- const offset = boxUid * 4;
95
- if (x1 <= bboxes[offset + 2] && y1 <= bboxes[offset + 3] && x2 >= bboxes[offset + 0] && y2 >= bboxes[offset + 1] && (!predicate || predicate(this.boxKeys[boxUid]))) {
96
- if (queryArgs.hitTest) {
97
- result.push(true);
98
- return true;
99
- }
100
- result.push({
101
- key: this.boxKeys[boxUid],
102
- x1: bboxes[offset],
103
- y1: bboxes[offset + 1],
104
- x2: bboxes[offset + 2],
105
- y2: bboxes[offset + 3]
106
- });
107
- }
108
- }
109
- }
110
- }
111
- return false;
112
- }
113
- forEachCell(x1, y1, x2, y2, fn, arg1, arg2, predicate) {
114
- const cx1 = this.convertToXCellCoord(x1);
115
- const cy1 = this.convertToYCellCoord(y1);
116
- const cx2 = this.convertToXCellCoord(x2);
117
- const cy2 = this.convertToYCellCoord(y2);
118
- for (let x = cx1; x <= cx2; x++) {
119
- for (let y = cy1; y <= cy2; y++) {
120
- const cellIndex = this.xCellCount * y + x;
121
- if (fn.call(this, x1, y1, x2, y2, cellIndex, arg1, arg2, predicate)) {
122
- return;
123
- }
124
- }
125
- }
126
- }
127
- convertToXCellCoord(x) {
128
- return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(x * this.xScale)));
129
- }
130
- convertToYCellCoord(y) {
131
- return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(y * this.yScale)));
132
- }
133
- };
134
- var grid_index_default = GridIndex;
135
- // Annotate the CommonJS export names for ESM import in node:
136
- 0 && (module.exports = {});