@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,367 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
-
10
- 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); }; }
11
-
12
- 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; } }
13
-
14
- import { AttributeType, gl } from '@antv/l7-core';
15
- import { Version } from '@antv/l7-maps';
16
- import { getCullFace, getMask } from '@antv/l7-utils';
17
- import { isNumber } from 'lodash';
18
- import BaseModel from "../../core/BaseModel";
19
- import { PointFillTriangulation } from "../../core/triangulation"; // static pointLayer shader - not support animate
20
-
21
- /* babel-plugin-inline-import '../shaders/image/fillImage_frag.glsl' */
22
- var pointFillFrag = "uniform sampler2D u_texture;\nuniform vec2 u_textSize;\n\nvarying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E\n\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\nvarying vec2 v_uv; // \u672C\u8EAB\u7684 uv \u5750\u6807\nvarying vec2 v_Iconuv;\n\nvoid main() {\n\n float opacity = styleMappingMat[0][0];\n\n vec2 pos = v_Iconuv / u_textSize + v_uv / u_textSize * 64.;\n gl_FragColor = texture2D(u_texture, pos);\n gl_FragColor.a *= opacity;\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
23
-
24
- /* babel-plugin-inline-import '../shaders/image/fillImage_vert.glsl' */
25
- var pointFillVert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nattribute vec2 a_Uv;\nattribute float a_Rotate;\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\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform mat2 u_RotateMatrix;\nuniform float u_isMeter;\n\nvarying vec2 v_uv; // \u672C\u8EAB\u7684 uv \u5750\u6807\nvarying vec2 v_Iconuv; // icon \u8D34\u56FE\u7684 uv \u5750\u6807\n\nuniform float u_raisingHeight: 0.0;\nuniform float u_heightfixed: 0.0;\nuniform float u_opacity : 1;\nuniform vec2 u_offsets;\n\n#pragma include \"styleMapping\"\n#pragma include \"styleMappingCalOpacity\"\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvoid main() {\n vec3 extrude = a_Extrude;\n\n v_uv = (a_Extrude.xy + 1.0)/2.0;\n v_uv.y = 1.0 - v_uv.y;\n v_Iconuv = a_Uv;\n\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 - empty - empty - empty\n 0.0, 0.0, 0.0, 0.0, // empty - empty - empty - empty\n 0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]\n 0.0, 0.0, 0.0, 0.0\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\n vec2 textrueOffsets = vec2(0.0, 0.0);\n if(hasOffsets()) {\n vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x\n textureOffset += 1.0;\n\n vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x\n textureOffset += 1.0;\n } else {\n textrueOffsets = u_offsets;\n }\n\n // cal style mapping\n\n highp float angle_sin = sin(a_Rotate);\n highp float angle_cos = cos(a_Rotate);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n // vec2 offset = (u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets);\n vec2 offset = (rotation_matrix * u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets);\n vec3 aPosition = a_Position;\n if(u_isMeter < 1.0) {\n // \u4E0D\u4EE5\u7C73\u4E3A\u5B9E\u9645\u5355\u4F4D\n offset = project_pixel(offset);\n } else {\n // \u4EE5\u7C73\u4E3A\u5B9E\u9645\u5355\u4F4D\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n aPosition.xy += offset;\n offset.x = 0.0;\n offset.y = 0.0;\n }\n }\n\n vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\n float raisingHeight = u_raisingHeight;\n if(u_heightfixed < 1.0) { // height fixed\n raisingHeight = project_pixel(u_raisingHeight);\n } else {\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n raisingHeight = u_raisingHeight * mapboxZoomScale;\n }\n }\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\n }\n \n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\n\n setPickingColor(a_PickingColor);\n}\n";
26
-
27
- var FillImageModel = /*#__PURE__*/function (_BaseModel) {
28
- _inherits(FillImageModel, _BaseModel);
29
-
30
- var _super = _createSuper(FillImageModel);
31
-
32
- function FillImageModel() {
33
- var _this;
34
-
35
- _classCallCheck(this, FillImageModel);
36
-
37
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
38
- args[_key] = arguments[_key];
39
- }
40
-
41
- _this = _super.call.apply(_super, [this].concat(args));
42
-
43
- _defineProperty(_assertThisInitialized(_this), "meter2coord", 1);
44
-
45
- _defineProperty(_assertThisInitialized(_this), "isMeter", false);
46
-
47
- _defineProperty(_assertThisInitialized(_this), "radian", 0);
48
-
49
- _defineProperty(_assertThisInitialized(_this), "updateTexture", function () {
50
- var createTexture2D = _this.rendererService.createTexture2D;
51
-
52
- if (_this.texture) {
53
- _this.texture.update({
54
- data: _this.iconService.getCanvas(),
55
- mag: 'linear',
56
- min: 'linear mipmap nearest',
57
- mipmap: true
58
- }); // this.layer.render();
59
- // TODO: 更新完纹理后在更新的图层的时候需要更新所有的图层
60
-
61
-
62
- _this.layer.renderLayers();
63
-
64
- return;
65
- }
66
-
67
- _this.texture = createTexture2D({
68
- data: _this.iconService.getCanvas(),
69
- mag: gl.LINEAR,
70
- min: gl.LINEAR_MIPMAP_LINEAR,
71
- premultiplyAlpha: false,
72
- width: 1024,
73
- height: _this.iconService.canvasHeight || 128,
74
- mipmap: true
75
- });
76
- });
77
-
78
- return _this;
79
- }
80
-
81
- _createClass(FillImageModel, [{
82
- key: "getUninforms",
83
- value: // 旋转的弧度
84
- function getUninforms() {
85
- var _ref = this.layer.getLayerConfig(),
86
- _ref$opacity = _ref.opacity,
87
- opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
88
- _ref$offsets = _ref.offsets,
89
- offsets = _ref$offsets === void 0 ? [0, 0] : _ref$offsets,
90
- rotation = _ref.rotation,
91
- _ref$raisingHeight = _ref.raisingHeight,
92
- raisingHeight = _ref$raisingHeight === void 0 ? 0.0 : _ref$raisingHeight,
93
- _ref$heightfixed = _ref.heightfixed,
94
- heightfixed = _ref$heightfixed === void 0 ? false : _ref$heightfixed;
95
-
96
- if (this.rendererService.getDirty()) {
97
- this.texture.bind();
98
- }
99
- /**
100
- * rotateFlag
101
- * L7MAP 1
102
- * MAPBOX 1
103
- * GAODE2.x -1
104
- * GAODE1.x -1
105
- */
106
-
107
-
108
- var rotateFlag = 1;
109
-
110
- if (this.mapService.version === 'GAODE2.x' || this.mapService.version === 'GAODE1.x') {
111
- rotateFlag = -1;
112
- } // 控制图标的旋转角度(绕 Z 轴旋转)
113
-
114
-
115
- this.radian = rotation !== undefined ? rotateFlag * Math.PI * rotation / 180 : rotateFlag * Math.PI * (this.mapService.getRotation() % 360) / 180;
116
-
117
- if (this.dataTextureTest && this.dataTextureNeedUpdate({
118
- opacity: opacity,
119
- offsets: offsets
120
- })) {
121
- // 判断当前的样式中哪些是需要进行数据映射的,哪些是常量,同时计算用于构建数据纹理的一些中间变量
122
- this.judgeStyleAttributes({
123
- opacity: opacity,
124
- offsets: offsets
125
- });
126
- var encodeData = this.layer.getEncodedData();
127
-
128
- var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
129
- data = _this$calDataFrame.data,
130
- width = _this$calDataFrame.width,
131
- height = _this$calDataFrame.height;
132
-
133
- this.rowCount = height; // 当前数据纹理有多少行
134
-
135
- this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
136
- flipY: true,
137
- data: data,
138
- format: gl.LUMINANCE,
139
- type: gl.FLOAT,
140
- width: width,
141
- height: height
142
- }) : this.createTexture2D({
143
- flipY: true,
144
- data: [1],
145
- format: gl.LUMINANCE,
146
- type: gl.FLOAT,
147
- width: 1,
148
- height: 1
149
- });
150
- }
151
-
152
- return {
153
- u_raisingHeight: Number(raisingHeight),
154
- u_heightfixed: Number(heightfixed),
155
- u_isMeter: Number(this.isMeter),
156
- u_RotateMatrix: new Float32Array([Math.cos(this.radian), Math.sin(this.radian), -Math.sin(this.radian), Math.cos(this.radian)]),
157
- u_dataTexture: this.dataTexture,
158
- // 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
159
- u_cellTypeLayout: this.getCellTypeLayout(),
160
- u_texture: this.texture,
161
- u_textSize: [1024, this.iconService.canvasHeight || 128],
162
- u_opacity: isNumber(opacity) ? opacity : 1.0,
163
- u_offsets: this.isOffsetStatic(offsets) ? offsets : [0, 0]
164
- };
165
- }
166
- }, {
167
- key: "getAttribute",
168
- value: function getAttribute() {
169
- return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(), PointFillTriangulation);
170
- }
171
- }, {
172
- key: "initModels",
173
- value: function initModels(callbackModel) {
174
- this.updateTexture();
175
- this.iconService.on('imageUpdate', this.updateTexture);
176
-
177
- var _ref2 = this.layer.getLayerConfig(),
178
- _ref2$unit = _ref2.unit,
179
- unit = _ref2$unit === void 0 ? 'l7size' : _ref2$unit;
180
-
181
- var version = this.mapService.version;
182
-
183
- if (unit === 'meter' && version !== Version.L7MAP && version !== Version.GLOBEL) {
184
- this.isMeter = true;
185
- this.calMeter2Coord();
186
- }
187
-
188
- this.buildModels(callbackModel);
189
- }
190
- /**
191
- * 计算等面积点图层(unit meter)笛卡尔坐标标度与世界坐标标度的比例
192
- * @returns
193
- */
194
-
195
- }, {
196
- key: "calMeter2Coord",
197
- value: function calMeter2Coord() {
198
- var _this$layer$getSource = _slicedToArray(this.layer.getSource().extent, 4),
199
- minLng = _this$layer$getSource[0],
200
- minLat = _this$layer$getSource[1],
201
- maxLng = _this$layer$getSource[2],
202
- maxLat = _this$layer$getSource[3];
203
-
204
- var center = [(minLng + maxLng) / 2, (minLat + maxLat) / 2];
205
- var version = this.mapService.version;
206
-
207
- if (version === Version.MAPBOX && window.mapboxgl.MercatorCoordinate) {
208
- var coord = window.mapboxgl.MercatorCoordinate.fromLngLat({
209
- lng: center[0],
210
- lat: center[1]
211
- }, 0);
212
- var offsetInMeters = 1;
213
- var offsetInMercatorCoordinateUnits = offsetInMeters * coord.meterInMercatorCoordinateUnits();
214
- var westCoord = new window.mapboxgl.MercatorCoordinate(coord.x - offsetInMercatorCoordinateUnits, coord.y, coord.z);
215
- var westLnglat = westCoord.toLngLat();
216
- this.meter2coord = center[0] - westLnglat.lng;
217
- return;
218
- } // @ts-ignore
219
-
220
-
221
- var m1 = this.mapService.meterToCoord(center, [minLng, minLat]); // @ts-ignore
222
-
223
- var m2 = this.mapService.meterToCoord(center, [maxLng === minLng ? maxLng + 0.1 : maxLng, maxLat === minLat ? minLat + 0.1 : maxLat]);
224
- this.meter2coord = (m1 + m2) / 2;
225
-
226
- if (!this.meter2coord) {
227
- // Tip: 兼容单个数据导致的 m1、m2 为 NaN
228
- this.meter2coord = 7.70681090738883;
229
- }
230
- }
231
- }, {
232
- key: "buildModels",
233
- value: function buildModels(callbackModel) {
234
- var _ref3 = this.layer.getLayerConfig(),
235
- _ref3$mask = _ref3.mask,
236
- mask = _ref3$mask === void 0 ? false : _ref3$mask,
237
- _ref3$maskInside = _ref3.maskInside,
238
- maskInside = _ref3$maskInside === void 0 ? true : _ref3$maskInside;
239
-
240
- this.layer.buildLayerModel({
241
- moduleName: 'pointFillImage',
242
- vertexShader: pointFillVert,
243
- fragmentShader: pointFillFrag,
244
- triangulation: PointFillTriangulation,
245
- depth: {
246
- enable: false
247
- },
248
- blend: this.getBlend(),
249
- stencil: getMask(mask, maskInside),
250
- cull: {
251
- enable: true,
252
- face: getCullFace(this.mapService.version)
253
- }
254
- }).then(function (model) {
255
- callbackModel([model]);
256
- }).catch(function (err) {
257
- console.warn(err);
258
- callbackModel([]);
259
- });
260
- }
261
- }, {
262
- key: "clearModels",
263
- value: function clearModels() {
264
- var _this$texture, _this$dataTexture;
265
-
266
- this.iconService.off('imageUpdate', this.updateTexture);
267
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
268
- (_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
269
- } // overwrite baseModel func
270
-
271
- }, {
272
- key: "registerBuiltinAttributes",
273
- value: function registerBuiltinAttributes() {
274
- var _this2 = this;
275
-
276
- this.styleAttributeService.registerStyleAttribute({
277
- name: 'rotate',
278
- type: AttributeType.Attribute,
279
- descriptor: {
280
- name: 'a_Rotate',
281
- buffer: {
282
- usage: gl.DYNAMIC_DRAW,
283
- data: [],
284
- type: gl.FLOAT
285
- },
286
- size: 1,
287
- update: function update(feature, featureIdx, vertex, attributeIdx) {
288
- var _feature$rotate = feature.rotate,
289
- rotate = _feature$rotate === void 0 ? 0 : _feature$rotate;
290
- return Array.isArray(rotate) ? [rotate[0]] : [rotate];
291
- }
292
- }
293
- });
294
- this.styleAttributeService.registerStyleAttribute({
295
- name: 'uv',
296
- type: AttributeType.Attribute,
297
- descriptor: {
298
- name: 'a_Uv',
299
- buffer: {
300
- // give the WebGL driver a hint that this buffer may change
301
- usage: gl.DYNAMIC_DRAW,
302
- data: [],
303
- type: gl.FLOAT
304
- },
305
- size: 2,
306
- update: function update(feature, featureIdx, vertex, attributeIdx) {
307
- var iconMap = _this2.iconService.getIconMap();
308
-
309
- var shape = feature.shape;
310
-
311
- var _ref4 = iconMap[shape] || {
312
- x: 0,
313
- y: 0
314
- },
315
- x = _ref4.x,
316
- y = _ref4.y;
317
-
318
- return [x, y];
319
- }
320
- }
321
- });
322
- this.styleAttributeService.registerStyleAttribute({
323
- name: 'extrude',
324
- type: AttributeType.Attribute,
325
- descriptor: {
326
- name: 'a_Extrude',
327
- buffer: {
328
- // give the WebGL driver a hint that this buffer may change
329
- usage: gl.DYNAMIC_DRAW,
330
- data: [],
331
- type: gl.FLOAT
332
- },
333
- size: 3,
334
- update: function update(feature, featureIdx, vertex, attributeIdx) {
335
- var extrude = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0];
336
- var extrudeIndex = attributeIdx % 4 * 3;
337
- return [extrude[extrudeIndex], extrude[extrudeIndex + 1], extrude[extrudeIndex + 2]];
338
- }
339
- }
340
- }); // point layer size;
341
-
342
- this.styleAttributeService.registerStyleAttribute({
343
- name: 'size',
344
- type: AttributeType.Attribute,
345
- descriptor: {
346
- name: 'a_Size',
347
- buffer: {
348
- // give the WebGL driver a hint that this buffer may change
349
- usage: gl.DYNAMIC_DRAW,
350
- data: [],
351
- type: gl.FLOAT
352
- },
353
- size: 1,
354
- update: function update(feature, featureIdx, vertex, attributeIdx) {
355
- var _feature$size = feature.size,
356
- size = _feature$size === void 0 ? 5 : _feature$size;
357
- return Array.isArray(size) ? [size[0] * _this2.meter2coord] : [size * _this2.meter2coord];
358
- }
359
- }
360
- });
361
- }
362
- }]);
363
-
364
- return FillImageModel;
365
- }(BaseModel);
366
-
367
- export { FillImageModel as default };
@@ -1,11 +0,0 @@
1
- import { IModel, IModelUniform } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class ImageModel extends BaseModel {
4
- private texture;
5
- getUninforms(): IModelUniform;
6
- initModels(callbackModel: (models: IModel[]) => void): void;
7
- clearModels(): void;
8
- buildModels(callbackModel: (models: IModel[]) => void): void;
9
- protected registerBuiltinAttributes(): void;
10
- private updateTexture;
11
- }
@@ -1,239 +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 { getMask } from '@antv/l7-utils';
15
- import { isNumber } from 'lodash';
16
- import BaseModel from "../../core/BaseModel";
17
- import { PointImageTriangulation } from "../../core/triangulation";
18
-
19
- /* babel-plugin-inline-import '../shaders/image_frag.glsl' */
20
- var pointImageFrag = "\nuniform sampler2D u_texture;\nvarying vec4 v_color;\nvarying vec2 v_uv;\nuniform vec2 u_textSize;\nuniform float u_opacity : 1;\n\nvarying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E\n\n#pragma include \"picking\"\n\nvoid main(){\n float opacity = styleMappingMat[0][0];\n float size = styleMappingMat[1][0];\n vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.;\n vec4 textureColor;\n\n // Y = 0.299R + 0.587G + 0.114B // \u4EAE\u5EA6\u63D0\u53D6\n \n textureColor = texture2D(u_texture, pos);\n\n // Tip: \u53BB\u9664\u8FB9\u7F18\u90E8\u5206 mipmap \u5BFC\u81F4\u7684\u6DF7\u5408\u53D8\u6697\n float fragmengTocenter = distance(vec2(0.5), gl_PointCoord);\n if(fragmengTocenter >= 0.5) {\n float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;\n textureColor.a *= luma;\n }\n \n \n\n if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){\n gl_FragColor= textureColor;\n }else {\n gl_FragColor= step(0.01, textureColor.z) * v_color;\n }\n\n gl_FragColor.a = gl_FragColor.a * opacity;\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
21
-
22
- /* babel-plugin-inline-import '../shaders/image_vert.glsl' */
23
- var pointImageVert = "precision highp float;\nattribute vec3 a_Position;\nattribute vec4 a_Color;\nattribute vec2 a_Uv;\nattribute float a_Size;\nvarying vec4 v_color;\nvarying vec2 v_uv;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform vec2 u_offsets;\n\nuniform float u_opacity : 1;\nuniform float u_raisingHeight: 0.0;\nuniform float u_heightfixed: 0.0;\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\n#pragma include \"projection\"\n#pragma include \"picking\"\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\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\n styleMappingMat[1][0] = a_Size;\n\n vec2 textrueOffsets = vec2(0.0, 0.0);\n if(hasOffsets()) {\n vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x\n textureOffset += 1.0;\n\n vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x\n textureOffset += 1.0;\n } else {\n textrueOffsets = u_offsets;\n }\n\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n v_color = a_Color;\n v_uv = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n \n vec2 offset = project_pixel(textrueOffsets);\n\n float raisingHeight = u_raisingHeight;\n if(u_heightfixed < 1.0) { // false\n raisingHeight = project_pixel(u_raisingHeight);\n } else {\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n raisingHeight = u_raisingHeight * mapboxZoomScale;\n }\n }\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\n }\n\n gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\n setPickingColor(a_PickingColor);\n}\n";
24
-
25
- var ImageModel = /*#__PURE__*/function (_BaseModel) {
26
- _inherits(ImageModel, _BaseModel);
27
-
28
- var _super = _createSuper(ImageModel);
29
-
30
- function ImageModel() {
31
- var _this;
32
-
33
- _classCallCheck(this, ImageModel);
34
-
35
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
36
- args[_key] = arguments[_key];
37
- }
38
-
39
- _this = _super.call.apply(_super, [this].concat(args));
40
-
41
- _defineProperty(_assertThisInitialized(_this), "updateTexture", function () {
42
- var createTexture2D = _this.rendererService.createTexture2D;
43
-
44
- if (_this.texture) {
45
- _this.texture.update({
46
- data: _this.iconService.getCanvas(),
47
- mag: 'linear',
48
- min: 'linear mipmap nearest',
49
- mipmap: true
50
- }); // TODO: 更新完纹理后在更新的图层的时候需要更新所有的图层
51
-
52
-
53
- _this.layer.renderLayers();
54
-
55
- return;
56
- }
57
-
58
- _this.texture = createTexture2D({
59
- data: _this.iconService.getCanvas(),
60
- mag: gl.LINEAR,
61
- min: gl.LINEAR_MIPMAP_LINEAR,
62
- premultiplyAlpha: false,
63
- width: 1024,
64
- height: _this.iconService.canvasHeight || 128,
65
- mipmap: true
66
- });
67
- });
68
-
69
- return _this;
70
- }
71
-
72
- _createClass(ImageModel, [{
73
- key: "getUninforms",
74
- value: function getUninforms() {
75
- var _ref = this.layer.getLayerConfig(),
76
- _ref$opacity = _ref.opacity,
77
- opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
78
- _ref$offsets = _ref.offsets,
79
- offsets = _ref$offsets === void 0 ? [0, 0] : _ref$offsets,
80
- _ref$raisingHeight = _ref.raisingHeight,
81
- raisingHeight = _ref$raisingHeight === void 0 ? 0 : _ref$raisingHeight,
82
- _ref$heightfixed = _ref.heightfixed,
83
- heightfixed = _ref$heightfixed === void 0 ? false : _ref$heightfixed;
84
-
85
- if (this.rendererService.getDirty()) {
86
- this.texture.bind();
87
- }
88
-
89
- if (this.dataTextureTest && this.dataTextureNeedUpdate({
90
- opacity: opacity,
91
- offsets: offsets
92
- })) {
93
- this.judgeStyleAttributes({
94
- opacity: opacity,
95
- offsets: offsets
96
- });
97
- var encodeData = this.layer.getEncodedData();
98
-
99
- var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
100
- data = _this$calDataFrame.data,
101
- width = _this$calDataFrame.width,
102
- height = _this$calDataFrame.height;
103
-
104
- this.rowCount = height; // 当前数据纹理有多少行
105
-
106
- this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
107
- flipY: true,
108
- data: data,
109
- format: gl.LUMINANCE,
110
- type: gl.FLOAT,
111
- width: width,
112
- height: height
113
- }) : this.createTexture2D({
114
- flipY: true,
115
- data: [1],
116
- format: gl.LUMINANCE,
117
- type: gl.FLOAT,
118
- width: 1,
119
- height: 1
120
- });
121
- }
122
-
123
- return {
124
- u_raisingHeight: Number(raisingHeight),
125
- u_heightfixed: Number(heightfixed),
126
- u_dataTexture: this.dataTexture,
127
- // 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
128
- u_cellTypeLayout: this.getCellTypeLayout(),
129
- u_texture: this.texture,
130
- u_textSize: [1024, this.iconService.canvasHeight || 128],
131
- u_opacity: isNumber(opacity) ? opacity : 1.0,
132
- u_offsets: this.isOffsetStatic(offsets) ? offsets : [0, 0]
133
- };
134
- }
135
- }, {
136
- key: "initModels",
137
- value: function initModels(callbackModel) {
138
- this.registerBuiltinAttributes();
139
- this.updateTexture();
140
- this.iconService.on('imageUpdate', this.updateTexture);
141
- this.buildModels(callbackModel);
142
- }
143
- }, {
144
- key: "clearModels",
145
- value: function clearModels() {
146
- var _this$texture, _this$dataTexture;
147
-
148
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
149
- (_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
150
- this.iconService.off('imageUpdate', this.updateTexture);
151
- }
152
- }, {
153
- key: "buildModels",
154
- value: function buildModels(callbackModel) {
155
- var _ref2 = this.layer.getLayerConfig(),
156
- _ref2$mask = _ref2.mask,
157
- mask = _ref2$mask === void 0 ? false : _ref2$mask,
158
- _ref2$maskInside = _ref2.maskInside,
159
- maskInside = _ref2$maskInside === void 0 ? true : _ref2$maskInside;
160
-
161
- this.layer.buildLayerModel({
162
- moduleName: 'pointImage',
163
- vertexShader: pointImageVert,
164
- fragmentShader: pointImageFrag,
165
- triangulation: PointImageTriangulation,
166
- depth: {
167
- enable: false
168
- },
169
- primitive: gl.POINTS,
170
- blend: this.getBlend(),
171
- stencil: getMask(mask, maskInside)
172
- }).then(function (model) {
173
- callbackModel([model]);
174
- }).catch(function (err) {
175
- console.warn(err);
176
- callbackModel([]);
177
- });
178
- }
179
- }, {
180
- key: "registerBuiltinAttributes",
181
- value: function registerBuiltinAttributes() {
182
- var _this2 = this;
183
-
184
- // point layer size;
185
- this.styleAttributeService.registerStyleAttribute({
186
- name: 'size',
187
- type: AttributeType.Attribute,
188
- descriptor: {
189
- name: 'a_Size',
190
- buffer: {
191
- // give the WebGL driver a hint that this buffer may change
192
- usage: gl.DYNAMIC_DRAW,
193
- data: [],
194
- type: gl.FLOAT
195
- },
196
- size: 1,
197
- update: function update(feature, featureIdx, vertex, attributeIdx) {
198
- var _feature$size = feature.size,
199
- size = _feature$size === void 0 ? 5 : _feature$size;
200
- return Array.isArray(size) ? [size[0]] : [size];
201
- }
202
- }
203
- }); // point layer size;
204
-
205
- this.styleAttributeService.registerStyleAttribute({
206
- name: 'uv',
207
- type: AttributeType.Attribute,
208
- descriptor: {
209
- name: 'a_Uv',
210
- buffer: {
211
- // give the WebGL driver a hint that this buffer may change
212
- usage: gl.DYNAMIC_DRAW,
213
- data: [],
214
- type: gl.FLOAT
215
- },
216
- size: 2,
217
- update: function update(feature, featureIdx, vertex, attributeIdx) {
218
- var iconMap = _this2.iconService.getIconMap();
219
-
220
- var shape = feature.shape;
221
-
222
- var _ref3 = iconMap[shape] || {
223
- x: 0,
224
- y: 0
225
- },
226
- x = _ref3.x,
227
- y = _ref3.y;
228
-
229
- return [x, y];
230
- }
231
- }
232
- });
233
- }
234
- }]);
235
-
236
- return ImageModel;
237
- }(BaseModel);
238
-
239
- export { ImageModel as default };
@@ -1,5 +0,0 @@
1
- export declare type PointType = 'fillImage' | 'fill' | 'radar' | 'image' | 'normal' | 'simplePoint' | 'extrude' | 'text' | 'vectorpoint' | 'tile' | 'earthFill' | 'earthExtrude';
2
- declare const PointModels: {
3
- [key in PointType]: any;
4
- };
5
- export default PointModels;
@@ -1,28 +0,0 @@
1
- import PointTileModel from "../../tile/models/tileModel";
2
- import EarthExtrudeModel from "./earthExtrude"; // earth
3
-
4
- import EarthFillModel from "./earthFill";
5
- import ExtrudeModel from "./extrude";
6
- import FillModel from "./fill";
7
- import FillImageModel from "./fillmage";
8
- import IMageModel from "./image";
9
- import NormalModel from "./normal";
10
- import Radar from "./radar";
11
- import SimplePopint from "./simplePoint";
12
- import TextModel from "./text";
13
- import TileFillModel from "./tile";
14
- var PointModels = {
15
- fillImage: FillImageModel,
16
- fill: FillModel,
17
- radar: Radar,
18
- image: IMageModel,
19
- normal: NormalModel,
20
- simplePoint: SimplePopint,
21
- extrude: ExtrudeModel,
22
- text: TextModel,
23
- vectorpoint: PointTileModel,
24
- tile: TileFillModel,
25
- earthFill: EarthFillModel,
26
- earthExtrude: EarthExtrudeModel
27
- };
28
- export default PointModels;