@antv/l7-layers 2.19.11 → 2.20.1

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.
Files changed (173) hide show
  1. package/es/canvas/models/canvas.js +2 -2
  2. package/es/core/BaseLayer.d.ts +1 -1
  3. package/es/core/BaseLayer.js +18 -11
  4. package/es/core/BaseModel.d.ts +3 -1
  5. package/es/core/BaseModel.js +28 -4
  6. package/es/core/CommonStyleAttribute.d.ts +15 -0
  7. package/es/core/CommonStyleAttribute.js +21 -0
  8. package/es/core/TextureService.js +2 -2
  9. package/es/earth/index.js +1 -1
  10. package/es/geometry/index.js +1 -1
  11. package/es/geometry/models/billboard.js +1 -1
  12. package/es/geometry/models/plane.js +2 -2
  13. package/es/geometry/models/sprite.js +2 -2
  14. package/es/heatmap/index.js +1 -1
  15. package/es/heatmap/models/heatmap.js +4 -4
  16. package/es/image/models/image.js +1 -1
  17. package/es/line/index.js +1 -1
  18. package/es/line/models/arc.js +1 -1
  19. package/es/line/models/arc_3d.js +1 -1
  20. package/es/line/models/earthArc_3d.js +1 -1
  21. package/es/line/models/great_circle.js +1 -1
  22. package/es/line/models/line.js +1 -1
  23. package/es/line/models/linearline.js +1 -1
  24. package/es/line/models/wall.js +1 -1
  25. package/es/plugins/DataMappingPlugin.js +1 -1
  26. package/es/plugins/PixelPickingPlugin.d.ts +4 -1
  27. package/es/plugins/PixelPickingPlugin.js +91 -22
  28. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -1
  29. package/es/plugins/RegisterStyleAttributePlugin.js +4 -22
  30. package/es/plugins/ShaderUniformPlugin.d.ts +2 -0
  31. package/es/plugins/ShaderUniformPlugin.js +74 -6
  32. package/es/point/index.js +1 -1
  33. package/es/point/models/fill.js +31 -7
  34. package/es/point/models/fillmage.js +1 -1
  35. package/es/point/models/image.js +1 -1
  36. package/es/point/models/normal.js +30 -12
  37. package/es/point/models/text.js +1 -1
  38. package/es/point/shaders/fill_frag.glsl +20 -14
  39. package/es/point/shaders/fill_vert.glsl +19 -18
  40. package/es/point/shaders/normal_frag.glsl +4 -3
  41. package/es/point/shaders/normal_vert.glsl +12 -11
  42. package/es/polygon/index.js +1 -1
  43. package/es/polygon/models/extrude.js +1 -1
  44. package/es/polygon/models/extrusion.js +1 -1
  45. package/es/polygon/models/ocean.js +3 -3
  46. package/es/polygon/models/water.js +1 -1
  47. package/es/raster/models/raster.js +2 -2
  48. package/es/raster/models/rasterRgb.js +1 -1
  49. package/es/raster/models/rasterTerrainRgb.js +1 -1
  50. package/es/tile/core/BaseLayer.js +4 -4
  51. package/es/tile/interaction/getRasterData.js +4 -4
  52. package/es/tile/service/TileLayerService.js +4 -4
  53. package/es/tile/service/TilePickService.js +3 -3
  54. package/es/tile/tile/Tile.d.ts +3 -0
  55. package/es/tile/tile/Tile.js +2 -2
  56. package/es/wind/models/wind.js +5 -6
  57. package/lib/canvas/index.js +2 -3
  58. package/lib/canvas/models/canvas.js +4 -5
  59. package/lib/canvas/models/index.js +1 -2
  60. package/lib/citybuliding/building.js +2 -3
  61. package/lib/citybuliding/models/build.js +2 -3
  62. package/lib/core/BaseLayer.js +19 -13
  63. package/lib/core/BaseModel.js +30 -7
  64. package/lib/core/CommonStyleAttribute.js +22 -0
  65. package/lib/core/LayerPickService.js +2 -3
  66. package/lib/core/TextureService.js +4 -5
  67. package/lib/core/constant.js +3 -5
  68. package/lib/core/interface.js +6 -11
  69. package/lib/core/schema.js +2 -3
  70. package/lib/core/shape/Path.js +3 -6
  71. package/lib/core/triangulation.js +2 -2
  72. package/lib/earth/index.js +3 -4
  73. package/lib/earth/models/atmosphere.js +2 -3
  74. package/lib/earth/models/base.js +2 -3
  75. package/lib/earth/models/bloomsphere.js +2 -3
  76. package/lib/earth/utils.js +3 -6
  77. package/lib/geometry/index.js +3 -4
  78. package/lib/geometry/models/billboard.js +3 -4
  79. package/lib/geometry/models/index.js +1 -2
  80. package/lib/geometry/models/plane.js +4 -5
  81. package/lib/geometry/models/sprite.js +4 -5
  82. package/lib/heatmap/index.js +3 -4
  83. package/lib/heatmap/models/grid.js +2 -3
  84. package/lib/heatmap/models/grid3d.js +2 -3
  85. package/lib/heatmap/models/heatmap.js +6 -7
  86. package/lib/heatmap/models/hexagon.js +2 -3
  87. package/lib/heatmap/models/index.js +1 -2
  88. package/lib/image/index.js +2 -3
  89. package/lib/image/models/image.js +3 -4
  90. package/lib/image/models/index.js +1 -2
  91. package/lib/line/index.js +3 -4
  92. package/lib/line/models/arc.js +3 -4
  93. package/lib/line/models/arc_3d.js +3 -4
  94. package/lib/line/models/earthArc_3d.js +3 -4
  95. package/lib/line/models/flow.js +2 -3
  96. package/lib/line/models/great_circle.js +3 -4
  97. package/lib/line/models/index.js +1 -2
  98. package/lib/line/models/line.js +3 -4
  99. package/lib/line/models/linearline.js +3 -4
  100. package/lib/line/models/simpleLine.js +2 -3
  101. package/lib/line/models/wall.js +3 -4
  102. package/lib/mask/index.js +2 -3
  103. package/lib/mask/models/fill.js +2 -3
  104. package/lib/mask/models/index.js +1 -2
  105. package/lib/plugins/DataMappingPlugin.js +3 -4
  106. package/lib/plugins/DataSourcePlugin.js +2 -3
  107. package/lib/plugins/FeatureScalePlugin.js +4 -5
  108. package/lib/plugins/LayerAnimateStylePlugin.js +2 -3
  109. package/lib/plugins/LayerMaskPlugin.js +2 -3
  110. package/lib/plugins/LayerModelPlugin.js +2 -3
  111. package/lib/plugins/LayerStylePlugin.js +2 -3
  112. package/lib/plugins/LightingPlugin.js +2 -3
  113. package/lib/plugins/MultiPassRendererPlugin.js +2 -3
  114. package/lib/plugins/PixelPickingPlugin.js +93 -25
  115. package/lib/plugins/RegisterStyleAttributePlugin.js +6 -25
  116. package/lib/plugins/ShaderUniformPlugin.js +75 -8
  117. package/lib/plugins/UpdateModelPlugin.js +2 -3
  118. package/lib/plugins/UpdateStyleAttributePlugin.js +2 -3
  119. package/lib/point/index.js +3 -4
  120. package/lib/point/models/billboard_point.js +2 -3
  121. package/lib/point/models/earthExtrude.js +2 -3
  122. package/lib/point/models/earthFill.js +2 -3
  123. package/lib/point/models/extrude.js +2 -3
  124. package/lib/point/models/fill.js +33 -10
  125. package/lib/point/models/fillmage.js +3 -4
  126. package/lib/point/models/image.js +3 -4
  127. package/lib/point/models/index.js +1 -2
  128. package/lib/point/models/normal.js +32 -15
  129. package/lib/point/models/radar.js +2 -3
  130. package/lib/point/models/text.js +3 -4
  131. package/lib/point/shaders/fill_frag.glsl +20 -14
  132. package/lib/point/shaders/fill_vert.glsl +19 -18
  133. package/lib/point/shaders/normal_frag.glsl +4 -3
  134. package/lib/point/shaders/normal_vert.glsl +12 -11
  135. package/lib/polygon/index.js +3 -4
  136. package/lib/polygon/models/extrude.js +3 -4
  137. package/lib/polygon/models/extrusion.js +3 -4
  138. package/lib/polygon/models/fill.js +2 -3
  139. package/lib/polygon/models/index.js +1 -2
  140. package/lib/polygon/models/ocean.js +5 -6
  141. package/lib/polygon/models/water.js +3 -4
  142. package/lib/raster/index.js +2 -3
  143. package/lib/raster/models/index.js +1 -2
  144. package/lib/raster/models/raster.js +4 -5
  145. package/lib/raster/models/rasterRgb.js +3 -4
  146. package/lib/raster/models/rasterTerrainRgb.js +3 -4
  147. package/lib/tile/core/BaseLayer.js +6 -7
  148. package/lib/tile/core/TileDebugLayer.js +2 -3
  149. package/lib/tile/interaction/getRasterData.js +4 -4
  150. package/lib/tile/service/TileLayerService.js +6 -7
  151. package/lib/tile/service/TilePickService.js +5 -6
  152. package/lib/tile/service/TileSourceService.js +4 -5
  153. package/lib/tile/tile/DebugTile.js +2 -3
  154. package/lib/tile/tile/ImageTile.js +2 -3
  155. package/lib/tile/tile/MaskTile.js +2 -3
  156. package/lib/tile/tile/RasterRGBTile.js +2 -3
  157. package/lib/tile/tile/RasterTerrainRGBTile.js +2 -3
  158. package/lib/tile/tile/RasterTile.js +2 -3
  159. package/lib/tile/tile/Tile.js +4 -5
  160. package/lib/tile/tile/VectorTile.js +2 -3
  161. package/lib/tile/utils/constants.js +2 -3
  162. package/lib/tile/utils/utils.js +1 -2
  163. package/lib/utils/blend.js +2 -3
  164. package/lib/utils/collision-index.js +2 -3
  165. package/lib/utils/extrude_polyline.js +2 -3
  166. package/lib/utils/grid-index.js +1 -2
  167. package/lib/utils/simpleLine.js +2 -3
  168. package/lib/wind/index.js +2 -3
  169. package/lib/wind/models/index.js +1 -2
  170. package/lib/wind/models/wind.js +7 -9
  171. package/lib/wind/models/windRender.js +4 -5
  172. package/lib/wind/models/windShader.js +6 -12
  173. package/package.json +7 -7
@@ -104,7 +104,7 @@ var CanvaModel = /*#__PURE__*/function (_BaseModel) {
104
104
  value: function clearModels() {
105
105
  if (this.canvas) {
106
106
  var _this$mapService$getC;
107
- (_this$mapService$getC = this.mapService.getContainer()) === null || _this$mapService$getC === void 0 ? void 0 : _this$mapService$getC.removeChild(this.canvas);
107
+ (_this$mapService$getC = this.mapService.getContainer()) === null || _this$mapService$getC === void 0 || _this$mapService$getC.removeChild(this.canvas);
108
108
  // @ts-ignore
109
109
  this.canvas = null;
110
110
  }
@@ -161,7 +161,7 @@ var CanvaModel = /*#__PURE__*/function (_BaseModel) {
161
161
  canvas.style.top = '0';
162
162
  canvas.style.left = '0';
163
163
  canvas.style.zIndex = zIndex + '';
164
- (_this$mapService$getC2 = this.mapService.getContainer()) === null || _this$mapService$getC2 === void 0 ? void 0 : _this$mapService$getC2.appendChild(canvas);
164
+ (_this$mapService$getC2 = this.mapService.getContainer()) === null || _this$mapService$getC2 === void 0 || _this$mapService$getC2.appendChild(canvas);
165
165
  var ctx = canvas.getContext('2d');
166
166
  this.ctx = ctx;
167
167
  }
@@ -1,5 +1,5 @@
1
1
  import { AsyncSeriesBailHook, AsyncWaterfallHook, SyncBailHook, SyncHook } from '@antv/async-hook';
2
- import { BlendType, IActiveOption, IAnimateOption, IAttributeAndElements, ICameraService, ICoordinateSystemService, IDataState, IDebugService, IEncodeFeature, IFontService, IGlobalConfigService, IIconService, IInteractionService, ILayer, ILayerAttributesOption, ILayerConfig, ILayerModel, ILayerModelInitializationOptions, ILayerPickService, ILayerPlugin, ILayerService, ILegend, IMapService, IModel, IModelInitializationOptions, IMultiPassRenderer, IParseDataItem, IPass, IPickingService, IPostProcessingPass, IRendererService, IRenderOptions, IScale, IScaleOptions, IShaderModuleService, ISourceCFG, IStyleAttributeService, IStyleAttributeUpdateOptions, ITextureService, LayerEventType, LegendItems, StyleAttributeField, StyleAttributeOption, Triangulation } from '@antv/l7-core';
2
+ import { BlendType, IActiveOption, IAnimateOption, IAttributeAndElements, ICameraService, ICoordinateSystemService, IDataState, IDebugService, IEncodeFeature, IFontService, IGlobalConfigService, IIconService, IInteractionService, ILayer, ILayerAttributesOption, ILayerConfig, ILayerModel, ILayerModelInitializationOptions, ILayerPickService, ILayerPlugin, ILayerService, ILegend, IMapService, IModel, IModelInitializationOptions, IMultiPassRenderer, IParseDataItem, IPass, IPickingService, IPostProcessingPass, IRenderOptions, IRendererService, IScale, IScaleOptions, IShaderModuleService, ISourceCFG, IStyleAttributeService, IStyleAttributeUpdateOptions, ITextureService, LayerEventType, LegendItems, StyleAttributeField, StyleAttributeOption, Triangulation } from '@antv/l7-core';
3
3
  import Source from '@antv/l7-source';
4
4
  import { EventEmitter } from 'eventemitter3';
5
5
  import { Container } from 'inversify';
@@ -23,7 +23,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
23
23
  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; } }
24
24
  // @ts-ignore
25
25
  import { AsyncSeriesBailHook, AsyncWaterfallHook, SyncBailHook, SyncHook } from '@antv/async-hook';
26
- import { BlendType, IDebugLog, ILayerStage, lazyInject, TYPES } from '@antv/l7-core';
26
+ import { BlendType, IDebugLog, ILayerStage, TYPES, lazyInject } from '@antv/l7-core';
27
27
  import Source from '@antv/l7-source';
28
28
  import { encodePickingColor, lodashUtil } from '@antv/l7-utils';
29
29
  import { EventEmitter } from 'eventemitter3';
@@ -375,7 +375,7 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
375
375
  id: this.id,
376
376
  type: this.type
377
377
  };
378
- (_this$debugService = this.debugService) === null || _this$debugService === void 0 ? void 0 : _this$debugService.log(key, values);
378
+ (_this$debugService = this.debugService) === null || _this$debugService === void 0 || _this$debugService.log(key, values);
379
379
  }
380
380
  }, {
381
381
  key: "updateModelData",
@@ -951,6 +951,12 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
951
951
  if (this.isDestroyed) {
952
952
  return;
953
953
  }
954
+
955
+ // destroy all UBOs
956
+ this.layerModel.uniformBuffers.forEach(function (buffer) {
957
+ buffer.destroy();
958
+ });
959
+
954
960
  // remove child layer
955
961
  this.layerChildren.map(function (child) {
956
962
  return child.destroy(false);
@@ -969,7 +975,7 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
969
975
  this.hooks.beforeDestroy.call();
970
976
  // 清除sources事件
971
977
  this.layerSource.off('update', this.sourceEvent);
972
- (_this$multiPassRender = this.multiPassRenderer) === null || _this$multiPassRender === void 0 ? void 0 : _this$multiPassRender.destroy();
978
+ (_this$multiPassRender = this.multiPassRenderer) === null || _this$multiPassRender === void 0 || _this$multiPassRender.destroy();
973
979
  this.textureService.destroy();
974
980
 
975
981
  // 清除所有属性以及关联的 vao == 销毁所有 => model this.models.forEach((model) => model.destroy());
@@ -979,11 +985,11 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
979
985
 
980
986
  this.hooks.afterDestroy.call();
981
987
  // Tip: 清除各个图层自定义的 models 资源
982
- (_this$layerModel = this.layerModel) === null || _this$layerModel === void 0 ? void 0 : _this$layerModel.clearModels(refresh);
983
- (_this$tileLayer = this.tileLayer) === null || _this$tileLayer === void 0 ? void 0 : _this$tileLayer.destroy();
988
+ (_this$layerModel = this.layerModel) === null || _this$layerModel === void 0 || _this$layerModel.clearModels(refresh);
989
+ (_this$tileLayer = this.tileLayer) === null || _this$tileLayer === void 0 || _this$tileLayer.destroy();
984
990
  this.models = [];
985
991
  // 清除图层日志(如果有的话:非瓦片相关)
986
- (_this$debugService2 = this.debugService) === null || _this$debugService2 === void 0 ? void 0 : _this$debugService2.removeLog(this.id);
992
+ (_this$debugService2 = this.debugService) === null || _this$debugService2 === void 0 || _this$debugService2.removeLog(this.id);
987
993
  this.emit('remove', {
988
994
  target: this,
989
995
  type: 'remove'
@@ -1010,7 +1016,7 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
1010
1016
  this.models.forEach(function (model) {
1011
1017
  return model.destroy();
1012
1018
  });
1013
- (_this$layerModel2 = this.layerModel) === null || _this$layerModel2 === void 0 ? void 0 : _this$layerModel2.clearModels();
1019
+ (_this$layerModel2 = this.layerModel) === null || _this$layerModel2 === void 0 || _this$layerModel2.clearModels();
1014
1020
  this.models = [];
1015
1021
  }
1016
1022
  }, {
@@ -1093,10 +1099,10 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
1093
1099
  value: function getLegend(name) {
1094
1100
  var _attribute$scale, _scales$0$option, _attribute$scale2;
1095
1101
  var attribute = this.styleAttributeService.getLayerStyleAttribute(name);
1096
- var scales = (attribute === null || attribute === void 0 ? void 0 : (_attribute$scale = attribute.scale) === null || _attribute$scale === void 0 ? void 0 : _attribute$scale.scalers) || [];
1102
+ var scales = (attribute === null || attribute === void 0 || (_attribute$scale = attribute.scale) === null || _attribute$scale === void 0 ? void 0 : _attribute$scale.scalers) || [];
1097
1103
  return {
1098
1104
  type: (_scales$0$option = scales[0].option) === null || _scales$0$option === void 0 ? void 0 : _scales$0$option.type,
1099
- field: attribute === null || attribute === void 0 ? void 0 : (_attribute$scale2 = attribute.scale) === null || _attribute$scale2 === void 0 ? void 0 : _attribute$scale2.field,
1105
+ field: attribute === null || attribute === void 0 || (_attribute$scale2 = attribute.scale) === null || _attribute$scale2 === void 0 ? void 0 : _attribute$scale2.field,
1100
1106
  items: this.getLegendItems(name)
1101
1107
  };
1102
1108
  }
@@ -1170,7 +1176,6 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
1170
1176
  _this$shaderModuleSer = this.shaderModuleService.getModule(moduleName), vs = _this$shaderModuleSer.vs, fs = _this$shaderModuleSer.fs, uniforms = _this$shaderModuleSer.uniforms;
1171
1177
  createModel = this.rendererService.createModel;
1172
1178
  return _context3.abrupt("return", new Promise(function (resolve) {
1173
- // console.log(this.encodedData)
1174
1179
  var _this10$styleAttribut = _this10.styleAttributeService.createAttributesAndIndices(_this10.encodedData, triangulation, styleOption),
1175
1180
  attributes = _this10$styleAttribut.attributes,
1176
1181
  elements = _this10$styleAttribut.elements,
@@ -1181,7 +1186,9 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
1181
1186
  fs: fs,
1182
1187
  vs: vs,
1183
1188
  elements: elements,
1184
- blend: BlendTypes[BlendType.normal]
1189
+ blend: BlendTypes[BlendType.normal],
1190
+ uniformBuffers: [].concat(_toConsumableArray(_this10.layerModel.uniformBuffers), _toConsumableArray(_this10.rendererService.uniformBuffers)),
1191
+ textures: _this10.layerModel.textures
1185
1192
  }, rest);
1186
1193
  if (count) {
1187
1194
  modelOptions.count = count;
@@ -1,4 +1,4 @@
1
- import { IAnimateOption, IAttribute, IBlendOptions, ICameraService, IElements, IFontService, IGlobalConfigService, IIconService, IInject, ILayer, ILayerModel, ILayerService, IMapService, IModel, IModelUniform, IPickingService, IRendererService, IRenderOptions, IShaderModuleService, IStencilOptions, IStyleAttributeService, ITexture2D, ITexture2DInitializationOptions, Triangulation } from '@antv/l7-core';
1
+ import { IAnimateOption, IAttribute, IBlendOptions, IBuffer, ICameraService, IElements, IFontService, IGlobalConfigService, IIconService, IInject, ILayer, ILayerModel, ILayerService, IMapService, IModel, IModelUniform, IPickingService, IRendererService, IRenderOptions, IShaderModuleService, IStencilOptions, IStyleAttributeService, ITexture2D, ITexture2DInitializationOptions, Triangulation } from '@antv/l7-core';
2
2
  export type styleSingle = number | string | [string, (single: any) => number] | [string, [number, number]];
3
3
  export type styleOffset = string | [number, number] | [string, (single: any) => number];
4
4
  export type styleColor = string | [string, (single: any) => string] | [string, [string, string]];
@@ -13,6 +13,8 @@ export interface ICellProperty {
13
13
  }
14
14
  export default class BaseModel<ChildLayerStyleOptions = {}> implements ILayerModel {
15
15
  triangulation: Triangulation;
16
+ uniformBuffers: IBuffer[];
17
+ textures: ITexture2D[];
16
18
  createTexture2D: (options: ITexture2DInitializationOptions) => ITexture2D;
17
19
  preStyleAttribute: Record<string, any>;
18
20
  protected encodeStyleAttribute: Record<string, boolean>;
@@ -12,8 +12,16 @@ import { BlendType, lazyInject, MaskOperation, StencilType, TYPES } from '@antv/
12
12
  import { rgb2arr } from '@antv/l7-utils';
13
13
  import { BlendTypes } from "../utils/blend";
14
14
  import { getStencil as _getStencil, getStencilMask } from "../utils/stencil";
15
- import { getCommonStyleAttributeOptions } from "./CommonStyleAttribute";
16
15
  import { DefaultUniformStyleType, DefaultUniformStyleValue } from "./constant";
16
+ import { getCommonStyleAttributeOptions, ShaderLocation } from "./CommonStyleAttribute";
17
+ var shaderLocationMap = {
18
+ opacity: ShaderLocation.OPACITY,
19
+ stroke: ShaderLocation.STROKE,
20
+ offsets: ShaderLocation.OFFSETS,
21
+ rotation: ShaderLocation.ROTATION,
22
+ extrusionBase: ShaderLocation.EXTRUSION_BASE
23
+ };
24
+
17
25
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
26
  var BaseModel = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__PURE__*/function () {
19
27
  // @lazyInject(TYPES.IIconService)
@@ -28,7 +36,8 @@ var BaseModel = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
28
36
 
29
37
  function BaseModel(layer) {
30
38
  _classCallCheck(this, BaseModel);
31
- // style texture data mapping
39
+ _defineProperty(this, "uniformBuffers", []);
40
+ _defineProperty(this, "textures", []);
32
41
  _defineProperty(this, "preStyleAttribute", {});
33
42
  _defineProperty(this, "encodeStyleAttribute", {});
34
43
  _initializerDefineProperty(this, "configService", _descriptor, this);
@@ -208,18 +217,30 @@ var BaseModel = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
208
217
  value: function getInject() {
209
218
  var encodeStyleAttribute = this.layer.encodeStyleAttribute;
210
219
  var str = '';
220
+ // a_Position = 0
221
+ // a_Color = 1
222
+ // a_PickingColor = 2
223
+
224
+ var uniforms = [];
225
+ // 支持数据映射的类型
211
226
  this.layer.enableShaderEncodeStyles.forEach(function (key) {
212
227
  if (encodeStyleAttribute[key]) {
228
+ // 配置了数据映射的类型
213
229
  str += "#define USE_ATTRIBUTE_".concat(key.toUpperCase(), " 0.0; \n\n");
230
+ } else {
231
+ uniforms.push(" ".concat(DefaultUniformStyleType[key], " u_").concat(key, ";"));
214
232
  }
215
- str += "\n #ifdef USE_ATTRIBUTE_".concat(key.toUpperCase(), "\n attribute ").concat(DefaultUniformStyleType[key], " a_").concat(key.charAt(0).toUpperCase() + key.slice(1), ";\n #else\n uniform ").concat(DefaultUniformStyleType[key], " u_").concat(key, ";\n #endif\n\n ");
233
+ str += "\n #ifdef USE_ATTRIBUTE_".concat(key.toUpperCase(), "\n layout(location = ").concat(shaderLocationMap[key], ") in ").concat(DefaultUniformStyleType[key], " a_").concat(key.charAt(0).toUpperCase() + key.slice(1), ";\n #endif\n\n ");
216
234
  });
235
+ var attributeUniforms = uniforms.length ? "\nlayout(std140) uniform AttributeUniforms {\n".concat(uniforms.join('\n'), "\n};\n ") : '';
236
+ str += attributeUniforms;
217
237
  var innerStr = '';
218
238
  this.layer.enableShaderEncodeStyles.forEach(function (key) {
219
- innerStr += "\n\n#ifdef USE_ATTRIBUTE_".concat(key.toUpperCase(), "\n ").concat(DefaultUniformStyleType[key], " ").concat(key, " = a_").concat(key.charAt(0).toUpperCase() + key.slice(1), ";\n#else\n ").concat(DefaultUniformStyleType[key], " ").concat(key, " = u_").concat(key, ";\n#endif\n\n");
239
+ innerStr += "\n\n #ifdef USE_ATTRIBUTE_".concat(key.toUpperCase(), "\n ").concat(DefaultUniformStyleType[key], " ").concat(key, " = a_").concat(key.charAt(0).toUpperCase() + key.slice(1), ";\n #else\n ").concat(DefaultUniformStyleType[key], " ").concat(key, " = u_").concat(key, ";\n #endif\n\n ");
220
240
  });
221
241
  return {
222
242
  'vs:#decl': str,
243
+ 'fs:#decl': attributeUniforms,
223
244
  'vs:#main-start': innerStr
224
245
  };
225
246
  }
@@ -254,6 +275,9 @@ var BaseModel = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
254
275
  var options = getCommonStyleAttributeOptions(key);
255
276
  if (options) {
256
277
  _this2.styleAttributeService.registerStyleAttribute(options);
278
+ if (options.descriptor) {
279
+ options.descriptor.shaderLocation = shaderLocationMap[key];
280
+ }
257
281
  }
258
282
  });
259
283
  }
@@ -1,2 +1,17 @@
1
1
  import { IStyleAttribute } from '@antv/l7-core';
2
+ export declare enum ShaderLocation {
3
+ POSITION = 0,
4
+ COLOR = 1,
5
+ VERTEX_ID = 2,
6
+ PICKING_COLOR = 3,
7
+ STROKE = 4,
8
+ OPACITY = 5,
9
+ OFFSETS = 6,
10
+ ROTATION = 7,
11
+ EXTRUSION_BASE = 8,
12
+ SIZE = 9,
13
+ SHAPE = 10,
14
+ EXTRUDE = 11,
15
+ MAX = 12
16
+ }
2
17
  export declare function getCommonStyleAttributeOptions(name: string): Partial<IStyleAttribute> | undefined;
@@ -1,4 +1,20 @@
1
1
  import { AttributeType, gl } from '@antv/l7-core';
2
+ export var ShaderLocation = /*#__PURE__*/function (ShaderLocation) {
3
+ ShaderLocation[ShaderLocation["POSITION"] = 0] = "POSITION";
4
+ ShaderLocation[ShaderLocation["COLOR"] = 1] = "COLOR";
5
+ ShaderLocation[ShaderLocation["VERTEX_ID"] = 2] = "VERTEX_ID";
6
+ ShaderLocation[ShaderLocation["PICKING_COLOR"] = 3] = "PICKING_COLOR";
7
+ ShaderLocation[ShaderLocation["STROKE"] = 4] = "STROKE";
8
+ ShaderLocation[ShaderLocation["OPACITY"] = 5] = "OPACITY";
9
+ ShaderLocation[ShaderLocation["OFFSETS"] = 6] = "OFFSETS";
10
+ ShaderLocation[ShaderLocation["ROTATION"] = 7] = "ROTATION";
11
+ ShaderLocation[ShaderLocation["EXTRUSION_BASE"] = 8] = "EXTRUSION_BASE";
12
+ ShaderLocation[ShaderLocation["SIZE"] = 9] = "SIZE";
13
+ ShaderLocation[ShaderLocation["SHAPE"] = 10] = "SHAPE";
14
+ ShaderLocation[ShaderLocation["EXTRUDE"] = 11] = "EXTRUDE";
15
+ ShaderLocation[ShaderLocation["MAX"] = 12] = "MAX";
16
+ return ShaderLocation;
17
+ }({});
2
18
  export function getCommonStyleAttributeOptions(name) {
3
19
  switch (name) {
4
20
  // // roate
@@ -8,6 +24,7 @@ export function getCommonStyleAttributeOptions(name) {
8
24
  type: AttributeType.Attribute,
9
25
  descriptor: {
10
26
  name: 'a_Rotation',
27
+ shaderLocation: ShaderLocation.ROTATION,
11
28
  buffer: {
12
29
  usage: gl.DYNAMIC_DRAW,
13
30
  data: [],
@@ -27,6 +44,7 @@ export function getCommonStyleAttributeOptions(name) {
27
44
  type: AttributeType.Attribute,
28
45
  descriptor: {
29
46
  name: 'a_Stroke',
47
+ shaderLocation: ShaderLocation.STROKE,
30
48
  buffer: {
31
49
  // give the WebGL driver a hint that this buffer may change
32
50
  usage: gl.DYNAMIC_DRAW,
@@ -47,6 +65,7 @@ export function getCommonStyleAttributeOptions(name) {
47
65
  type: AttributeType.Attribute,
48
66
  descriptor: {
49
67
  name: 'a_Opacity',
68
+ shaderLocation: ShaderLocation.OPACITY,
50
69
  buffer: {
51
70
  // give the WebGL driver a hint that this buffer may change
52
71
  usage: gl.STATIC_DRAW,
@@ -67,6 +86,7 @@ export function getCommonStyleAttributeOptions(name) {
67
86
  type: AttributeType.Attribute,
68
87
  descriptor: {
69
88
  name: 'a_ExtrusionBase',
89
+ shaderLocation: ShaderLocation.EXTRUSION_BASE,
70
90
  buffer: {
71
91
  // give the WebGL driver a hint that this buffer may change
72
92
  usage: gl.STATIC_DRAW,
@@ -87,6 +107,7 @@ export function getCommonStyleAttributeOptions(name) {
87
107
  type: AttributeType.Attribute,
88
108
  descriptor: {
89
109
  name: 'a_Offsets',
110
+ shaderLocation: ShaderLocation.OFFSETS,
90
111
  buffer: {
91
112
  // give the WebGL driver a hint that this buffer may change
92
113
  usage: gl.STATIC_DRAW,
@@ -46,7 +46,7 @@ var TextureService = /*#__PURE__*/function () {
46
46
  key: "destroy",
47
47
  value: function destroy() {
48
48
  var _this$colorTexture;
49
- (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 ? void 0 : _this$colorTexture.destroy();
49
+ (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 || _this$colorTexture.destroy();
50
50
  }
51
51
  }, {
52
52
  key: "getColorRampBar",
@@ -68,7 +68,7 @@ var TextureService = /*#__PURE__*/function () {
68
68
  key: "getTextureKey",
69
69
  value: function getTextureKey(colorRamp, domain) {
70
70
  var _colorRamp$positions;
71
- return "".concat(colorRamp.colors.join('_'), "_").concat(colorRamp === null || colorRamp === void 0 ? void 0 : (_colorRamp$positions = colorRamp.positions) === null || _colorRamp$positions === void 0 ? void 0 : _colorRamp$positions.join('_'), "_").concat(colorRamp.type, "_").concat(domain === null || domain === void 0 ? void 0 : domain.join('_'));
71
+ return "".concat(colorRamp.colors.join('_'), "_").concat(colorRamp === null || colorRamp === void 0 || (_colorRamp$positions = colorRamp.positions) === null || _colorRamp$positions === void 0 ? void 0 : _colorRamp$positions.join('_'), "_").concat(colorRamp.type, "_").concat(domain === null || domain === void 0 ? void 0 : domain.join('_'));
72
72
  }
73
73
  }]);
74
74
  return TextureService;
package/es/earth/index.js CHANGED
@@ -81,7 +81,7 @@ var EarthLayer = /*#__PURE__*/function (_BaseLayer) {
81
81
  value: function getModelType() {
82
82
  var _shapeAttribute$scale;
83
83
  var shapeAttribute = this.styleAttributeService.getLayerStyleAttribute('shape');
84
- var shape = (shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field) || 'base';
84
+ var shape = (shapeAttribute === null || shapeAttribute === void 0 || (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field) || 'base';
85
85
  if (earthLayerTypes.indexOf(shape) < 0) {
86
86
  shape = 'base';
87
87
  }
@@ -76,7 +76,7 @@ var GeometryLayer = /*#__PURE__*/function (_BaseLayer) {
76
76
  value: function getModelType() {
77
77
  var _shapeAttribute$scale;
78
78
  var shapeAttribute = this.styleAttributeService.getLayerStyleAttribute('shape');
79
- var shape = shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
79
+ var shape = shapeAttribute === null || shapeAttribute === void 0 || (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
80
80
  if (shape === 'plane') {
81
81
  return 'plane';
82
82
  } else if (shape === 'sprite') {
@@ -79,7 +79,7 @@ var BillBoardModel = /*#__PURE__*/function (_BaseModel) {
79
79
  key: "clearModels",
80
80
  value: function clearModels() {
81
81
  var _this$texture;
82
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
82
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
83
83
  }
84
84
  }, {
85
85
  key: "initModels",
@@ -123,7 +123,7 @@ var PlaneModel = /*#__PURE__*/function (_BaseModel) {
123
123
  if (this.mapTexture !== mapTexture) {
124
124
  var _this$texture;
125
125
  this.mapTexture = mapTexture;
126
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
126
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
127
127
  this.updateTexture(mapTexture);
128
128
  }
129
129
  return {
@@ -139,7 +139,7 @@ var PlaneModel = /*#__PURE__*/function (_BaseModel) {
139
139
  var _this$texture2;
140
140
  // @ts-ignore
141
141
  this.terrainImage = null;
142
- (_this$texture2 = this.texture) === null || _this$texture2 === void 0 ? void 0 : _this$texture2.destroy();
142
+ (_this$texture2 = this.texture) === null || _this$texture2 === void 0 || _this$texture2.destroy();
143
143
  }
144
144
  }, {
145
145
  key: "initModels",
@@ -141,7 +141,7 @@ var SpriteModel = /*#__PURE__*/function (_BaseModel) {
141
141
  if (this.mapTexture !== mapTexture) {
142
142
  var _this$texture;
143
143
  this.mapTexture = mapTexture;
144
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
144
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
145
145
  this.updateTexture(mapTexture);
146
146
  }
147
147
  return {
@@ -156,7 +156,7 @@ var SpriteModel = /*#__PURE__*/function (_BaseModel) {
156
156
  value: function clearModels() {
157
157
  var _this$texture2;
158
158
  cancelAnimationFrame(this.timer);
159
- (_this$texture2 = this.texture) === null || _this$texture2 === void 0 ? void 0 : _this$texture2.destroy();
159
+ (_this$texture2 = this.texture) === null || _this$texture2 === void 0 || _this$texture2.destroy();
160
160
  }
161
161
  }, {
162
162
  key: "initModels",
@@ -92,7 +92,7 @@ var HeatMapLayer = /*#__PURE__*/function (_BaseLayer) {
92
92
  shape3d = _this$getLayerConfig.shape3d;
93
93
  var source = this.getSource();
94
94
  var sourceType = source.data.type;
95
- var shape = (shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field) || 'heatmap';
95
+ var shape = (shapeAttribute === null || shapeAttribute === void 0 || (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field) || 'heatmap';
96
96
  if (shape === 'heatmap' || shape === 'heatmap3d') {
97
97
  return 'heatmap';
98
98
  }
@@ -77,7 +77,7 @@ var HeatMapModel = (_dec = injectable(), _dec(_class = /*#__PURE__*/function (_B
77
77
  case 0:
78
78
  _this$rendererService2 = this.rendererService, createFramebuffer = _this$rendererService2.createFramebuffer, getViewportSize = _this$rendererService2.getViewportSize, createTexture2D = _this$rendererService2.createTexture2D;
79
79
  shapeAttr = this.styleAttributeService.getLayerStyleAttribute('shape');
80
- shapeType = (shapeAttr === null || shapeAttr === void 0 ? void 0 : (_shapeAttr$scale = shapeAttr.scale) === null || _shapeAttr$scale === void 0 ? void 0 : _shapeAttr$scale.field) || 'heatmap';
80
+ shapeType = (shapeAttr === null || shapeAttr === void 0 || (_shapeAttr$scale = shapeAttr.scale) === null || _shapeAttr$scale === void 0 ? void 0 : _shapeAttr$scale.field) || 'heatmap';
81
81
  this.shapeType = shapeType;
82
82
  // 生成热力图密度图
83
83
  _context.next = 6;
@@ -266,7 +266,7 @@ var HeatMapModel = (_dec = injectable(), _dec(_class = /*#__PURE__*/function (_B
266
266
  this.layerService.beforeRenderData(this.layer);
267
267
  this.layer.hooks.beforeRender.call();
268
268
  // 绘制密度图
269
- (_this$intensityModel = this.intensityModel) === null || _this$intensityModel === void 0 ? void 0 : _this$intensityModel.draw({
269
+ (_this$intensityModel = this.intensityModel) === null || _this$intensityModel === void 0 || _this$intensityModel.draw({
270
270
  uniforms: {
271
271
  u_opacity: opacity || 1.0,
272
272
  u_radius: radius,
@@ -300,7 +300,7 @@ var HeatMapModel = (_dec = injectable(), _dec(_class = /*#__PURE__*/function (_B
300
300
  var _this$colorModel;
301
301
  var _ref3 = this.layer.getLayerConfig(),
302
302
  opacity = _ref3.opacity;
303
- (_this$colorModel = this.colorModel) === null || _this$colorModel === void 0 ? void 0 : _this$colorModel.draw({
303
+ (_this$colorModel = this.colorModel) === null || _this$colorModel === void 0 || _this$colorModel.draw({
304
304
  uniforms: {
305
305
  u_opacity: opacity || 1.0,
306
306
  u_colorTexture: this.colorTexture,
@@ -326,7 +326,7 @@ var HeatMapModel = (_dec = injectable(), _dec(_class = /*#__PURE__*/function (_B
326
326
  // ) as mat4;
327
327
  var invert = mat4.create();
328
328
  mat4.invert(invert, this.cameraService.getViewProjectionMatrixUncentered());
329
- (_this$colorModel2 = this.colorModel) === null || _this$colorModel2 === void 0 ? void 0 : _this$colorModel2.draw({
329
+ (_this$colorModel2 = this.colorModel) === null || _this$colorModel2 === void 0 || _this$colorModel2.draw({
330
330
  uniforms: {
331
331
  u_opacity: opacity || 1.0,
332
332
  u_colorTexture: this.colorTexture,
@@ -89,7 +89,7 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
89
89
  key: "clearModels",
90
90
  value: function clearModels() {
91
91
  var _this$texture;
92
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
92
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
93
93
  }
94
94
  }, {
95
95
  key: "buildModels",
package/es/line/index.js CHANGED
@@ -100,7 +100,7 @@ var LineLayer = /*#__PURE__*/function (_BaseLayer) {
100
100
  return this.layerType;
101
101
  }
102
102
  var shapeAttribute = this.styleAttributeService.getLayerStyleAttribute('shape');
103
- var shape = shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
103
+ var shape = shapeAttribute === null || shapeAttribute === void 0 || (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
104
104
  return shape || 'line';
105
105
  }
106
106
  }, {
@@ -155,7 +155,7 @@ var ArcModel = /*#__PURE__*/function (_BaseModel) {
155
155
  key: "clearModels",
156
156
  value: function clearModels() {
157
157
  var _this$texture;
158
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
158
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
159
159
  this.iconService.off('imageUpdate', this.updateTexture);
160
160
  }
161
161
  }, {
@@ -153,7 +153,7 @@ var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
153
153
  key: "clearModels",
154
154
  value: function clearModels() {
155
155
  var _this$texture;
156
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
156
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
157
157
  this.iconService.off('imageUpdate', this.updateTexture);
158
158
  }
159
159
  }, {
@@ -153,7 +153,7 @@ var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
153
153
  key: "clearModels",
154
154
  value: function clearModels() {
155
155
  var _this$texture;
156
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
156
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
157
157
  this.iconService.off('imageUpdate', this.updateTexture);
158
158
  }
159
159
  }, {
@@ -139,7 +139,7 @@ var GreatCircleModel = /*#__PURE__*/function (_BaseModel) {
139
139
  key: "clearModels",
140
140
  value: function clearModels() {
141
141
  var _this$texture;
142
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
142
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
143
143
  this.iconService.off('imageUpdate', this.updateTexture);
144
144
  }
145
145
  }, {
@@ -180,7 +180,7 @@ var LineModel = /*#__PURE__*/function (_BaseModel) {
180
180
  key: "clearModels",
181
181
  value: function clearModels() {
182
182
  var _this$texture;
183
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
183
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
184
184
  this.iconService.off('imageUpdate', this.updateTexture);
185
185
  }
186
186
  }, {
@@ -105,7 +105,7 @@ var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
105
105
  key: "clearModels",
106
106
  value: function clearModels() {
107
107
  var _this$colorTexture;
108
- (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 ? void 0 : _this$colorTexture.destroy();
108
+ (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 || _this$colorTexture.destroy();
109
109
  }
110
110
  }, {
111
111
  key: "buildModels",
@@ -130,7 +130,7 @@ var LineWallModel = /*#__PURE__*/function (_BaseModel) {
130
130
  key: "clearModels",
131
131
  value: function clearModels() {
132
132
  var _this$texture;
133
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
133
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
134
134
  this.iconService.off('imageUpdate', this.updateTexture);
135
135
  }
136
136
  }, {
@@ -254,7 +254,7 @@ var DataMappingPlugin = (_dec = injectable(), _dec2 = inject(TYPES.IMapService),
254
254
  if (!attribute.scale) {
255
255
  return [];
256
256
  }
257
- var scalers = (attribute === null || attribute === void 0 ? void 0 : (_attribute$scale = attribute.scale) === null || _attribute$scale === void 0 ? void 0 : _attribute$scale.scalers) || [];
257
+ var scalers = (attribute === null || attribute === void 0 || (_attribute$scale = attribute.scale) === null || _attribute$scale === void 0 ? void 0 : _attribute$scale.scalers) || [];
258
258
  var params = [];
259
259
  scalers.forEach(function (_ref5) {
260
260
  var _attribute$scale2;
@@ -1,7 +1,10 @@
1
1
  import { ILayer, ILayerPlugin, IRendererService, IStyleAttributeService } from '@antv/l7-core';
2
2
  import 'reflect-metadata';
3
3
  export default class PixelPickingPlugin implements ILayerPlugin {
4
- apply(layer: ILayer, { styleAttributeService, }: {
4
+ private PickOption;
5
+ private pickOption2Array;
6
+ private updatePickOption;
7
+ apply(layer: ILayer, { rendererService, styleAttributeService, }: {
5
8
  rendererService: IRendererService;
6
9
  styleAttributeService: IStyleAttributeService;
7
10
  }): void;