@antv/l7-layers 2.9.27-alpha.2 → 2.9.27-alpha.4
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/es/Geometry/index.js +6 -2
- package/es/Geometry/models/billboard.js +3 -7
- package/es/Geometry/models/plane.js +5 -7
- package/es/Geometry/models/sprite.js +4 -7
- package/es/canvas/index.d.ts +4 -0
- package/es/canvas/index.js +38 -2
- package/es/citybuliding/building.js +6 -2
- package/es/citybuliding/models/build.js +2 -3
- package/es/core/BaseLayer.d.ts +20 -12
- package/es/core/BaseLayer.js +61 -85
- package/es/core/BaseModel.d.ts +2 -2
- package/es/core/BaseModel.js +22 -19
- package/es/core/interface.d.ts +20 -1
- package/es/core/triangulation.d.ts +6 -0
- package/es/core/triangulation.js +64 -2
- package/es/earth/index.js +3 -1
- package/es/earth/models/atmosphere.js +4 -7
- package/es/earth/models/base.js +12 -18
- package/es/earth/models/bloomsphere.js +4 -8
- package/es/earth/shaders/atmosphere_frag.glsl +1 -1
- package/es/earth/shaders/bloomsphere_frag.glsl +1 -1
- package/es/heatmap/index.d.ts +2 -2
- package/es/heatmap/index.js +7 -5
- package/es/heatmap/models/grid.js +1 -3
- package/es/heatmap/models/grid3d.js +4 -11
- package/es/heatmap/models/heatmap.js +8 -9
- package/es/heatmap/models/hexagon.js +2 -6
- package/es/heatmap/triangulation.js +0 -1
- package/es/image/index.d.ts +1 -1
- package/es/image/index.js +10 -3
- package/es/image/models/dataImage.d.ts +1 -1
- package/es/image/models/dataImage.js +14 -39
- package/es/image/models/image.js +5 -10
- package/es/image/models/index.d.ts +1 -1
- package/es/image/models/index.js +3 -1
- package/es/image/models/tileDataImage.d.ts +19 -0
- package/es/image/models/tileDataImage.js +174 -0
- package/es/line/index.d.ts +1 -0
- package/es/line/index.js +8 -2
- package/es/line/models/arc.js +10 -10
- package/es/line/models/arc_3d.js +8 -10
- package/es/line/models/earthArc_3d.js +8 -10
- package/es/line/models/great_circle.js +7 -7
- package/es/line/models/half.js +3 -4
- package/es/line/models/line.js +10 -9
- package/es/line/models/linearline.js +3 -4
- package/es/line/models/simpleLine.js +5 -4
- package/es/line/models/simpleTileLine.d.ts +9 -0
- package/es/line/models/simpleTileLine.js +100 -0
- package/es/line/models/tile.d.ts +1 -4
- package/es/line/models/tile.js +50 -223
- package/es/line/models/wall.js +11 -47
- package/es/line/shaders/dash/arc_dash_vert.glsl +2 -0
- package/es/line/shaders/dash/line_dash_frag.glsl +1 -1
- package/es/line/shaders/line_arc2d_vert.glsl +2 -2
- package/es/line/shaders/line_arc_3d_frag.glsl +10 -10
- package/es/line/shaders/line_arc_3d_vert.glsl +5 -6
- package/es/line/shaders/line_arc_frag.glsl +9 -10
- package/es/line/shaders/line_arc_great_circle_frag.glsl +6 -6
- package/es/line/shaders/line_arc_great_circle_vert.glsl +2 -3
- package/es/line/shaders/line_arc_vert.glsl +6 -4
- package/es/line/shaders/line_bezier_vert.glsl +2 -2
- package/es/line/shaders/line_frag.glsl +5 -6
- package/es/line/shaders/line_vert.glsl +1 -1
- package/es/line/shaders/linear/arc3d_linear_frag.glsl +6 -7
- package/es/line/shaders/linear/arc3d_linear_vert.glsl +11 -12
- package/es/line/shaders/linear/arc_linear_frag.glsl +1 -1
- package/es/line/shaders/tile/line_tile_map_vert.glsl +25 -0
- package/es/line/shaders/tile/line_tile_vert.glsl +19 -177
- package/es/line/shaders/tile/simpleline_map_vert.glsl +15 -0
- package/es/line/shaders/tile/simpleline_vert.glsl +21 -0
- package/es/line/shaders/{wall_frag.glsl → wall/wall_frag.glsl} +21 -25
- package/es/line/shaders/wall/wall_vert.glsl +77 -0
- package/es/mask/index.d.ts +1 -0
- package/es/mask/index.js +80 -5
- package/es/mask/models/fill.d.ts +2 -1
- package/es/mask/models/fill.js +13 -10
- package/es/mask/shaders/mask_vert.glsl +0 -6
- package/es/plugins/DataMappingPlugin.d.ts +4 -3
- package/es/plugins/DataMappingPlugin.js +129 -58
- package/es/plugins/DataSourcePlugin.js +3 -2
- package/es/plugins/FeatureScalePlugin.d.ts +0 -2
- package/es/plugins/FeatureScalePlugin.js +8 -51
- package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -2
- package/es/plugins/LayerAnimateStylePlugin.js +7 -27
- package/es/plugins/LayerModelPlugin.js +2 -6
- package/es/plugins/LightingPlugin.js +1 -7
- package/es/plugins/MultiPassRendererPlugin.d.ts +0 -1
- package/es/plugins/MultiPassRendererPlugin.js +4 -16
- package/es/plugins/PixelPickingPlugin.d.ts +1 -1
- package/es/plugins/PixelPickingPlugin.js +8 -28
- package/es/plugins/RegisterStyleAttributePlugin.d.ts +4 -0
- package/es/plugins/RegisterStyleAttributePlugin.js +56 -5
- package/es/plugins/UpdateStyleAttributePlugin.js +2 -9
- package/es/point/index.js +9 -6
- package/es/point/models/earthExtrude.d.ts +1 -1
- package/es/point/models/earthExtrude.js +9 -14
- package/es/point/models/earthFill.js +2 -2
- package/es/point/models/extrude.d.ts +1 -1
- package/es/point/models/extrude.js +9 -12
- package/es/point/models/fill.d.ts +1 -1
- package/es/point/models/fill.js +8 -9
- package/es/point/models/fillmage.js +5 -6
- package/es/point/models/image.js +3 -3
- package/es/point/models/index.d.ts +1 -1
- package/es/point/models/index.js +3 -3
- package/es/point/models/normal.d.ts +0 -1
- package/es/point/models/normal.js +9 -62
- package/es/point/models/radar.js +5 -70
- package/es/point/models/simplePoint.d.ts +0 -1
- package/es/point/models/simplePoint.js +2 -11
- package/es/point/models/text.js +7 -10
- package/es/point/models/tile.d.ts +0 -7
- package/es/point/models/tile.js +24 -158
- package/es/point/models/tileText.d.ts +0 -4
- package/es/point/models/tileText.js +99 -188
- package/es/point/shaders/animate/wave_frag.glsl +4 -4
- package/es/point/shaders/earth/fill_vert.glsl +0 -1
- package/es/point/shaders/fill_vert.glsl +0 -1
- package/es/point/shaders/normal_frag.glsl +1 -10
- package/es/point/shaders/normal_vert.glsl +5 -60
- package/es/point/shaders/radar/radar_frag.glsl +4 -15
- package/es/point/shaders/radar/radar_vert.glsl +4 -54
- package/es/point/shaders/tile/fill_tile_frag.glsl +10 -17
- package/es/point/shaders/tile/fill_tile_vert.glsl +20 -123
- package/es/point/shaders/tile/text_frag.glsl +33 -0
- package/es/point/shaders/tile/text_map_frag.glsl +31 -0
- package/es/point/shaders/tile/text_map_vert.glsl +38 -0
- package/es/point/shaders/tile/text_vert.glsl +48 -0
- package/es/polygon/index.js +6 -2
- package/es/polygon/models/extrude.js +4 -8
- package/es/polygon/models/fill.js +3 -4
- package/es/polygon/models/ocean.d.ts +0 -2
- package/es/polygon/models/ocean.js +13 -47
- package/es/polygon/models/tile.d.ts +1 -4
- package/es/polygon/models/tile.js +25 -57
- package/es/polygon/models/water.d.ts +0 -2
- package/es/polygon/models/water.js +13 -47
- package/es/polygon/shaders/polygon_frag.glsl +2 -2
- package/es/polygon/shaders/polygon_vert.glsl +2 -2
- package/es/polygon/shaders/tile/polygon_tile_map_vert.glsl +16 -0
- package/es/polygon/shaders/tile/polygon_tile_vert.glsl +20 -60
- package/es/polygon/shaders/water/polygon_ocean_frag.glsl +1 -2
- package/es/polygon/shaders/water/polygon_ocean_vert.glsl +0 -31
- package/es/polygon/shaders/water/polygon_water_frag.glsl +1 -3
- package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -29
- package/es/raster/buffers/triangulation.js +1 -4
- package/es/raster/index.js +6 -2
- package/es/raster/models/raster.d.ts +1 -1
- package/es/raster/models/raster.js +6 -5
- package/es/shader/minify_frag.glsl +7 -0
- package/es/shader/minify_picking_frag.glsl +10 -0
- package/es/tile/manager/baseMapTileLayerManager.d.ts +29 -0
- package/es/tile/manager/baseMapTileLayerManager.js +207 -0
- package/es/tile/manager/tileLayerManager.d.ts +2 -2
- package/es/tile/manager/tileLayerManager.js +12 -2
- package/es/tile/manager/tilePickerManager.d.ts +2 -3
- package/es/tile/manager/tilePickerManager.js +1 -2
- package/es/tile/models/tileModel.d.ts +1 -0
- package/es/tile/models/tileModel.js +18 -2
- package/es/tile/tileFactory/base.d.ts +1 -1
- package/es/tile/tileFactory/base.js +58 -33
- package/es/tile/tileFactory/line.js +3 -0
- package/es/tile/tileFactory/point.js +3 -0
- package/es/tile/tileFactory/polygon.js +3 -0
- package/es/tile/tileFactory/raster.js +3 -0
- package/es/tile/tileFactory/rasterData.js +3 -0
- package/es/tile/tileFactory/rasterDataLayer.js +6 -2
- package/es/tile/tileFactory/test.js +26 -5
- package/es/tile/tileFactory/vectorLayer.d.ts +4 -1
- package/es/tile/tileFactory/vectorLayer.js +110 -7
- package/es/tile/tileLayer/baseMapTileLayer.d.ts +29 -0
- package/es/tile/tileLayer/baseMapTileLayer.js +188 -0
- package/es/tile/tileLayer/baseTileLayer.d.ts +4 -4
- package/es/tile/tileLayer/baseTileLayer.js +46 -75
- package/es/tile/tileTest.d.ts +1 -0
- package/es/tile/tileTest.js +3 -2
- package/es/tile/tmsMapTileLayer.d.ts +9 -0
- package/es/tile/tmsMapTileLayer.js +119 -0
- package/es/tile/tmsTileLayer.d.ts +2 -0
- package/es/tile/tmsTileLayer.js +24 -2
- package/es/tile/utils.d.ts +4 -0
- package/es/tile/utils.js +30 -0
- package/es/utils/dataMappingStyle.js +3 -0
- package/es/utils/layerData.js +2 -2
- package/es/utils/updateShape.js +2 -2
- package/es/wind/index.js +6 -2
- package/es/wind/models/wind.js +8 -8
- package/es/wind/shaders/wind_vert.glsl +1 -1
- package/lib/Geometry/index.js +6 -2
- package/lib/Geometry/models/billboard.js +3 -7
- package/lib/Geometry/models/plane.js +5 -7
- package/lib/Geometry/models/sprite.js +4 -7
- package/lib/canvas/index.js +37 -2
- package/lib/citybuliding/building.js +6 -2
- package/lib/citybuliding/models/build.js +2 -3
- package/lib/core/BaseLayer.js +61 -85
- package/lib/core/BaseModel.js +22 -19
- package/lib/core/triangulation.js +66 -2
- package/lib/earth/index.js +3 -1
- package/lib/earth/models/atmosphere.js +4 -7
- package/lib/earth/models/base.js +12 -18
- package/lib/earth/models/bloomsphere.js +4 -8
- package/lib/earth/shaders/atmosphere_frag.glsl +1 -1
- package/lib/earth/shaders/bloomsphere_frag.glsl +1 -1
- package/lib/heatmap/index.js +7 -5
- package/lib/heatmap/models/grid.js +1 -3
- package/lib/heatmap/models/grid3d.js +4 -11
- package/lib/heatmap/models/heatmap.js +8 -9
- package/lib/heatmap/models/hexagon.js +2 -6
- package/lib/heatmap/triangulation.js +0 -1
- package/lib/image/index.js +10 -3
- package/lib/image/models/dataImage.js +13 -38
- package/lib/image/models/image.js +5 -10
- package/lib/image/models/index.js +4 -1
- package/lib/image/models/tileDataImage.js +188 -0
- package/lib/line/index.js +7 -2
- package/lib/line/models/arc.js +10 -10
- package/lib/line/models/arc_3d.js +8 -10
- package/lib/line/models/earthArc_3d.js +8 -10
- package/lib/line/models/great_circle.js +7 -7
- package/lib/line/models/half.js +3 -4
- package/lib/line/models/line.js +10 -9
- package/lib/line/models/linearline.js +3 -4
- package/lib/line/models/simpleLine.js +5 -4
- package/lib/line/models/simpleTileLine.js +115 -0
- package/lib/line/models/tile.js +50 -224
- package/lib/line/models/wall.js +11 -47
- package/lib/line/shaders/dash/arc_dash_vert.glsl +2 -0
- package/lib/line/shaders/dash/line_dash_frag.glsl +1 -1
- package/lib/line/shaders/line_arc2d_vert.glsl +2 -2
- package/lib/line/shaders/line_arc_3d_frag.glsl +10 -10
- package/lib/line/shaders/line_arc_3d_vert.glsl +5 -6
- package/lib/line/shaders/line_arc_frag.glsl +9 -10
- package/lib/line/shaders/line_arc_great_circle_frag.glsl +6 -6
- package/lib/line/shaders/line_arc_great_circle_vert.glsl +2 -3
- package/lib/line/shaders/line_arc_vert.glsl +6 -4
- package/lib/line/shaders/line_bezier_vert.glsl +2 -2
- package/lib/line/shaders/line_frag.glsl +5 -6
- package/lib/line/shaders/line_vert.glsl +1 -1
- package/lib/line/shaders/linear/arc3d_linear_frag.glsl +6 -7
- package/lib/line/shaders/linear/arc3d_linear_vert.glsl +11 -12
- package/lib/line/shaders/linear/arc_linear_frag.glsl +1 -1
- package/lib/line/shaders/tile/line_tile_map_vert.glsl +25 -0
- package/lib/line/shaders/tile/line_tile_vert.glsl +19 -177
- package/lib/line/shaders/tile/simpleline_map_vert.glsl +15 -0
- package/lib/line/shaders/tile/simpleline_vert.glsl +21 -0
- package/lib/line/shaders/{wall_frag.glsl → wall/wall_frag.glsl} +21 -25
- package/lib/line/shaders/wall/wall_vert.glsl +77 -0
- package/lib/mask/index.js +82 -5
- package/lib/mask/models/fill.js +14 -10
- package/lib/mask/shaders/mask_vert.glsl +0 -6
- package/lib/plugins/DataMappingPlugin.js +127 -57
- package/lib/plugins/DataSourcePlugin.js +3 -2
- package/lib/plugins/FeatureScalePlugin.js +6 -50
- package/lib/plugins/LayerAnimateStylePlugin.js +6 -29
- package/lib/plugins/LayerModelPlugin.js +2 -6
- package/lib/plugins/LightingPlugin.js +1 -7
- package/lib/plugins/MultiPassRendererPlugin.js +3 -19
- package/lib/plugins/PixelPickingPlugin.js +8 -28
- package/lib/plugins/RegisterStyleAttributePlugin.js +56 -5
- package/lib/plugins/UpdateStyleAttributePlugin.js +2 -9
- package/lib/point/index.js +9 -6
- package/lib/point/models/earthExtrude.js +9 -14
- package/lib/point/models/earthFill.js +2 -2
- package/lib/point/models/extrude.js +9 -12
- package/lib/point/models/fill.js +8 -9
- package/lib/point/models/fillmage.js +5 -6
- package/lib/point/models/image.js +3 -3
- package/lib/point/models/index.js +1 -1
- package/lib/point/models/normal.js +8 -61
- package/lib/point/models/radar.js +5 -70
- package/lib/point/models/simplePoint.js +1 -10
- package/lib/point/models/text.js +7 -10
- package/lib/point/models/tile.js +23 -159
- package/lib/point/models/tileText.js +98 -187
- package/lib/point/shaders/animate/wave_frag.glsl +4 -4
- package/lib/point/shaders/earth/fill_vert.glsl +0 -1
- package/lib/point/shaders/fill_vert.glsl +0 -1
- package/lib/point/shaders/normal_frag.glsl +1 -10
- package/lib/point/shaders/normal_vert.glsl +5 -60
- package/lib/point/shaders/radar/radar_frag.glsl +4 -15
- package/lib/point/shaders/radar/radar_vert.glsl +4 -54
- package/lib/point/shaders/tile/fill_tile_frag.glsl +10 -17
- package/lib/point/shaders/tile/fill_tile_vert.glsl +20 -123
- package/lib/point/shaders/tile/text_frag.glsl +33 -0
- package/lib/point/shaders/tile/text_map_frag.glsl +31 -0
- package/lib/point/shaders/tile/text_map_vert.glsl +38 -0
- package/lib/point/shaders/tile/text_vert.glsl +48 -0
- package/lib/polygon/index.js +6 -2
- package/lib/polygon/models/extrude.js +4 -8
- package/lib/polygon/models/fill.js +3 -4
- package/lib/polygon/models/ocean.js +14 -47
- package/lib/polygon/models/tile.js +24 -57
- package/lib/polygon/models/water.js +14 -47
- package/lib/polygon/shaders/polygon_frag.glsl +2 -2
- package/lib/polygon/shaders/polygon_vert.glsl +2 -2
- package/lib/polygon/shaders/tile/polygon_tile_map_vert.glsl +16 -0
- package/lib/polygon/shaders/tile/polygon_tile_vert.glsl +20 -60
- package/lib/polygon/shaders/water/polygon_ocean_frag.glsl +1 -2
- package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +0 -31
- package/lib/polygon/shaders/water/polygon_water_frag.glsl +1 -3
- package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -29
- package/lib/raster/buffers/triangulation.js +1 -4
- package/lib/raster/index.js +6 -2
- package/lib/raster/models/raster.js +6 -5
- package/lib/shader/minify_frag.glsl +7 -0
- package/lib/shader/minify_picking_frag.glsl +10 -0
- package/lib/tile/manager/baseMapTileLayerManager.js +222 -0
- package/lib/tile/manager/tileLayerManager.js +12 -2
- package/lib/tile/manager/tilePickerManager.js +1 -2
- package/lib/tile/models/tileModel.js +19 -2
- package/lib/tile/tileFactory/base.js +60 -33
- package/lib/tile/tileFactory/line.js +3 -0
- package/lib/tile/tileFactory/point.js +3 -0
- package/lib/tile/tileFactory/polygon.js +3 -0
- package/lib/tile/tileFactory/raster.js +3 -0
- package/lib/tile/tileFactory/rasterData.js +3 -0
- package/lib/tile/tileFactory/rasterDataLayer.js +6 -2
- package/lib/tile/tileFactory/test.js +26 -5
- package/lib/tile/tileFactory/vectorLayer.js +112 -8
- package/lib/tile/tileLayer/baseMapTileLayer.js +195 -0
- package/lib/tile/tileLayer/baseTileLayer.js +46 -75
- package/lib/tile/tileTest.js +3 -2
- package/lib/tile/tmsMapTileLayer.js +136 -0
- package/lib/tile/tmsTileLayer.js +25 -2
- package/lib/tile/utils.js +38 -0
- package/lib/utils/dataMappingStyle.js +3 -0
- package/lib/utils/layerData.js +2 -2
- package/lib/utils/updateShape.js +2 -2
- package/lib/wind/index.js +6 -2
- package/lib/wind/models/wind.js +7 -7
- package/lib/wind/shaders/wind_vert.glsl +1 -1
- package/package.json +8 -7
- package/es/line/shaders/tile/line_tile_frag.glsl +0 -79
- package/es/line/shaders/wall_vert.glsl +0 -111
- package/es/mask/shaders/mask_frag.glsl +0 -7
- package/es/polygon/shaders/tile/polygon_tile_frag.glsl +0 -12
- package/lib/line/shaders/tile/line_tile_frag.glsl +0 -79
- package/lib/line/shaders/wall_vert.glsl +0 -111
- package/lib/mask/shaders/mask_frag.glsl +0 -7
- package/lib/polygon/shaders/tile/polygon_tile_frag.glsl +0 -12
|
@@ -55,11 +55,10 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
55
55
|
mag: 'linear',
|
|
56
56
|
min: 'linear mipmap nearest',
|
|
57
57
|
mipmap: true
|
|
58
|
-
}); //
|
|
59
|
-
// TODO: 更新完纹理后在更新的图层的时候需要更新所有的图层
|
|
58
|
+
}); // 更新完纹理后在更新的图层的时候需要更新所有的图层
|
|
60
59
|
|
|
61
60
|
|
|
62
|
-
_this.
|
|
61
|
+
_this.layerService.throttleRenderLayers();
|
|
63
62
|
|
|
64
63
|
return;
|
|
65
64
|
}
|
|
@@ -284,7 +283,7 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
284
283
|
type: gl.FLOAT
|
|
285
284
|
},
|
|
286
285
|
size: 1,
|
|
287
|
-
update: function update(feature
|
|
286
|
+
update: function update(feature) {
|
|
288
287
|
var _feature$rotate = feature.rotate,
|
|
289
288
|
rotate = _feature$rotate === void 0 ? 0 : _feature$rotate;
|
|
290
289
|
return Array.isArray(rotate) ? [rotate[0]] : [rotate];
|
|
@@ -303,7 +302,7 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
303
302
|
type: gl.FLOAT
|
|
304
303
|
},
|
|
305
304
|
size: 2,
|
|
306
|
-
update: function update(feature
|
|
305
|
+
update: function update(feature) {
|
|
307
306
|
var iconMap = _this2.iconService.getIconMap();
|
|
308
307
|
|
|
309
308
|
var shape = feature.shape;
|
|
@@ -351,7 +350,7 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
351
350
|
type: gl.FLOAT
|
|
352
351
|
},
|
|
353
352
|
size: 1,
|
|
354
|
-
update: function update(feature
|
|
353
|
+
update: function update(feature) {
|
|
355
354
|
var _feature$size = feature.size,
|
|
356
355
|
size = _feature$size === void 0 ? 5 : _feature$size;
|
|
357
356
|
return Array.isArray(size) ? [size[0] * _this2.meter2coord] : [size * _this2.meter2coord];
|
package/es/point/models/image.js
CHANGED
|
@@ -47,10 +47,10 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
47
47
|
mag: 'linear',
|
|
48
48
|
min: 'linear mipmap nearest',
|
|
49
49
|
mipmap: true
|
|
50
|
-
}); //
|
|
50
|
+
}); // 更新完纹理后在更新的图层的时候需要更新所有的图层
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
_this.
|
|
53
|
+
_this.layerService.throttleRenderLayers();
|
|
54
54
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
@@ -194,7 +194,7 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
194
194
|
type: gl.FLOAT
|
|
195
195
|
},
|
|
196
196
|
size: 1,
|
|
197
|
-
update: function update(feature
|
|
197
|
+
update: function update(feature) {
|
|
198
198
|
var _feature$size = feature.size,
|
|
199
199
|
size = _feature$size === void 0 ? 5 : _feature$size;
|
|
200
200
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type PointType = 'fillImage' | 'fill' | 'radar' | 'image' | 'normal' | 'simplePoint' | 'extrude' | 'text' | '
|
|
1
|
+
export declare type PointType = 'fillImage' | 'fill' | 'radar' | 'image' | 'normal' | 'simplePoint' | 'extrude' | 'text' | 'vectorPoint' | 'tile' | 'tileText' | 'earthFill' | 'earthExtrude';
|
|
2
2
|
declare const PointModels: {
|
|
3
3
|
[key in PointType]: any;
|
|
4
4
|
};
|
package/es/point/models/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import FillImageModel from "./fillmage";
|
|
|
8
8
|
import IMageModel from "./image";
|
|
9
9
|
import NormalModel from "./normal";
|
|
10
10
|
import Radar from "./radar";
|
|
11
|
-
import
|
|
11
|
+
import SimplePoint from "./simplePoint";
|
|
12
12
|
import TextModel from "./text";
|
|
13
13
|
import TileTextModel from "./tileText";
|
|
14
14
|
import TileFillModel from "./tile";
|
|
@@ -18,10 +18,10 @@ var PointModels = {
|
|
|
18
18
|
radar: Radar,
|
|
19
19
|
image: IMageModel,
|
|
20
20
|
normal: NormalModel,
|
|
21
|
-
simplePoint:
|
|
21
|
+
simplePoint: SimplePoint,
|
|
22
22
|
extrude: ExtrudeModel,
|
|
23
23
|
text: TextModel,
|
|
24
|
-
|
|
24
|
+
vectorPoint: PointTileModel,
|
|
25
25
|
tile: TileFillModel,
|
|
26
26
|
tileText: TileTextModel,
|
|
27
27
|
earthFill: EarthFillModel,
|
|
@@ -9,16 +9,16 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
9
9
|
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
11
|
|
|
12
|
-
import { AttributeType,
|
|
12
|
+
import { AttributeType, gl } from '@antv/l7-core';
|
|
13
13
|
import { getMask } from '@antv/l7-utils';
|
|
14
14
|
import { isNumber } from 'lodash';
|
|
15
15
|
import BaseModel from "../../core/BaseModel";
|
|
16
16
|
|
|
17
17
|
/* babel-plugin-inline-import '../shaders/normal_frag.glsl' */
|
|
18
|
-
var normalFrag = "
|
|
18
|
+
var normalFrag = "uniform float u_opacity : 1;\nvarying vec4 v_color;\nvoid main() {\n gl_FragColor = v_color;\n gl_FragColor.a *= u_opacity;\n}\n";
|
|
19
19
|
|
|
20
20
|
/* babel-plugin-inline-import '../shaders/normal_vert.glsl' */
|
|
21
|
-
var normalVert = "\nattribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute float a_Size;\nattribute vec4 a_Color;\nvarying vec4 v_color;\n\
|
|
21
|
+
var normalVert = "\nattribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute float a_Size;\nattribute vec4 a_Color;\n\nvarying vec4 v_color;\n\n#pragma include \"projection\"\n#pragma include \"project\"\n\nvoid main() {\n v_color = a_Color;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(a_Position.xy, a_Position.z, 1.0);\n } else {\n vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);\n gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy),project_pos.z,project_pos.w));\n }\n\n gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\n}\n";
|
|
22
22
|
export function PointTriangulation(feature) {
|
|
23
23
|
var coordinates = feature.coordinates;
|
|
24
24
|
return {
|
|
@@ -51,51 +51,10 @@ var NormalModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
51
51
|
value: function getUninforms() {
|
|
52
52
|
var _ref = this.layer.getLayerConfig(),
|
|
53
53
|
_ref$opacity = _ref.opacity,
|
|
54
|
-
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity
|
|
55
|
-
_ref$offsets = _ref.offsets,
|
|
56
|
-
offsets = _ref$offsets === void 0 ? [0, 0] : _ref$offsets;
|
|
57
|
-
|
|
58
|
-
if (this.dataTextureTest && this.dataTextureNeedUpdate({
|
|
59
|
-
opacity: opacity,
|
|
60
|
-
offsets: offsets
|
|
61
|
-
})) {
|
|
62
|
-
// 判断当前的样式中哪些是需要进行数据映射的,哪些是常量,同时计算用于构建数据纹理的一些中间变量
|
|
63
|
-
this.judgeStyleAttributes({
|
|
64
|
-
opacity: opacity,
|
|
65
|
-
offsets: offsets
|
|
66
|
-
});
|
|
67
|
-
var encodeData = this.layer.getEncodedData();
|
|
68
|
-
|
|
69
|
-
var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
|
|
70
|
-
data = _this$calDataFrame.data,
|
|
71
|
-
width = _this$calDataFrame.width,
|
|
72
|
-
height = _this$calDataFrame.height;
|
|
73
|
-
|
|
74
|
-
this.rowCount = height; // 当前数据纹理有多少行
|
|
75
|
-
|
|
76
|
-
this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
|
|
77
|
-
flipY: true,
|
|
78
|
-
data: data,
|
|
79
|
-
format: gl.LUMINANCE,
|
|
80
|
-
type: gl.FLOAT,
|
|
81
|
-
width: width,
|
|
82
|
-
height: height
|
|
83
|
-
}) : this.createTexture2D({
|
|
84
|
-
flipY: true,
|
|
85
|
-
data: [1],
|
|
86
|
-
format: gl.LUMINANCE,
|
|
87
|
-
type: gl.FLOAT,
|
|
88
|
-
width: 1,
|
|
89
|
-
height: 1
|
|
90
|
-
});
|
|
91
|
-
}
|
|
54
|
+
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity;
|
|
92
55
|
|
|
93
56
|
return {
|
|
94
|
-
|
|
95
|
-
// 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
|
|
96
|
-
u_cellTypeLayout: this.getCellTypeLayout(),
|
|
97
|
-
u_opacity: isNumber(opacity) ? opacity : 1.0,
|
|
98
|
-
u_offsets: this.isOffsetStatic(offsets) ? offsets : [0, 0]
|
|
57
|
+
u_opacity: isNumber(opacity) ? opacity : 1.0
|
|
99
58
|
};
|
|
100
59
|
}
|
|
101
60
|
}, {
|
|
@@ -123,7 +82,8 @@ var NormalModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
123
82
|
},
|
|
124
83
|
primitive: gl.POINTS,
|
|
125
84
|
blend: this.getBlend(),
|
|
126
|
-
stencil: getMask(mask, maskInside)
|
|
85
|
+
stencil: getMask(mask, maskInside),
|
|
86
|
+
pick: false
|
|
127
87
|
}).then(function (model) {
|
|
128
88
|
callbackModel([model]);
|
|
129
89
|
}).catch(function (err) {
|
|
@@ -133,28 +93,22 @@ var NormalModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
133
93
|
}
|
|
134
94
|
}, {
|
|
135
95
|
key: "clearModels",
|
|
136
|
-
value: function clearModels() {
|
|
137
|
-
var _this$dataTexture;
|
|
138
|
-
|
|
139
|
-
(_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
|
|
140
|
-
}
|
|
96
|
+
value: function clearModels() {}
|
|
141
97
|
}, {
|
|
142
98
|
key: "registerBuiltinAttributes",
|
|
143
99
|
value: function registerBuiltinAttributes() {
|
|
144
|
-
// point layer size;
|
|
145
100
|
this.styleAttributeService.registerStyleAttribute({
|
|
146
101
|
name: 'size',
|
|
147
102
|
type: AttributeType.Attribute,
|
|
148
103
|
descriptor: {
|
|
149
104
|
name: 'a_Size',
|
|
150
105
|
buffer: {
|
|
151
|
-
// give the WebGL driver a hint that this buffer may change
|
|
152
106
|
usage: gl.DYNAMIC_DRAW,
|
|
153
107
|
data: [],
|
|
154
108
|
type: gl.FLOAT
|
|
155
109
|
},
|
|
156
110
|
size: 1,
|
|
157
|
-
update: function update(feature
|
|
111
|
+
update: function update(feature) {
|
|
158
112
|
var _feature$size = feature.size,
|
|
159
113
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
160
114
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -162,13 +116,6 @@ var NormalModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
162
116
|
}
|
|
163
117
|
});
|
|
164
118
|
}
|
|
165
|
-
}, {
|
|
166
|
-
key: "defaultStyleOptions",
|
|
167
|
-
value: function defaultStyleOptions() {
|
|
168
|
-
return {
|
|
169
|
-
blend: BlendType.additive
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
119
|
}]);
|
|
173
120
|
|
|
174
121
|
return NormalModel;
|
package/es/point/models/radar.js
CHANGED
|
@@ -18,10 +18,10 @@ import BaseModel from "../../core/BaseModel";
|
|
|
18
18
|
import { PointFillTriangulation } from "../../core/triangulation";
|
|
19
19
|
|
|
20
20
|
/* babel-plugin-inline-import '../shaders/radar/radar_frag.glsl' */
|
|
21
|
-
var pointFillFrag = "\nuniform float u_additive;\
|
|
21
|
+
var pointFillFrag = "\nuniform float u_additive;\nuniform float u_opacity: 1.0;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nvarying vec2 v_exteude;\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\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 gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);\n\n if(u_additive > 0.0) {\n gl_FragColor *= opacity_t;\n } else {\n gl_FragColor.a *= opacity_t;\n }\n\n if(gl_FragColor.a > 0.0) {\n gl_FragColor = filterColor(gl_FragColor);\n }\n\n vec2 extrude = v_exteude;\n vec2 dir = normalize(extrude);\n vec2 baseDir = vec2(1.0, 0.0);\n float pi = 3.14159265359;\n // full circle\n // float rades = dot(dir, baseDir);\n // float flag = sign(dir.y);\n // float radar_v = (flag - 1.0) * -0.5 + flag * acos(rades)/pi/2.0;\n \n // half circle\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 gl_FragColor.a *= radar_v;\n}\n";
|
|
22
22
|
|
|
23
23
|
/* babel-plugin-inline-import '../shaders/radar/radar_vert.glsl' */
|
|
24
|
-
var pointFillVert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\
|
|
24
|
+
var pointFillVert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nuniform float u_speed: 1.0;\nuniform float u_time;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float u_isMeter;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nvarying vec2 v_exteude;\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvoid main() {\n vec3 extrude = a_Extrude;\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_exteude = rotateMatrix * a_Extrude.xy;\n\n // unpack color(vec2)\n v_color = a_Color;\n\n // radius(16-bit)\n v_radius = newSize;\n\n // anti-alias\n float blur = 0.0;\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur);\n\n vec2 offset = (extrude.xy * (newSize));\n vec3 aPosition = a_Position;\n if(u_isMeter < 1.0) {\n // \u4E0D\u4EE5\u7C73\u4E3A\u5B9E\u9645\u5355\u4F4D\n offset = project_pixel(offset);\n } else {\n // \u4EE5\u7C73\u4E3A\u5B9E\u9645\u5355\u4F4D\n antialiasblur *= pow(19.0 - u_Zoom, 2.0);\n antialiasblur = max(antialiasblur, -0.01);\n // offset *= 0.5;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n aPosition.xy += offset;\n offset.x = 0.0;\n offset.y = 0.0;\n }\n }\n\n v_data = vec4(extrude.x, extrude.y, antialiasblur, -1.0);\n\n vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(project_pos.xy + offset, 0.0, 1.0);\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
25
25
|
import { Version } from '@antv/l7-maps';
|
|
26
26
|
|
|
27
27
|
var RadarModel = /*#__PURE__*/function (_BaseModel) {
|
|
@@ -53,56 +53,15 @@ var RadarModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
53
53
|
var _ref = this.layer.getLayerConfig(),
|
|
54
54
|
_ref$opacity = _ref.opacity,
|
|
55
55
|
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
|
|
56
|
-
_ref$offsets = _ref.offsets,
|
|
57
|
-
offsets = _ref$offsets === void 0 ? [0, 0] : _ref$offsets,
|
|
58
56
|
blend = _ref.blend,
|
|
59
57
|
_ref$speed = _ref.speed,
|
|
60
58
|
speed = _ref$speed === void 0 ? 1 : _ref$speed;
|
|
61
59
|
|
|
62
|
-
if (this.dataTextureTest && this.dataTextureNeedUpdate({
|
|
63
|
-
opacity: opacity,
|
|
64
|
-
offsets: offsets
|
|
65
|
-
})) {
|
|
66
|
-
// 判断当前的样式中哪些是需要进行数据映射的,哪些是常量,同时计算用于构建数据纹理的一些中间变量
|
|
67
|
-
this.judgeStyleAttributes({
|
|
68
|
-
opacity: opacity,
|
|
69
|
-
offsets: offsets
|
|
70
|
-
});
|
|
71
|
-
var encodeData = this.layer.getEncodedData();
|
|
72
|
-
|
|
73
|
-
var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
|
|
74
|
-
data = _this$calDataFrame.data,
|
|
75
|
-
width = _this$calDataFrame.width,
|
|
76
|
-
height = _this$calDataFrame.height;
|
|
77
|
-
|
|
78
|
-
this.rowCount = height; // 当前数据纹理有多少行
|
|
79
|
-
|
|
80
|
-
this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
|
|
81
|
-
flipY: true,
|
|
82
|
-
data: data,
|
|
83
|
-
format: gl.LUMINANCE,
|
|
84
|
-
type: gl.FLOAT,
|
|
85
|
-
width: width,
|
|
86
|
-
height: height
|
|
87
|
-
}) : this.createTexture2D({
|
|
88
|
-
flipY: true,
|
|
89
|
-
data: [1],
|
|
90
|
-
format: gl.LUMINANCE,
|
|
91
|
-
type: gl.FLOAT,
|
|
92
|
-
width: 1,
|
|
93
|
-
height: 1
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
60
|
return {
|
|
98
61
|
u_isMeter: Number(this.isMeter),
|
|
99
62
|
u_speed: speed,
|
|
100
63
|
u_additive: blend === 'additive' ? 1.0 : 0.0,
|
|
101
|
-
|
|
102
|
-
// 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
|
|
103
|
-
u_cellTypeLayout: this.getCellTypeLayout(),
|
|
104
|
-
u_opacity: isNumber(opacity) ? opacity : 1.0,
|
|
105
|
-
u_offsets: this.isOffsetStatic(offsets) ? offsets : [0, 0]
|
|
64
|
+
u_opacity: isNumber(opacity) ? opacity : 1.0
|
|
106
65
|
};
|
|
107
66
|
}
|
|
108
67
|
}, {
|
|
@@ -115,7 +74,7 @@ var RadarModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
115
74
|
} : _ref2$animateOption;
|
|
116
75
|
|
|
117
76
|
return {
|
|
118
|
-
|
|
77
|
+
u_animate: this.animateOption2Array(animateOption),
|
|
119
78
|
u_time: this.layer.getLayerAnimateTime()
|
|
120
79
|
};
|
|
121
80
|
}
|
|
@@ -257,36 +216,12 @@ var RadarModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
257
216
|
type: gl.FLOAT
|
|
258
217
|
},
|
|
259
218
|
size: 1,
|
|
260
|
-
update: function update(feature
|
|
219
|
+
update: function update(feature) {
|
|
261
220
|
var _feature$size = feature.size,
|
|
262
221
|
size = _feature$size === void 0 ? 5 : _feature$size;
|
|
263
222
|
return Array.isArray(size) ? [size[0] * _this2.meter2coord] : [size * _this2.meter2coord];
|
|
264
223
|
}
|
|
265
224
|
}
|
|
266
|
-
}); // point layer size;
|
|
267
|
-
|
|
268
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
269
|
-
name: 'shape',
|
|
270
|
-
type: AttributeType.Attribute,
|
|
271
|
-
descriptor: {
|
|
272
|
-
name: 'a_Shape',
|
|
273
|
-
buffer: {
|
|
274
|
-
// give the WebGL driver a hint that this buffer may change
|
|
275
|
-
usage: gl.DYNAMIC_DRAW,
|
|
276
|
-
data: [],
|
|
277
|
-
type: gl.FLOAT
|
|
278
|
-
},
|
|
279
|
-
size: 1,
|
|
280
|
-
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
281
|
-
var _feature$shape = feature.shape,
|
|
282
|
-
shape = _feature$shape === void 0 ? 2 : _feature$shape;
|
|
283
|
-
|
|
284
|
-
var shape2d = _this2.layer.getLayerConfig().shape2d;
|
|
285
|
-
|
|
286
|
-
var shapeIndex = shape2d.indexOf(shape);
|
|
287
|
-
return [shapeIndex];
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
225
|
});
|
|
291
226
|
}
|
|
292
227
|
}]);
|
|
@@ -9,7 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
9
9
|
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
11
|
|
|
12
|
-
import { AttributeType,
|
|
12
|
+
import { AttributeType, gl } from '@antv/l7-core';
|
|
13
13
|
import { getMask } from '@antv/l7-utils';
|
|
14
14
|
import { isNumber } from 'lodash';
|
|
15
15
|
import BaseModel from "../../core/BaseModel";
|
|
@@ -152,20 +152,18 @@ var SimplePointModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
152
152
|
}, {
|
|
153
153
|
key: "registerBuiltinAttributes",
|
|
154
154
|
value: function registerBuiltinAttributes() {
|
|
155
|
-
// point layer size;
|
|
156
155
|
this.styleAttributeService.registerStyleAttribute({
|
|
157
156
|
name: 'size',
|
|
158
157
|
type: AttributeType.Attribute,
|
|
159
158
|
descriptor: {
|
|
160
159
|
name: 'a_Size',
|
|
161
160
|
buffer: {
|
|
162
|
-
// give the WebGL driver a hint that this buffer may change
|
|
163
161
|
usage: gl.DYNAMIC_DRAW,
|
|
164
162
|
data: [],
|
|
165
163
|
type: gl.FLOAT
|
|
166
164
|
},
|
|
167
165
|
size: 1,
|
|
168
|
-
update: function update(feature
|
|
166
|
+
update: function update(feature) {
|
|
169
167
|
var _feature$size = feature.size,
|
|
170
168
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
171
169
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -173,13 +171,6 @@ var SimplePointModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
173
171
|
}
|
|
174
172
|
});
|
|
175
173
|
}
|
|
176
|
-
}, {
|
|
177
|
-
key: "defaultStyleOptions",
|
|
178
|
-
value: function defaultStyleOptions() {
|
|
179
|
-
return {
|
|
180
|
-
blend: BlendType.additive
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
174
|
}]);
|
|
184
175
|
|
|
185
176
|
return SimplePointModel;
|
package/es/point/models/text.js
CHANGED
|
@@ -289,7 +289,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
289
289
|
type: gl.FLOAT
|
|
290
290
|
},
|
|
291
291
|
size: 1,
|
|
292
|
-
update: function update(feature
|
|
292
|
+
update: function update(feature) {
|
|
293
293
|
var _feature$rotate = feature.rotate,
|
|
294
294
|
rotate = _feature$rotate === void 0 ? 0 : _feature$rotate;
|
|
295
295
|
return Array.isArray(rotate) ? [rotate[0]] : [rotate];
|
|
@@ -308,7 +308,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
308
308
|
type: gl.FLOAT
|
|
309
309
|
},
|
|
310
310
|
size: 2,
|
|
311
|
-
update: function update(feature, featureIdx, vertex
|
|
311
|
+
update: function update(feature, featureIdx, vertex) {
|
|
312
312
|
return [vertex[5], vertex[6]];
|
|
313
313
|
}
|
|
314
314
|
}
|
|
@@ -326,27 +326,25 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
326
326
|
type: gl.FLOAT
|
|
327
327
|
},
|
|
328
328
|
size: 1,
|
|
329
|
-
update: function update(feature
|
|
329
|
+
update: function update(feature) {
|
|
330
330
|
var _feature$size = feature.size,
|
|
331
331
|
size = _feature$size === void 0 ? 12 : _feature$size;
|
|
332
332
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
});
|
|
336
|
-
|
|
335
|
+
});
|
|
337
336
|
this.styleAttributeService.registerStyleAttribute({
|
|
338
337
|
name: 'textUv',
|
|
339
338
|
type: AttributeType.Attribute,
|
|
340
339
|
descriptor: {
|
|
341
340
|
name: 'a_tex',
|
|
342
341
|
buffer: {
|
|
343
|
-
// give the WebGL driver a hint that this buffer may change
|
|
344
342
|
usage: gl.DYNAMIC_DRAW,
|
|
345
343
|
data: [],
|
|
346
344
|
type: gl.FLOAT
|
|
347
345
|
},
|
|
348
346
|
size: 2,
|
|
349
|
-
update: function update(feature, featureIdx, vertex
|
|
347
|
+
update: function update(feature, featureIdx, vertex) {
|
|
350
348
|
return [vertex[3], vertex[4]];
|
|
351
349
|
}
|
|
352
350
|
}
|
|
@@ -443,7 +441,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
443
441
|
value: function generateGlyphLayout(iconfont) {
|
|
444
442
|
var _this2 = this;
|
|
445
443
|
|
|
446
|
-
//
|
|
444
|
+
// 更新文字布局
|
|
447
445
|
var mapping = this.fontService.mapping;
|
|
448
446
|
|
|
449
447
|
var _ref8 = this.layer.getLayerConfig(),
|
|
@@ -531,7 +529,6 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
531
529
|
box = _collisionIndex$place.box;
|
|
532
530
|
|
|
533
531
|
if (box && box.length) {
|
|
534
|
-
// TODO:featureIndex
|
|
535
532
|
collisionIndex.insertCollisionBox(box, id);
|
|
536
533
|
return true;
|
|
537
534
|
} else {
|
|
@@ -608,7 +605,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
608
605
|
}).then(function (model) {
|
|
609
606
|
_this4.layer.models = [model];
|
|
610
607
|
|
|
611
|
-
_this4.
|
|
608
|
+
_this4.layerService.throttleRenderLayers();
|
|
612
609
|
}).catch(function (err) {
|
|
613
610
|
console.warn(err);
|
|
614
611
|
_this4.layer.models = [];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { IAttribute, IElements, IModel, IModelUniform } from '@antv/l7-core';
|
|
2
2
|
import BaseModel from '../../core/BaseModel';
|
|
3
3
|
export default class FillModel extends BaseModel {
|
|
4
|
-
meter2coord: number;
|
|
5
|
-
private isMeter;
|
|
6
4
|
getUninforms(): IModelUniform;
|
|
7
5
|
getAttribute(): {
|
|
8
6
|
attributes: {
|
|
@@ -11,11 +9,6 @@ export default class FillModel extends BaseModel {
|
|
|
11
9
|
elements: IElements;
|
|
12
10
|
};
|
|
13
11
|
initModels(callbackModel: (models: IModel[]) => void): void;
|
|
14
|
-
/**
|
|
15
|
-
* 计算等面积点图层(unit meter)笛卡尔坐标标度与世界坐标标度的比例
|
|
16
|
-
* @returns
|
|
17
|
-
*/
|
|
18
|
-
calMeter2Coord(): void;
|
|
19
12
|
buildModels(callbackModel: (models: IModel[]) => void): void;
|
|
20
13
|
clearModels(): void;
|
|
21
14
|
protected registerBuiltinAttributes(): void;
|