@antv/l7-layers 2.25.6 → 2.25.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/es/canvas/index.d.ts +0 -18
- package/es/canvas/index.js +0 -70
- package/es/canvas/models/canvas.d.ts +0 -23
- package/es/canvas/models/canvas.js +0 -141
- package/es/canvas/models/constants.d.ts +0 -2
- package/es/canvas/models/constants.js +0 -6
- package/es/canvas/models/index.d.ts +0 -2
- package/es/canvas/models/index.js +0 -2
- package/es/citybuilding/building.d.ts +0 -7
- package/es/citybuilding/building.js +0 -25
- package/es/citybuilding/models/build.d.ts +0 -33
- package/es/citybuilding/models/build.js +0 -160
- package/es/citybuilding/shaders/build_frag.glsl +0 -123
- package/es/citybuilding/shaders/build_vert.glsl +0 -58
- package/es/core/BaseLayer.d.ts +0 -265
- package/es/core/BaseLayer.js +0 -1310
- package/es/core/BaseModel.d.ts +0 -95
- package/es/core/BaseModel.js +0 -367
- package/es/core/CommonStyleAttribute.d.ts +0 -16
- package/es/core/CommonStyleAttribute.js +0 -114
- package/es/core/LayerPickService.d.ts +0 -12
- package/es/core/LayerPickService.js +0 -102
- package/es/core/TextureService.d.ts +0 -15
- package/es/core/TextureService.js +0 -65
- package/es/core/constant.d.ts +0 -6
- package/es/core/constant.js +0 -19
- package/es/core/interface.d.ts +0 -284
- package/es/core/interface.js +0 -32
- package/es/core/line_trangluation.d.ts +0 -19
- package/es/core/line_trangluation.js +0 -86
- package/es/core/schema.d.ts +0 -27
- package/es/core/schema.js +0 -25
- package/es/core/shape/Path.d.ts +0 -40
- package/es/core/shape/Path.js +0 -69
- package/es/core/shape/arrow.d.ts +0 -25
- package/es/core/shape/arrow.js +0 -144
- package/es/core/shape/extrude.d.ts +0 -17
- package/es/core/shape/extrude.js +0 -133
- package/es/core/triangulation.d.ts +0 -136
- package/es/core/triangulation.js +0 -601
- package/es/core/utils.d.ts +0 -5
- package/es/core/utils.js +0 -36
- package/es/earth/index.d.ts +0 -22
- package/es/earth/index.js +0 -54
- package/es/earth/models/atmosphere.d.ts +0 -30
- package/es/earth/models/atmosphere.js +0 -116
- package/es/earth/models/base.d.ts +0 -37
- package/es/earth/models/base.js +0 -172
- package/es/earth/models/bloomsphere.d.ts +0 -30
- package/es/earth/models/bloomsphere.js +0 -115
- package/es/earth/shaders/atmosphere/atmosphere_frag.glsl +0 -17
- package/es/earth/shaders/atmosphere/atmosphere_vert.glsl +0 -24
- package/es/earth/shaders/base/base_frag.glsl +0 -11
- package/es/earth/shaders/base/base_vert.glsl +0 -52
- package/es/earth/shaders/bloomshpere/bloomsphere_frag.glsl +0 -15
- package/es/earth/shaders/bloomshpere/bloomsphere_vert.glsl +0 -20
- package/es/earth/utils.d.ts +0 -26
- package/es/earth/utils.js +0 -99
- package/es/geometry/index.d.ts +0 -22
- package/es/geometry/index.js +0 -53
- package/es/geometry/models/billboard.d.ts +0 -39
- package/es/geometry/models/billboard.js +0 -175
- 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 -58
- package/es/geometry/models/plane.js +0 -308
- package/es/geometry/models/sprite.d.ts +0 -48
- package/es/geometry/models/sprite.js +0 -225
- package/es/geometry/shaders/billboard_frag.glsl +0 -18
- package/es/geometry/shaders/billboard_vert.glsl +0 -43
- package/es/geometry/shaders/plane_frag.glsl +0 -23
- package/es/geometry/shaders/plane_vert.glsl +0 -31
- package/es/geometry/shaders/sprite_frag.glsl +0 -23
- package/es/geometry/shaders/sprite_vert.glsl +0 -21
- package/es/heatmap/index.d.ts +0 -13
- package/es/heatmap/index.js +0 -87
- package/es/heatmap/models/grid.d.ts +0 -29
- package/es/heatmap/models/grid.js +0 -83
- package/es/heatmap/models/grid3d.d.ts +0 -31
- package/es/heatmap/models/grid3d.js +0 -122
- package/es/heatmap/models/heatmap.d.ts +0 -46
- package/es/heatmap/models/heatmap.js +0 -447
- package/es/heatmap/models/hexagon.d.ts +0 -29
- package/es/heatmap/models/hexagon.js +0 -83
- package/es/heatmap/models/index.d.ts +0 -5
- package/es/heatmap/models/index.js +0 -12
- package/es/heatmap/shaders/grid/grid_frag.glsl +0 -9
- package/es/heatmap/shaders/grid/grid_vert.glsl +0 -30
- package/es/heatmap/shaders/grid3d/grid_3d_frag.glsl +0 -17
- package/es/heatmap/shaders/grid3d/grid_3d_vert.glsl +0 -34
- package/es/heatmap/shaders/heatmap/heatmap_3d_frag.glsl +0 -23
- package/es/heatmap/shaders/heatmap/heatmap_3d_vert.glsl +0 -59
- package/es/heatmap/shaders/heatmap/heatmap_frag.glsl +0 -40
- package/es/heatmap/shaders/heatmap/heatmap_framebuffer_frag.glsl +0 -17
- package/es/heatmap/shaders/heatmap/heatmap_framebuffer_vert.glsl +0 -36
- package/es/heatmap/shaders/heatmap/heatmap_vert.glsl +0 -21
- package/es/heatmap/shaders/hexagon/hexagon_frag.glsl +0 -8
- package/es/heatmap/shaders/hexagon/hexagon_vert.glsl +0 -30
- package/es/heatmap/triangulation.d.ts +0 -5
- package/es/heatmap/triangulation.js +0 -33
- package/es/image/index.d.ts +0 -9
- package/es/image/index.js +0 -28
- package/es/image/models/image.d.ts +0 -31
- package/es/image/models/image.js +0 -113
- package/es/image/models/index.d.ts +0 -5
- package/es/image/models/index.js +0 -5
- package/es/image/shaders/dataImage_frag.glsl +0 -32
- package/es/image/shaders/image_frag.glsl +0 -38
- package/es/image/shaders/image_vert.glsl +0 -20
- package/es/index.d.ts +0 -18
- package/es/index.js +0 -18
- package/es/line/index.d.ts +0 -36
- package/es/line/index.js +0 -90
- package/es/line/models/arc.d.ts +0 -40
- package/es/line/models/arc.js +0 -279
- package/es/line/models/arc_3d.d.ts +0 -40
- package/es/line/models/arc_3d.js +0 -269
- package/es/line/models/flow.d.ts +0 -31
- package/es/line/models/flow.js +0 -140
- package/es/line/models/great_circle.d.ts +0 -34
- package/es/line/models/great_circle.js +0 -240
- package/es/line/models/index.d.ts +0 -5
- package/es/line/models/index.js +0 -18
- package/es/line/models/line.d.ts +0 -44
- package/es/line/models/line.js +0 -273
- package/es/line/models/simple_line.d.ts +0 -33
- package/es/line/models/simple_line.js +0 -118
- package/es/line/models/wall.d.ts +0 -34
- package/es/line/models/wall.js +0 -223
- package/es/line/shaders/arc/line_arc_frag.glsl +0 -92
- package/es/line/shaders/arc/line_arc_vert.glsl +0 -156
- package/es/line/shaders/arc3d/line_arc_3d_frag.glsl +0 -108
- package/es/line/shaders/arc3d/line_arc_3d_vert.glsl +0 -177
- package/es/line/shaders/flow/flow_line_frag.glsl +0 -13
- package/es/line/shaders/flow/flow_line_vert.glsl +0 -76
- package/es/line/shaders/greatCircle/line_arc_great_circle_frag.glsl +0 -99
- package/es/line/shaders/greatCircle/line_arc_great_circle_vert.glsl +0 -165
- package/es/line/shaders/line/line_frag.glsl +0 -122
- package/es/line/shaders/line/line_vert.glsl +0 -101
- package/es/line/shaders/simple/simpleline_frag.glsl +0 -30
- package/es/line/shaders/simple/simpleline_vert.glsl +0 -45
- package/es/line/shaders/wall/wall_frag.glsl +0 -94
- package/es/line/shaders/wall/wall_vert.glsl +0 -90
- package/es/mask/index.d.ts +0 -16
- package/es/mask/index.js +0 -21
- package/es/mask/models/fill.d.ts +0 -18
- package/es/mask/models/fill.js +0 -61
- package/es/mask/models/index.d.ts +0 -5
- package/es/mask/models/index.js +0 -5
- package/es/mask/shaders/mask_vert.glsl +0 -14
- package/es/plugins/DataMappingPlugin.d.ts +0 -12
- package/es/plugins/DataMappingPlugin.js +0 -226
- package/es/plugins/DataSourcePlugin.d.ts +0 -6
- package/es/plugins/DataSourcePlugin.js +0 -75
- package/es/plugins/FeatureScalePlugin.d.ts +0 -20
- package/es/plugins/FeatureScalePlugin.js +0 -295
- package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -4
- package/es/plugins/LayerAnimateStylePlugin.js +0 -14
- package/es/plugins/LayerMaskPlugin.d.ts +0 -7
- package/es/plugins/LayerMaskPlugin.js +0 -19
- package/es/plugins/LayerModelPlugin.d.ts +0 -10
- package/es/plugins/LayerModelPlugin.js +0 -60
- package/es/plugins/LayerStylePlugin.d.ts +0 -7
- package/es/plugins/LayerStylePlugin.js +0 -18
- package/es/plugins/LightingPlugin.d.ts +0 -35
- package/es/plugins/LightingPlugin.js +0 -84
- package/es/plugins/MultiPassRendererPlugin.d.ts +0 -22
- package/es/plugins/MultiPassRendererPlugin.js +0 -52
- package/es/plugins/PixelPickingPlugin.d.ts +0 -11
- package/es/plugins/PixelPickingPlugin.js +0 -146
- package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -10
- package/es/plugins/RegisterStyleAttributePlugin.js +0 -72
- package/es/plugins/ShaderUniformPlugin.d.ts +0 -17
- package/es/plugins/ShaderUniformPlugin.js +0 -196
- package/es/plugins/UpdateModelPlugin.d.ts +0 -7
- package/es/plugins/UpdateModelPlugin.js +0 -20
- package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -9
- package/es/plugins/UpdateStyleAttributePlugin.js +0 -54
- package/es/plugins/index.d.ts +0 -15
- package/es/plugins/index.js +0 -18
- package/es/point/index.d.ts +0 -35
- package/es/point/index.js +0 -153
- package/es/point/models/billboard_point.d.ts +0 -35
- package/es/point/models/billboard_point.js +0 -95
- package/es/point/models/earthExtrude.d.ts +0 -32
- package/es/point/models/earthExtrude.js +0 -199
- package/es/point/models/earthFill.d.ts +0 -31
- package/es/point/models/earthFill.js +0 -158
- package/es/point/models/extrude.d.ts +0 -32
- package/es/point/models/extrude.js +0 -195
- package/es/point/models/fill.d.ts +0 -47
- package/es/point/models/fill.js +0 -180
- package/es/point/models/fillImage.d.ts +0 -42
- package/es/point/models/fillImage.js +0 -189
- package/es/point/models/image.d.ts +0 -48
- package/es/point/models/image.js +0 -293
- package/es/point/models/index.d.ts +0 -5
- package/es/point/models/index.js +0 -24
- package/es/point/models/normal.d.ts +0 -36
- package/es/point/models/normal.js +0 -89
- package/es/point/models/radar.d.ts +0 -37
- package/es/point/models/radar.js +0 -115
- package/es/point/models/text.d.ts +0 -85
- package/es/point/models/text.js +0 -503
- package/es/point/shaders/billboard/billboard_point_frag.glsl +0 -48
- package/es/point/shaders/billboard/billboard_point_vert.glsl +0 -33
- package/es/point/shaders/earthExtrude/earthExtrude_frag.glsl +0 -36
- package/es/point/shaders/earthExtrude/earthExtrude_vert.glsl +0 -118
- package/es/point/shaders/earthFill/earthFill_frag.glsl +0 -79
- package/es/point/shaders/earthFill/earthFill_vert.glsl +0 -46
- package/es/point/shaders/extrude/extrude_frag.glsl +0 -29
- package/es/point/shaders/extrude/extrude_vert.glsl +0 -95
- package/es/point/shaders/fill/fill_frag.glsl +0 -97
- package/es/point/shaders/fill/fill_vert.glsl +0 -79
- package/es/point/shaders/fillImage/fillImage_frag.glsl +0 -23
- package/es/point/shaders/fillImage/fillImage_vert.glsl +0 -46
- package/es/point/shaders/image/image_frag.glsl +0 -45
- package/es/point/shaders/image/image_vert.glsl +0 -47
- package/es/point/shaders/normal/normal_frag.glsl +0 -5
- package/es/point/shaders/normal/normal_vert.glsl +0 -22
- package/es/point/shaders/radar/radar_frag.glsl +0 -52
- package/es/point/shaders/radar/radar_vert.glsl +0 -53
- package/es/point/shaders/text/text_frag.glsl +0 -47
- package/es/point/shaders/text/text_vert.glsl +0 -65
- package/es/point/shape/extrude.d.ts +0 -15
- package/es/point/shape/extrude.js +0 -48
- package/es/polygon/index.d.ts +0 -18
- package/es/polygon/index.js +0 -71
- package/es/polygon/models/extrude.d.ts +0 -41
- package/es/polygon/models/extrude.js +0 -248
- package/es/polygon/models/extrusion.d.ts +0 -40
- package/es/polygon/models/extrusion.js +0 -137
- package/es/polygon/models/fill.d.ts +0 -32
- package/es/polygon/models/fill.js +0 -127
- package/es/polygon/models/index.d.ts +0 -5
- package/es/polygon/models/index.js +0 -26
- package/es/polygon/models/ocean.d.ts +0 -37
- package/es/polygon/models/ocean.js +0 -172
- package/es/polygon/models/water.d.ts +0 -35
- package/es/polygon/models/water.js +0 -150
- package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -24
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -49
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -53
- package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -74
- package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -55
- package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -54
- package/es/polygon/shaders/extrusion/polygon_extrusion_frag.glsl +0 -8
- package/es/polygon/shaders/extrusion/polygon_extrusion_vert.glsl +0 -24
- package/es/polygon/shaders/fill/fill_frag.glsl +0 -8
- package/es/polygon/shaders/fill/fill_linear_frag.glsl +0 -23
- package/es/polygon/shaders/fill/fill_linear_vert.glsl +0 -36
- package/es/polygon/shaders/fill/fill_vert.glsl +0 -35
- package/es/polygon/shaders/ocean/ocean_frag.glsl +0 -277
- package/es/polygon/shaders/ocean/ocean_vert.glsl +0 -21
- package/es/polygon/shaders/water/polygon_water_frag.glsl +0 -78
- package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -22
- package/es/raster/buffers/triangulation.d.ts +0 -6
- package/es/raster/buffers/triangulation.js +0 -25
- package/es/raster/index.d.ts +0 -11
- package/es/raster/index.js +0 -55
- 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 -35
- package/es/raster/models/raster.js +0 -156
- package/es/raster/models/rasterRgb.d.ts +0 -35
- package/es/raster/models/rasterRgb.js +0 -158
- package/es/raster/models/rasterTerrainRgb.d.ts +0 -30
- package/es/raster/models/rasterTerrainRgb.js +0 -118
- package/es/raster/shaders/raster/raster_2d_frag.glsl +0 -37
- package/es/raster/shaders/raster/raster_2d_vert.glsl +0 -21
- package/es/raster/shaders/rgb/raster_rgb_frag.glsl +0 -30
- package/es/raster/shaders/rgb/raster_rgb_vert.glsl +0 -21
- package/es/raster/shaders/terrain/terrain_rgb_frag.glsl +0 -40
- package/es/raster/shaders/terrain/terrain_rgb_vert.glsl +0 -19
- package/es/shader/minify_frag.glsl +0 -11
- package/es/shader/minify_picking_frag.glsl +0 -10
- package/es/tile/core/BaseLayer.d.ts +0 -50
- package/es/tile/core/BaseLayer.js +0 -256
- package/es/tile/core/TileDebugLayer.d.ts +0 -15
- package/es/tile/core/TileDebugLayer.js +0 -23
- 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 -45
- package/es/tile/interaction/utils.d.ts +0 -11
- package/es/tile/interaction/utils.js +0 -69
- package/es/tile/interface.d.ts +0 -29
- package/es/tile/interface.js +0 -1
- package/es/tile/service/TileLayerService.d.ts +0 -58
- package/es/tile/service/TileLayerService.js +0 -195
- package/es/tile/service/TilePickService.d.ts +0 -26
- package/es/tile/service/TilePickService.js +0 -126
- package/es/tile/service/TileSourceService.d.ts +0 -7
- package/es/tile/service/TileSourceService.js +0 -26
- package/es/tile/tile/DebugTile.d.ts +0 -16
- package/es/tile/tile/DebugTile.js +0 -47
- package/es/tile/tile/ImageTile.d.ts +0 -14
- package/es/tile/tile/ImageTile.js +0 -39
- package/es/tile/tile/MaskTile.d.ts +0 -18
- package/es/tile/tile/MaskTile.js +0 -54
- package/es/tile/tile/RasterRGBTile.d.ts +0 -11
- package/es/tile/tile/RasterRGBTile.js +0 -47
- package/es/tile/tile/RasterTerrainRGBTile.d.ts +0 -14
- package/es/tile/tile/RasterTerrainRGBTile.js +0 -39
- package/es/tile/tile/RasterTile.d.ts +0 -18
- package/es/tile/tile/RasterTile.js +0 -81
- package/es/tile/tile/Tile.d.ts +0 -112
- package/es/tile/tile/Tile.js +0 -166
- package/es/tile/tile/VectorTile.d.ts +0 -26
- package/es/tile/tile/VectorTile.js +0 -87
- package/es/tile/tile/index.d.ts +0 -12
- package/es/tile/tile/index.js +0 -44
- package/es/tile/tile/util.d.ts +0 -5
- package/es/tile/tile/util.js +0 -18
- package/es/tile/utils/constants.d.ts +0 -1
- package/es/tile/utils/constants.js +0 -8
- package/es/tile/utils/utils.d.ts +0 -8
- package/es/tile/utils/utils.js +0 -11
- package/es/utils/blend.d.ts +0 -2
- package/es/utils/blend.js +0 -57
- package/es/utils/collision-index.d.ts +0 -47
- package/es/utils/collision-index.js +0 -87
- package/es/utils/extrude_polyline.d.ts +0 -53
- package/es/utils/extrude_polyline.js +0 -319
- package/es/utils/grid-index.d.ts +0 -28
- package/es/utils/grid-index.js +0 -128
- package/es/utils/identityScale.d.ts +0 -8
- package/es/utils/identityScale.js +0 -26
- package/es/utils/load-image.d.ts +0 -1
- package/es/utils/load-image.js +0 -22
- package/es/utils/multiPassRender.d.ts +0 -16
- package/es/utils/multiPassRender.js +0 -37
- package/es/utils/polylineNormal.d.ts +0 -9
- package/es/utils/polylineNormal.js +0 -182
- package/es/utils/rampcolor_legend.d.ts +0 -6
- package/es/utils/rampcolor_legend.js +0 -12
- package/es/utils/scale.d.ts +0 -87
- package/es/utils/scale.js +0 -595
- package/es/utils/simpleLine.d.ts +0 -23
- package/es/utils/simpleLine.js +0 -76
- package/es/utils/stencil.d.ts +0 -7
- package/es/utils/stencil.js +0 -49
- package/es/utils/symbol-layout.d.ts +0 -43
- package/es/utils/symbol-layout.js +0 -251
- package/es/wind/index.d.ts +0 -11
- package/es/wind/index.js +0 -34
- 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 -213
- package/es/wind/models/wind.d.ts +0 -38
- package/es/wind/models/wind.js +0 -240
- package/es/wind/models/windRender.d.ts +0 -104
- package/es/wind/models/windRender.js +0 -333
- package/es/wind/models/windShader.d.ts +0 -12
- package/es/wind/models/windShader.js +0 -151
- package/es/wind/shaders/wind_frag.glsl +0 -9
- package/es/wind/shaders/wind_vert.glsl +0 -14
- package/lib/canvas/index.d.ts +0 -18
- package/lib/canvas/index.js +0 -79
- package/lib/canvas/models/canvas.d.ts +0 -23
- package/lib/canvas/models/canvas.js +0 -149
- package/lib/canvas/models/constants.d.ts +0 -2
- package/lib/canvas/models/constants.js +0 -12
- package/lib/canvas/models/index.d.ts +0 -2
- package/lib/canvas/models/index.js +0 -27
- package/lib/citybuilding/building.d.ts +0 -7
- package/lib/citybuilding/building.js +0 -33
- package/lib/citybuilding/models/build.d.ts +0 -33
- package/lib/citybuilding/models/build.js +0 -168
- package/lib/citybuilding/shaders/build_frag.glsl +0 -123
- package/lib/citybuilding/shaders/build_vert.glsl +0 -58
- package/lib/core/BaseLayer.d.ts +0 -265
- package/lib/core/BaseLayer.js +0 -1317
- package/lib/core/BaseModel.d.ts +0 -95
- package/lib/core/BaseModel.js +0 -375
- package/lib/core/CommonStyleAttribute.d.ts +0 -16
- package/lib/core/CommonStyleAttribute.js +0 -120
- package/lib/core/LayerPickService.d.ts +0 -12
- package/lib/core/LayerPickService.js +0 -110
- package/lib/core/TextureService.d.ts +0 -15
- package/lib/core/TextureService.js +0 -73
- package/lib/core/constant.d.ts +0 -6
- package/lib/core/constant.js +0 -25
- package/lib/core/interface.d.ts +0 -284
- package/lib/core/interface.js +0 -34
- package/lib/core/line_trangluation.d.ts +0 -19
- package/lib/core/line_trangluation.js +0 -94
- package/lib/core/schema.d.ts +0 -27
- package/lib/core/schema.js +0 -31
- package/lib/core/shape/Path.d.ts +0 -40
- package/lib/core/shape/Path.js +0 -81
- package/lib/core/shape/arrow.d.ts +0 -25
- package/lib/core/shape/arrow.js +0 -158
- package/lib/core/shape/extrude.d.ts +0 -17
- package/lib/core/shape/extrude.js +0 -142
- package/lib/core/triangulation.d.ts +0 -136
- package/lib/core/triangulation.js +0 -628
- package/lib/core/utils.d.ts +0 -5
- package/lib/core/utils.js +0 -44
- package/lib/earth/index.d.ts +0 -22
- package/lib/earth/index.js +0 -62
- package/lib/earth/models/atmosphere.d.ts +0 -30
- package/lib/earth/models/atmosphere.js +0 -124
- package/lib/earth/models/base.d.ts +0 -37
- package/lib/earth/models/base.js +0 -180
- package/lib/earth/models/bloomsphere.d.ts +0 -30
- package/lib/earth/models/bloomsphere.js +0 -123
- package/lib/earth/shaders/atmosphere/atmosphere_frag.glsl +0 -17
- package/lib/earth/shaders/atmosphere/atmosphere_vert.glsl +0 -24
- package/lib/earth/shaders/base/base_frag.glsl +0 -11
- package/lib/earth/shaders/base/base_vert.glsl +0 -52
- package/lib/earth/shaders/bloomshpere/bloomsphere_frag.glsl +0 -15
- package/lib/earth/shaders/bloomshpere/bloomsphere_vert.glsl +0 -20
- package/lib/earth/utils.d.ts +0 -26
- package/lib/earth/utils.js +0 -107
- package/lib/geometry/index.d.ts +0 -22
- package/lib/geometry/index.js +0 -61
- package/lib/geometry/models/billboard.d.ts +0 -39
- package/lib/geometry/models/billboard.js +0 -183
- package/lib/geometry/models/index.d.ts +0 -5
- package/lib/geometry/models/index.js +0 -16
- package/lib/geometry/models/plane.d.ts +0 -58
- package/lib/geometry/models/plane.js +0 -316
- package/lib/geometry/models/sprite.d.ts +0 -48
- package/lib/geometry/models/sprite.js +0 -233
- package/lib/geometry/shaders/billboard_frag.glsl +0 -18
- package/lib/geometry/shaders/billboard_vert.glsl +0 -43
- package/lib/geometry/shaders/plane_frag.glsl +0 -23
- package/lib/geometry/shaders/plane_vert.glsl +0 -31
- package/lib/geometry/shaders/sprite_frag.glsl +0 -23
- package/lib/geometry/shaders/sprite_vert.glsl +0 -21
- package/lib/heatmap/index.d.ts +0 -13
- package/lib/heatmap/index.js +0 -95
- package/lib/heatmap/models/grid.d.ts +0 -29
- package/lib/heatmap/models/grid.js +0 -91
- package/lib/heatmap/models/grid3d.d.ts +0 -31
- package/lib/heatmap/models/grid3d.js +0 -130
- package/lib/heatmap/models/heatmap.d.ts +0 -46
- package/lib/heatmap/models/heatmap.js +0 -455
- package/lib/heatmap/models/hexagon.d.ts +0 -29
- package/lib/heatmap/models/hexagon.js +0 -91
- package/lib/heatmap/models/index.d.ts +0 -5
- package/lib/heatmap/models/index.js +0 -19
- package/lib/heatmap/shaders/grid/grid_frag.glsl +0 -9
- package/lib/heatmap/shaders/grid/grid_vert.glsl +0 -30
- package/lib/heatmap/shaders/grid3d/grid_3d_frag.glsl +0 -17
- package/lib/heatmap/shaders/grid3d/grid_3d_vert.glsl +0 -34
- package/lib/heatmap/shaders/heatmap/heatmap_3d_frag.glsl +0 -23
- package/lib/heatmap/shaders/heatmap/heatmap_3d_vert.glsl +0 -59
- package/lib/heatmap/shaders/heatmap/heatmap_frag.glsl +0 -40
- package/lib/heatmap/shaders/heatmap/heatmap_framebuffer_frag.glsl +0 -17
- package/lib/heatmap/shaders/heatmap/heatmap_framebuffer_vert.glsl +0 -36
- package/lib/heatmap/shaders/heatmap/heatmap_vert.glsl +0 -21
- package/lib/heatmap/shaders/hexagon/hexagon_frag.glsl +0 -8
- package/lib/heatmap/shaders/hexagon/hexagon_vert.glsl +0 -30
- package/lib/heatmap/triangulation.d.ts +0 -5
- package/lib/heatmap/triangulation.js +0 -39
- package/lib/image/index.d.ts +0 -9
- package/lib/image/index.js +0 -36
- package/lib/image/models/image.d.ts +0 -31
- package/lib/image/models/image.js +0 -121
- package/lib/image/models/index.d.ts +0 -5
- package/lib/image/models/index.js +0 -12
- package/lib/image/shaders/dataImage_frag.glsl +0 -32
- package/lib/image/shaders/image_frag.glsl +0 -38
- package/lib/image/shaders/image_vert.glsl +0 -20
- package/lib/index.d.ts +0 -18
- package/lib/index.js +0 -148
- package/lib/line/index.d.ts +0 -36
- package/lib/line/index.js +0 -98
- package/lib/line/models/arc.d.ts +0 -40
- package/lib/line/models/arc.js +0 -287
- package/lib/line/models/arc_3d.d.ts +0 -40
- package/lib/line/models/arc_3d.js +0 -277
- package/lib/line/models/flow.d.ts +0 -31
- package/lib/line/models/flow.js +0 -148
- package/lib/line/models/great_circle.d.ts +0 -34
- package/lib/line/models/great_circle.js +0 -248
- package/lib/line/models/index.d.ts +0 -5
- package/lib/line/models/index.js +0 -25
- package/lib/line/models/line.d.ts +0 -44
- package/lib/line/models/line.js +0 -281
- package/lib/line/models/simple_line.d.ts +0 -33
- package/lib/line/models/simple_line.js +0 -126
- package/lib/line/models/wall.d.ts +0 -34
- package/lib/line/models/wall.js +0 -231
- package/lib/line/shaders/arc/line_arc_frag.glsl +0 -92
- package/lib/line/shaders/arc/line_arc_vert.glsl +0 -156
- package/lib/line/shaders/arc3d/line_arc_3d_frag.glsl +0 -108
- package/lib/line/shaders/arc3d/line_arc_3d_vert.glsl +0 -177
- package/lib/line/shaders/flow/flow_line_frag.glsl +0 -13
- package/lib/line/shaders/flow/flow_line_vert.glsl +0 -76
- package/lib/line/shaders/greatCircle/line_arc_great_circle_frag.glsl +0 -99
- package/lib/line/shaders/greatCircle/line_arc_great_circle_vert.glsl +0 -165
- package/lib/line/shaders/line/line_frag.glsl +0 -122
- package/lib/line/shaders/line/line_vert.glsl +0 -101
- package/lib/line/shaders/simple/simpleline_frag.glsl +0 -30
- package/lib/line/shaders/simple/simpleline_vert.glsl +0 -45
- package/lib/line/shaders/wall/wall_frag.glsl +0 -94
- package/lib/line/shaders/wall/wall_vert.glsl +0 -90
- package/lib/mask/index.d.ts +0 -16
- package/lib/mask/index.js +0 -29
- package/lib/mask/models/fill.d.ts +0 -18
- package/lib/mask/models/fill.js +0 -69
- package/lib/mask/models/index.d.ts +0 -5
- package/lib/mask/models/index.js +0 -12
- package/lib/mask/shaders/mask_vert.glsl +0 -14
- package/lib/plugins/DataMappingPlugin.d.ts +0 -12
- package/lib/plugins/DataMappingPlugin.js +0 -234
- package/lib/plugins/DataSourcePlugin.d.ts +0 -6
- package/lib/plugins/DataSourcePlugin.js +0 -83
- package/lib/plugins/FeatureScalePlugin.d.ts +0 -20
- package/lib/plugins/FeatureScalePlugin.js +0 -303
- package/lib/plugins/LayerAnimateStylePlugin.d.ts +0 -4
- package/lib/plugins/LayerAnimateStylePlugin.js +0 -22
- package/lib/plugins/LayerMaskPlugin.d.ts +0 -7
- package/lib/plugins/LayerMaskPlugin.js +0 -26
- package/lib/plugins/LayerModelPlugin.d.ts +0 -10
- package/lib/plugins/LayerModelPlugin.js +0 -68
- package/lib/plugins/LayerStylePlugin.d.ts +0 -7
- package/lib/plugins/LayerStylePlugin.js +0 -25
- package/lib/plugins/LightingPlugin.d.ts +0 -35
- package/lib/plugins/LightingPlugin.js +0 -93
- package/lib/plugins/MultiPassRendererPlugin.d.ts +0 -22
- package/lib/plugins/MultiPassRendererPlugin.js +0 -59
- package/lib/plugins/PixelPickingPlugin.d.ts +0 -11
- package/lib/plugins/PixelPickingPlugin.js +0 -154
- package/lib/plugins/RegisterStyleAttributePlugin.d.ts +0 -10
- package/lib/plugins/RegisterStyleAttributePlugin.js +0 -78
- package/lib/plugins/ShaderUniformPlugin.d.ts +0 -17
- package/lib/plugins/ShaderUniformPlugin.js +0 -203
- package/lib/plugins/UpdateModelPlugin.d.ts +0 -7
- package/lib/plugins/UpdateModelPlugin.js +0 -27
- package/lib/plugins/UpdateStyleAttributePlugin.d.ts +0 -9
- package/lib/plugins/UpdateStyleAttributePlugin.js +0 -61
- package/lib/plugins/index.d.ts +0 -15
- package/lib/plugins/index.js +0 -26
- package/lib/point/index.d.ts +0 -35
- package/lib/point/index.js +0 -161
- package/lib/point/models/billboard_point.d.ts +0 -35
- package/lib/point/models/billboard_point.js +0 -104
- package/lib/point/models/earthExtrude.d.ts +0 -32
- package/lib/point/models/earthExtrude.js +0 -207
- package/lib/point/models/earthFill.d.ts +0 -31
- package/lib/point/models/earthFill.js +0 -166
- package/lib/point/models/extrude.d.ts +0 -32
- package/lib/point/models/extrude.js +0 -203
- package/lib/point/models/fill.d.ts +0 -47
- package/lib/point/models/fill.js +0 -188
- package/lib/point/models/fillImage.d.ts +0 -42
- package/lib/point/models/fillImage.js +0 -197
- package/lib/point/models/image.d.ts +0 -48
- package/lib/point/models/image.js +0 -301
- package/lib/point/models/index.d.ts +0 -5
- package/lib/point/models/index.js +0 -32
- package/lib/point/models/normal.d.ts +0 -36
- package/lib/point/models/normal.js +0 -98
- package/lib/point/models/radar.d.ts +0 -37
- package/lib/point/models/radar.js +0 -123
- package/lib/point/models/text.d.ts +0 -85
- package/lib/point/models/text.js +0 -512
- package/lib/point/shaders/billboard/billboard_point_frag.glsl +0 -48
- package/lib/point/shaders/billboard/billboard_point_vert.glsl +0 -33
- package/lib/point/shaders/earthExtrude/earthExtrude_frag.glsl +0 -36
- package/lib/point/shaders/earthExtrude/earthExtrude_vert.glsl +0 -118
- package/lib/point/shaders/earthFill/earthFill_frag.glsl +0 -79
- package/lib/point/shaders/earthFill/earthFill_vert.glsl +0 -46
- package/lib/point/shaders/extrude/extrude_frag.glsl +0 -29
- package/lib/point/shaders/extrude/extrude_vert.glsl +0 -95
- package/lib/point/shaders/fill/fill_frag.glsl +0 -97
- package/lib/point/shaders/fill/fill_vert.glsl +0 -79
- package/lib/point/shaders/fillImage/fillImage_frag.glsl +0 -23
- package/lib/point/shaders/fillImage/fillImage_vert.glsl +0 -46
- package/lib/point/shaders/image/image_frag.glsl +0 -45
- package/lib/point/shaders/image/image_vert.glsl +0 -47
- package/lib/point/shaders/normal/normal_frag.glsl +0 -5
- package/lib/point/shaders/normal/normal_vert.glsl +0 -22
- package/lib/point/shaders/radar/radar_frag.glsl +0 -52
- package/lib/point/shaders/radar/radar_vert.glsl +0 -53
- package/lib/point/shaders/text/text_frag.glsl +0 -47
- package/lib/point/shaders/text/text_vert.glsl +0 -65
- package/lib/point/shape/extrude.d.ts +0 -15
- package/lib/point/shape/extrude.js +0 -56
- package/lib/polygon/index.d.ts +0 -18
- package/lib/polygon/index.js +0 -79
- package/lib/polygon/models/extrude.d.ts +0 -41
- package/lib/polygon/models/extrude.js +0 -256
- package/lib/polygon/models/extrusion.d.ts +0 -40
- package/lib/polygon/models/extrusion.js +0 -145
- package/lib/polygon/models/fill.d.ts +0 -32
- package/lib/polygon/models/fill.js +0 -135
- package/lib/polygon/models/index.d.ts +0 -5
- package/lib/polygon/models/index.js +0 -33
- package/lib/polygon/models/ocean.d.ts +0 -37
- package/lib/polygon/models/ocean.js +0 -180
- package/lib/polygon/models/water.d.ts +0 -35
- package/lib/polygon/models/water.js +0 -158
- package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -24
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -49
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -53
- package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -74
- package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -55
- package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -54
- package/lib/polygon/shaders/extrusion/polygon_extrusion_frag.glsl +0 -8
- package/lib/polygon/shaders/extrusion/polygon_extrusion_vert.glsl +0 -24
- package/lib/polygon/shaders/fill/fill_frag.glsl +0 -8
- package/lib/polygon/shaders/fill/fill_linear_frag.glsl +0 -23
- package/lib/polygon/shaders/fill/fill_linear_vert.glsl +0 -36
- package/lib/polygon/shaders/fill/fill_vert.glsl +0 -35
- package/lib/polygon/shaders/ocean/ocean_frag.glsl +0 -277
- package/lib/polygon/shaders/ocean/ocean_vert.glsl +0 -21
- package/lib/polygon/shaders/water/polygon_water_frag.glsl +0 -78
- package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -22
- package/lib/raster/buffers/triangulation.d.ts +0 -6
- package/lib/raster/buffers/triangulation.js +0 -33
- package/lib/raster/index.d.ts +0 -11
- package/lib/raster/index.js +0 -63
- package/lib/raster/models/index.d.ts +0 -5
- package/lib/raster/models/index.js +0 -17
- package/lib/raster/models/raster.d.ts +0 -35
- package/lib/raster/models/raster.js +0 -164
- package/lib/raster/models/rasterRgb.d.ts +0 -35
- package/lib/raster/models/rasterRgb.js +0 -166
- package/lib/raster/models/rasterTerrainRgb.d.ts +0 -30
- package/lib/raster/models/rasterTerrainRgb.js +0 -126
- package/lib/raster/shaders/raster/raster_2d_frag.glsl +0 -37
- package/lib/raster/shaders/raster/raster_2d_vert.glsl +0 -21
- package/lib/raster/shaders/rgb/raster_rgb_frag.glsl +0 -30
- package/lib/raster/shaders/rgb/raster_rgb_vert.glsl +0 -21
- package/lib/raster/shaders/terrain/terrain_rgb_frag.glsl +0 -40
- package/lib/raster/shaders/terrain/terrain_rgb_vert.glsl +0 -19
- package/lib/shader/minify_frag.glsl +0 -11
- package/lib/shader/minify_picking_frag.glsl +0 -10
- package/lib/tile/core/BaseLayer.d.ts +0 -50
- package/lib/tile/core/BaseLayer.js +0 -264
- package/lib/tile/core/TileDebugLayer.d.ts +0 -15
- package/lib/tile/core/TileDebugLayer.js +0 -31
- package/lib/tile/interaction/getFeatureData.d.ts +0 -0
- package/lib/tile/interaction/getFeatureData.js +0 -1
- package/lib/tile/interaction/getRasterData.d.ts +0 -4
- package/lib/tile/interaction/getRasterData.js +0 -52
- package/lib/tile/interaction/utils.d.ts +0 -11
- package/lib/tile/interaction/utils.js +0 -81
- package/lib/tile/interface.d.ts +0 -29
- package/lib/tile/interface.js +0 -5
- package/lib/tile/service/TileLayerService.d.ts +0 -58
- package/lib/tile/service/TileLayerService.js +0 -203
- package/lib/tile/service/TilePickService.d.ts +0 -26
- package/lib/tile/service/TilePickService.js +0 -134
- package/lib/tile/service/TileSourceService.d.ts +0 -7
- package/lib/tile/service/TileSourceService.js +0 -35
- package/lib/tile/tile/DebugTile.d.ts +0 -16
- package/lib/tile/tile/DebugTile.js +0 -55
- package/lib/tile/tile/ImageTile.d.ts +0 -14
- package/lib/tile/tile/ImageTile.js +0 -47
- package/lib/tile/tile/MaskTile.d.ts +0 -18
- package/lib/tile/tile/MaskTile.js +0 -62
- package/lib/tile/tile/RasterRGBTile.d.ts +0 -11
- package/lib/tile/tile/RasterRGBTile.js +0 -55
- package/lib/tile/tile/RasterTerrainRGBTile.d.ts +0 -14
- package/lib/tile/tile/RasterTerrainRGBTile.js +0 -47
- package/lib/tile/tile/RasterTile.d.ts +0 -18
- package/lib/tile/tile/RasterTile.js +0 -89
- package/lib/tile/tile/Tile.d.ts +0 -112
- package/lib/tile/tile/Tile.js +0 -174
- package/lib/tile/tile/VectorTile.d.ts +0 -26
- package/lib/tile/tile/VectorTile.js +0 -95
- package/lib/tile/tile/index.d.ts +0 -12
- package/lib/tile/tile/index.js +0 -76
- package/lib/tile/tile/util.d.ts +0 -5
- package/lib/tile/tile/util.js +0 -26
- package/lib/tile/utils/constants.d.ts +0 -1
- package/lib/tile/utils/constants.js +0 -14
- package/lib/tile/utils/utils.d.ts +0 -8
- package/lib/tile/utils/utils.js +0 -18
- package/lib/utils/blend.d.ts +0 -2
- package/lib/utils/blend.js +0 -63
- package/lib/utils/collision-index.d.ts +0 -47
- package/lib/utils/collision-index.js +0 -96
- package/lib/utils/extrude_polyline.d.ts +0 -53
- package/lib/utils/extrude_polyline.js +0 -331
- package/lib/utils/grid-index.d.ts +0 -28
- package/lib/utils/grid-index.js +0 -135
- package/lib/utils/identityScale.d.ts +0 -8
- package/lib/utils/identityScale.js +0 -32
- package/lib/utils/load-image.d.ts +0 -1
- package/lib/utils/load-image.js +0 -29
- package/lib/utils/multiPassRender.d.ts +0 -16
- package/lib/utils/multiPassRender.js +0 -44
- package/lib/utils/polylineNormal.d.ts +0 -9
- package/lib/utils/polylineNormal.js +0 -191
- package/lib/utils/rampcolor_legend.d.ts +0 -6
- package/lib/utils/rampcolor_legend.js +0 -18
- package/lib/utils/scale.d.ts +0 -87
- package/lib/utils/scale.js +0 -610
- package/lib/utils/simpleLine.d.ts +0 -23
- package/lib/utils/simpleLine.js +0 -85
- package/lib/utils/stencil.d.ts +0 -7
- package/lib/utils/stencil.js +0 -56
- package/lib/utils/symbol-layout.d.ts +0 -43
- package/lib/utils/symbol-layout.js +0 -258
- package/lib/wind/index.d.ts +0 -11
- package/lib/wind/index.js +0 -42
- package/lib/wind/models/index.d.ts +0 -5
- package/lib/wind/models/index.js +0 -12
- package/lib/wind/models/utils.d.ts +0 -19
- package/lib/wind/models/utils.js +0 -229
- package/lib/wind/models/wind.d.ts +0 -38
- package/lib/wind/models/wind.js +0 -248
- package/lib/wind/models/windRender.d.ts +0 -104
- package/lib/wind/models/windRender.js +0 -343
- package/lib/wind/models/windShader.d.ts +0 -12
- package/lib/wind/models/windShader.js +0 -157
- package/lib/wind/shaders/wind_frag.glsl +0 -9
- package/lib/wind/shaders/wind_vert.glsl +0 -14
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.PointTriangulation = PointTriangulation;
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var _l7Core = require("@antv/l7-core");
|
|
11
|
-
var _BaseModel = _interopRequireDefault(require("../../core/BaseModel"));
|
|
12
|
-
var _l7Utils = require("@antv/l7-utils");
|
|
13
|
-
/* babel-plugin-inline-import '../shaders/billboard/billboard_point_frag.glsl' */
|
|
14
|
-
const simplePointFrag = "layout(std140) uniform commonUniorm {\n vec4 u_stroke_color;\n float u_additive;\n float u_stroke_opacity;\n float u_stroke_width;\n};\n\nin vec4 v_color;\nin float v_blur;\nin float v_innerRadius;\n\nout vec4 outputColor;\n\n#pragma include \"picking\"\nvoid main() {\n vec2 center = vec2(0.5);\n\n // Tip: \u7247\u5143\u5230\u4E2D\u5FC3\u70B9\u7684\u8DDD\u79BB 0 - 1\n float fragmengTocenter = distance(center, gl_PointCoord) * 2.0;\n // Tip: \u7247\u5143\u7684\u526A\u5207\u6210\u5706\u5F62\n float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter);\n\n if (v_innerRadius < 0.99) {\n // \u5F53\u5B58\u5728 stroke \u4E14 stroke > 0.01\n float blurWidth = (1.0 - v_blur) / 2.0;\n vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity);\n if (fragmengTocenter > v_innerRadius + blurWidth) {\n outputColor = stroke;\n } else if (fragmengTocenter > v_innerRadius - blurWidth) {\n float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0);\n outputColor = mix(v_color, stroke, mixR);\n } else {\n outputColor = v_color;\n }\n } else {\n // \u5F53\u4E0D\u5B58\u5728 stroke \u6216 stroke <= 0.01\n outputColor = v_color;\n }\n\n outputColor = filterColor(outputColor);\n\n if (u_additive > 0.0) {\n outputColor *= circleClipOpacity;\n } else {\n outputColor.a *= circleClipOpacity;\n }\n\n}\n";
|
|
15
|
-
/* babel-plugin-inline-import '../shaders/billboard/billboard_point_vert.glsl' */
|
|
16
|
-
const simplePointVert = "\nlayout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;\n\nlayout(std140) uniform commonUniorm {\n vec4 u_stroke_color;\n float u_additive;\n float u_stroke_opacity;\n float u_stroke_width;\n};\n\nout vec4 v_color;\nout float v_blur;\nout float v_innerRadius;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n#pragma include \"project\"\nvoid main() {\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n v_blur = 1.0 - max(2.0 / a_Size, 0.05);\n v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0);\n\n vec2 offset = project_pixel(u_offsets);\n\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w));\n\n gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\n setPickingColor(a_PickingColor);\n}\n";
|
|
17
|
-
function PointTriangulation(feature) {
|
|
18
|
-
const coordinates = feature.coordinates;
|
|
19
|
-
return {
|
|
20
|
-
vertices: [...coordinates],
|
|
21
|
-
indices: [0],
|
|
22
|
-
size: coordinates.length
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
class SimplePointModel extends _BaseModel.default {
|
|
26
|
-
get attributeLocation() {
|
|
27
|
-
return Object.assign(super.attributeLocation, {
|
|
28
|
-
MAX: super.attributeLocation.MAX,
|
|
29
|
-
SIZE: 9
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
getDefaultStyle() {
|
|
33
|
-
return {
|
|
34
|
-
blend: 'additive'
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
getCommonUniformsInfo() {
|
|
38
|
-
const {
|
|
39
|
-
blend,
|
|
40
|
-
strokeOpacity = 1,
|
|
41
|
-
strokeWidth = 0,
|
|
42
|
-
stroke = '#fff'
|
|
43
|
-
} = this.layer.getLayerConfig();
|
|
44
|
-
const commonOptions = {
|
|
45
|
-
u_stroke_color: (0, _l7Utils.rgb2arr)(stroke),
|
|
46
|
-
u_additive: blend === 'additive' ? 1.0 : 0.0,
|
|
47
|
-
u_stroke_opacity: strokeOpacity,
|
|
48
|
-
u_stroke_width: strokeWidth
|
|
49
|
-
};
|
|
50
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
51
|
-
return commonBufferInfo;
|
|
52
|
-
}
|
|
53
|
-
initModels() {
|
|
54
|
-
var _this = this;
|
|
55
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
56
|
-
return _this.buildModels();
|
|
57
|
-
})();
|
|
58
|
-
}
|
|
59
|
-
buildModels() {
|
|
60
|
-
var _this2 = this;
|
|
61
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
62
|
-
_this2.layer.triangulation = PointTriangulation;
|
|
63
|
-
_this2.initUniformsBuffer();
|
|
64
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
65
|
-
moduleName: 'pointSimple',
|
|
66
|
-
vertexShader: simplePointVert,
|
|
67
|
-
fragmentShader: simplePointFrag,
|
|
68
|
-
defines: _this2.getDefines(),
|
|
69
|
-
inject: _this2.getInject(),
|
|
70
|
-
triangulation: PointTriangulation,
|
|
71
|
-
depth: {
|
|
72
|
-
enable: false
|
|
73
|
-
},
|
|
74
|
-
primitive: _l7Core.gl.POINTS
|
|
75
|
-
});
|
|
76
|
-
return [model];
|
|
77
|
-
})();
|
|
78
|
-
}
|
|
79
|
-
registerBuiltinAttributes() {
|
|
80
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
|
|
81
|
-
this.registerPosition64LowAttribute();
|
|
82
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
83
|
-
name: 'size',
|
|
84
|
-
type: _l7Core.AttributeType.Attribute,
|
|
85
|
-
descriptor: {
|
|
86
|
-
name: 'a_Size',
|
|
87
|
-
shaderLocation: this.attributeLocation.SIZE,
|
|
88
|
-
buffer: {
|
|
89
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
90
|
-
data: [],
|
|
91
|
-
type: _l7Core.gl.FLOAT
|
|
92
|
-
},
|
|
93
|
-
size: 1,
|
|
94
|
-
update: feature => {
|
|
95
|
-
const {
|
|
96
|
-
size = 1
|
|
97
|
-
} = feature;
|
|
98
|
-
return Array.isArray(size) ? [size[0]] : [size];
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
exports.default = SimplePointModel;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { IModel } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class ExtrudeModel extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
SIZE: number;
|
|
17
|
-
POS: number;
|
|
18
|
-
NORMAL: number;
|
|
19
|
-
};
|
|
20
|
-
private raiseCount;
|
|
21
|
-
private raiseRepeat;
|
|
22
|
-
protected getCommonUniformsInfo(): {
|
|
23
|
-
uniformsArray: number[];
|
|
24
|
-
uniformsLength: number;
|
|
25
|
-
uniformsOption: {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
initModels(): Promise<IModel[]>;
|
|
30
|
-
buildModels(): Promise<IModel[]>;
|
|
31
|
-
protected registerBuiltinAttributes(): void;
|
|
32
|
-
}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _l7Core = require("@antv/l7-core");
|
|
11
|
-
var _l7Utils = require("@antv/l7-utils");
|
|
12
|
-
var _BaseModel = _interopRequireDefault(require("../../core/BaseModel"));
|
|
13
|
-
var _triangulation = require("../../core/triangulation");
|
|
14
|
-
var _utils = require("../../earth/utils");
|
|
15
|
-
/* babel-plugin-inline-import '../shaders/earthExtrude/earthExtrude_frag.glsl' */
|
|
16
|
-
const pointExtrudeFrag = "precision highp float;\nin vec4 v_color;\n\n#pragma include \"picking\"\n\nlayout(std140) uniform commonUniform {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor: 0;\n float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_globel;\n float u_r;\n float u_pickLight: 0.0;\n float u_opacitylinear: 0.0;\n float u_opacitylinear_dir: 1.0;\n float u_lightEnable: 1.0;\n};\nin float v_lightWeight;\nin float v_barLinearZ;\nout vec4 outputColor;\nvoid main() {\n\n outputColor = v_color;\n\n // \u5F00\u542F\u900F\u660E\u5EA6\u6E10\u53D8\n if(u_opacitylinear > 0.0) {\n outputColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - v_barLinearZ): v_barLinearZ;\n }\n\n // picking\n if(u_pickLight > 0.0) {\n outputColor = filterColorAlpha(outputColor, v_lightWeight);\n } else {\n outputColor = filterColor(outputColor);\n }\n}\n";
|
|
17
|
-
/* babel-plugin-inline-import '../shaders/earthExtrude/earthExtrude_vert.glsl' */
|
|
18
|
-
const 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\nlayout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in vec3 a_Size;\nlayout(location = ATTRIBUTE_LOCATION_POS) in vec3 a_Pos;\nlayout(location = ATTRIBUTE_LOCATION_NORMAL) in vec3 a_Normal;\n\nlayout(std140) uniform commonUniform {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor: 0;\n float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_globel;\n float u_r;\n float u_pickLight: 0.0;\n float u_opacitylinear: 0.0;\n float u_opacitylinear_dir: 1.0;\n float u_lightEnable: 1.0;\n};\n\nout vec4 v_color;\nout float v_lightWeight;\nout float v_barLinearZ;\n// \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143\n\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 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 v_barLinearZ = 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 } 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 v_lightWeight = lightWeight;\n // \u8BBE\u7F6E\u5706\u67F1\u7684\u5E95\u8272\n if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272\n v_color = mix(u_sourceColor, u_targetColor, v_barLinearZ);\n v_color.rgb *= lightWeight;\n } else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272\n v_color = a_Color;\n }\n v_color.a *= u_opacity;\n\n\n // \u5728\u5730\u7403\u6A21\u5F0F\u4E0B\uFF0C\u5C06\u539F\u672C\u5782\u76F4\u4E8E xy \u5E73\u9762\u7684\u5706\u67F1\u8C03\u6574\u59FF\u6001\u5230\u9002\u5E94\u5706\u7684\u89D2\u5EA6\n //\u65CB\u8F6C\u77E9\u9635mx\uFF0C\u521B\u5EFA\u7ED5x\u8F74\u65CB\u8F6C\u77E9\u9635\n float r = sqrt(a_Pos.z*a_Pos.z + a_Pos.x*a_Pos.x);\n float xRadian = getXRadian(a_Pos.y, r);\n float xcos = cos(xRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u4F59\u5F26\u503C\n float xsin = sin(xRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u6B63\u5F26\u503C\n mat4 mx = mat4(\n 1,0,0,0,\n 0,xcos,-xsin,0,\n 0,xsin,xcos,0,\n 0,0,0,1);\n\n //\u65CB\u8F6C\u77E9\u9635my\uFF0C\u521B\u5EFA\u7ED5y\u8F74\u65CB\u8F6C\u77E9\u9635\n float yRadian = getYRadian(a_Pos.x, a_Pos.z);\n float ycos = cos(yRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u4F59\u5F26\u503C\n float ysin = sin(yRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u6B63\u5F26\u503C\n mat4 my = mat4(\n ycos,0,-ysin,0,\n 0,1,0,0,\n ysin,0,ycos,0,\n 0,0,0,1);\n\n gl_Position = u_ViewProjectionMatrix * vec4(( my * mx * vec4(a_Position * a_Size, 1.0)).xyz + a_Pos, 1.0);\n\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
19
|
-
const {
|
|
20
|
-
isNumber
|
|
21
|
-
} = _l7Utils.lodashUtil;
|
|
22
|
-
class ExtrudeModel extends _BaseModel.default {
|
|
23
|
-
constructor(...args) {
|
|
24
|
-
super(...args);
|
|
25
|
-
(0, _defineProperty2.default)(this, "raiseCount", 0);
|
|
26
|
-
(0, _defineProperty2.default)(this, "raiseRepeat", 0);
|
|
27
|
-
}
|
|
28
|
-
get attributeLocation() {
|
|
29
|
-
return Object.assign(super.attributeLocation, {
|
|
30
|
-
MAX: super.attributeLocation.MAX,
|
|
31
|
-
SIZE: 9,
|
|
32
|
-
POS: 10,
|
|
33
|
-
NORMAL: 11
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
getCommonUniformsInfo() {
|
|
37
|
-
const {
|
|
38
|
-
animateOption = {
|
|
39
|
-
enable: false,
|
|
40
|
-
speed: 0.01,
|
|
41
|
-
repeat: false
|
|
42
|
-
},
|
|
43
|
-
opacity = 1,
|
|
44
|
-
sourceColor,
|
|
45
|
-
targetColor,
|
|
46
|
-
pickLight = false,
|
|
47
|
-
heightfixed = true,
|
|
48
|
-
opacityLinear = {
|
|
49
|
-
enable: false,
|
|
50
|
-
dir: 'up'
|
|
51
|
-
},
|
|
52
|
-
lightEnable = true
|
|
53
|
-
} = this.layer.getLayerConfig();
|
|
54
|
-
|
|
55
|
-
// 转化渐变色
|
|
56
|
-
let useLinearColor = 0; // 默认不生效
|
|
57
|
-
let sourceColorArr = [0, 0, 0, 0];
|
|
58
|
-
let targetColorArr = [0, 0, 0, 0];
|
|
59
|
-
if (sourceColor && targetColor) {
|
|
60
|
-
sourceColorArr = (0, _l7Utils.rgb2arr)(sourceColor);
|
|
61
|
-
targetColorArr = (0, _l7Utils.rgb2arr)(targetColor);
|
|
62
|
-
useLinearColor = 1;
|
|
63
|
-
}
|
|
64
|
-
if (this.raiseCount < 1 && this.raiseRepeat > 0) {
|
|
65
|
-
if (animateOption.enable) {
|
|
66
|
-
const {
|
|
67
|
-
speed = 0.01
|
|
68
|
-
} = animateOption;
|
|
69
|
-
this.raiseCount += speed;
|
|
70
|
-
if (this.raiseCount >= 1) {
|
|
71
|
-
if (this.raiseRepeat > 1) {
|
|
72
|
-
this.raiseCount = 0;
|
|
73
|
-
this.raiseRepeat--;
|
|
74
|
-
} else {
|
|
75
|
-
this.raiseCount = 1;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
const commonOptions = {
|
|
81
|
-
u_sourceColor: sourceColorArr,
|
|
82
|
-
u_targetColor: targetColorArr,
|
|
83
|
-
// 渐变色支持参数
|
|
84
|
-
u_linearColor: useLinearColor,
|
|
85
|
-
// 圆柱体的拾取高亮是否要计算光照
|
|
86
|
-
u_pickLight: Number(pickLight),
|
|
87
|
-
// 圆柱体是否固定高度
|
|
88
|
-
u_heightfixed: Number(heightfixed),
|
|
89
|
-
u_r: animateOption.enable && this.raiseRepeat > 0 ? this.raiseCount : 1.0,
|
|
90
|
-
u_opacity: isNumber(opacity) ? opacity : 1.0,
|
|
91
|
-
// 透明度渐变
|
|
92
|
-
u_opacitylinear: Number(opacityLinear.enable),
|
|
93
|
-
u_opacitylinear_dir: opacityLinear.dir === 'up' ? 1.0 : 0.0,
|
|
94
|
-
// 光照计算开关
|
|
95
|
-
u_lightEnable: Number(lightEnable)
|
|
96
|
-
};
|
|
97
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
98
|
-
return commonBufferInfo;
|
|
99
|
-
}
|
|
100
|
-
initModels() {
|
|
101
|
-
var _this = this;
|
|
102
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
103
|
-
_this.initUniformsBuffer();
|
|
104
|
-
return _this.buildModels();
|
|
105
|
-
})();
|
|
106
|
-
}
|
|
107
|
-
buildModels() {
|
|
108
|
-
var _this2 = this;
|
|
109
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
110
|
-
const {
|
|
111
|
-
animateOption: {
|
|
112
|
-
repeat = 1
|
|
113
|
-
}
|
|
114
|
-
} = _this2.layer.getLayerConfig();
|
|
115
|
-
_this2.raiseRepeat = repeat;
|
|
116
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
117
|
-
moduleName: 'pointEarthExtrude',
|
|
118
|
-
vertexShader: pointExtrudeVert,
|
|
119
|
-
fragmentShader: pointExtrudeFrag,
|
|
120
|
-
triangulation: _triangulation.PointExtrudeTriangulation,
|
|
121
|
-
depth: {
|
|
122
|
-
enable: true
|
|
123
|
-
},
|
|
124
|
-
defines: _this2.getDefines(),
|
|
125
|
-
inject: _this2.getInject(),
|
|
126
|
-
cull: {
|
|
127
|
-
enable: true,
|
|
128
|
-
face: _l7Core.gl.FRONT
|
|
129
|
-
},
|
|
130
|
-
blend: _this2.getBlend()
|
|
131
|
-
});
|
|
132
|
-
return [model];
|
|
133
|
-
})();
|
|
134
|
-
}
|
|
135
|
-
registerBuiltinAttributes() {
|
|
136
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
137
|
-
name: 'size',
|
|
138
|
-
type: _l7Core.AttributeType.Attribute,
|
|
139
|
-
descriptor: {
|
|
140
|
-
name: 'a_Size',
|
|
141
|
-
shaderLocation: this.attributeLocation.SIZE,
|
|
142
|
-
buffer: {
|
|
143
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
144
|
-
data: [],
|
|
145
|
-
type: _l7Core.gl.FLOAT
|
|
146
|
-
},
|
|
147
|
-
size: 3,
|
|
148
|
-
update: feature => {
|
|
149
|
-
const {
|
|
150
|
-
size
|
|
151
|
-
} = feature;
|
|
152
|
-
if (size) {
|
|
153
|
-
let buffersize = [];
|
|
154
|
-
if (Array.isArray(size)) {
|
|
155
|
-
buffersize = size.length === 2 ? [size[0], size[0], size[1]] : size;
|
|
156
|
-
}
|
|
157
|
-
if (!Array.isArray(size)) {
|
|
158
|
-
buffersize = [size, size, size];
|
|
159
|
-
}
|
|
160
|
-
return buffersize;
|
|
161
|
-
} else {
|
|
162
|
-
return [2, 2, 2];
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
// point layer size;
|
|
169
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
170
|
-
name: 'normal',
|
|
171
|
-
type: _l7Core.AttributeType.Attribute,
|
|
172
|
-
descriptor: {
|
|
173
|
-
name: 'a_Normal',
|
|
174
|
-
shaderLocation: this.attributeLocation.NORMAL,
|
|
175
|
-
buffer: {
|
|
176
|
-
// give the WebGL driver a hint that this buffer may change
|
|
177
|
-
usage: _l7Core.gl.STATIC_DRAW,
|
|
178
|
-
data: [],
|
|
179
|
-
type: _l7Core.gl.FLOAT
|
|
180
|
-
},
|
|
181
|
-
size: 3,
|
|
182
|
-
update: (feature, featureIdx, vertex, attributeIdx, normal) => {
|
|
183
|
-
return normal;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
188
|
-
name: 'pos',
|
|
189
|
-
type: _l7Core.AttributeType.Attribute,
|
|
190
|
-
descriptor: {
|
|
191
|
-
name: 'a_Pos',
|
|
192
|
-
shaderLocation: this.attributeLocation.POS,
|
|
193
|
-
buffer: {
|
|
194
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
195
|
-
data: [],
|
|
196
|
-
type: _l7Core.gl.FLOAT
|
|
197
|
-
},
|
|
198
|
-
size: 3,
|
|
199
|
-
update: feature => {
|
|
200
|
-
const coordinates = (0, _l7Utils.calculateCentroid)(feature.coordinates);
|
|
201
|
-
return (0, _utils.lglt2xyz)([coordinates[0], coordinates[1]]);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
exports.default = ExtrudeModel;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { IAnimateOption, IModel } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class FillModel extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
SIZE: number;
|
|
17
|
-
SHAPE: number;
|
|
18
|
-
EXTRUDE: number;
|
|
19
|
-
};
|
|
20
|
-
protected getCommonUniformsInfo(): {
|
|
21
|
-
uniformsArray: number[];
|
|
22
|
-
uniformsLength: number;
|
|
23
|
-
uniformsOption: {
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
initModels(): Promise<IModel[]>;
|
|
28
|
-
buildModels(): Promise<IModel[]>;
|
|
29
|
-
protected animateOption2Array(option: Partial<IAnimateOption>): number[];
|
|
30
|
-
protected registerBuiltinAttributes(): void;
|
|
31
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
|
-
var _l7Core = require("@antv/l7-core");
|
|
10
|
-
var _BaseModel = _interopRequireDefault(require("../../core/BaseModel"));
|
|
11
|
-
var _triangulation = require("../../core/triangulation");
|
|
12
|
-
var _glMatrix = require("gl-matrix");
|
|
13
|
-
/* babel-plugin-inline-import '../shaders/earthFill/earthFill_frag.glsl' */
|
|
14
|
-
const pointFillFrag = "in vec4 v_data;\nin vec4 v_color;\nin float v_radius;\n\nlayout(std140) uniform commonUniform {\n float u_additive;\n float u_stroke_opacity : 1;\n float u_stroke_width : 2;\n float u_blur : 0.0;\n};\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\nout vec4 outputColor;\n\nvoid main() {\n int shape = int(floor(v_data.w + 0.5));\n\n vec4 strokeColor = u_stroke == vec4(0.0) ? v_color : u_stroke;\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius + u_stroke_width);\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 = u_stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiasblur,\n 0.0,\n inner_df\n );\n\n if(u_stroke_width < 0.01) {\n outputColor = vec4(v_color.rgb, v_color.a * u_opacity);\n } else {\n outputColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), strokeColor * u_stroke_opacity, color_t);\n }\n\n if(u_additive > 0.0) {\n outputColor *= opacity_t;\n outputColor = filterColorAlpha(outputColor, outputColor.a);\n } else {\n outputColor.a *= opacity_t;\n outputColor = filterColor(outputColor);\n }\n}\n";
|
|
15
|
-
/* babel-plugin-inline-import '../shaders/earthFill/earthFill_vert.glsl' */
|
|
16
|
-
const pointFillVert = "layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;\nlayout(location = ATTRIBUTE_LOCATION_SHAPE) in float a_Shape;\nlayout(location = ATTRIBUTE_LOCATION_EXTRUDE) in vec3 a_Extrude;\n\nlayout(std140) uniform commonUniform {\n float u_additive;\n float u_stroke_opacity : 1;\n float u_stroke_width : 2;\n float u_blur : 0.0;\n};\nout vec4 v_data;\nout vec4 v_color;\nout float v_radius;\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 // 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 gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1 + vec3(u_offsets,0.0), 1.0);\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
17
|
-
class FillModel extends _BaseModel.default {
|
|
18
|
-
get attributeLocation() {
|
|
19
|
-
return Object.assign(super.attributeLocation, {
|
|
20
|
-
MAX: super.attributeLocation.MAX,
|
|
21
|
-
SIZE: 9,
|
|
22
|
-
SHAPE: 10,
|
|
23
|
-
EXTRUDE: 11
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
getCommonUniformsInfo() {
|
|
27
|
-
const {
|
|
28
|
-
strokeOpacity = 1,
|
|
29
|
-
strokeWidth = 0,
|
|
30
|
-
// offsets = [0, 0],
|
|
31
|
-
blend,
|
|
32
|
-
blur = 0
|
|
33
|
-
} = this.layer.getLayerConfig();
|
|
34
|
-
this.layer.getLayerConfig();
|
|
35
|
-
const commonOptions = {
|
|
36
|
-
u_additive: blend === 'additive' ? 1.0 : 0.0,
|
|
37
|
-
u_stroke_opacity: strokeOpacity,
|
|
38
|
-
u_stroke_width: strokeWidth,
|
|
39
|
-
u_blur: blur
|
|
40
|
-
};
|
|
41
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
42
|
-
return commonBufferInfo;
|
|
43
|
-
}
|
|
44
|
-
initModels() {
|
|
45
|
-
var _this = this;
|
|
46
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
47
|
-
_this.initUniformsBuffer();
|
|
48
|
-
return _this.buildModels();
|
|
49
|
-
})();
|
|
50
|
-
}
|
|
51
|
-
buildModels() {
|
|
52
|
-
var _this2 = this;
|
|
53
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
54
|
-
_this2.layer.triangulation = _triangulation.GlobelPointFillTriangulation;
|
|
55
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
56
|
-
moduleName: 'pointEarthFill',
|
|
57
|
-
vertexShader: pointFillVert,
|
|
58
|
-
fragmentShader: pointFillFrag,
|
|
59
|
-
triangulation: _triangulation.GlobelPointFillTriangulation,
|
|
60
|
-
defines: _this2.getDefines(),
|
|
61
|
-
inject: _this2.getInject(),
|
|
62
|
-
depth: {
|
|
63
|
-
enable: true
|
|
64
|
-
},
|
|
65
|
-
blend: _this2.getBlend()
|
|
66
|
-
});
|
|
67
|
-
return [model];
|
|
68
|
-
})();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// overwrite baseModel func
|
|
72
|
-
animateOption2Array(option) {
|
|
73
|
-
return [option.enable ? 0 : 1.0, option.speed || 1, option.rings || 3, 0];
|
|
74
|
-
}
|
|
75
|
-
registerBuiltinAttributes() {
|
|
76
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
77
|
-
name: 'extrude',
|
|
78
|
-
type: _l7Core.AttributeType.Attribute,
|
|
79
|
-
descriptor: {
|
|
80
|
-
name: 'a_Extrude',
|
|
81
|
-
shaderLocation: this.attributeLocation.EXTRUDE,
|
|
82
|
-
buffer: {
|
|
83
|
-
// give the WebGL driver a hint that this buffer may change
|
|
84
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
85
|
-
data: [],
|
|
86
|
-
type: _l7Core.gl.FLOAT
|
|
87
|
-
},
|
|
88
|
-
size: 3,
|
|
89
|
-
update: (feature, featureIdx, vertex, attributeIdx) => {
|
|
90
|
-
const [x, y, z] = vertex;
|
|
91
|
-
const n1 = _glMatrix.vec3.fromValues(0, 0, 1);
|
|
92
|
-
const n2 = _glMatrix.vec3.fromValues(x, 0, z);
|
|
93
|
-
const xzReg = x >= 0 ? _glMatrix.vec3.angle(n1, n2) : Math.PI * 2 - _glMatrix.vec3.angle(n1, n2);
|
|
94
|
-
const yReg = Math.PI * 2 - Math.asin(y / 100);
|
|
95
|
-
const m = _glMatrix.mat4.create();
|
|
96
|
-
_glMatrix.mat4.rotateY(m, m, xzReg);
|
|
97
|
-
_glMatrix.mat4.rotateX(m, m, yReg);
|
|
98
|
-
const v1 = _glMatrix.vec3.fromValues(1, 1, 0);
|
|
99
|
-
_glMatrix.vec3.transformMat4(v1, v1, m);
|
|
100
|
-
_glMatrix.vec3.normalize(v1, v1);
|
|
101
|
-
const v2 = _glMatrix.vec3.fromValues(-1, 1, 0);
|
|
102
|
-
_glMatrix.vec3.transformMat4(v2, v2, m);
|
|
103
|
-
_glMatrix.vec3.normalize(v2, v2);
|
|
104
|
-
const v3 = _glMatrix.vec3.fromValues(-1, -1, 0);
|
|
105
|
-
_glMatrix.vec3.transformMat4(v3, v3, m);
|
|
106
|
-
_glMatrix.vec3.normalize(v3, v3);
|
|
107
|
-
const v4 = _glMatrix.vec3.fromValues(1, -1, 0);
|
|
108
|
-
_glMatrix.vec3.transformMat4(v4, v4, m);
|
|
109
|
-
_glMatrix.vec3.normalize(v4, v4);
|
|
110
|
-
const extrude = [...v1, ...v2, ...v3, ...v4];
|
|
111
|
-
const extrudeIndex = attributeIdx % 4 * 3;
|
|
112
|
-
return [extrude[extrudeIndex], extrude[extrudeIndex + 1], extrude[extrudeIndex + 2]];
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// point layer size;
|
|
118
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
119
|
-
name: 'size',
|
|
120
|
-
type: _l7Core.AttributeType.Attribute,
|
|
121
|
-
descriptor: {
|
|
122
|
-
name: 'a_Size',
|
|
123
|
-
shaderLocation: this.attributeLocation.SIZE,
|
|
124
|
-
buffer: {
|
|
125
|
-
// give the WebGL driver a hint that this buffer may change
|
|
126
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
127
|
-
data: [],
|
|
128
|
-
type: _l7Core.gl.FLOAT
|
|
129
|
-
},
|
|
130
|
-
size: 1,
|
|
131
|
-
update: feature => {
|
|
132
|
-
const {
|
|
133
|
-
size = 5
|
|
134
|
-
} = feature;
|
|
135
|
-
return Array.isArray(size) ? [size[0]] : [size];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
// point layer size;
|
|
141
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
142
|
-
name: 'shape',
|
|
143
|
-
type: _l7Core.AttributeType.Attribute,
|
|
144
|
-
descriptor: {
|
|
145
|
-
name: 'a_Shape',
|
|
146
|
-
shaderLocation: this.attributeLocation.SHAPE,
|
|
147
|
-
buffer: {
|
|
148
|
-
// give the WebGL driver a hint that this buffer may change
|
|
149
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
150
|
-
data: [],
|
|
151
|
-
type: _l7Core.gl.FLOAT
|
|
152
|
-
},
|
|
153
|
-
size: 1,
|
|
154
|
-
update: feature => {
|
|
155
|
-
const {
|
|
156
|
-
shape = 2
|
|
157
|
-
} = feature;
|
|
158
|
-
const shape2d = this.layer.getLayerConfig().shape2d;
|
|
159
|
-
const shapeIndex = shape2d.indexOf(shape);
|
|
160
|
-
return [shapeIndex];
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
exports.default = FillModel;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { IModel } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class ExtrudeModel extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
SIZE: number;
|
|
17
|
-
EXTRUDE: number;
|
|
18
|
-
NORMAL: number;
|
|
19
|
-
};
|
|
20
|
-
private raiseCount;
|
|
21
|
-
private raiseRepeat;
|
|
22
|
-
protected getCommonUniformsInfo(): {
|
|
23
|
-
uniformsArray: number[];
|
|
24
|
-
uniformsLength: number;
|
|
25
|
-
uniformsOption: {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
initModels(): Promise<IModel[]>;
|
|
30
|
-
buildModels(): Promise<IModel[]>;
|
|
31
|
-
protected registerBuiltinAttributes(): void;
|
|
32
|
-
}
|