@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,34 +0,0 @@
|
|
|
1
|
-
layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;
|
|
2
|
-
layout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;
|
|
3
|
-
layout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;
|
|
4
|
-
layout(location = ATTRIBUTE_LOCATION_POS) in vec3 a_Pos;
|
|
5
|
-
layout(location = ATTRIBUTE_LOCATION_NORMAL) in vec3 a_Normal;
|
|
6
|
-
|
|
7
|
-
layout(std140) uniform commonUniforms {
|
|
8
|
-
vec2 u_radius;
|
|
9
|
-
float u_opacity;
|
|
10
|
-
float u_coverage;
|
|
11
|
-
float u_angle;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
out vec4 v_color;
|
|
15
|
-
|
|
16
|
-
#pragma include "projection"
|
|
17
|
-
#pragma include "project"
|
|
18
|
-
#pragma include "light"
|
|
19
|
-
#pragma include "picking"
|
|
20
|
-
|
|
21
|
-
void main() {
|
|
22
|
-
mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));
|
|
23
|
-
vec2 offset = vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage);
|
|
24
|
-
|
|
25
|
-
vec2 lnglat = unProjectFlat(a_Pos.xy + offset); // 实际的经纬度
|
|
26
|
-
vec4 project_pos = project_position(vec4(lnglat, a_Position.z * a_Size, 1.0));
|
|
27
|
-
|
|
28
|
-
float lightWeight = calc_lighting(project_pos);
|
|
29
|
-
v_color = vec4(a_Color.rgb * lightWeight, a_Color.w);
|
|
30
|
-
|
|
31
|
-
gl_Position = project_common_position_to_clipspace(project_pos);
|
|
32
|
-
|
|
33
|
-
setPickingColor(a_PickingColor);
|
|
34
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
layout(std140) uniform commonUniforms {
|
|
2
|
-
mat4 u_ViewProjectionMatrixUncentered;
|
|
3
|
-
mat4 u_InverseViewProjectionMatrix;
|
|
4
|
-
float u_opacity;
|
|
5
|
-
float u_common_uniforms_padding1;
|
|
6
|
-
float u_common_uniforms_padding2;
|
|
7
|
-
float u_common_uniforms_padding3;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
uniform sampler2D u_texture;
|
|
11
|
-
uniform sampler2D u_colorTexture;
|
|
12
|
-
|
|
13
|
-
in vec2 v_texCoord;
|
|
14
|
-
in float v_intensity;
|
|
15
|
-
out vec4 outputColor;
|
|
16
|
-
|
|
17
|
-
void main() {
|
|
18
|
-
float intensity = texture(SAMPLER_2D(u_texture), v_texCoord).r;
|
|
19
|
-
vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(intensity, 0));
|
|
20
|
-
outputColor = color;
|
|
21
|
-
// gl_FragColor.a = color.a * smoothstep(0.1,0.2,intensity)* u_opacity;
|
|
22
|
-
outputColor.a = color.a * smoothstep(0.0, 0.1, intensity) * u_opacity;
|
|
23
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
layout(location = 0) in vec3 a_Position;
|
|
2
|
-
layout(location = 10) in vec2 a_Uv;
|
|
3
|
-
|
|
4
|
-
layout(std140) uniform commonUniforms {
|
|
5
|
-
mat4 u_ViewProjectionMatrixUncentered;
|
|
6
|
-
mat4 u_InverseViewProjectionMatrix;
|
|
7
|
-
float u_opacity;
|
|
8
|
-
float u_common_uniforms_padding1;
|
|
9
|
-
float u_common_uniforms_padding2;
|
|
10
|
-
float u_common_uniforms_padding3;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
uniform sampler2D u_texture;
|
|
14
|
-
uniform sampler2D u_colorTexture;
|
|
15
|
-
|
|
16
|
-
out vec2 v_texCoord;
|
|
17
|
-
out float v_intensity;
|
|
18
|
-
|
|
19
|
-
vec2 toBezier(float t, vec2 P0, vec2 P1, vec2 P2, vec2 P3) {
|
|
20
|
-
float t2 = t * t;
|
|
21
|
-
float one_minus_t = 1.0 - t;
|
|
22
|
-
float one_minus_t2 = one_minus_t * one_minus_t;
|
|
23
|
-
return P0 * one_minus_t2 * one_minus_t +
|
|
24
|
-
P1 * 3.0 * t * one_minus_t2 +
|
|
25
|
-
P2 * 3.0 * t2 * one_minus_t +
|
|
26
|
-
P3 * t2 * t;
|
|
27
|
-
}
|
|
28
|
-
vec2 toBezier(float t, vec4 p) {
|
|
29
|
-
return toBezier(t, vec2(0.0, 0.0), vec2(p.x, p.y), vec2(p.z, p.w), vec2(1.0, 1.0));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
#pragma include "projection"
|
|
33
|
-
#pragma include "project"
|
|
34
|
-
|
|
35
|
-
void main() {
|
|
36
|
-
v_texCoord = a_Uv;
|
|
37
|
-
|
|
38
|
-
vec2 pos = a_Uv * vec2(2.0) - vec2(1.0); // 将原本 0 -> 1 的 uv 转换为 -1 -> 1 的标准坐标空间(NDC)
|
|
39
|
-
|
|
40
|
-
vec4 p1 = vec4(pos, 0.0, 1.0); // x/y 平面上的点(z == 0)可以认为是三维上的点被投影到平面后的点
|
|
41
|
-
vec4 p2 = vec4(pos, 1.0, 1.0); // 平行于x/y平面、z==1 的平面上的点
|
|
42
|
-
|
|
43
|
-
vec4 inverseP1 = u_InverseViewProjectionMatrix * p1; // 根据视图投影矩阵的逆矩阵平面上的反算出三维空间中的点(p1平面上的点)
|
|
44
|
-
vec4 inverseP2 = u_InverseViewProjectionMatrix * p2;
|
|
45
|
-
|
|
46
|
-
inverseP1 = inverseP1 / inverseP1.w; // 归一化操作(归一化后为世界坐标)
|
|
47
|
-
inverseP2 = inverseP2 / inverseP2.w;
|
|
48
|
-
|
|
49
|
-
float zPos = (0.0 - inverseP1.z) / (inverseP2.z - inverseP1.z); // ??
|
|
50
|
-
vec4 position = inverseP1 + zPos * (inverseP2 - inverseP1);
|
|
51
|
-
|
|
52
|
-
vec4 b = vec4(0.5, 0.0, 1.0, 0.5);
|
|
53
|
-
float fh;
|
|
54
|
-
|
|
55
|
-
v_intensity = texture(SAMPLER_2D(u_texture), v_texCoord).r;
|
|
56
|
-
fh = toBezier(v_intensity, b).y;
|
|
57
|
-
gl_Position = u_ViewProjectionMatrixUncentered * vec4(position.xy, fh * project_pixel(50.0), 1.0);
|
|
58
|
-
|
|
59
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
uniform sampler2D u_texture; // 热力强度图
|
|
2
|
-
uniform sampler2D u_colorTexture; // 根据强度分布的色带
|
|
3
|
-
|
|
4
|
-
layout(std140) uniform commonUniforms {
|
|
5
|
-
float u_opacity;
|
|
6
|
-
float u_common_uniforms_padding1;
|
|
7
|
-
float u_common_uniforms_padding2;
|
|
8
|
-
float u_common_uniforms_padding3;
|
|
9
|
-
};
|
|
10
|
-
in vec2 v_texCoord;
|
|
11
|
-
out vec4 outputColor;
|
|
12
|
-
|
|
13
|
-
#pragma include "scene_uniforms"
|
|
14
|
-
|
|
15
|
-
float getBlurIndusty() {
|
|
16
|
-
float vW = 2.0 / u_ViewportSize.x;
|
|
17
|
-
float vH = 2.0 / u_ViewportSize.y;
|
|
18
|
-
vec2 vUv = v_texCoord;
|
|
19
|
-
float i11 = texture(SAMPLER_2D(u_texture), vec2(vUv.x - 1.0 * vW, vUv.y + 1.0 * vH)).r;
|
|
20
|
-
float i12 = texture(SAMPLER_2D(u_texture), vec2(vUv.x - 0.0 * vW, vUv.y + 1.0 * vH)).r;
|
|
21
|
-
float i13 = texture(SAMPLER_2D(u_texture), vec2(vUv.x + 1.0 * vW, vUv.y + 1.0 * vH)).r;
|
|
22
|
-
|
|
23
|
-
float i21 = texture(SAMPLER_2D(u_texture), vec2(vUv.x - 1.0 * vW, vUv.y)).r;
|
|
24
|
-
float i22 = texture(SAMPLER_2D(u_texture), vec2(vUv.x, vUv.y)).r;
|
|
25
|
-
float i23 = texture(SAMPLER_2D(u_texture), vec2(vUv.x + 1.0 * vW, vUv.y)).r;
|
|
26
|
-
|
|
27
|
-
float i31 = texture(SAMPLER_2D(u_texture), vec2(vUv.x - 1.0 * vW, vUv.y - 1.0 * vH)).r;
|
|
28
|
-
float i32 = texture(SAMPLER_2D(u_texture), vec2(vUv.x - 0.0 * vW, vUv.y - 1.0 * vH)).r;
|
|
29
|
-
float i33 = texture(SAMPLER_2D(u_texture), vec2(vUv.x + 1.0 * vW, vUv.y - 1.0 * vH)).r;
|
|
30
|
-
|
|
31
|
-
return (i11 + i12 + i13 + i21 + i21 + i22 + i23 + i31 + i32 + i33) / 9.0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
void main() {
|
|
35
|
-
// float intensity = texture(u_texture, v_texCoord).r;
|
|
36
|
-
float intensity = getBlurIndusty();
|
|
37
|
-
vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(intensity, 0.0));
|
|
38
|
-
outputColor = color;
|
|
39
|
-
outputColor.a = color.a * smoothstep(0.0, 0.1, intensity) * u_opacity;
|
|
40
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
layout(std140) uniform commonUniforms {
|
|
2
|
-
float u_radius;
|
|
3
|
-
float u_intensity;
|
|
4
|
-
float u_common_uniforms_padding1;
|
|
5
|
-
float u_common_uniforms_padding2;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
in vec2 v_extrude;
|
|
9
|
-
in float v_weight;
|
|
10
|
-
out vec4 outputColor;
|
|
11
|
-
#define GAUSS_COEF (0.3989422804014327)
|
|
12
|
-
|
|
13
|
-
void main() {
|
|
14
|
-
float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);
|
|
15
|
-
float val = v_weight * u_intensity * GAUSS_COEF * exp(d);
|
|
16
|
-
outputColor = vec4(val, 1.0, 1.0, 1.0);
|
|
17
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;
|
|
2
|
-
layout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;
|
|
3
|
-
layout(location = ATTRIBUTE_LOCATION_DIR) in vec2 a_Dir;
|
|
4
|
-
|
|
5
|
-
layout(std140) uniform commonUniforms {
|
|
6
|
-
float u_radius;
|
|
7
|
-
float u_intensity;
|
|
8
|
-
float u_common_uniforms_padding1;
|
|
9
|
-
float u_common_uniforms_padding2;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
out vec2 v_extrude;
|
|
13
|
-
out float v_weight;
|
|
14
|
-
|
|
15
|
-
#define GAUSS_COEF (0.3989422804014327)
|
|
16
|
-
|
|
17
|
-
#pragma include "projection"
|
|
18
|
-
#pragma include "picking"
|
|
19
|
-
|
|
20
|
-
void main() {
|
|
21
|
-
vec3 picking_color_placeholder = u_PickingColor;
|
|
22
|
-
|
|
23
|
-
v_weight = a_Size;
|
|
24
|
-
float ZERO = 1.0 / 255.0 / 16.0;
|
|
25
|
-
float extrude_x = a_Dir.x * 2.0 - 1.0;
|
|
26
|
-
float extrude_y = a_Dir.y * 2.0 - 1.0;
|
|
27
|
-
vec2 extrude_dir = normalize(vec2(extrude_x, extrude_y));
|
|
28
|
-
float S = sqrt(-2.0 * log(ZERO / a_Size / u_intensity / GAUSS_COEF)) / 2.5;
|
|
29
|
-
v_extrude = extrude_dir * S;
|
|
30
|
-
|
|
31
|
-
vec2 offset = project_pixel(v_extrude * u_radius);
|
|
32
|
-
vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));
|
|
33
|
-
|
|
34
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
|
|
35
|
-
|
|
36
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
layout(location = 0) in vec3 a_Position;
|
|
2
|
-
layout(location = 10) in vec2 a_Uv;
|
|
3
|
-
|
|
4
|
-
layout(std140) uniform commonUniforms {
|
|
5
|
-
float u_opacity;
|
|
6
|
-
float u_common_uniforms_padding1;
|
|
7
|
-
float u_common_uniforms_padding2;
|
|
8
|
-
float u_common_uniforms_padding3;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
#pragma include "scene_uniforms"
|
|
12
|
-
|
|
13
|
-
out vec2 v_texCoord;
|
|
14
|
-
void main() {
|
|
15
|
-
v_texCoord = a_Uv;
|
|
16
|
-
#ifdef VIEWPORT_ORIGIN_TL
|
|
17
|
-
v_texCoord.y = 1.0 - v_texCoord.y;
|
|
18
|
-
#endif
|
|
19
|
-
|
|
20
|
-
gl_Position = vec4(a_Position.xy, 0, 1.0);
|
|
21
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;
|
|
2
|
-
layout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;
|
|
3
|
-
layout(location = ATTRIBUTE_LOCATION_POS) in vec3 a_Pos;
|
|
4
|
-
|
|
5
|
-
layout(std140) uniform commonUniforms {
|
|
6
|
-
vec2 u_radius;
|
|
7
|
-
float u_opacity;
|
|
8
|
-
float u_coverage;
|
|
9
|
-
float u_angle;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
out vec4 v_color;
|
|
13
|
-
|
|
14
|
-
#pragma include "projection"
|
|
15
|
-
#pragma include "project"
|
|
16
|
-
#pragma include "picking"
|
|
17
|
-
|
|
18
|
-
void main() {
|
|
19
|
-
v_color = a_Color;
|
|
20
|
-
v_color.a *= u_opacity;
|
|
21
|
-
|
|
22
|
-
mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));
|
|
23
|
-
vec2 offset = vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage);
|
|
24
|
-
vec2 lnglat = unProjectFlat(a_Pos.xy + offset);
|
|
25
|
-
|
|
26
|
-
vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));
|
|
27
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));
|
|
28
|
-
|
|
29
|
-
setPickingColor(a_PickingColor);
|
|
30
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.heatMap3DTriangulation = heatMap3DTriangulation;
|
|
7
|
-
function heatMap3DTriangulation(width, height) {
|
|
8
|
-
const indices = [];
|
|
9
|
-
const vertices = [];
|
|
10
|
-
const uvs = [];
|
|
11
|
-
const gridX1 = width + 1;
|
|
12
|
-
const gridY1 = height + 1;
|
|
13
|
-
const widthHalf = width / 2;
|
|
14
|
-
const heightHalf = height / 2;
|
|
15
|
-
for (let iy = 0; iy < gridY1; iy++) {
|
|
16
|
-
const y = iy - heightHalf;
|
|
17
|
-
for (let ix = 0; ix < gridX1; ix++) {
|
|
18
|
-
const x = ix - widthHalf;
|
|
19
|
-
vertices.push(x / widthHalf, -y / heightHalf, 0);
|
|
20
|
-
uvs.push(ix / width);
|
|
21
|
-
uvs.push(1 - iy / height);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
for (let iy = 0; iy < height; iy++) {
|
|
25
|
-
for (let ix = 0; ix < width; ix++) {
|
|
26
|
-
const a = ix + gridX1 * iy;
|
|
27
|
-
const b = ix + gridX1 * (iy + 1);
|
|
28
|
-
const c = ix + 1 + gridX1 * (iy + 1);
|
|
29
|
-
const d = ix + 1 + gridX1 * iy;
|
|
30
|
-
indices.push(a, b, d);
|
|
31
|
-
indices.push(b, c, d);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
vertices,
|
|
36
|
-
indices,
|
|
37
|
-
uvs
|
|
38
|
-
};
|
|
39
|
-
}
|
package/lib/image/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import BaseLayer from '../core/BaseLayer';
|
|
2
|
-
import type { IImageLayerStyleOptions } from '../core/interface';
|
|
3
|
-
import type { ImageModelType } from './models/index';
|
|
4
|
-
export default class ImageLayer extends BaseLayer<IImageLayerStyleOptions> {
|
|
5
|
-
type: string;
|
|
6
|
-
buildModels(): Promise<void>;
|
|
7
|
-
protected getDefaultConfig(): {};
|
|
8
|
-
getModelType(): ImageModelType;
|
|
9
|
-
}
|
package/lib/image/index.js
DELETED
|
@@ -1,36 +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 _BaseLayer = _interopRequireDefault(require("../core/BaseLayer"));
|
|
11
|
-
var _index = _interopRequireDefault(require("./models/index"));
|
|
12
|
-
class ImageLayer extends _BaseLayer.default {
|
|
13
|
-
constructor(...args) {
|
|
14
|
-
super(...args);
|
|
15
|
-
(0, _defineProperty2.default)(this, "type", 'ImageLayer');
|
|
16
|
-
}
|
|
17
|
-
buildModels() {
|
|
18
|
-
var _this = this;
|
|
19
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
20
|
-
const modelType = _this.getModelType();
|
|
21
|
-
_this.layerModel = new _index.default[modelType](_this);
|
|
22
|
-
yield _this.initLayerModels();
|
|
23
|
-
})();
|
|
24
|
-
}
|
|
25
|
-
getDefaultConfig() {
|
|
26
|
-
const type = this.getModelType();
|
|
27
|
-
const defaultConfig = {
|
|
28
|
-
image: {}
|
|
29
|
-
};
|
|
30
|
-
return defaultConfig[type];
|
|
31
|
-
}
|
|
32
|
-
getModelType() {
|
|
33
|
-
return 'image';
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.default = ImageLayer;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { IModel, ITexture2D } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class ImageModel extends BaseModel {
|
|
4
|
-
protected texture: ITexture2D;
|
|
5
|
-
protected get attributeLocation(): {
|
|
6
|
-
readonly POSITION: 0;
|
|
7
|
-
readonly POSITION_64LOW: 1;
|
|
8
|
-
readonly COLOR: 2;
|
|
9
|
-
readonly PICKING_COLOR: 3;
|
|
10
|
-
readonly STROKE: 4;
|
|
11
|
-
readonly OPACITY: 5;
|
|
12
|
-
readonly OFFSETS: 6;
|
|
13
|
-
readonly ROTATION: 7;
|
|
14
|
-
readonly MAX: 8;
|
|
15
|
-
} & Record<string, number> & {
|
|
16
|
-
MAX: 8;
|
|
17
|
-
UV: number;
|
|
18
|
-
};
|
|
19
|
-
protected getCommonUniformsInfo(): {
|
|
20
|
-
uniformsArray: number[];
|
|
21
|
-
uniformsLength: number;
|
|
22
|
-
uniformsOption: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
initModels(): Promise<IModel[]>;
|
|
27
|
-
clearModels(): void;
|
|
28
|
-
private loadTexture;
|
|
29
|
-
buildModels(): Promise<IModel[]>;
|
|
30
|
-
protected registerBuiltinAttributes(): void;
|
|
31
|
-
}
|
|
@@ -1,121 +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
|
-
/* babel-plugin-inline-import '../shaders/image_frag.glsl' */
|
|
15
|
-
const ImageFrag = "uniform sampler2D u_texture;\nlayout(std140) uniform commonUniforms {\n float u_opacity:1.0;\n float u_brightness:1.0;\n float u_contrast:1.0;\n float u_saturation:1.0;\n float u_gamma:1.0;\n};\n\nin vec2 v_texCoord;\nout vec4 outputColor;\nvec3 setContrast(vec3 rgb, float contrast) {\n vec3 color = mix(vec3(0.5), rgb, contrast);\n color = clamp(color, 0.0, 1.0);\n return color;\n}\nvec3 setSaturation(vec3 rgb, float adjustment) {\n const vec3 grayVector = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, grayVector));\n vec3 color = mix(intensity, rgb, adjustment);\n color = clamp(color, 0.0, 1.0);\n return color;\n}\nvoid main() {\n vec4 color = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y));\n //brightness\n color.rgb = mix(vec3(0.0, 0.0, 0.0), color.rgb, u_brightness);\n //contrast\n color.rgb = setContrast(color.rgb, u_contrast);\n // saturation\n color.rgb = setSaturation(color.rgb, u_saturation);\n // gamma\n color.rgb = pow(color.rgb, vec3(u_gamma));\n outputColor = color;\n outputColor.a *= u_opacity;\n if(outputColor.a < 0.01)\n discard;\n}\n";
|
|
16
|
-
/* babel-plugin-inline-import '../shaders/image_vert.glsl' */
|
|
17
|
-
const ImageVert = "layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec2 a_Uv;\n\nlayout(std140) uniform commonUniforms {\n float u_opacity:1.0;\n float u_brightness:1.0;\n float u_contrast:1.0;\n float u_saturation:1.0;\n float u_gamma:1.0;\n};\n\nout vec2 v_texCoord;\n#pragma include \"projection\"\n\nvoid main() {\n v_texCoord = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));\n}\n";
|
|
18
|
-
class ImageModel extends _BaseModel.default {
|
|
19
|
-
constructor(...args) {
|
|
20
|
-
super(...args);
|
|
21
|
-
(0, _defineProperty2.default)(this, "texture", void 0);
|
|
22
|
-
}
|
|
23
|
-
get attributeLocation() {
|
|
24
|
-
return Object.assign(super.attributeLocation, {
|
|
25
|
-
MAX: super.attributeLocation.MAX,
|
|
26
|
-
UV: 9
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
getCommonUniformsInfo() {
|
|
30
|
-
const {
|
|
31
|
-
opacity,
|
|
32
|
-
brightness,
|
|
33
|
-
contrast,
|
|
34
|
-
saturation,
|
|
35
|
-
gamma
|
|
36
|
-
} = this.layer.getLayerConfig();
|
|
37
|
-
const commonOptions = {
|
|
38
|
-
u_opacity: (0, _l7Utils.defaultValue)(opacity, 1.0),
|
|
39
|
-
u_brightness: (0, _l7Utils.defaultValue)(brightness, 1.0),
|
|
40
|
-
u_contrast: (0, _l7Utils.defaultValue)(contrast, 1.0),
|
|
41
|
-
u_saturation: (0, _l7Utils.defaultValue)(saturation, 1.0),
|
|
42
|
-
u_gamma: (0, _l7Utils.defaultValue)(gamma, 1.0)
|
|
43
|
-
};
|
|
44
|
-
this.textures = [this.texture];
|
|
45
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
46
|
-
return commonBufferInfo;
|
|
47
|
-
}
|
|
48
|
-
initModels() {
|
|
49
|
-
var _this = this;
|
|
50
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
51
|
-
yield _this.loadTexture();
|
|
52
|
-
return _this.buildModels();
|
|
53
|
-
})();
|
|
54
|
-
}
|
|
55
|
-
clearModels() {
|
|
56
|
-
var _this$texture;
|
|
57
|
-
(_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
|
|
58
|
-
}
|
|
59
|
-
loadTexture() {
|
|
60
|
-
var _this2 = this;
|
|
61
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
62
|
-
const {
|
|
63
|
-
createTexture2D
|
|
64
|
-
} = _this2.rendererService;
|
|
65
|
-
const source = _this2.layer.getSource();
|
|
66
|
-
const imageData = yield source.data.images;
|
|
67
|
-
_this2.texture = createTexture2D({
|
|
68
|
-
data: imageData[0],
|
|
69
|
-
width: imageData[0].width,
|
|
70
|
-
height: imageData[0].height,
|
|
71
|
-
mag: _l7Core.gl.LINEAR,
|
|
72
|
-
min: _l7Core.gl.LINEAR
|
|
73
|
-
});
|
|
74
|
-
})();
|
|
75
|
-
}
|
|
76
|
-
buildModels() {
|
|
77
|
-
var _this3 = this;
|
|
78
|
-
return (0, _asyncToGenerator2.default)(function* () {
|
|
79
|
-
_this3.initUniformsBuffer();
|
|
80
|
-
const model = yield _this3.layer.buildLayerModel({
|
|
81
|
-
moduleName: 'rasterImage',
|
|
82
|
-
vertexShader: ImageVert,
|
|
83
|
-
fragmentShader: ImageFrag,
|
|
84
|
-
defines: _this3.getDefines(),
|
|
85
|
-
triangulation: _triangulation.RasterImageTriangulation,
|
|
86
|
-
primitive: _l7Core.gl.TRIANGLES,
|
|
87
|
-
blend: {
|
|
88
|
-
// Tip: 优化显示效果
|
|
89
|
-
enable: true
|
|
90
|
-
},
|
|
91
|
-
depth: {
|
|
92
|
-
enable: false
|
|
93
|
-
},
|
|
94
|
-
pickingEnabled: false
|
|
95
|
-
});
|
|
96
|
-
return [model];
|
|
97
|
-
})();
|
|
98
|
-
}
|
|
99
|
-
registerBuiltinAttributes() {
|
|
100
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
|
|
101
|
-
this.registerPosition64LowAttribute();
|
|
102
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
103
|
-
name: 'uv',
|
|
104
|
-
type: _l7Core.AttributeType.Attribute,
|
|
105
|
-
descriptor: {
|
|
106
|
-
name: 'a_Uv',
|
|
107
|
-
shaderLocation: this.attributeLocation.UV,
|
|
108
|
-
buffer: {
|
|
109
|
-
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
110
|
-
data: [],
|
|
111
|
-
type: _l7Core.gl.FLOAT
|
|
112
|
-
},
|
|
113
|
-
size: 2,
|
|
114
|
-
update: (feature, featureIdx, vertex) => {
|
|
115
|
-
return [vertex[3], vertex[4]];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
exports.default = ImageModel;
|
|
@@ -1,12 +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 _image = _interopRequireDefault(require("./image"));
|
|
9
|
-
const ImageModels = {
|
|
10
|
-
image: _image.default
|
|
11
|
-
};
|
|
12
|
-
var _default = exports.default = ImageModels;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
precision mediump float;
|
|
2
|
-
uniform float u_opacity: 1.0;
|
|
3
|
-
|
|
4
|
-
uniform sampler2D u_texture;
|
|
5
|
-
uniform sampler2D u_colorTexture;
|
|
6
|
-
|
|
7
|
-
varying vec2 v_texCoord;
|
|
8
|
-
|
|
9
|
-
uniform vec2 u_domain;
|
|
10
|
-
uniform float u_noDataValue;
|
|
11
|
-
uniform bool u_clampLow: true;
|
|
12
|
-
uniform bool u_clampHigh: true;
|
|
13
|
-
|
|
14
|
-
void main() {
|
|
15
|
-
vec4 baseColor = texture2D(u_texture, vec2(v_texCoord.x, v_texCoord.y));
|
|
16
|
-
|
|
17
|
-
float r = baseColor.r;
|
|
18
|
-
float g = baseColor.g;
|
|
19
|
-
float b = baseColor.b;
|
|
20
|
-
float value = -10000.0 + ((r * 256.0 * 256.0 + g * 256.0 + b) * 0.1);
|
|
21
|
-
// if (value == u_noDataValue) {
|
|
22
|
-
// gl_FragColor = vec4(0.0, 0, 0, 0.0);
|
|
23
|
-
// } else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1])) {
|
|
24
|
-
// gl_FragColor = vec4(0, 0, 0, 0);
|
|
25
|
-
// } else {
|
|
26
|
-
float normalisedValue =(value - u_domain[0]) / (u_domain[1] - u_domain[0]);
|
|
27
|
-
vec4 color = texture2D(u_colorTexture, vec2(normalisedValue, 0));
|
|
28
|
-
gl_FragColor = vec4(r,g,b, 1.0);
|
|
29
|
-
// gl_FragColor = color;
|
|
30
|
-
// gl_FragColor.a = gl_FragColor.a * u_opacity ;
|
|
31
|
-
// }
|
|
32
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
uniform sampler2D u_texture;
|
|
2
|
-
layout(std140) uniform commonUniforms {
|
|
3
|
-
float u_opacity:1.0;
|
|
4
|
-
float u_brightness:1.0;
|
|
5
|
-
float u_contrast:1.0;
|
|
6
|
-
float u_saturation:1.0;
|
|
7
|
-
float u_gamma:1.0;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
in vec2 v_texCoord;
|
|
11
|
-
out vec4 outputColor;
|
|
12
|
-
vec3 setContrast(vec3 rgb, float contrast) {
|
|
13
|
-
vec3 color = mix(vec3(0.5), rgb, contrast);
|
|
14
|
-
color = clamp(color, 0.0, 1.0);
|
|
15
|
-
return color;
|
|
16
|
-
}
|
|
17
|
-
vec3 setSaturation(vec3 rgb, float adjustment) {
|
|
18
|
-
const vec3 grayVector = vec3(0.2125, 0.7154, 0.0721);
|
|
19
|
-
vec3 intensity = vec3(dot(rgb, grayVector));
|
|
20
|
-
vec3 color = mix(intensity, rgb, adjustment);
|
|
21
|
-
color = clamp(color, 0.0, 1.0);
|
|
22
|
-
return color;
|
|
23
|
-
}
|
|
24
|
-
void main() {
|
|
25
|
-
vec4 color = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y));
|
|
26
|
-
//brightness
|
|
27
|
-
color.rgb = mix(vec3(0.0, 0.0, 0.0), color.rgb, u_brightness);
|
|
28
|
-
//contrast
|
|
29
|
-
color.rgb = setContrast(color.rgb, u_contrast);
|
|
30
|
-
// saturation
|
|
31
|
-
color.rgb = setSaturation(color.rgb, u_saturation);
|
|
32
|
-
// gamma
|
|
33
|
-
color.rgb = pow(color.rgb, vec3(u_gamma));
|
|
34
|
-
outputColor = color;
|
|
35
|
-
outputColor.a *= u_opacity;
|
|
36
|
-
if(outputColor.a < 0.01)
|
|
37
|
-
discard;
|
|
38
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;
|
|
2
|
-
layout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;
|
|
3
|
-
layout(location = ATTRIBUTE_LOCATION_UV) in vec2 a_Uv;
|
|
4
|
-
|
|
5
|
-
layout(std140) uniform commonUniforms {
|
|
6
|
-
float u_opacity:1.0;
|
|
7
|
-
float u_brightness:1.0;
|
|
8
|
-
float u_contrast:1.0;
|
|
9
|
-
float u_saturation:1.0;
|
|
10
|
-
float u_gamma:1.0;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
out vec2 v_texCoord;
|
|
14
|
-
#pragma include "projection"
|
|
15
|
-
|
|
16
|
-
void main() {
|
|
17
|
-
v_texCoord = a_Uv;
|
|
18
|
-
vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);
|
|
19
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));
|
|
20
|
-
}
|
package/lib/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import CanvasLayer from './canvas';
|
|
2
|
-
import CityBuildingLayer from './citybuilding/building';
|
|
3
|
-
import BaseLayer from './core/BaseLayer';
|
|
4
|
-
import BaseModel from './core/BaseModel';
|
|
5
|
-
import GeometryLayer from './geometry';
|
|
6
|
-
import HeatmapLayer from './heatmap';
|
|
7
|
-
import ImageLayer from './image';
|
|
8
|
-
import LineLayer from './line/index';
|
|
9
|
-
import PointLayer from './point';
|
|
10
|
-
import PolygonLayer from './polygon';
|
|
11
|
-
import RasterLayer from './raster';
|
|
12
|
-
import TileLayer from './tile/core/BaseLayer';
|
|
13
|
-
import TileDebugLayer from './tile/core/TileDebugLayer';
|
|
14
|
-
import EarthLayer from './earth';
|
|
15
|
-
import MaskLayer from './mask';
|
|
16
|
-
import WindLayer from './wind';
|
|
17
|
-
export * from './core/interface';
|
|
18
|
-
export { BaseLayer, BaseModel, CanvasLayer, CityBuildingLayer, EarthLayer, GeometryLayer, HeatmapLayer, ImageLayer, LineLayer, MaskLayer, PointLayer, PolygonLayer, RasterLayer, TileDebugLayer, TileLayer, WindLayer, };
|