@antv/l7-layers 2.25.6 → 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,248 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import { AttributeType, gl } from '@antv/l7-core';
5
- import { rgb2arr } from '@antv/l7-utils';
6
- import BaseModel from "../../core/BaseModel";
7
- import { PolygonExtrudeTriangulation } from "../../core/triangulation";
8
- import { loadImage } from "../../utils/load-image";
9
- /* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_frag.glsl' */
10
- const polygonExtrudeFrag = "layout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nin vec4 v_Color;\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\nout vec4 outputColor;\nvoid main() {\n // top face\n if (u_topsurface < 1.0) {\n discard;\n }\n\n outputColor = v_Color;\n\n outputColor = filterColor(outputColor);\n}\n";
11
- /* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_picklight_frag.glsl' */
12
- const polygonExtrudePickLightFrag = "layout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nin vec4 v_Color;\nin vec3 v_uvs;\nin vec2 v_texture_data;\nout vec4 outputColor;\n\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\n\nvoid main() {\n float isSide = v_texture_data.x;\n float sidey = v_uvs[2];\n float lightWeight = v_texture_data.y;\n\n // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9\n if (isSide < 0.999) {\n // side face\n if (u_sidesurface < 1.0) {\n discard;\n }\n\n if (u_linearColor == 1.0) {\n // side use linear\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n outputColor = linearColor;\n } else {\n // side notuse linear\n outputColor = v_Color;\n }\n } else {\n // top face\n if (u_topsurface < 1.0) {\n discard;\n }\n outputColor = v_Color;\n }\n\n outputColor = filterColorAlpha(outputColor, lightWeight);\n}\n";
13
- /* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_picklight_vert.glsl' */
14
- const polygonExtrudePickLightVert = "layout(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_NORMAL) in vec3 a_Normal;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec3 a_uvs;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nout vec4 v_Color;\nout vec3 v_uvs;\nout vec2 v_texture_data;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n v_uvs = a_uvs;\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n vec4 project_pos = project_position(pos, a_Position64Low);\n\n if (u_heightfixed > 0.0) {\n // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n if (\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n ) {\n float mapboxZoomScale = 4.0 / pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n float lightWeight = calc_lighting(project_pos);\n v_texture_data = vec2(a_Position.z, lightWeight);\n\n v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity);\n\n setPickingColor(a_PickingColor);\n}\n";
15
- /* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_vert.glsl' */
16
- const polygonExtrudeVert = "layout(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_NORMAL) in vec3 a_Normal;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec3 a_uvs;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nout vec4 v_Color;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n float isSide = a_Position.z;\n float topU = a_uvs[0];\n float topV = 1.0 - a_uvs[1];\n float sidey = a_uvs[2];\n\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n\n vec4 project_pos = project_position(pos, a_Position64Low);\n float lightWeight = calc_lighting(project_pos);\n\n if (u_heightfixed > 0.0) {\n // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n\n if (\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n ) {\n float mapboxZoomScale = 4.0 / pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9\n if (isSide < 0.999) {\n // side face\n // if(u_sidesurface < 1.0) {\n // discard;\n // }\n\n if (u_linearColor == 1.0) {\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n v_Color = linearColor;\n } else {\n v_Color = a_Color;\n }\n\n } else {\n v_Color = a_Color;\n }\n\n v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity);\n\n setPickingColor(a_PickingColor);\n}\n";
17
- /* babel-plugin-inline-import '../shaders/extrude/polygon_extrudetex_frag.glsl' */
18
- const polygonExtrudeTexFrag = "uniform sampler2D u_texture;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nin vec4 v_Color;\nin vec3 v_uvs;\nin vec2 v_texture_data;\n\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\n\nout vec4 outputColor;\n\nvoid main() {\n float opacity = u_opacity;\n float isSide = v_texture_data.x;\n float lightWeight = v_texture_data.y;\n float topU = v_uvs[0];\n float topV = 1.0 - v_uvs[1];\n float sidey = v_uvs[2];\n\n outputColor = texture(SAMPLER_2D(u_texture), vec2(topU, topV));\n // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9\n if (isSide < 0.999) {\n // \u662F\u5426\u662F\u8FB9\u7F18\n // side face\n if (u_sidesurface < 1.0) {\n discard;\n }\n\n if (u_linearColor == 1.0) {\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n outputColor = linearColor;\n } else {\n outputColor = v_Color;\n }\n } else {\n // top face\n if (u_topsurface < 1.0) {\n discard;\n }\n }\n\n outputColor.a *= opacity;\n outputColor = filterColor(outputColor);\n}\n";
19
- /* babel-plugin-inline-import '../shaders/extrude/polygon_extrudetex_vert.glsl' */
20
- const polygonExtrudeTexVert = "layout(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_NORMAL) in vec3 a_Normal;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec3 a_uvs;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nout vec4 v_Color;\nout vec3 v_uvs;\nout vec2 v_texture_data;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n vec4 project_pos = project_position(pos, a_Position64Low);\n float lightWeight = calc_lighting(project_pos);\n v_uvs = a_uvs;\n v_Color = a_Color;\n v_Color.a *= opacity;\n\n v_texture_data = vec2(a_Position.z, lightWeight);\n\n if (u_heightfixed > 0.0) {\n // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n\n if (\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n ) {\n float mapboxZoomScale = 4.0 / pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n setPickingColor(a_PickingColor);\n}\n";
21
- export default class ExtrudeModel extends BaseModel {
22
- constructor(...args) {
23
- super(...args);
24
- _defineProperty(this, "texture", void 0);
25
- }
26
- get attributeLocation() {
27
- return Object.assign(super.attributeLocation, {
28
- MAX: super.attributeLocation.MAX,
29
- SIZE: 9,
30
- NORMAL: 10,
31
- UV: 11
32
- });
33
- }
34
- getUninforms() {
35
- const commoninfo = this.getCommonUniformsInfo();
36
- const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
37
- this.updateStyleUnifoms();
38
- return _objectSpread(_objectSpread({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
39
- }
40
- getCommonUniformsInfo() {
41
- const {
42
- mapTexture,
43
- heightfixed = false,
44
- raisingHeight = 0,
45
- topsurface = true,
46
- sidesurface = true,
47
- sourceColor,
48
- targetColor
49
- } = this.layer.getLayerConfig();
50
-
51
- // 转化渐变色
52
- let useLinearColor = 0; // 默认不生效
53
- let sourceColorArr = [1, 1, 1, 1];
54
- let targetColorArr = [1, 1, 1, 1];
55
- if (sourceColor && targetColor) {
56
- sourceColorArr = rgb2arr(sourceColor);
57
- targetColorArr = rgb2arr(targetColor);
58
- useLinearColor = 1;
59
- }
60
- const commonOptions = {
61
- u_sourceColor: sourceColorArr,
62
- u_targetColor: targetColorArr,
63
- u_linearColor: useLinearColor,
64
- // 控制侧面和顶面的显示隐藏
65
- u_topsurface: Number(topsurface),
66
- u_sidesurface: Number(sidesurface),
67
- u_heightfixed: Number(heightfixed),
68
- u_raisingHeight: Number(raisingHeight)
69
- };
70
- if (mapTexture && this.texture) {
71
- // @ts-ignore
72
- commonOptions.u_texture = this.texture;
73
- this.textures = [this.texture];
74
- }
75
- const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
76
- return commonBufferInfo;
77
- }
78
- initModels() {
79
- var _this = this;
80
- return _asyncToGenerator(function* () {
81
- yield _this.loadTexture();
82
- return _this.buildModels();
83
- })();
84
- }
85
- buildModels() {
86
- var _this2 = this;
87
- return _asyncToGenerator(function* () {
88
- const {
89
- frag,
90
- vert,
91
- type
92
- } = _this2.getShaders();
93
- _this2.initUniformsBuffer();
94
- const model = yield _this2.layer.buildLayerModel({
95
- moduleName: type,
96
- vertexShader: vert,
97
- fragmentShader: frag,
98
- depth: {
99
- enable: true
100
- },
101
- defines: _this2.getDefines(),
102
- inject: _this2.getInject(),
103
- triangulation: PolygonExtrudeTriangulation
104
- });
105
- return [model];
106
- })();
107
- }
108
- getShaders() {
109
- const {
110
- pickLight,
111
- mapTexture
112
- } = this.layer.getLayerConfig();
113
- if (mapTexture) {
114
- return {
115
- frag: polygonExtrudeTexFrag,
116
- vert: polygonExtrudeTexVert,
117
- type: 'polygonExtrudeTexture'
118
- };
119
- }
120
- if (pickLight) {
121
- return {
122
- frag: polygonExtrudePickLightFrag,
123
- vert: polygonExtrudePickLightVert,
124
- type: 'polygonExtrudePickLight'
125
- };
126
- } else {
127
- return {
128
- frag: polygonExtrudeFrag,
129
- vert: polygonExtrudeVert,
130
- type: 'polygonExtrude'
131
- };
132
- }
133
- }
134
- clearModels() {
135
- var _this$texture;
136
- (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
137
- this.textures = [];
138
- }
139
- registerBuiltinAttributes() {
140
- // 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
141
- this.registerPosition64LowAttribute();
142
- this.styleAttributeService.registerStyleAttribute({
143
- name: 'uvs',
144
- type: AttributeType.Attribute,
145
- descriptor: {
146
- name: 'a_uvs',
147
- shaderLocation: this.attributeLocation.UV,
148
- buffer: {
149
- // give the WebGL driver a hint that this buffer may change
150
- usage: gl.STATIC_DRAW,
151
- data: [],
152
- type: gl.FLOAT
153
- },
154
- size: 3,
155
- update: (feature, featureIdx, vertex) => {
156
- // 当启用 enableRelativeCoordinates 时:
157
- // - vertex 是相对坐标(相对于 relativeOrigin 的偏移)
158
- // - 需要将相对坐标转换回绝对坐标后,用 originalExtent 计算 UV
159
- const originalExtent = this.layer.getOriginalExtent();
160
- const relativeOrigin = this.layer.getRelativeOrigin();
161
- const isRelativeCoordinates = originalExtent[0] !== 0 || originalExtent[2] !== 0;
162
- let lng, lat;
163
- let minLng, minLat, maxLng, maxLat;
164
- if (isRelativeCoordinates && relativeOrigin) {
165
- // 相对坐标模式:转换回绝对坐标
166
- lng = vertex[0] + relativeOrigin[0];
167
- lat = vertex[1] + relativeOrigin[1];
168
- [minLng, minLat, maxLng, maxLat] = originalExtent;
169
- } else {
170
- // 绝对坐标模式
171
- lng = vertex[0];
172
- lat = vertex[1];
173
- [minLng, minLat, maxLng, maxLat] = this.layer.getSource().extent;
174
- }
175
- const lngLen = maxLng - minLng;
176
- const latLen = maxLat - minLat;
177
- // 临时 兼容高德V2
178
- return [(lng - minLng) / lngLen, (lat - minLat) / latLen, vertex[4]];
179
- }
180
- }
181
- });
182
- this.styleAttributeService.registerStyleAttribute({
183
- name: 'normal',
184
- type: AttributeType.Attribute,
185
- descriptor: {
186
- name: 'a_Normal',
187
- shaderLocation: this.attributeLocation.NORMAL,
188
- buffer: {
189
- // give the WebGL driver a hint that this buffer may change
190
- usage: gl.STATIC_DRAW,
191
- data: [],
192
- type: gl.FLOAT
193
- },
194
- size: 3,
195
- update: (feature, featureIdx, vertex, attributeIdx, normal) => {
196
- return normal;
197
- }
198
- }
199
- });
200
- this.styleAttributeService.registerStyleAttribute({
201
- name: 'size',
202
- type: AttributeType.Attribute,
203
- descriptor: {
204
- name: 'a_Size',
205
- shaderLocation: this.attributeLocation.SIZE,
206
- buffer: {
207
- usage: gl.DYNAMIC_DRAW,
208
- data: [],
209
- type: gl.FLOAT
210
- },
211
- size: 1,
212
- update: feature => {
213
- const {
214
- size = 10
215
- } = feature;
216
- return Array.isArray(size) ? [size[0]] : [size];
217
- }
218
- }
219
- });
220
- }
221
- loadTexture() {
222
- var _this3 = this;
223
- return _asyncToGenerator(function* () {
224
- const {
225
- mapTexture
226
- } = _this3.layer.getLayerConfig();
227
- const {
228
- createTexture2D
229
- } = _this3.rendererService;
230
- _this3.texture = createTexture2D({
231
- height: 1,
232
- width: 1
233
- });
234
- if (mapTexture) {
235
- const image = yield loadImage(mapTexture);
236
- _this3.texture = createTexture2D({
237
- data: image,
238
- width: image.width,
239
- height: image.height,
240
- wrapS: gl.CLAMP_TO_EDGE,
241
- wrapT: gl.CLAMP_TO_EDGE,
242
- min: gl.LINEAR,
243
- mag: gl.LINEAR
244
- });
245
- }
246
- })();
247
- }
248
- }
@@ -1,40 +0,0 @@
1
- import type { IModel, ITexture2D } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class ExtrusionModel extends BaseModel {
4
- protected get attributeLocation(): {
5
- readonly POSITION: 0;
6
- readonly POSITION_64LOW: 1;
7
- readonly COLOR: 2;
8
- readonly PICKING_COLOR: 3;
9
- readonly STROKE: 4;
10
- readonly OPACITY: 5;
11
- readonly OFFSETS: 6;
12
- readonly ROTATION: 7;
13
- readonly MAX: 8;
14
- } & Record<string, number> & {
15
- MAX: 8;
16
- SIZE: number;
17
- NORMAL: number;
18
- EXTRUSION_BASE: number;
19
- };
20
- protected texture: ITexture2D;
21
- getUninforms(): {
22
- [x: string]: any;
23
- };
24
- protected getCommonUniformsInfo(): {
25
- uniformsArray: number[];
26
- uniformsLength: number;
27
- uniformsOption: {
28
- [key: string]: any;
29
- };
30
- };
31
- initModels(): Promise<IModel[]>;
32
- buildModels(): Promise<IModel[]>;
33
- getShaders(): {
34
- frag: string;
35
- vert: string;
36
- type: string;
37
- };
38
- clearModels(): void;
39
- protected registerBuiltinAttributes(): void;
40
- }
@@ -1,137 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import { AttributeType, gl } from '@antv/l7-core';
5
- import BaseModel from "../../core/BaseModel";
6
- import { PolygonExtrudeTriangulation } from "../../core/triangulation";
7
- /* babel-plugin-inline-import '../shaders/extrusion/polygon_extrusion_frag.glsl' */
8
- const polygonExtrudeFrag = "in vec4 v_Color;\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\nout vec4 outputColor;\nvoid main() {\n outputColor = v_Color;\n outputColor = filterColor(outputColor);\n}\n";
9
- /* babel-plugin-inline-import '../shaders/extrusion/polygon_extrusion_vert.glsl' */
10
- const polygonExtrudeVert = "layout(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_NORMAL) in vec3 a_Normal;\n\nout vec4 v_Color;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size + (1.0 - a_Position.z) * extrusionBase, 1.0);\n\n vec4 project_pos = project_position(pos, a_Position64Low);\n float lightWeight = calc_lighting(project_pos);\n v_Color = a_Color;\n v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity);\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n setPickingColor(a_PickingColor);\n}\n";
11
- export default class ExtrusionModel extends BaseModel {
12
- constructor(...args) {
13
- super(...args);
14
- _defineProperty(this, "texture", void 0);
15
- }
16
- get attributeLocation() {
17
- return Object.assign(super.attributeLocation, {
18
- MAX: super.attributeLocation.MAX,
19
- SIZE: 9,
20
- NORMAL: 10,
21
- EXTRUSION_BASE: 11
22
- });
23
- }
24
- getUninforms() {
25
- const commoninfo = this.getCommonUniformsInfo();
26
- const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
27
- this.updateStyleUnifoms();
28
- return _objectSpread(_objectSpread({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
29
- }
30
- getCommonUniformsInfo() {
31
- const commonOptions = {};
32
- const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
33
- return commonBufferInfo;
34
- }
35
- initModels() {
36
- var _this = this;
37
- return _asyncToGenerator(function* () {
38
- return _this.buildModels();
39
- })();
40
- }
41
- buildModels() {
42
- var _this2 = this;
43
- return _asyncToGenerator(function* () {
44
- const {
45
- frag,
46
- vert,
47
- type
48
- } = _this2.getShaders();
49
- _this2.initUniformsBuffer();
50
- const model = yield _this2.layer.buildLayerModel({
51
- moduleName: type,
52
- vertexShader: vert,
53
- fragmentShader: frag,
54
- defines: _this2.getDefines(),
55
- inject: _this2.getInject(),
56
- triangulation: PolygonExtrudeTriangulation,
57
- depth: {
58
- enable: true
59
- }
60
- });
61
- return [model];
62
- })();
63
- }
64
- getShaders() {
65
- return {
66
- frag: polygonExtrudeFrag,
67
- vert: polygonExtrudeVert,
68
- type: 'polygonExtrude'
69
- };
70
- }
71
- clearModels() {
72
- var _this$texture;
73
- (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
74
- }
75
- registerBuiltinAttributes() {
76
- // 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
77
- this.registerPosition64LowAttribute();
78
- this.styleAttributeService.registerStyleAttribute({
79
- name: 'normal',
80
- type: AttributeType.Attribute,
81
- descriptor: {
82
- name: 'a_Normal',
83
- shaderLocation: this.attributeLocation.NORMAL,
84
- buffer: {
85
- // give the WebGL driver a hint that this buffer may change
86
- usage: gl.STATIC_DRAW,
87
- data: [],
88
- type: gl.FLOAT
89
- },
90
- size: 3,
91
- update: (feature, featureIdx, vertex, attributeIdx, normal) => {
92
- return normal;
93
- }
94
- }
95
- });
96
- this.styleAttributeService.registerStyleAttribute({
97
- name: 'size',
98
- type: AttributeType.Attribute,
99
- descriptor: {
100
- name: 'a_Size',
101
- shaderLocation: this.attributeLocation.SIZE,
102
- buffer: {
103
- usage: gl.DYNAMIC_DRAW,
104
- data: [],
105
- type: gl.FLOAT
106
- },
107
- size: 1,
108
- update: feature => {
109
- const {
110
- size = 10
111
- } = feature;
112
- return Array.isArray(size) ? [size[0]] : [size];
113
- }
114
- }
115
- });
116
- this.styleAttributeService.registerStyleAttribute({
117
- name: 'extrusionBase',
118
- type: AttributeType.Attribute,
119
- descriptor: {
120
- name: 'a_ExtrusionBase',
121
- shaderLocation: this.attributeLocation.EXTRUSION_BASE,
122
- buffer: {
123
- usage: gl.STATIC_DRAW,
124
- data: [],
125
- type: gl.FLOAT
126
- },
127
- size: 1,
128
- update: feature => {
129
- const {
130
- extrusionBase: op = 0
131
- } = feature;
132
- return [op];
133
- }
134
- }
135
- });
136
- }
137
- }
@@ -1,32 +0,0 @@
1
- import type { IModel } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class FillModel extends BaseModel {
4
- protected get attributeLocation(): {
5
- readonly POSITION: 0;
6
- readonly POSITION_64LOW: 1;
7
- readonly COLOR: 2;
8
- readonly PICKING_COLOR: 3;
9
- readonly STROKE: 4;
10
- readonly OPACITY: 5;
11
- readonly OFFSETS: 6;
12
- readonly ROTATION: 7;
13
- readonly MAX: 8;
14
- } & Record<string, number> & {
15
- MAX: 8;
16
- LINEAR: number;
17
- };
18
- getUninforms(): {
19
- [x: string]: any;
20
- };
21
- protected getCommonUniformsInfo(): {
22
- uniformsArray: number[];
23
- uniformsLength: number;
24
- uniformsOption: {
25
- [key: string]: any;
26
- };
27
- };
28
- initModels(): Promise<IModel[]>;
29
- buildModels(): Promise<IModel[]>;
30
- protected registerBuiltinAttributes(): void;
31
- private getModelParams;
32
- }
@@ -1,127 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import { AttributeType, gl } from '@antv/l7-core';
4
- import BaseModel from "../../core/BaseModel";
5
- import { polygonTriangulation, polygonTriangulationWithCenter } from "../../core/triangulation";
6
- /* babel-plugin-inline-import '../shaders/fill/fill_frag.glsl' */
7
- const polygon_frag = "in vec4 v_color;\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\nout vec4 outputColor;\nvoid main() {\n outputColor = v_color;\n outputColor = filterColor(outputColor);\n}\n";
8
- /* babel-plugin-inline-import '../shaders/fill/fill_linear_frag.glsl' */
9
- const polygon_linear_frag = "layout(std140) uniform commonUniforms {\n float u_raisingHeight;\n float u_opacitylinear;\n float u_dir;\n};\n\nin vec4 v_color;\nin vec3 v_linear;\nin vec2 v_pos;\nout vec4 outputColor;\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\n\nvoid main() {\n outputColor = v_color;\n if (u_opacitylinear > 0.0) {\n outputColor.a *=\n u_dir == 1.0\n ? 1.0 - length(v_pos - v_linear.xy) / v_linear.z\n : length(v_pos - v_linear.xy) / v_linear.z;\n }\n outputColor = filterColor(outputColor);\n}\n";
10
- /* babel-plugin-inline-import '../shaders/fill/fill_linear_vert.glsl' */
11
- const polygon_linear_vert = "layout(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_LINEAR) in vec3 a_linear;\n\nlayout(std140) uniform commonUniforms {\n float u_raisingHeight;\n float u_opacitylinear;\n float u_dir;\n};\n\nout vec4 v_color;\nout vec3 v_linear;\nout vec2 v_pos;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvoid main() {\n if (u_opacitylinear > 0.0) {\n v_linear = a_linear;\n v_pos = a_Position.xy;\n }\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n project_pos.z += u_raisingHeight;\n\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 project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n setPickingColor(a_PickingColor);\n}\n";
12
- /* babel-plugin-inline-import '../shaders/fill/fill_vert.glsl' */
13
- const polygon_vert = "layout(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;\n\nlayout(std140) uniform commonUniforms {\n float u_raisingHeight;\n};\n\nout vec4 v_color;\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\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n\n project_pos.z += u_raisingHeight;\n\n if (\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n ) {\n float mapboxZoomScale = 4.0 / pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n setPickingColor(a_PickingColor);\n}\n\n";
14
- export default class FillModel extends BaseModel {
15
- get attributeLocation() {
16
- return Object.assign(super.attributeLocation, {
17
- MAX: super.attributeLocation.MAX,
18
- LINEAR: 9
19
- });
20
- }
21
- getUninforms() {
22
- const commoninfo = this.getCommonUniformsInfo();
23
- const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
24
- this.updateStyleUnifoms();
25
- return _objectSpread(_objectSpread({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
26
- }
27
- getCommonUniformsInfo() {
28
- const {
29
- raisingHeight = 0,
30
- opacityLinear = {
31
- enable: false,
32
- dir: 'in'
33
- }
34
- } = this.layer.getLayerConfig();
35
- const commonOptions = {
36
- u_raisingHeight: Number(raisingHeight),
37
- u_opacitylinear: Number(opacityLinear.enable),
38
- u_dir: opacityLinear.dir === 'in' ? 1.0 : 0.0
39
- };
40
- const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
41
- return commonBufferInfo;
42
- }
43
- initModels() {
44
- var _this = this;
45
- return _asyncToGenerator(function* () {
46
- return _this.buildModels();
47
- })();
48
- }
49
- buildModels() {
50
- var _this2 = this;
51
- return _asyncToGenerator(function* () {
52
- const {
53
- frag,
54
- vert,
55
- triangulation,
56
- type
57
- } = _this2.getModelParams();
58
- _this2.initUniformsBuffer();
59
- _this2.layer.triangulation = triangulation;
60
- const model = yield _this2.layer.buildLayerModel({
61
- moduleName: type,
62
- vertexShader: vert,
63
- fragmentShader: frag,
64
- defines: _this2.getDefines(),
65
- inject: _this2.getInject(),
66
- triangulation,
67
- primitive: gl.TRIANGLES,
68
- depth: {
69
- enable: false
70
- }
71
- });
72
- return [model];
73
- })();
74
- }
75
- registerBuiltinAttributes() {
76
- // 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
77
- this.registerPosition64LowAttribute();
78
- const {
79
- opacityLinear = {
80
- enable: false,
81
- dir: 'in'
82
- }
83
- } = this.layer.getLayerConfig();
84
- if (opacityLinear.enable) {
85
- this.styleAttributeService.registerStyleAttribute({
86
- name: 'linear',
87
- type: AttributeType.Attribute,
88
- descriptor: {
89
- name: 'a_linear',
90
- shaderLocation: this.attributeLocation.LINEAR,
91
- buffer: {
92
- // give the WebGL driver a hint that this buffer may change
93
- usage: gl.STATIC_DRAW,
94
- data: [],
95
- type: gl.FLOAT
96
- },
97
- size: 3,
98
- update: (feature, featureIdx, vertex) => {
99
- return [vertex[3], vertex[4], vertex[5]];
100
- }
101
- }
102
- });
103
- }
104
- }
105
- getModelParams() {
106
- const {
107
- opacityLinear = {
108
- enable: false
109
- }
110
- } = this.layer.getLayerConfig();
111
- if (opacityLinear.enable) {
112
- return {
113
- frag: polygon_linear_frag,
114
- vert: polygon_linear_vert,
115
- type: 'polygonLinear',
116
- triangulation: polygonTriangulationWithCenter
117
- };
118
- } else {
119
- return {
120
- frag: polygon_frag,
121
- vert: polygon_vert,
122
- type: 'polygonFill',
123
- triangulation: polygonTriangulation
124
- };
125
- }
126
- }
127
- }
@@ -1,5 +0,0 @@
1
- export type PolygonModelType = 'fill' | 'extrude' | 'line' | 'point_fill' | 'point_image' | 'point_normal' | 'point_extrude' | 'text' | 'water' | 'ocean' | 'extrusion';
2
- declare const PolygonModels: {
3
- [key in PolygonModelType]: any;
4
- };
5
- export default PolygonModels;
@@ -1,26 +0,0 @@
1
- import LineModel from "../../line/models/line";
2
- import PointExtrudeModel from "../../point/models/extrude";
3
- import PointFillModel from "../../point/models/fill";
4
- import IMageModel from "../../point/models/image";
5
- import NormalModel from "../../point/models/normal";
6
- import TextModel from "../../point/models/text";
7
- import ExtrudeModel from "./extrude";
8
- import Extrusion from "./extrusion";
9
- import FillModel from "./fill";
10
- import Ocean from "./ocean";
11
- import Water from "./water";
12
- const PolygonModels = {
13
- fill: FillModel,
14
- line: LineModel,
15
- extrude: ExtrudeModel,
16
- text: TextModel,
17
- point_fill: PointFillModel,
18
- point_image: IMageModel,
19
- point_normal: NormalModel,
20
- point_extrude: PointExtrudeModel,
21
- water: Water,
22
- ocean: Ocean,
23
- extrusion: Extrusion
24
- // point_fill: PointModels.fill,
25
- };
26
- export default PolygonModels;
@@ -1,37 +0,0 @@
1
- import type { IModel, IModelUniform } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class OceanModel extends BaseModel {
4
- protected get attributeLocation(): {
5
- readonly POSITION: 0;
6
- readonly POSITION_64LOW: 1;
7
- readonly COLOR: 2;
8
- readonly PICKING_COLOR: 3;
9
- readonly STROKE: 4;
10
- readonly OPACITY: 5;
11
- readonly OFFSETS: 6;
12
- readonly ROTATION: 7;
13
- readonly MAX: 8;
14
- } & Record<string, number> & {
15
- MAX: 8;
16
- UV: number;
17
- };
18
- private texture1;
19
- private texture2;
20
- private texture3;
21
- getUninforms(): {
22
- [x: string]: any;
23
- };
24
- protected getCommonUniformsInfo(): {
25
- uniformsArray: number[];
26
- uniformsLength: number;
27
- uniformsOption: {
28
- [key: string]: any;
29
- };
30
- };
31
- getAnimateUniforms(): IModelUniform;
32
- initModels(): Promise<IModel[]>;
33
- buildModels(): Promise<IModel[]>;
34
- clearModels(): void;
35
- protected registerBuiltinAttributes(): void;
36
- private loadTexture;
37
- }