@antv/l7-layers 2.25.5 → 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,10 +0,0 @@
|
|
|
1
|
-
import RasterModel from "./raster";
|
|
2
|
-
import RasterRgbModel from "./rasterRgb";
|
|
3
|
-
import RasterTerrainRGB from "./rasterTerrainRgb";
|
|
4
|
-
const RasterModels = {
|
|
5
|
-
raster: RasterModel,
|
|
6
|
-
rasterRgb: RasterRgbModel,
|
|
7
|
-
raster3d: RasterModel,
|
|
8
|
-
rasterTerrainRgb: RasterTerrainRGB
|
|
9
|
-
};
|
|
10
|
-
export default RasterModels;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { IModel, ITexture2D } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class RasterModel extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
UV: number;
|
|
17
|
-
};
|
|
18
|
-
protected texture: ITexture2D;
|
|
19
|
-
protected colorTexture: ITexture2D;
|
|
20
|
-
getUninforms(): {
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
};
|
|
23
|
-
protected getCommonUniformsInfo(): {
|
|
24
|
-
uniformsArray: number[];
|
|
25
|
-
uniformsLength: number;
|
|
26
|
-
uniformsOption: {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
private getRasterData;
|
|
31
|
-
initModels(): Promise<IModel[]>;
|
|
32
|
-
buildModels(): Promise<IModel[]>;
|
|
33
|
-
clearModels(): void;
|
|
34
|
-
protected registerBuiltinAttributes(): void;
|
|
35
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
5
|
-
import { getDefaultDomain } from '@antv/l7-utils';
|
|
6
|
-
import BaseModel from "../../core/BaseModel";
|
|
7
|
-
import { RasterImageTriangulation } from "../../core/triangulation";
|
|
8
|
-
/* babel-plugin-inline-import '../shaders/raster/raster_2d_frag.glsl' */
|
|
9
|
-
const rasterFrag = "layout(std140) uniform commonUniforms {\n vec2 u_domain;\n float u_opacity;\n float u_noDataValue;\n float u_clampLow;\n float u_clampHigh;\n};\n\nuniform sampler2D u_rasterTexture;\nuniform sampler2D u_colorTexture;\n\nin vec2 v_texCoord;\n\nbool isnan_emu(float x) {\n return x > 0.0 || x < 0.0\n ? x != x\n : x != 0.0;\n}\n\nout vec4 outputColor;\n\nvoid main() {\n // Can use any component here since u_rasterTexture is under luminance format.\n float value = texture(SAMPLER_2D(u_rasterTexture), vec2(v_texCoord.x, v_texCoord.y)).r;\n if (value == u_noDataValue || isnan_emu(value)) {\n discard;\n } else if (u_clampLow < 0.5 && value < u_domain[0] || u_clampHigh < 0.5 && value > u_domain[1]) {\n discard;\n } else {\n float normalisedValue = (value - u_domain[0]) / (u_domain[1] - u_domain[0]);\n vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(normalisedValue, 0));\n\n outputColor = color;\n outputColor.a = outputColor.a * u_opacity;\n if (outputColor.a < 0.01) discard;\n }\n}\n";
|
|
10
|
-
/* babel-plugin-inline-import '../shaders/raster/raster_2d_vert.glsl' */
|
|
11
|
-
const rasterVert = "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 vec2 u_domain;\n float u_opacity;\n float u_noDataValue;\n float u_clampLow;\n float u_clampHigh;\n};\n\nout vec2 v_texCoord;\n\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";
|
|
12
|
-
export default class RasterModel extends BaseModel {
|
|
13
|
-
constructor(...args) {
|
|
14
|
-
super(...args);
|
|
15
|
-
_defineProperty(this, "texture", void 0);
|
|
16
|
-
_defineProperty(this, "colorTexture", void 0);
|
|
17
|
-
}
|
|
18
|
-
get attributeLocation() {
|
|
19
|
-
return Object.assign(super.attributeLocation, {
|
|
20
|
-
MAX: super.attributeLocation.MAX,
|
|
21
|
-
UV: 9
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
getUninforms() {
|
|
25
|
-
const commoninfo = this.getCommonUniformsInfo();
|
|
26
|
-
const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
|
|
27
|
-
this.updateStyleUnifoms();
|
|
28
|
-
return _objectSpread(_objectSpread({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
|
|
29
|
-
}
|
|
30
|
-
getCommonUniformsInfo() {
|
|
31
|
-
const {
|
|
32
|
-
opacity = 1,
|
|
33
|
-
clampLow = true,
|
|
34
|
-
clampHigh = true,
|
|
35
|
-
noDataValue = -9999999,
|
|
36
|
-
domain,
|
|
37
|
-
rampColors
|
|
38
|
-
} = this.layer.getLayerConfig();
|
|
39
|
-
const newdomain = domain || getDefaultDomain(rampColors);
|
|
40
|
-
this.colorTexture = this.layer.textureService.getColorTexture(rampColors, newdomain);
|
|
41
|
-
const commonOptions = {
|
|
42
|
-
u_domain: newdomain,
|
|
43
|
-
u_opacity: opacity || 1,
|
|
44
|
-
u_noDataValue: noDataValue,
|
|
45
|
-
u_clampLow: clampLow ? 1 : 0,
|
|
46
|
-
u_clampHigh: (typeof clampHigh !== 'undefined' ? clampHigh : clampLow) ? 1 : 0,
|
|
47
|
-
u_rasterTexture: this.texture,
|
|
48
|
-
u_colorTexture: this.colorTexture
|
|
49
|
-
};
|
|
50
|
-
this.textures = [this.texture, this.colorTexture];
|
|
51
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
52
|
-
return commonBufferInfo;
|
|
53
|
-
}
|
|
54
|
-
getRasterData(parserDataItem) {
|
|
55
|
-
return _asyncToGenerator(function* () {
|
|
56
|
-
if (Array.isArray(parserDataItem.data)) {
|
|
57
|
-
// 直接传入波段数据
|
|
58
|
-
return {
|
|
59
|
-
data: parserDataItem.data,
|
|
60
|
-
width: parserDataItem.width,
|
|
61
|
-
height: parserDataItem.height
|
|
62
|
-
};
|
|
63
|
-
} else {
|
|
64
|
-
// 多波段形式、需要进行处理
|
|
65
|
-
const {
|
|
66
|
-
rasterData,
|
|
67
|
-
width,
|
|
68
|
-
height
|
|
69
|
-
} = yield parserDataItem.data;
|
|
70
|
-
return {
|
|
71
|
-
data: Array.from(rasterData),
|
|
72
|
-
width,
|
|
73
|
-
height
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
})();
|
|
77
|
-
}
|
|
78
|
-
initModels() {
|
|
79
|
-
var _this = this;
|
|
80
|
-
return _asyncToGenerator(function* () {
|
|
81
|
-
return _this.buildModels();
|
|
82
|
-
})();
|
|
83
|
-
}
|
|
84
|
-
buildModels() {
|
|
85
|
-
var _this2 = this;
|
|
86
|
-
return _asyncToGenerator(function* () {
|
|
87
|
-
_this2.initUniformsBuffer();
|
|
88
|
-
const source = _this2.layer.getSource();
|
|
89
|
-
const {
|
|
90
|
-
createTexture2D,
|
|
91
|
-
queryVerdorInfo
|
|
92
|
-
} = _this2.rendererService;
|
|
93
|
-
const parserDataItem = source.data.dataArray[0];
|
|
94
|
-
const {
|
|
95
|
-
data,
|
|
96
|
-
width,
|
|
97
|
-
height
|
|
98
|
-
} = yield _this2.getRasterData(parserDataItem);
|
|
99
|
-
_this2.texture = createTexture2D({
|
|
100
|
-
// @ts-ignore
|
|
101
|
-
data: new Float32Array(data),
|
|
102
|
-
width,
|
|
103
|
-
height,
|
|
104
|
-
/**
|
|
105
|
-
* WebGL1 allow the combination of gl.LUMINANCE & gl.FLOAT with OES_texture_float
|
|
106
|
-
* TODO: https://github.com/antvis/g-device-api/issues/188
|
|
107
|
-
*/
|
|
108
|
-
format: queryVerdorInfo() === 'WebGL1' ? gl.LUMINANCE : gl.RED,
|
|
109
|
-
type: gl.FLOAT,
|
|
110
|
-
alignment: 1
|
|
111
|
-
});
|
|
112
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
113
|
-
moduleName: 'rasterImageData',
|
|
114
|
-
vertexShader: rasterVert,
|
|
115
|
-
fragmentShader: rasterFrag,
|
|
116
|
-
defines: _this2.getDefines(),
|
|
117
|
-
triangulation: RasterImageTriangulation,
|
|
118
|
-
primitive: gl.TRIANGLES,
|
|
119
|
-
depth: {
|
|
120
|
-
enable: false
|
|
121
|
-
},
|
|
122
|
-
pickingEnabled: false
|
|
123
|
-
});
|
|
124
|
-
return [model];
|
|
125
|
-
})();
|
|
126
|
-
}
|
|
127
|
-
clearModels() {
|
|
128
|
-
var _this$texture, _this$colorTexture;
|
|
129
|
-
(_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
|
|
130
|
-
(_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 || _this$colorTexture.destroy();
|
|
131
|
-
}
|
|
132
|
-
registerBuiltinAttributes() {
|
|
133
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
|
|
134
|
-
this.registerPosition64LowAttribute();
|
|
135
|
-
|
|
136
|
-
// point layer size;
|
|
137
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
138
|
-
name: 'uv',
|
|
139
|
-
type: AttributeType.Attribute,
|
|
140
|
-
descriptor: {
|
|
141
|
-
shaderLocation: this.attributeLocation.UV,
|
|
142
|
-
name: 'a_Uv',
|
|
143
|
-
buffer: {
|
|
144
|
-
// give the WebGL driver a hint that this buffer may change
|
|
145
|
-
usage: gl.DYNAMIC_DRAW,
|
|
146
|
-
data: [],
|
|
147
|
-
type: gl.FLOAT
|
|
148
|
-
},
|
|
149
|
-
size: 2,
|
|
150
|
-
update: (feature, featureIdx, vertex) => {
|
|
151
|
-
return [vertex[3], vertex[4]];
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { IModel, ITexture2D } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class RasterModel extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
UV: number;
|
|
17
|
-
};
|
|
18
|
-
protected texture: ITexture2D;
|
|
19
|
-
protected dataOption: any;
|
|
20
|
-
getUninforms(): {
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
};
|
|
23
|
-
protected getCommonUniformsInfo(): {
|
|
24
|
-
uniformsArray: number[];
|
|
25
|
-
uniformsLength: number;
|
|
26
|
-
uniformsOption: {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
private getRasterData;
|
|
31
|
-
initModels(): Promise<IModel[]>;
|
|
32
|
-
buildModels(): Promise<IModel[]>;
|
|
33
|
-
clearModels(): void;
|
|
34
|
-
protected registerBuiltinAttributes(): void;
|
|
35
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
-
const _excluded = ["data"],
|
|
6
|
-
_excluded2 = ["rasterData"];
|
|
7
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
8
|
-
import BaseModel from "../../core/BaseModel";
|
|
9
|
-
import { RasterImageTriangulation } from "../../core/triangulation";
|
|
10
|
-
/* babel-plugin-inline-import '../shaders/rgb/raster_rgb_frag.glsl' */
|
|
11
|
-
const rasterFrag = "uniform sampler2D u_texture;\nlayout(std140) uniform commonUniforms {\n vec2 u_rminmax;\n vec2 u_gminmax;\n vec2 u_bminmax;\n float u_opacity;\n float u_noDataValue;\n};\n\nin vec2 v_texCoord;\n\nout vec4 outputColor;\n\nvoid main() {\n vec3 rgb = texture(SAMPLER_2D(u_texture), vec2(v_texCoord.x, v_texCoord.y)).rgb;\n\n if (rgb == vec3(u_noDataValue)) {\n outputColor = vec4(0.0, 0, 0, 0.0);\n } else {\n outputColor = vec4(\n rgb.r / (u_rminmax.y - u_rminmax.x),\n rgb.g / (u_gminmax.y - u_gminmax.x),\n rgb.b / (u_bminmax.y - u_bminmax.x),\n u_opacity\n );\n }\n\n if (outputColor.a < 0.01) discard;\n\n}\n";
|
|
12
|
-
/* babel-plugin-inline-import '../shaders/rgb/raster_rgb_vert.glsl' */
|
|
13
|
-
const rasterVert = "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 vec2 u_rminmax;\n vec2 u_gminmax;\n vec2 u_bminmax;\n float u_opacity;\n float u_noDataValue;\n};\n\nout vec2 v_texCoord;\n\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";
|
|
14
|
-
export default class RasterModel extends BaseModel {
|
|
15
|
-
constructor(...args) {
|
|
16
|
-
super(...args);
|
|
17
|
-
_defineProperty(this, "texture", void 0);
|
|
18
|
-
_defineProperty(this, "dataOption", {});
|
|
19
|
-
}
|
|
20
|
-
get attributeLocation() {
|
|
21
|
-
return Object.assign(super.attributeLocation, {
|
|
22
|
-
MAX: super.attributeLocation.MAX,
|
|
23
|
-
UV: 9
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
getUninforms() {
|
|
27
|
-
const commoninfo = this.getCommonUniformsInfo();
|
|
28
|
-
const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
|
|
29
|
-
this.updateStyleUnifoms();
|
|
30
|
-
return _objectSpread(_objectSpread({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
|
|
31
|
-
}
|
|
32
|
-
getCommonUniformsInfo() {
|
|
33
|
-
const {
|
|
34
|
-
opacity = 1,
|
|
35
|
-
noDataValue = 0
|
|
36
|
-
} = this.layer.getLayerConfig();
|
|
37
|
-
const {
|
|
38
|
-
rMinMax = [0, 255],
|
|
39
|
-
gMinMax = [0, 255],
|
|
40
|
-
bMinMax = [0, 255]
|
|
41
|
-
} = this.dataOption;
|
|
42
|
-
const commonOptions = {
|
|
43
|
-
u_rminmax: rMinMax,
|
|
44
|
-
u_gminmax: gMinMax,
|
|
45
|
-
u_bminmax: bMinMax,
|
|
46
|
-
u_opacity: opacity || 1,
|
|
47
|
-
u_noDataValue: noDataValue,
|
|
48
|
-
u_texture: this.texture
|
|
49
|
-
};
|
|
50
|
-
this.textures = [this.texture];
|
|
51
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
52
|
-
return commonBufferInfo;
|
|
53
|
-
}
|
|
54
|
-
getRasterData(parserDataItem) {
|
|
55
|
-
var _this = this;
|
|
56
|
-
return _asyncToGenerator(function* () {
|
|
57
|
-
if (Array.isArray(parserDataItem.data)) {
|
|
58
|
-
const {
|
|
59
|
-
data
|
|
60
|
-
} = parserDataItem,
|
|
61
|
-
rescfg = _objectWithoutProperties(parserDataItem, _excluded);
|
|
62
|
-
_this.dataOption = rescfg;
|
|
63
|
-
return _objectSpread({
|
|
64
|
-
data
|
|
65
|
-
}, rescfg);
|
|
66
|
-
}
|
|
67
|
-
const _yield$parserDataItem = yield parserDataItem.data,
|
|
68
|
-
{
|
|
69
|
-
rasterData
|
|
70
|
-
} = _yield$parserDataItem,
|
|
71
|
-
rest = _objectWithoutProperties(_yield$parserDataItem, _excluded2);
|
|
72
|
-
_this.dataOption = rest;
|
|
73
|
-
if (Array.isArray(rasterData)) {
|
|
74
|
-
// 直接传入波段数据
|
|
75
|
-
return _objectSpread({
|
|
76
|
-
data: rasterData
|
|
77
|
-
}, rest);
|
|
78
|
-
} else {
|
|
79
|
-
// 多波段形式、需要进行处理
|
|
80
|
-
// 支持彩色栅格(多通道)
|
|
81
|
-
return _objectSpread({
|
|
82
|
-
data: Array.from(rasterData)
|
|
83
|
-
}, rest);
|
|
84
|
-
}
|
|
85
|
-
})();
|
|
86
|
-
}
|
|
87
|
-
initModels() {
|
|
88
|
-
var _this2 = this;
|
|
89
|
-
return _asyncToGenerator(function* () {
|
|
90
|
-
_this2.initUniformsBuffer();
|
|
91
|
-
const source = _this2.layer.getSource();
|
|
92
|
-
const {
|
|
93
|
-
createTexture2D
|
|
94
|
-
} = _this2.rendererService;
|
|
95
|
-
const parserDataItem = source.data.dataArray[0];
|
|
96
|
-
const {
|
|
97
|
-
data,
|
|
98
|
-
width,
|
|
99
|
-
height
|
|
100
|
-
} = yield _this2.getRasterData(parserDataItem);
|
|
101
|
-
_this2.texture = createTexture2D({
|
|
102
|
-
// @ts-ignore
|
|
103
|
-
data: new Float32Array(data),
|
|
104
|
-
width,
|
|
105
|
-
height,
|
|
106
|
-
format: gl.RGB,
|
|
107
|
-
type: gl.FLOAT
|
|
108
|
-
});
|
|
109
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
110
|
-
moduleName: 'rasterImageDataRGBA',
|
|
111
|
-
vertexShader: rasterVert,
|
|
112
|
-
fragmentShader: rasterFrag,
|
|
113
|
-
defines: _this2.getDefines(),
|
|
114
|
-
triangulation: RasterImageTriangulation,
|
|
115
|
-
primitive: gl.TRIANGLES,
|
|
116
|
-
depth: {
|
|
117
|
-
enable: false
|
|
118
|
-
},
|
|
119
|
-
pickingEnabled: false
|
|
120
|
-
});
|
|
121
|
-
return [model];
|
|
122
|
-
})();
|
|
123
|
-
}
|
|
124
|
-
buildModels() {
|
|
125
|
-
var _this3 = this;
|
|
126
|
-
return _asyncToGenerator(function* () {
|
|
127
|
-
return _this3.initModels();
|
|
128
|
-
})();
|
|
129
|
-
}
|
|
130
|
-
clearModels() {
|
|
131
|
-
var _this$texture;
|
|
132
|
-
(_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
|
|
133
|
-
}
|
|
134
|
-
registerBuiltinAttributes() {
|
|
135
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
|
|
136
|
-
this.registerPosition64LowAttribute();
|
|
137
|
-
|
|
138
|
-
// point layer size;
|
|
139
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
140
|
-
name: 'uv',
|
|
141
|
-
type: AttributeType.Attribute,
|
|
142
|
-
descriptor: {
|
|
143
|
-
name: 'a_Uv',
|
|
144
|
-
shaderLocation: this.attributeLocation.UV,
|
|
145
|
-
buffer: {
|
|
146
|
-
// give the WebGL driver a hint that this buffer may change
|
|
147
|
-
usage: gl.DYNAMIC_DRAW,
|
|
148
|
-
data: [],
|
|
149
|
-
type: gl.FLOAT
|
|
150
|
-
},
|
|
151
|
-
size: 2,
|
|
152
|
-
update: (feature, featureIdx, vertex) => {
|
|
153
|
-
return [vertex[3], vertex[4]];
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { IModel, ITexture2D } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class RasterTerrainRGB extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
UV: number;
|
|
17
|
-
};
|
|
18
|
-
protected texture: ITexture2D;
|
|
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
|
-
buildModels(): Promise<IModel[]>;
|
|
29
|
-
protected registerBuiltinAttributes(): void;
|
|
30
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
4
|
-
import { getDefaultDomain } from '@antv/l7-utils';
|
|
5
|
-
import BaseModel from "../../core/BaseModel";
|
|
6
|
-
import { RasterImageTriangulation } from "../../core/triangulation";
|
|
7
|
-
/* babel-plugin-inline-import '../shaders/terrain/terrain_rgb_frag.glsl' */
|
|
8
|
-
const Raster_terrainFrag = "uniform sampler2D u_texture;\nuniform sampler2D u_colorTexture;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_unpack;\n vec2 u_domain;\n float u_opacity;\n float u_noDataValue;\n float u_clampLow;\n float u_clampHigh;\n};\n\nin vec2 v_texCoord;\nout vec4 outputColor;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture(SAMPLER_2D(u_texture), coord, bias) * 255.0;\n data.a = -1.0;\n return dot(data, u_unpack);\n}\n\nvec4 getColor(float value) {\n float normalisedValue = (value - u_domain[0]) / (u_domain[1] - u_domain[0]);\n vec2 coord = vec2(normalisedValue, 0);\n return texture(SAMPLER_2D(u_colorTexture), coord);\n}\n\nvoid main() {\n float value = getElevation(v_texCoord, 0.0);\n if (value == u_noDataValue) {\n outputColor = vec4(0.0, 0, 0, 0.0);\n } else if (u_clampLow < 0.5 && value < u_domain[0] || u_clampHigh < 0.5 && value > u_domain[1]) {\n outputColor = vec4(0.0, 0, 0, 0.0);\n } else {\n outputColor = getColor(value);\n outputColor.a = outputColor.a * u_opacity;\n if (outputColor.a < 0.01) discard;\n }\n}\n";
|
|
9
|
-
/* babel-plugin-inline-import '../shaders/terrain/terrain_rgb_vert.glsl' */
|
|
10
|
-
const Raster_terrainVert = "layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec2 a_Uv;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_unpack;\n vec2 u_domain;\n float u_opacity;\n float u_noDataValue;\n float u_clampLow;\n float u_clampHigh;\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));\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));\n}\n";
|
|
11
|
-
export default class RasterTerrainRGB extends BaseModel {
|
|
12
|
-
constructor(...args) {
|
|
13
|
-
super(...args);
|
|
14
|
-
_defineProperty(this, "texture", void 0);
|
|
15
|
-
}
|
|
16
|
-
get attributeLocation() {
|
|
17
|
-
return Object.assign(super.attributeLocation, {
|
|
18
|
-
MAX: super.attributeLocation.MAX,
|
|
19
|
-
UV: 9
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
getCommonUniformsInfo() {
|
|
23
|
-
const {
|
|
24
|
-
opacity,
|
|
25
|
-
clampLow = true,
|
|
26
|
-
clampHigh = true,
|
|
27
|
-
noDataValue = -9999999,
|
|
28
|
-
domain,
|
|
29
|
-
rampColors,
|
|
30
|
-
colorTexture,
|
|
31
|
-
rScaler = 6553.6,
|
|
32
|
-
gScaler = 25.6,
|
|
33
|
-
bScaler = 0.1,
|
|
34
|
-
offset = 10000
|
|
35
|
-
} = this.layer.getLayerConfig();
|
|
36
|
-
const newdomain = domain || getDefaultDomain(rampColors);
|
|
37
|
-
let texture = colorTexture;
|
|
38
|
-
if (!colorTexture) {
|
|
39
|
-
texture = this.layer.textureService.getColorTexture(rampColors, newdomain);
|
|
40
|
-
} else {
|
|
41
|
-
this.layer.textureService.setColorTexture(colorTexture, rampColors, newdomain);
|
|
42
|
-
}
|
|
43
|
-
const commonOptions = {
|
|
44
|
-
u_unpack: [rScaler, gScaler, bScaler, offset],
|
|
45
|
-
u_domain: newdomain,
|
|
46
|
-
u_opacity: opacity || 1,
|
|
47
|
-
u_noDataValue: noDataValue,
|
|
48
|
-
u_clampLow: clampLow,
|
|
49
|
-
u_clampHigh: typeof clampHigh !== 'undefined' ? clampHigh : clampLow,
|
|
50
|
-
u_texture: this.texture,
|
|
51
|
-
u_colorTexture: texture
|
|
52
|
-
};
|
|
53
|
-
this.textures = [this.texture, texture];
|
|
54
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
55
|
-
return commonBufferInfo;
|
|
56
|
-
}
|
|
57
|
-
initModels() {
|
|
58
|
-
var _this = this;
|
|
59
|
-
return _asyncToGenerator(function* () {
|
|
60
|
-
_this.initUniformsBuffer();
|
|
61
|
-
const source = _this.layer.getSource();
|
|
62
|
-
const {
|
|
63
|
-
createTexture2D
|
|
64
|
-
} = _this.rendererService;
|
|
65
|
-
const imageData = yield source.data.images;
|
|
66
|
-
_this.texture = createTexture2D({
|
|
67
|
-
data: imageData[0],
|
|
68
|
-
width: imageData[0].width,
|
|
69
|
-
height: imageData[0].height,
|
|
70
|
-
min: gl.LINEAR,
|
|
71
|
-
mag: gl.LINEAR
|
|
72
|
-
});
|
|
73
|
-
const model = yield _this.layer.buildLayerModel({
|
|
74
|
-
moduleName: 'RasterTileDataImage',
|
|
75
|
-
vertexShader: Raster_terrainVert,
|
|
76
|
-
fragmentShader: Raster_terrainFrag,
|
|
77
|
-
defines: _this.getDefines(),
|
|
78
|
-
triangulation: RasterImageTriangulation,
|
|
79
|
-
primitive: gl.TRIANGLES,
|
|
80
|
-
depth: {
|
|
81
|
-
enable: false
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
return [model];
|
|
85
|
-
})();
|
|
86
|
-
}
|
|
87
|
-
clearModels() {
|
|
88
|
-
var _this$texture;
|
|
89
|
-
(_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
|
|
90
|
-
}
|
|
91
|
-
buildModels() {
|
|
92
|
-
var _this2 = this;
|
|
93
|
-
return _asyncToGenerator(function* () {
|
|
94
|
-
return _this2.initModels();
|
|
95
|
-
})();
|
|
96
|
-
}
|
|
97
|
-
registerBuiltinAttributes() {
|
|
98
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 22 层级以上出现数据偏移
|
|
99
|
-
this.registerPosition64LowAttribute();
|
|
100
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
101
|
-
name: 'uv',
|
|
102
|
-
type: AttributeType.Attribute,
|
|
103
|
-
descriptor: {
|
|
104
|
-
name: 'a_Uv',
|
|
105
|
-
shaderLocation: this.attributeLocation.UV,
|
|
106
|
-
buffer: {
|
|
107
|
-
usage: gl.DYNAMIC_DRAW,
|
|
108
|
-
data: [],
|
|
109
|
-
type: gl.FLOAT
|
|
110
|
-
},
|
|
111
|
-
size: 2,
|
|
112
|
-
update: (feature, featureIdx, vertex) => {
|
|
113
|
-
return [vertex[3], vertex[4]];
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
layout(std140) uniform commonUniforms {
|
|
2
|
-
vec2 u_domain;
|
|
3
|
-
float u_opacity;
|
|
4
|
-
float u_noDataValue;
|
|
5
|
-
float u_clampLow;
|
|
6
|
-
float u_clampHigh;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
uniform sampler2D u_rasterTexture;
|
|
10
|
-
uniform sampler2D u_colorTexture;
|
|
11
|
-
|
|
12
|
-
in vec2 v_texCoord;
|
|
13
|
-
|
|
14
|
-
bool isnan_emu(float x) {
|
|
15
|
-
return x > 0.0 || x < 0.0
|
|
16
|
-
? x != x
|
|
17
|
-
: x != 0.0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
out vec4 outputColor;
|
|
21
|
-
|
|
22
|
-
void main() {
|
|
23
|
-
// Can use any component here since u_rasterTexture is under luminance format.
|
|
24
|
-
float value = texture(SAMPLER_2D(u_rasterTexture), vec2(v_texCoord.x, v_texCoord.y)).r;
|
|
25
|
-
if (value == u_noDataValue || isnan_emu(value)) {
|
|
26
|
-
discard;
|
|
27
|
-
} else if (u_clampLow < 0.5 && value < u_domain[0] || u_clampHigh < 0.5 && value > u_domain[1]) {
|
|
28
|
-
discard;
|
|
29
|
-
} else {
|
|
30
|
-
float normalisedValue = (value - u_domain[0]) / (u_domain[1] - u_domain[0]);
|
|
31
|
-
vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(normalisedValue, 0));
|
|
32
|
-
|
|
33
|
-
outputColor = color;
|
|
34
|
-
outputColor.a = outputColor.a * u_opacity;
|
|
35
|
-
if (outputColor.a < 0.01) discard;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,21 +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
|
-
vec2 u_domain;
|
|
7
|
-
float u_opacity;
|
|
8
|
-
float u_noDataValue;
|
|
9
|
-
float u_clampLow;
|
|
10
|
-
float u_clampHigh;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
out vec2 v_texCoord;
|
|
14
|
-
|
|
15
|
-
#pragma include "projection"
|
|
16
|
-
|
|
17
|
-
void main() {
|
|
18
|
-
v_texCoord = a_Uv;
|
|
19
|
-
vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);
|
|
20
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));
|
|
21
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
uniform sampler2D u_texture;
|
|
2
|
-
layout(std140) uniform commonUniforms {
|
|
3
|
-
vec2 u_rminmax;
|
|
4
|
-
vec2 u_gminmax;
|
|
5
|
-
vec2 u_bminmax;
|
|
6
|
-
float u_opacity;
|
|
7
|
-
float u_noDataValue;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
in vec2 v_texCoord;
|
|
11
|
-
|
|
12
|
-
out vec4 outputColor;
|
|
13
|
-
|
|
14
|
-
void main() {
|
|
15
|
-
vec3 rgb = texture(SAMPLER_2D(u_texture), vec2(v_texCoord.x, v_texCoord.y)).rgb;
|
|
16
|
-
|
|
17
|
-
if (rgb == vec3(u_noDataValue)) {
|
|
18
|
-
outputColor = vec4(0.0, 0, 0, 0.0);
|
|
19
|
-
} else {
|
|
20
|
-
outputColor = vec4(
|
|
21
|
-
rgb.r / (u_rminmax.y - u_rminmax.x),
|
|
22
|
-
rgb.g / (u_gminmax.y - u_gminmax.x),
|
|
23
|
-
rgb.b / (u_bminmax.y - u_bminmax.x),
|
|
24
|
-
u_opacity
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (outputColor.a < 0.01) discard;
|
|
29
|
-
|
|
30
|
-
}
|
|
@@ -1,21 +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
|
-
vec2 u_rminmax;
|
|
7
|
-
vec2 u_gminmax;
|
|
8
|
-
vec2 u_bminmax;
|
|
9
|
-
float u_opacity;
|
|
10
|
-
float u_noDataValue;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
out vec2 v_texCoord;
|
|
14
|
-
|
|
15
|
-
#pragma include "projection"
|
|
16
|
-
|
|
17
|
-
void main() {
|
|
18
|
-
v_texCoord = a_Uv;
|
|
19
|
-
vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);
|
|
20
|
-
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0.0, 1.0));
|
|
21
|
-
}
|