@antv/l7-layers 2.9.37-alpha.1 → 2.9.37-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/es/Geometry/index.d.ts +0 -23
- package/es/Geometry/index.js +0 -105
- package/es/Geometry/models/billboard.d.ts +0 -17
- package/es/Geometry/models/billboard.js +0 -215
- package/es/Geometry/models/index.d.ts +0 -5
- package/es/Geometry/models/index.js +0 -9
- package/es/Geometry/models/plane.d.ts +0 -36
- package/es/Geometry/models/plane.js +0 -406
- package/es/Geometry/models/sprite.d.ts +0 -38
- package/es/Geometry/models/sprite.js +0 -288
- package/es/Geometry/shaders/billboard_frag.glsl +0 -13
- package/es/Geometry/shaders/billboard_vert.glsl +0 -50
- package/es/Geometry/shaders/plane_frag.glsl +0 -22
- package/es/Geometry/shaders/plane_vert.glsl +0 -53
- package/es/Geometry/shaders/sprite_frag.glsl +0 -21
- package/es/Geometry/shaders/sprite_vert.glsl +0 -28
- package/es/canvas/index.d.ts +0 -14
- package/es/canvas/index.js +0 -108
- package/es/canvas/models/canvas.d.ts +0 -18
- package/es/canvas/models/canvas.js +0 -212
- package/es/canvas/models/index.d.ts +0 -5
- package/es/canvas/models/index.js +0 -5
- package/es/citybuliding/building.d.ts +0 -8
- package/es/citybuliding/building.js +0 -73
- package/es/citybuliding/models/build.d.ts +0 -22
- package/es/citybuliding/models/build.js +0 -187
- package/es/citybuliding/shaders/build_frag.glsl +0 -117
- package/es/citybuliding/shaders/build_vert.glsl +0 -54
- package/es/core/BaseLayer.d.ts +0 -225
- package/es/core/BaseLayer.js +0 -1439
- package/es/core/BaseModel.d.ts +0 -140
- package/es/core/BaseModel.js +0 -490
- package/es/core/interface.d.ts +0 -225
- package/es/core/interface.js +0 -30
- package/es/core/schema.d.ts +0 -27
- package/es/core/schema.js +0 -25
- package/es/core/shape/Path.d.ts +0 -39
- package/es/core/shape/Path.js +0 -62
- package/es/core/shape/extrude.d.ts +0 -17
- package/es/core/shape/extrude.js +0 -148
- package/es/core/triangulation.d.ts +0 -130
- package/es/core/triangulation.js +0 -552
- package/es/earth/index.d.ts +0 -22
- package/es/earth/index.js +0 -98
- package/es/earth/models/atmosphere.d.ts +0 -9
- package/es/earth/models/atmosphere.js +0 -135
- package/es/earth/models/base.d.ts +0 -16
- package/es/earth/models/base.js +0 -206
- package/es/earth/models/bloomsphere.d.ts +0 -9
- package/es/earth/models/bloomsphere.js +0 -134
- package/es/earth/shaders/atmosphere_frag.glsl +0 -17
- package/es/earth/shaders/atmosphere_vert.glsl +0 -26
- package/es/earth/shaders/base_frag.glsl +0 -13
- package/es/earth/shaders/base_vert.glsl +0 -52
- package/es/earth/shaders/bloomsphere_frag.glsl +0 -15
- package/es/earth/shaders/bloomsphere_vert.glsl +0 -20
- package/es/earth/utils.d.ts +0 -26
- package/es/earth/utils.js +0 -104
- package/es/glsl.d.ts +0 -5
- package/es/heatmap/index.d.ts +0 -12
- package/es/heatmap/index.js +0 -128
- package/es/heatmap/models/grid.d.ts +0 -8
- package/es/heatmap/models/grid.js +0 -106
- package/es/heatmap/models/grid3d.d.ts +0 -8
- package/es/heatmap/models/grid3d.js +0 -140
- package/es/heatmap/models/heatmap.d.ts +0 -24
- package/es/heatmap/models/heatmap.js +0 -461
- package/es/heatmap/models/hexagon.d.ts +0 -8
- package/es/heatmap/models/hexagon.js +0 -107
- package/es/heatmap/models/index.d.ts +0 -5
- package/es/heatmap/models/index.js +0 -12
- package/es/heatmap/shaders/grid_vert.glsl +0 -42
- package/es/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
- package/es/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
- package/es/heatmap/shaders/heatmap_frag.glsl +0 -47
- package/es/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
- package/es/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
- package/es/heatmap/shaders/heatmap_vert.glsl +0 -10
- package/es/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
- package/es/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
- package/es/heatmap/shaders/hexagon_frag.glsl +0 -12
- package/es/heatmap/shaders/hexagon_vert.glsl +0 -41
- package/es/heatmap/triangulation.d.ts +0 -5
- package/es/heatmap/triangulation.js +0 -37
- package/es/image/index.d.ts +0 -10
- package/es/image/index.js +0 -91
- package/es/image/models/dataImage.d.ts +0 -13
- package/es/image/models/dataImage.js +0 -186
- package/es/image/models/image.d.ts +0 -10
- package/es/image/models/image.js +0 -150
- package/es/image/models/index.d.ts +0 -5
- package/es/image/models/index.js +0 -9
- package/es/image/models/tileDataImage.d.ts +0 -10
- package/es/image/models/tileDataImage.js +0 -160
- package/es/image/shaders/dataImage_frag.glsl +0 -38
- package/es/image/shaders/image_frag.glsl +0 -9
- package/es/image/shaders/image_vert.glsl +0 -17
- package/es/index.d.ts +0 -17
- package/es/index.js +0 -107
- package/es/line/index.d.ts +0 -34
- package/es/line/index.js +0 -127
- package/es/line/models/arc.d.ts +0 -17
- package/es/line/models/arc.js +0 -356
- package/es/line/models/arc_3d.d.ts +0 -17
- package/es/line/models/arc_3d.js +0 -333
- package/es/line/models/earthArc_3d.d.ts +0 -17
- package/es/line/models/earthArc_3d.js +0 -336
- package/es/line/models/great_circle.d.ts +0 -12
- package/es/line/models/great_circle.js +0 -294
- package/es/line/models/half.d.ts +0 -18
- package/es/line/models/half.js +0 -281
- package/es/line/models/index.d.ts +0 -5
- package/es/line/models/index.js +0 -25
- package/es/line/models/line.d.ts +0 -21
- package/es/line/models/line.js +0 -443
- package/es/line/models/linearline.d.ts +0 -11
- package/es/line/models/linearline.js +0 -275
- package/es/line/models/simpleLine.d.ts +0 -14
- package/es/line/models/simpleLine.js +0 -234
- package/es/line/models/simpleTileLine.d.ts +0 -9
- package/es/line/models/simpleTileLine.js +0 -100
- package/es/line/models/tile.d.ts +0 -8
- package/es/line/models/tile.js +0 -178
- package/es/line/models/wall.d.ts +0 -12
- package/es/line/models/wall.js +0 -293
- package/es/line/shaders/arc_chunks.vert.glsl +0 -21
- package/es/line/shaders/dash/arc_dash_frag.glsl +0 -28
- package/es/line/shaders/dash/arc_dash_vert.glsl +0 -150
- package/es/line/shaders/dash/line_dash_frag.glsl +0 -31
- package/es/line/shaders/dash/line_dash_vert.glsl +0 -93
- package/es/line/shaders/half/line_half_frag.glsl +0 -53
- package/es/line/shaders/half/line_half_vert.glsl +0 -169
- package/es/line/shaders/line_arc2d_vert.glsl +0 -114
- package/es/line/shaders/line_arc_3d_frag.glsl +0 -103
- package/es/line/shaders/line_arc_3d_vert.glsl +0 -206
- package/es/line/shaders/line_arc_frag.glsl +0 -88
- package/es/line/shaders/line_arc_great_circle_frag.glsl +0 -101
- package/es/line/shaders/line_arc_great_circle_vert.glsl +0 -214
- package/es/line/shaders/line_arc_vert.glsl +0 -178
- package/es/line/shaders/line_bezier_vert.glsl +0 -85
- package/es/line/shaders/line_frag.glsl +0 -99
- package/es/line/shaders/line_vert.glsl +0 -192
- package/es/line/shaders/linear/arc3d_linear_frag.glsl +0 -46
- package/es/line/shaders/linear/arc3d_linear_vert.glsl +0 -206
- package/es/line/shaders/linear/arc_linear_frag.glsl +0 -38
- package/es/line/shaders/linear/arc_linear_vert.glsl +0 -138
- package/es/line/shaders/linear/line_linear_frag.glsl +0 -27
- package/es/line/shaders/linearLine/line_linear_frag.glsl +0 -20
- package/es/line/shaders/linearLine/line_linear_vert.glsl +0 -112
- package/es/line/shaders/simple/simpleline_frag.glsl +0 -10
- package/es/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
- package/es/line/shaders/simple/simpleline_vert.glsl +0 -79
- package/es/line/shaders/tile/line_tile_map_vert.glsl +0 -25
- package/es/line/shaders/tile/line_tile_vert.glsl +0 -52
- package/es/line/shaders/tile/simpleline_map_vert.glsl +0 -15
- package/es/line/shaders/tile/simpleline_vert.glsl +0 -21
- package/es/line/shaders/wall/wall_frag.glsl +0 -89
- package/es/line/shaders/wall/wall_vert.glsl +0 -77
- package/es/mask/index.d.ts +0 -18
- package/es/mask/index.js +0 -147
- package/es/mask/models/fill.d.ts +0 -12
- package/es/mask/models/fill.js +0 -124
- package/es/mask/models/index.d.ts +0 -5
- package/es/mask/models/index.js +0 -7
- package/es/mask/shaders/mask_vert.glsl +0 -16
- package/es/plugins/DataMappingPlugin.d.ts +0 -18
- package/es/plugins/DataMappingPlugin.js +0 -413
- package/es/plugins/DataSourcePlugin.d.ts +0 -7
- package/es/plugins/DataSourcePlugin.js +0 -84
- package/es/plugins/FeatureScalePlugin.d.ts +0 -24
- package/es/plugins/FeatureScalePlugin.js +0 -342
- package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -5
- package/es/plugins/LayerAnimateStylePlugin.js +0 -29
- package/es/plugins/LayerModelPlugin.d.ts +0 -10
- package/es/plugins/LayerModelPlugin.js +0 -72
- package/es/plugins/LayerStylePlugin.d.ts +0 -8
- package/es/plugins/LayerStylePlugin.js +0 -39
- package/es/plugins/LightingPlugin.d.ts +0 -36
- package/es/plugins/LightingPlugin.js +0 -104
- package/es/plugins/MultiPassRendererPlugin.d.ts +0 -23
- package/es/plugins/MultiPassRendererPlugin.js +0 -65
- package/es/plugins/PixelPickingPlugin.d.ts +0 -8
- package/es/plugins/PixelPickingPlugin.js +0 -126
- package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -15
- package/es/plugins/RegisterStyleAttributePlugin.js +0 -151
- package/es/plugins/ShaderUniformPlugin.d.ts +0 -21
- package/es/plugins/ShaderUniformPlugin.js +0 -106
- package/es/plugins/UpdateModelPlugin.d.ts +0 -8
- package/es/plugins/UpdateModelPlugin.js +0 -31
- package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -12
- package/es/plugins/UpdateStyleAttributePlugin.js +0 -83
- package/es/point/index.d.ts +0 -31
- package/es/point/index.js +0 -216
- package/es/point/models/earthExtrude.d.ts +0 -24
- package/es/point/models/earthExtrude.js +0 -274
- package/es/point/models/earthFill.d.ts +0 -11
- package/es/point/models/earthFill.js +0 -258
- package/es/point/models/extrude.d.ts +0 -24
- package/es/point/models/extrude.js +0 -295
- package/es/point/models/fill.d.ts +0 -40
- package/es/point/models/fill.js +0 -403
- package/es/point/models/fillmage.d.ts +0 -25
- package/es/point/models/fillmage.js +0 -366
- package/es/point/models/image.d.ts +0 -11
- package/es/point/models/image.js +0 -239
- package/es/point/models/index.d.ts +0 -5
- package/es/point/models/index.js +0 -30
- package/es/point/models/normal.d.ts +0 -16
- package/es/point/models/normal.js +0 -124
- package/es/point/models/radar.d.ts +0 -24
- package/es/point/models/radar.js +0 -232
- package/es/point/models/simplePoint.d.ts +0 -16
- package/es/point/models/simplePoint.js +0 -179
- package/es/point/models/text.d.ts +0 -57
- package/es/point/models/text.js +0 -619
- package/es/point/models/tile.d.ts +0 -15
- package/es/point/models/tile.js +0 -175
- package/es/point/models/tileText.d.ts +0 -52
- package/es/point/models/tileText.js +0 -509
- package/es/point/shaders/animate/wave_frag.glsl +0 -65
- package/es/point/shaders/earth/extrude_frag.glsl +0 -44
- package/es/point/shaders/earth/extrude_vert.glsl +0 -140
- package/es/point/shaders/earth/fill_frag.glsl +0 -86
- package/es/point/shaders/earth/fill_vert.glsl +0 -125
- package/es/point/shaders/extrude/extrude_frag.glsl +0 -44
- package/es/point/shaders/extrude/extrude_vert.glsl +0 -121
- package/es/point/shaders/fill_frag.glsl +0 -84
- package/es/point/shaders/fill_vert.glsl +0 -188
- package/es/point/shaders/image/fillImage_frag.glsl +0 -20
- package/es/point/shaders/image/fillImage_vert.glsl +0 -116
- package/es/point/shaders/image_frag.glsl +0 -39
- package/es/point/shaders/image_vert.glsl +0 -90
- package/es/point/shaders/normal_frag.glsl +0 -6
- package/es/point/shaders/normal_vert.glsl +0 -24
- package/es/point/shaders/radar/radar_frag.glsl +0 -53
- package/es/point/shaders/radar/radar_vert.glsl +0 -70
- package/es/point/shaders/simplePoint_frag.glsl +0 -53
- package/es/point/shaders/simplePoint_vert.glsl +0 -79
- package/es/point/shaders/text_frag.glsl +0 -48
- package/es/point/shaders/text_vert.glsl +0 -131
- package/es/point/shaders/tile/fill_tile_frag.glsl +0 -76
- package/es/point/shaders/tile/fill_tile_vert.glsl +0 -78
- package/es/point/shaders/tile/text_frag.glsl +0 -33
- package/es/point/shaders/tile/text_map_frag.glsl +0 -31
- package/es/point/shaders/tile/text_map_vert.glsl +0 -38
- package/es/point/shaders/tile/text_vert.glsl +0 -48
- package/es/point/shape/extrude.d.ts +0 -15
- package/es/point/shape/extrude.js +0 -63
- package/es/polygon/index.d.ts +0 -18
- package/es/polygon/index.js +0 -133
- package/es/polygon/models/extrude.d.ts +0 -28
- package/es/polygon/models/extrude.js +0 -302
- package/es/polygon/models/fill.d.ts +0 -17
- package/es/polygon/models/fill.js +0 -210
- package/es/polygon/models/index.d.ts +0 -5
- package/es/polygon/models/index.js +0 -28
- package/es/polygon/models/ocean.d.ts +0 -21
- package/es/polygon/models/ocean.js +0 -201
- package/es/polygon/models/tile.d.ts +0 -12
- package/es/polygon/models/tile.js +0 -101
- package/es/polygon/models/water.d.ts +0 -16
- package/es/polygon/models/water.js +0 -178
- package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
- package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
- package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
- package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
- package/es/polygon/shaders/polygon_frag.glsl +0 -12
- package/es/polygon/shaders/polygon_linear_frag.glsl +0 -22
- package/es/polygon/shaders/polygon_linear_vert.glsl +0 -74
- package/es/polygon/shaders/polygon_vert.glsl +0 -66
- package/es/polygon/shaders/tile/polygon_tile_map_vert.glsl +0 -16
- package/es/polygon/shaders/tile/polygon_tile_vert.glsl +0 -42
- package/es/polygon/shaders/water/polygon_ocean_frag.glsl +0 -247
- package/es/polygon/shaders/water/polygon_ocean_vert.glsl +0 -21
- package/es/polygon/shaders/water/polygon_water_frag.glsl +0 -71
- package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -26
- package/es/raster/buffers/triangulation.d.ts +0 -6
- package/es/raster/buffers/triangulation.js +0 -25
- package/es/raster/index.d.ts +0 -10
- package/es/raster/index.js +0 -94
- package/es/raster/models/index.d.ts +0 -5
- package/es/raster/models/index.js +0 -10
- package/es/raster/models/raster.d.ts +0 -22
- package/es/raster/models/raster.js +0 -241
- package/es/raster/models/rasterRgb.d.ts +0 -20
- package/es/raster/models/rasterRgb.js +0 -225
- package/es/raster/models/rasterTile.d.ts +0 -18
- package/es/raster/models/rasterTile.js +0 -139
- package/es/raster/raster.d.ts +0 -21
- package/es/raster/raster.js +0 -161
- package/es/raster/shaders/raster_2d_frag.glsl +0 -64
- package/es/raster/shaders/raster_2d_vert.glsl +0 -17
- package/es/raster/shaders/raster_frag.glsl +0 -9
- package/es/raster/shaders/raster_rgb_frag.glsl +0 -12
- package/es/raster/shaders/raster_vert.glsl +0 -44
- package/es/shader/minify_frag.glsl +0 -7
- package/es/shader/minify_picking_frag.glsl +0 -10
- package/es/tile/interaction/TilePickService.d.ts +0 -16
- package/es/tile/interaction/TilePickService.js +0 -129
- package/es/tile/interaction/getFeatureData.d.ts +0 -0
- package/es/tile/interaction/getFeatureData.js +0 -0
- package/es/tile/interaction/getRasterData.d.ts +0 -4
- package/es/tile/interaction/getRasterData.js +0 -70
- package/es/tile/interaction/utils.d.ts +0 -11
- package/es/tile/interaction/utils.js +0 -97
- package/es/tile/interface.d.ts +0 -28
- package/es/tile/interface.js +0 -1
- package/es/tile/manager/base.d.ts +0 -30
- package/es/tile/manager/base.js +0 -146
- package/es/tile/manager/layerManager.d.ts +0 -19
- package/es/tile/manager/layerManager.js +0 -254
- package/es/tile/manager/mapLayerManager.d.ts +0 -7
- package/es/tile/manager/mapLayerManager.js +0 -119
- package/es/tile/models/tileModel.d.ts +0 -10
- package/es/tile/models/tileModel.js +0 -81
- package/es/tile/render/TileRenderService.d.ts +0 -10
- package/es/tile/render/TileRenderService.js +0 -68
- package/es/tile/style/TileStyleService.d.ts +0 -17
- package/es/tile/style/TileStyleService.js +0 -118
- package/es/tile/style/constants.d.ts +0 -13
- package/es/tile/style/constants.js +0 -17
- package/es/tile/style/utils.d.ts +0 -9
- package/es/tile/style/utils.js +0 -139
- package/es/tile/tileFactory/base.d.ts +0 -45
- package/es/tile/tileFactory/base.js +0 -403
- package/es/tile/tileFactory/index.d.ts +0 -5
- package/es/tile/tileFactory/index.js +0 -38
- package/es/tile/tileFactory/layers/rasterDataLayer.d.ts +0 -11
- package/es/tile/tileFactory/layers/rasterDataLayer.js +0 -77
- package/es/tile/tileFactory/layers/tileTest.d.ts +0 -15
- package/es/tile/tileFactory/layers/tileTest.js +0 -62
- package/es/tile/tileFactory/layers/vectorLayer.d.ts +0 -30
- package/es/tile/tileFactory/layers/vectorLayer.js +0 -253
- package/es/tile/tileFactory/line.d.ts +0 -12
- package/es/tile/tileFactory/line.js +0 -59
- package/es/tile/tileFactory/mask.d.ts +0 -12
- package/es/tile/tileFactory/mask.js +0 -60
- package/es/tile/tileFactory/point.d.ts +0 -12
- package/es/tile/tileFactory/point.js +0 -60
- package/es/tile/tileFactory/polygon.d.ts +0 -12
- package/es/tile/tileFactory/polygon.js +0 -59
- package/es/tile/tileFactory/raster.d.ts +0 -12
- package/es/tile/tileFactory/raster.js +0 -55
- package/es/tile/tileFactory/rasterData.d.ts +0 -12
- package/es/tile/tileFactory/rasterData.js +0 -81
- package/es/tile/tileFactory/test.d.ts +0 -12
- package/es/tile/tileFactory/test.js +0 -94
- package/es/tile/tileLayer/MapTileLayer.d.ts +0 -6
- package/es/tile/tileLayer/MapTileLayer.js +0 -48
- package/es/tile/tileLayer/TileLayer.d.ts +0 -22
- package/es/tile/tileLayer/TileLayer.js +0 -198
- package/es/tile/tileLayer/base.d.ts +0 -33
- package/es/tile/tileLayer/base.js +0 -212
- package/es/tile/utils.d.ts +0 -22
- package/es/tile/utils.js +0 -149
- package/es/utils/blend.d.ts +0 -2
- package/es/utils/blend.js +0 -54
- package/es/utils/collision-index.d.ts +0 -47
- package/es/utils/collision-index.js +0 -102
- package/es/utils/dataMappingStyle.d.ts +0 -31
- package/es/utils/dataMappingStyle.js +0 -147
- package/es/utils/extrude_polyline.d.ts +0 -68
- package/es/utils/extrude_polyline.js +0 -613
- package/es/utils/grid-index.d.ts +0 -28
- package/es/utils/grid-index.js +0 -179
- package/es/utils/layerData.d.ts +0 -2
- package/es/utils/layerData.js +0 -179
- package/es/utils/multiPassRender.d.ts +0 -16
- package/es/utils/multiPassRender.js +0 -49
- package/es/utils/polylineNormal.d.ts +0 -9
- package/es/utils/polylineNormal.js +0 -191
- package/es/utils/simpleLine.d.ts +0 -23
- package/es/utils/simpleLine.js +0 -103
- package/es/utils/symbol-layout.d.ts +0 -43
- package/es/utils/symbol-layout.js +0 -299
- package/es/utils/updateShape.d.ts +0 -2
- package/es/utils/updateShape.js +0 -20
- package/es/wind/index.d.ts +0 -11
- package/es/wind/index.js +0 -85
- package/es/wind/models/index.d.ts +0 -5
- package/es/wind/models/index.js +0 -5
- package/es/wind/models/utils.d.ts +0 -19
- package/es/wind/models/utils.js +0 -226
- package/es/wind/models/wind.d.ts +0 -24
- package/es/wind/models/wind.js +0 -317
- package/es/wind/models/windRender.d.ts +0 -104
- package/es/wind/models/windRender.js +0 -357
- package/es/wind/models/windShader.d.ts +0 -12
- package/es/wind/models/windShader.js +0 -12
- package/es/wind/shaders/wind_frag.glsl +0 -9
- package/es/wind/shaders/wind_vert.glsl +0 -17
- package/lib/Geometry/index.js +0 -117
- package/lib/Geometry/models/billboard.js +0 -229
- package/lib/Geometry/models/index.js +0 -22
- package/lib/Geometry/models/plane.js +0 -421
- package/lib/Geometry/models/sprite.js +0 -302
- package/lib/Geometry/shaders/billboard_frag.glsl +0 -13
- package/lib/Geometry/shaders/billboard_vert.glsl +0 -50
- package/lib/Geometry/shaders/plane_frag.glsl +0 -22
- package/lib/Geometry/shaders/plane_vert.glsl +0 -53
- package/lib/Geometry/shaders/sprite_frag.glsl +0 -21
- package/lib/Geometry/shaders/sprite_vert.glsl +0 -28
- package/lib/canvas/index.js +0 -120
- package/lib/canvas/models/canvas.js +0 -221
- package/lib/canvas/models/index.js +0 -16
- package/lib/citybuliding/building.js +0 -86
- package/lib/citybuliding/models/build.js +0 -202
- package/lib/citybuliding/shaders/build_frag.glsl +0 -117
- package/lib/citybuliding/shaders/build_vert.glsl +0 -54
- package/lib/core/BaseLayer.js +0 -1434
- package/lib/core/BaseModel.js +0 -507
- package/lib/core/interface.js +0 -41
- package/lib/core/schema.js +0 -33
- package/lib/core/shape/Path.js +0 -88
- package/lib/core/shape/extrude.js +0 -180
- package/lib/core/triangulation.js +0 -620
- package/lib/earth/index.js +0 -113
- package/lib/earth/models/atmosphere.js +0 -149
- package/lib/earth/models/base.js +0 -216
- package/lib/earth/models/bloomsphere.js +0 -148
- package/lib/earth/shaders/atmosphere_frag.glsl +0 -17
- package/lib/earth/shaders/atmosphere_vert.glsl +0 -26
- package/lib/earth/shaders/base_frag.glsl +0 -13
- package/lib/earth/shaders/base_vert.glsl +0 -52
- package/lib/earth/shaders/bloomsphere_frag.glsl +0 -15
- package/lib/earth/shaders/bloomsphere_vert.glsl +0 -20
- package/lib/earth/utils.js +0 -136
- package/lib/glsl.d.ts +0 -5
- package/lib/heatmap/index.js +0 -141
- package/lib/heatmap/models/grid.js +0 -120
- package/lib/heatmap/models/grid3d.js +0 -154
- package/lib/heatmap/models/heatmap.js +0 -484
- package/lib/heatmap/models/hexagon.js +0 -121
- package/lib/heatmap/models/index.js +0 -26
- package/lib/heatmap/shaders/grid_vert.glsl +0 -42
- package/lib/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
- package/lib/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
- package/lib/heatmap/shaders/heatmap_frag.glsl +0 -47
- package/lib/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
- package/lib/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
- package/lib/heatmap/shaders/heatmap_vert.glsl +0 -10
- package/lib/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
- package/lib/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
- package/lib/heatmap/shaders/hexagon_frag.glsl +0 -12
- package/lib/heatmap/shaders/hexagon_vert.glsl +0 -41
- package/lib/heatmap/triangulation.js +0 -44
- package/lib/image/index.js +0 -104
- package/lib/image/models/dataImage.js +0 -201
- package/lib/image/models/image.js +0 -164
- package/lib/image/models/index.js +0 -22
- package/lib/image/models/tileDataImage.js +0 -174
- package/lib/image/shaders/dataImage_frag.glsl +0 -38
- package/lib/image/shaders/image_frag.glsl +0 -9
- package/lib/image/shaders/image_vert.glsl +0 -17
- package/lib/index.js +0 -275
- package/lib/line/index.js +0 -139
- package/lib/line/models/arc.js +0 -373
- package/lib/line/models/arc_3d.js +0 -351
- package/lib/line/models/earthArc_3d.js +0 -354
- package/lib/line/models/great_circle.js +0 -310
- package/lib/line/models/half.js +0 -298
- package/lib/line/models/index.js +0 -46
- package/lib/line/models/line.js +0 -460
- package/lib/line/models/linearline.js +0 -292
- package/lib/line/models/simpleLine.js +0 -249
- package/lib/line/models/simpleTileLine.js +0 -115
- package/lib/line/models/tile.js +0 -194
- package/lib/line/models/wall.js +0 -309
- package/lib/line/shaders/arc_chunks.vert.glsl +0 -21
- package/lib/line/shaders/dash/arc_dash_frag.glsl +0 -28
- package/lib/line/shaders/dash/arc_dash_vert.glsl +0 -150
- package/lib/line/shaders/dash/line_dash_frag.glsl +0 -31
- package/lib/line/shaders/dash/line_dash_vert.glsl +0 -93
- package/lib/line/shaders/half/line_half_frag.glsl +0 -53
- package/lib/line/shaders/half/line_half_vert.glsl +0 -169
- package/lib/line/shaders/line_arc2d_vert.glsl +0 -114
- package/lib/line/shaders/line_arc_3d_frag.glsl +0 -103
- package/lib/line/shaders/line_arc_3d_vert.glsl +0 -206
- package/lib/line/shaders/line_arc_frag.glsl +0 -88
- package/lib/line/shaders/line_arc_great_circle_frag.glsl +0 -101
- package/lib/line/shaders/line_arc_great_circle_vert.glsl +0 -214
- package/lib/line/shaders/line_arc_vert.glsl +0 -178
- package/lib/line/shaders/line_bezier_vert.glsl +0 -85
- package/lib/line/shaders/line_frag.glsl +0 -99
- package/lib/line/shaders/line_vert.glsl +0 -192
- package/lib/line/shaders/linear/arc3d_linear_frag.glsl +0 -46
- package/lib/line/shaders/linear/arc3d_linear_vert.glsl +0 -206
- package/lib/line/shaders/linear/arc_linear_frag.glsl +0 -38
- package/lib/line/shaders/linear/arc_linear_vert.glsl +0 -138
- package/lib/line/shaders/linear/line_linear_frag.glsl +0 -27
- package/lib/line/shaders/linearLine/line_linear_frag.glsl +0 -20
- package/lib/line/shaders/linearLine/line_linear_vert.glsl +0 -112
- package/lib/line/shaders/simple/simpleline_frag.glsl +0 -10
- package/lib/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
- package/lib/line/shaders/simple/simpleline_vert.glsl +0 -79
- package/lib/line/shaders/tile/line_tile_map_vert.glsl +0 -25
- package/lib/line/shaders/tile/line_tile_vert.glsl +0 -52
- package/lib/line/shaders/tile/simpleline_map_vert.glsl +0 -15
- package/lib/line/shaders/tile/simpleline_vert.glsl +0 -21
- package/lib/line/shaders/wall/wall_frag.glsl +0 -89
- package/lib/line/shaders/wall/wall_vert.glsl +0 -77
- package/lib/mask/index.js +0 -163
- package/lib/mask/models/fill.js +0 -141
- package/lib/mask/models/index.js +0 -19
- package/lib/mask/shaders/mask_vert.glsl +0 -16
- package/lib/plugins/DataMappingPlugin.js +0 -427
- package/lib/plugins/DataSourcePlugin.js +0 -97
- package/lib/plugins/FeatureScalePlugin.js +0 -365
- package/lib/plugins/LayerAnimateStylePlugin.js +0 -41
- package/lib/plugins/LayerModelPlugin.js +0 -83
- package/lib/plugins/LayerStylePlugin.js +0 -50
- package/lib/plugins/LightingPlugin.js +0 -119
- package/lib/plugins/MultiPassRendererPlugin.js +0 -77
- package/lib/plugins/PixelPickingPlugin.js +0 -139
- package/lib/plugins/RegisterStyleAttributePlugin.js +0 -164
- package/lib/plugins/ShaderUniformPlugin.js +0 -119
- package/lib/plugins/UpdateModelPlugin.js +0 -42
- package/lib/plugins/UpdateStyleAttributePlugin.js +0 -94
- package/lib/point/index.js +0 -229
- package/lib/point/models/earthExtrude.js +0 -290
- package/lib/point/models/earthFill.js +0 -293
- package/lib/point/models/extrude.js +0 -312
- package/lib/point/models/fill.js +0 -419
- package/lib/point/models/fillmage.js +0 -382
- package/lib/point/models/image.js +0 -255
- package/lib/point/models/index.js +0 -53
- package/lib/point/models/normal.js +0 -141
- package/lib/point/models/radar.js +0 -249
- package/lib/point/models/simplePoint.js +0 -196
- package/lib/point/models/text.js +0 -634
- package/lib/point/models/tile.js +0 -189
- package/lib/point/models/tileText.js +0 -524
- package/lib/point/shaders/animate/wave_frag.glsl +0 -65
- package/lib/point/shaders/earth/extrude_frag.glsl +0 -44
- package/lib/point/shaders/earth/extrude_vert.glsl +0 -140
- package/lib/point/shaders/earth/fill_frag.glsl +0 -86
- package/lib/point/shaders/earth/fill_vert.glsl +0 -125
- package/lib/point/shaders/extrude/extrude_frag.glsl +0 -44
- package/lib/point/shaders/extrude/extrude_vert.glsl +0 -121
- package/lib/point/shaders/fill_frag.glsl +0 -84
- package/lib/point/shaders/fill_vert.glsl +0 -188
- package/lib/point/shaders/image/fillImage_frag.glsl +0 -20
- package/lib/point/shaders/image/fillImage_vert.glsl +0 -116
- package/lib/point/shaders/image_frag.glsl +0 -39
- package/lib/point/shaders/image_vert.glsl +0 -90
- package/lib/point/shaders/normal_frag.glsl +0 -6
- package/lib/point/shaders/normal_vert.glsl +0 -24
- package/lib/point/shaders/radar/radar_frag.glsl +0 -53
- package/lib/point/shaders/radar/radar_vert.glsl +0 -70
- package/lib/point/shaders/simplePoint_frag.glsl +0 -53
- package/lib/point/shaders/simplePoint_vert.glsl +0 -79
- package/lib/point/shaders/text_frag.glsl +0 -48
- package/lib/point/shaders/text_vert.glsl +0 -131
- package/lib/point/shaders/tile/fill_tile_frag.glsl +0 -76
- package/lib/point/shaders/tile/fill_tile_vert.glsl +0 -78
- package/lib/point/shaders/tile/text_frag.glsl +0 -33
- package/lib/point/shaders/tile/text_map_frag.glsl +0 -31
- package/lib/point/shaders/tile/text_map_vert.glsl +0 -38
- package/lib/point/shaders/tile/text_vert.glsl +0 -48
- package/lib/point/shape/extrude.js +0 -78
- package/lib/polygon/index.js +0 -147
- package/lib/polygon/models/extrude.js +0 -318
- package/lib/polygon/models/fill.js +0 -225
- package/lib/polygon/models/index.js +0 -50
- package/lib/polygon/models/ocean.js +0 -218
- package/lib/polygon/models/tile.js +0 -114
- package/lib/polygon/models/water.js +0 -195
- package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
- package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
- package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
- package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
- package/lib/polygon/shaders/polygon_frag.glsl +0 -12
- package/lib/polygon/shaders/polygon_linear_frag.glsl +0 -22
- package/lib/polygon/shaders/polygon_linear_vert.glsl +0 -74
- package/lib/polygon/shaders/polygon_vert.glsl +0 -66
- package/lib/polygon/shaders/tile/polygon_tile_map_vert.glsl +0 -16
- package/lib/polygon/shaders/tile/polygon_tile_vert.glsl +0 -42
- package/lib/polygon/shaders/water/polygon_ocean_frag.glsl +0 -247
- package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +0 -21
- package/lib/polygon/shaders/water/polygon_water_frag.glsl +0 -71
- package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -26
- package/lib/raster/buffers/triangulation.js +0 -35
- package/lib/raster/index.js +0 -107
- package/lib/raster/models/index.js +0 -23
- package/lib/raster/models/raster.js +0 -258
- package/lib/raster/models/rasterRgb.js +0 -240
- package/lib/raster/models/rasterTile.js +0 -153
- package/lib/raster/raster.js +0 -178
- package/lib/raster/shaders/raster_2d_frag.glsl +0 -64
- package/lib/raster/shaders/raster_2d_vert.glsl +0 -17
- package/lib/raster/shaders/raster_frag.glsl +0 -9
- package/lib/raster/shaders/raster_rgb_frag.glsl +0 -12
- package/lib/raster/shaders/raster_vert.glsl +0 -44
- package/lib/shader/minify_frag.glsl +0 -7
- package/lib/shader/minify_picking_frag.glsl +0 -10
- package/lib/tile/interaction/TilePickService.js +0 -143
- package/lib/tile/interaction/getFeatureData.js +0 -1
- package/lib/tile/interaction/getRasterData.js +0 -83
- package/lib/tile/interaction/utils.js +0 -120
- package/lib/tile/interface.js +0 -5
- package/lib/tile/manager/base.js +0 -161
- package/lib/tile/manager/layerManager.js +0 -275
- package/lib/tile/manager/mapLayerManager.js +0 -134
- package/lib/tile/models/tileModel.js +0 -94
- package/lib/tile/render/TileRenderService.js +0 -78
- package/lib/tile/style/TileStyleService.js +0 -133
- package/lib/tile/style/constants.js +0 -26
- package/lib/tile/style/utils.js +0 -163
- package/lib/tile/tileFactory/base.js +0 -427
- package/lib/tile/tileFactory/index.js +0 -71
- package/lib/tile/tileFactory/layers/rasterDataLayer.js +0 -91
- package/lib/tile/tileFactory/layers/tileTest.js +0 -74
- package/lib/tile/tileFactory/layers/vectorLayer.js +0 -268
- package/lib/tile/tileFactory/line.js +0 -70
- package/lib/tile/tileFactory/mask.js +0 -71
- package/lib/tile/tileFactory/point.js +0 -71
- package/lib/tile/tileFactory/polygon.js +0 -70
- package/lib/tile/tileFactory/raster.js +0 -68
- package/lib/tile/tileFactory/rasterData.js +0 -93
- package/lib/tile/tileFactory/test.js +0 -106
- package/lib/tile/tileLayer/MapTileLayer.js +0 -63
- package/lib/tile/tileLayer/TileLayer.js +0 -215
- package/lib/tile/tileLayer/base.js +0 -225
- package/lib/tile/utils.js +0 -181
- package/lib/utils/blend.js +0 -65
- package/lib/utils/collision-index.js +0 -118
- package/lib/utils/dataMappingStyle.js +0 -151
- package/lib/utils/extrude_polyline.js +0 -656
- package/lib/utils/grid-index.js +0 -188
- package/lib/utils/layerData.js +0 -191
- package/lib/utils/multiPassRender.js +0 -60
- package/lib/utils/polylineNormal.js +0 -230
- package/lib/utils/simpleLine.js +0 -116
- package/lib/utils/symbol-layout.js +0 -308
- package/lib/utils/updateShape.js +0 -27
- package/lib/wind/index.js +0 -98
- package/lib/wind/models/index.js +0 -16
- package/lib/wind/models/utils.js +0 -253
- package/lib/wind/models/wind.js +0 -332
- package/lib/wind/models/windRender.js +0 -373
- package/lib/wind/models/windShader.js +0 -25
- package/lib/wind/shaders/wind_frag.glsl +0 -9
- package/lib/wind/shaders/wind_vert.glsl +0 -17
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
attribute vec4 a_Color;
|
|
2
|
-
attribute vec3 a_Position;
|
|
3
|
-
attribute vec3 a_Extrude;
|
|
4
|
-
attribute float a_Size;
|
|
5
|
-
attribute float a_Shape;
|
|
6
|
-
|
|
7
|
-
varying mat4 styleMappingMat; // 用于将在顶点着色器中计算好的样式值传递给片元
|
|
8
|
-
|
|
9
|
-
uniform mat4 u_ModelMatrix;
|
|
10
|
-
uniform mat4 u_Mvp;
|
|
11
|
-
uniform float u_meter2coord;
|
|
12
|
-
uniform float u_meteryScale;
|
|
13
|
-
uniform float u_isMeter;
|
|
14
|
-
|
|
15
|
-
varying vec4 v_data;
|
|
16
|
-
varying vec4 v_color;
|
|
17
|
-
varying float v_radius;
|
|
18
|
-
|
|
19
|
-
uniform float u_opacity : 1;
|
|
20
|
-
uniform float u_stroke_opacity : 1;
|
|
21
|
-
uniform float u_stroke_width : 2;
|
|
22
|
-
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
23
|
-
uniform vec2 u_offsets;
|
|
24
|
-
|
|
25
|
-
uniform float u_blur : 0.0;
|
|
26
|
-
uniform float u_raisingHeight: 0.0;
|
|
27
|
-
uniform float u_heightfixed: 0.0;
|
|
28
|
-
|
|
29
|
-
#pragma include "styleMapping"
|
|
30
|
-
#pragma include "styleMappingCalOpacity"
|
|
31
|
-
#pragma include "styleMappingCalStrokeOpacity"
|
|
32
|
-
#pragma include "styleMappingCalStrokeWidth"
|
|
33
|
-
|
|
34
|
-
#pragma include "projection"
|
|
35
|
-
#pragma include "picking"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
void main() {
|
|
39
|
-
vec3 extrude = a_Extrude;
|
|
40
|
-
float shape_type = a_Shape;
|
|
41
|
-
/*
|
|
42
|
-
* setPickingSize 设置拾取大小
|
|
43
|
-
* u_meter2coord 在等面积大小的时候设置单位
|
|
44
|
-
*/
|
|
45
|
-
float newSize = setPickingSize(a_Size) * u_meter2coord;
|
|
46
|
-
// float newSize = setPickingSize(a_Size) * 0.00001038445708445579;
|
|
47
|
-
|
|
48
|
-
// cal style mapping - 数据纹理映射部分的计算
|
|
49
|
-
styleMappingMat = mat4(
|
|
50
|
-
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
51
|
-
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
52
|
-
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
53
|
-
0.0, 0.0, 0.0, 0.0
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
float rowCount = u_cellTypeLayout[0][0]; // 当前的数据纹理有几行
|
|
57
|
-
float columnCount = u_cellTypeLayout[0][1]; // 当看到数据纹理有几列
|
|
58
|
-
float columnWidth = 1.0/columnCount; // 列宽
|
|
59
|
-
float rowHeight = 1.0/rowCount; // 行高
|
|
60
|
-
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
61
|
-
float id = a_vertexId; // 第n个顶点
|
|
62
|
-
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // 起始点在第几行
|
|
63
|
-
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // 起始点在第几列
|
|
64
|
-
|
|
65
|
-
// cell 固定顺序 opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
66
|
-
// 按顺序从 cell 中取值、若没有则自动往下取值
|
|
67
|
-
float textureOffset = 0.0; // 在 cell 中取值的偏移量
|
|
68
|
-
|
|
69
|
-
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
70
|
-
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
71
|
-
textureOffset = opacityAndOffset.g;
|
|
72
|
-
|
|
73
|
-
vec2 strokeOpacityAndOffset = calStrokeOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
74
|
-
styleMappingMat[0][1] = strokeOpacityAndOffset.r;
|
|
75
|
-
textureOffset = strokeOpacityAndOffset.g;
|
|
76
|
-
|
|
77
|
-
vec2 strokeWidthAndOffset = calStrokeWidthAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
78
|
-
styleMappingMat[0][2] = strokeWidthAndOffset.r;
|
|
79
|
-
textureOffset = strokeWidthAndOffset.g;
|
|
80
|
-
|
|
81
|
-
vec4 textrueStroke = vec4(-1.0, -1.0, -1.0, -1.0);
|
|
82
|
-
if(hasStroke()) {
|
|
83
|
-
vec2 valueRPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
84
|
-
styleMappingMat[1][0] = pos2value(valueRPos, columnWidth, rowHeight); // R
|
|
85
|
-
textureOffset += 1.0;
|
|
86
|
-
|
|
87
|
-
vec2 valueGPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
88
|
-
styleMappingMat[1][1] = pos2value(valueGPos, columnWidth, rowHeight); // G
|
|
89
|
-
textureOffset += 1.0;
|
|
90
|
-
|
|
91
|
-
vec2 valueBPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
92
|
-
styleMappingMat[1][2] = pos2value(valueBPos, columnWidth, rowHeight); // B
|
|
93
|
-
textureOffset += 1.0;
|
|
94
|
-
|
|
95
|
-
vec2 valueAPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
96
|
-
styleMappingMat[1][3] = pos2value(valueAPos, columnWidth, rowHeight); // A
|
|
97
|
-
textureOffset += 1.0;
|
|
98
|
-
} else {
|
|
99
|
-
if(u_stroke_color == vec4(0.0)) {
|
|
100
|
-
styleMappingMat[1][0] = v_color.r;
|
|
101
|
-
styleMappingMat[1][1] = v_color.g;
|
|
102
|
-
styleMappingMat[1][2] = v_color.b;
|
|
103
|
-
styleMappingMat[1][3] = v_color.a;
|
|
104
|
-
} else {
|
|
105
|
-
styleMappingMat[1][0] = u_stroke_color.r;
|
|
106
|
-
styleMappingMat[1][1] = u_stroke_color.g;
|
|
107
|
-
styleMappingMat[1][2] = u_stroke_color.b;
|
|
108
|
-
styleMappingMat[1][3] = u_stroke_color.a;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
113
|
-
if(hasOffsets()) {
|
|
114
|
-
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
115
|
-
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
116
|
-
textureOffset += 1.0;
|
|
117
|
-
|
|
118
|
-
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
119
|
-
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
120
|
-
textureOffset += 1.0;
|
|
121
|
-
} else {
|
|
122
|
-
textrueOffsets = u_offsets;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// cal style mapping
|
|
126
|
-
|
|
127
|
-
// unpack color(vec2)
|
|
128
|
-
v_color = a_Color;
|
|
129
|
-
|
|
130
|
-
// radius(16-bit)
|
|
131
|
-
v_radius = newSize;
|
|
132
|
-
|
|
133
|
-
// anti-alias
|
|
134
|
-
// float antialiased_blur = -max(u_blur, antialiasblur);
|
|
135
|
-
float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur);
|
|
136
|
-
|
|
137
|
-
vec2 offset = (extrude.xy * (newSize + u_stroke_width) + textrueOffsets);
|
|
138
|
-
vec3 aPosition = a_Position;
|
|
139
|
-
if(u_isMeter < 1.0) {
|
|
140
|
-
// 不以米为实际单位
|
|
141
|
-
offset = project_pixel(offset);
|
|
142
|
-
} else {
|
|
143
|
-
// 以米为实际单位
|
|
144
|
-
if(newSize * pow(2.0, u_Zoom) < 48.0) {
|
|
145
|
-
antialiasblur = max(antialiasblur, -0.05);
|
|
146
|
-
} else if(newSize * pow(2.0, u_Zoom) < 128.0) {
|
|
147
|
-
antialiasblur = max(antialiasblur, -0.6/pow(u_Zoom, 2.0));
|
|
148
|
-
} else {
|
|
149
|
-
antialiasblur = max(antialiasblur, -0.8/pow(u_Zoom, 2.0));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
153
|
-
aPosition.x += offset.x / u_meteryScale;
|
|
154
|
-
aPosition.y += offset.y;
|
|
155
|
-
offset = vec2(0.0);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// TODP: /abs(extrude.x) 是为了兼容地球模式
|
|
160
|
-
v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));
|
|
164
|
-
vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
|
|
165
|
-
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
|
|
166
|
-
|
|
167
|
-
float raisingHeight = u_raisingHeight;
|
|
168
|
-
|
|
169
|
-
if(u_heightfixed < 1.0) { // false
|
|
170
|
-
raisingHeight = project_pixel(u_raisingHeight);
|
|
171
|
-
} else {
|
|
172
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
173
|
-
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
174
|
-
raisingHeight = u_raisingHeight * mapboxZoomScale;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
180
|
-
gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
|
|
181
|
-
} else {
|
|
182
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
|
|
186
|
-
|
|
187
|
-
setPickingColor(a_PickingColor);
|
|
188
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
uniform sampler2D u_texture;
|
|
2
|
-
uniform vec2 u_textSize;
|
|
3
|
-
|
|
4
|
-
varying mat4 styleMappingMat; // 传递从片元中传递的映射数据
|
|
5
|
-
|
|
6
|
-
#pragma include "sdf_2d"
|
|
7
|
-
#pragma include "picking"
|
|
8
|
-
varying vec2 v_uv; // 本身的 uv 坐标
|
|
9
|
-
varying vec2 v_Iconuv;
|
|
10
|
-
|
|
11
|
-
void main() {
|
|
12
|
-
|
|
13
|
-
float opacity = styleMappingMat[0][0];
|
|
14
|
-
|
|
15
|
-
vec2 pos = v_Iconuv / u_textSize + v_uv / u_textSize * 64.;
|
|
16
|
-
gl_FragColor = texture2D(u_texture, pos);
|
|
17
|
-
gl_FragColor.a *= opacity;
|
|
18
|
-
|
|
19
|
-
gl_FragColor = filterColor(gl_FragColor);
|
|
20
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
attribute vec4 a_Color;
|
|
2
|
-
attribute vec3 a_Position;
|
|
3
|
-
attribute vec3 a_Extrude;
|
|
4
|
-
attribute float a_Size;
|
|
5
|
-
attribute vec2 a_Uv;
|
|
6
|
-
attribute float a_Rotate;
|
|
7
|
-
|
|
8
|
-
varying mat4 styleMappingMat; // 用于将在顶点着色器中计算好的样式值传递给片元
|
|
9
|
-
|
|
10
|
-
uniform mat4 u_ModelMatrix;
|
|
11
|
-
uniform mat4 u_Mvp;
|
|
12
|
-
uniform mat2 u_RotateMatrix;
|
|
13
|
-
uniform float u_isMeter;
|
|
14
|
-
|
|
15
|
-
varying vec2 v_uv; // 本身的 uv 坐标
|
|
16
|
-
varying vec2 v_Iconuv; // icon 贴图的 uv 坐标
|
|
17
|
-
|
|
18
|
-
uniform float u_raisingHeight: 0.0;
|
|
19
|
-
uniform float u_heightfixed: 0.0;
|
|
20
|
-
uniform float u_opacity : 1;
|
|
21
|
-
uniform vec2 u_offsets;
|
|
22
|
-
|
|
23
|
-
#pragma include "styleMapping"
|
|
24
|
-
#pragma include "styleMappingCalOpacity"
|
|
25
|
-
|
|
26
|
-
#pragma include "projection"
|
|
27
|
-
#pragma include "picking"
|
|
28
|
-
|
|
29
|
-
void main() {
|
|
30
|
-
vec3 extrude = a_Extrude;
|
|
31
|
-
|
|
32
|
-
v_uv = (a_Extrude.xy + 1.0)/2.0;
|
|
33
|
-
v_uv.y = 1.0 - v_uv.y;
|
|
34
|
-
v_Iconuv = a_Uv;
|
|
35
|
-
|
|
36
|
-
// cal style mapping - 数据纹理映射部分的计算
|
|
37
|
-
styleMappingMat = mat4(
|
|
38
|
-
0.0, 0.0, 0.0, 0.0, // opacity - empty - empty - empty
|
|
39
|
-
0.0, 0.0, 0.0, 0.0, // empty - empty - empty - empty
|
|
40
|
-
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
41
|
-
0.0, 0.0, 0.0, 0.0
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
float rowCount = u_cellTypeLayout[0][0]; // 当前的数据纹理有几行
|
|
45
|
-
float columnCount = u_cellTypeLayout[0][1]; // 当看到数据纹理有几列
|
|
46
|
-
float columnWidth = 1.0/columnCount; // 列宽
|
|
47
|
-
float rowHeight = 1.0/rowCount; // 行高
|
|
48
|
-
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
49
|
-
float id = a_vertexId; // 第n个顶点
|
|
50
|
-
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // 起始点在第几行
|
|
51
|
-
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // 起始点在第几列
|
|
52
|
-
|
|
53
|
-
// cell 固定顺序 opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
54
|
-
// 按顺序从 cell 中取值、若没有则自动往下取值
|
|
55
|
-
float textureOffset = 0.0; // 在 cell 中取值的偏移量
|
|
56
|
-
|
|
57
|
-
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
58
|
-
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
59
|
-
textureOffset = opacityAndOffset.g;
|
|
60
|
-
|
|
61
|
-
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
62
|
-
if(hasOffsets()) {
|
|
63
|
-
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
64
|
-
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
65
|
-
textureOffset += 1.0;
|
|
66
|
-
|
|
67
|
-
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
68
|
-
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
69
|
-
textureOffset += 1.0;
|
|
70
|
-
} else {
|
|
71
|
-
textrueOffsets = u_offsets;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// cal style mapping
|
|
75
|
-
|
|
76
|
-
highp float angle_sin = sin(a_Rotate);
|
|
77
|
-
highp float angle_cos = cos(a_Rotate);
|
|
78
|
-
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
|
79
|
-
|
|
80
|
-
// vec2 offset = (u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets);
|
|
81
|
-
vec2 offset = (rotation_matrix * u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets);
|
|
82
|
-
vec3 aPosition = a_Position;
|
|
83
|
-
if(u_isMeter < 1.0) {
|
|
84
|
-
// 不以米为实际单位
|
|
85
|
-
offset = project_pixel(offset);
|
|
86
|
-
} else {
|
|
87
|
-
// 以米为实际单位
|
|
88
|
-
|
|
89
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
90
|
-
aPosition.xy += offset;
|
|
91
|
-
offset.x = 0.0;
|
|
92
|
-
offset.y = 0.0;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
|
|
97
|
-
float raisingHeight = u_raisingHeight;
|
|
98
|
-
if(u_heightfixed < 1.0) { // height fixed
|
|
99
|
-
raisingHeight = project_pixel(u_raisingHeight);
|
|
100
|
-
} else {
|
|
101
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
102
|
-
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
103
|
-
raisingHeight = u_raisingHeight * mapboxZoomScale;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
108
|
-
gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
|
|
109
|
-
} else {
|
|
110
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
|
|
114
|
-
|
|
115
|
-
setPickingColor(a_PickingColor);
|
|
116
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
uniform sampler2D u_texture;
|
|
3
|
-
varying vec4 v_color;
|
|
4
|
-
varying vec2 v_uv;
|
|
5
|
-
uniform vec2 u_textSize;
|
|
6
|
-
uniform float u_opacity : 1;
|
|
7
|
-
|
|
8
|
-
varying mat4 styleMappingMat; // 传递从片元中传递的映射数据
|
|
9
|
-
|
|
10
|
-
#pragma include "picking"
|
|
11
|
-
|
|
12
|
-
void main(){
|
|
13
|
-
float opacity = styleMappingMat[0][0];
|
|
14
|
-
float size = styleMappingMat[1][0];
|
|
15
|
-
vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.;
|
|
16
|
-
vec4 textureColor;
|
|
17
|
-
|
|
18
|
-
// Y = 0.299R + 0.587G + 0.114B // 亮度提取
|
|
19
|
-
|
|
20
|
-
textureColor = texture2D(u_texture, pos);
|
|
21
|
-
|
|
22
|
-
// Tip: 去除边缘部分 mipmap 导致的混合变暗
|
|
23
|
-
float fragmengTocenter = distance(vec2(0.5), gl_PointCoord);
|
|
24
|
-
if(fragmengTocenter >= 0.5) {
|
|
25
|
-
float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;
|
|
26
|
-
textureColor.a *= luma;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){
|
|
32
|
-
gl_FragColor= textureColor;
|
|
33
|
-
}else {
|
|
34
|
-
gl_FragColor= step(0.01, textureColor.z) * v_color;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
gl_FragColor.a = gl_FragColor.a * opacity;
|
|
38
|
-
gl_FragColor = filterColor(gl_FragColor);
|
|
39
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
precision highp float;
|
|
2
|
-
attribute vec3 a_Position;
|
|
3
|
-
attribute vec4 a_Color;
|
|
4
|
-
attribute vec2 a_Uv;
|
|
5
|
-
attribute float a_Size;
|
|
6
|
-
varying vec4 v_color;
|
|
7
|
-
varying vec2 v_uv;
|
|
8
|
-
uniform mat4 u_ModelMatrix;
|
|
9
|
-
uniform mat4 u_Mvp;
|
|
10
|
-
uniform vec2 u_offsets;
|
|
11
|
-
|
|
12
|
-
uniform float u_opacity : 1;
|
|
13
|
-
uniform float u_raisingHeight: 0.0;
|
|
14
|
-
uniform float u_heightfixed: 0.0;
|
|
15
|
-
|
|
16
|
-
varying mat4 styleMappingMat; // 用于将在顶点着色器中计算好的样式值传递给片元
|
|
17
|
-
|
|
18
|
-
#pragma include "styleMapping"
|
|
19
|
-
#pragma include "styleMappingCalOpacity"
|
|
20
|
-
|
|
21
|
-
#pragma include "projection"
|
|
22
|
-
#pragma include "picking"
|
|
23
|
-
|
|
24
|
-
void main() {
|
|
25
|
-
// cal style mapping - 数据纹理映射部分的计算
|
|
26
|
-
styleMappingMat = mat4(
|
|
27
|
-
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
28
|
-
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
29
|
-
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
30
|
-
0.0, 0.0, 0.0, 0.0
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
float rowCount = u_cellTypeLayout[0][0]; // 当前的数据纹理有几行
|
|
34
|
-
float columnCount = u_cellTypeLayout[0][1]; // 当看到数据纹理有几列
|
|
35
|
-
float columnWidth = 1.0/columnCount; // 列宽
|
|
36
|
-
float rowHeight = 1.0/rowCount; // 行高
|
|
37
|
-
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
38
|
-
float id = a_vertexId; // 第n个顶点
|
|
39
|
-
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // 起始点在第几行
|
|
40
|
-
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // 起始点在第几列
|
|
41
|
-
|
|
42
|
-
// cell 固定顺序 opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
43
|
-
// 按顺序从 cell 中取值、若没有则自动往下取值
|
|
44
|
-
float textureOffset = 0.0; // 在 cell 中取值的偏移量
|
|
45
|
-
|
|
46
|
-
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
47
|
-
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
48
|
-
textureOffset = opacityAndOffset.g;
|
|
49
|
-
|
|
50
|
-
styleMappingMat[1][0] = a_Size;
|
|
51
|
-
|
|
52
|
-
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
53
|
-
if(hasOffsets()) {
|
|
54
|
-
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
55
|
-
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
56
|
-
textureOffset += 1.0;
|
|
57
|
-
|
|
58
|
-
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
59
|
-
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
60
|
-
textureOffset += 1.0;
|
|
61
|
-
} else {
|
|
62
|
-
textrueOffsets = u_offsets;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// cal style mapping - 数据纹理映射部分的计算
|
|
66
|
-
v_color = a_Color;
|
|
67
|
-
v_uv = a_Uv;
|
|
68
|
-
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
69
|
-
|
|
70
|
-
vec2 offset = project_pixel(textrueOffsets);
|
|
71
|
-
|
|
72
|
-
float raisingHeight = u_raisingHeight;
|
|
73
|
-
if(u_heightfixed < 1.0) { // false
|
|
74
|
-
raisingHeight = project_pixel(u_raisingHeight);
|
|
75
|
-
} else {
|
|
76
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
77
|
-
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
78
|
-
raisingHeight = u_raisingHeight * mapboxZoomScale;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
83
|
-
gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
|
|
84
|
-
} else {
|
|
85
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
|
|
89
|
-
setPickingColor(a_PickingColor);
|
|
90
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
attribute vec3 a_Position;
|
|
3
|
-
uniform mat4 u_ModelMatrix;
|
|
4
|
-
uniform mat4 u_Mvp;
|
|
5
|
-
attribute float a_Size;
|
|
6
|
-
attribute vec4 a_Color;
|
|
7
|
-
|
|
8
|
-
varying vec4 v_color;
|
|
9
|
-
|
|
10
|
-
#pragma include "projection"
|
|
11
|
-
#pragma include "project"
|
|
12
|
-
|
|
13
|
-
void main() {
|
|
14
|
-
v_color = a_Color;
|
|
15
|
-
|
|
16
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
17
|
-
gl_Position = u_Mvp * vec4(a_Position.xy, a_Position.z, 1.0);
|
|
18
|
-
} else {
|
|
19
|
-
vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);
|
|
20
|
-
gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy),project_pos.z,project_pos.w));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
|
|
24
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
uniform float u_additive;
|
|
3
|
-
uniform float u_opacity: 1.0;
|
|
4
|
-
|
|
5
|
-
varying vec4 v_data;
|
|
6
|
-
varying vec4 v_color;
|
|
7
|
-
varying float v_radius;
|
|
8
|
-
varying vec2 v_exteude;
|
|
9
|
-
#pragma include "sdf_2d"
|
|
10
|
-
#pragma include "picking"
|
|
11
|
-
|
|
12
|
-
void main() {
|
|
13
|
-
|
|
14
|
-
lowp float antialiasblur = v_data.z;
|
|
15
|
-
float r = v_radius / (v_radius);
|
|
16
|
-
|
|
17
|
-
float outer_df = sdCircle(v_data.xy, 1.0);
|
|
18
|
-
float inner_df = sdCircle(v_data.xy, r);
|
|
19
|
-
|
|
20
|
-
float opacity_t = smoothstep(0.0, antialiasblur, outer_df);
|
|
21
|
-
|
|
22
|
-
gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);
|
|
23
|
-
|
|
24
|
-
if(u_additive > 0.0) {
|
|
25
|
-
gl_FragColor *= opacity_t;
|
|
26
|
-
} else {
|
|
27
|
-
gl_FragColor.a *= opacity_t;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if(gl_FragColor.a > 0.0) {
|
|
31
|
-
gl_FragColor = filterColor(gl_FragColor);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
vec2 extrude = v_exteude;
|
|
35
|
-
vec2 dir = normalize(extrude);
|
|
36
|
-
vec2 baseDir = vec2(1.0, 0.0);
|
|
37
|
-
float pi = 3.14159265359;
|
|
38
|
-
// full circle
|
|
39
|
-
// float rades = dot(dir, baseDir);
|
|
40
|
-
// float flag = sign(dir.y);
|
|
41
|
-
// float radar_v = (flag - 1.0) * -0.5 + flag * acos(rades)/pi/2.0;
|
|
42
|
-
|
|
43
|
-
// half circle
|
|
44
|
-
float flag = sign(dir.y);
|
|
45
|
-
float rades = dot(dir, baseDir);
|
|
46
|
-
float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi;
|
|
47
|
-
// simple AA
|
|
48
|
-
if(radar_v > 0.99) {
|
|
49
|
-
radar_v = 1.0 - (radar_v - 0.99)/0.01;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
gl_FragColor.a *= radar_v;
|
|
53
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
attribute vec4 a_Color;
|
|
2
|
-
attribute vec3 a_Position;
|
|
3
|
-
attribute vec3 a_Extrude;
|
|
4
|
-
attribute float a_Size;
|
|
5
|
-
uniform float u_speed: 1.0;
|
|
6
|
-
uniform float u_time;
|
|
7
|
-
|
|
8
|
-
uniform mat4 u_ModelMatrix;
|
|
9
|
-
uniform mat4 u_Mvp;
|
|
10
|
-
uniform float u_isMeter;
|
|
11
|
-
|
|
12
|
-
varying vec4 v_data;
|
|
13
|
-
varying vec4 v_color;
|
|
14
|
-
varying float v_radius;
|
|
15
|
-
varying vec2 v_exteude;
|
|
16
|
-
|
|
17
|
-
#pragma include "projection"
|
|
18
|
-
#pragma include "picking"
|
|
19
|
-
|
|
20
|
-
void main() {
|
|
21
|
-
vec3 extrude = a_Extrude;
|
|
22
|
-
float newSize = setPickingSize(a_Size);
|
|
23
|
-
|
|
24
|
-
float time = u_time * u_speed;
|
|
25
|
-
mat2 rotateMatrix = mat2(
|
|
26
|
-
cos(time), sin(time),
|
|
27
|
-
-sin(time), cos(time)
|
|
28
|
-
);
|
|
29
|
-
v_exteude = rotateMatrix * a_Extrude.xy;
|
|
30
|
-
|
|
31
|
-
// unpack color(vec2)
|
|
32
|
-
v_color = a_Color;
|
|
33
|
-
|
|
34
|
-
// radius(16-bit)
|
|
35
|
-
v_radius = newSize;
|
|
36
|
-
|
|
37
|
-
// anti-alias
|
|
38
|
-
float blur = 0.0;
|
|
39
|
-
float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur);
|
|
40
|
-
|
|
41
|
-
vec2 offset = (extrude.xy * (newSize));
|
|
42
|
-
vec3 aPosition = a_Position;
|
|
43
|
-
if(u_isMeter < 1.0) {
|
|
44
|
-
// 不以米为实际单位
|
|
45
|
-
offset = project_pixel(offset);
|
|
46
|
-
} else {
|
|
47
|
-
// 以米为实际单位
|
|
48
|
-
antialiasblur *= pow(19.0 - u_Zoom, 2.0);
|
|
49
|
-
antialiasblur = max(antialiasblur, -0.01);
|
|
50
|
-
// offset *= 0.5;
|
|
51
|
-
|
|
52
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
53
|
-
aPosition.xy += offset;
|
|
54
|
-
offset.x = 0.0;
|
|
55
|
-
offset.y = 0.0;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
v_data = vec4(extrude.x, extrude.y, antialiasblur, -1.0);
|
|
60
|
-
|
|
61
|
-
vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
|
|
62
|
-
|
|
63
|
-
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
64
|
-
gl_Position = u_Mvp * vec4(project_pos.xy + offset, 0.0, 1.0);
|
|
65
|
-
} else {
|
|
66
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
setPickingColor(a_PickingColor);
|
|
70
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
uniform float u_opacity : 1;
|
|
3
|
-
uniform vec2 u_offsets;
|
|
4
|
-
uniform float u_additive;
|
|
5
|
-
|
|
6
|
-
uniform float u_stroke_opacity : 1;
|
|
7
|
-
|
|
8
|
-
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
9
|
-
|
|
10
|
-
varying vec4 v_color;
|
|
11
|
-
varying mat4 styleMappingMat; // 传递从片元中传递的映射数据
|
|
12
|
-
varying float v_blur;
|
|
13
|
-
varying float v_innerRadius;
|
|
14
|
-
|
|
15
|
-
#pragma include "picking"
|
|
16
|
-
void main() {
|
|
17
|
-
vec2 center = vec2(0.5);
|
|
18
|
-
|
|
19
|
-
float opacity = styleMappingMat[0][0];
|
|
20
|
-
// Tip: 片元到中心点的距离 0 - 1
|
|
21
|
-
float fragmengTocenter = distance(center, gl_PointCoord) * 2.0;
|
|
22
|
-
// Tip: 片元的剪切成圆形
|
|
23
|
-
float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if(v_innerRadius < 0.99) {
|
|
27
|
-
// 当存在 stroke 且 stroke > 0.01
|
|
28
|
-
float blurWidth = (1.0 - v_blur)/2.0;
|
|
29
|
-
vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity);
|
|
30
|
-
if(fragmengTocenter > v_innerRadius + blurWidth) {
|
|
31
|
-
gl_FragColor = stroke;
|
|
32
|
-
} else if(fragmengTocenter > v_innerRadius - blurWidth){
|
|
33
|
-
float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0);
|
|
34
|
-
gl_FragColor = mix(v_color, stroke, mixR);
|
|
35
|
-
} else {
|
|
36
|
-
gl_FragColor = v_color;
|
|
37
|
-
}
|
|
38
|
-
} else {
|
|
39
|
-
// 当不存在 stroke 或 stroke <= 0.01
|
|
40
|
-
gl_FragColor = v_color;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
gl_FragColor.a *= opacity;
|
|
44
|
-
|
|
45
|
-
gl_FragColor = filterColor(gl_FragColor);
|
|
46
|
-
|
|
47
|
-
if(u_additive > 0.0) {
|
|
48
|
-
gl_FragColor *= circleClipOpacity;
|
|
49
|
-
} else {
|
|
50
|
-
gl_FragColor.a *= circleClipOpacity;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
}
|