@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
package/es/point/models/image.js
DELETED
|
@@ -1,293 +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 { boundsContains, calculateCentroid, padBounds } from '@antv/l7-utils';
|
|
6
|
-
import BaseModel from "../../core/BaseModel";
|
|
7
|
-
import { PointImageTriangulation } from "../../core/triangulation";
|
|
8
|
-
import CollisionIndex from "../../utils/collision-index";
|
|
9
|
-
/* babel-plugin-inline-import '../shaders/image/image_frag.glsl' */
|
|
10
|
-
const pointImageFrag = "layout(std140) uniform commonUniforms {\n vec2 u_textSize;\n float u_raisingHeight;\n float u_heightfixed;\n};\n\nuniform sampler2D u_texture;\n\nin vec4 v_color;\nin vec2 v_uv;\nin float v_opacity;\n\n#pragma include \"picking\"\n\nout vec4 outputColor;\n\nvoid main() {\n vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.0;\n vec4 textureColor;\n\n // Y = 0.299R + 0.587G + 0.114B // \u4EAE\u5EA6\u63D0\u53D6\n\n textureColor = texture(SAMPLER_2D(u_texture), pos);\n\n // Tip: \u53BB\u9664\u8FB9\u7F18\u90E8\u5206 mipmap \u5BFC\u81F4\u7684\u6DF7\u5408\u53D8\u6697\n float fragmengTocenter = distance(vec2(0.5), gl_PointCoord);\n if (fragmengTocenter >= 0.5) {\n float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;\n textureColor.a *= luma;\n }\n\n if (\n all(lessThan(v_color, vec4(1.0 + 0.00001))) && all(greaterThan(v_color, vec4(1.0 - 0.00001))) ||\n v_color == vec4(1.0)\n ) {\n outputColor = textureColor;\n } else {\n outputColor = step(0.01, textureColor.z) * v_color;\n }\n outputColor.a *= v_opacity;\n if (outputColor.a < 0.01) {\n discard;\n }\n outputColor = filterColor(outputColor);\n}\n";
|
|
11
|
-
/* babel-plugin-inline-import '../shaders/image/image_vert.glsl' */
|
|
12
|
-
const pointImageVert = "layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;\nlayout(location = ATTRIBUTE_LOCATION_UV) in vec2 a_Uv;\n\nlayout(std140) uniform commonUniforms {\n vec2 u_textSize;\n float u_raisingHeight;\n float u_heightfixed;\n};\n\nout vec4 v_color;\nout vec2 v_uv;\nout float v_opacity;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvoid main() {\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n v_color = a_Color;\n v_opacity = opacity;\n v_uv = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n\n vec2 offset = project_pixel(offsets);\n\n float raisingHeight = u_raisingHeight;\n if (u_heightfixed < 1.0) {\n // false\n raisingHeight = project_pixel(u_raisingHeight);\n } else {\n if (\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n ) {\n float mapboxZoomScale = 4.0 / pow(2.0, 21.0 - u_Zoom);\n raisingHeight = u_raisingHeight * mapboxZoomScale;\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\n\n gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\n setPickingColor(a_PickingColor);\n}\n";
|
|
13
|
-
export default class ImageModel extends BaseModel {
|
|
14
|
-
constructor(...args) {
|
|
15
|
-
super(...args);
|
|
16
|
-
_defineProperty(this, "texture", void 0);
|
|
17
|
-
// 通过碰撞检测的 feature id 集合,由 filterImages() 填充;null 表示不启用过滤(allowOverlap: true)
|
|
18
|
-
_defineProperty(this, "imageFilterMap", null);
|
|
19
|
-
_defineProperty(this, "currentZoom", -1);
|
|
20
|
-
_defineProperty(this, "extent", void 0);
|
|
21
|
-
_defineProperty(this, "preAllowOverlap", true);
|
|
22
|
-
_defineProperty(this, "updateTexture", () => {
|
|
23
|
-
const {
|
|
24
|
-
createTexture2D
|
|
25
|
-
} = this.rendererService;
|
|
26
|
-
if (this.texture) {
|
|
27
|
-
this.texture.update({
|
|
28
|
-
data: this.iconService.getCanvas(),
|
|
29
|
-
mag: 'linear',
|
|
30
|
-
min: 'linear mipmap nearest',
|
|
31
|
-
mipmap: true
|
|
32
|
-
});
|
|
33
|
-
// 更新完纹理后在更新的图层的时候需要更新所有的图层
|
|
34
|
-
// this.layer.layerModelNeedUpdate = true;
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
// 延迟渲染
|
|
37
|
-
this.layerService.throttleRenderLayers();
|
|
38
|
-
});
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
this.texture = createTexture2D({
|
|
42
|
-
data: this.iconService.getCanvas(),
|
|
43
|
-
mag: gl.LINEAR,
|
|
44
|
-
min: gl.LINEAR_MIPMAP_LINEAR,
|
|
45
|
-
premultiplyAlpha: false,
|
|
46
|
-
width: 1024,
|
|
47
|
-
height: this.iconService.canvasHeight || 128,
|
|
48
|
-
mipmap: true
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
get attributeLocation() {
|
|
53
|
-
return Object.assign(super.attributeLocation, {
|
|
54
|
-
MAX: super.attributeLocation.MAX,
|
|
55
|
-
SIZE: 9,
|
|
56
|
-
UV: 10
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
getUninforms() {
|
|
60
|
-
// ThreeJS 图层兼容
|
|
61
|
-
if (this.rendererService.getDirty()) {
|
|
62
|
-
var _this$texture;
|
|
63
|
-
(_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.bind();
|
|
64
|
-
}
|
|
65
|
-
const commonInfo = this.getCommonUniformsInfo();
|
|
66
|
-
const attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
|
|
67
|
-
this.updateStyleUnifoms();
|
|
68
|
-
return _objectSpread(_objectSpread({}, commonInfo.uniformsOption), attributeInfo.uniformsOption);
|
|
69
|
-
}
|
|
70
|
-
getCommonUniformsInfo() {
|
|
71
|
-
const {
|
|
72
|
-
raisingHeight = 0,
|
|
73
|
-
heightfixed = false
|
|
74
|
-
} = this.layer.getLayerConfig();
|
|
75
|
-
const commonOptions = {
|
|
76
|
-
u_textSize: [1024, this.iconService.canvasHeight || 128],
|
|
77
|
-
u_raisingHeight: Number(raisingHeight),
|
|
78
|
-
u_heightfixed: Number(heightfixed),
|
|
79
|
-
u_texture: this.texture
|
|
80
|
-
};
|
|
81
|
-
this.textures = [this.texture];
|
|
82
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
83
|
-
return commonBufferInfo;
|
|
84
|
-
}
|
|
85
|
-
initModels() {
|
|
86
|
-
var _this = this;
|
|
87
|
-
return _asyncToGenerator(function* () {
|
|
88
|
-
const {
|
|
89
|
-
allowOverlap = true
|
|
90
|
-
} = _this.layer.getLayerConfig();
|
|
91
|
-
_this.extent = _this.imageExtent();
|
|
92
|
-
_this.preAllowOverlap = allowOverlap;
|
|
93
|
-
_this.iconService.on('imageUpdate', _this.updateTexture);
|
|
94
|
-
_this.updateTexture();
|
|
95
|
-
return _this.buildModels();
|
|
96
|
-
})();
|
|
97
|
-
}
|
|
98
|
-
buildModels() {
|
|
99
|
-
var _this2 = this;
|
|
100
|
-
return _asyncToGenerator(function* () {
|
|
101
|
-
const {
|
|
102
|
-
allowOverlap = true
|
|
103
|
-
} = _this2.layer.getLayerConfig();
|
|
104
|
-
_this2.initUniformsBuffer();
|
|
105
|
-
if (!allowOverlap) {
|
|
106
|
-
_this2.filterImages();
|
|
107
|
-
} else {
|
|
108
|
-
// 允许压盖时置 null,PointImageTriangulation 检测到 null 则跳过过滤
|
|
109
|
-
_this2.imageFilterMap = null;
|
|
110
|
-
}
|
|
111
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
112
|
-
moduleName: 'pointImage',
|
|
113
|
-
vertexShader: pointImageVert,
|
|
114
|
-
fragmentShader: pointImageFrag,
|
|
115
|
-
// 绑定 this,让 PointImageTriangulation 能读取 imageFilterMap
|
|
116
|
-
triangulation: PointImageTriangulation.bind(_this2),
|
|
117
|
-
defines: _this2.getDefines(),
|
|
118
|
-
inject: _this2.getInject(),
|
|
119
|
-
depth: {
|
|
120
|
-
enable: false
|
|
121
|
-
},
|
|
122
|
-
primitive: gl.POINTS
|
|
123
|
-
});
|
|
124
|
-
return [model];
|
|
125
|
-
})();
|
|
126
|
-
}
|
|
127
|
-
needUpdate() {
|
|
128
|
-
var _this3 = this;
|
|
129
|
-
return _asyncToGenerator(function* () {
|
|
130
|
-
const {
|
|
131
|
-
allowOverlap = true
|
|
132
|
-
} = _this3.layer.getLayerConfig();
|
|
133
|
-
|
|
134
|
-
// allowOverlap 开关发生变化时,强制重建
|
|
135
|
-
if (allowOverlap !== _this3.preAllowOverlap) {
|
|
136
|
-
_this3.preAllowOverlap = allowOverlap;
|
|
137
|
-
yield _this3.reBuildModel();
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// 允许压盖时无需每帧检测
|
|
142
|
-
if (allowOverlap) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// 不允许压盖时,zoom 变化 >0.5 或视野超出上次范围则重算碰撞
|
|
147
|
-
const zoom = _this3.mapService.getZoom();
|
|
148
|
-
const extent = _this3.mapService.getBounds();
|
|
149
|
-
const flag = boundsContains(_this3.extent, extent);
|
|
150
|
-
if (Math.abs(_this3.currentZoom - zoom) > 0.5 || !flag) {
|
|
151
|
-
yield _this3.reBuildModel();
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
return false;
|
|
155
|
-
})();
|
|
156
|
-
}
|
|
157
|
-
clearModels() {
|
|
158
|
-
var _this$texture2;
|
|
159
|
-
(_this$texture2 = this.texture) === null || _this$texture2 === void 0 || _this$texture2.destroy();
|
|
160
|
-
this.iconService.off('imageUpdate', this.updateTexture);
|
|
161
|
-
}
|
|
162
|
-
registerBuiltinAttributes() {
|
|
163
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 20层级以上出现数据偏移
|
|
164
|
-
this.registerPosition64LowAttribute();
|
|
165
|
-
|
|
166
|
-
// point layer size;
|
|
167
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
168
|
-
name: 'size',
|
|
169
|
-
type: AttributeType.Attribute,
|
|
170
|
-
descriptor: {
|
|
171
|
-
name: 'a_Size',
|
|
172
|
-
shaderLocation: this.attributeLocation.SIZE,
|
|
173
|
-
buffer: {
|
|
174
|
-
// give the WebGL driver a hint that this buffer may change
|
|
175
|
-
usage: gl.DYNAMIC_DRAW,
|
|
176
|
-
data: [],
|
|
177
|
-
type: gl.FLOAT
|
|
178
|
-
},
|
|
179
|
-
size: 1,
|
|
180
|
-
update: feature => {
|
|
181
|
-
const {
|
|
182
|
-
size = 5
|
|
183
|
-
} = feature;
|
|
184
|
-
return Array.isArray(size) ? [size[0]] : [size];
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
// point layer uv;
|
|
190
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
191
|
-
name: 'uv',
|
|
192
|
-
type: AttributeType.Attribute,
|
|
193
|
-
descriptor: {
|
|
194
|
-
name: 'a_Uv',
|
|
195
|
-
shaderLocation: this.attributeLocation.UV,
|
|
196
|
-
buffer: {
|
|
197
|
-
// give the WebGL driver a hint that this buffer may change
|
|
198
|
-
usage: gl.DYNAMIC_DRAW,
|
|
199
|
-
data: [],
|
|
200
|
-
type: gl.FLOAT
|
|
201
|
-
},
|
|
202
|
-
size: 2,
|
|
203
|
-
update: feature => {
|
|
204
|
-
const iconMap = this.iconService.getIconMap();
|
|
205
|
-
const {
|
|
206
|
-
shape
|
|
207
|
-
} = feature;
|
|
208
|
-
const {
|
|
209
|
-
x,
|
|
210
|
-
y
|
|
211
|
-
} = iconMap[shape] || {
|
|
212
|
-
x: -64,
|
|
213
|
-
y: -64
|
|
214
|
-
}; // 非画布区域,默认的图标改为透明
|
|
215
|
-
return [x, y];
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* 图标碰撞避让:遍历所有 feature,在屏幕空间做 AABB 碰撞检测,
|
|
223
|
-
* 将通过检测的 feature id 写入 imageFilterMap。
|
|
224
|
-
* PointImageTriangulation 绑定 this 后,会跳过不在 map 中的 feature。
|
|
225
|
-
*/
|
|
226
|
-
filterImages() {
|
|
227
|
-
const {
|
|
228
|
-
padding = [0, 0]
|
|
229
|
-
} = this.layer.getLayerConfig();
|
|
230
|
-
this.imageFilterMap = {};
|
|
231
|
-
this.currentZoom = this.mapService.getZoom();
|
|
232
|
-
this.extent = this.imageExtent();
|
|
233
|
-
const {
|
|
234
|
-
width,
|
|
235
|
-
height
|
|
236
|
-
} = this.rendererService.getViewportSize();
|
|
237
|
-
const collisionIndex = new CollisionIndex(width, height);
|
|
238
|
-
const data = this.layer.getEncodedData();
|
|
239
|
-
data.forEach(feature => {
|
|
240
|
-
const {
|
|
241
|
-
id = 0,
|
|
242
|
-
size = 5
|
|
243
|
-
} = feature;
|
|
244
|
-
const iconSize = Array.isArray(size) ? size[0] : size;
|
|
245
|
-
const centroid = calculateCentroid(feature.coordinates);
|
|
246
|
-
const pixels = this.mapService.lngLatToContainer(centroid);
|
|
247
|
-
const {
|
|
248
|
-
box
|
|
249
|
-
} = collisionIndex.placeCollisionBox({
|
|
250
|
-
x1: -iconSize - padding[0],
|
|
251
|
-
x2: iconSize + padding[0],
|
|
252
|
-
y1: -iconSize - padding[1],
|
|
253
|
-
y2: iconSize + padding[1],
|
|
254
|
-
anchorPointX: pixels.x,
|
|
255
|
-
anchorPointY: pixels.y
|
|
256
|
-
});
|
|
257
|
-
if (box && box.length) {
|
|
258
|
-
collisionIndex.insertCollisionBox(box, id);
|
|
259
|
-
this.imageFilterMap[id] = true;
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
imageExtent() {
|
|
264
|
-
const bounds = this.mapService.getBounds();
|
|
265
|
-
return padBounds(bounds, 0.5);
|
|
266
|
-
}
|
|
267
|
-
reBuildModel() {
|
|
268
|
-
var _this4 = this;
|
|
269
|
-
return _asyncToGenerator(function* () {
|
|
270
|
-
const {
|
|
271
|
-
allowOverlap = true
|
|
272
|
-
} = _this4.layer.getLayerConfig();
|
|
273
|
-
if (!allowOverlap) {
|
|
274
|
-
_this4.filterImages();
|
|
275
|
-
} else {
|
|
276
|
-
_this4.imageFilterMap = null; // 允许压盖:清空过滤表,全量渲染
|
|
277
|
-
}
|
|
278
|
-
const model = yield _this4.layer.buildLayerModel({
|
|
279
|
-
moduleName: 'pointImage',
|
|
280
|
-
vertexShader: pointImageVert,
|
|
281
|
-
fragmentShader: pointImageFrag,
|
|
282
|
-
triangulation: PointImageTriangulation.bind(_this4),
|
|
283
|
-
defines: _this4.getDefines(),
|
|
284
|
-
inject: _this4.getInject(),
|
|
285
|
-
depth: {
|
|
286
|
-
enable: false
|
|
287
|
-
},
|
|
288
|
-
primitive: gl.POINTS
|
|
289
|
-
});
|
|
290
|
-
_this4.layer.models = [model];
|
|
291
|
-
})();
|
|
292
|
-
}
|
|
293
|
-
}
|
package/es/point/models/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import SimplePoint from "./billboard_point";
|
|
2
|
-
import EarthExtrudeModel from "./earthExtrude";
|
|
3
|
-
// earth
|
|
4
|
-
import EarthFillModel from "./earthFill";
|
|
5
|
-
import ExtrudeModel from "./extrude";
|
|
6
|
-
import FillModel from "./fill";
|
|
7
|
-
import FillImageModel from "./fillImage";
|
|
8
|
-
import IMageModel from "./image";
|
|
9
|
-
import NormalModel from "./normal";
|
|
10
|
-
import Radar from "./radar";
|
|
11
|
-
import TextModel from "./text";
|
|
12
|
-
const PointModels = {
|
|
13
|
-
fillImage: FillImageModel,
|
|
14
|
-
fill: FillModel,
|
|
15
|
-
radar: Radar,
|
|
16
|
-
image: IMageModel,
|
|
17
|
-
normal: NormalModel,
|
|
18
|
-
simplePoint: SimplePoint,
|
|
19
|
-
extrude: ExtrudeModel,
|
|
20
|
-
text: TextModel,
|
|
21
|
-
earthFill: EarthFillModel,
|
|
22
|
-
earthExtrude: EarthExtrudeModel
|
|
23
|
-
};
|
|
24
|
-
export default PointModels;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { IEncodeFeature, IModel } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
import type { IPointLayerStyleOptions } from '../../core/interface';
|
|
4
|
-
export declare function PointTriangulation(feature: IEncodeFeature): {
|
|
5
|
-
vertices: number[];
|
|
6
|
-
indices: number[];
|
|
7
|
-
size: number;
|
|
8
|
-
};
|
|
9
|
-
export default class NormalModel extends BaseModel {
|
|
10
|
-
protected get attributeLocation(): {
|
|
11
|
-
readonly POSITION: 0;
|
|
12
|
-
readonly POSITION_64LOW: 1;
|
|
13
|
-
readonly COLOR: 2;
|
|
14
|
-
readonly PICKING_COLOR: 3;
|
|
15
|
-
readonly STROKE: 4;
|
|
16
|
-
readonly OPACITY: 5;
|
|
17
|
-
readonly OFFSETS: 6;
|
|
18
|
-
readonly ROTATION: 7;
|
|
19
|
-
readonly MAX: 8;
|
|
20
|
-
} & Record<string, number> & {
|
|
21
|
-
MAX: 8;
|
|
22
|
-
SIZE: number;
|
|
23
|
-
};
|
|
24
|
-
getDefaultStyle(): Partial<IPointLayerStyleOptions>;
|
|
25
|
-
protected getCommonUniformsInfo(): {
|
|
26
|
-
uniformsArray: number[];
|
|
27
|
-
uniformsLength: number;
|
|
28
|
-
uniformsOption: {
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
initModels(): Promise<IModel[]>;
|
|
33
|
-
buildModels(): Promise<IModel[]>;
|
|
34
|
-
clearModels(): void;
|
|
35
|
-
protected registerBuiltinAttributes(): void;
|
|
36
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
3
|
-
import BaseModel from "../../core/BaseModel";
|
|
4
|
-
/* babel-plugin-inline-import '../shaders/normal/normal_frag.glsl' */
|
|
5
|
-
const normalFrag = "in vec4 v_color;\nout vec4 outputColor;\nvoid main() {\n outputColor = v_color;\n}\n";
|
|
6
|
-
/* babel-plugin-inline-import '../shaders/normal/normal_vert.glsl' */
|
|
7
|
-
const normalVert = "layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;\n\nlayout(std140) uniform u_Common {\n float u_size_scale;\n};\n\nout vec4 v_color;\n\n#pragma include \"projection\"\n#pragma include \"project\"\n\nvoid main() {\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n\n vec4 project_pos = project_position(vec4(a_Position, 1.0), a_Position64Low);\n gl_Position = project_common_position_to_clipspace(project_pos);\n\n gl_PointSize = a_Size * u_size_scale * 2.0 * u_DevicePixelRatio;\n}\n";
|
|
8
|
-
export function PointTriangulation(feature) {
|
|
9
|
-
const coordinates = feature.coordinates;
|
|
10
|
-
return {
|
|
11
|
-
vertices: [...coordinates],
|
|
12
|
-
indices: [0],
|
|
13
|
-
size: coordinates.length
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export default class NormalModel extends BaseModel {
|
|
17
|
-
get attributeLocation() {
|
|
18
|
-
return Object.assign(super.attributeLocation, {
|
|
19
|
-
MAX: super.attributeLocation.MAX,
|
|
20
|
-
SIZE: 9
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
getDefaultStyle() {
|
|
24
|
-
return {
|
|
25
|
-
blend: 'additive'
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
getCommonUniformsInfo() {
|
|
29
|
-
const commonOptions = {
|
|
30
|
-
u_size_scale: 0.5
|
|
31
|
-
};
|
|
32
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
33
|
-
return commonBufferInfo;
|
|
34
|
-
}
|
|
35
|
-
initModels() {
|
|
36
|
-
var _this = this;
|
|
37
|
-
return _asyncToGenerator(function* () {
|
|
38
|
-
return _this.buildModels();
|
|
39
|
-
})();
|
|
40
|
-
}
|
|
41
|
-
buildModels() {
|
|
42
|
-
var _this2 = this;
|
|
43
|
-
return _asyncToGenerator(function* () {
|
|
44
|
-
_this2.layer.triangulation = PointTriangulation;
|
|
45
|
-
_this2.initUniformsBuffer();
|
|
46
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
47
|
-
moduleName: 'pointNormal',
|
|
48
|
-
vertexShader: normalVert,
|
|
49
|
-
fragmentShader: normalFrag,
|
|
50
|
-
triangulation: PointTriangulation,
|
|
51
|
-
defines: _this2.getDefines(),
|
|
52
|
-
inject: _this2.getInject(),
|
|
53
|
-
depth: {
|
|
54
|
-
enable: false
|
|
55
|
-
},
|
|
56
|
-
primitive: gl.POINTS,
|
|
57
|
-
pick: false
|
|
58
|
-
});
|
|
59
|
-
return [model];
|
|
60
|
-
})();
|
|
61
|
-
}
|
|
62
|
-
clearModels() {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
registerBuiltinAttributes() {
|
|
66
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 20层级以上出现数据偏移
|
|
67
|
-
this.registerPosition64LowAttribute();
|
|
68
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
69
|
-
name: 'size',
|
|
70
|
-
type: AttributeType.Attribute,
|
|
71
|
-
descriptor: {
|
|
72
|
-
name: 'a_Size',
|
|
73
|
-
shaderLocation: this.attributeLocation.SIZE,
|
|
74
|
-
buffer: {
|
|
75
|
-
usage: gl.DYNAMIC_DRAW,
|
|
76
|
-
data: [],
|
|
77
|
-
type: gl.FLOAT
|
|
78
|
-
},
|
|
79
|
-
size: 1,
|
|
80
|
-
update: feature => {
|
|
81
|
-
const {
|
|
82
|
-
size = 1
|
|
83
|
-
} = feature;
|
|
84
|
-
return Array.isArray(size) ? [size[0]] : [size];
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { IAnimateOption, IAttribute, IElements, IModel, IModelUniform } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
export default class RadarModel extends BaseModel {
|
|
4
|
-
protected get attributeLocation(): {
|
|
5
|
-
readonly POSITION: 0;
|
|
6
|
-
readonly POSITION_64LOW: 1;
|
|
7
|
-
readonly COLOR: 2;
|
|
8
|
-
readonly PICKING_COLOR: 3;
|
|
9
|
-
readonly STROKE: 4;
|
|
10
|
-
readonly OPACITY: 5;
|
|
11
|
-
readonly OFFSETS: 6;
|
|
12
|
-
readonly ROTATION: 7;
|
|
13
|
-
readonly MAX: 8;
|
|
14
|
-
} & Record<string, number> & {
|
|
15
|
-
MAX: 8;
|
|
16
|
-
SIZE: number;
|
|
17
|
-
EXTRUDE: number;
|
|
18
|
-
};
|
|
19
|
-
protected getCommonUniformsInfo(): {
|
|
20
|
-
uniformsArray: number[];
|
|
21
|
-
uniformsLength: number;
|
|
22
|
-
uniformsOption: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
getAnimateUniforms(): IModelUniform;
|
|
27
|
-
getAttribute(): {
|
|
28
|
-
attributes: {
|
|
29
|
-
[attributeName: string]: IAttribute;
|
|
30
|
-
};
|
|
31
|
-
elements: IElements;
|
|
32
|
-
};
|
|
33
|
-
initModels(): Promise<IModel[]>;
|
|
34
|
-
buildModels(): Promise<IModel[]>;
|
|
35
|
-
protected animateOption2Array(option: Partial<IAnimateOption>): number[];
|
|
36
|
-
protected registerBuiltinAttributes(): void;
|
|
37
|
-
}
|
package/es/point/models/radar.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
-
import { AttributeType, gl } from '@antv/l7-core';
|
|
3
|
-
import BaseModel from "../../core/BaseModel";
|
|
4
|
-
import { SizeUnitType } from "../../core/interface";
|
|
5
|
-
import { PointFillTriangulation } from "../../core/triangulation";
|
|
6
|
-
/* babel-plugin-inline-import '../shaders/radar/radar_frag.glsl' */
|
|
7
|
-
const pointFillFrag = "\nlayout(std140) uniform commonUniorm{\n float u_additive;\n float u_size_unit;\n float u_speed: 1.0;\n float u_time;\n};\nin vec4 v_data;\nin vec4 v_color;\nin float v_radius;\nin vec2 v_extrude;\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\nout vec4 outputColor;\n\nvoid main() {\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius);\n\n float outer_df = sdCircle(v_data.xy, 1.0);\n float inner_df = sdCircle(v_data.xy, r);\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n outputColor = vec4(v_color.rgb, v_color.a);\n\n if(u_additive > 0.0) {\n outputColor *= opacity_t;\n } else {\n outputColor.a *= opacity_t;\n }\n\n if(outputColor.a > 0.0) {\n outputColor = filterColor(outputColor);\n }\n\n vec2 extrude = v_extrude;\n vec2 dir = normalize(extrude);\n vec2 baseDir = vec2(1.0, 0.0);\n float pi = 3.14159265359;\n float flag = sign(dir.y);\n float rades = dot(dir, baseDir);\n float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi;\n // simple AA\n if(radar_v > 0.99) {\n radar_v = 1.0 - (radar_v - 0.99)/0.01;\n }\n\n outputColor.a *= radar_v;\n}\n";
|
|
8
|
-
/* babel-plugin-inline-import '../shaders/radar/radar_vert.glsl' */
|
|
9
|
-
const pointFillVert = "layout(location = ATTRIBUTE_LOCATION_POSITION) in vec3 a_Position;\nlayout(location = ATTRIBUTE_LOCATION_POSITION_64LOW) in vec2 a_Position64Low;\nlayout(location = ATTRIBUTE_LOCATION_COLOR) in vec4 a_Color;\nlayout(location = ATTRIBUTE_LOCATION_SIZE) in float a_Size;\nlayout(location = ATTRIBUTE_LOCATION_EXTRUDE) in vec3 a_Extrude;\n\nlayout(std140) uniform commonUniorm {\n float u_additive;\n float u_size_unit;\n float u_speed: 1.0;\n float u_time;\n};\n\nout vec4 v_data;\nout vec4 v_color;\nout float v_radius;\nout vec2 v_extrude;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvoid main() {\n float newSize = setPickingSize(a_Size);\n\n float time = u_time * u_speed;\n mat2 rotateMatrix = mat2(\n cos(time), sin(time),\n -sin(time), cos(time)\n );\n v_extrude = rotateMatrix * a_Extrude.xy;\n\n v_color = a_Color;\n v_color.a *= opacity;\n\n float blur = 0.0;\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur);\n\n if(u_size_unit == 1.) {\n newSize = newSize * u_PixelsPerMeter.z;\n }\n v_radius = newSize;\n\n vec2 offset = (a_Extrude.xy * (newSize));\n\n offset = project_pixel(offset);\n\n v_data = vec4(a_Extrude.x, a_Extrude.y, antialiasblur, -1.0);\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0), a_Position64Low);\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
10
|
-
export default class RadarModel extends BaseModel {
|
|
11
|
-
get attributeLocation() {
|
|
12
|
-
return Object.assign(super.attributeLocation, {
|
|
13
|
-
MAX: super.attributeLocation.MAX,
|
|
14
|
-
SIZE: 9,
|
|
15
|
-
EXTRUDE: 10
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
getCommonUniformsInfo() {
|
|
19
|
-
const {
|
|
20
|
-
blend,
|
|
21
|
-
speed = 1,
|
|
22
|
-
unit = 'pixel'
|
|
23
|
-
} = this.layer.getLayerConfig();
|
|
24
|
-
const commonOptions = {
|
|
25
|
-
u_additive: blend === 'additive' ? 1.0 : 0.0,
|
|
26
|
-
u_size_unit: SizeUnitType[unit],
|
|
27
|
-
u_speed: speed,
|
|
28
|
-
u_time: this.layer.getLayerAnimateTime()
|
|
29
|
-
}; //1+1+1+1
|
|
30
|
-
const commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
31
|
-
return commonBufferInfo;
|
|
32
|
-
}
|
|
33
|
-
getAnimateUniforms() {
|
|
34
|
-
return {};
|
|
35
|
-
}
|
|
36
|
-
getAttribute() {
|
|
37
|
-
return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(), PointFillTriangulation);
|
|
38
|
-
}
|
|
39
|
-
initModels() {
|
|
40
|
-
var _this = this;
|
|
41
|
-
return _asyncToGenerator(function* () {
|
|
42
|
-
return _this.buildModels();
|
|
43
|
-
})();
|
|
44
|
-
}
|
|
45
|
-
buildModels() {
|
|
46
|
-
var _this2 = this;
|
|
47
|
-
return _asyncToGenerator(function* () {
|
|
48
|
-
_this2.initUniformsBuffer();
|
|
49
|
-
const model = yield _this2.layer.buildLayerModel({
|
|
50
|
-
moduleName: 'pointRadar',
|
|
51
|
-
vertexShader: pointFillVert,
|
|
52
|
-
fragmentShader: pointFillFrag,
|
|
53
|
-
triangulation: PointFillTriangulation,
|
|
54
|
-
defines: _this2.getDefines(),
|
|
55
|
-
inject: _this2.getInject(),
|
|
56
|
-
depth: {
|
|
57
|
-
enable: false
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return [model];
|
|
61
|
-
})();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// overwrite baseModel func
|
|
65
|
-
animateOption2Array(option) {
|
|
66
|
-
return [option.enable ? 0 : 1.0, option.speed || 1, option.rings || 3, 0];
|
|
67
|
-
}
|
|
68
|
-
registerBuiltinAttributes() {
|
|
69
|
-
// 注册 Position 属性 64 位地位部分,经纬度数据开启双精度,避免大于 20层级以上出现数据偏移
|
|
70
|
-
this.registerPosition64LowAttribute();
|
|
71
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
72
|
-
name: 'extrude',
|
|
73
|
-
type: AttributeType.Attribute,
|
|
74
|
-
descriptor: {
|
|
75
|
-
name: 'a_Extrude',
|
|
76
|
-
shaderLocation: this.attributeLocation.EXTRUDE,
|
|
77
|
-
buffer: {
|
|
78
|
-
// give the WebGL driver a hint that this buffer may change
|
|
79
|
-
usage: gl.DYNAMIC_DRAW,
|
|
80
|
-
data: [],
|
|
81
|
-
type: gl.FLOAT
|
|
82
|
-
},
|
|
83
|
-
size: 3,
|
|
84
|
-
update: (feature, featureIdx, vertex, attributeIdx) => {
|
|
85
|
-
const extrude = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0];
|
|
86
|
-
const extrudeIndex = attributeIdx % 4 * 3;
|
|
87
|
-
return [extrude[extrudeIndex], extrude[extrudeIndex + 1], extrude[extrudeIndex + 2]];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// point layer size;
|
|
93
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
94
|
-
name: 'size',
|
|
95
|
-
type: AttributeType.Attribute,
|
|
96
|
-
descriptor: {
|
|
97
|
-
shaderLocation: this.attributeLocation.SIZE,
|
|
98
|
-
name: 'a_Size',
|
|
99
|
-
buffer: {
|
|
100
|
-
// give the WebGL driver a hint that this buffer may change
|
|
101
|
-
usage: gl.DYNAMIC_DRAW,
|
|
102
|
-
data: [],
|
|
103
|
-
type: gl.FLOAT
|
|
104
|
-
},
|
|
105
|
-
size: 1,
|
|
106
|
-
update: feature => {
|
|
107
|
-
const {
|
|
108
|
-
size = 5
|
|
109
|
-
} = feature;
|
|
110
|
-
return Array.isArray(size) ? [size[0]] : [size];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { IEncodeFeature, IModel, IModelUniform } from '@antv/l7-core';
|
|
2
|
-
import BaseModel from '../../core/BaseModel';
|
|
3
|
-
import type { IGlyphQuad } from '../../utils/symbol-layout';
|
|
4
|
-
export declare function TextTrianglation(feature: IEncodeFeature): {
|
|
5
|
-
vertices: number[];
|
|
6
|
-
indices: number[];
|
|
7
|
-
size: number;
|
|
8
|
-
};
|
|
9
|
-
export default class TextModel extends BaseModel {
|
|
10
|
-
protected get attributeLocation(): {
|
|
11
|
-
readonly POSITION: 0;
|
|
12
|
-
readonly POSITION_64LOW: 1;
|
|
13
|
-
readonly COLOR: 2;
|
|
14
|
-
readonly PICKING_COLOR: 3;
|
|
15
|
-
readonly STROKE: 4;
|
|
16
|
-
readonly OPACITY: 5;
|
|
17
|
-
readonly OFFSETS: 6;
|
|
18
|
-
readonly ROTATION: 7;
|
|
19
|
-
readonly MAX: 8;
|
|
20
|
-
} & Record<string, number> & {
|
|
21
|
-
MAX: 8;
|
|
22
|
-
SIZE: number;
|
|
23
|
-
TEXT_OFFSETS: number;
|
|
24
|
-
UV: number;
|
|
25
|
-
};
|
|
26
|
-
glyphInfo: IEncodeFeature[];
|
|
27
|
-
glyphInfoMap: {
|
|
28
|
-
[key: string]: {
|
|
29
|
-
shaping: any;
|
|
30
|
-
glyphQuads: IGlyphQuad[];
|
|
31
|
-
centroid: number[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
private rawEncodeData;
|
|
35
|
-
private texture;
|
|
36
|
-
private currentZoom;
|
|
37
|
-
private extent;
|
|
38
|
-
private textureHeight;
|
|
39
|
-
private textCount;
|
|
40
|
-
private preTextStyle;
|
|
41
|
-
getUninforms(): IModelUniform;
|
|
42
|
-
protected getCommonUniformsInfo(): {
|
|
43
|
-
uniformsArray: number[];
|
|
44
|
-
uniformsLength: number;
|
|
45
|
-
uniformsOption: {
|
|
46
|
-
[key: string]: any;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
initModels(): Promise<IModel[]>;
|
|
50
|
-
buildModels(): Promise<IModel[]>;
|
|
51
|
-
needUpdate(): Promise<boolean>;
|
|
52
|
-
clearModels(): void;
|
|
53
|
-
protected registerBuiltinAttributes(): void;
|
|
54
|
-
private bindEvent;
|
|
55
|
-
private mapping;
|
|
56
|
-
private textExtent;
|
|
57
|
-
/**
|
|
58
|
-
* 生成文字纹理(生成文字纹理字典)
|
|
59
|
-
*/
|
|
60
|
-
private initTextFont;
|
|
61
|
-
/**
|
|
62
|
-
* 生成 iconfont 纹理字典
|
|
63
|
-
*/
|
|
64
|
-
private initIconFontTex;
|
|
65
|
-
private getTextStyle;
|
|
66
|
-
/**
|
|
67
|
-
* 生成文字布局(对照文字纹理字典提取对应文字的位置很好信息)
|
|
68
|
-
*/
|
|
69
|
-
private generateGlyphLayout;
|
|
70
|
-
private getFontServiceMapping;
|
|
71
|
-
private getFontServiceCanvas;
|
|
72
|
-
/**
|
|
73
|
-
* 文字避让 depend on originCentorid
|
|
74
|
-
*/
|
|
75
|
-
private filterGlyphs;
|
|
76
|
-
/**
|
|
77
|
-
* 初始化文字布局
|
|
78
|
-
*/
|
|
79
|
-
private initGlyph;
|
|
80
|
-
/**
|
|
81
|
-
* 更新文字纹理
|
|
82
|
-
*/
|
|
83
|
-
private updateTexture;
|
|
84
|
-
private reBuildModel;
|
|
85
|
-
}
|