@antv/l7-layers 2.20.20 → 2.21.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 (138) hide show
  1. package/es/canvas/index.d.ts +13 -8
  2. package/es/canvas/index.js +63 -36
  3. package/es/canvas/models/canvas.d.ts +19 -14
  4. package/es/canvas/models/canvas.js +125 -139
  5. package/es/canvas/models/constants.d.ts +2 -0
  6. package/es/canvas/models/constants.js +6 -0
  7. package/es/canvas/models/index.d.ts +2 -5
  8. package/es/canvas/models/index.js +2 -5
  9. package/es/core/BaseLayer.d.ts +18 -19
  10. package/es/core/BaseLayer.js +134 -101
  11. package/es/core/BaseModel.js +15 -31
  12. package/es/core/LayerPickService.js +4 -6
  13. package/es/core/TextureService.js +1 -2
  14. package/es/core/interface.d.ts +31 -4
  15. package/es/core/shape/Path.js +1 -2
  16. package/es/core/shape/arrow.js +2 -6
  17. package/es/core/shape/extrude.js +0 -1
  18. package/es/core/triangulation.js +2 -2
  19. package/es/earth/models/base.js +0 -1
  20. package/es/heatmap/index.js +0 -1
  21. package/es/heatmap/models/heatmap.d.ts +0 -1
  22. package/es/heatmap/models/heatmap.js +2 -5
  23. package/es/index.d.ts +2 -1
  24. package/es/index.js +2 -89
  25. package/es/line/models/arc.js +5 -5
  26. package/es/line/models/arc_3d.js +4 -4
  27. package/es/line/models/great_circle.js +4 -4
  28. package/es/line/models/line.js +8 -12
  29. package/es/line/models/simple_line.js +1 -2
  30. package/es/line/models/wall.js +5 -4
  31. package/es/line/shaders/line/line_vert.glsl +0 -2
  32. package/es/line/shaders/wall/wall_vert.glsl +15 -0
  33. package/es/plugins/DataMappingPlugin.d.ts +4 -7
  34. package/es/plugins/DataMappingPlugin.js +8 -25
  35. package/es/plugins/DataSourcePlugin.d.ts +0 -1
  36. package/es/plugins/DataSourcePlugin.js +4 -7
  37. package/es/plugins/FeatureScalePlugin.d.ts +2 -5
  38. package/es/plugins/FeatureScalePlugin.js +5 -7
  39. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -1
  40. package/es/plugins/LayerAnimateStylePlugin.js +2 -5
  41. package/es/plugins/LayerMaskPlugin.d.ts +0 -1
  42. package/es/plugins/LayerMaskPlugin.js +2 -8
  43. package/es/plugins/LayerModelPlugin.d.ts +0 -1
  44. package/es/plugins/LayerModelPlugin.js +13 -18
  45. package/es/plugins/LayerStylePlugin.d.ts +0 -1
  46. package/es/plugins/LayerStylePlugin.js +2 -5
  47. package/es/plugins/LightingPlugin.d.ts +0 -1
  48. package/es/plugins/LightingPlugin.js +2 -5
  49. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -1
  50. package/es/plugins/MultiPassRendererPlugin.js +2 -5
  51. package/es/plugins/PixelPickingPlugin.d.ts +2 -6
  52. package/es/plugins/PixelPickingPlugin.js +6 -12
  53. package/es/plugins/RegisterStyleAttributePlugin.d.ts +2 -5
  54. package/es/plugins/RegisterStyleAttributePlugin.js +2 -5
  55. package/es/plugins/ShaderUniformPlugin.d.ts +7 -8
  56. package/es/plugins/ShaderUniformPlugin.js +17 -43
  57. package/es/plugins/UpdateModelPlugin.d.ts +0 -1
  58. package/es/plugins/UpdateModelPlugin.js +2 -5
  59. package/es/plugins/UpdateStyleAttributePlugin.d.ts +2 -5
  60. package/es/plugins/UpdateStyleAttributePlugin.js +2 -6
  61. package/es/plugins/index.d.ts +15 -0
  62. package/es/plugins/index.js +18 -0
  63. package/es/point/models/fill.d.ts +1 -1
  64. package/es/point/models/fill.js +7 -10
  65. package/es/point/models/fillImage.js +4 -3
  66. package/es/point/models/image.js +4 -3
  67. package/es/polygon/models/extrude.js +0 -1
  68. package/es/polygon/models/fill.js +2 -3
  69. package/es/polygon/models/index.js +0 -1
  70. package/es/polygon/models/ocean.js +1 -2
  71. package/es/polygon/models/water.js +0 -2
  72. package/es/tile/core/BaseLayer.js +4 -5
  73. package/es/tile/interaction/getRasterData.js +0 -3
  74. package/es/tile/service/TileLayerService.d.ts +0 -1
  75. package/es/tile/service/TileLayerService.js +0 -1
  76. package/es/tile/service/TilePickService.d.ts +1 -1
  77. package/es/tile/service/TilePickService.js +2 -3
  78. package/es/tile/tile/Tile.js +8 -6
  79. package/es/utils/blend.js +7 -8
  80. package/es/utils/polylineNormal.js +0 -1
  81. package/es/utils/rampcolor_legend.js +1 -2
  82. package/es/wind/index.js +0 -1
  83. package/lib/canvas/index.js +63 -37
  84. package/lib/canvas/models/canvas.js +125 -138
  85. package/lib/canvas/models/constants.js +12 -0
  86. package/lib/canvas/models/index.js +22 -7
  87. package/lib/core/BaseLayer.js +134 -101
  88. package/lib/core/BaseModel.js +14 -30
  89. package/lib/core/LayerPickService.js +4 -6
  90. package/lib/core/TextureService.js +1 -2
  91. package/lib/core/shape/Path.js +1 -2
  92. package/lib/core/shape/arrow.js +2 -6
  93. package/lib/core/shape/extrude.js +0 -1
  94. package/lib/core/triangulation.js +2 -2
  95. package/lib/earth/models/base.js +0 -1
  96. package/lib/heatmap/index.js +0 -1
  97. package/lib/heatmap/models/heatmap.js +2 -5
  98. package/lib/index.js +9 -90
  99. package/lib/line/models/arc.js +4 -4
  100. package/lib/line/models/arc_3d.js +4 -4
  101. package/lib/line/models/great_circle.js +4 -4
  102. package/lib/line/models/line.js +10 -12
  103. package/lib/line/models/simple_line.js +0 -1
  104. package/lib/line/models/wall.js +5 -4
  105. package/lib/line/shaders/line/line_vert.glsl +0 -2
  106. package/lib/line/shaders/wall/wall_vert.glsl +15 -0
  107. package/lib/plugins/DataMappingPlugin.js +7 -24
  108. package/lib/plugins/DataSourcePlugin.js +3 -6
  109. package/lib/plugins/FeatureScalePlugin.js +5 -7
  110. package/lib/plugins/LayerAnimateStylePlugin.js +2 -5
  111. package/lib/plugins/LayerMaskPlugin.js +2 -8
  112. package/lib/plugins/LayerModelPlugin.js +13 -18
  113. package/lib/plugins/LayerStylePlugin.js +2 -5
  114. package/lib/plugins/LightingPlugin.js +2 -5
  115. package/lib/plugins/MultiPassRendererPlugin.js +2 -5
  116. package/lib/plugins/PixelPickingPlugin.js +6 -12
  117. package/lib/plugins/RegisterStyleAttributePlugin.js +2 -5
  118. package/lib/plugins/ShaderUniformPlugin.js +16 -42
  119. package/lib/plugins/UpdateModelPlugin.js +2 -5
  120. package/lib/plugins/UpdateStyleAttributePlugin.js +2 -5
  121. package/lib/plugins/index.js +26 -0
  122. package/lib/point/models/fill.js +10 -13
  123. package/lib/point/models/fillImage.js +4 -3
  124. package/lib/point/models/image.js +4 -3
  125. package/lib/polygon/models/extrude.js +0 -1
  126. package/lib/polygon/models/fill.js +1 -2
  127. package/lib/polygon/models/ocean.js +0 -1
  128. package/lib/polygon/models/water.js +0 -2
  129. package/lib/tile/core/BaseLayer.js +4 -5
  130. package/lib/tile/interaction/getRasterData.js +0 -3
  131. package/lib/tile/service/TileLayerService.js +0 -1
  132. package/lib/tile/service/TilePickService.js +2 -3
  133. package/lib/tile/tile/Tile.js +8 -6
  134. package/lib/utils/blend.js +7 -8
  135. package/lib/utils/polylineNormal.js +0 -1
  136. package/lib/utils/rampcolor_legend.js +1 -2
  137. package/lib/wind/index.js +0 -1
  138. package/package.json +18 -20
@@ -1,15 +1,9 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import _initializerDefineProperty from "@babel/runtime/helpers/esm/initializerDefineProperty";
4
4
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/esm/createClass";
6
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
- import _applyDecoratedDescriptor from "@babel/runtime/helpers/esm/applyDecoratedDescriptor";
8
- import _initializerWarningHelper from "@babel/runtime/helpers/esm/initializerWarningHelper";
9
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
10
- import { CameraUniform, CoordinateUniform, TYPES } from '@antv/l7-core';
11
- import { inject, injectable } from 'inversify';
12
- import 'reflect-metadata';
6
+ import { CameraUniform, CoordinateUniform } from '@antv/l7-core';
13
7
 
14
8
  /**
15
9
  * 在渲染之前需要获取当前 Shader 所需 Uniform,例如:
@@ -18,19 +12,24 @@ import 'reflect-metadata';
18
12
  * @see https://yuque.antfin-inc.com/yuqi.pyq/fgetpa/doml91
19
13
  * 3. 当前 Layer 本身的样式属性
20
14
  */
21
- var ShaderUniformPlugin = (_dec = injectable(), _dec2 = inject(TYPES.ICameraService), _dec3 = inject(TYPES.ICoordinateSystemService), _dec4 = inject(TYPES.IRendererService), _dec5 = inject(TYPES.IMapService), _dec6 = inject(TYPES.ILayerService), _dec(_class = (_class2 = /*#__PURE__*/function () {
15
+ var ShaderUniformPlugin = /*#__PURE__*/function () {
22
16
  function ShaderUniformPlugin() {
23
17
  _classCallCheck(this, ShaderUniformPlugin);
24
- _initializerDefineProperty(this, "cameraService", _descriptor, this);
25
- _initializerDefineProperty(this, "coordinateSystemService", _descriptor2, this);
26
- _initializerDefineProperty(this, "rendererService", _descriptor3, this);
27
- _initializerDefineProperty(this, "mapService", _descriptor4, this);
28
- _initializerDefineProperty(this, "layerService", _descriptor5, this);
29
18
  }
30
19
  _createClass(ShaderUniformPlugin, [{
31
20
  key: "apply",
32
- value: function apply(layer) {
21
+ value: function apply(layer, _ref) {
33
22
  var _this = this;
23
+ var rendererService = _ref.rendererService,
24
+ mapService = _ref.mapService,
25
+ layerService = _ref.layerService,
26
+ coordinateSystemService = _ref.coordinateSystemService,
27
+ cameraService = _ref.cameraService;
28
+ this.rendererService = rendererService;
29
+ this.mapService = mapService;
30
+ this.layerService = layerService;
31
+ this.coordinateSystemService = coordinateSystemService;
32
+ this.cameraService = cameraService;
34
33
  var version = this.mapService.version;
35
34
  var mvp = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; // default matrix (for gaode2.x)
36
35
  var sceneCenterMercator = [0, 0];
@@ -76,7 +75,7 @@ var ShaderUniformPlugin = (_dec = injectable(), _dec2 = inject(TYPES.ICameraServ
76
75
  });
77
76
  }
78
77
 
79
- // For WebGL1. regl
78
+ // For WebGL1. regl
80
79
  var platformString = _this.rendererService.queryVerdorInfo();
81
80
  if (platformString === 'WebGL1') {
82
81
  layer.models.forEach(function (model) {
@@ -140,35 +139,10 @@ var ShaderUniformPlugin = (_dec = injectable(), _dec2 = inject(TYPES.ICameraServ
140
139
  0, 0, 0]);
141
140
  return {
142
141
  data: data,
143
- uniforms: (_uniforms = {}, _defineProperty(_uniforms, CameraUniform.ProjectionMatrix, u_ProjectionMatrix), _defineProperty(_uniforms, CameraUniform.ViewMatrix, u_ViewMatrix), _defineProperty(_uniforms, CameraUniform.ViewProjectionMatrix, u_ViewProjectionMatrix), _defineProperty(_uniforms, CameraUniform.Zoom, u_Zoom), _defineProperty(_uniforms, CameraUniform.ZoomScale, u_ZoomScale), _defineProperty(_uniforms, CameraUniform.FocalDistance, u_FocalDistance), _defineProperty(_uniforms, CameraUniform.CameraPosition, u_CameraPosition), _defineProperty(_uniforms, CoordinateUniform.CoordinateSystem, u_CoordinateSystem), _defineProperty(_uniforms, CoordinateUniform.ViewportCenter, u_ViewportCenter), _defineProperty(_uniforms, CoordinateUniform.ViewportCenterProjection, u_ViewportCenterProjection), _defineProperty(_uniforms, CoordinateUniform.PixelsPerDegree, u_PixelsPerDegree), _defineProperty(_uniforms, CoordinateUniform.PixelsPerDegree2, u_PixelsPerDegree2), _defineProperty(_uniforms, CoordinateUniform.PixelsPerMeter, u_PixelsPerMeter), _defineProperty(_uniforms, CoordinateUniform.Mvp, u_Mvp), _defineProperty(_uniforms, "u_sceneCenterMercator", sceneCenterMercator), _defineProperty(_uniforms, "u_ViewportSize", u_ViewportSize), _defineProperty(_uniforms, "u_ModelMatrix", u_ModelMatrix), _defineProperty(_uniforms, "u_DevicePixelRatio", u_DevicePixelRatio), _uniforms)
142
+ uniforms: (_uniforms = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_uniforms, CameraUniform.ProjectionMatrix, u_ProjectionMatrix), CameraUniform.ViewMatrix, u_ViewMatrix), CameraUniform.ViewProjectionMatrix, u_ViewProjectionMatrix), CameraUniform.Zoom, u_Zoom), CameraUniform.ZoomScale, u_ZoomScale), CameraUniform.FocalDistance, u_FocalDistance), CameraUniform.CameraPosition, u_CameraPosition), CoordinateUniform.CoordinateSystem, u_CoordinateSystem), CoordinateUniform.ViewportCenter, u_ViewportCenter), CoordinateUniform.ViewportCenterProjection, u_ViewportCenterProjection), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_uniforms, CoordinateUniform.PixelsPerDegree, u_PixelsPerDegree), CoordinateUniform.PixelsPerDegree2, u_PixelsPerDegree2), CoordinateUniform.PixelsPerMeter, u_PixelsPerMeter), CoordinateUniform.Mvp, u_Mvp), "u_sceneCenterMercator", sceneCenterMercator), "u_ViewportSize", u_ViewportSize), "u_ModelMatrix", u_ModelMatrix), "u_DevicePixelRatio", u_DevicePixelRatio))
144
143
  };
145
144
  }
146
145
  }]);
147
146
  return ShaderUniformPlugin;
148
- }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "cameraService", [_dec2], {
149
- configurable: true,
150
- enumerable: true,
151
- writable: true,
152
- initializer: null
153
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "coordinateSystemService", [_dec3], {
154
- configurable: true,
155
- enumerable: true,
156
- writable: true,
157
- initializer: null
158
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "rendererService", [_dec4], {
159
- configurable: true,
160
- enumerable: true,
161
- writable: true,
162
- initializer: null
163
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "mapService", [_dec5], {
164
- configurable: true,
165
- enumerable: true,
166
- writable: true,
167
- initializer: null
168
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "layerService", [_dec6], {
169
- configurable: true,
170
- enumerable: true,
171
- writable: true,
172
- initializer: null
173
- })), _class2)) || _class);
147
+ }();
174
148
  export { ShaderUniformPlugin as default };
@@ -1,5 +1,4 @@
1
1
  import type { ILayer, ILayerPlugin } from '@antv/l7-core';
2
- import 'reflect-metadata';
3
2
  /**
4
3
  * Model 更新
5
4
  */
@@ -1,12 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- var _dec, _class;
4
- import { injectable } from 'inversify';
5
- import 'reflect-metadata';
6
3
  /**
7
4
  * Model 更新
8
5
  */
9
- var UpdateModelPlugin = (_dec = injectable(), _dec(_class = /*#__PURE__*/function () {
6
+ var UpdateModelPlugin = /*#__PURE__*/function () {
10
7
  function UpdateModelPlugin() {
11
8
  _classCallCheck(this, UpdateModelPlugin);
12
9
  }
@@ -29,5 +26,5 @@ var UpdateModelPlugin = (_dec = injectable(), _dec(_class = /*#__PURE__*/functio
29
26
  }
30
27
  }]);
31
28
  return UpdateModelPlugin;
32
- }()) || _class);
29
+ }();
33
30
  export { UpdateModelPlugin as default };
@@ -1,12 +1,9 @@
1
- import type { ILayer, ILayerPlugin, IStyleAttributeService } from '@antv/l7-core';
2
- import 'reflect-metadata';
1
+ import type { ILayer, ILayerPlugin, L7Container } from '@antv/l7-core';
3
2
  /**
4
3
  * 在初始化阶段完成属性的注册,以及首次根据 Layer 指定的三角化方法完成 indices 和 attribute 的创建
5
4
  */
6
5
  export default class UpdateStyleAttributePlugin implements ILayerPlugin {
7
- apply(layer: ILayer, { styleAttributeService, }: {
8
- styleAttributeService: IStyleAttributeService;
9
- }): void;
6
+ apply(layer: ILayer, { styleAttributeService }: L7Container): void;
10
7
  private updateStyleAttribute;
11
8
  private initStyleAttribute;
12
9
  }
@@ -1,13 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- var _dec, _class;
4
- import { injectable } from 'inversify';
5
- import 'reflect-metadata';
6
-
7
3
  /**
8
4
  * 在初始化阶段完成属性的注册,以及首次根据 Layer 指定的三角化方法完成 indices 和 attribute 的创建
9
5
  */
10
- var UpdateStyleAttributePlugin = (_dec = injectable(), _dec(_class = /*#__PURE__*/function () {
6
+ var UpdateStyleAttributePlugin = /*#__PURE__*/function () {
11
7
  function UpdateStyleAttributePlugin() {
12
8
  _classCallCheck(this, UpdateStyleAttributePlugin);
13
9
  }
@@ -72,5 +68,5 @@ var UpdateStyleAttributePlugin = (_dec = injectable(), _dec(_class = /*#__PURE__
72
68
  }
73
69
  }]);
74
70
  return UpdateStyleAttributePlugin;
75
- }()) || _class);
71
+ }();
76
72
  export { UpdateStyleAttributePlugin as default };
@@ -0,0 +1,15 @@
1
+ import DataMappingPlugin from './DataMappingPlugin';
2
+ import DataSourcePlugin from './DataSourcePlugin';
3
+ import FeatureScalePlugin from './FeatureScalePlugin';
4
+ import LayerAnimateStylePlugin from './LayerAnimateStylePlugin';
5
+ import LayerMaskPlugin from './LayerMaskPlugin';
6
+ import LayerModelPlugin from './LayerModelPlugin';
7
+ import LayerStylePlugin from './LayerStylePlugin';
8
+ import LightingPlugin from './LightingPlugin';
9
+ import MultiPassRendererPlugin from './MultiPassRendererPlugin';
10
+ import PixelPickingPlugin from './PixelPickingPlugin';
11
+ import RegisterStyleAttributePlugin from './RegisterStyleAttributePlugin';
12
+ import ShaderUniformPlugin from './ShaderUniformPlugin';
13
+ import UpdateModelPlugin from './UpdateModelPlugin';
14
+ import UpdateStyleAttributePlugin from './UpdateStyleAttributePlugin';
15
+ export declare function createPlugins(): (DataMappingPlugin | DataSourcePlugin | FeatureScalePlugin | LayerAnimateStylePlugin | LayerMaskPlugin | LayerModelPlugin | LayerStylePlugin | LightingPlugin | MultiPassRendererPlugin | PixelPickingPlugin | RegisterStyleAttributePlugin | ShaderUniformPlugin | UpdateModelPlugin | UpdateStyleAttributePlugin)[];
@@ -0,0 +1,18 @@
1
+ // import ConfigSchemaValidationPlugin from './ConfigSchemaValidationPlugin';
2
+ import DataMappingPlugin from "./DataMappingPlugin";
3
+ import DataSourcePlugin from "./DataSourcePlugin";
4
+ import FeatureScalePlugin from "./FeatureScalePlugin";
5
+ import LayerAnimateStylePlugin from "./LayerAnimateStylePlugin";
6
+ import LayerMaskPlugin from "./LayerMaskPlugin";
7
+ import LayerModelPlugin from "./LayerModelPlugin";
8
+ import LayerStylePlugin from "./LayerStylePlugin";
9
+ import LightingPlugin from "./LightingPlugin";
10
+ import MultiPassRendererPlugin from "./MultiPassRendererPlugin";
11
+ import PixelPickingPlugin from "./PixelPickingPlugin";
12
+ import RegisterStyleAttributePlugin from "./RegisterStyleAttributePlugin";
13
+ import ShaderUniformPlugin from "./ShaderUniformPlugin";
14
+ import UpdateModelPlugin from "./UpdateModelPlugin";
15
+ import UpdateStyleAttributePlugin from "./UpdateStyleAttributePlugin";
16
+ export function createPlugins() {
17
+ return [new DataSourcePlugin(), new RegisterStyleAttributePlugin(), new FeatureScalePlugin(), new DataMappingPlugin(), new LayerStylePlugin(), new LayerMaskPlugin(), new UpdateStyleAttributePlugin(), new UpdateModelPlugin(), new MultiPassRendererPlugin(), new ShaderUniformPlugin(), new LayerAnimateStylePlugin(), new LightingPlugin(), new PixelPickingPlugin(), new LayerModelPlugin()];
18
+ }
@@ -21,7 +21,7 @@ export default class FillModel extends BaseModel {
21
21
  * 根据 animateOption 的值返回对应的 shader 代码
22
22
  * @returns
23
23
  */
24
- getShaders(animateOption: Partial<IAnimateOption>): {
24
+ getShaders(): {
25
25
  frag: string;
26
26
  vert: string;
27
27
  type: string;
@@ -8,7 +8,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
9
  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; } }
10
10
  import { AttributeType, gl } from '@antv/l7-core';
11
- import { PointFillTriangulation } from '@antv/l7-utils';
11
+ import { PointFillTriangulation } from "../../core/triangulation";
12
12
  import BaseModel from "../../core/BaseModel";
13
13
  import { ShaderLocation } from "../../core/CommonStyleAttribute";
14
14
  /* babel-plugin-inline-import '../shaders/fill/fill_frag.glsl' */
@@ -97,17 +97,14 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
97
97
  key: "buildModels",
98
98
  value: function () {
99
99
  var _buildModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
100
- var _ref3, _ref3$animateOption, animateOption, _this$getShaders, frag, vert, type, model;
100
+ var _this$getShaders, frag, vert, type, model;
101
101
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
102
102
  while (1) switch (_context2.prev = _context2.next) {
103
103
  case 0:
104
- _ref3 = this.layer.getLayerConfig(), _ref3$animateOption = _ref3.animateOption, animateOption = _ref3$animateOption === void 0 ? {
105
- enable: false
106
- } : _ref3$animateOption;
107
- _this$getShaders = this.getShaders(animateOption), frag = _this$getShaders.frag, vert = _this$getShaders.vert, type = _this$getShaders.type;
104
+ _this$getShaders = this.getShaders(), frag = _this$getShaders.frag, vert = _this$getShaders.vert, type = _this$getShaders.type;
108
105
  this.layer.triangulation = PointFillTriangulation;
109
106
  this.initUniformsBuffer();
110
- _context2.next = 6;
107
+ _context2.next = 5;
111
108
  return this.layer.buildLayerModel({
112
109
  moduleName: type,
113
110
  vertexShader: vert,
@@ -118,10 +115,10 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
118
115
  enable: false
119
116
  }
120
117
  });
121
- case 6:
118
+ case 5:
122
119
  model = _context2.sent;
123
120
  return _context2.abrupt("return", [model]);
124
- case 8:
121
+ case 7:
125
122
  case "end":
126
123
  return _context2.stop();
127
124
  }
@@ -138,7 +135,7 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
138
135
  */
139
136
  }, {
140
137
  key: "getShaders",
141
- value: function getShaders(animateOption) {
138
+ value: function getShaders() {
142
139
  return {
143
140
  frag: pointFillFrag,
144
141
  vert: pointFillVert,
@@ -72,7 +72,8 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
72
72
  _ref$unit = _ref.unit,
73
73
  unit = _ref$unit === void 0 ? 'pixel' : _ref$unit;
74
74
  if (this.rendererService.getDirty()) {
75
- this.texture.bind();
75
+ var _this$texture;
76
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.bind();
76
77
  }
77
78
  /**
78
79
  * rotateFlag
@@ -158,9 +159,9 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
158
159
  }, {
159
160
  key: "clearModels",
160
161
  value: function clearModels() {
161
- var _this$texture;
162
+ var _this$texture2;
162
163
  this.iconService.off('imageUpdate', this.updateTexture);
163
- (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
164
+ (_this$texture2 = this.texture) === null || _this$texture2 === void 0 || _this$texture2.destroy();
164
165
  }
165
166
 
166
167
  // overwrite baseModel func
@@ -62,7 +62,8 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
62
62
  value: function getUninforms() {
63
63
  // ThreeJS 图层兼容
64
64
  if (this.rendererService.getDirty()) {
65
- this.texture.bind();
65
+ var _this$texture;
66
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.bind();
66
67
  }
67
68
  var commonInfo = this.getCommonUniformsInfo();
68
69
  var attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
@@ -111,8 +112,8 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
111
112
  }, {
112
113
  key: "clearModels",
113
114
  value: function clearModels() {
114
- var _this$texture;
115
- (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
115
+ var _this$texture2;
116
+ (_this$texture2 = this.texture) === null || _this$texture2 === void 0 || _this$texture2.destroy();
116
117
  this.iconService.off('imageUpdate', this.updateTexture);
117
118
  }
118
119
  }, {
@@ -215,7 +215,6 @@ var ExtrudeModel = /*#__PURE__*/function (_BaseModel) {
215
215
  update: function update(feature, featureIdx, vertex) {
216
216
  var lng = vertex[0];
217
217
  var lat = vertex[1];
218
- // console.log((lng - bounds[0]) / lngLen, (lat - bounds[1]) / latLen, vertex[4])
219
218
  // 临时 兼容高德V2
220
219
  return [(lng - bounds[0]) / lngLen, (lat - bounds[1]) / latLen, vertex[4]];
221
220
  }
@@ -9,9 +9,8 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
9
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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
  import { AttributeType, gl } from '@antv/l7-core';
12
- import { polygonFillTriangulation } from '@antv/l7-utils';
13
12
  import BaseModel from "../../core/BaseModel";
14
- import { polygonTriangulationWithCenter } from "../../core/triangulation";
13
+ import { polygonTriangulationWithCenter, polygonTriangulation } from "../../core/triangulation";
15
14
  /* babel-plugin-inline-import '../shaders/fill/fill_frag.glsl' */
16
15
  var polygon_frag = "in vec4 v_color;\n#pragma include \"scene_uniforms\"\n#pragma include \"picking\"\nout vec4 outputColor;\nvoid main() {\n outputColor = v_color;\n outputColor = filterColor(outputColor);\n}\n";
17
16
  /* babel-plugin-inline-import '../shaders/fill/fill_linear_frag.glsl' */
@@ -161,7 +160,7 @@ var FillModel = /*#__PURE__*/function (_BaseModel) {
161
160
  frag: polygon_frag,
162
161
  vert: polygon_vert,
163
162
  type: 'polygonFill',
164
- triangulation: polygonFillTriangulation
163
+ triangulation: polygonTriangulation
165
164
  };
166
165
  }
167
166
  }
@@ -23,5 +23,4 @@ var PolygonModels = {
23
23
  extrusion: Extrusion
24
24
  // point_fill: PointModels.fill,
25
25
  };
26
-
27
26
  export default PolygonModels;
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
11
  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; } }
12
12
  import { AttributeType, gl } from '@antv/l7-core';
13
- import { lodashUtil, rgb2arr } from '@antv/l7-utils';
13
+ import { rgb2arr } from '@antv/l7-utils';
14
14
  import BaseModel from "../../core/BaseModel";
15
15
  import { polygonTriangulation } from "../../core/triangulation";
16
16
  /* babel-plugin-inline-import '../shaders/ocean/ocean_frag.glsl' */
@@ -18,7 +18,6 @@ var ocean_frag = "\nlayout(std140) uniform commonUniforms {\n vec4 u_watercolor
18
18
  /* babel-plugin-inline-import '../shaders/ocean/ocean_vert.glsl' */
19
19
  var ocean_vert = "layout(location = 0) in vec3 a_Position;\nlayout(location = 14) in vec2 a_uv;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_watercolor;\n vec4 u_watercolor2;\n float u_time;\n};\n\n\nout vec2 v_uv;\nout float v_opacity;\n\n#pragma include \"projection\"\n\nvoid main() {\n v_uv = a_uv;\n v_opacity = opacity;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0));\n}\n\n";
20
20
  import { ShaderLocation } from "../../core/CommonStyleAttribute";
21
- var isNumber = lodashUtil.isNumber;
22
21
  var OceanModel = /*#__PURE__*/function (_BaseModel) {
23
22
  _inherits(OceanModel, _BaseModel);
24
23
  var _super = _createSuper(OceanModel);
@@ -10,7 +10,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
11
  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; } }
12
12
  import { AttributeType, gl } from '@antv/l7-core';
13
- import { lodashUtil } from '@antv/l7-utils';
14
13
  import BaseModel from "../../core/BaseModel";
15
14
  import { ShaderLocation } from "../../core/CommonStyleAttribute";
16
15
  import { polygonTriangulation } from "../../core/triangulation";
@@ -18,7 +17,6 @@ import { polygonTriangulation } from "../../core/triangulation";
18
17
  var water_frag = "uniform sampler2D u_texture;\nlayout(std140) uniform commonUniforms {\n float u_speed;\n float u_time;\n};\n\nout vec4 outputColor;\n\n\nin vec4 v_Color;\nin vec2 v_uv;\n\nfloat rand(vec2 n) { return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453); }\n\nfloat water(vec3 p) {\n float t = u_time * u_speed;\n p.z += t * 2.; p.x += t * 2.;\n vec3 c1 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz;\n p.z += t * 3.; p.x += t * 0.52;\n vec3 c2 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz;\n p.z += t * 4.; p.x += t * 0.8;\n vec3 c3 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz;\n c1 += c2 - c3;\n float z = (c1.x + c1.y + c1.z) / 3.;\n return p.y + z / 4.;\n}\n\nfloat map(vec3 p) {\n float d = 100.0;\n d = water(p);\n return d;\n}\n\nfloat intersect(vec3 ro, vec3 rd) {\n float d = 0.0;\n for (int i = 0; i <= 100; i++) {\n float h = map(ro + rd * d);\n if (h < 0.1) return d;\n d += h;\n }\n return 0.0;\n}\n\nvec3 norm(vec3 p) {\n float eps = .1;\n return normalize(vec3(\n map(p + vec3(eps, 0, 0)) - map(p + vec3(-eps, 0, 0)),\n map(p + vec3(0, eps, 0)) - map(p + vec3(0, -eps, 0)),\n map(p + vec3(0, 0, eps)) - map(p + vec3(0, 0, -eps))\n ));\n} \n\nfloat calSpc() {\n vec3 l1 = normalize(vec3(1, 1, 1));\n vec3 ro = vec3(-3, 20, -8);\n vec3 rc = vec3(0, 0, 0);\n vec3 ww = normalize(rc - ro);\n vec3 uu = normalize(cross(vec3(0,1,0), ww));\n vec3 vv = normalize(cross(rc - ro, uu));\n vec3 rd = normalize(uu * v_uv.x + vv * v_uv.y + ww);\n float d = intersect(ro, rd);\n vec3 p = ro + rd * d;\n vec3 n = norm(p);\n float spc = pow(max(0.0, dot(reflect(l1, n), rd)), 30.0);\n return spc;\n}\n\nvoid main() {\n\n outputColor = v_Color;\n float spc = calSpc();\n outputColor += spc * 0.4;\n}\n";
19
18
  /* babel-plugin-inline-import '../shaders/water/polygon_water_vert.glsl' */
20
19
  var water_vert = "layout(location = 0) in vec3 a_Position;\nlayout(location = 1) in vec4 a_Color;\nlayout(location = 14) in vec2 a_uv;\nlayout(std140) uniform commonUniforms {\n float u_speed;\n float u_time;\n};\nout vec4 v_Color;\nout vec2 v_uv;\n\n\n#pragma include \"projection\"\n\nvoid main() {\n v_uv = a_uv;\n v_Color = a_Color;\n v_Color.a *= opacity;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0));\n}\n\n";
21
- var isNumber = lodashUtil.isNumber;
22
20
  var WaterModel = /*#__PURE__*/function (_BaseModel) {
23
21
  _inherits(WaterModel, _BaseModel);
24
22
  var _super = _createSuper(WaterModel);
@@ -3,7 +3,6 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
- import { TYPES } from '@antv/l7-core';
7
6
  import { lodashUtil } from '@antv/l7-utils';
8
7
  import { TileLayerService } from "../service/TileLayerService";
9
8
  import { TilePickService } from "../service/TilePickService";
@@ -55,10 +54,10 @@ var BaseTileLayer = /*#__PURE__*/function () {
55
54
  _defineProperty(this, "viewchange", debounce(this.mapchange, 24));
56
55
  this.parent = parent;
57
56
  var container = this.parent.getContainer();
58
- this.rendererService = container.get(TYPES.IRendererService);
59
- this.layerService = container.get(TYPES.ILayerService);
60
- this.mapService = container.get(TYPES.IMapService);
61
- this.pickingService = container.get(TYPES.IPickingService);
57
+ this.rendererService = container.rendererService;
58
+ this.layerService = container.layerService;
59
+ this.mapService = container.mapService;
60
+ this.pickingService = container.pickingService;
62
61
 
63
62
  // 初始化瓦片管理服务
64
63
  this.tileLayerService = new TileLayerService({
@@ -20,7 +20,6 @@ export function readRasterValue(tile, mapService, x, y) {
20
20
  // x
21
21
  (y - tileMaxXY.y) / tilePixelHeight // y
22
22
  ];
23
-
24
23
  var tileWidth = (tile === null || tile === void 0 || (_tile$data = tile.data) === null || _tile$data === void 0 ? void 0 : _tile$data.width) || 1;
25
24
  var tileHeight = (tile === null || tile === void 0 || (_tile$data2 = tile.data) === null || _tile$data2 === void 0 ? void 0 : _tile$data2.height) || 1;
26
25
  var indexX = Math.floor(pos[0] * tileWidth);
@@ -37,8 +36,6 @@ export function readPixel(x, y, rendererService) {
37
36
  var _getViewportSize = getViewportSize(),
38
37
  width = _getViewportSize.width,
39
38
  height = _getViewportSize.height;
40
- width *= DOM.DPR;
41
- height *= DOM.DPR;
42
39
  if (xInDevicePixel > width - 1 * DOM.DPR || xInDevicePixel < 0 || yInDevicePixel > height - 1 * DOM.DPR || yInDevicePixel < 0) {
43
40
  return false;
44
41
  }
@@ -1,6 +1,5 @@
1
1
  import type { ILayer, ILayerService, ILngLat, IRendererService, ITile } from '@antv/l7-core';
2
2
  import type { SourceTile } from '@antv/l7-utils';
3
- import 'reflect-metadata';
4
3
  interface ITileLayerServiceOptions {
5
4
  rendererService: IRendererService;
6
5
  layerService: ILayerService;
@@ -4,7 +4,6 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/esm/createClass";
5
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
- import 'reflect-metadata';
8
7
  export var TileLayerService = /*#__PURE__*/function () {
9
8
  function TileLayerService(_ref) {
10
9
  var rendererService = _ref.rendererService,
@@ -22,5 +22,5 @@ export declare class TilePickService implements ITilePickService {
22
22
  private pickId2Color;
23
23
  /** 从瓦片中根据数据 */
24
24
  getFeatureById(pickedFeatureIdx: number): any[];
25
- pickRasterLayer(layer: ILayer, target: IInteractionTarget, parent?: ILayer): boolean;
25
+ pickRasterLayer(): boolean;
26
26
  }
@@ -5,7 +5,6 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/esm/createClass";
6
6
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
- import { TYPES } from '@antv/l7-core';
9
8
  import { decodePickingColor, encodePickingColor } from '@antv/l7-utils';
10
9
  import { TileSourceService } from "./TileSourceService";
11
10
  var SELECT = 'select';
@@ -42,7 +41,7 @@ export var TilePickService = /*#__PURE__*/function () {
42
41
  while (1) switch (_context.prev = _context.next) {
43
42
  case 0:
44
43
  container = this.parent.getContainer();
45
- pickingService = container.get(TYPES.IPickingService);
44
+ pickingService = container.pickingService;
46
45
  if (!(layer.type === 'RasterLayer')) {
47
46
  _context.next = 8;
48
47
  break;
@@ -170,7 +169,7 @@ export var TilePickService = /*#__PURE__*/function () {
170
169
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
171
170
  }, {
172
171
  key: "pickRasterLayer",
173
- value: function pickRasterLayer(layer, target, parent) {
172
+ value: function pickRasterLayer() {
174
173
  return false;
175
174
  }
176
175
  }]);
@@ -118,8 +118,8 @@ var Tile = /*#__PURE__*/function (_EventEmitter) {
118
118
  }).shape('fill').color('#0f0').style({
119
119
  opacity: 0.5
120
120
  });
121
- container = createLayerContainer(this.parent.sceneContainer);
122
- mask.setContainer(container, this.parent.sceneContainer);
121
+ container = createLayerContainer(this.parent.container);
122
+ mask.setContainer(container);
123
123
  _context.next = 5;
124
124
  return mask.init();
125
125
  case 5:
@@ -148,8 +148,8 @@ var Tile = /*#__PURE__*/function (_EventEmitter) {
148
148
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
149
149
  while (1) switch (_context2.prev = _context2.next) {
150
150
  case 0:
151
- container = createLayerContainer(this.parent.sceneContainer);
152
- mask.setContainer(container, this.parent.sceneContainer);
151
+ container = createLayerContainer(this.parent.container);
152
+ mask.setContainer(container);
153
153
  _context2.next = 4;
154
154
  return mask.init();
155
155
  case 4:
@@ -176,8 +176,8 @@ var Tile = /*#__PURE__*/function (_EventEmitter) {
176
176
  case 0:
177
177
  // set flag
178
178
  layer.isTileLayer = true;
179
- container = createLayerContainer(this.parent.sceneContainer);
180
- layer.setContainer(container, this.parent.sceneContainer);
179
+ container = createLayerContainer(this.parent.container);
180
+ layer.setContainer(container);
181
181
  this.layers.push(layer);
182
182
  _context3.next = 6;
183
183
  return layer.init();
@@ -214,6 +214,7 @@ var Tile = /*#__PURE__*/function (_EventEmitter) {
214
214
  value: function getMainLayer() {
215
215
  return this.layers[0];
216
216
  }
217
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
217
218
  }, {
218
219
  key: "getFeatures",
219
220
  value: function getFeatures(sourceLayer) {
@@ -225,6 +226,7 @@ var Tile = /*#__PURE__*/function (_EventEmitter) {
225
226
  * @param id
226
227
  * @returns
227
228
  */
229
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
228
230
  }, {
229
231
  key: "getFeatureById",
230
232
  value: function getFeatureById(id) {
package/es/utils/blend.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- var _BlendTypes;
3
2
  import { BlendType, gl } from '@antv/l7-core';
4
- export var BlendTypes = (_BlendTypes = {}, _defineProperty(_BlendTypes, BlendType.additive, {
3
+ export var BlendTypes = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BlendType.additive, {
5
4
  enable: true,
6
5
  func: {
7
6
  srcRGB: gl.ONE,
@@ -9,9 +8,9 @@ export var BlendTypes = (_BlendTypes = {}, _defineProperty(_BlendTypes, BlendTyp
9
8
  srcAlpha: 1,
10
9
  dstAlpha: 1
11
10
  }
12
- }), _defineProperty(_BlendTypes, BlendType.none, {
11
+ }), BlendType.none, {
13
12
  enable: false
14
- }), _defineProperty(_BlendTypes, BlendType.normal, {
13
+ }), BlendType.normal, {
15
14
  enable: true,
16
15
  func: {
17
16
  srcRGB: gl.SRC_ALPHA,
@@ -19,7 +18,7 @@ export var BlendTypes = (_BlendTypes = {}, _defineProperty(_BlendTypes, BlendTyp
19
18
  srcAlpha: 1,
20
19
  dstAlpha: 1
21
20
  }
22
- }), _defineProperty(_BlendTypes, BlendType.subtractive, {
21
+ }), BlendType.subtractive, {
23
22
  enable: true,
24
23
  func: {
25
24
  srcRGB: gl.ONE,
@@ -31,7 +30,7 @@ export var BlendTypes = (_BlendTypes = {}, _defineProperty(_BlendTypes, BlendTyp
31
30
  rgb: gl.FUNC_SUBTRACT,
32
31
  alpha: gl.FUNC_SUBTRACT
33
32
  }
34
- }), _defineProperty(_BlendTypes, BlendType.max, {
33
+ }), BlendType.max, {
35
34
  enable: true,
36
35
  func: {
37
36
  srcRGB: gl.ONE,
@@ -40,7 +39,7 @@ export var BlendTypes = (_BlendTypes = {}, _defineProperty(_BlendTypes, BlendTyp
40
39
  equation: {
41
40
  rgb: gl.MAX_EXT
42
41
  }
43
- }), _defineProperty(_BlendTypes, BlendType.min, {
42
+ }), BlendType.min, {
44
43
  enable: true,
45
44
  func: {
46
45
  srcRGB: gl.ONE,
@@ -49,4 +48,4 @@ export var BlendTypes = (_BlendTypes = {}, _defineProperty(_BlendTypes, BlendTyp
49
48
  equation: {
50
49
  rgb: gl.MIN_EXT
51
50
  }
52
- }), _BlendTypes);
51
+ });
@@ -175,7 +175,6 @@ export default function (points, closed, indexOffset) {
175
175
  miters[_i], totalDistance // dash
176
176
  );
177
177
  }
178
-
179
178
  return {
180
179
  normals: out,
181
180
  attrIndex: attrIndex,
@@ -4,8 +4,7 @@ export function rampColor2legend(rampColors, name) {
4
4
  type: rampColors.type,
5
5
  field: 'value',
6
6
  items: rampColors.positions.map(function (value, index) {
7
- var _ref;
8
- return _ref = {}, _defineProperty(_ref, name, index >= rampColors.colors.length ? null : rampColors.colors[index]), _defineProperty(_ref, "value", value), _ref;
7
+ return _defineProperty(_defineProperty({}, name, index >= rampColors.colors.length ? null : rampColors.colors[index]), "value", value);
9
8
  })
10
9
  };
11
10
  }
package/es/wind/index.js CHANGED
@@ -54,7 +54,6 @@ var WindLayer = /*#__PURE__*/function (_BaseLayer) {
54
54
  if (this.layerModel) {
55
55
  this.layerModel.render(options); // 独立的渲染流程
56
56
  }
57
-
58
57
  return this;
59
58
  }
60
59
  }, {