@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,258 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
|
|
9
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
|
|
11
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
|
|
13
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
14
|
-
import { isNumber } from 'lodash';
|
|
15
|
-
import BaseModel from "../../core/BaseModel";
|
|
16
|
-
import { GlobelPointFillTriangulation } from "../../core/triangulation";
|
|
17
|
-
|
|
18
|
-
/* babel-plugin-inline-import '../shaders/earth/fill_frag.glsl' */
|
|
19
|
-
var pointFillFrag = "uniform float u_additive;\n\nvarying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\n\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\n\nvoid main() {\n int shape = int(floor(v_data.w + 0.5));\n\n vec4 textrueStroke = vec4(\n styleMappingMat[1][0],\n styleMappingMat[1][1],\n styleMappingMat[1][2],\n styleMappingMat[1][3]\n );\n\n float opacity = styleMappingMat[0][0];\n float stroke_opacity = styleMappingMat[0][1];\n float strokeWidth = styleMappingMat[0][2];\n vec4 strokeColor = textrueStroke == vec4(0) ? v_color : textrueStroke;\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius + strokeWidth);\n\n float outer_df;\n float inner_df;\n // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\n if (shape == 0) {\n outer_df = sdCircle(v_data.xy, 1.0);\n inner_df = sdCircle(v_data.xy, r);\n } else if (shape == 1) {\n outer_df = sdEquilateralTriangle(1.1 * v_data.xy);\n inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);\n } else if (shape == 2) {\n outer_df = sdBox(v_data.xy, vec2(1.));\n inner_df = sdBox(v_data.xy, vec2(r));\n } else if (shape == 3) {\n outer_df = sdPentagon(v_data.xy, 0.8);\n inner_df = sdPentagon(v_data.xy, r * 0.8);\n } else if (shape == 4) {\n outer_df = sdHexagon(v_data.xy, 0.8);\n inner_df = sdHexagon(v_data.xy, r * 0.8);\n } else if (shape == 5) {\n outer_df = sdOctogon(v_data.xy, 1.0);\n inner_df = sdOctogon(v_data.xy, r);\n } else if (shape == 6) {\n outer_df = sdHexagram(v_data.xy, 0.52);\n inner_df = sdHexagram(v_data.xy, r * 0.52);\n } else if (shape == 7) {\n outer_df = sdRhombus(v_data.xy, vec2(1.0));\n inner_df = sdRhombus(v_data.xy, vec2(r));\n } else if (shape == 8) {\n outer_df = sdVesica(v_data.xy, 1.1, 0.8);\n inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);\n }\n\n if(outer_df > antialiasblur + 0.018) discard;\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n float color_t = strokeWidth < 0.01 ? 0.0 : smoothstep(\n antialiasblur,\n 0.0,\n inner_df\n );\n\n if(strokeWidth < 0.01) {\n gl_FragColor = vec4(v_color.rgb, v_color.a * opacity);\n } else {\n gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), strokeColor * stroke_opacity, color_t);\n }\n\n if(u_additive > 0.0) {\n gl_FragColor *= opacity_t;\n gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\n } else {\n gl_FragColor.a *= opacity_t;\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n";
|
|
20
|
-
|
|
21
|
-
/* babel-plugin-inline-import '../shaders/earth/fill_vert.glsl' */
|
|
22
|
-
var pointFillVert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nattribute float a_Shape;\n\nvarying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\n\nuniform float u_opacity : 1;\nuniform float u_stroke_opacity : 1;\nuniform float u_stroke_width : 2;\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\nuniform vec2 u_offsets;\n\nuniform float u_blur : 0.0;\n\n#pragma include \"styleMapping\"\n#pragma include \"styleMappingCalOpacity\"\n#pragma include \"styleMappingCalStrokeOpacity\"\n#pragma include \"styleMappingCalStrokeWidth\"\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\n\nvoid main() {\n vec3 extrude = a_Extrude;\n float shape_type = a_Shape;\n /*\n * setPickingSize \u8BBE\u7F6E\u62FE\u53D6\u5927\u5C0F\n */\n float newSize = setPickingSize(a_Size);\n // float newSize = setPickingSize(a_Size) * 0.00001038445708445579;\n\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n styleMappingMat = mat4(\n 0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty\n 0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA\n 0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]\n 0.0, 0.0, 0.0, 0.0\n );\n\n float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C\n float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217\n float columnWidth = 1.0/columnCount; // \u5217\u5BBD\n float rowHeight = 1.0/rowCount; // \u884C\u9AD8\n float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets\n float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9\n float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C\n float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217\n \n // cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ... \n // \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C\n float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF\n\n vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][0] = opacityAndOffset.r;\n textureOffset = opacityAndOffset.g;\n\n vec2 strokeOpacityAndOffset = calStrokeOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][1] = strokeOpacityAndOffset.r;\n textureOffset = strokeOpacityAndOffset.g;\n\n vec2 strokeWidthAndOffset = calStrokeWidthAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][2] = strokeWidthAndOffset.r;\n textureOffset = strokeWidthAndOffset.g;\n\n vec4 textrueStroke = vec4(-1.0, -1.0, -1.0, -1.0);\n if(hasStroke()) {\n vec2 valueRPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n styleMappingMat[1][0] = pos2value(valueRPos, columnWidth, rowHeight); // R\n textureOffset += 1.0;\n\n vec2 valueGPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n styleMappingMat[1][1] = pos2value(valueGPos, columnWidth, rowHeight); // G\n textureOffset += 1.0;\n\n vec2 valueBPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n styleMappingMat[1][2] = pos2value(valueBPos, columnWidth, rowHeight); // B\n textureOffset += 1.0;\n\n vec2 valueAPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);\n styleMappingMat[1][3] = pos2value(valueAPos, columnWidth, rowHeight); // A\n textureOffset += 1.0;\n } else {\n if(u_stroke_color == vec4(0.0)) {\n styleMappingMat[1][0] = v_color.r;\n styleMappingMat[1][1] = v_color.g;\n styleMappingMat[1][2] = v_color.b;\n styleMappingMat[1][3] = v_color.a;\n } else {\n styleMappingMat[1][0] = u_stroke_color.r;\n styleMappingMat[1][1] = u_stroke_color.g;\n styleMappingMat[1][2] = u_stroke_color.b;\n styleMappingMat[1][3] = u_stroke_color.a;\n }\n }\n\n // cal style mapping\n\n // unpack color(vec2)\n v_color = a_Color;\n\n // radius(16-bit)\n v_radius = newSize;\n\n // anti-alias\n // float antialiased_blur = -max(u_blur, antialiasblur);\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur);\n\n // TODP: /abs(extrude.x) \u662F\u4E3A\u4E86\u517C\u5BB9\u5730\u7403\u6A21\u5F0F\n v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);\n\n\n gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1, 1.0);\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
23
|
-
import { mat4, vec3 } from 'gl-matrix';
|
|
24
|
-
|
|
25
|
-
var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
26
|
-
_inherits(FillModel, _BaseModel);
|
|
27
|
-
|
|
28
|
-
var _super = _createSuper(FillModel);
|
|
29
|
-
|
|
30
|
-
function FillModel() {
|
|
31
|
-
_classCallCheck(this, FillModel);
|
|
32
|
-
|
|
33
|
-
return _super.apply(this, arguments);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
_createClass(FillModel, [{
|
|
37
|
-
key: "getUninforms",
|
|
38
|
-
value: function getUninforms() {
|
|
39
|
-
var _ref = this.layer.getLayerConfig(),
|
|
40
|
-
_ref$opacity = _ref.opacity,
|
|
41
|
-
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
|
|
42
|
-
_ref$strokeOpacity = _ref.strokeOpacity,
|
|
43
|
-
strokeOpacity = _ref$strokeOpacity === void 0 ? 1 : _ref$strokeOpacity,
|
|
44
|
-
_ref$strokeWidth = _ref.strokeWidth,
|
|
45
|
-
strokeWidth = _ref$strokeWidth === void 0 ? 0 : _ref$strokeWidth,
|
|
46
|
-
_ref$stroke = _ref.stroke,
|
|
47
|
-
stroke = _ref$stroke === void 0 ? 'rgba(0,0,0,0)' : _ref$stroke,
|
|
48
|
-
_ref$offsets = _ref.offsets,
|
|
49
|
-
offsets = _ref$offsets === void 0 ? [0, 0] : _ref$offsets,
|
|
50
|
-
blend = _ref.blend,
|
|
51
|
-
_ref$blur = _ref.blur,
|
|
52
|
-
blur = _ref$blur === void 0 ? 0 : _ref$blur;
|
|
53
|
-
|
|
54
|
-
if (this.dataTextureTest && this.dataTextureNeedUpdate({
|
|
55
|
-
opacity: opacity,
|
|
56
|
-
strokeOpacity: strokeOpacity,
|
|
57
|
-
strokeWidth: strokeWidth,
|
|
58
|
-
stroke: stroke,
|
|
59
|
-
offsets: offsets
|
|
60
|
-
})) {
|
|
61
|
-
// 判断当前的样式中哪些是需要进行数据映射的,哪些是常量,同时计算用于构建数据纹理的一些中间变量
|
|
62
|
-
this.judgeStyleAttributes({
|
|
63
|
-
opacity: opacity,
|
|
64
|
-
strokeOpacity: strokeOpacity,
|
|
65
|
-
strokeWidth: strokeWidth,
|
|
66
|
-
stroke: stroke,
|
|
67
|
-
offsets: offsets
|
|
68
|
-
});
|
|
69
|
-
var encodeData = this.layer.getEncodedData();
|
|
70
|
-
|
|
71
|
-
var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
|
|
72
|
-
data = _this$calDataFrame.data,
|
|
73
|
-
width = _this$calDataFrame.width,
|
|
74
|
-
height = _this$calDataFrame.height;
|
|
75
|
-
|
|
76
|
-
this.rowCount = height; // 当前数据纹理有多少行
|
|
77
|
-
|
|
78
|
-
this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
|
|
79
|
-
flipY: true,
|
|
80
|
-
data: data,
|
|
81
|
-
format: gl.LUMINANCE,
|
|
82
|
-
type: gl.FLOAT,
|
|
83
|
-
width: width,
|
|
84
|
-
height: height
|
|
85
|
-
}) : this.createTexture2D({
|
|
86
|
-
flipY: true,
|
|
87
|
-
data: [1],
|
|
88
|
-
format: gl.LUMINANCE,
|
|
89
|
-
type: gl.FLOAT,
|
|
90
|
-
width: 1,
|
|
91
|
-
height: 1
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
u_blur: blur,
|
|
97
|
-
u_additive: blend === 'additive' ? 1.0 : 0.0,
|
|
98
|
-
u_dataTexture: this.dataTexture,
|
|
99
|
-
// 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
|
|
100
|
-
u_cellTypeLayout: this.getCellTypeLayout(),
|
|
101
|
-
u_opacity: isNumber(opacity) ? opacity : 1.0,
|
|
102
|
-
u_stroke_opacity: isNumber(strokeOpacity) ? strokeOpacity : 1.0,
|
|
103
|
-
u_stroke_width: isNumber(strokeWidth) ? strokeWidth : 1.0,
|
|
104
|
-
u_stroke_color: this.getStrokeColor(stroke),
|
|
105
|
-
u_offsets: this.isOffsetStatic(offsets) ? offsets : [0, 0]
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}, {
|
|
109
|
-
key: "getAnimateUniforms",
|
|
110
|
-
value: function getAnimateUniforms() {
|
|
111
|
-
var _ref2 = this.layer.getLayerConfig(),
|
|
112
|
-
_ref2$animateOption = _ref2.animateOption,
|
|
113
|
-
animateOption = _ref2$animateOption === void 0 ? {
|
|
114
|
-
enable: false
|
|
115
|
-
} : _ref2$animateOption;
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
u_animate: this.animateOption2Array(animateOption),
|
|
119
|
-
u_time: this.layer.getLayerAnimateTime()
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
}, {
|
|
123
|
-
key: "initModels",
|
|
124
|
-
value: function initModels(callbackModel) {
|
|
125
|
-
this.buildModels(callbackModel);
|
|
126
|
-
}
|
|
127
|
-
}, {
|
|
128
|
-
key: "buildModels",
|
|
129
|
-
value: function buildModels(callbackModel) {
|
|
130
|
-
this.layer.triangulation = GlobelPointFillTriangulation;
|
|
131
|
-
this.layer.buildLayerModel({
|
|
132
|
-
moduleName: 'pointEarthFill',
|
|
133
|
-
vertexShader: pointFillVert,
|
|
134
|
-
fragmentShader: pointFillFrag,
|
|
135
|
-
triangulation: GlobelPointFillTriangulation,
|
|
136
|
-
depth: {
|
|
137
|
-
enable: true
|
|
138
|
-
},
|
|
139
|
-
blend: this.getBlend()
|
|
140
|
-
}).then(function (model) {
|
|
141
|
-
callbackModel([model]);
|
|
142
|
-
}).catch(function (err) {
|
|
143
|
-
console.warn(err);
|
|
144
|
-
callbackModel([]);
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}, {
|
|
148
|
-
key: "clearModels",
|
|
149
|
-
value: function clearModels() {
|
|
150
|
-
var _this$dataTexture;
|
|
151
|
-
|
|
152
|
-
(_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
|
|
153
|
-
} // overwrite baseModel func
|
|
154
|
-
|
|
155
|
-
}, {
|
|
156
|
-
key: "animateOption2Array",
|
|
157
|
-
value: function animateOption2Array(option) {
|
|
158
|
-
return [option.enable ? 0 : 1.0, option.speed || 1, option.rings || 3, 0];
|
|
159
|
-
}
|
|
160
|
-
}, {
|
|
161
|
-
key: "registerBuiltinAttributes",
|
|
162
|
-
value: function registerBuiltinAttributes() {
|
|
163
|
-
var _this = this;
|
|
164
|
-
|
|
165
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
166
|
-
name: 'extrude',
|
|
167
|
-
type: AttributeType.Attribute,
|
|
168
|
-
descriptor: {
|
|
169
|
-
name: 'a_Extrude',
|
|
170
|
-
buffer: {
|
|
171
|
-
// give the WebGL driver a hint that this buffer may change
|
|
172
|
-
usage: gl.DYNAMIC_DRAW,
|
|
173
|
-
data: [],
|
|
174
|
-
type: gl.FLOAT
|
|
175
|
-
},
|
|
176
|
-
size: 3,
|
|
177
|
-
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
178
|
-
var _vertex = _slicedToArray(vertex, 3),
|
|
179
|
-
x = _vertex[0],
|
|
180
|
-
y = _vertex[1],
|
|
181
|
-
z = _vertex[2];
|
|
182
|
-
|
|
183
|
-
var n1 = vec3.fromValues(0, 0, 1);
|
|
184
|
-
var n2 = vec3.fromValues(x, 0, z);
|
|
185
|
-
var xzReg = x >= 0 ? vec3.angle(n1, n2) : Math.PI * 2 - vec3.angle(n1, n2);
|
|
186
|
-
var yReg = Math.PI * 2 - Math.asin(y / 100);
|
|
187
|
-
var m = mat4.create();
|
|
188
|
-
mat4.rotateY(m, m, xzReg);
|
|
189
|
-
mat4.rotateX(m, m, yReg);
|
|
190
|
-
var v1 = vec3.fromValues(1, 1, 0);
|
|
191
|
-
vec3.transformMat4(v1, v1, m);
|
|
192
|
-
vec3.normalize(v1, v1);
|
|
193
|
-
var v2 = vec3.fromValues(-1, 1, 0);
|
|
194
|
-
vec3.transformMat4(v2, v2, m);
|
|
195
|
-
vec3.normalize(v2, v2);
|
|
196
|
-
var v3 = vec3.fromValues(-1, -1, 0);
|
|
197
|
-
vec3.transformMat4(v3, v3, m);
|
|
198
|
-
vec3.normalize(v3, v3);
|
|
199
|
-
var v4 = vec3.fromValues(1, -1, 0);
|
|
200
|
-
vec3.transformMat4(v4, v4, m);
|
|
201
|
-
vec3.normalize(v4, v4);
|
|
202
|
-
var extrude = [].concat(_toConsumableArray(v1), _toConsumableArray(v2), _toConsumableArray(v3), _toConsumableArray(v4));
|
|
203
|
-
var extrudeIndex = attributeIdx % 4 * 3;
|
|
204
|
-
return [extrude[extrudeIndex], extrude[extrudeIndex + 1], extrude[extrudeIndex + 2]];
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}); // point layer size;
|
|
208
|
-
|
|
209
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
210
|
-
name: 'size',
|
|
211
|
-
type: AttributeType.Attribute,
|
|
212
|
-
descriptor: {
|
|
213
|
-
name: 'a_Size',
|
|
214
|
-
buffer: {
|
|
215
|
-
// give the WebGL driver a hint that this buffer may change
|
|
216
|
-
usage: gl.DYNAMIC_DRAW,
|
|
217
|
-
data: [],
|
|
218
|
-
type: gl.FLOAT
|
|
219
|
-
},
|
|
220
|
-
size: 1,
|
|
221
|
-
update: function update(feature) {
|
|
222
|
-
var _feature$size = feature.size,
|
|
223
|
-
size = _feature$size === void 0 ? 5 : _feature$size;
|
|
224
|
-
return Array.isArray(size) ? [size[0]] : [size];
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}); // point layer size;
|
|
228
|
-
|
|
229
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
230
|
-
name: 'shape',
|
|
231
|
-
type: AttributeType.Attribute,
|
|
232
|
-
descriptor: {
|
|
233
|
-
name: 'a_Shape',
|
|
234
|
-
buffer: {
|
|
235
|
-
// give the WebGL driver a hint that this buffer may change
|
|
236
|
-
usage: gl.DYNAMIC_DRAW,
|
|
237
|
-
data: [],
|
|
238
|
-
type: gl.FLOAT
|
|
239
|
-
},
|
|
240
|
-
size: 1,
|
|
241
|
-
update: function update(feature) {
|
|
242
|
-
var _feature$shape = feature.shape,
|
|
243
|
-
shape = _feature$shape === void 0 ? 2 : _feature$shape;
|
|
244
|
-
|
|
245
|
-
var shape2d = _this.layer.getLayerConfig().shape2d;
|
|
246
|
-
|
|
247
|
-
var shapeIndex = shape2d.indexOf(shape);
|
|
248
|
-
return [shapeIndex];
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
}]);
|
|
254
|
-
|
|
255
|
-
return FillModel;
|
|
256
|
-
}(BaseModel);
|
|
257
|
-
|
|
258
|
-
export { FillModel as default };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IModel } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class ExtrudeModel extends BaseModel {
|
|
4
|
-
private raiseCount;
|
|
5
|
-
private raiseRepeat;
|
|
6
|
-
getUninforms(): {
|
|
7
|
-
u_pickLight: number;
|
|
8
|
-
u_heightfixed: number;
|
|
9
|
-
u_r: number;
|
|
10
|
-
u_dataTexture: import("@antv/l7-core").ITexture2D;
|
|
11
|
-
u_cellTypeLayout: number[];
|
|
12
|
-
u_opacity: number;
|
|
13
|
-
u_linearColor: number;
|
|
14
|
-
u_sourceColor: number[];
|
|
15
|
-
u_targetColor: number[];
|
|
16
|
-
u_opacitylinear: number;
|
|
17
|
-
u_opacitylinear_dir: number;
|
|
18
|
-
u_lightEnable: number;
|
|
19
|
-
};
|
|
20
|
-
initModels(callbackModel: (models: IModel[]) => void): void;
|
|
21
|
-
buildModels(callbackModel: (models: IModel[]) => void): Promise<void>;
|
|
22
|
-
clearModels(): void;
|
|
23
|
-
protected registerBuiltinAttributes(): void;
|
|
24
|
-
}
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
|
-
|
|
11
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
-
|
|
13
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
-
|
|
15
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
16
|
-
import { calculateCentroid, getCullFace, rgb2arr } from '@antv/l7-utils';
|
|
17
|
-
import { isNumber } from 'lodash';
|
|
18
|
-
import BaseModel from "../../core/BaseModel";
|
|
19
|
-
import { PointExtrudeTriangulation } from "../../core/triangulation";
|
|
20
|
-
|
|
21
|
-
/* babel-plugin-inline-import '../shaders/extrude/extrude_frag.glsl' */
|
|
22
|
-
var pointExtrudeFrag = "varying vec4 v_color;\nuniform float u_opacity: 1.0;\n\nuniform float u_pickLight: 0.0;\n\n#pragma include \"picking\"\n\nvarying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E\n\nuniform float u_linearColor: 0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\nuniform float u_opacitylinear: 0.0;\nuniform float u_opacitylinear_dir: 1.0;\n\nvoid main() {\n float opacity = styleMappingMat[0][0];\n float lightWeight = styleMappingMat[1][3];\n float barLinearZ = styleMappingMat[2][3];\n\n // \u8BBE\u7F6E\u5706\u67F1\u7684\u5E95\u8272\n if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272\n gl_FragColor = mix(u_sourceColor, u_targetColor, barLinearZ);\n gl_FragColor.rgb *= lightWeight;\n } else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272\n gl_FragColor = v_color;\n }\n\n // \u5E94\u7528\u900F\u660E\u5EA6\n gl_FragColor.a *= opacity;\n\n // \u5F00\u542F\u900F\u660E\u5EA6\u6E10\u53D8\n if(u_opacitylinear > 0.0) {\n gl_FragColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - barLinearZ): barLinearZ;\n }\n\n // picking\n if(u_pickLight > 0.0) {\n gl_FragColor = filterColorAlpha(gl_FragColor, lightWeight);\n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n";
|
|
23
|
-
|
|
24
|
-
/* babel-plugin-inline-import '../shaders/extrude/extrude_vert.glsl' */
|
|
25
|
-
var pointExtrudeVert = "precision highp float;\n\n#define pi 3.1415926535\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec3 a_Position;\nattribute vec3 a_Pos;\nattribute vec4 a_Color;\nattribute vec3 a_Size;\nattribute vec3 a_Normal;\n\nuniform float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\nuniform float u_r;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nvarying vec4 v_color;\n\nuniform float u_opacity : 1;\nuniform float u_lightEnable: 1;\n\nvarying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143\n\n#pragma include \"styleMapping\"\n#pragma include \"styleMappingCalOpacity\"\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nfloat getYRadian(float x, float z) {\n if(x > 0.0 && z > 0.0) {\n return atan(x/z);\n } else if(x > 0.0 && z <= 0.0){\n return atan(-z/x) + pi/2.0;\n } else if(x <= 0.0 && z <= 0.0) {\n return pi + atan(x/z); //atan(x/z) + \n } else {\n return atan(z/-x) + pi*3.0/2.0;\n }\n}\n\nfloat getXRadian(float y, float r) {\n return atan(y/r);\n}\n\nvoid main() {\n\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n styleMappingMat = mat4(\n 0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty\n 0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA - lightWeight\n 0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1] - linearZ(\u5782\u76F4\u65B9\u5411 0 - 1 \u7684\u503C)\n 0.0, 0.0, 0.0, 0.0\n );\n\n float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C\n float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217\n float columnWidth = 1.0/columnCount; // \u5217\u5BBD\n float rowHeight = 1.0/rowCount; // \u884C\u9AD8\n float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets\n float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9\n float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C\n float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217\n \n // cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ... \n // \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C\n float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF\n\n vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][0] = opacityAndOffset.r;\n textureOffset = opacityAndOffset.g;\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n vec3 size = a_Size * a_Position;\n\n // a_Position.z \u662F\u5728\u6784\u5EFA\u7F51\u683C\u7684\u65F6\u5019\u4F20\u5165\u7684\u6807\u51C6\u503C 0 - 1\uFF0C\u5728\u63D2\u503C\u5668\u63D2\u503C\u53EF\u4EE5\u83B7\u53D6 0\uFF5E1 \u7EBF\u6027\u6E10\u53D8\u7684\u503C\n styleMappingMat[2][3] = a_Position.z;\n\n vec3 offset = size; // \u63A7\u5236\u5706\u67F1\u4F53\u7684\u5927\u5C0F - \u4ECE\u6807\u51C6\u5355\u4F4D\u5706\u67F1\u4F53\u8FDB\u884C\u504F\u79FB\n if(u_heightfixed < 1.0) { // \u5706\u67F1\u4F53\u4E0D\u56FA\u5B9A\u9AD8\u5EA6\n \n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1\n offset = offset * pow(2.0, (19.0 - u_Zoom));\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3\n offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));\n }\n } else {// \u5706\u67F1\u4F53\u56FA\u5B9A\u9AD8\u5EA6 \uFF08 \u5904\u7406 mapbox \uFF09\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n offset *= 4.0/pow(2.0, 21.0 - u_Zoom);\n }\n }\n\n\n vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));\n\n // u_r \u63A7\u5236\u5706\u67F1\u7684\u751F\u957F\n vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);\n\n // \u5706\u67F1\u5149\u7167\u6548\u679C\n float lightWeight = 1.0;\n if(u_lightEnable > 0.0) { // \u53D6\u6D88\u4E09\u5143\u8868\u8FBE\u5F0F\uFF0C\u589E\u5F3A\u5065\u58EE\u6027\n lightWeight = calc_lighting(pos);\n }\n styleMappingMat[1][3] = lightWeight;\n\n v_color =vec4(a_Color.rgb * lightWeight, a_Color.w);\n\n // gl_Position = project_common_position_to_clipspace(pos);\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * pos;\n } else {\n gl_Position = project_common_position_to_clipspace(pos);\n }\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
26
|
-
|
|
27
|
-
var ExtrudeModel = /*#__PURE__*/function (_BaseModel) {
|
|
28
|
-
_inherits(ExtrudeModel, _BaseModel);
|
|
29
|
-
|
|
30
|
-
var _super = _createSuper(ExtrudeModel);
|
|
31
|
-
|
|
32
|
-
function ExtrudeModel() {
|
|
33
|
-
var _this;
|
|
34
|
-
|
|
35
|
-
_classCallCheck(this, ExtrudeModel);
|
|
36
|
-
|
|
37
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
38
|
-
args[_key] = arguments[_key];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
42
|
-
|
|
43
|
-
_defineProperty(_assertThisInitialized(_this), "raiseCount", 0);
|
|
44
|
-
|
|
45
|
-
_defineProperty(_assertThisInitialized(_this), "raiseRepeat", 0);
|
|
46
|
-
|
|
47
|
-
return _this;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
_createClass(ExtrudeModel, [{
|
|
51
|
-
key: "getUninforms",
|
|
52
|
-
value: function getUninforms() {
|
|
53
|
-
var _ref = this.layer.getLayerConfig(),
|
|
54
|
-
_ref$animateOption = _ref.animateOption,
|
|
55
|
-
animateOption = _ref$animateOption === void 0 ? {
|
|
56
|
-
enable: false,
|
|
57
|
-
speed: 0.01,
|
|
58
|
-
repeat: false
|
|
59
|
-
} : _ref$animateOption,
|
|
60
|
-
_ref$opacity = _ref.opacity,
|
|
61
|
-
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
|
|
62
|
-
sourceColor = _ref.sourceColor,
|
|
63
|
-
targetColor = _ref.targetColor,
|
|
64
|
-
_ref$pickLight = _ref.pickLight,
|
|
65
|
-
pickLight = _ref$pickLight === void 0 ? false : _ref$pickLight,
|
|
66
|
-
_ref$heightfixed = _ref.heightfixed,
|
|
67
|
-
heightfixed = _ref$heightfixed === void 0 ? false : _ref$heightfixed,
|
|
68
|
-
_ref$opacityLinear = _ref.opacityLinear,
|
|
69
|
-
opacityLinear = _ref$opacityLinear === void 0 ? {
|
|
70
|
-
enable: false,
|
|
71
|
-
dir: 'up'
|
|
72
|
-
} : _ref$opacityLinear,
|
|
73
|
-
_ref$lightEnable = _ref.lightEnable,
|
|
74
|
-
lightEnable = _ref$lightEnable === void 0 ? true : _ref$lightEnable;
|
|
75
|
-
|
|
76
|
-
if (this.dataTextureTest && this.dataTextureNeedUpdate({
|
|
77
|
-
opacity: opacity
|
|
78
|
-
})) {
|
|
79
|
-
this.judgeStyleAttributes({
|
|
80
|
-
opacity: opacity
|
|
81
|
-
});
|
|
82
|
-
var encodeData = this.layer.getEncodedData();
|
|
83
|
-
|
|
84
|
-
var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
|
|
85
|
-
data = _this$calDataFrame.data,
|
|
86
|
-
width = _this$calDataFrame.width,
|
|
87
|
-
height = _this$calDataFrame.height;
|
|
88
|
-
|
|
89
|
-
this.rowCount = height; // 当前数据纹理有多少行
|
|
90
|
-
|
|
91
|
-
this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
|
|
92
|
-
flipY: true,
|
|
93
|
-
data: data,
|
|
94
|
-
format: gl.LUMINANCE,
|
|
95
|
-
type: gl.FLOAT,
|
|
96
|
-
width: width,
|
|
97
|
-
height: height
|
|
98
|
-
}) : this.createTexture2D({
|
|
99
|
-
flipY: true,
|
|
100
|
-
data: [1],
|
|
101
|
-
format: gl.LUMINANCE,
|
|
102
|
-
type: gl.FLOAT,
|
|
103
|
-
width: 1,
|
|
104
|
-
height: 1
|
|
105
|
-
});
|
|
106
|
-
} // 转化渐变色
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var useLinearColor = 0; // 默认不生效
|
|
110
|
-
|
|
111
|
-
var sourceColorArr = [0, 0, 0, 0];
|
|
112
|
-
var targetColorArr = [0, 0, 0, 0];
|
|
113
|
-
|
|
114
|
-
if (sourceColor && targetColor) {
|
|
115
|
-
sourceColorArr = rgb2arr(sourceColor);
|
|
116
|
-
targetColorArr = rgb2arr(targetColor);
|
|
117
|
-
useLinearColor = 1;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (this.raiseCount < 1 && this.raiseRepeat > 0) {
|
|
121
|
-
if (animateOption.enable) {
|
|
122
|
-
var _animateOption$speed = animateOption.speed,
|
|
123
|
-
speed = _animateOption$speed === void 0 ? 0.01 : _animateOption$speed;
|
|
124
|
-
this.raiseCount += speed;
|
|
125
|
-
|
|
126
|
-
if (this.raiseCount >= 1) {
|
|
127
|
-
if (this.raiseRepeat > 1) {
|
|
128
|
-
this.raiseCount = 0;
|
|
129
|
-
this.raiseRepeat--;
|
|
130
|
-
} else {
|
|
131
|
-
this.raiseCount = 1;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return {
|
|
138
|
-
// 圆柱体的拾取高亮是否要计算光照
|
|
139
|
-
u_pickLight: Number(pickLight),
|
|
140
|
-
// 圆柱体是否固定高度
|
|
141
|
-
u_heightfixed: Number(heightfixed),
|
|
142
|
-
u_r: animateOption.enable && this.raiseRepeat > 0 ? this.raiseCount : 1.0,
|
|
143
|
-
u_dataTexture: this.dataTexture,
|
|
144
|
-
// 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
|
|
145
|
-
u_cellTypeLayout: this.getCellTypeLayout(),
|
|
146
|
-
u_opacity: isNumber(opacity) ? opacity : 1.0,
|
|
147
|
-
// 渐变色支持参数
|
|
148
|
-
u_linearColor: useLinearColor,
|
|
149
|
-
u_sourceColor: sourceColorArr,
|
|
150
|
-
u_targetColor: targetColorArr,
|
|
151
|
-
// 透明度渐变
|
|
152
|
-
u_opacitylinear: Number(opacityLinear.enable),
|
|
153
|
-
u_opacitylinear_dir: opacityLinear.dir === 'up' ? 1.0 : 0.0,
|
|
154
|
-
// 光照计算开关
|
|
155
|
-
u_lightEnable: Number(lightEnable)
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
}, {
|
|
159
|
-
key: "initModels",
|
|
160
|
-
value: function initModels(callbackModel) {
|
|
161
|
-
this.buildModels(callbackModel);
|
|
162
|
-
}
|
|
163
|
-
}, {
|
|
164
|
-
key: "buildModels",
|
|
165
|
-
value: function () {
|
|
166
|
-
var _buildModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(callbackModel) {
|
|
167
|
-
var _ref2, _ref2$depth, depth, _ref2$animateOption$r, repeat;
|
|
168
|
-
|
|
169
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
170
|
-
while (1) {
|
|
171
|
-
switch (_context.prev = _context.next) {
|
|
172
|
-
case 0:
|
|
173
|
-
// GAODE1.x GAODE2.x MAPBOX
|
|
174
|
-
_ref2 = this.layer.getLayerConfig(), _ref2$depth = _ref2.depth, depth = _ref2$depth === void 0 ? true : _ref2$depth, _ref2$animateOption$r = _ref2.animateOption.repeat, repeat = _ref2$animateOption$r === void 0 ? 1 : _ref2$animateOption$r;
|
|
175
|
-
this.raiseRepeat = repeat;
|
|
176
|
-
this.layer.buildLayerModel({
|
|
177
|
-
moduleName: 'pointExtrude',
|
|
178
|
-
vertexShader: pointExtrudeVert,
|
|
179
|
-
fragmentShader: pointExtrudeFrag,
|
|
180
|
-
triangulation: PointExtrudeTriangulation,
|
|
181
|
-
blend: this.getBlend(),
|
|
182
|
-
cull: {
|
|
183
|
-
enable: true,
|
|
184
|
-
face: getCullFace(this.mapService.version)
|
|
185
|
-
},
|
|
186
|
-
depth: {
|
|
187
|
-
enable: depth
|
|
188
|
-
}
|
|
189
|
-
}).then(function (model) {
|
|
190
|
-
callbackModel([model]);
|
|
191
|
-
}).catch(function (err) {
|
|
192
|
-
console.warn(err);
|
|
193
|
-
callbackModel([]);
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
case 3:
|
|
197
|
-
case "end":
|
|
198
|
-
return _context.stop();
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}, _callee, this);
|
|
202
|
-
}));
|
|
203
|
-
|
|
204
|
-
function buildModels(_x) {
|
|
205
|
-
return _buildModels.apply(this, arguments);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return buildModels;
|
|
209
|
-
}()
|
|
210
|
-
}, {
|
|
211
|
-
key: "clearModels",
|
|
212
|
-
value: function clearModels() {
|
|
213
|
-
var _this$dataTexture;
|
|
214
|
-
|
|
215
|
-
(_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
|
|
216
|
-
}
|
|
217
|
-
}, {
|
|
218
|
-
key: "registerBuiltinAttributes",
|
|
219
|
-
value: function registerBuiltinAttributes() {
|
|
220
|
-
// point layer size;
|
|
221
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
222
|
-
name: 'size',
|
|
223
|
-
type: AttributeType.Attribute,
|
|
224
|
-
descriptor: {
|
|
225
|
-
name: 'a_Size',
|
|
226
|
-
buffer: {
|
|
227
|
-
usage: gl.DYNAMIC_DRAW,
|
|
228
|
-
data: [],
|
|
229
|
-
type: gl.FLOAT
|
|
230
|
-
},
|
|
231
|
-
size: 3,
|
|
232
|
-
update: function update(feature) {
|
|
233
|
-
var size = feature.size;
|
|
234
|
-
|
|
235
|
-
if (size) {
|
|
236
|
-
var buffersize = [];
|
|
237
|
-
|
|
238
|
-
if (Array.isArray(size)) {
|
|
239
|
-
buffersize = size.length === 2 ? [size[0], size[0], size[1]] : size;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (!Array.isArray(size)) {
|
|
243
|
-
buffersize = [size, size, size];
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return buffersize;
|
|
247
|
-
} else {
|
|
248
|
-
return [2, 2, 2];
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}); // point layer size;
|
|
253
|
-
|
|
254
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
255
|
-
name: 'normal',
|
|
256
|
-
type: AttributeType.Attribute,
|
|
257
|
-
descriptor: {
|
|
258
|
-
name: 'a_Normal',
|
|
259
|
-
buffer: {
|
|
260
|
-
// give the WebGL driver a hint that this buffer may change
|
|
261
|
-
usage: gl.STATIC_DRAW,
|
|
262
|
-
data: [],
|
|
263
|
-
type: gl.FLOAT
|
|
264
|
-
},
|
|
265
|
-
size: 3,
|
|
266
|
-
update: function update(feature, featureIdx, vertex, attributeIdx, normal) {
|
|
267
|
-
return normal;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
272
|
-
name: 'pos',
|
|
273
|
-
type: AttributeType.Attribute,
|
|
274
|
-
descriptor: {
|
|
275
|
-
name: 'a_Pos',
|
|
276
|
-
buffer: {
|
|
277
|
-
// give the WebGL driver a hint that this buffer may change
|
|
278
|
-
usage: gl.DYNAMIC_DRAW,
|
|
279
|
-
data: [],
|
|
280
|
-
type: gl.FLOAT
|
|
281
|
-
},
|
|
282
|
-
size: 3,
|
|
283
|
-
update: function update(feature) {
|
|
284
|
-
var coordinates = calculateCentroid(feature.coordinates);
|
|
285
|
-
return [coordinates[0], coordinates[1], 0];
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
}]);
|
|
291
|
-
|
|
292
|
-
return ExtrudeModel;
|
|
293
|
-
}(BaseModel);
|
|
294
|
-
|
|
295
|
-
export { ExtrudeModel as default };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { IAnimateOption, IAttribute, IElements, IModel, IModelUniform } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class FillModel extends BaseModel {
|
|
4
|
-
private meter2coord;
|
|
5
|
-
private meterYScale;
|
|
6
|
-
private isMeter;
|
|
7
|
-
private unit;
|
|
8
|
-
getUninforms(): IModelUniform;
|
|
9
|
-
getAnimateUniforms(): IModelUniform;
|
|
10
|
-
getAttribute(): {
|
|
11
|
-
attributes: {
|
|
12
|
-
[attributeName: string]: IAttribute;
|
|
13
|
-
};
|
|
14
|
-
elements: IElements;
|
|
15
|
-
};
|
|
16
|
-
initModels(callbackModel: (models: IModel[]) => void): void;
|
|
17
|
-
/**
|
|
18
|
-
* 计算等面积点图层(unit meter)笛卡尔坐标标度与世界坐标标度的比例
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
calMeter2Coord(): void;
|
|
22
|
-
buildModels(callbackModel: (models: IModel[]) => void): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* 根据 animateOption 的值返回对应的 shader 代码
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
getShaders(animateOption: Partial<IAnimateOption>): {
|
|
28
|
-
frag: string;
|
|
29
|
-
vert: string;
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
clearModels(): void;
|
|
33
|
-
protected animateOption2Array(option: Partial<IAnimateOption>): number[];
|
|
34
|
-
protected registerBuiltinAttributes(): void;
|
|
35
|
-
/**
|
|
36
|
-
* 判断是否更新点图层的计量单位
|
|
37
|
-
* @param unit
|
|
38
|
-
*/
|
|
39
|
-
private updateUnit;
|
|
40
|
-
}
|