@antv/l7-layers 2.9.37-alpha.1 → 2.9.37-alpha.2

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 (648) hide show
  1. package/package.json +6 -6
  2. package/es/Geometry/index.d.ts +0 -23
  3. package/es/Geometry/index.js +0 -105
  4. package/es/Geometry/models/billboard.d.ts +0 -17
  5. package/es/Geometry/models/billboard.js +0 -215
  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 -36
  9. package/es/Geometry/models/plane.js +0 -406
  10. package/es/Geometry/models/sprite.d.ts +0 -38
  11. package/es/Geometry/models/sprite.js +0 -288
  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 -14
  19. package/es/canvas/index.js +0 -108
  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 -8
  25. package/es/citybuliding/building.js +0 -73
  26. package/es/citybuliding/models/build.d.ts +0 -22
  27. package/es/citybuliding/models/build.js +0 -187
  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 -225
  31. package/es/core/BaseLayer.js +0 -1439
  32. package/es/core/BaseModel.d.ts +0 -140
  33. package/es/core/BaseModel.js +0 -490
  34. package/es/core/interface.d.ts +0 -225
  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 -130
  43. package/es/core/triangulation.js +0 -552
  44. package/es/earth/index.d.ts +0 -22
  45. package/es/earth/index.js +0 -98
  46. package/es/earth/models/atmosphere.d.ts +0 -9
  47. package/es/earth/models/atmosphere.js +0 -135
  48. package/es/earth/models/base.d.ts +0 -16
  49. package/es/earth/models/base.js +0 -206
  50. package/es/earth/models/bloomsphere.d.ts +0 -9
  51. package/es/earth/models/bloomsphere.js +0 -134
  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/glsl.d.ts +0 -5
  61. package/es/heatmap/index.d.ts +0 -12
  62. package/es/heatmap/index.js +0 -128
  63. package/es/heatmap/models/grid.d.ts +0 -8
  64. package/es/heatmap/models/grid.js +0 -106
  65. package/es/heatmap/models/grid3d.d.ts +0 -8
  66. package/es/heatmap/models/grid3d.js +0 -140
  67. package/es/heatmap/models/heatmap.d.ts +0 -24
  68. package/es/heatmap/models/heatmap.js +0 -461
  69. package/es/heatmap/models/hexagon.d.ts +0 -8
  70. package/es/heatmap/models/hexagon.js +0 -107
  71. package/es/heatmap/models/index.d.ts +0 -5
  72. package/es/heatmap/models/index.js +0 -12
  73. package/es/heatmap/shaders/grid_vert.glsl +0 -42
  74. package/es/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
  75. package/es/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
  76. package/es/heatmap/shaders/heatmap_frag.glsl +0 -47
  77. package/es/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
  78. package/es/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
  79. package/es/heatmap/shaders/heatmap_vert.glsl +0 -10
  80. package/es/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
  81. package/es/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
  82. package/es/heatmap/shaders/hexagon_frag.glsl +0 -12
  83. package/es/heatmap/shaders/hexagon_vert.glsl +0 -41
  84. package/es/heatmap/triangulation.d.ts +0 -5
  85. package/es/heatmap/triangulation.js +0 -37
  86. package/es/image/index.d.ts +0 -10
  87. package/es/image/index.js +0 -91
  88. package/es/image/models/dataImage.d.ts +0 -13
  89. package/es/image/models/dataImage.js +0 -186
  90. package/es/image/models/image.d.ts +0 -10
  91. package/es/image/models/image.js +0 -150
  92. package/es/image/models/index.d.ts +0 -5
  93. package/es/image/models/index.js +0 -9
  94. package/es/image/models/tileDataImage.d.ts +0 -10
  95. package/es/image/models/tileDataImage.js +0 -160
  96. package/es/image/shaders/dataImage_frag.glsl +0 -38
  97. package/es/image/shaders/image_frag.glsl +0 -9
  98. package/es/image/shaders/image_vert.glsl +0 -17
  99. package/es/index.d.ts +0 -17
  100. package/es/index.js +0 -107
  101. package/es/line/index.d.ts +0 -34
  102. package/es/line/index.js +0 -127
  103. package/es/line/models/arc.d.ts +0 -17
  104. package/es/line/models/arc.js +0 -356
  105. package/es/line/models/arc_3d.d.ts +0 -17
  106. package/es/line/models/arc_3d.js +0 -333
  107. package/es/line/models/earthArc_3d.d.ts +0 -17
  108. package/es/line/models/earthArc_3d.js +0 -336
  109. package/es/line/models/great_circle.d.ts +0 -12
  110. package/es/line/models/great_circle.js +0 -294
  111. package/es/line/models/half.d.ts +0 -18
  112. package/es/line/models/half.js +0 -281
  113. package/es/line/models/index.d.ts +0 -5
  114. package/es/line/models/index.js +0 -25
  115. package/es/line/models/line.d.ts +0 -21
  116. package/es/line/models/line.js +0 -443
  117. package/es/line/models/linearline.d.ts +0 -11
  118. package/es/line/models/linearline.js +0 -275
  119. package/es/line/models/simpleLine.d.ts +0 -14
  120. package/es/line/models/simpleLine.js +0 -234
  121. package/es/line/models/simpleTileLine.d.ts +0 -9
  122. package/es/line/models/simpleTileLine.js +0 -100
  123. package/es/line/models/tile.d.ts +0 -8
  124. package/es/line/models/tile.js +0 -178
  125. package/es/line/models/wall.d.ts +0 -12
  126. package/es/line/models/wall.js +0 -293
  127. package/es/line/shaders/arc_chunks.vert.glsl +0 -21
  128. package/es/line/shaders/dash/arc_dash_frag.glsl +0 -28
  129. package/es/line/shaders/dash/arc_dash_vert.glsl +0 -150
  130. package/es/line/shaders/dash/line_dash_frag.glsl +0 -31
  131. package/es/line/shaders/dash/line_dash_vert.glsl +0 -93
  132. package/es/line/shaders/half/line_half_frag.glsl +0 -53
  133. package/es/line/shaders/half/line_half_vert.glsl +0 -169
  134. package/es/line/shaders/line_arc2d_vert.glsl +0 -114
  135. package/es/line/shaders/line_arc_3d_frag.glsl +0 -103
  136. package/es/line/shaders/line_arc_3d_vert.glsl +0 -206
  137. package/es/line/shaders/line_arc_frag.glsl +0 -88
  138. package/es/line/shaders/line_arc_great_circle_frag.glsl +0 -101
  139. package/es/line/shaders/line_arc_great_circle_vert.glsl +0 -214
  140. package/es/line/shaders/line_arc_vert.glsl +0 -178
  141. package/es/line/shaders/line_bezier_vert.glsl +0 -85
  142. package/es/line/shaders/line_frag.glsl +0 -99
  143. package/es/line/shaders/line_vert.glsl +0 -192
  144. package/es/line/shaders/linear/arc3d_linear_frag.glsl +0 -46
  145. package/es/line/shaders/linear/arc3d_linear_vert.glsl +0 -206
  146. package/es/line/shaders/linear/arc_linear_frag.glsl +0 -38
  147. package/es/line/shaders/linear/arc_linear_vert.glsl +0 -138
  148. package/es/line/shaders/linear/line_linear_frag.glsl +0 -27
  149. package/es/line/shaders/linearLine/line_linear_frag.glsl +0 -20
  150. package/es/line/shaders/linearLine/line_linear_vert.glsl +0 -112
  151. package/es/line/shaders/simple/simpleline_frag.glsl +0 -10
  152. package/es/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
  153. package/es/line/shaders/simple/simpleline_vert.glsl +0 -79
  154. package/es/line/shaders/tile/line_tile_map_vert.glsl +0 -25
  155. package/es/line/shaders/tile/line_tile_vert.glsl +0 -52
  156. package/es/line/shaders/tile/simpleline_map_vert.glsl +0 -15
  157. package/es/line/shaders/tile/simpleline_vert.glsl +0 -21
  158. package/es/line/shaders/wall/wall_frag.glsl +0 -89
  159. package/es/line/shaders/wall/wall_vert.glsl +0 -77
  160. package/es/mask/index.d.ts +0 -18
  161. package/es/mask/index.js +0 -147
  162. package/es/mask/models/fill.d.ts +0 -12
  163. package/es/mask/models/fill.js +0 -124
  164. package/es/mask/models/index.d.ts +0 -5
  165. package/es/mask/models/index.js +0 -7
  166. package/es/mask/shaders/mask_vert.glsl +0 -16
  167. package/es/plugins/DataMappingPlugin.d.ts +0 -18
  168. package/es/plugins/DataMappingPlugin.js +0 -413
  169. package/es/plugins/DataSourcePlugin.d.ts +0 -7
  170. package/es/plugins/DataSourcePlugin.js +0 -84
  171. package/es/plugins/FeatureScalePlugin.d.ts +0 -24
  172. package/es/plugins/FeatureScalePlugin.js +0 -342
  173. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -5
  174. package/es/plugins/LayerAnimateStylePlugin.js +0 -29
  175. package/es/plugins/LayerModelPlugin.d.ts +0 -10
  176. package/es/plugins/LayerModelPlugin.js +0 -72
  177. package/es/plugins/LayerStylePlugin.d.ts +0 -8
  178. package/es/plugins/LayerStylePlugin.js +0 -39
  179. package/es/plugins/LightingPlugin.d.ts +0 -36
  180. package/es/plugins/LightingPlugin.js +0 -104
  181. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -23
  182. package/es/plugins/MultiPassRendererPlugin.js +0 -65
  183. package/es/plugins/PixelPickingPlugin.d.ts +0 -8
  184. package/es/plugins/PixelPickingPlugin.js +0 -126
  185. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -15
  186. package/es/plugins/RegisterStyleAttributePlugin.js +0 -151
  187. package/es/plugins/ShaderUniformPlugin.d.ts +0 -21
  188. package/es/plugins/ShaderUniformPlugin.js +0 -106
  189. package/es/plugins/UpdateModelPlugin.d.ts +0 -8
  190. package/es/plugins/UpdateModelPlugin.js +0 -31
  191. package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -12
  192. package/es/plugins/UpdateStyleAttributePlugin.js +0 -83
  193. package/es/point/index.d.ts +0 -31
  194. package/es/point/index.js +0 -216
  195. package/es/point/models/earthExtrude.d.ts +0 -24
  196. package/es/point/models/earthExtrude.js +0 -274
  197. package/es/point/models/earthFill.d.ts +0 -11
  198. package/es/point/models/earthFill.js +0 -258
  199. package/es/point/models/extrude.d.ts +0 -24
  200. package/es/point/models/extrude.js +0 -295
  201. package/es/point/models/fill.d.ts +0 -40
  202. package/es/point/models/fill.js +0 -403
  203. package/es/point/models/fillmage.d.ts +0 -25
  204. package/es/point/models/fillmage.js +0 -366
  205. package/es/point/models/image.d.ts +0 -11
  206. package/es/point/models/image.js +0 -239
  207. package/es/point/models/index.d.ts +0 -5
  208. package/es/point/models/index.js +0 -30
  209. package/es/point/models/normal.d.ts +0 -16
  210. package/es/point/models/normal.js +0 -124
  211. package/es/point/models/radar.d.ts +0 -24
  212. package/es/point/models/radar.js +0 -232
  213. package/es/point/models/simplePoint.d.ts +0 -16
  214. package/es/point/models/simplePoint.js +0 -179
  215. package/es/point/models/text.d.ts +0 -57
  216. package/es/point/models/text.js +0 -619
  217. package/es/point/models/tile.d.ts +0 -15
  218. package/es/point/models/tile.js +0 -175
  219. package/es/point/models/tileText.d.ts +0 -52
  220. package/es/point/models/tileText.js +0 -509
  221. package/es/point/shaders/animate/wave_frag.glsl +0 -65
  222. package/es/point/shaders/earth/extrude_frag.glsl +0 -44
  223. package/es/point/shaders/earth/extrude_vert.glsl +0 -140
  224. package/es/point/shaders/earth/fill_frag.glsl +0 -86
  225. package/es/point/shaders/earth/fill_vert.glsl +0 -125
  226. package/es/point/shaders/extrude/extrude_frag.glsl +0 -44
  227. package/es/point/shaders/extrude/extrude_vert.glsl +0 -121
  228. package/es/point/shaders/fill_frag.glsl +0 -84
  229. package/es/point/shaders/fill_vert.glsl +0 -188
  230. package/es/point/shaders/image/fillImage_frag.glsl +0 -20
  231. package/es/point/shaders/image/fillImage_vert.glsl +0 -116
  232. package/es/point/shaders/image_frag.glsl +0 -39
  233. package/es/point/shaders/image_vert.glsl +0 -90
  234. package/es/point/shaders/normal_frag.glsl +0 -6
  235. package/es/point/shaders/normal_vert.glsl +0 -24
  236. package/es/point/shaders/radar/radar_frag.glsl +0 -53
  237. package/es/point/shaders/radar/radar_vert.glsl +0 -70
  238. package/es/point/shaders/simplePoint_frag.glsl +0 -53
  239. package/es/point/shaders/simplePoint_vert.glsl +0 -79
  240. package/es/point/shaders/text_frag.glsl +0 -48
  241. package/es/point/shaders/text_vert.glsl +0 -131
  242. package/es/point/shaders/tile/fill_tile_frag.glsl +0 -76
  243. package/es/point/shaders/tile/fill_tile_vert.glsl +0 -78
  244. package/es/point/shaders/tile/text_frag.glsl +0 -33
  245. package/es/point/shaders/tile/text_map_frag.glsl +0 -31
  246. package/es/point/shaders/tile/text_map_vert.glsl +0 -38
  247. package/es/point/shaders/tile/text_vert.glsl +0 -48
  248. package/es/point/shape/extrude.d.ts +0 -15
  249. package/es/point/shape/extrude.js +0 -63
  250. package/es/polygon/index.d.ts +0 -18
  251. package/es/polygon/index.js +0 -133
  252. package/es/polygon/models/extrude.d.ts +0 -28
  253. package/es/polygon/models/extrude.js +0 -302
  254. package/es/polygon/models/fill.d.ts +0 -17
  255. package/es/polygon/models/fill.js +0 -210
  256. package/es/polygon/models/index.d.ts +0 -5
  257. package/es/polygon/models/index.js +0 -28
  258. package/es/polygon/models/ocean.d.ts +0 -21
  259. package/es/polygon/models/ocean.js +0 -201
  260. package/es/polygon/models/tile.d.ts +0 -12
  261. package/es/polygon/models/tile.js +0 -101
  262. package/es/polygon/models/water.d.ts +0 -16
  263. package/es/polygon/models/water.js +0 -178
  264. package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
  265. package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
  266. package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
  267. package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
  268. package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
  269. package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
  270. package/es/polygon/shaders/polygon_frag.glsl +0 -12
  271. package/es/polygon/shaders/polygon_linear_frag.glsl +0 -22
  272. package/es/polygon/shaders/polygon_linear_vert.glsl +0 -74
  273. package/es/polygon/shaders/polygon_vert.glsl +0 -66
  274. package/es/polygon/shaders/tile/polygon_tile_map_vert.glsl +0 -16
  275. package/es/polygon/shaders/tile/polygon_tile_vert.glsl +0 -42
  276. package/es/polygon/shaders/water/polygon_ocean_frag.glsl +0 -247
  277. package/es/polygon/shaders/water/polygon_ocean_vert.glsl +0 -21
  278. package/es/polygon/shaders/water/polygon_water_frag.glsl +0 -71
  279. package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -26
  280. package/es/raster/buffers/triangulation.d.ts +0 -6
  281. package/es/raster/buffers/triangulation.js +0 -25
  282. package/es/raster/index.d.ts +0 -10
  283. package/es/raster/index.js +0 -94
  284. package/es/raster/models/index.d.ts +0 -5
  285. package/es/raster/models/index.js +0 -10
  286. package/es/raster/models/raster.d.ts +0 -22
  287. package/es/raster/models/raster.js +0 -241
  288. package/es/raster/models/rasterRgb.d.ts +0 -20
  289. package/es/raster/models/rasterRgb.js +0 -225
  290. package/es/raster/models/rasterTile.d.ts +0 -18
  291. package/es/raster/models/rasterTile.js +0 -139
  292. package/es/raster/raster.d.ts +0 -21
  293. package/es/raster/raster.js +0 -161
  294. package/es/raster/shaders/raster_2d_frag.glsl +0 -64
  295. package/es/raster/shaders/raster_2d_vert.glsl +0 -17
  296. package/es/raster/shaders/raster_frag.glsl +0 -9
  297. package/es/raster/shaders/raster_rgb_frag.glsl +0 -12
  298. package/es/raster/shaders/raster_vert.glsl +0 -44
  299. package/es/shader/minify_frag.glsl +0 -7
  300. package/es/shader/minify_picking_frag.glsl +0 -10
  301. package/es/tile/interaction/TilePickService.d.ts +0 -16
  302. package/es/tile/interaction/TilePickService.js +0 -129
  303. package/es/tile/interaction/getFeatureData.d.ts +0 -0
  304. package/es/tile/interaction/getFeatureData.js +0 -0
  305. package/es/tile/interaction/getRasterData.d.ts +0 -4
  306. package/es/tile/interaction/getRasterData.js +0 -70
  307. package/es/tile/interaction/utils.d.ts +0 -11
  308. package/es/tile/interaction/utils.js +0 -97
  309. package/es/tile/interface.d.ts +0 -28
  310. package/es/tile/interface.js +0 -1
  311. package/es/tile/manager/base.d.ts +0 -30
  312. package/es/tile/manager/base.js +0 -146
  313. package/es/tile/manager/layerManager.d.ts +0 -19
  314. package/es/tile/manager/layerManager.js +0 -254
  315. package/es/tile/manager/mapLayerManager.d.ts +0 -7
  316. package/es/tile/manager/mapLayerManager.js +0 -119
  317. package/es/tile/models/tileModel.d.ts +0 -10
  318. package/es/tile/models/tileModel.js +0 -81
  319. package/es/tile/render/TileRenderService.d.ts +0 -10
  320. package/es/tile/render/TileRenderService.js +0 -68
  321. package/es/tile/style/TileStyleService.d.ts +0 -17
  322. package/es/tile/style/TileStyleService.js +0 -118
  323. package/es/tile/style/constants.d.ts +0 -13
  324. package/es/tile/style/constants.js +0 -17
  325. package/es/tile/style/utils.d.ts +0 -9
  326. package/es/tile/style/utils.js +0 -139
  327. package/es/tile/tileFactory/base.d.ts +0 -45
  328. package/es/tile/tileFactory/base.js +0 -403
  329. package/es/tile/tileFactory/index.d.ts +0 -5
  330. package/es/tile/tileFactory/index.js +0 -38
  331. package/es/tile/tileFactory/layers/rasterDataLayer.d.ts +0 -11
  332. package/es/tile/tileFactory/layers/rasterDataLayer.js +0 -77
  333. package/es/tile/tileFactory/layers/tileTest.d.ts +0 -15
  334. package/es/tile/tileFactory/layers/tileTest.js +0 -62
  335. package/es/tile/tileFactory/layers/vectorLayer.d.ts +0 -30
  336. package/es/tile/tileFactory/layers/vectorLayer.js +0 -253
  337. package/es/tile/tileFactory/line.d.ts +0 -12
  338. package/es/tile/tileFactory/line.js +0 -59
  339. package/es/tile/tileFactory/mask.d.ts +0 -12
  340. package/es/tile/tileFactory/mask.js +0 -60
  341. package/es/tile/tileFactory/point.d.ts +0 -12
  342. package/es/tile/tileFactory/point.js +0 -60
  343. package/es/tile/tileFactory/polygon.d.ts +0 -12
  344. package/es/tile/tileFactory/polygon.js +0 -59
  345. package/es/tile/tileFactory/raster.d.ts +0 -12
  346. package/es/tile/tileFactory/raster.js +0 -55
  347. package/es/tile/tileFactory/rasterData.d.ts +0 -12
  348. package/es/tile/tileFactory/rasterData.js +0 -81
  349. package/es/tile/tileFactory/test.d.ts +0 -12
  350. package/es/tile/tileFactory/test.js +0 -94
  351. package/es/tile/tileLayer/MapTileLayer.d.ts +0 -6
  352. package/es/tile/tileLayer/MapTileLayer.js +0 -48
  353. package/es/tile/tileLayer/TileLayer.d.ts +0 -22
  354. package/es/tile/tileLayer/TileLayer.js +0 -198
  355. package/es/tile/tileLayer/base.d.ts +0 -33
  356. package/es/tile/tileLayer/base.js +0 -212
  357. package/es/tile/utils.d.ts +0 -22
  358. package/es/tile/utils.js +0 -149
  359. package/es/utils/blend.d.ts +0 -2
  360. package/es/utils/blend.js +0 -54
  361. package/es/utils/collision-index.d.ts +0 -47
  362. package/es/utils/collision-index.js +0 -102
  363. package/es/utils/dataMappingStyle.d.ts +0 -31
  364. package/es/utils/dataMappingStyle.js +0 -147
  365. package/es/utils/extrude_polyline.d.ts +0 -68
  366. package/es/utils/extrude_polyline.js +0 -613
  367. package/es/utils/grid-index.d.ts +0 -28
  368. package/es/utils/grid-index.js +0 -179
  369. package/es/utils/layerData.d.ts +0 -2
  370. package/es/utils/layerData.js +0 -179
  371. package/es/utils/multiPassRender.d.ts +0 -16
  372. package/es/utils/multiPassRender.js +0 -49
  373. package/es/utils/polylineNormal.d.ts +0 -9
  374. package/es/utils/polylineNormal.js +0 -191
  375. package/es/utils/simpleLine.d.ts +0 -23
  376. package/es/utils/simpleLine.js +0 -103
  377. package/es/utils/symbol-layout.d.ts +0 -43
  378. package/es/utils/symbol-layout.js +0 -299
  379. package/es/utils/updateShape.d.ts +0 -2
  380. package/es/utils/updateShape.js +0 -20
  381. package/es/wind/index.d.ts +0 -11
  382. package/es/wind/index.js +0 -85
  383. package/es/wind/models/index.d.ts +0 -5
  384. package/es/wind/models/index.js +0 -5
  385. package/es/wind/models/utils.d.ts +0 -19
  386. package/es/wind/models/utils.js +0 -226
  387. package/es/wind/models/wind.d.ts +0 -24
  388. package/es/wind/models/wind.js +0 -317
  389. package/es/wind/models/windRender.d.ts +0 -104
  390. package/es/wind/models/windRender.js +0 -357
  391. package/es/wind/models/windShader.d.ts +0 -12
  392. package/es/wind/models/windShader.js +0 -12
  393. package/es/wind/shaders/wind_frag.glsl +0 -9
  394. package/es/wind/shaders/wind_vert.glsl +0 -17
  395. package/lib/Geometry/index.js +0 -117
  396. package/lib/Geometry/models/billboard.js +0 -229
  397. package/lib/Geometry/models/index.js +0 -22
  398. package/lib/Geometry/models/plane.js +0 -421
  399. package/lib/Geometry/models/sprite.js +0 -302
  400. package/lib/Geometry/shaders/billboard_frag.glsl +0 -13
  401. package/lib/Geometry/shaders/billboard_vert.glsl +0 -50
  402. package/lib/Geometry/shaders/plane_frag.glsl +0 -22
  403. package/lib/Geometry/shaders/plane_vert.glsl +0 -53
  404. package/lib/Geometry/shaders/sprite_frag.glsl +0 -21
  405. package/lib/Geometry/shaders/sprite_vert.glsl +0 -28
  406. package/lib/canvas/index.js +0 -120
  407. package/lib/canvas/models/canvas.js +0 -221
  408. package/lib/canvas/models/index.js +0 -16
  409. package/lib/citybuliding/building.js +0 -86
  410. package/lib/citybuliding/models/build.js +0 -202
  411. package/lib/citybuliding/shaders/build_frag.glsl +0 -117
  412. package/lib/citybuliding/shaders/build_vert.glsl +0 -54
  413. package/lib/core/BaseLayer.js +0 -1434
  414. package/lib/core/BaseModel.js +0 -507
  415. package/lib/core/interface.js +0 -41
  416. package/lib/core/schema.js +0 -33
  417. package/lib/core/shape/Path.js +0 -88
  418. package/lib/core/shape/extrude.js +0 -180
  419. package/lib/core/triangulation.js +0 -620
  420. package/lib/earth/index.js +0 -113
  421. package/lib/earth/models/atmosphere.js +0 -149
  422. package/lib/earth/models/base.js +0 -216
  423. package/lib/earth/models/bloomsphere.js +0 -148
  424. package/lib/earth/shaders/atmosphere_frag.glsl +0 -17
  425. package/lib/earth/shaders/atmosphere_vert.glsl +0 -26
  426. package/lib/earth/shaders/base_frag.glsl +0 -13
  427. package/lib/earth/shaders/base_vert.glsl +0 -52
  428. package/lib/earth/shaders/bloomsphere_frag.glsl +0 -15
  429. package/lib/earth/shaders/bloomsphere_vert.glsl +0 -20
  430. package/lib/earth/utils.js +0 -136
  431. package/lib/glsl.d.ts +0 -5
  432. package/lib/heatmap/index.js +0 -141
  433. package/lib/heatmap/models/grid.js +0 -120
  434. package/lib/heatmap/models/grid3d.js +0 -154
  435. package/lib/heatmap/models/heatmap.js +0 -484
  436. package/lib/heatmap/models/hexagon.js +0 -121
  437. package/lib/heatmap/models/index.js +0 -26
  438. package/lib/heatmap/shaders/grid_vert.glsl +0 -42
  439. package/lib/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
  440. package/lib/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
  441. package/lib/heatmap/shaders/heatmap_frag.glsl +0 -47
  442. package/lib/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
  443. package/lib/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
  444. package/lib/heatmap/shaders/heatmap_vert.glsl +0 -10
  445. package/lib/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
  446. package/lib/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
  447. package/lib/heatmap/shaders/hexagon_frag.glsl +0 -12
  448. package/lib/heatmap/shaders/hexagon_vert.glsl +0 -41
  449. package/lib/heatmap/triangulation.js +0 -44
  450. package/lib/image/index.js +0 -104
  451. package/lib/image/models/dataImage.js +0 -201
  452. package/lib/image/models/image.js +0 -164
  453. package/lib/image/models/index.js +0 -22
  454. package/lib/image/models/tileDataImage.js +0 -174
  455. package/lib/image/shaders/dataImage_frag.glsl +0 -38
  456. package/lib/image/shaders/image_frag.glsl +0 -9
  457. package/lib/image/shaders/image_vert.glsl +0 -17
  458. package/lib/index.js +0 -275
  459. package/lib/line/index.js +0 -139
  460. package/lib/line/models/arc.js +0 -373
  461. package/lib/line/models/arc_3d.js +0 -351
  462. package/lib/line/models/earthArc_3d.js +0 -354
  463. package/lib/line/models/great_circle.js +0 -310
  464. package/lib/line/models/half.js +0 -298
  465. package/lib/line/models/index.js +0 -46
  466. package/lib/line/models/line.js +0 -460
  467. package/lib/line/models/linearline.js +0 -292
  468. package/lib/line/models/simpleLine.js +0 -249
  469. package/lib/line/models/simpleTileLine.js +0 -115
  470. package/lib/line/models/tile.js +0 -194
  471. package/lib/line/models/wall.js +0 -309
  472. package/lib/line/shaders/arc_chunks.vert.glsl +0 -21
  473. package/lib/line/shaders/dash/arc_dash_frag.glsl +0 -28
  474. package/lib/line/shaders/dash/arc_dash_vert.glsl +0 -150
  475. package/lib/line/shaders/dash/line_dash_frag.glsl +0 -31
  476. package/lib/line/shaders/dash/line_dash_vert.glsl +0 -93
  477. package/lib/line/shaders/half/line_half_frag.glsl +0 -53
  478. package/lib/line/shaders/half/line_half_vert.glsl +0 -169
  479. package/lib/line/shaders/line_arc2d_vert.glsl +0 -114
  480. package/lib/line/shaders/line_arc_3d_frag.glsl +0 -103
  481. package/lib/line/shaders/line_arc_3d_vert.glsl +0 -206
  482. package/lib/line/shaders/line_arc_frag.glsl +0 -88
  483. package/lib/line/shaders/line_arc_great_circle_frag.glsl +0 -101
  484. package/lib/line/shaders/line_arc_great_circle_vert.glsl +0 -214
  485. package/lib/line/shaders/line_arc_vert.glsl +0 -178
  486. package/lib/line/shaders/line_bezier_vert.glsl +0 -85
  487. package/lib/line/shaders/line_frag.glsl +0 -99
  488. package/lib/line/shaders/line_vert.glsl +0 -192
  489. package/lib/line/shaders/linear/arc3d_linear_frag.glsl +0 -46
  490. package/lib/line/shaders/linear/arc3d_linear_vert.glsl +0 -206
  491. package/lib/line/shaders/linear/arc_linear_frag.glsl +0 -38
  492. package/lib/line/shaders/linear/arc_linear_vert.glsl +0 -138
  493. package/lib/line/shaders/linear/line_linear_frag.glsl +0 -27
  494. package/lib/line/shaders/linearLine/line_linear_frag.glsl +0 -20
  495. package/lib/line/shaders/linearLine/line_linear_vert.glsl +0 -112
  496. package/lib/line/shaders/simple/simpleline_frag.glsl +0 -10
  497. package/lib/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
  498. package/lib/line/shaders/simple/simpleline_vert.glsl +0 -79
  499. package/lib/line/shaders/tile/line_tile_map_vert.glsl +0 -25
  500. package/lib/line/shaders/tile/line_tile_vert.glsl +0 -52
  501. package/lib/line/shaders/tile/simpleline_map_vert.glsl +0 -15
  502. package/lib/line/shaders/tile/simpleline_vert.glsl +0 -21
  503. package/lib/line/shaders/wall/wall_frag.glsl +0 -89
  504. package/lib/line/shaders/wall/wall_vert.glsl +0 -77
  505. package/lib/mask/index.js +0 -163
  506. package/lib/mask/models/fill.js +0 -141
  507. package/lib/mask/models/index.js +0 -19
  508. package/lib/mask/shaders/mask_vert.glsl +0 -16
  509. package/lib/plugins/DataMappingPlugin.js +0 -427
  510. package/lib/plugins/DataSourcePlugin.js +0 -97
  511. package/lib/plugins/FeatureScalePlugin.js +0 -365
  512. package/lib/plugins/LayerAnimateStylePlugin.js +0 -41
  513. package/lib/plugins/LayerModelPlugin.js +0 -83
  514. package/lib/plugins/LayerStylePlugin.js +0 -50
  515. package/lib/plugins/LightingPlugin.js +0 -119
  516. package/lib/plugins/MultiPassRendererPlugin.js +0 -77
  517. package/lib/plugins/PixelPickingPlugin.js +0 -139
  518. package/lib/plugins/RegisterStyleAttributePlugin.js +0 -164
  519. package/lib/plugins/ShaderUniformPlugin.js +0 -119
  520. package/lib/plugins/UpdateModelPlugin.js +0 -42
  521. package/lib/plugins/UpdateStyleAttributePlugin.js +0 -94
  522. package/lib/point/index.js +0 -229
  523. package/lib/point/models/earthExtrude.js +0 -290
  524. package/lib/point/models/earthFill.js +0 -293
  525. package/lib/point/models/extrude.js +0 -312
  526. package/lib/point/models/fill.js +0 -419
  527. package/lib/point/models/fillmage.js +0 -382
  528. package/lib/point/models/image.js +0 -255
  529. package/lib/point/models/index.js +0 -53
  530. package/lib/point/models/normal.js +0 -141
  531. package/lib/point/models/radar.js +0 -249
  532. package/lib/point/models/simplePoint.js +0 -196
  533. package/lib/point/models/text.js +0 -634
  534. package/lib/point/models/tile.js +0 -189
  535. package/lib/point/models/tileText.js +0 -524
  536. package/lib/point/shaders/animate/wave_frag.glsl +0 -65
  537. package/lib/point/shaders/earth/extrude_frag.glsl +0 -44
  538. package/lib/point/shaders/earth/extrude_vert.glsl +0 -140
  539. package/lib/point/shaders/earth/fill_frag.glsl +0 -86
  540. package/lib/point/shaders/earth/fill_vert.glsl +0 -125
  541. package/lib/point/shaders/extrude/extrude_frag.glsl +0 -44
  542. package/lib/point/shaders/extrude/extrude_vert.glsl +0 -121
  543. package/lib/point/shaders/fill_frag.glsl +0 -84
  544. package/lib/point/shaders/fill_vert.glsl +0 -188
  545. package/lib/point/shaders/image/fillImage_frag.glsl +0 -20
  546. package/lib/point/shaders/image/fillImage_vert.glsl +0 -116
  547. package/lib/point/shaders/image_frag.glsl +0 -39
  548. package/lib/point/shaders/image_vert.glsl +0 -90
  549. package/lib/point/shaders/normal_frag.glsl +0 -6
  550. package/lib/point/shaders/normal_vert.glsl +0 -24
  551. package/lib/point/shaders/radar/radar_frag.glsl +0 -53
  552. package/lib/point/shaders/radar/radar_vert.glsl +0 -70
  553. package/lib/point/shaders/simplePoint_frag.glsl +0 -53
  554. package/lib/point/shaders/simplePoint_vert.glsl +0 -79
  555. package/lib/point/shaders/text_frag.glsl +0 -48
  556. package/lib/point/shaders/text_vert.glsl +0 -131
  557. package/lib/point/shaders/tile/fill_tile_frag.glsl +0 -76
  558. package/lib/point/shaders/tile/fill_tile_vert.glsl +0 -78
  559. package/lib/point/shaders/tile/text_frag.glsl +0 -33
  560. package/lib/point/shaders/tile/text_map_frag.glsl +0 -31
  561. package/lib/point/shaders/tile/text_map_vert.glsl +0 -38
  562. package/lib/point/shaders/tile/text_vert.glsl +0 -48
  563. package/lib/point/shape/extrude.js +0 -78
  564. package/lib/polygon/index.js +0 -147
  565. package/lib/polygon/models/extrude.js +0 -318
  566. package/lib/polygon/models/fill.js +0 -225
  567. package/lib/polygon/models/index.js +0 -50
  568. package/lib/polygon/models/ocean.js +0 -218
  569. package/lib/polygon/models/tile.js +0 -114
  570. package/lib/polygon/models/water.js +0 -195
  571. package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
  572. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
  573. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
  574. package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
  575. package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
  576. package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
  577. package/lib/polygon/shaders/polygon_frag.glsl +0 -12
  578. package/lib/polygon/shaders/polygon_linear_frag.glsl +0 -22
  579. package/lib/polygon/shaders/polygon_linear_vert.glsl +0 -74
  580. package/lib/polygon/shaders/polygon_vert.glsl +0 -66
  581. package/lib/polygon/shaders/tile/polygon_tile_map_vert.glsl +0 -16
  582. package/lib/polygon/shaders/tile/polygon_tile_vert.glsl +0 -42
  583. package/lib/polygon/shaders/water/polygon_ocean_frag.glsl +0 -247
  584. package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +0 -21
  585. package/lib/polygon/shaders/water/polygon_water_frag.glsl +0 -71
  586. package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -26
  587. package/lib/raster/buffers/triangulation.js +0 -35
  588. package/lib/raster/index.js +0 -107
  589. package/lib/raster/models/index.js +0 -23
  590. package/lib/raster/models/raster.js +0 -258
  591. package/lib/raster/models/rasterRgb.js +0 -240
  592. package/lib/raster/models/rasterTile.js +0 -153
  593. package/lib/raster/raster.js +0 -178
  594. package/lib/raster/shaders/raster_2d_frag.glsl +0 -64
  595. package/lib/raster/shaders/raster_2d_vert.glsl +0 -17
  596. package/lib/raster/shaders/raster_frag.glsl +0 -9
  597. package/lib/raster/shaders/raster_rgb_frag.glsl +0 -12
  598. package/lib/raster/shaders/raster_vert.glsl +0 -44
  599. package/lib/shader/minify_frag.glsl +0 -7
  600. package/lib/shader/minify_picking_frag.glsl +0 -10
  601. package/lib/tile/interaction/TilePickService.js +0 -143
  602. package/lib/tile/interaction/getFeatureData.js +0 -1
  603. package/lib/tile/interaction/getRasterData.js +0 -83
  604. package/lib/tile/interaction/utils.js +0 -120
  605. package/lib/tile/interface.js +0 -5
  606. package/lib/tile/manager/base.js +0 -161
  607. package/lib/tile/manager/layerManager.js +0 -275
  608. package/lib/tile/manager/mapLayerManager.js +0 -134
  609. package/lib/tile/models/tileModel.js +0 -94
  610. package/lib/tile/render/TileRenderService.js +0 -78
  611. package/lib/tile/style/TileStyleService.js +0 -133
  612. package/lib/tile/style/constants.js +0 -26
  613. package/lib/tile/style/utils.js +0 -163
  614. package/lib/tile/tileFactory/base.js +0 -427
  615. package/lib/tile/tileFactory/index.js +0 -71
  616. package/lib/tile/tileFactory/layers/rasterDataLayer.js +0 -91
  617. package/lib/tile/tileFactory/layers/tileTest.js +0 -74
  618. package/lib/tile/tileFactory/layers/vectorLayer.js +0 -268
  619. package/lib/tile/tileFactory/line.js +0 -70
  620. package/lib/tile/tileFactory/mask.js +0 -71
  621. package/lib/tile/tileFactory/point.js +0 -71
  622. package/lib/tile/tileFactory/polygon.js +0 -70
  623. package/lib/tile/tileFactory/raster.js +0 -68
  624. package/lib/tile/tileFactory/rasterData.js +0 -93
  625. package/lib/tile/tileFactory/test.js +0 -106
  626. package/lib/tile/tileLayer/MapTileLayer.js +0 -63
  627. package/lib/tile/tileLayer/TileLayer.js +0 -215
  628. package/lib/tile/tileLayer/base.js +0 -225
  629. package/lib/tile/utils.js +0 -181
  630. package/lib/utils/blend.js +0 -65
  631. package/lib/utils/collision-index.js +0 -118
  632. package/lib/utils/dataMappingStyle.js +0 -151
  633. package/lib/utils/extrude_polyline.js +0 -656
  634. package/lib/utils/grid-index.js +0 -188
  635. package/lib/utils/layerData.js +0 -191
  636. package/lib/utils/multiPassRender.js +0 -60
  637. package/lib/utils/polylineNormal.js +0 -230
  638. package/lib/utils/simpleLine.js +0 -116
  639. package/lib/utils/symbol-layout.js +0 -308
  640. package/lib/utils/updateShape.js +0 -27
  641. package/lib/wind/index.js +0 -98
  642. package/lib/wind/models/index.js +0 -16
  643. package/lib/wind/models/utils.js +0 -253
  644. package/lib/wind/models/wind.js +0 -332
  645. package/lib/wind/models/windRender.js +0 -373
  646. package/lib/wind/models/windShader.js +0 -25
  647. package/lib/wind/shaders/wind_frag.glsl +0 -9
  648. package/lib/wind/shaders/wind_vert.glsl +0 -17
@@ -1,275 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
-
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
-
13
- import { AttributeType, gl } from '@antv/l7-core';
14
- import { generateColorRamp, getMask } from '@antv/l7-utils';
15
- import { isNumber } from 'lodash';
16
- import BaseModel from "../../core/BaseModel";
17
- import { LinearDir } from "../../core/interface";
18
- import { LineTriangulation } from "../../core/triangulation";
19
-
20
- /* babel-plugin-inline-import '../shaders/linearLine/line_linear_frag.glsl' */
21
- var linear_line_frag = "uniform float u_opacity : 1.0;\nuniform sampler2D u_texture;\nuniform float u_linearDir: 1.0;\n\n#pragma include \"picking\"\n\nvarying mat4 styleMappingMat;\n\nvoid main() {\n float opacity = styleMappingMat[0][0];\n float linearRadio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n if(u_linearDir < 1.0) {\n linearRadio = styleMappingMat[3][3];\n }\n\n gl_FragColor = texture2D(u_texture, vec2(linearRadio, 0.5));\n\n gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
22
-
23
- /* babel-plugin-inline-import '../shaders/linearLine/line_linear_vert.glsl' */
24
- var linear_line_vert = "\nattribute float a_Miter;\nattribute vec2 a_Size;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\n\n// dash line\nattribute float a_Total_Distance;\nattribute vec2 a_DistanceAndIndex;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nuniform float u_heightfixed: 0.0;\nuniform float u_vertexScale: 1.0;\nuniform float u_raisingHeight: 0.0;\n\nuniform float u_opacity: 1.0;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvarying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143\n\n#pragma include \"styleMapping\"\n#pragma include \"styleMappingCalOpacity\"\n\nvoid main() {\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n styleMappingMat = mat4(\n 0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty\n 0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA\n 0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]\n 0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV\n );\n\n float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C\n float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217\n float columnWidth = 1.0/columnCount; // \u5217\u5BBD\n float rowHeight = 1.0/rowCount; // \u884C\u9AD8\n float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets\n float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9\n float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C\n float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217\n \n // cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ... \n // \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C\n float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF\n\n vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][0] = opacityAndOffset.r;\n textureOffset = opacityAndOffset.g;\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n\n vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\n \n vec2 offset = project_pixel(size.xy);\n\n float lineDistance = a_DistanceAndIndex.x;\n float currentLinePointRatio = lineDistance / a_Total_Distance;\n \n\n float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB\uFF08\u5411\u4E24\u4FA7\u504F\u79FB\u7684\u548C\uFF09\n float linePixelSize = project_pixel(a_Size.x) * 2.0; // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB \u5355\u4FA7 * 2\n float texV = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C\n\n // \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570\n styleMappingMat[3][0] = currentLinePointRatio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n styleMappingMat[3][3] = texV; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\n\n float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 vertex height\n float lineHeight = a_Size.y; // size \u7B2C\u4E8C\u4E2A\u53C2\u6570\u4EE3\u8868\u7684\u9AD8\u5EA6 [linewidth, lineheight]\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n lineHeight *= 0.2; // \u4FDD\u6301\u548C amap/mapbox \u4E00\u81F4\u7684\u6548\u679C\n h *= 0.2;\n if(u_heightfixed < 1.0) {\n lineHeight = project_pixel(a_Size.y);\n }\n gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));\n } else {\n // mapbox - amap\n \n // \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // mapbox\n // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n h *= mapboxZoomScale;\n h += u_raisingHeight * mapboxZoomScale;\n if(u_heightfixed > 0.0) {\n lineHeight *= mapboxZoomScale;\n }\n \n } else {\n // amap\n h += u_raisingHeight;\n // lineHeight \u9876\u70B9\u504F\u79FB\u9AD8\u5EA6\n if(u_heightfixed < 1.0) {\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n";
25
-
26
- var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
27
- _inherits(LinearLineModel, _BaseModel);
28
-
29
- var _super = _createSuper(LinearLineModel);
30
-
31
- function LinearLineModel() {
32
- var _this;
33
-
34
- _classCallCheck(this, LinearLineModel);
35
-
36
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
37
- args[_key] = arguments[_key];
38
- }
39
-
40
- _this = _super.call.apply(_super, [this].concat(args));
41
-
42
- _defineProperty(_assertThisInitialized(_this), "updateTexture", function () {
43
- var createTexture2D = _this.rendererService.createTexture2D;
44
-
45
- if (_this.colorTexture) {
46
- _this.colorTexture.destroy();
47
- }
48
-
49
- var _ref = _this.layer.getLayerConfig(),
50
- rampColors = _ref.rampColors;
51
-
52
- var imageData = generateColorRamp(rampColors);
53
- _this.colorTexture = createTexture2D({
54
- data: new Uint8Array(imageData.data),
55
- width: imageData.width,
56
- height: imageData.height,
57
- wrapS: gl.CLAMP_TO_EDGE,
58
- wrapT: gl.CLAMP_TO_EDGE,
59
- min: gl.NEAREST,
60
- mag: gl.NEAREST,
61
- flipY: false
62
- });
63
- });
64
-
65
- return _this;
66
- }
67
-
68
- _createClass(LinearLineModel, [{
69
- key: "getUninforms",
70
- value: function getUninforms() {
71
- var _ref2 = this.layer.getLayerConfig(),
72
- _ref2$opacity = _ref2.opacity,
73
- opacity = _ref2$opacity === void 0 ? 1 : _ref2$opacity,
74
- _ref2$vertexHeightSca = _ref2.vertexHeightScale,
75
- vertexHeightScale = _ref2$vertexHeightSca === void 0 ? 20.0 : _ref2$vertexHeightSca,
76
- _ref2$raisingHeight = _ref2.raisingHeight,
77
- raisingHeight = _ref2$raisingHeight === void 0 ? 0 : _ref2$raisingHeight,
78
- _ref2$heightfixed = _ref2.heightfixed,
79
- heightfixed = _ref2$heightfixed === void 0 ? false : _ref2$heightfixed,
80
- _ref2$linearDir = _ref2.linearDir,
81
- linearDir = _ref2$linearDir === void 0 ? LinearDir.VERTICAL : _ref2$linearDir;
82
-
83
- if (this.rendererService.getDirty()) {
84
- this.colorTexture.bind();
85
- }
86
-
87
- if (this.dataTextureTest && this.dataTextureNeedUpdate({
88
- opacity: opacity
89
- })) {
90
- this.judgeStyleAttributes({
91
- opacity: opacity
92
- });
93
- var encodeData = this.layer.getEncodedData();
94
-
95
- var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
96
- data = _this$calDataFrame.data,
97
- width = _this$calDataFrame.width,
98
- height = _this$calDataFrame.height;
99
-
100
- this.rowCount = height; // 当前数据纹理有多少行
101
-
102
- this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
103
- flipY: true,
104
- data: data,
105
- format: gl.LUMINANCE,
106
- type: gl.FLOAT,
107
- width: width,
108
- height: height
109
- }) : this.createTexture2D({
110
- flipY: true,
111
- data: [1],
112
- format: gl.LUMINANCE,
113
- type: gl.FLOAT,
114
- width: 1,
115
- height: 1
116
- });
117
- }
118
-
119
- return {
120
- u_dataTexture: this.dataTexture,
121
- // 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
122
- u_cellTypeLayout: this.getCellTypeLayout(),
123
- u_linearDir: linearDir === LinearDir.VERTICAL ? 1.0 : 0.0,
124
- u_opacity: isNumber(opacity) ? opacity : 1.0,
125
- // 纹理支持参数
126
- u_texture: this.colorTexture,
127
- // 贴图
128
- // 是否固定高度
129
- u_heightfixed: Number(heightfixed),
130
- // 顶点高度 scale
131
- u_vertexScale: vertexHeightScale,
132
- u_raisingHeight: Number(raisingHeight)
133
- };
134
- }
135
- }, {
136
- key: "initModels",
137
- value: function initModels(callbackModel) {
138
- this.updateTexture();
139
- this.buildModels(callbackModel);
140
- }
141
- }, {
142
- key: "clearModels",
143
- value: function clearModels() {
144
- var _this$colorTexture, _this$dataTexture;
145
-
146
- (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 ? void 0 : _this$colorTexture.destroy();
147
- (_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
148
- }
149
- }, {
150
- key: "buildModels",
151
- value: function buildModels(callbackModel) {
152
- var _ref3 = this.layer.getLayerConfig(),
153
- _ref3$mask = _ref3.mask,
154
- mask = _ref3$mask === void 0 ? false : _ref3$mask,
155
- _ref3$maskInside = _ref3.maskInside,
156
- maskInside = _ref3$maskInside === void 0 ? true : _ref3$maskInside,
157
- _ref3$depth = _ref3.depth,
158
- depth = _ref3$depth === void 0 ? false : _ref3$depth;
159
-
160
- this.layer.triangulation = LineTriangulation;
161
- this.layer.buildLayerModel({
162
- moduleName: 'lineRampColors',
163
- vertexShader: linear_line_vert,
164
- fragmentShader: linear_line_frag,
165
- triangulation: LineTriangulation,
166
- depth: {
167
- enable: depth
168
- },
169
- blend: this.getBlend(),
170
- stencil: getMask(mask, maskInside)
171
- }).then(function (model) {
172
- callbackModel([model]);
173
- }).catch(function (err) {
174
- console.warn(err);
175
- callbackModel([]);
176
- });
177
- }
178
- }, {
179
- key: "registerBuiltinAttributes",
180
- value: function registerBuiltinAttributes() {
181
- this.styleAttributeService.registerStyleAttribute({
182
- name: 'distanceAndIndex',
183
- type: AttributeType.Attribute,
184
- descriptor: {
185
- name: 'a_DistanceAndIndex',
186
- buffer: {
187
- // give the WebGL driver a hint that this buffer may change
188
- usage: gl.STATIC_DRAW,
189
- data: [],
190
- type: gl.FLOAT
191
- },
192
- size: 2,
193
- update: function update(feature, featureIdx, vertex, attributeIdx, normal, vertexIndex) {
194
- return vertexIndex === undefined ? [vertex[3], 10] : [vertex[3], vertexIndex];
195
- }
196
- }
197
- });
198
- this.styleAttributeService.registerStyleAttribute({
199
- name: 'total_distance',
200
- type: AttributeType.Attribute,
201
- descriptor: {
202
- name: 'a_Total_Distance',
203
- buffer: {
204
- // give the WebGL driver a hint that this buffer may change
205
- usage: gl.STATIC_DRAW,
206
- data: [],
207
- type: gl.FLOAT
208
- },
209
- size: 1,
210
- update: function update(feature, featureIdx, vertex) {
211
- return [vertex[5]];
212
- }
213
- }
214
- });
215
- this.styleAttributeService.registerStyleAttribute({
216
- name: 'size',
217
- type: AttributeType.Attribute,
218
- descriptor: {
219
- name: 'a_Size',
220
- buffer: {
221
- // give the WebGL driver a hint that this buffer may change
222
- usage: gl.DYNAMIC_DRAW,
223
- data: [],
224
- type: gl.FLOAT
225
- },
226
- size: 2,
227
- update: function update(feature) {
228
- var _feature$size = feature.size,
229
- size = _feature$size === void 0 ? 1 : _feature$size;
230
- return Array.isArray(size) ? [size[0], size[1]] : [size, 0];
231
- }
232
- }
233
- }); // point layer size;
234
-
235
- this.styleAttributeService.registerStyleAttribute({
236
- name: 'normal',
237
- type: AttributeType.Attribute,
238
- descriptor: {
239
- name: 'a_Normal',
240
- buffer: {
241
- // give the WebGL driver a hint that this buffer may change
242
- usage: gl.STATIC_DRAW,
243
- data: [],
244
- type: gl.FLOAT
245
- },
246
- size: 3,
247
- update: function update(feature, featureIdx, vertex, attributeIdx, normal) {
248
- return normal;
249
- }
250
- }
251
- });
252
- this.styleAttributeService.registerStyleAttribute({
253
- name: 'miter',
254
- type: AttributeType.Attribute,
255
- descriptor: {
256
- name: 'a_Miter',
257
- buffer: {
258
- // give the WebGL driver a hint that this buffer may change
259
- usage: gl.STATIC_DRAW,
260
- data: [],
261
- type: gl.FLOAT
262
- },
263
- size: 1,
264
- update: function update(feature, featureIdx, vertex) {
265
- return [vertex[4]];
266
- }
267
- }
268
- });
269
- }
270
- }]);
271
-
272
- return LinearLineModel;
273
- }(BaseModel);
274
-
275
- export { LinearLineModel as default };
@@ -1,14 +0,0 @@
1
- import { IModel, IModelUniform } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class SimpleLineModel extends BaseModel {
4
- getUninforms(): IModelUniform;
5
- initModels(callbackModel: (models: IModel[]) => void): void;
6
- clearModels(): void;
7
- getShaders(): {
8
- frag: string;
9
- vert: string;
10
- type: string;
11
- };
12
- buildModels(callbackModel: (models: IModel[]) => void): void;
13
- protected registerBuiltinAttributes(): void;
14
- }
@@ -1,234 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
-
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
-
9
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
-
11
- import { AttributeType, gl } from '@antv/l7-core';
12
- import { getMask, rgb2arr } from '@antv/l7-utils';
13
- import { isNumber } from 'lodash';
14
- import BaseModel from "../../core/BaseModel";
15
- import { SimpleLineTriangulation } from "../../core/triangulation";
16
-
17
- /* babel-plugin-inline-import '../shaders/simple/simpleline_frag.glsl' */
18
- var simple_line_frag = "\nvarying vec4 v_color;\nvarying mat4 styleMappingMat;\nvoid main() {\n float opacity = styleMappingMat[0][0];\n float d_distance_ratio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n\n gl_FragColor = v_color;\n gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6\n}\n"; // linear simple line shader
19
-
20
- /* babel-plugin-inline-import '../shaders/simple/simpleline_linear_frag.glsl' */
21
- var simle_linear_frag = "uniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\nvarying mat4 styleMappingMat;\nvoid main() {\n float opacity = styleMappingMat[0][0];\n\n // styleMappingMat[3][0] \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n gl_FragColor = mix(u_sourceColor, u_targetColor, styleMappingMat[3][0]);\n gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6\n}\n";
22
-
23
- /* babel-plugin-inline-import '../shaders/simple/simpleline_vert.glsl' */
24
- var simple_line_vert = "attribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Position;\n\nattribute float a_Total_Distance;\nattribute float a_Distance;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nuniform float u_opacity: 1.0;\nuniform float u_vertexScale: 1.0;\n\n#pragma include \"projection\"\n\nvarying vec4 v_color;\n\nvarying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143\n\n#pragma include \"styleMapping\"\n#pragma include \"styleMappingCalOpacity\"\n\nvoid main() {\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n styleMappingMat = mat4(\n 0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty\n 0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA\n 0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]\n 0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV\n );\n\n float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C\n float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217\n float columnWidth = 1.0/columnCount; // \u5217\u5BBD\n float rowHeight = 1.0/rowCount; // \u884C\u9AD8\n float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets\n float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9\n float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C\n float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217\n \n // cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ... \n // \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C\n float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF\n\n vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][0] = opacityAndOffset.r;\n textureOffset = opacityAndOffset.g;\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n\n \n v_color = a_Color; \n styleMappingMat[3][0] = a_Distance / a_Total_Distance;\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_Size.y) + h * 0.2, 1.0));\n } else {\n float lineHeight = a_Size.y;\n // \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8\n h *= 2.0/pow(2.0, 20.0 - u_Zoom);\n }\n\n // #define COORDINATE_SYSTEM_P20 5.0\n // #define COORDINATE_SYSTEM_P20_OFFSET 6.0\n // amap1.x\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0));\n gl_PointSize = 10.0;\n }\n}\n";
25
-
26
- var SimpleLineModel = /*#__PURE__*/function (_BaseModel) {
27
- _inherits(SimpleLineModel, _BaseModel);
28
-
29
- var _super = _createSuper(SimpleLineModel);
30
-
31
- function SimpleLineModel() {
32
- _classCallCheck(this, SimpleLineModel);
33
-
34
- return _super.apply(this, arguments);
35
- }
36
-
37
- _createClass(SimpleLineModel, [{
38
- key: "getUninforms",
39
- value: function getUninforms() {
40
- var _ref = this.layer.getLayerConfig(),
41
- _ref$opacity = _ref.opacity,
42
- opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
43
- sourceColor = _ref.sourceColor,
44
- targetColor = _ref.targetColor,
45
- _ref$vertexHeightScal = _ref.vertexHeightScale,
46
- vertexHeightScale = _ref$vertexHeightScal === void 0 ? 20.0 : _ref$vertexHeightScal; // 转化渐变色
47
-
48
-
49
- var useLinearColor = 0; // 默认不生效
50
-
51
- var sourceColorArr = [0, 0, 0, 0];
52
- var targetColorArr = [0, 0, 0, 0];
53
-
54
- if (sourceColor && targetColor) {
55
- sourceColorArr = rgb2arr(sourceColor);
56
- targetColorArr = rgb2arr(targetColor);
57
- useLinearColor = 1;
58
- }
59
-
60
- if (this.dataTextureTest && this.dataTextureNeedUpdate({
61
- opacity: opacity
62
- })) {
63
- this.judgeStyleAttributes({
64
- opacity: opacity
65
- });
66
- var encodeData = this.layer.getEncodedData();
67
-
68
- var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
69
- data = _this$calDataFrame.data,
70
- width = _this$calDataFrame.width,
71
- height = _this$calDataFrame.height;
72
-
73
- this.rowCount = height; // 当前数据纹理有多少行
74
-
75
- this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
76
- flipY: true,
77
- data: data,
78
- format: gl.LUMINANCE,
79
- type: gl.FLOAT,
80
- width: width,
81
- height: height
82
- }) : this.createTexture2D({
83
- flipY: true,
84
- data: [1],
85
- format: gl.LUMINANCE,
86
- type: gl.FLOAT,
87
- width: 1,
88
- height: 1
89
- });
90
- }
91
-
92
- return {
93
- u_dataTexture: this.dataTexture,
94
- // 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
95
- u_cellTypeLayout: this.getCellTypeLayout(),
96
- u_opacity: isNumber(opacity) ? opacity : 1.0,
97
- // 渐变色支持参数
98
- u_linearColor: useLinearColor,
99
- u_sourceColor: sourceColorArr,
100
- u_targetColor: targetColorArr,
101
- // 顶点高度 scale
102
- u_vertexScale: vertexHeightScale
103
- };
104
- }
105
- }, {
106
- key: "initModels",
107
- value: function initModels(callbackModel) {
108
- this.buildModels(callbackModel);
109
- }
110
- }, {
111
- key: "clearModels",
112
- value: function clearModels() {
113
- var _this$dataTexture;
114
-
115
- (_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
116
- }
117
- }, {
118
- key: "getShaders",
119
- value: function getShaders() {
120
- var _ref2 = this.layer.getLayerConfig(),
121
- sourceColor = _ref2.sourceColor,
122
- targetColor = _ref2.targetColor;
123
-
124
- if (sourceColor && targetColor) {
125
- // 分离 linear 功能
126
- return {
127
- frag: simle_linear_frag,
128
- vert: simple_line_vert,
129
- type: 'lineSimpleLinear'
130
- };
131
- } else {
132
- return {
133
- frag: simple_line_frag,
134
- vert: simple_line_vert,
135
- type: 'lineSimpleNormal'
136
- };
137
- }
138
- }
139
- }, {
140
- key: "buildModels",
141
- value: function buildModels(callbackModel) {
142
- var _ref3 = this.layer.getLayerConfig(),
143
- _ref3$mask = _ref3.mask,
144
- mask = _ref3$mask === void 0 ? false : _ref3$mask,
145
- _ref3$maskInside = _ref3.maskInside,
146
- maskInside = _ref3$maskInside === void 0 ? true : _ref3$maskInside;
147
-
148
- var _this$getShaders = this.getShaders(),
149
- frag = _this$getShaders.frag,
150
- vert = _this$getShaders.vert,
151
- type = _this$getShaders.type;
152
-
153
- this.layer.buildLayerModel({
154
- moduleName: type,
155
- vertexShader: vert,
156
- fragmentShader: frag,
157
- triangulation: SimpleLineTriangulation,
158
- primitive: gl.LINES,
159
- depth: {
160
- enable: false
161
- },
162
- blend: this.getBlend(),
163
- stencil: getMask(mask, maskInside),
164
- pick: false
165
- }).then(function (model) {
166
- callbackModel([model]);
167
- }).catch(function (err) {
168
- console.warn(err);
169
- callbackModel([]);
170
- });
171
- }
172
- }, {
173
- key: "registerBuiltinAttributes",
174
- value: function registerBuiltinAttributes() {
175
- this.styleAttributeService.registerStyleAttribute({
176
- name: 'distance',
177
- type: AttributeType.Attribute,
178
- descriptor: {
179
- name: 'a_Distance',
180
- buffer: {
181
- // give the WebGL driver a hint that this buffer may change
182
- usage: gl.STATIC_DRAW,
183
- data: [],
184
- type: gl.FLOAT
185
- },
186
- size: 1,
187
- update: function update(feature, featureIdx, vertex) {
188
- return [vertex[3]];
189
- }
190
- }
191
- });
192
- this.styleAttributeService.registerStyleAttribute({
193
- name: 'total_distance',
194
- type: AttributeType.Attribute,
195
- descriptor: {
196
- name: 'a_Total_Distance',
197
- buffer: {
198
- // give the WebGL driver a hint that this buffer may change
199
- usage: gl.STATIC_DRAW,
200
- data: [],
201
- type: gl.FLOAT
202
- },
203
- size: 1,
204
- update: function update(feature, featureIdx, vertex) {
205
- return [vertex[5]];
206
- }
207
- }
208
- });
209
- this.styleAttributeService.registerStyleAttribute({
210
- name: 'size',
211
- type: AttributeType.Attribute,
212
- descriptor: {
213
- name: 'a_Size',
214
- buffer: {
215
- // give the WebGL driver a hint that this buffer may change
216
- usage: gl.DYNAMIC_DRAW,
217
- data: [],
218
- type: gl.FLOAT
219
- },
220
- size: 2,
221
- update: function update(feature) {
222
- var _feature$size = feature.size,
223
- size = _feature$size === void 0 ? 1 : _feature$size;
224
- return Array.isArray(size) ? [size[0], size[1]] : [size, 0];
225
- }
226
- }
227
- });
228
- }
229
- }]);
230
-
231
- return SimpleLineModel;
232
- }(BaseModel);
233
-
234
- export { SimpleLineModel as default };
@@ -1,9 +0,0 @@
1
- import { IModel, IModelUniform } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class SimpleTileLineModel extends BaseModel {
4
- getUninforms(): IModelUniform;
5
- initModels(callbackModel: (models: IModel[]) => void): void;
6
- clearModels(): void;
7
- buildModels(callbackModel: (models: IModel[]) => void): void;
8
- protected registerBuiltinAttributes(): void;
9
- }
@@ -1,100 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
-
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
-
9
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
-
11
- import { gl } from '@antv/l7-core';
12
- import { getMask, rgb2arr } from '@antv/l7-utils';
13
- import { isNumber } from 'lodash';
14
- import BaseModel from "../../core/BaseModel";
15
- import { TileSimpleLineTriangulation } from "../../core/triangulation";
16
-
17
- /* babel-plugin-inline-import '../../shader/minify_frag.glsl' */
18
- var simple_line_frag = "uniform float u_opacity : 1.0;\nuniform vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n gl_FragColor.a *= u_opacity;\n}\n";
19
-
20
- /* babel-plugin-inline-import '../shaders/tile/simpleline_vert.glsl' */
21
- var simple_line_vert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\n#pragma include \"projection\"\n\nvarying vec4 v_color;\n\nvoid main() {\n v_color = a_Color; \n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, 0.0, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));\n }\n}\n";
22
-
23
- /* babel-plugin-inline-import '../../shader/minify_frag.glsl' */
24
- var simple_line_map_frag = "uniform float u_opacity : 1.0;\nuniform vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n gl_FragColor.a *= u_opacity;\n}\n";
25
-
26
- /* babel-plugin-inline-import '../shaders/tile/simpleline_map_vert.glsl' */
27
- var simple_line_map_vert = "attribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\n#pragma include \"projection\"\n\nvoid main() {\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, 0.0, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));\n }\n}";
28
-
29
- var SimpleTileLineModel = /*#__PURE__*/function (_BaseModel) {
30
- _inherits(SimpleTileLineModel, _BaseModel);
31
-
32
- var _super = _createSuper(SimpleTileLineModel);
33
-
34
- function SimpleTileLineModel() {
35
- _classCallCheck(this, SimpleTileLineModel);
36
-
37
- return _super.apply(this, arguments);
38
- }
39
-
40
- _createClass(SimpleTileLineModel, [{
41
- key: "getUninforms",
42
- value: function getUninforms() {
43
- var _ref = this.layer.getLayerConfig(),
44
- _ref$opacity = _ref.opacity,
45
- opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
46
- usage = _ref.usage,
47
- _ref$color = _ref.color,
48
- color = _ref$color === void 0 ? '#fff' : _ref$color;
49
-
50
- return {
51
- u_opacity: isNumber(opacity) ? opacity : 1.0,
52
- u_color: usage === 'basemap' ? rgb2arr(color) : [0, 0, 0, 0]
53
- };
54
- }
55
- }, {
56
- key: "initModels",
57
- value: function initModels(callbackModel) {
58
- this.buildModels(callbackModel);
59
- }
60
- }, {
61
- key: "clearModels",
62
- value: function clearModels() {}
63
- }, {
64
- key: "buildModels",
65
- value: function buildModels(callbackModel) {
66
- var _ref2 = this.layer.getLayerConfig(),
67
- _ref2$mask = _ref2.mask,
68
- mask = _ref2$mask === void 0 ? false : _ref2$mask,
69
- _ref2$maskInside = _ref2.maskInside,
70
- maskInside = _ref2$maskInside === void 0 ? true : _ref2$maskInside,
71
- usage = _ref2.usage;
72
-
73
- this.layer.buildLayerModel({
74
- moduleName: 'lineTileSimpleNormal_' + usage,
75
- vertexShader: usage === 'basemap' ? simple_line_map_vert : simple_line_vert,
76
- fragmentShader: usage === 'basemap' ? simple_line_map_frag : simple_line_frag,
77
- triangulation: TileSimpleLineTriangulation,
78
- primitive: gl.LINES,
79
- depth: {
80
- enable: false
81
- },
82
- blend: this.getBlend(),
83
- stencil: getMask(mask, maskInside),
84
- pick: false
85
- }).then(function (model) {
86
- callbackModel([model]);
87
- }).catch(function (err) {
88
- console.warn(err);
89
- callbackModel([]);
90
- });
91
- }
92
- }, {
93
- key: "registerBuiltinAttributes",
94
- value: function registerBuiltinAttributes() {}
95
- }]);
96
-
97
- return SimpleTileLineModel;
98
- }(BaseModel);
99
-
100
- export { SimpleTileLineModel as default };
@@ -1,8 +0,0 @@
1
- import { IModel, IModelUniform } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class LineModel extends BaseModel {
4
- getUninforms(): IModelUniform;
5
- initModels(callbackModel: (models: IModel[]) => void): void;
6
- buildModels(callbackModel: (models: IModel[]) => void): Promise<void>;
7
- protected registerBuiltinAttributes(): void;
8
- }