@antv/l7-layers 2.25.5 → 2.25.7

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 (717) hide show
  1. package/package.json +6 -6
  2. package/es/canvas/index.d.ts +0 -18
  3. package/es/canvas/index.js +0 -70
  4. package/es/canvas/models/canvas.d.ts +0 -23
  5. package/es/canvas/models/canvas.js +0 -141
  6. package/es/canvas/models/constants.d.ts +0 -2
  7. package/es/canvas/models/constants.js +0 -6
  8. package/es/canvas/models/index.d.ts +0 -2
  9. package/es/canvas/models/index.js +0 -2
  10. package/es/citybuilding/building.d.ts +0 -7
  11. package/es/citybuilding/building.js +0 -25
  12. package/es/citybuilding/models/build.d.ts +0 -33
  13. package/es/citybuilding/models/build.js +0 -160
  14. package/es/citybuilding/shaders/build_frag.glsl +0 -123
  15. package/es/citybuilding/shaders/build_vert.glsl +0 -58
  16. package/es/core/BaseLayer.d.ts +0 -265
  17. package/es/core/BaseLayer.js +0 -1310
  18. package/es/core/BaseModel.d.ts +0 -95
  19. package/es/core/BaseModel.js +0 -367
  20. package/es/core/CommonStyleAttribute.d.ts +0 -16
  21. package/es/core/CommonStyleAttribute.js +0 -114
  22. package/es/core/LayerPickService.d.ts +0 -12
  23. package/es/core/LayerPickService.js +0 -102
  24. package/es/core/TextureService.d.ts +0 -15
  25. package/es/core/TextureService.js +0 -65
  26. package/es/core/constant.d.ts +0 -6
  27. package/es/core/constant.js +0 -19
  28. package/es/core/interface.d.ts +0 -284
  29. package/es/core/interface.js +0 -32
  30. package/es/core/line_trangluation.d.ts +0 -19
  31. package/es/core/line_trangluation.js +0 -86
  32. package/es/core/schema.d.ts +0 -27
  33. package/es/core/schema.js +0 -25
  34. package/es/core/shape/Path.d.ts +0 -40
  35. package/es/core/shape/Path.js +0 -69
  36. package/es/core/shape/arrow.d.ts +0 -25
  37. package/es/core/shape/arrow.js +0 -144
  38. package/es/core/shape/extrude.d.ts +0 -17
  39. package/es/core/shape/extrude.js +0 -133
  40. package/es/core/triangulation.d.ts +0 -136
  41. package/es/core/triangulation.js +0 -601
  42. package/es/core/utils.d.ts +0 -5
  43. package/es/core/utils.js +0 -36
  44. package/es/earth/index.d.ts +0 -22
  45. package/es/earth/index.js +0 -54
  46. package/es/earth/models/atmosphere.d.ts +0 -30
  47. package/es/earth/models/atmosphere.js +0 -116
  48. package/es/earth/models/base.d.ts +0 -37
  49. package/es/earth/models/base.js +0 -172
  50. package/es/earth/models/bloomsphere.d.ts +0 -30
  51. package/es/earth/models/bloomsphere.js +0 -115
  52. package/es/earth/shaders/atmosphere/atmosphere_frag.glsl +0 -17
  53. package/es/earth/shaders/atmosphere/atmosphere_vert.glsl +0 -24
  54. package/es/earth/shaders/base/base_frag.glsl +0 -11
  55. package/es/earth/shaders/base/base_vert.glsl +0 -52
  56. package/es/earth/shaders/bloomshpere/bloomsphere_frag.glsl +0 -15
  57. package/es/earth/shaders/bloomshpere/bloomsphere_vert.glsl +0 -20
  58. package/es/earth/utils.d.ts +0 -26
  59. package/es/earth/utils.js +0 -99
  60. package/es/geometry/index.d.ts +0 -22
  61. package/es/geometry/index.js +0 -53
  62. package/es/geometry/models/billboard.d.ts +0 -39
  63. package/es/geometry/models/billboard.js +0 -175
  64. package/es/geometry/models/index.d.ts +0 -5
  65. package/es/geometry/models/index.js +0 -9
  66. package/es/geometry/models/plane.d.ts +0 -58
  67. package/es/geometry/models/plane.js +0 -308
  68. package/es/geometry/models/sprite.d.ts +0 -48
  69. package/es/geometry/models/sprite.js +0 -225
  70. package/es/geometry/shaders/billboard_frag.glsl +0 -18
  71. package/es/geometry/shaders/billboard_vert.glsl +0 -43
  72. package/es/geometry/shaders/plane_frag.glsl +0 -23
  73. package/es/geometry/shaders/plane_vert.glsl +0 -31
  74. package/es/geometry/shaders/sprite_frag.glsl +0 -23
  75. package/es/geometry/shaders/sprite_vert.glsl +0 -21
  76. package/es/heatmap/index.d.ts +0 -13
  77. package/es/heatmap/index.js +0 -87
  78. package/es/heatmap/models/grid.d.ts +0 -29
  79. package/es/heatmap/models/grid.js +0 -83
  80. package/es/heatmap/models/grid3d.d.ts +0 -31
  81. package/es/heatmap/models/grid3d.js +0 -122
  82. package/es/heatmap/models/heatmap.d.ts +0 -46
  83. package/es/heatmap/models/heatmap.js +0 -447
  84. package/es/heatmap/models/hexagon.d.ts +0 -29
  85. package/es/heatmap/models/hexagon.js +0 -83
  86. package/es/heatmap/models/index.d.ts +0 -5
  87. package/es/heatmap/models/index.js +0 -12
  88. package/es/heatmap/shaders/grid/grid_frag.glsl +0 -9
  89. package/es/heatmap/shaders/grid/grid_vert.glsl +0 -30
  90. package/es/heatmap/shaders/grid3d/grid_3d_frag.glsl +0 -17
  91. package/es/heatmap/shaders/grid3d/grid_3d_vert.glsl +0 -34
  92. package/es/heatmap/shaders/heatmap/heatmap_3d_frag.glsl +0 -23
  93. package/es/heatmap/shaders/heatmap/heatmap_3d_vert.glsl +0 -59
  94. package/es/heatmap/shaders/heatmap/heatmap_frag.glsl +0 -40
  95. package/es/heatmap/shaders/heatmap/heatmap_framebuffer_frag.glsl +0 -17
  96. package/es/heatmap/shaders/heatmap/heatmap_framebuffer_vert.glsl +0 -36
  97. package/es/heatmap/shaders/heatmap/heatmap_vert.glsl +0 -21
  98. package/es/heatmap/shaders/hexagon/hexagon_frag.glsl +0 -8
  99. package/es/heatmap/shaders/hexagon/hexagon_vert.glsl +0 -30
  100. package/es/heatmap/triangulation.d.ts +0 -5
  101. package/es/heatmap/triangulation.js +0 -33
  102. package/es/image/index.d.ts +0 -9
  103. package/es/image/index.js +0 -28
  104. package/es/image/models/image.d.ts +0 -31
  105. package/es/image/models/image.js +0 -113
  106. package/es/image/models/index.d.ts +0 -5
  107. package/es/image/models/index.js +0 -5
  108. package/es/image/shaders/dataImage_frag.glsl +0 -32
  109. package/es/image/shaders/image_frag.glsl +0 -38
  110. package/es/image/shaders/image_vert.glsl +0 -20
  111. package/es/index.d.ts +0 -18
  112. package/es/index.js +0 -18
  113. package/es/line/index.d.ts +0 -36
  114. package/es/line/index.js +0 -90
  115. package/es/line/models/arc.d.ts +0 -40
  116. package/es/line/models/arc.js +0 -279
  117. package/es/line/models/arc_3d.d.ts +0 -40
  118. package/es/line/models/arc_3d.js +0 -269
  119. package/es/line/models/flow.d.ts +0 -31
  120. package/es/line/models/flow.js +0 -140
  121. package/es/line/models/great_circle.d.ts +0 -34
  122. package/es/line/models/great_circle.js +0 -240
  123. package/es/line/models/index.d.ts +0 -5
  124. package/es/line/models/index.js +0 -18
  125. package/es/line/models/line.d.ts +0 -44
  126. package/es/line/models/line.js +0 -273
  127. package/es/line/models/simple_line.d.ts +0 -33
  128. package/es/line/models/simple_line.js +0 -118
  129. package/es/line/models/wall.d.ts +0 -34
  130. package/es/line/models/wall.js +0 -223
  131. package/es/line/shaders/arc/line_arc_frag.glsl +0 -92
  132. package/es/line/shaders/arc/line_arc_vert.glsl +0 -156
  133. package/es/line/shaders/arc3d/line_arc_3d_frag.glsl +0 -108
  134. package/es/line/shaders/arc3d/line_arc_3d_vert.glsl +0 -177
  135. package/es/line/shaders/flow/flow_line_frag.glsl +0 -13
  136. package/es/line/shaders/flow/flow_line_vert.glsl +0 -76
  137. package/es/line/shaders/greatCircle/line_arc_great_circle_frag.glsl +0 -99
  138. package/es/line/shaders/greatCircle/line_arc_great_circle_vert.glsl +0 -165
  139. package/es/line/shaders/line/line_frag.glsl +0 -122
  140. package/es/line/shaders/line/line_vert.glsl +0 -101
  141. package/es/line/shaders/simple/simpleline_frag.glsl +0 -30
  142. package/es/line/shaders/simple/simpleline_vert.glsl +0 -45
  143. package/es/line/shaders/wall/wall_frag.glsl +0 -94
  144. package/es/line/shaders/wall/wall_vert.glsl +0 -90
  145. package/es/mask/index.d.ts +0 -16
  146. package/es/mask/index.js +0 -21
  147. package/es/mask/models/fill.d.ts +0 -18
  148. package/es/mask/models/fill.js +0 -61
  149. package/es/mask/models/index.d.ts +0 -5
  150. package/es/mask/models/index.js +0 -5
  151. package/es/mask/shaders/mask_vert.glsl +0 -14
  152. package/es/plugins/DataMappingPlugin.d.ts +0 -12
  153. package/es/plugins/DataMappingPlugin.js +0 -226
  154. package/es/plugins/DataSourcePlugin.d.ts +0 -6
  155. package/es/plugins/DataSourcePlugin.js +0 -75
  156. package/es/plugins/FeatureScalePlugin.d.ts +0 -20
  157. package/es/plugins/FeatureScalePlugin.js +0 -295
  158. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -4
  159. package/es/plugins/LayerAnimateStylePlugin.js +0 -14
  160. package/es/plugins/LayerMaskPlugin.d.ts +0 -7
  161. package/es/plugins/LayerMaskPlugin.js +0 -19
  162. package/es/plugins/LayerModelPlugin.d.ts +0 -10
  163. package/es/plugins/LayerModelPlugin.js +0 -60
  164. package/es/plugins/LayerStylePlugin.d.ts +0 -7
  165. package/es/plugins/LayerStylePlugin.js +0 -18
  166. package/es/plugins/LightingPlugin.d.ts +0 -35
  167. package/es/plugins/LightingPlugin.js +0 -84
  168. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -22
  169. package/es/plugins/MultiPassRendererPlugin.js +0 -52
  170. package/es/plugins/PixelPickingPlugin.d.ts +0 -11
  171. package/es/plugins/PixelPickingPlugin.js +0 -146
  172. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -10
  173. package/es/plugins/RegisterStyleAttributePlugin.js +0 -72
  174. package/es/plugins/ShaderUniformPlugin.d.ts +0 -17
  175. package/es/plugins/ShaderUniformPlugin.js +0 -196
  176. package/es/plugins/UpdateModelPlugin.d.ts +0 -7
  177. package/es/plugins/UpdateModelPlugin.js +0 -20
  178. package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -9
  179. package/es/plugins/UpdateStyleAttributePlugin.js +0 -54
  180. package/es/plugins/index.d.ts +0 -15
  181. package/es/plugins/index.js +0 -18
  182. package/es/point/index.d.ts +0 -35
  183. package/es/point/index.js +0 -153
  184. package/es/point/models/billboard_point.d.ts +0 -35
  185. package/es/point/models/billboard_point.js +0 -95
  186. package/es/point/models/earthExtrude.d.ts +0 -32
  187. package/es/point/models/earthExtrude.js +0 -199
  188. package/es/point/models/earthFill.d.ts +0 -31
  189. package/es/point/models/earthFill.js +0 -158
  190. package/es/point/models/extrude.d.ts +0 -32
  191. package/es/point/models/extrude.js +0 -195
  192. package/es/point/models/fill.d.ts +0 -47
  193. package/es/point/models/fill.js +0 -180
  194. package/es/point/models/fillImage.d.ts +0 -42
  195. package/es/point/models/fillImage.js +0 -189
  196. package/es/point/models/image.d.ts +0 -48
  197. package/es/point/models/image.js +0 -293
  198. package/es/point/models/index.d.ts +0 -5
  199. package/es/point/models/index.js +0 -24
  200. package/es/point/models/normal.d.ts +0 -36
  201. package/es/point/models/normal.js +0 -89
  202. package/es/point/models/radar.d.ts +0 -37
  203. package/es/point/models/radar.js +0 -115
  204. package/es/point/models/text.d.ts +0 -85
  205. package/es/point/models/text.js +0 -503
  206. package/es/point/shaders/billboard/billboard_point_frag.glsl +0 -48
  207. package/es/point/shaders/billboard/billboard_point_vert.glsl +0 -33
  208. package/es/point/shaders/earthExtrude/earthExtrude_frag.glsl +0 -36
  209. package/es/point/shaders/earthExtrude/earthExtrude_vert.glsl +0 -118
  210. package/es/point/shaders/earthFill/earthFill_frag.glsl +0 -79
  211. package/es/point/shaders/earthFill/earthFill_vert.glsl +0 -46
  212. package/es/point/shaders/extrude/extrude_frag.glsl +0 -29
  213. package/es/point/shaders/extrude/extrude_vert.glsl +0 -95
  214. package/es/point/shaders/fill/fill_frag.glsl +0 -97
  215. package/es/point/shaders/fill/fill_vert.glsl +0 -79
  216. package/es/point/shaders/fillImage/fillImage_frag.glsl +0 -23
  217. package/es/point/shaders/fillImage/fillImage_vert.glsl +0 -46
  218. package/es/point/shaders/image/image_frag.glsl +0 -45
  219. package/es/point/shaders/image/image_vert.glsl +0 -47
  220. package/es/point/shaders/normal/normal_frag.glsl +0 -5
  221. package/es/point/shaders/normal/normal_vert.glsl +0 -22
  222. package/es/point/shaders/radar/radar_frag.glsl +0 -52
  223. package/es/point/shaders/radar/radar_vert.glsl +0 -53
  224. package/es/point/shaders/text/text_frag.glsl +0 -47
  225. package/es/point/shaders/text/text_vert.glsl +0 -65
  226. package/es/point/shape/extrude.d.ts +0 -15
  227. package/es/point/shape/extrude.js +0 -48
  228. package/es/polygon/index.d.ts +0 -18
  229. package/es/polygon/index.js +0 -71
  230. package/es/polygon/models/extrude.d.ts +0 -41
  231. package/es/polygon/models/extrude.js +0 -248
  232. package/es/polygon/models/extrusion.d.ts +0 -40
  233. package/es/polygon/models/extrusion.js +0 -137
  234. package/es/polygon/models/fill.d.ts +0 -32
  235. package/es/polygon/models/fill.js +0 -127
  236. package/es/polygon/models/index.d.ts +0 -5
  237. package/es/polygon/models/index.js +0 -26
  238. package/es/polygon/models/ocean.d.ts +0 -37
  239. package/es/polygon/models/ocean.js +0 -172
  240. package/es/polygon/models/water.d.ts +0 -35
  241. package/es/polygon/models/water.js +0 -150
  242. package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -24
  243. package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -49
  244. package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -53
  245. package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -74
  246. package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -55
  247. package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -54
  248. package/es/polygon/shaders/extrusion/polygon_extrusion_frag.glsl +0 -8
  249. package/es/polygon/shaders/extrusion/polygon_extrusion_vert.glsl +0 -24
  250. package/es/polygon/shaders/fill/fill_frag.glsl +0 -8
  251. package/es/polygon/shaders/fill/fill_linear_frag.glsl +0 -23
  252. package/es/polygon/shaders/fill/fill_linear_vert.glsl +0 -36
  253. package/es/polygon/shaders/fill/fill_vert.glsl +0 -35
  254. package/es/polygon/shaders/ocean/ocean_frag.glsl +0 -277
  255. package/es/polygon/shaders/ocean/ocean_vert.glsl +0 -21
  256. package/es/polygon/shaders/water/polygon_water_frag.glsl +0 -78
  257. package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -22
  258. package/es/raster/buffers/triangulation.d.ts +0 -6
  259. package/es/raster/buffers/triangulation.js +0 -25
  260. package/es/raster/index.d.ts +0 -11
  261. package/es/raster/index.js +0 -55
  262. package/es/raster/models/index.d.ts +0 -5
  263. package/es/raster/models/index.js +0 -10
  264. package/es/raster/models/raster.d.ts +0 -35
  265. package/es/raster/models/raster.js +0 -156
  266. package/es/raster/models/rasterRgb.d.ts +0 -35
  267. package/es/raster/models/rasterRgb.js +0 -158
  268. package/es/raster/models/rasterTerrainRgb.d.ts +0 -30
  269. package/es/raster/models/rasterTerrainRgb.js +0 -118
  270. package/es/raster/shaders/raster/raster_2d_frag.glsl +0 -37
  271. package/es/raster/shaders/raster/raster_2d_vert.glsl +0 -21
  272. package/es/raster/shaders/rgb/raster_rgb_frag.glsl +0 -30
  273. package/es/raster/shaders/rgb/raster_rgb_vert.glsl +0 -21
  274. package/es/raster/shaders/terrain/terrain_rgb_frag.glsl +0 -40
  275. package/es/raster/shaders/terrain/terrain_rgb_vert.glsl +0 -19
  276. package/es/shader/minify_frag.glsl +0 -11
  277. package/es/shader/minify_picking_frag.glsl +0 -10
  278. package/es/tile/core/BaseLayer.d.ts +0 -50
  279. package/es/tile/core/BaseLayer.js +0 -256
  280. package/es/tile/core/TileDebugLayer.d.ts +0 -15
  281. package/es/tile/core/TileDebugLayer.js +0 -23
  282. package/es/tile/interaction/getFeatureData.d.ts +0 -0
  283. package/es/tile/interaction/getFeatureData.js +0 -0
  284. package/es/tile/interaction/getRasterData.d.ts +0 -4
  285. package/es/tile/interaction/getRasterData.js +0 -45
  286. package/es/tile/interaction/utils.d.ts +0 -11
  287. package/es/tile/interaction/utils.js +0 -69
  288. package/es/tile/interface.d.ts +0 -29
  289. package/es/tile/interface.js +0 -1
  290. package/es/tile/service/TileLayerService.d.ts +0 -58
  291. package/es/tile/service/TileLayerService.js +0 -195
  292. package/es/tile/service/TilePickService.d.ts +0 -26
  293. package/es/tile/service/TilePickService.js +0 -126
  294. package/es/tile/service/TileSourceService.d.ts +0 -7
  295. package/es/tile/service/TileSourceService.js +0 -26
  296. package/es/tile/tile/DebugTile.d.ts +0 -16
  297. package/es/tile/tile/DebugTile.js +0 -47
  298. package/es/tile/tile/ImageTile.d.ts +0 -14
  299. package/es/tile/tile/ImageTile.js +0 -39
  300. package/es/tile/tile/MaskTile.d.ts +0 -18
  301. package/es/tile/tile/MaskTile.js +0 -54
  302. package/es/tile/tile/RasterRGBTile.d.ts +0 -11
  303. package/es/tile/tile/RasterRGBTile.js +0 -47
  304. package/es/tile/tile/RasterTerrainRGBTile.d.ts +0 -14
  305. package/es/tile/tile/RasterTerrainRGBTile.js +0 -39
  306. package/es/tile/tile/RasterTile.d.ts +0 -18
  307. package/es/tile/tile/RasterTile.js +0 -81
  308. package/es/tile/tile/Tile.d.ts +0 -112
  309. package/es/tile/tile/Tile.js +0 -166
  310. package/es/tile/tile/VectorTile.d.ts +0 -26
  311. package/es/tile/tile/VectorTile.js +0 -87
  312. package/es/tile/tile/index.d.ts +0 -12
  313. package/es/tile/tile/index.js +0 -44
  314. package/es/tile/tile/util.d.ts +0 -5
  315. package/es/tile/tile/util.js +0 -18
  316. package/es/tile/utils/constants.d.ts +0 -1
  317. package/es/tile/utils/constants.js +0 -8
  318. package/es/tile/utils/utils.d.ts +0 -8
  319. package/es/tile/utils/utils.js +0 -11
  320. package/es/utils/blend.d.ts +0 -2
  321. package/es/utils/blend.js +0 -57
  322. package/es/utils/collision-index.d.ts +0 -47
  323. package/es/utils/collision-index.js +0 -87
  324. package/es/utils/extrude_polyline.d.ts +0 -53
  325. package/es/utils/extrude_polyline.js +0 -319
  326. package/es/utils/grid-index.d.ts +0 -28
  327. package/es/utils/grid-index.js +0 -128
  328. package/es/utils/identityScale.d.ts +0 -8
  329. package/es/utils/identityScale.js +0 -26
  330. package/es/utils/load-image.d.ts +0 -1
  331. package/es/utils/load-image.js +0 -22
  332. package/es/utils/multiPassRender.d.ts +0 -16
  333. package/es/utils/multiPassRender.js +0 -37
  334. package/es/utils/polylineNormal.d.ts +0 -9
  335. package/es/utils/polylineNormal.js +0 -182
  336. package/es/utils/rampcolor_legend.d.ts +0 -6
  337. package/es/utils/rampcolor_legend.js +0 -12
  338. package/es/utils/scale.d.ts +0 -87
  339. package/es/utils/scale.js +0 -595
  340. package/es/utils/simpleLine.d.ts +0 -23
  341. package/es/utils/simpleLine.js +0 -76
  342. package/es/utils/stencil.d.ts +0 -7
  343. package/es/utils/stencil.js +0 -49
  344. package/es/utils/symbol-layout.d.ts +0 -43
  345. package/es/utils/symbol-layout.js +0 -251
  346. package/es/wind/index.d.ts +0 -11
  347. package/es/wind/index.js +0 -34
  348. package/es/wind/models/index.d.ts +0 -5
  349. package/es/wind/models/index.js +0 -5
  350. package/es/wind/models/utils.d.ts +0 -19
  351. package/es/wind/models/utils.js +0 -213
  352. package/es/wind/models/wind.d.ts +0 -38
  353. package/es/wind/models/wind.js +0 -240
  354. package/es/wind/models/windRender.d.ts +0 -104
  355. package/es/wind/models/windRender.js +0 -333
  356. package/es/wind/models/windShader.d.ts +0 -12
  357. package/es/wind/models/windShader.js +0 -151
  358. package/es/wind/shaders/wind_frag.glsl +0 -9
  359. package/es/wind/shaders/wind_vert.glsl +0 -14
  360. package/lib/canvas/index.d.ts +0 -18
  361. package/lib/canvas/index.js +0 -79
  362. package/lib/canvas/models/canvas.d.ts +0 -23
  363. package/lib/canvas/models/canvas.js +0 -149
  364. package/lib/canvas/models/constants.d.ts +0 -2
  365. package/lib/canvas/models/constants.js +0 -12
  366. package/lib/canvas/models/index.d.ts +0 -2
  367. package/lib/canvas/models/index.js +0 -27
  368. package/lib/citybuilding/building.d.ts +0 -7
  369. package/lib/citybuilding/building.js +0 -33
  370. package/lib/citybuilding/models/build.d.ts +0 -33
  371. package/lib/citybuilding/models/build.js +0 -168
  372. package/lib/citybuilding/shaders/build_frag.glsl +0 -123
  373. package/lib/citybuilding/shaders/build_vert.glsl +0 -58
  374. package/lib/core/BaseLayer.d.ts +0 -265
  375. package/lib/core/BaseLayer.js +0 -1317
  376. package/lib/core/BaseModel.d.ts +0 -95
  377. package/lib/core/BaseModel.js +0 -375
  378. package/lib/core/CommonStyleAttribute.d.ts +0 -16
  379. package/lib/core/CommonStyleAttribute.js +0 -120
  380. package/lib/core/LayerPickService.d.ts +0 -12
  381. package/lib/core/LayerPickService.js +0 -110
  382. package/lib/core/TextureService.d.ts +0 -15
  383. package/lib/core/TextureService.js +0 -73
  384. package/lib/core/constant.d.ts +0 -6
  385. package/lib/core/constant.js +0 -25
  386. package/lib/core/interface.d.ts +0 -284
  387. package/lib/core/interface.js +0 -34
  388. package/lib/core/line_trangluation.d.ts +0 -19
  389. package/lib/core/line_trangluation.js +0 -94
  390. package/lib/core/schema.d.ts +0 -27
  391. package/lib/core/schema.js +0 -31
  392. package/lib/core/shape/Path.d.ts +0 -40
  393. package/lib/core/shape/Path.js +0 -81
  394. package/lib/core/shape/arrow.d.ts +0 -25
  395. package/lib/core/shape/arrow.js +0 -158
  396. package/lib/core/shape/extrude.d.ts +0 -17
  397. package/lib/core/shape/extrude.js +0 -142
  398. package/lib/core/triangulation.d.ts +0 -136
  399. package/lib/core/triangulation.js +0 -628
  400. package/lib/core/utils.d.ts +0 -5
  401. package/lib/core/utils.js +0 -44
  402. package/lib/earth/index.d.ts +0 -22
  403. package/lib/earth/index.js +0 -62
  404. package/lib/earth/models/atmosphere.d.ts +0 -30
  405. package/lib/earth/models/atmosphere.js +0 -124
  406. package/lib/earth/models/base.d.ts +0 -37
  407. package/lib/earth/models/base.js +0 -180
  408. package/lib/earth/models/bloomsphere.d.ts +0 -30
  409. package/lib/earth/models/bloomsphere.js +0 -123
  410. package/lib/earth/shaders/atmosphere/atmosphere_frag.glsl +0 -17
  411. package/lib/earth/shaders/atmosphere/atmosphere_vert.glsl +0 -24
  412. package/lib/earth/shaders/base/base_frag.glsl +0 -11
  413. package/lib/earth/shaders/base/base_vert.glsl +0 -52
  414. package/lib/earth/shaders/bloomshpere/bloomsphere_frag.glsl +0 -15
  415. package/lib/earth/shaders/bloomshpere/bloomsphere_vert.glsl +0 -20
  416. package/lib/earth/utils.d.ts +0 -26
  417. package/lib/earth/utils.js +0 -107
  418. package/lib/geometry/index.d.ts +0 -22
  419. package/lib/geometry/index.js +0 -61
  420. package/lib/geometry/models/billboard.d.ts +0 -39
  421. package/lib/geometry/models/billboard.js +0 -183
  422. package/lib/geometry/models/index.d.ts +0 -5
  423. package/lib/geometry/models/index.js +0 -16
  424. package/lib/geometry/models/plane.d.ts +0 -58
  425. package/lib/geometry/models/plane.js +0 -316
  426. package/lib/geometry/models/sprite.d.ts +0 -48
  427. package/lib/geometry/models/sprite.js +0 -233
  428. package/lib/geometry/shaders/billboard_frag.glsl +0 -18
  429. package/lib/geometry/shaders/billboard_vert.glsl +0 -43
  430. package/lib/geometry/shaders/plane_frag.glsl +0 -23
  431. package/lib/geometry/shaders/plane_vert.glsl +0 -31
  432. package/lib/geometry/shaders/sprite_frag.glsl +0 -23
  433. package/lib/geometry/shaders/sprite_vert.glsl +0 -21
  434. package/lib/heatmap/index.d.ts +0 -13
  435. package/lib/heatmap/index.js +0 -95
  436. package/lib/heatmap/models/grid.d.ts +0 -29
  437. package/lib/heatmap/models/grid.js +0 -91
  438. package/lib/heatmap/models/grid3d.d.ts +0 -31
  439. package/lib/heatmap/models/grid3d.js +0 -130
  440. package/lib/heatmap/models/heatmap.d.ts +0 -46
  441. package/lib/heatmap/models/heatmap.js +0 -455
  442. package/lib/heatmap/models/hexagon.d.ts +0 -29
  443. package/lib/heatmap/models/hexagon.js +0 -91
  444. package/lib/heatmap/models/index.d.ts +0 -5
  445. package/lib/heatmap/models/index.js +0 -19
  446. package/lib/heatmap/shaders/grid/grid_frag.glsl +0 -9
  447. package/lib/heatmap/shaders/grid/grid_vert.glsl +0 -30
  448. package/lib/heatmap/shaders/grid3d/grid_3d_frag.glsl +0 -17
  449. package/lib/heatmap/shaders/grid3d/grid_3d_vert.glsl +0 -34
  450. package/lib/heatmap/shaders/heatmap/heatmap_3d_frag.glsl +0 -23
  451. package/lib/heatmap/shaders/heatmap/heatmap_3d_vert.glsl +0 -59
  452. package/lib/heatmap/shaders/heatmap/heatmap_frag.glsl +0 -40
  453. package/lib/heatmap/shaders/heatmap/heatmap_framebuffer_frag.glsl +0 -17
  454. package/lib/heatmap/shaders/heatmap/heatmap_framebuffer_vert.glsl +0 -36
  455. package/lib/heatmap/shaders/heatmap/heatmap_vert.glsl +0 -21
  456. package/lib/heatmap/shaders/hexagon/hexagon_frag.glsl +0 -8
  457. package/lib/heatmap/shaders/hexagon/hexagon_vert.glsl +0 -30
  458. package/lib/heatmap/triangulation.d.ts +0 -5
  459. package/lib/heatmap/triangulation.js +0 -39
  460. package/lib/image/index.d.ts +0 -9
  461. package/lib/image/index.js +0 -36
  462. package/lib/image/models/image.d.ts +0 -31
  463. package/lib/image/models/image.js +0 -121
  464. package/lib/image/models/index.d.ts +0 -5
  465. package/lib/image/models/index.js +0 -12
  466. package/lib/image/shaders/dataImage_frag.glsl +0 -32
  467. package/lib/image/shaders/image_frag.glsl +0 -38
  468. package/lib/image/shaders/image_vert.glsl +0 -20
  469. package/lib/index.d.ts +0 -18
  470. package/lib/index.js +0 -148
  471. package/lib/line/index.d.ts +0 -36
  472. package/lib/line/index.js +0 -98
  473. package/lib/line/models/arc.d.ts +0 -40
  474. package/lib/line/models/arc.js +0 -287
  475. package/lib/line/models/arc_3d.d.ts +0 -40
  476. package/lib/line/models/arc_3d.js +0 -277
  477. package/lib/line/models/flow.d.ts +0 -31
  478. package/lib/line/models/flow.js +0 -148
  479. package/lib/line/models/great_circle.d.ts +0 -34
  480. package/lib/line/models/great_circle.js +0 -248
  481. package/lib/line/models/index.d.ts +0 -5
  482. package/lib/line/models/index.js +0 -25
  483. package/lib/line/models/line.d.ts +0 -44
  484. package/lib/line/models/line.js +0 -281
  485. package/lib/line/models/simple_line.d.ts +0 -33
  486. package/lib/line/models/simple_line.js +0 -126
  487. package/lib/line/models/wall.d.ts +0 -34
  488. package/lib/line/models/wall.js +0 -231
  489. package/lib/line/shaders/arc/line_arc_frag.glsl +0 -92
  490. package/lib/line/shaders/arc/line_arc_vert.glsl +0 -156
  491. package/lib/line/shaders/arc3d/line_arc_3d_frag.glsl +0 -108
  492. package/lib/line/shaders/arc3d/line_arc_3d_vert.glsl +0 -177
  493. package/lib/line/shaders/flow/flow_line_frag.glsl +0 -13
  494. package/lib/line/shaders/flow/flow_line_vert.glsl +0 -76
  495. package/lib/line/shaders/greatCircle/line_arc_great_circle_frag.glsl +0 -99
  496. package/lib/line/shaders/greatCircle/line_arc_great_circle_vert.glsl +0 -165
  497. package/lib/line/shaders/line/line_frag.glsl +0 -122
  498. package/lib/line/shaders/line/line_vert.glsl +0 -101
  499. package/lib/line/shaders/simple/simpleline_frag.glsl +0 -30
  500. package/lib/line/shaders/simple/simpleline_vert.glsl +0 -45
  501. package/lib/line/shaders/wall/wall_frag.glsl +0 -94
  502. package/lib/line/shaders/wall/wall_vert.glsl +0 -90
  503. package/lib/mask/index.d.ts +0 -16
  504. package/lib/mask/index.js +0 -29
  505. package/lib/mask/models/fill.d.ts +0 -18
  506. package/lib/mask/models/fill.js +0 -69
  507. package/lib/mask/models/index.d.ts +0 -5
  508. package/lib/mask/models/index.js +0 -12
  509. package/lib/mask/shaders/mask_vert.glsl +0 -14
  510. package/lib/plugins/DataMappingPlugin.d.ts +0 -12
  511. package/lib/plugins/DataMappingPlugin.js +0 -234
  512. package/lib/plugins/DataSourcePlugin.d.ts +0 -6
  513. package/lib/plugins/DataSourcePlugin.js +0 -83
  514. package/lib/plugins/FeatureScalePlugin.d.ts +0 -20
  515. package/lib/plugins/FeatureScalePlugin.js +0 -303
  516. package/lib/plugins/LayerAnimateStylePlugin.d.ts +0 -4
  517. package/lib/plugins/LayerAnimateStylePlugin.js +0 -22
  518. package/lib/plugins/LayerMaskPlugin.d.ts +0 -7
  519. package/lib/plugins/LayerMaskPlugin.js +0 -26
  520. package/lib/plugins/LayerModelPlugin.d.ts +0 -10
  521. package/lib/plugins/LayerModelPlugin.js +0 -68
  522. package/lib/plugins/LayerStylePlugin.d.ts +0 -7
  523. package/lib/plugins/LayerStylePlugin.js +0 -25
  524. package/lib/plugins/LightingPlugin.d.ts +0 -35
  525. package/lib/plugins/LightingPlugin.js +0 -93
  526. package/lib/plugins/MultiPassRendererPlugin.d.ts +0 -22
  527. package/lib/plugins/MultiPassRendererPlugin.js +0 -59
  528. package/lib/plugins/PixelPickingPlugin.d.ts +0 -11
  529. package/lib/plugins/PixelPickingPlugin.js +0 -154
  530. package/lib/plugins/RegisterStyleAttributePlugin.d.ts +0 -10
  531. package/lib/plugins/RegisterStyleAttributePlugin.js +0 -78
  532. package/lib/plugins/ShaderUniformPlugin.d.ts +0 -17
  533. package/lib/plugins/ShaderUniformPlugin.js +0 -203
  534. package/lib/plugins/UpdateModelPlugin.d.ts +0 -7
  535. package/lib/plugins/UpdateModelPlugin.js +0 -27
  536. package/lib/plugins/UpdateStyleAttributePlugin.d.ts +0 -9
  537. package/lib/plugins/UpdateStyleAttributePlugin.js +0 -61
  538. package/lib/plugins/index.d.ts +0 -15
  539. package/lib/plugins/index.js +0 -26
  540. package/lib/point/index.d.ts +0 -35
  541. package/lib/point/index.js +0 -161
  542. package/lib/point/models/billboard_point.d.ts +0 -35
  543. package/lib/point/models/billboard_point.js +0 -104
  544. package/lib/point/models/earthExtrude.d.ts +0 -32
  545. package/lib/point/models/earthExtrude.js +0 -207
  546. package/lib/point/models/earthFill.d.ts +0 -31
  547. package/lib/point/models/earthFill.js +0 -166
  548. package/lib/point/models/extrude.d.ts +0 -32
  549. package/lib/point/models/extrude.js +0 -203
  550. package/lib/point/models/fill.d.ts +0 -47
  551. package/lib/point/models/fill.js +0 -188
  552. package/lib/point/models/fillImage.d.ts +0 -42
  553. package/lib/point/models/fillImage.js +0 -197
  554. package/lib/point/models/image.d.ts +0 -48
  555. package/lib/point/models/image.js +0 -301
  556. package/lib/point/models/index.d.ts +0 -5
  557. package/lib/point/models/index.js +0 -32
  558. package/lib/point/models/normal.d.ts +0 -36
  559. package/lib/point/models/normal.js +0 -98
  560. package/lib/point/models/radar.d.ts +0 -37
  561. package/lib/point/models/radar.js +0 -123
  562. package/lib/point/models/text.d.ts +0 -85
  563. package/lib/point/models/text.js +0 -512
  564. package/lib/point/shaders/billboard/billboard_point_frag.glsl +0 -48
  565. package/lib/point/shaders/billboard/billboard_point_vert.glsl +0 -33
  566. package/lib/point/shaders/earthExtrude/earthExtrude_frag.glsl +0 -36
  567. package/lib/point/shaders/earthExtrude/earthExtrude_vert.glsl +0 -118
  568. package/lib/point/shaders/earthFill/earthFill_frag.glsl +0 -79
  569. package/lib/point/shaders/earthFill/earthFill_vert.glsl +0 -46
  570. package/lib/point/shaders/extrude/extrude_frag.glsl +0 -29
  571. package/lib/point/shaders/extrude/extrude_vert.glsl +0 -95
  572. package/lib/point/shaders/fill/fill_frag.glsl +0 -97
  573. package/lib/point/shaders/fill/fill_vert.glsl +0 -79
  574. package/lib/point/shaders/fillImage/fillImage_frag.glsl +0 -23
  575. package/lib/point/shaders/fillImage/fillImage_vert.glsl +0 -46
  576. package/lib/point/shaders/image/image_frag.glsl +0 -45
  577. package/lib/point/shaders/image/image_vert.glsl +0 -47
  578. package/lib/point/shaders/normal/normal_frag.glsl +0 -5
  579. package/lib/point/shaders/normal/normal_vert.glsl +0 -22
  580. package/lib/point/shaders/radar/radar_frag.glsl +0 -52
  581. package/lib/point/shaders/radar/radar_vert.glsl +0 -53
  582. package/lib/point/shaders/text/text_frag.glsl +0 -47
  583. package/lib/point/shaders/text/text_vert.glsl +0 -65
  584. package/lib/point/shape/extrude.d.ts +0 -15
  585. package/lib/point/shape/extrude.js +0 -56
  586. package/lib/polygon/index.d.ts +0 -18
  587. package/lib/polygon/index.js +0 -79
  588. package/lib/polygon/models/extrude.d.ts +0 -41
  589. package/lib/polygon/models/extrude.js +0 -256
  590. package/lib/polygon/models/extrusion.d.ts +0 -40
  591. package/lib/polygon/models/extrusion.js +0 -145
  592. package/lib/polygon/models/fill.d.ts +0 -32
  593. package/lib/polygon/models/fill.js +0 -135
  594. package/lib/polygon/models/index.d.ts +0 -5
  595. package/lib/polygon/models/index.js +0 -33
  596. package/lib/polygon/models/ocean.d.ts +0 -37
  597. package/lib/polygon/models/ocean.js +0 -180
  598. package/lib/polygon/models/water.d.ts +0 -35
  599. package/lib/polygon/models/water.js +0 -158
  600. package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -24
  601. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -49
  602. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -53
  603. package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -74
  604. package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -55
  605. package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -54
  606. package/lib/polygon/shaders/extrusion/polygon_extrusion_frag.glsl +0 -8
  607. package/lib/polygon/shaders/extrusion/polygon_extrusion_vert.glsl +0 -24
  608. package/lib/polygon/shaders/fill/fill_frag.glsl +0 -8
  609. package/lib/polygon/shaders/fill/fill_linear_frag.glsl +0 -23
  610. package/lib/polygon/shaders/fill/fill_linear_vert.glsl +0 -36
  611. package/lib/polygon/shaders/fill/fill_vert.glsl +0 -35
  612. package/lib/polygon/shaders/ocean/ocean_frag.glsl +0 -277
  613. package/lib/polygon/shaders/ocean/ocean_vert.glsl +0 -21
  614. package/lib/polygon/shaders/water/polygon_water_frag.glsl +0 -78
  615. package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -22
  616. package/lib/raster/buffers/triangulation.d.ts +0 -6
  617. package/lib/raster/buffers/triangulation.js +0 -33
  618. package/lib/raster/index.d.ts +0 -11
  619. package/lib/raster/index.js +0 -63
  620. package/lib/raster/models/index.d.ts +0 -5
  621. package/lib/raster/models/index.js +0 -17
  622. package/lib/raster/models/raster.d.ts +0 -35
  623. package/lib/raster/models/raster.js +0 -164
  624. package/lib/raster/models/rasterRgb.d.ts +0 -35
  625. package/lib/raster/models/rasterRgb.js +0 -166
  626. package/lib/raster/models/rasterTerrainRgb.d.ts +0 -30
  627. package/lib/raster/models/rasterTerrainRgb.js +0 -126
  628. package/lib/raster/shaders/raster/raster_2d_frag.glsl +0 -37
  629. package/lib/raster/shaders/raster/raster_2d_vert.glsl +0 -21
  630. package/lib/raster/shaders/rgb/raster_rgb_frag.glsl +0 -30
  631. package/lib/raster/shaders/rgb/raster_rgb_vert.glsl +0 -21
  632. package/lib/raster/shaders/terrain/terrain_rgb_frag.glsl +0 -40
  633. package/lib/raster/shaders/terrain/terrain_rgb_vert.glsl +0 -19
  634. package/lib/shader/minify_frag.glsl +0 -11
  635. package/lib/shader/minify_picking_frag.glsl +0 -10
  636. package/lib/tile/core/BaseLayer.d.ts +0 -50
  637. package/lib/tile/core/BaseLayer.js +0 -264
  638. package/lib/tile/core/TileDebugLayer.d.ts +0 -15
  639. package/lib/tile/core/TileDebugLayer.js +0 -31
  640. package/lib/tile/interaction/getFeatureData.d.ts +0 -0
  641. package/lib/tile/interaction/getFeatureData.js +0 -1
  642. package/lib/tile/interaction/getRasterData.d.ts +0 -4
  643. package/lib/tile/interaction/getRasterData.js +0 -52
  644. package/lib/tile/interaction/utils.d.ts +0 -11
  645. package/lib/tile/interaction/utils.js +0 -81
  646. package/lib/tile/interface.d.ts +0 -29
  647. package/lib/tile/interface.js +0 -5
  648. package/lib/tile/service/TileLayerService.d.ts +0 -58
  649. package/lib/tile/service/TileLayerService.js +0 -203
  650. package/lib/tile/service/TilePickService.d.ts +0 -26
  651. package/lib/tile/service/TilePickService.js +0 -134
  652. package/lib/tile/service/TileSourceService.d.ts +0 -7
  653. package/lib/tile/service/TileSourceService.js +0 -35
  654. package/lib/tile/tile/DebugTile.d.ts +0 -16
  655. package/lib/tile/tile/DebugTile.js +0 -55
  656. package/lib/tile/tile/ImageTile.d.ts +0 -14
  657. package/lib/tile/tile/ImageTile.js +0 -47
  658. package/lib/tile/tile/MaskTile.d.ts +0 -18
  659. package/lib/tile/tile/MaskTile.js +0 -62
  660. package/lib/tile/tile/RasterRGBTile.d.ts +0 -11
  661. package/lib/tile/tile/RasterRGBTile.js +0 -55
  662. package/lib/tile/tile/RasterTerrainRGBTile.d.ts +0 -14
  663. package/lib/tile/tile/RasterTerrainRGBTile.js +0 -47
  664. package/lib/tile/tile/RasterTile.d.ts +0 -18
  665. package/lib/tile/tile/RasterTile.js +0 -89
  666. package/lib/tile/tile/Tile.d.ts +0 -112
  667. package/lib/tile/tile/Tile.js +0 -174
  668. package/lib/tile/tile/VectorTile.d.ts +0 -26
  669. package/lib/tile/tile/VectorTile.js +0 -95
  670. package/lib/tile/tile/index.d.ts +0 -12
  671. package/lib/tile/tile/index.js +0 -76
  672. package/lib/tile/tile/util.d.ts +0 -5
  673. package/lib/tile/tile/util.js +0 -26
  674. package/lib/tile/utils/constants.d.ts +0 -1
  675. package/lib/tile/utils/constants.js +0 -14
  676. package/lib/tile/utils/utils.d.ts +0 -8
  677. package/lib/tile/utils/utils.js +0 -18
  678. package/lib/utils/blend.d.ts +0 -2
  679. package/lib/utils/blend.js +0 -63
  680. package/lib/utils/collision-index.d.ts +0 -47
  681. package/lib/utils/collision-index.js +0 -96
  682. package/lib/utils/extrude_polyline.d.ts +0 -53
  683. package/lib/utils/extrude_polyline.js +0 -331
  684. package/lib/utils/grid-index.d.ts +0 -28
  685. package/lib/utils/grid-index.js +0 -135
  686. package/lib/utils/identityScale.d.ts +0 -8
  687. package/lib/utils/identityScale.js +0 -32
  688. package/lib/utils/load-image.d.ts +0 -1
  689. package/lib/utils/load-image.js +0 -29
  690. package/lib/utils/multiPassRender.d.ts +0 -16
  691. package/lib/utils/multiPassRender.js +0 -44
  692. package/lib/utils/polylineNormal.d.ts +0 -9
  693. package/lib/utils/polylineNormal.js +0 -191
  694. package/lib/utils/rampcolor_legend.d.ts +0 -6
  695. package/lib/utils/rampcolor_legend.js +0 -18
  696. package/lib/utils/scale.d.ts +0 -87
  697. package/lib/utils/scale.js +0 -610
  698. package/lib/utils/simpleLine.d.ts +0 -23
  699. package/lib/utils/simpleLine.js +0 -85
  700. package/lib/utils/stencil.d.ts +0 -7
  701. package/lib/utils/stencil.js +0 -56
  702. package/lib/utils/symbol-layout.d.ts +0 -43
  703. package/lib/utils/symbol-layout.js +0 -258
  704. package/lib/wind/index.d.ts +0 -11
  705. package/lib/wind/index.js +0 -42
  706. package/lib/wind/models/index.d.ts +0 -5
  707. package/lib/wind/models/index.js +0 -12
  708. package/lib/wind/models/utils.d.ts +0 -19
  709. package/lib/wind/models/utils.js +0 -229
  710. package/lib/wind/models/wind.d.ts +0 -38
  711. package/lib/wind/models/wind.js +0 -248
  712. package/lib/wind/models/windRender.d.ts +0 -104
  713. package/lib/wind/models/windRender.js +0 -343
  714. package/lib/wind/models/windShader.d.ts +0 -12
  715. package/lib/wind/models/windShader.js +0 -157
  716. package/lib/wind/shaders/wind_frag.glsl +0 -9
  717. package/lib/wind/shaders/wind_vert.glsl +0 -14
@@ -1,503 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import { AttributeType, gl } from '@antv/l7-core';
5
- import { boundsContains, calculateCentroid, lodashUtil, padBounds, rgb2arr } from '@antv/l7-utils';
6
- import BaseModel from "../../core/BaseModel";
7
- import CollisionIndex from "../../utils/collision-index";
8
- import { getGlyphQuads, shapeText } from "../../utils/symbol-layout";
9
- /* babel-plugin-inline-import '../shaders/text/text_frag.glsl' */
10
- const textFrag = "#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105\n#define FONT_SIZE 48.0\n\nuniform sampler2D u_sdf_map;\nlayout(std140) uniform commonUniforms {\n vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\n vec2 u_sdf_map_size;\n float u_raisingHeight: 0.0;\n float u_stroke_width : 2;\n float u_gamma_scale : 0.5;\n float u_halo_blur : 0.5;\n};\n\nin vec2 v_uv;\nin float v_gamma_scale;\nin vec4 v_color;\nin vec4 v_stroke_color;\nin float v_fontScale;\n\nout vec4 outputColor;\n\n#pragma include \"picking\"\nvoid main() {\n // get style data mapping\n\n // get sdf from atlas\n float dist = texture(SAMPLER_2D(u_sdf_map), v_uv).a;\n\n lowp float buff = (6.0 - u_stroke_width / v_fontScale) / SDF_PX;\n highp float gamma = (u_halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (v_fontScale * u_gamma_scale) / 1.0;\n\n highp float gamma_scaled = gamma * v_gamma_scale;\n\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n outputColor = mix(v_color, v_stroke_color, smoothstep(0., 0.5, 1.- dist));\n\n outputColor.a *= alpha;\n // \u4F5C\u4E3A mask \u6A21\u677F\u65F6\u9700\u8981\u4E22\u5F03\u900F\u660E\u7684\u50CF\u7D20\n if (outputColor.a < 0.01) {\n discard;\n }\n outputColor = filterColor(outputColor);\n}\n";
11
- /* babel-plugin-inline-import '../shaders/text/text_vert.glsl' */
12
- const textVert = "#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105\n#define FONT_SIZE 24.0\n\nlayout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;\nlayout(location = ATTRIBUTE_LOCATION_TEXT_OFFSETS) in vec2 a_textOffsets;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec2 a_tex;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\n vec2 u_sdf_map_size;\n float u_raisingHeight: 0.0;\n float u_stroke_width : 2;\n float u_gamma_scale : 0.5;\n float u_halo_blur : 0.5;\n};\n\nout vec2 v_uv;\nout float v_gamma_scale;\nout vec4 v_color;\nout vec4 v_stroke_color;\nout float v_fontScale;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n#pragma include \"rotation_2d\"\n\nvoid main() {\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n\n v_uv = a_tex / u_sdf_map_size;\n\n\n\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n v_stroke_color = vec4(u_stroke_color.xyz, u_stroke_color.w * opacity);\n\n // \u6587\u672C\u7F29\u653E\u6BD4\u4F8B\n float fontScale = a_Size / FONT_SIZE;\n v_fontScale = fontScale;\n\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n // vec4 projected_position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n vec2 offset = rotate_matrix(a_textOffsets,rotation);\n\n // gl_Position = vec4(projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);\n\n float raiseHeight = u_raisingHeight;\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 raiseHeight = u_raisingHeight * mapboxZoomScale;\n }\n\n vec4 projected_position = project_common_position_to_clipspace(vec4(project_pos.xyz + vec3(0.0, 0.0, raiseHeight), 1.0));\n\n gl_Position = vec4(\n projected_position.xy / projected_position.w + offset * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);\n v_gamma_scale = gl_Position.w;\n setPickingColor(a_PickingColor);\n\n}\n";
13
- const {
14
- isEqual
15
- } = lodashUtil;
16
- export function TextTrianglation(feature) {
17
- // @ts-ignore
18
- const that = this;
19
- const id = feature.id;
20
- const vertices = [];
21
- const indices = [];
22
- if (!that.glyphInfoMap || !that.glyphInfoMap[id]) {
23
- return {
24
- vertices: [],
25
- // [ x, y, z, tex.x,tex.y, offset.x. offset.y]
26
- indices: [],
27
- size: 7
28
- };
29
- }
30
- const centroid = that.glyphInfoMap[id].centroid; // 计算中心点
31
- const coord = centroid.length === 2 ? [centroid[0], centroid[1], 0] : centroid;
32
- that.glyphInfoMap[id].glyphQuads.forEach((quad, index) => {
33
- vertices.push(...coord, quad.tex.x, quad.tex.y + quad.tex.height, quad.tl.x, quad.tl.y, ...coord, quad.tex.x + quad.tex.width, quad.tex.y + quad.tex.height, quad.tr.x, quad.tr.y, ...coord, quad.tex.x + quad.tex.width, quad.tex.y, quad.br.x, quad.br.y, ...coord, quad.tex.x, quad.tex.y, quad.bl.x, quad.bl.y);
34
- indices.push(0 + index * 4, 1 + index * 4, 2 + index * 4, 2 + index * 4, 3 + index * 4, 0 + index * 4);
35
- });
36
- return {
37
- vertices,
38
- // [ x, y, z, tex.x,tex.y, offset.x. offset.y]
39
- indices,
40
- size: 7
41
- };
42
- }
43
- export default class TextModel extends BaseModel {
44
- constructor(...args) {
45
- var _this;
46
- super(...args);
47
- _this = this;
48
- _defineProperty(this, "glyphInfo", void 0);
49
- _defineProperty(this, "glyphInfoMap", {});
50
- _defineProperty(this, "rawEncodeData", void 0);
51
- _defineProperty(this, "texture", void 0);
52
- _defineProperty(this, "currentZoom", -1);
53
- _defineProperty(this, "extent", void 0);
54
- _defineProperty(this, "textureHeight", 0);
55
- _defineProperty(this, "textCount", 0);
56
- _defineProperty(this, "preTextStyle", {});
57
- _defineProperty(this, "mapping", /*#__PURE__*/_asyncToGenerator(function* () {
58
- _this.initGlyph(); //
59
- _this.updateTexture();
60
- yield _this.reBuildModel();
61
- }));
62
- }
63
- get attributeLocation() {
64
- return Object.assign(super.attributeLocation, {
65
- MAX: super.attributeLocation.MAX,
66
- SIZE: 9,
67
- TEXT_OFFSETS: 10,
68
- UV: 11
69
- });
70
- }
71
- getUninforms() {
72
- const commoninfo = this.getCommonUniformsInfo();
73
- const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
74
- this.updateStyleUnifoms();
75
- return _objectSpread(_objectSpread(_objectSpread({}, commoninfo.uniformsOption), attributeInfo.uniformsOption), {
76
- u_sdf_map: this.textures[0]
77
- });
78
- }
79
- getCommonUniformsInfo() {
80
- const {
81
- stroke = '#fff',
82
- strokeWidth = 0,
83
- halo = 0.5,
84
- gamma = 2.0,
85
- raisingHeight = 0
86
- } = this.layer.getLayerConfig();
87
- const mapping = this.getFontServiceMapping();
88
- const canvas = this.getFontServiceCanvas();
89
- if (mapping && Object.keys(mapping).length !== this.textCount && canvas) {
90
- this.updateTexture();
91
- this.textCount = Object.keys(mapping).length;
92
- }
93
- this.preTextStyle = this.getTextStyle();
94
- const commonOptions = {
95
- u_stroke_color: rgb2arr(stroke),
96
- u_sdf_map_size: [(canvas === null || canvas === void 0 ? void 0 : canvas.width) || 1, (canvas === null || canvas === void 0 ? void 0 : canvas.height) || 1],
97
- u_raisingHeight: Number(raisingHeight),
98
- u_stroke_width: strokeWidth,
99
- u_gamma_scale: gamma,
100
- u_halo_blur: halo
101
- };
102
- const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
103
- return commonBufferInfo;
104
- }
105
- initModels() {
106
- var _this2 = this;
107
- return _asyncToGenerator(function* () {
108
- // 绑定事件
109
- _this2.bindEvent();
110
- _this2.extent = _this2.textExtent();
111
- _this2.rawEncodeData = _this2.layer.getEncodedData();
112
- _this2.preTextStyle = _this2.getTextStyle();
113
- _this2.initUniformsBuffer();
114
- return _this2.buildModels();
115
- })();
116
- }
117
- buildModels() {
118
- var _this3 = this;
119
- return _asyncToGenerator(function* () {
120
- const {
121
- textAllowOverlap = false
122
- } = _this3.layer.getLayerConfig();
123
-
124
- // this.mapping(); 重复调用
125
- _this3.initGlyph(); //
126
- _this3.updateTexture();
127
- if (!textAllowOverlap) {
128
- _this3.filterGlyphs();
129
- }
130
- const model = yield _this3.layer.buildLayerModel({
131
- moduleName: 'pointText',
132
- vertexShader: textVert,
133
- fragmentShader: textFrag,
134
- defines: _this3.getDefines(),
135
- inject: _this3.getInject(),
136
- triangulation: TextTrianglation.bind(_this3),
137
- depth: {
138
- enable: false
139
- }
140
- });
141
- return [model];
142
- })();
143
- }
144
- // 需要更新的场景
145
- // 1. 文本偏移量发生改变
146
- // 2. 文本锚点发生改变
147
- // 3. 文本允许重叠发生改变
148
- // 4. 文本字体发生改变
149
- // 5. 文本字体粗细发生改变
150
- needUpdate() {
151
- var _this4 = this;
152
- return _asyncToGenerator(function* () {
153
- const {
154
- textAllowOverlap = false,
155
- textAnchor = 'center',
156
- textOffset,
157
- padding,
158
- fontFamily,
159
- fontWeight
160
- } = _this4.getTextStyle();
161
- if (!isEqual(padding, _this4.preTextStyle.padding) || !isEqual(textOffset, _this4.preTextStyle.textOffset) || !isEqual(textAnchor, _this4.preTextStyle.textAnchor) || !isEqual(fontFamily, _this4.preTextStyle.fontFamily) || !isEqual(fontWeight, _this4.preTextStyle.fontWeight)) {
162
- yield _this4.mapping();
163
- return true;
164
- }
165
- if (textAllowOverlap) {
166
- // 小于不做避让
167
- return false;
168
- }
169
-
170
- // textAllowOverlap 发生改变
171
- const zoom = _this4.mapService.getZoom();
172
- const extent = _this4.mapService.getBounds();
173
- const flag = boundsContains(_this4.extent, extent);
174
- // 文本不能压盖则进行过滤
175
- if (Math.abs(_this4.currentZoom - zoom) > 0.5 || !flag || textAllowOverlap !== _this4.preTextStyle.textAllowOverlap) {
176
- // TODO this.mapping 数据未变化,避让
177
- yield _this4.reBuildModel();
178
- return true;
179
- }
180
- return false;
181
- })();
182
- }
183
- clearModels() {
184
- var _this$texture;
185
- (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
186
- // TODO this.mapping
187
- this.layer.off('remapping', this.mapping);
188
- }
189
- registerBuiltinAttributes() {
190
- // 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 20层级以上出现数据偏移
191
- this.registerPosition64LowAttribute();
192
- this.styleAttributeService.registerStyleAttribute({
193
- name: 'textOffsets',
194
- type: AttributeType.Attribute,
195
- descriptor: {
196
- shaderLocation: this.attributeLocation.TEXT_OFFSETS,
197
- name: 'a_textOffsets',
198
- // 文字偏移量
199
- buffer: {
200
- // give the WebGL driver a hint that this buffer may change
201
- usage: gl.STATIC_DRAW,
202
- data: [],
203
- type: gl.FLOAT
204
- },
205
- size: 2,
206
- update: (feature, featureIdx, vertex) => {
207
- return [vertex[5], vertex[6]];
208
- }
209
- }
210
- });
211
- this.styleAttributeService.registerStyleAttribute({
212
- name: 'textUv',
213
- type: AttributeType.Attribute,
214
- descriptor: {
215
- name: 'a_tex',
216
- shaderLocation: this.attributeLocation.UV,
217
- buffer: {
218
- usage: gl.DYNAMIC_DRAW,
219
- data: [],
220
- type: gl.FLOAT
221
- },
222
- size: 2,
223
- update: (feature, featureIdx, vertex) => {
224
- return [vertex[3], vertex[4]];
225
- }
226
- }
227
- });
228
-
229
- // point layer size;
230
- this.styleAttributeService.registerStyleAttribute({
231
- name: 'size',
232
- type: AttributeType.Attribute,
233
- descriptor: {
234
- name: 'a_Size',
235
- shaderLocation: this.attributeLocation.SIZE,
236
- buffer: {
237
- // give the WebGL driver a hint that this buffer may change
238
- usage: gl.DYNAMIC_DRAW,
239
- data: [],
240
- type: gl.FLOAT
241
- },
242
- size: 1,
243
- update: feature => {
244
- const {
245
- size = 12
246
- } = feature;
247
- return Array.isArray(size) ? [size[0]] : [size];
248
- }
249
- }
250
- });
251
- }
252
- bindEvent() {
253
- if (!this.layer.isTileLayer) {
254
- // 重新绑定
255
- this.layer.on('remapping', this.mapping);
256
- }
257
- }
258
- textExtent() {
259
- const bounds = this.mapService.getBounds();
260
- return padBounds(bounds, 0.5);
261
- }
262
- /**
263
- * 生成文字纹理(生成文字纹理字典)
264
- */
265
- initTextFont() {
266
- const {
267
- fontWeight,
268
- fontFamily
269
- } = this.getTextStyle();
270
- const data = this.rawEncodeData;
271
- const characterSet = [];
272
- data.forEach(item => {
273
- let {
274
- shape = ''
275
- } = item;
276
- shape = shape.toString();
277
- for (const char of shape) {
278
- // 去重
279
- if (characterSet.indexOf(char) === -1) {
280
- characterSet.push(char);
281
- }
282
- }
283
- });
284
- this.fontService.setFontOptions({
285
- characterSet,
286
- fontWeight,
287
- fontFamily,
288
- iconfont: false
289
- });
290
- }
291
-
292
- /**
293
- * 生成 iconfont 纹理字典
294
- */
295
- initIconFontTex() {
296
- const {
297
- fontWeight,
298
- fontFamily
299
- } = this.getTextStyle();
300
- const data = this.rawEncodeData;
301
- const characterSet = [];
302
- data.forEach(item => {
303
- let {
304
- shape = ''
305
- } = item;
306
- shape = `${shape}`;
307
- if (characterSet.indexOf(shape) === -1) {
308
- characterSet.push(shape);
309
- }
310
- });
311
- this.fontService.setFontOptions({
312
- characterSet,
313
- fontWeight,
314
- fontFamily,
315
- iconfont: true
316
- });
317
- }
318
- getTextStyle() {
319
- const {
320
- fontWeight = '400',
321
- fontFamily = 'sans-serif',
322
- textAllowOverlap = false,
323
- padding = [0, 0],
324
- textAnchor = 'center',
325
- textOffset = [0, 0],
326
- opacity = 1,
327
- strokeOpacity = 1,
328
- strokeWidth = 0,
329
- stroke = '#000'
330
- } = this.layer.getLayerConfig();
331
- return {
332
- fontWeight,
333
- fontFamily,
334
- textAllowOverlap,
335
- padding,
336
- textAnchor,
337
- textOffset,
338
- opacity,
339
- strokeOpacity,
340
- strokeWidth,
341
- stroke
342
- };
343
- }
344
-
345
- /**
346
- * 生成文字布局(对照文字纹理字典提取对应文字的位置很好信息)
347
- */
348
- generateGlyphLayout(iconfont) {
349
- const mapping = this.getFontServiceMapping();
350
- const {
351
- spacing = 2,
352
- textAnchor = 'center',
353
- textOffset
354
- } = this.layer.getLayerConfig();
355
- const data = this.rawEncodeData;
356
- this.glyphInfo = data.map(feature => {
357
- const {
358
- shape = '',
359
- id,
360
- size = 1
361
- } = feature;
362
- const offset = feature.textOffset ? feature.textOffset : textOffset || [0, 0];
363
- const anchor = feature.textAnchor ? feature.textAnchor : textAnchor || 'center';
364
- const shaping = shapeText(shape.toString(), mapping,
365
- // @ts-ignore
366
- size, anchor, 'left', spacing, offset,
367
- //
368
- iconfont);
369
- const glyphQuads = getGlyphQuads(shaping, offset, false);
370
- feature.shaping = shaping;
371
- feature.glyphQuads = glyphQuads;
372
- // feature.centroid = calculteCentroid(coordinates);
373
-
374
- feature.centroid = calculateCentroid(feature.coordinates);
375
- this.glyphInfoMap[id] = {
376
- shaping,
377
- glyphQuads,
378
- centroid: calculateCentroid(feature.coordinates)
379
- };
380
- return feature;
381
- });
382
- }
383
- getFontServiceMapping() {
384
- const {
385
- fontWeight = '400',
386
- fontFamily = 'sans-serif'
387
- } = this.layer.getLayerConfig();
388
- return this.fontService.getMappingByKey(`${fontFamily}_${fontWeight}`);
389
- }
390
- getFontServiceCanvas() {
391
- const {
392
- fontWeight = '400',
393
- fontFamily = 'sans-serif'
394
- } = this.layer.getLayerConfig();
395
- // 更新文字布局
396
- return this.fontService.getCanvasByKey(`${fontFamily}_${fontWeight}`);
397
- }
398
-
399
- /**
400
- * 文字避让 depend on originCentorid
401
- */
402
- filterGlyphs() {
403
- const {
404
- padding = [0, 0],
405
- textAllowOverlap = false
406
- } = this.layer.getLayerConfig();
407
- if (textAllowOverlap) {
408
- // 如果允许文本覆盖
409
- return;
410
- }
411
- this.glyphInfoMap = {};
412
- this.currentZoom = this.mapService.getZoom();
413
- this.extent = this.textExtent();
414
- const {
415
- width,
416
- height
417
- } = this.rendererService.getViewportSize();
418
- const collisionIndex = new CollisionIndex(width, height);
419
- const filterData = this.glyphInfo.filter(feature => {
420
- const {
421
- shaping,
422
- id = 0
423
- } = feature;
424
- const centroid = feature.centroid;
425
- const size = feature.size;
426
- const fontScale = size / 16;
427
- const pixels = this.mapService.lngLatToContainer(centroid);
428
- const {
429
- box
430
- } = collisionIndex.placeCollisionBox({
431
- x1: shaping.left * fontScale - padding[0],
432
- x2: shaping.right * fontScale + padding[0],
433
- y1: shaping.top * fontScale - padding[1],
434
- y2: shaping.bottom * fontScale + padding[1],
435
- anchorPointX: pixels.x,
436
- anchorPointY: pixels.y
437
- });
438
- if (box && box.length) {
439
- collisionIndex.insertCollisionBox(box, id);
440
- return true;
441
- } else {
442
- return false;
443
- }
444
- });
445
- filterData.forEach(item => {
446
- // @ts-ignore
447
- this.glyphInfoMap[item.id] = item;
448
- });
449
- // this.layer.setEncodedData(filterData);
450
- }
451
- /**
452
- * 初始化文字布局
453
- */
454
- initGlyph() {
455
- const {
456
- iconfont = false
457
- } = this.layer.getLayerConfig();
458
- // 1.生成文字纹理(或是生成 iconfont)
459
- iconfont ? this.initIconFontTex() : this.initTextFont();
460
- // 2.生成文字布局
461
- this.generateGlyphLayout(iconfont);
462
- }
463
- /**
464
- * 更新文字纹理
465
- */
466
- updateTexture() {
467
- const {
468
- createTexture2D
469
- } = this.rendererService;
470
- const canvas = this.getFontServiceCanvas();
471
- this.textureHeight = canvas.height;
472
- if (this.texture) {
473
- this.texture.destroy();
474
- }
475
- this.texture = createTexture2D({
476
- data: canvas,
477
- mag: gl.LINEAR,
478
- min: gl.LINEAR,
479
- width: canvas.width,
480
- height: canvas.height
481
- });
482
- this.textures = [this.texture];
483
- }
484
- reBuildModel() {
485
- var _this5 = this;
486
- return _asyncToGenerator(function* () {
487
- _this5.filterGlyphs();
488
- const model = yield _this5.layer.buildLayerModel({
489
- moduleName: 'pointText',
490
- vertexShader: textVert,
491
- fragmentShader: textFrag,
492
- triangulation: TextTrianglation.bind(_this5),
493
- defines: _this5.getDefines(),
494
- inject: _this5.getInject(),
495
- depth: {
496
- enable: false
497
- }
498
- });
499
- // TODO 渲染流程待修改
500
- _this5.layer.models = [model];
501
- })();
502
- }
503
- }
@@ -1,48 +0,0 @@
1
- layout(std140) uniform commonUniorm {
2
- vec4 u_stroke_color;
3
- float u_additive;
4
- float u_stroke_opacity;
5
- float u_stroke_width;
6
- };
7
-
8
- in vec4 v_color;
9
- in float v_blur;
10
- in float v_innerRadius;
11
-
12
- out vec4 outputColor;
13
-
14
- #pragma include "picking"
15
- void main() {
16
- vec2 center = vec2(0.5);
17
-
18
- // Tip: 片元到中心点的距离 0 - 1
19
- float fragmengTocenter = distance(center, gl_PointCoord) * 2.0;
20
- // Tip: 片元的剪切成圆形
21
- float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter);
22
-
23
- if (v_innerRadius < 0.99) {
24
- // 当存在 stroke 且 stroke > 0.01
25
- float blurWidth = (1.0 - v_blur) / 2.0;
26
- vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity);
27
- if (fragmengTocenter > v_innerRadius + blurWidth) {
28
- outputColor = stroke;
29
- } else if (fragmengTocenter > v_innerRadius - blurWidth) {
30
- float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0);
31
- outputColor = mix(v_color, stroke, mixR);
32
- } else {
33
- outputColor = v_color;
34
- }
35
- } else {
36
- // 当不存在 stroke 或 stroke <= 0.01
37
- outputColor = v_color;
38
- }
39
-
40
- outputColor = filterColor(outputColor);
41
-
42
- if (u_additive > 0.0) {
43
- outputColor *= circleClipOpacity;
44
- } else {
45
- outputColor.a *= circleClipOpacity;
46
- }
47
-
48
- }
@@ -1,33 +0,0 @@
1
-
2
- layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;
3
- layout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;
4
- layout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;
5
- layout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;
6
-
7
- layout(std140) uniform commonUniorm {
8
- vec4 u_stroke_color;
9
- float u_additive;
10
- float u_stroke_opacity;
11
- float u_stroke_width;
12
- };
13
-
14
- out vec4 v_color;
15
- out float v_blur;
16
- out float v_innerRadius;
17
-
18
- #pragma include "projection"
19
- #pragma include "picking"
20
- #pragma include "project"
21
- void main() {
22
- v_color = vec4(a_Color.xyz, a_Color.w * opacity);
23
- v_blur = 1.0 - max(2.0 / a_Size, 0.05);
24
- v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0);
25
-
26
- vec2 offset = project_pixel(u_offsets);
27
-
28
- vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);
29
- gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w));
30
-
31
- gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
32
- setPickingColor(a_PickingColor);
33
- }
@@ -1,36 +0,0 @@
1
- precision highp float;
2
- in vec4 v_color;
3
-
4
- #pragma include "picking"
5
-
6
- layout(std140) uniform commonUniform {
7
- vec4 u_sourceColor;
8
- vec4 u_targetColor;
9
- float u_linearColor: 0;
10
- float u_heightfixed: 0.0; // 默认不固定
11
- float u_globel;
12
- float u_r;
13
- float u_pickLight: 0.0;
14
- float u_opacitylinear: 0.0;
15
- float u_opacitylinear_dir: 1.0;
16
- float u_lightEnable: 1.0;
17
- };
18
- in float v_lightWeight;
19
- in float v_barLinearZ;
20
- out vec4 outputColor;
21
- void main() {
22
-
23
- outputColor = v_color;
24
-
25
- // 开启透明度渐变
26
- if(u_opacitylinear > 0.0) {
27
- outputColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - v_barLinearZ): v_barLinearZ;
28
- }
29
-
30
- // picking
31
- if(u_pickLight > 0.0) {
32
- outputColor = filterColorAlpha(outputColor, v_lightWeight);
33
- } else {
34
- outputColor = filterColor(outputColor);
35
- }
36
- }