@antv/l7-layers 2.9.27-alpha.1 → 2.9.27-alpha.3
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.d.ts +13 -0
- package/es/Geometry/index.js +20 -2
- package/es/Geometry/models/billboard.js +1 -2
- package/es/Geometry/models/plane.js +2 -4
- package/es/Geometry/models/sprite.js +2 -4
- 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 +17 -6
- package/es/core/BaseLayer.js +89 -94
- package/es/core/BaseModel.d.ts +1 -1
- package/es/core/BaseModel.js +7 -3
- package/es/core/interface.d.ts +18 -0
- package/es/core/triangulation.d.ts +6 -0
- package/es/core/triangulation.js +64 -2
- package/es/earth/index.d.ts +5 -0
- package/es/earth/index.js +12 -1
- package/es/earth/models/base.js +2 -4
- package/es/earth/shaders/atmosphere_frag.glsl +1 -1
- package/es/earth/shaders/bloomsphere_frag.glsl +1 -1
- package/es/heatmap/index.js +6 -2
- package/es/heatmap/models/heatmap.js +5 -3
- package/es/image/index.js +6 -2
- package/es/image/models/dataImage.js +4 -7
- package/es/image/models/image.js +4 -7
- package/es/line/index.d.ts +1 -0
- package/es/line/index.js +8 -2
- package/es/line/models/arc.js +6 -5
- package/es/line/models/half.js +3 -4
- package/es/line/models/line.js +9 -8
- package/es/line/models/simpleLine.js +2 -1
- 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 +49 -222
- package/es/line/models/wall.js +10 -46
- 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 +1 -1
- package/es/line/shaders/line_arc_3d_frag.glsl +1 -1
- package/es/line/shaders/line_arc_3d_vert.glsl +3 -3
- package/es/line/shaders/line_arc_frag.glsl +1 -1
- package/es/line/shaders/line_arc_great_circle_frag.glsl +1 -1
- package/es/line/shaders/line_arc_great_circle_vert.glsl +1 -1
- package/es/line/shaders/line_arc_vert.glsl +5 -3
- package/es/line/shaders/line_bezier_vert.glsl +1 -1
- package/es/line/shaders/line_frag.glsl +1 -2
- package/es/line/shaders/line_vert.glsl +1 -1
- package/es/line/shaders/linear/arc3d_linear_frag.glsl +1 -1
- package/es/line/shaders/linear/arc3d_linear_vert.glsl +3 -3
- 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} +17 -21
- 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 +6 -2
- package/es/point/models/fill.js +2 -2
- package/es/point/models/fillmage.js +1 -1
- package/es/point/models/image.js +1 -1
- package/es/point/models/normal.d.ts +0 -1
- package/es/point/models/normal.js +9 -60
- package/es/point/models/radar.js +4 -69
- package/es/point/models/simplePoint.d.ts +0 -1
- package/es/point/models/simplePoint.js +2 -11
- package/es/point/models/text.js +6 -7
- package/es/point/models/tile.d.ts +0 -7
- package/es/point/models/tile.js +22 -155
- package/es/point/models/tileText.d.ts +0 -4
- package/es/point/models/tileText.js +98 -185
- package/es/point/shaders/animate/wave_frag.glsl +3 -3
- 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 +1 -3
- 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.js +3 -2
- 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 +2 -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 +19 -2
- package/lib/Geometry/models/billboard.js +1 -2
- package/lib/Geometry/models/plane.js +2 -4
- package/lib/Geometry/models/sprite.js +2 -4
- 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 +86 -94
- package/lib/core/BaseModel.js +7 -3
- package/lib/core/triangulation.js +66 -2
- package/lib/earth/index.js +11 -1
- package/lib/earth/models/base.js +2 -4
- package/lib/earth/shaders/atmosphere_frag.glsl +1 -1
- package/lib/earth/shaders/bloomsphere_frag.glsl +1 -1
- package/lib/heatmap/index.js +6 -2
- package/lib/heatmap/models/heatmap.js +5 -3
- package/lib/image/index.js +6 -2
- package/lib/image/models/dataImage.js +4 -7
- package/lib/image/models/image.js +4 -7
- package/lib/line/index.js +7 -2
- package/lib/line/models/arc.js +6 -5
- package/lib/line/models/half.js +3 -4
- package/lib/line/models/line.js +9 -8
- package/lib/line/models/simpleLine.js +2 -1
- package/lib/line/models/simpleTileLine.js +115 -0
- package/lib/line/models/tile.js +49 -223
- package/lib/line/models/wall.js +10 -46
- 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 +1 -1
- package/lib/line/shaders/line_arc_3d_frag.glsl +1 -1
- package/lib/line/shaders/line_arc_3d_vert.glsl +3 -3
- package/lib/line/shaders/line_arc_frag.glsl +1 -1
- package/lib/line/shaders/line_arc_great_circle_frag.glsl +1 -1
- package/lib/line/shaders/line_arc_great_circle_vert.glsl +1 -1
- package/lib/line/shaders/line_arc_vert.glsl +5 -3
- package/lib/line/shaders/line_bezier_vert.glsl +1 -1
- package/lib/line/shaders/line_frag.glsl +1 -2
- package/lib/line/shaders/line_vert.glsl +1 -1
- package/lib/line/shaders/linear/arc3d_linear_frag.glsl +1 -1
- package/lib/line/shaders/linear/arc3d_linear_vert.glsl +3 -3
- 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} +17 -21
- 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 +6 -2
- package/lib/point/models/fill.js +2 -2
- package/lib/point/models/fillmage.js +1 -1
- package/lib/point/models/image.js +1 -1
- package/lib/point/models/normal.js +8 -59
- package/lib/point/models/radar.js +4 -69
- package/lib/point/models/simplePoint.js +1 -10
- package/lib/point/models/text.js +6 -7
- package/lib/point/models/tile.js +21 -156
- package/lib/point/models/tileText.js +97 -184
- package/lib/point/shaders/animate/wave_frag.glsl +3 -3
- 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 +1 -3
- 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 +3 -2
- 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 +2 -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
|
@@ -170,20 +170,18 @@ var SimplePointModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
170
170
|
}, {
|
|
171
171
|
key: "registerBuiltinAttributes",
|
|
172
172
|
value: function registerBuiltinAttributes() {
|
|
173
|
-
// point layer size;
|
|
174
173
|
this.styleAttributeService.registerStyleAttribute({
|
|
175
174
|
name: 'size',
|
|
176
175
|
type: _l7Core.AttributeType.Attribute,
|
|
177
176
|
descriptor: {
|
|
178
177
|
name: 'a_Size',
|
|
179
178
|
buffer: {
|
|
180
|
-
// give the WebGL driver a hint that this buffer may change
|
|
181
179
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
182
180
|
data: [],
|
|
183
181
|
type: _l7Core.gl.FLOAT
|
|
184
182
|
},
|
|
185
183
|
size: 1,
|
|
186
|
-
update: function update(feature
|
|
184
|
+
update: function update(feature) {
|
|
187
185
|
var _feature$size = feature.size,
|
|
188
186
|
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
189
187
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -191,13 +189,6 @@ var SimplePointModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
191
189
|
}
|
|
192
190
|
});
|
|
193
191
|
}
|
|
194
|
-
}, {
|
|
195
|
-
key: "defaultStyleOptions",
|
|
196
|
-
value: function defaultStyleOptions() {
|
|
197
|
-
return {
|
|
198
|
-
blend: _l7Core.BlendType.additive
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
192
|
}]);
|
|
202
193
|
return SimplePointModel;
|
|
203
194
|
}(_BaseModel2.default);
|
package/lib/point/models/text.js
CHANGED
|
@@ -305,7 +305,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
305
305
|
type: _l7Core.gl.FLOAT
|
|
306
306
|
},
|
|
307
307
|
size: 1,
|
|
308
|
-
update: function update(feature
|
|
308
|
+
update: function update(feature) {
|
|
309
309
|
var _feature$rotate = feature.rotate,
|
|
310
310
|
rotate = _feature$rotate === void 0 ? 0 : _feature$rotate;
|
|
311
311
|
return Array.isArray(rotate) ? [rotate[0]] : [rotate];
|
|
@@ -324,7 +324,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
324
324
|
type: _l7Core.gl.FLOAT
|
|
325
325
|
},
|
|
326
326
|
size: 2,
|
|
327
|
-
update: function update(feature, featureIdx, vertex
|
|
327
|
+
update: function update(feature, featureIdx, vertex) {
|
|
328
328
|
return [vertex[5], vertex[6]];
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -342,7 +342,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
342
342
|
type: _l7Core.gl.FLOAT
|
|
343
343
|
},
|
|
344
344
|
size: 1,
|
|
345
|
-
update: function update(feature
|
|
345
|
+
update: function update(feature) {
|
|
346
346
|
var _feature$size = feature.size,
|
|
347
347
|
size = _feature$size === void 0 ? 12 : _feature$size;
|
|
348
348
|
return Array.isArray(size) ? [size[0]] : [size];
|
|
@@ -362,7 +362,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
362
362
|
type: _l7Core.gl.FLOAT
|
|
363
363
|
},
|
|
364
364
|
size: 2,
|
|
365
|
-
update: function update(feature, featureIdx, vertex
|
|
365
|
+
update: function update(feature, featureIdx, vertex) {
|
|
366
366
|
return [vertex[3], vertex[4]];
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -459,7 +459,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
459
459
|
value: function generateGlyphLayout(iconfont) {
|
|
460
460
|
var _this2 = this;
|
|
461
461
|
|
|
462
|
-
//
|
|
462
|
+
// 更新文字布局
|
|
463
463
|
var mapping = this.fontService.mapping;
|
|
464
464
|
|
|
465
465
|
var _ref8 = this.layer.getLayerConfig(),
|
|
@@ -547,7 +547,6 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
547
547
|
box = _collisionIndex$place.box;
|
|
548
548
|
|
|
549
549
|
if (box && box.length) {
|
|
550
|
-
// TODO:featureIndex
|
|
551
550
|
collisionIndex.insertCollisionBox(box, id);
|
|
552
551
|
return true;
|
|
553
552
|
} else {
|
|
@@ -624,7 +623,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
624
623
|
}).then(function (model) {
|
|
625
624
|
_this4.layer.models = [model];
|
|
626
625
|
|
|
627
|
-
_this4.
|
|
626
|
+
_this4.layerService.throttleRenderLayers();
|
|
628
627
|
}).catch(function (err) {
|
|
629
628
|
console.warn(err);
|
|
630
629
|
_this4.layer.models = [];
|
package/lib/point/models/tile.js
CHANGED
|
@@ -7,22 +7,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
|
|
12
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
11
|
|
|
14
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
13
|
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
15
|
|
|
20
16
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
17
|
|
|
22
18
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
19
|
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
20
|
var _l7Core = require("@antv/l7-core");
|
|
27
21
|
|
|
28
22
|
var _l7Utils = require("@antv/l7-utils");
|
|
@@ -31,17 +25,15 @@ var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
|
|
|
31
25
|
|
|
32
26
|
var _triangulation = require("../../core/triangulation");
|
|
33
27
|
|
|
34
|
-
var _l7Maps = require("@antv/l7-maps");
|
|
35
|
-
|
|
36
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
29
|
|
|
38
30
|
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; } }
|
|
39
31
|
|
|
40
32
|
/* babel-plugin-inline-import '../shaders/tile/fill_tile_frag.glsl' */
|
|
41
|
-
var point_tile_frag = "uniform float u_additive;\
|
|
33
|
+
var point_tile_frag = "uniform float u_additive;\n\nuniform float u_opacity : 1;\nuniform float u_stroke_opacity : 1;\nuniform float u_stroke_width : 2;\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\n\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\nvoid main() {\n int shape = int(floor(v_data.w + 0.5));\n\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius + u_stroke_width);\n\n float outer_df;\n float inner_df;\n // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\n if (shape == 0) {\n outer_df = sdCircle(v_data.xy, 1.0);\n inner_df = sdCircle(v_data.xy, r);\n } else if (shape == 1) {\n outer_df = sdEquilateralTriangle(1.1 * v_data.xy);\n inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);\n } else if (shape == 2) {\n outer_df = sdBox(v_data.xy, vec2(1.));\n inner_df = sdBox(v_data.xy, vec2(r));\n } else if (shape == 3) {\n outer_df = sdPentagon(v_data.xy, 0.8);\n inner_df = sdPentagon(v_data.xy, r * 0.8);\n } else if (shape == 4) {\n outer_df = sdHexagon(v_data.xy, 0.8);\n inner_df = sdHexagon(v_data.xy, r * 0.8);\n } else if (shape == 5) {\n outer_df = sdOctogon(v_data.xy, 1.0);\n inner_df = sdOctogon(v_data.xy, r);\n } else if (shape == 6) {\n outer_df = sdHexagram(v_data.xy, 0.52);\n inner_df = sdHexagram(v_data.xy, r * 0.52);\n } else if (shape == 7) {\n outer_df = sdRhombus(v_data.xy, vec2(1.0));\n inner_df = sdRhombus(v_data.xy, vec2(r));\n } else if (shape == 8) {\n outer_df = sdVesica(v_data.xy, 1.1, 0.8);\n inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);\n }\n\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiasblur,\n 0.0,\n inner_df\n );\n\n if(u_stroke_width < 0.01) {\n gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);\n } else {\n gl_FragColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), u_stroke_color * u_stroke_opacity, color_t);\n }\n\n if(u_additive > 0.0) {\n gl_FragColor *= opacity_t;\n gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\n } else {\n gl_FragColor.a *= opacity_t;\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n";
|
|
42
34
|
|
|
43
35
|
/* babel-plugin-inline-import '../shaders/tile/fill_tile_vert.glsl' */
|
|
44
|
-
var point_tile_vert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nattribute float a_Shape;\n\
|
|
36
|
+
var point_tile_vert = "attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nattribute float a_Shape;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\n// uniform vec2 u_tileOrigin;\n// uniform float u_coord;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\n\nuniform float u_opacity : 1;\nuniform float u_stroke_opacity : 1;\nuniform float u_stroke_width : 2;\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\nvoid main() {\n vec3 extrude = a_Extrude;\n float shape_type = a_Shape;\n float newSize = setPickingSize(a_Size);\n\n // cal style mapping\n\n v_color = a_Color;\n v_radius = newSize;\n\n // anti-alias\n // float antialiased_blur = -max(u_blur, antialiasblur);\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, 0.0);\n\n vec2 offset = (extrude.xy * (newSize + u_stroke_width));\n offset = project_pixel(offset);\n\n v_data = vec4(extrude.x, extrude.y, antialiasblur,shape_type);\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n }\n\n// if(u_coord > 0.0) {\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, 0.0, 1.0));\n }\n// } else {\n\n // vec2 pointPos = a_Position.xy;\n // vec4 world = vec4(project_mvt_offset_position(vec4(u_tileOrigin, 0.0, 1.0)).xyz, 1.0); // \u74E6\u7247\u8D77\u59CB\u70B9\u7684\u4E16\u754C\u5750\u6807\n\n // vec2 pointOffset = pointPos * pow(2.0, u_Zoom); // \u74E6\u7247\u5185\u7684\u70B9\u7684\u504F\u79FB\u5750\u6807\n \n // world.xy += offset;\n // world.xy += pointOffset;\n\n // if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // // Needs to be divided with project_uCommonUnitsPerMeter\n // world.w *= u_PixelsPerMeter.z;\n // }\n\n // gl_Position = u_ViewProjectionMatrix * world + u_ViewportCenterProjection;\n// }\n\n \n setPickingColor(a_PickingColor);\n\n\n}\n";
|
|
45
37
|
|
|
46
38
|
var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
47
39
|
(0, _inherits2.default)(FillModel, _BaseModel);
|
|
@@ -49,18 +41,8 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
49
41
|
var _super = _createSuper(FillModel);
|
|
50
42
|
|
|
51
43
|
function FillModel() {
|
|
52
|
-
var _this;
|
|
53
|
-
|
|
54
44
|
(0, _classCallCheck2.default)(this, FillModel);
|
|
55
|
-
|
|
56
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
57
|
-
args[_key] = arguments[_key];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
61
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meter2coord", 1);
|
|
62
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isMeter", false);
|
|
63
|
-
return _this;
|
|
45
|
+
return _super.apply(this, arguments);
|
|
64
46
|
}
|
|
65
47
|
|
|
66
48
|
(0, _createClass2.default)(FillModel, [{
|
|
@@ -75,70 +57,16 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
75
57
|
strokeWidth = _ref$strokeWidth === void 0 ? 0 : _ref$strokeWidth,
|
|
76
58
|
_ref$stroke = _ref.stroke,
|
|
77
59
|
stroke = _ref$stroke === void 0 ? 'rgba(0,0,0,0)' : _ref$stroke,
|
|
78
|
-
|
|
79
|
-
offsets = _ref$offsets === void 0 ? [0, 0] : _ref$offsets,
|
|
80
|
-
blend = _ref.blend,
|
|
81
|
-
_ref$blur = _ref.blur,
|
|
82
|
-
blur = _ref$blur === void 0 ? 0 : _ref$blur,
|
|
83
|
-
_ref$coord = _ref.coord,
|
|
84
|
-
coord = _ref$coord === void 0 ? 'lnglat' : _ref$coord,
|
|
85
|
-
tileOrigin = _ref.tileOrigin;
|
|
86
|
-
|
|
87
|
-
if (this.dataTextureTest && this.dataTextureNeedUpdate({
|
|
88
|
-
opacity: opacity,
|
|
89
|
-
strokeOpacity: strokeOpacity,
|
|
90
|
-
strokeWidth: strokeWidth,
|
|
91
|
-
stroke: stroke,
|
|
92
|
-
offsets: offsets
|
|
93
|
-
})) {
|
|
94
|
-
// 判断当前的样式中哪些是需要进行数据映射的,哪些是常量,同时计算用于构建数据纹理的一些中间变量
|
|
95
|
-
this.judgeStyleAttributes({
|
|
96
|
-
opacity: opacity,
|
|
97
|
-
strokeOpacity: strokeOpacity,
|
|
98
|
-
strokeWidth: strokeWidth,
|
|
99
|
-
stroke: stroke,
|
|
100
|
-
offsets: offsets
|
|
101
|
-
});
|
|
102
|
-
var encodeData = this.layer.getEncodedData();
|
|
103
|
-
|
|
104
|
-
var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
|
|
105
|
-
data = _this$calDataFrame.data,
|
|
106
|
-
width = _this$calDataFrame.width,
|
|
107
|
-
height = _this$calDataFrame.height;
|
|
108
|
-
|
|
109
|
-
this.rowCount = height; // 当前数据纹理有多少行
|
|
110
|
-
|
|
111
|
-
this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
|
|
112
|
-
flipY: true,
|
|
113
|
-
data: data,
|
|
114
|
-
format: _l7Core.gl.LUMINANCE,
|
|
115
|
-
type: _l7Core.gl.FLOAT,
|
|
116
|
-
width: width,
|
|
117
|
-
height: height
|
|
118
|
-
}) : this.createTexture2D({
|
|
119
|
-
flipY: true,
|
|
120
|
-
data: [1],
|
|
121
|
-
format: _l7Core.gl.LUMINANCE,
|
|
122
|
-
type: _l7Core.gl.FLOAT,
|
|
123
|
-
width: 1,
|
|
124
|
-
height: 1
|
|
125
|
-
});
|
|
126
|
-
}
|
|
60
|
+
blend = _ref.blend;
|
|
127
61
|
|
|
128
62
|
return {
|
|
129
|
-
u_tileOrigin: tileOrigin || [0, 0],
|
|
130
|
-
u_coord: coord === 'lnglat' ? 1.0 : 0.0,
|
|
131
|
-
u_isMeter: Number(this.isMeter),
|
|
132
|
-
u_blur: blur,
|
|
63
|
+
// u_tileOrigin: tileOrigin || [0, 0],
|
|
64
|
+
// u_coord: coord === 'lnglat' ? 1.0 : 0.0,
|
|
133
65
|
u_additive: blend === 'additive' ? 1.0 : 0.0,
|
|
134
|
-
u_dataTexture: this.dataTexture,
|
|
135
|
-
// 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
|
|
136
|
-
u_cellTypeLayout: this.getCellTypeLayout(),
|
|
137
66
|
u_opacity: Number(opacity),
|
|
138
67
|
u_stroke_opacity: Number(strokeOpacity),
|
|
139
68
|
u_stroke_width: Number(strokeWidth),
|
|
140
|
-
u_stroke_color: this.getStrokeColor(stroke)
|
|
141
|
-
u_offsets: this.isOffsetStatic(offsets) ? offsets : [0, 0]
|
|
69
|
+
u_stroke_color: this.getStrokeColor(stroke)
|
|
142
70
|
};
|
|
143
71
|
}
|
|
144
72
|
}, {
|
|
@@ -149,74 +77,19 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
149
77
|
}, {
|
|
150
78
|
key: "initModels",
|
|
151
79
|
value: function initModels(callbackModel) {
|
|
152
|
-
var _ref2 = this.layer.getLayerConfig(),
|
|
153
|
-
_ref2$unit = _ref2.unit,
|
|
154
|
-
unit = _ref2$unit === void 0 ? 'l7size' : _ref2$unit;
|
|
155
|
-
|
|
156
|
-
var version = this.mapService.version;
|
|
157
|
-
|
|
158
|
-
if (unit === 'meter' && version !== _l7Maps.Version.L7MAP && version !== _l7Maps.Version.GLOBEL) {
|
|
159
|
-
this.isMeter = true;
|
|
160
|
-
this.calMeter2Coord();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
80
|
this.buildModels(callbackModel);
|
|
164
81
|
}
|
|
165
|
-
/**
|
|
166
|
-
* 计算等面积点图层(unit meter)笛卡尔坐标标度与世界坐标标度的比例
|
|
167
|
-
* @returns
|
|
168
|
-
*/
|
|
169
|
-
|
|
170
|
-
}, {
|
|
171
|
-
key: "calMeter2Coord",
|
|
172
|
-
value: function calMeter2Coord() {
|
|
173
|
-
var _this$layer$getSource = (0, _slicedToArray2.default)(this.layer.getSource().extent, 4),
|
|
174
|
-
minLng = _this$layer$getSource[0],
|
|
175
|
-
minLat = _this$layer$getSource[1],
|
|
176
|
-
maxLng = _this$layer$getSource[2],
|
|
177
|
-
maxLat = _this$layer$getSource[3];
|
|
178
|
-
|
|
179
|
-
var center = [(minLng + maxLng) / 2, (minLat + maxLat) / 2];
|
|
180
|
-
var version = this.mapService.version;
|
|
181
|
-
|
|
182
|
-
if (version === _l7Maps.Version.MAPBOX && window.mapboxgl.MercatorCoordinate) {
|
|
183
|
-
var coord = window.mapboxgl.MercatorCoordinate.fromLngLat({
|
|
184
|
-
lng: center[0],
|
|
185
|
-
lat: center[1]
|
|
186
|
-
}, 0);
|
|
187
|
-
var offsetInMeters = 1;
|
|
188
|
-
var offsetInMercatorCoordinateUnits = offsetInMeters * coord.meterInMercatorCoordinateUnits();
|
|
189
|
-
var westCoord = new window.mapboxgl.MercatorCoordinate(coord.x - offsetInMercatorCoordinateUnits, coord.y, coord.z);
|
|
190
|
-
var westLnglat = westCoord.toLngLat();
|
|
191
|
-
this.meter2coord = center[0] - westLnglat.lng;
|
|
192
|
-
return;
|
|
193
|
-
} // @ts-ignore
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
var m1 = this.mapService.meterToCoord(center, [minLng, minLat]); // @ts-ignore
|
|
197
|
-
|
|
198
|
-
var m2 = this.mapService.meterToCoord(center, [maxLng === minLng ? maxLng + 0.1 : maxLng, maxLat === minLat ? minLat + 0.1 : maxLat]);
|
|
199
|
-
this.meter2coord = (m1 + m2) / 2;
|
|
200
|
-
|
|
201
|
-
if (!this.meter2coord) {
|
|
202
|
-
// Tip: 兼容单个数据导致的 m1、m2 为 NaN
|
|
203
|
-
this.meter2coord = 7.70681090738883;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
82
|
}, {
|
|
207
83
|
key: "buildModels",
|
|
208
84
|
value: function buildModels(callbackModel) {
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
maskInside = _ref3$maskInside === void 0 ? true : _ref3$maskInside,
|
|
214
|
-
_ref3$workerEnabled = _ref3.workerEnabled,
|
|
215
|
-
workerEnabled = _ref3$workerEnabled === void 0 ? false : _ref3$workerEnabled;
|
|
85
|
+
var _ref2 = this.layer.getLayerConfig(),
|
|
86
|
+
_ref2$workerEnabled = _ref2.workerEnabled,
|
|
87
|
+
workerEnabled = _ref2$workerEnabled === void 0 ? false : _ref2$workerEnabled,
|
|
88
|
+
usage = _ref2.usage;
|
|
216
89
|
|
|
217
90
|
this.layer.triangulation = _triangulation.PointFillTriangulation;
|
|
218
91
|
this.layer.buildLayerModel({
|
|
219
|
-
moduleName: '
|
|
92
|
+
moduleName: 'pointTile_' + usage,
|
|
220
93
|
vertexShader: point_tile_vert,
|
|
221
94
|
fragmentShader: point_tile_frag,
|
|
222
95
|
triangulation: _triangulation.PointFillTriangulation,
|
|
@@ -228,11 +101,11 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
228
101
|
face: (0, _l7Utils.getCullFace)(this.mapService.version)
|
|
229
102
|
},
|
|
230
103
|
blend: this.getBlend(),
|
|
231
|
-
stencil: (0, _l7Utils.getMask)(mask, maskInside),
|
|
232
104
|
workerEnabled: workerEnabled,
|
|
233
105
|
workerOptions: {
|
|
234
106
|
modelType: 'pointTile'
|
|
235
|
-
}
|
|
107
|
+
},
|
|
108
|
+
pick: usage !== 'basemap'
|
|
236
109
|
}).then(function (model) {
|
|
237
110
|
callbackModel([model]);
|
|
238
111
|
}).catch(function (err) {
|
|
@@ -242,16 +115,11 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
242
115
|
}
|
|
243
116
|
}, {
|
|
244
117
|
key: "clearModels",
|
|
245
|
-
value: function clearModels() {
|
|
246
|
-
var _this$dataTexture;
|
|
247
|
-
|
|
248
|
-
(_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
|
|
249
|
-
} // overwrite baseModel func
|
|
250
|
-
|
|
118
|
+
value: function clearModels() {}
|
|
251
119
|
}, {
|
|
252
120
|
key: "registerBuiltinAttributes",
|
|
253
121
|
value: function registerBuiltinAttributes() {
|
|
254
|
-
var
|
|
122
|
+
var _this = this;
|
|
255
123
|
|
|
256
124
|
this.styleAttributeService.registerStyleAttribute({
|
|
257
125
|
name: 'extrude',
|
|
@@ -271,8 +139,7 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
271
139
|
return [extrude[extrudeIndex], extrude[extrudeIndex + 1], extrude[extrudeIndex + 2]];
|
|
272
140
|
}
|
|
273
141
|
}
|
|
274
|
-
});
|
|
275
|
-
|
|
142
|
+
});
|
|
276
143
|
this.styleAttributeService.registerStyleAttribute({
|
|
277
144
|
name: 'size',
|
|
278
145
|
type: _l7Core.AttributeType.Attribute,
|
|
@@ -287,13 +154,11 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
287
154
|
size: 1,
|
|
288
155
|
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
289
156
|
var _feature$size = feature.size,
|
|
290
|
-
size = _feature$size === void 0 ? 5 : _feature$size;
|
|
291
|
-
|
|
292
|
-
return Array.isArray(size) ? [size[0] * _this2.meter2coord] : [size * _this2.meter2coord];
|
|
157
|
+
size = _feature$size === void 0 ? 5 : _feature$size;
|
|
158
|
+
return Array.isArray(size) ? [size[0]] : [size];
|
|
293
159
|
}
|
|
294
160
|
}
|
|
295
|
-
});
|
|
296
|
-
|
|
161
|
+
});
|
|
297
162
|
this.styleAttributeService.registerStyleAttribute({
|
|
298
163
|
name: 'shape',
|
|
299
164
|
type: _l7Core.AttributeType.Attribute,
|
|
@@ -310,7 +175,7 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
310
175
|
var _feature$shape = feature.shape,
|
|
311
176
|
shape = _feature$shape === void 0 ? 2 : _feature$shape;
|
|
312
177
|
|
|
313
|
-
var shape2d =
|
|
178
|
+
var shape2d = _this.layer.getLayerConfig().shape2d;
|
|
314
179
|
|
|
315
180
|
var shapeIndex = shape2d.indexOf(shape);
|
|
316
181
|
return [shapeIndex];
|