@antv/l7-layers 2.5.36 → 2.5.37-mini4

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 (262) hide show
  1. package/lib/core/BaseLayer.js +4 -1
  2. package/lib/core/BaseLayer.js.map +1 -1
  3. package/lib/core/BaseModel.js +1 -1
  4. package/lib/core/BaseModel.js.map +1 -1
  5. package/lib/heatmap/models/heatmap.js +12 -17
  6. package/lib/heatmap/models/heatmap.js.map +1 -1
  7. package/lib/image/models/image.js +28 -7
  8. package/lib/image/models/image.js.map +1 -1
  9. package/lib/imagetile/index.js +95 -0
  10. package/lib/imagetile/index.js.map +1 -0
  11. package/lib/imagetile/models/imagetile.js +177 -0
  12. package/lib/imagetile/models/imagetile.js.map +1 -0
  13. package/lib/imagetile/models/index.js +17 -0
  14. package/lib/imagetile/models/index.js.map +1 -0
  15. package/lib/imagetile/utils/ImageTile.js +99 -0
  16. package/lib/imagetile/utils/ImageTile.js.map +1 -0
  17. package/lib/imagetile/utils/Tile.js +324 -0
  18. package/lib/imagetile/utils/Tile.js.map +1 -0
  19. package/lib/imagetile/utils/lruCache.js +109 -0
  20. package/lib/imagetile/utils/lruCache.js.map +1 -0
  21. package/lib/imagetile/utils/tileCache.js +58 -0
  22. package/lib/imagetile/utils/tileCache.js.map +1 -0
  23. package/lib/index.js +8 -0
  24. package/lib/index.js.map +1 -1
  25. package/lib/line/index.js +3 -0
  26. package/lib/line/index.js.map +1 -1
  27. package/lib/line/models/arc.js +2 -2
  28. package/lib/line/models/arc_3d.js +2 -2
  29. package/lib/line/models/arcmini.js +160 -0
  30. package/lib/line/models/arcmini.js.map +1 -0
  31. package/lib/line/models/great_circle.js +2 -2
  32. package/lib/line/models/index.js +3 -0
  33. package/lib/line/models/index.js.map +1 -1
  34. package/lib/line/models/line.js +2 -2
  35. package/lib/plugins/LayerStylePlugin.js.map +1 -1
  36. package/lib/plugins/ShaderUniformPlugin.js +3 -1
  37. package/lib/plugins/ShaderUniformPlugin.js.map +1 -1
  38. package/lib/point/models/image.js.map +1 -1
  39. package/package.json +6 -5
  40. package/CHANGELOG.md +0 -492
  41. package/LICENSE.md +0 -21
  42. package/es/citybuliding/building.d.ts +0 -17
  43. package/es/citybuliding/building.js +0 -79
  44. package/es/citybuliding/building.js.map +0 -1
  45. package/es/citybuliding/models/build.d.ts +0 -13
  46. package/es/citybuliding/models/build.js +0 -124
  47. package/es/citybuliding/models/build.js.map +0 -1
  48. package/es/core/BaseLayer.d.ts +0 -174
  49. package/es/core/BaseLayer.js +0 -974
  50. package/es/core/BaseLayer.js.map +0 -1
  51. package/es/core/BaseModel.d.ts +0 -135
  52. package/es/core/BaseModel.js +0 -412
  53. package/es/core/BaseModel.js.map +0 -1
  54. package/es/core/interface.d.ts +0 -19
  55. package/es/core/interface.js +0 -7
  56. package/es/core/interface.js.map +0 -1
  57. package/es/core/schema.d.ts +0 -27
  58. package/es/core/schema.js +0 -23
  59. package/es/core/schema.js.map +0 -1
  60. package/es/core/shape/Path.d.ts +0 -39
  61. package/es/core/shape/Path.js +0 -57
  62. package/es/core/shape/Path.js.map +0 -1
  63. package/es/core/shape/extrude.d.ts +0 -17
  64. package/es/core/shape/extrude.js +0 -143
  65. package/es/core/shape/extrude.js.map +0 -1
  66. package/es/core/triangulation.d.ts +0 -109
  67. package/es/core/triangulation.js +0 -328
  68. package/es/core/triangulation.js.map +0 -1
  69. package/es/earth/index.d.ts +0 -17
  70. package/es/earth/index.js +0 -81
  71. package/es/earth/index.js.map +0 -1
  72. package/es/earth/models/atmosphere.d.ts +0 -9
  73. package/es/earth/models/atmosphere.js +0 -125
  74. package/es/earth/models/atmosphere.js.map +0 -1
  75. package/es/earth/models/base.d.ts +0 -16
  76. package/es/earth/models/base.js +0 -193
  77. package/es/earth/models/base.js.map +0 -1
  78. package/es/earth/models/bloomsphere.d.ts +0 -9
  79. package/es/earth/models/bloomsphere.js +0 -125
  80. package/es/earth/models/bloomsphere.js.map +0 -1
  81. package/es/earth/utils.d.ts +0 -26
  82. package/es/earth/utils.js +0 -81
  83. package/es/earth/utils.js.map +0 -1
  84. package/es/glsl.d.js +0 -2
  85. package/es/glsl.d.js.map +0 -1
  86. package/es/heatmap/index.d.ts +0 -22
  87. package/es/heatmap/index.js +0 -123
  88. package/es/heatmap/index.js.map +0 -1
  89. package/es/heatmap/models/grid.d.ts +0 -8
  90. package/es/heatmap/models/grid.js +0 -90
  91. package/es/heatmap/models/grid.js.map +0 -1
  92. package/es/heatmap/models/grid3d.d.ts +0 -8
  93. package/es/heatmap/models/grid3d.js +0 -122
  94. package/es/heatmap/models/grid3d.js.map +0 -1
  95. package/es/heatmap/models/heatmap.d.ts +0 -24
  96. package/es/heatmap/models/heatmap.js +0 -399
  97. package/es/heatmap/models/heatmap.js.map +0 -1
  98. package/es/heatmap/models/hexagon.d.ts +0 -8
  99. package/es/heatmap/models/hexagon.js +0 -90
  100. package/es/heatmap/models/hexagon.js.map +0 -1
  101. package/es/heatmap/models/index.d.ts +0 -5
  102. package/es/heatmap/models/index.js +0 -13
  103. package/es/heatmap/models/index.js.map +0 -1
  104. package/es/heatmap/triangulation.d.ts +0 -5
  105. package/es/heatmap/triangulation.js +0 -38
  106. package/es/heatmap/triangulation.js.map +0 -1
  107. package/es/image/index.d.ts +0 -22
  108. package/es/image/index.js +0 -82
  109. package/es/image/index.js.map +0 -1
  110. package/es/image/models/image.d.ts +0 -18
  111. package/es/image/models/image.js +0 -127
  112. package/es/image/models/image.js.map +0 -1
  113. package/es/image/models/index.d.ts +0 -5
  114. package/es/image/models/index.js +0 -6
  115. package/es/image/models/index.js.map +0 -1
  116. package/es/index.d.ts +0 -11
  117. package/es/index.js +0 -39
  118. package/es/index.js.map +0 -1
  119. package/es/line/index.d.ts +0 -25
  120. package/es/line/index.js +0 -95
  121. package/es/line/index.js.map +0 -1
  122. package/es/line/models/arc.d.ts +0 -12
  123. package/es/line/models/arc.js +0 -281
  124. package/es/line/models/arc.js.map +0 -1
  125. package/es/line/models/arc_3d.d.ts +0 -12
  126. package/es/line/models/arc_3d.js +0 -277
  127. package/es/line/models/arc_3d.js.map +0 -1
  128. package/es/line/models/great_circle.d.ts +0 -12
  129. package/es/line/models/great_circle.js +0 -269
  130. package/es/line/models/great_circle.js.map +0 -1
  131. package/es/line/models/index.d.ts +0 -5
  132. package/es/line/models/index.js +0 -12
  133. package/es/line/models/index.js.map +0 -1
  134. package/es/line/models/line.d.ts +0 -13
  135. package/es/line/models/line.js +0 -342
  136. package/es/line/models/line.js.map +0 -1
  137. package/es/plugins/DataMappingPlugin.d.ts +0 -13
  138. package/es/plugins/DataMappingPlugin.js +0 -199
  139. package/es/plugins/DataMappingPlugin.js.map +0 -1
  140. package/es/plugins/DataSourcePlugin.d.ts +0 -7
  141. package/es/plugins/DataSourcePlugin.js +0 -73
  142. package/es/plugins/DataSourcePlugin.js.map +0 -1
  143. package/es/plugins/FeatureScalePlugin.d.ts +0 -26
  144. package/es/plugins/FeatureScalePlugin.js +0 -270
  145. package/es/plugins/FeatureScalePlugin.js.map +0 -1
  146. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -7
  147. package/es/plugins/LayerAnimateStylePlugin.js +0 -50
  148. package/es/plugins/LayerAnimateStylePlugin.js.map +0 -1
  149. package/es/plugins/LayerModelPlugin.d.ts +0 -8
  150. package/es/plugins/LayerModelPlugin.js +0 -34
  151. package/es/plugins/LayerModelPlugin.js.map +0 -1
  152. package/es/plugins/LayerStylePlugin.d.ts +0 -8
  153. package/es/plugins/LayerStylePlugin.js +0 -35
  154. package/es/plugins/LayerStylePlugin.js.map +0 -1
  155. package/es/plugins/LightingPlugin.d.ts +0 -36
  156. package/es/plugins/LightingPlugin.js +0 -100
  157. package/es/plugins/LightingPlugin.js.map +0 -1
  158. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -37
  159. package/es/plugins/MultiPassRendererPlugin.js +0 -79
  160. package/es/plugins/MultiPassRendererPlugin.js.map +0 -1
  161. package/es/plugins/PixelPickingPlugin.d.ts +0 -8
  162. package/es/plugins/PixelPickingPlugin.js +0 -112
  163. package/es/plugins/PixelPickingPlugin.js.map +0 -1
  164. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -11
  165. package/es/plugins/RegisterStyleAttributePlugin.js +0 -98
  166. package/es/plugins/RegisterStyleAttributePlugin.js.map +0 -1
  167. package/es/plugins/ShaderUniformPlugin.d.ts +0 -16
  168. package/es/plugins/ShaderUniformPlugin.js +0 -78
  169. package/es/plugins/ShaderUniformPlugin.js.map +0 -1
  170. package/es/plugins/UpdateModelPlugin.d.ts +0 -8
  171. package/es/plugins/UpdateModelPlugin.js +0 -27
  172. package/es/plugins/UpdateModelPlugin.js.map +0 -1
  173. package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -12
  174. package/es/plugins/UpdateStyleAttributePlugin.js +0 -74
  175. package/es/plugins/UpdateStyleAttributePlugin.js.map +0 -1
  176. package/es/point/index.d.ts +0 -30
  177. package/es/point/index.js +0 -130
  178. package/es/point/index.js.map +0 -1
  179. package/es/point/models/extrude.d.ts +0 -14
  180. package/es/point/models/extrude.js +0 -180
  181. package/es/point/models/extrude.js.map +0 -1
  182. package/es/point/models/fill.d.ts +0 -17
  183. package/es/point/models/fill.js +0 -247
  184. package/es/point/models/fill.js.map +0 -1
  185. package/es/point/models/icon-font.d.ts +0 -11
  186. package/es/point/models/icon-font.js +0 -181
  187. package/es/point/models/icon-font.js.map +0 -1
  188. package/es/point/models/image.d.ts +0 -11
  189. package/es/point/models/image.js +0 -207
  190. package/es/point/models/image.js.map +0 -1
  191. package/es/point/models/index.d.ts +0 -5
  192. package/es/point/models/index.js +0 -16
  193. package/es/point/models/index.js.map +0 -1
  194. package/es/point/models/normal.d.ts +0 -21
  195. package/es/point/models/normal.js +0 -155
  196. package/es/point/models/normal.js.map +0 -1
  197. package/es/point/models/text.d.ts +0 -56
  198. package/es/point/models/text.js +0 -522
  199. package/es/point/models/text.js.map +0 -1
  200. package/es/point/shape/Path.d.ts +0 -40
  201. package/es/point/shape/Path.js +0 -57
  202. package/es/point/shape/Path.js.map +0 -1
  203. package/es/point/shape/extrude.d.ts +0 -15
  204. package/es/point/shape/extrude.js +0 -58
  205. package/es/point/shape/extrude.js.map +0 -1
  206. package/es/polygon/index.d.ts +0 -22
  207. package/es/polygon/index.js +0 -124
  208. package/es/polygon/index.js.map +0 -1
  209. package/es/polygon/models/extrude.d.ts +0 -13
  210. package/es/polygon/models/extrude.js +0 -139
  211. package/es/polygon/models/extrude.js.map +0 -1
  212. package/es/polygon/models/fill.d.ts +0 -13
  213. package/es/polygon/models/fill.js +0 -108
  214. package/es/polygon/models/fill.js.map +0 -1
  215. package/es/polygon/models/index.d.ts +0 -5
  216. package/es/polygon/models/index.js +0 -20
  217. package/es/polygon/models/index.js.map +0 -1
  218. package/es/raster/buffers/triangulation.d.ts +0 -6
  219. package/es/raster/buffers/triangulation.js +0 -28
  220. package/es/raster/buffers/triangulation.js.map +0 -1
  221. package/es/raster/image.d.ts +0 -0
  222. package/es/raster/image.js +0 -2
  223. package/es/raster/image.js.map +0 -1
  224. package/es/raster/index.d.ts +0 -28
  225. package/es/raster/index.js +0 -83
  226. package/es/raster/index.js.map +0 -1
  227. package/es/raster/models/index.d.ts +0 -5
  228. package/es/raster/models/index.js +0 -7
  229. package/es/raster/models/index.js.map +0 -1
  230. package/es/raster/models/raster.d.ts +0 -19
  231. package/es/raster/models/raster.js +0 -152
  232. package/es/raster/models/raster.js.map +0 -1
  233. package/es/raster/raster.d.ts +0 -30
  234. package/es/raster/raster.js +0 -178
  235. package/es/raster/raster.js.map +0 -1
  236. package/es/raster/raster2d.d.ts +0 -27
  237. package/es/raster/raster2d.js +0 -158
  238. package/es/raster/raster2d.js.map +0 -1
  239. package/es/utils/blend.d.ts +0 -2
  240. package/es/utils/blend.js +0 -55
  241. package/es/utils/blend.js.map +0 -1
  242. package/es/utils/collision-index.d.ts +0 -47
  243. package/es/utils/collision-index.js +0 -87
  244. package/es/utils/collision-index.js.map +0 -1
  245. package/es/utils/dataMappingStyle.d.ts +0 -30
  246. package/es/utils/dataMappingStyle.js +0 -88
  247. package/es/utils/dataMappingStyle.js.map +0 -1
  248. package/es/utils/extrude_polyline.d.ts +0 -48
  249. package/es/utils/extrude_polyline.js +0 -405
  250. package/es/utils/extrude_polyline.js.map +0 -1
  251. package/es/utils/geo.d.ts +0 -3
  252. package/es/utils/geo.js +0 -24
  253. package/es/utils/geo.js.map +0 -1
  254. package/es/utils/grid-index.d.ts +0 -28
  255. package/es/utils/grid-index.js +0 -193
  256. package/es/utils/grid-index.js.map +0 -1
  257. package/es/utils/polylineNormal.d.ts +0 -9
  258. package/es/utils/polylineNormal.js +0 -171
  259. package/es/utils/polylineNormal.js.map +0 -1
  260. package/es/utils/symbol-layout.d.ts +0 -43
  261. package/es/utils/symbol-layout.js +0 -260
  262. package/es/utils/symbol-layout.js.map +0 -1
@@ -1,22 +0,0 @@
1
- import BaseLayer from '../core/BaseLayer';
2
- import { ImageModelType } from './models/index';
3
- interface IImageLayerStyleOptions {
4
- opacity: number;
5
- }
6
- export default class ImageLayer extends BaseLayer<IImageLayerStyleOptions> {
7
- type: string;
8
- buildModels(): void;
9
- rebuildModels(): void;
10
- protected getConfigSchema(): {
11
- properties: {
12
- opacity: {
13
- type: string;
14
- minimum: number;
15
- maximum: number;
16
- };
17
- };
18
- };
19
- protected getDefaultConfig(): {};
20
- protected getModelType(): ImageModelType;
21
- }
22
- export {};
package/es/image/index.js DELETED
@@ -1,82 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
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
-
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
-
13
- import BaseLayer from '../core/BaseLayer';
14
- import ImageModels from './models/index';
15
-
16
- var ImageLayer = function (_BaseLayer) {
17
- _inherits(ImageLayer, _BaseLayer);
18
-
19
- var _super = _createSuper(ImageLayer);
20
-
21
- function ImageLayer() {
22
- var _this;
23
-
24
- _classCallCheck(this, ImageLayer);
25
-
26
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
- args[_key] = arguments[_key];
28
- }
29
-
30
- _this = _super.call.apply(_super, [this].concat(args));
31
-
32
- _defineProperty(_assertThisInitialized(_this), "type", 'ImageLayer');
33
-
34
- return _this;
35
- }
36
-
37
- _createClass(ImageLayer, [{
38
- key: "buildModels",
39
- value: function buildModels() {
40
- var modelType = this.getModelType();
41
- this.layerModel = new ImageModels[modelType](this);
42
- this.models = this.layerModel.initModels();
43
- }
44
- }, {
45
- key: "rebuildModels",
46
- value: function rebuildModels() {
47
- this.models = this.layerModel.buildModels();
48
- }
49
- }, {
50
- key: "getConfigSchema",
51
- value: function getConfigSchema() {
52
- return {
53
- properties: {
54
- opacity: {
55
- type: 'number',
56
- minimum: 0,
57
- maximum: 1
58
- }
59
- }
60
- };
61
- }
62
- }, {
63
- key: "getDefaultConfig",
64
- value: function getDefaultConfig() {
65
- var type = this.getModelType();
66
- var defaultConfig = {
67
- image: {}
68
- };
69
- return defaultConfig[type];
70
- }
71
- }, {
72
- key: "getModelType",
73
- value: function getModelType() {
74
- return 'image';
75
- }
76
- }]);
77
-
78
- return ImageLayer;
79
- }(BaseLayer);
80
-
81
- export { ImageLayer as default };
82
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/image/index.ts"],"names":["BaseLayer","ImageModels","ImageLayer","modelType","getModelType","layerModel","models","initModels","buildModels","properties","opacity","type","minimum","maximum","defaultConfig","image"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,SAAP,MAAsB,mBAAtB;AACA,OAAOC,WAAP,MAA4C,gBAA5C;;IAIqBC,U;;;;;;;;;;;;;;;;2DACG,Y;;;;;;;WACtB,uBAAqB;AACnB,UAAMC,SAAS,GAAG,KAAKC,YAAL,EAAlB;AACA,WAAKC,UAAL,GAAkB,IAAIJ,WAAW,CAACE,SAAD,CAAf,CAA2B,IAA3B,CAAlB;AACA,WAAKG,MAAL,GAAc,KAAKD,UAAL,CAAgBE,UAAhB,EAAd;AACD;;;WACD,yBAAuB;AACrB,WAAKD,MAAL,GAAc,KAAKD,UAAL,CAAgBG,WAAhB,EAAd;AACD;;;WACD,2BAA4B;AAC1B,aAAO;AACLC,QAAAA,UAAU,EAAE;AACVC,UAAAA,OAAO,EAAE;AACPC,YAAAA,IAAI,EAAE,QADC;AAEPC,YAAAA,OAAO,EAAE,CAFF;AAGPC,YAAAA,OAAO,EAAE;AAHF;AADC;AADP,OAAP;AASD;;;WACD,4BAA6B;AAC3B,UAAMF,IAAI,GAAG,KAAKP,YAAL,EAAb;AACA,UAAMU,aAAa,GAAG;AACpBC,QAAAA,KAAK,EAAE;AADa,OAAtB;AAGA,aAAOD,aAAa,CAACH,IAAD,CAApB;AACD;;;WAED,wBAAyC;AACvC,aAAO,OAAP;AACD;;;;EA/BqCX,S;;SAAnBE,U","sourcesContent":["import BaseLayer from '../core/BaseLayer';\nimport ImageModels, { ImageModelType } from './models/index';\ninterface IImageLayerStyleOptions {\n opacity: number;\n}\nexport default class ImageLayer extends BaseLayer<IImageLayerStyleOptions> {\n public type: string = 'ImageLayer';\n public buildModels() {\n const modelType = this.getModelType();\n this.layerModel = new ImageModels[modelType](this);\n this.models = this.layerModel.initModels();\n }\n public rebuildModels() {\n this.models = this.layerModel.buildModels();\n }\n protected getConfigSchema() {\n return {\n properties: {\n opacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n },\n };\n }\n protected getDefaultConfig() {\n const type = this.getModelType();\n const defaultConfig = {\n image: {},\n };\n return defaultConfig[type];\n }\n\n protected getModelType(): ImageModelType {\n return 'image';\n }\n}\n"],"file":"index.js"}
@@ -1,18 +0,0 @@
1
- import { IModel, IModelUniform, ITexture2D } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class ImageModel extends BaseModel {
4
- protected texture: ITexture2D;
5
- getUninforms(): IModelUniform;
6
- initModels(): IModel[];
7
- buildModels(): IModel[];
8
- protected getConfigSchema(): {
9
- properties: {
10
- opacity: {
11
- type: string;
12
- minimum: number;
13
- maximum: number;
14
- };
15
- };
16
- };
17
- protected registerBuiltinAttributes(): void;
18
- }
@@ -1,127 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
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
-
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
-
13
- import { AttributeType, gl } from '@antv/l7-core';
14
- import BaseModel from '../../core/BaseModel';
15
- import { RasterImageTriangulation } from '../../core/triangulation';
16
- var ImageFrag = "precision mediump float;\nuniform float u_opacity: 1.0;\nuniform sampler2D u_texture;\nvarying vec2 v_texCoord;\nvoid main() {\n vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));\n gl_FragColor = color;\n gl_FragColor.a *= u_opacity;\n}\n";
17
- var ImageVert = "precision highp float;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute vec3 a_Position;\nattribute vec2 a_Uv;\nvarying vec2 v_texCoord;\n#pragma include \"projection\"\nvoid main() {\n v_texCoord = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n }\n}\n";
18
-
19
- var ImageModel = function (_BaseModel) {
20
- _inherits(ImageModel, _BaseModel);
21
-
22
- var _super = _createSuper(ImageModel);
23
-
24
- function ImageModel() {
25
- var _this;
26
-
27
- _classCallCheck(this, ImageModel);
28
-
29
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
- args[_key] = arguments[_key];
31
- }
32
-
33
- _this = _super.call.apply(_super, [this].concat(args));
34
-
35
- _defineProperty(_assertThisInitialized(_this), "texture", void 0);
36
-
37
- return _this;
38
- }
39
-
40
- _createClass(ImageModel, [{
41
- key: "getUninforms",
42
- value: function getUninforms() {
43
- var _ref = this.layer.getLayerConfig(),
44
- opacity = _ref.opacity;
45
-
46
- return {
47
- u_opacity: opacity || 1,
48
- u_texture: this.texture
49
- };
50
- }
51
- }, {
52
- key: "initModels",
53
- value: function initModels() {
54
- var _this2 = this;
55
-
56
- var source = this.layer.getSource();
57
- var createTexture2D = this.rendererService.createTexture2D;
58
- this.texture = createTexture2D({
59
- height: 0,
60
- width: 0
61
- });
62
- source.data.images.then(function (imageData) {
63
- _this2.texture = createTexture2D({
64
- data: imageData[0],
65
- width: imageData[0].width,
66
- height: imageData[0].height
67
- });
68
-
69
- _this2.layerService.renderLayers();
70
- });
71
- return [this.layer.buildLayerModel({
72
- moduleName: 'RasterImage',
73
- vertexShader: ImageVert,
74
- fragmentShader: ImageFrag,
75
- triangulation: RasterImageTriangulation,
76
- primitive: gl.TRIANGLES,
77
- depth: {
78
- enable: false
79
- },
80
- blend: this.getBlend()
81
- })];
82
- }
83
- }, {
84
- key: "buildModels",
85
- value: function buildModels() {
86
- return this.initModels();
87
- }
88
- }, {
89
- key: "getConfigSchema",
90
- value: function getConfigSchema() {
91
- return {
92
- properties: {
93
- opacity: {
94
- type: 'number',
95
- minimum: 0,
96
- maximum: 1
97
- }
98
- }
99
- };
100
- }
101
- }, {
102
- key: "registerBuiltinAttributes",
103
- value: function registerBuiltinAttributes() {
104
- this.styleAttributeService.registerStyleAttribute({
105
- name: 'uv',
106
- type: AttributeType.Attribute,
107
- descriptor: {
108
- name: 'a_Uv',
109
- buffer: {
110
- usage: gl.DYNAMIC_DRAW,
111
- data: [],
112
- type: gl.FLOAT
113
- },
114
- size: 2,
115
- update: function update(feature, featureIdx, vertex, attributeIdx) {
116
- return [vertex[3], vertex[4]];
117
- }
118
- }
119
- });
120
- }
121
- }]);
122
-
123
- return ImageModel;
124
- }(BaseModel);
125
-
126
- export { ImageModel as default };
127
- //# sourceMappingURL=image.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/image/models/image.ts"],"names":["AttributeType","gl","BaseModel","RasterImageTriangulation","ImageModel","layer","getLayerConfig","opacity","u_opacity","u_texture","texture","source","getSource","createTexture2D","rendererService","height","width","data","images","then","imageData","layerService","renderLayers","buildLayerModel","moduleName","vertexShader","ImageVert","fragmentShader","ImageFrag","triangulation","primitive","TRIANGLES","depth","enable","blend","getBlend","initModels","properties","type","minimum","maximum","styleAttributeService","registerStyleAttribute","name","Attribute","descriptor","buffer","usage","DYNAMIC_DRAW","FLOAT","size","update","feature","featureIdx","vertex","attributeIdx"],"mappings":";;;;;;;;;;;;AAAA,SACEA,aADF,EAEEC,EAFF,QAaO,eAbP;AAeA,OAAOC,SAAP,MAAsB,sBAAtB;AACA,SAASC,wBAAT,QAAyC,0BAAzC;;;;IAOqBC,U;;;;;;;;;;;;;;;;;;;;;;;WAEnB,wBAAqC;AACnC,iBAAoB,KAAKC,KAAL,CAAWC,cAAX,EAApB;AAAA,UAAQC,OAAR,QAAQA,OAAR;;AACA,aAAO;AACLC,QAAAA,SAAS,EAAED,OAAO,IAAI,CADjB;AAELE,QAAAA,SAAS,EAAE,KAAKC;AAFX,OAAP;AAID;;;WACD,sBAAoB;AAAA;;AAClB,UAAMC,MAAM,GAAG,KAAKN,KAAL,CAAWO,SAAX,EAAf;AACA,UAAQC,eAAR,GAA4B,KAAKC,eAAjC,CAAQD,eAAR;AACA,WAAKH,OAAL,GAAeG,eAAe,CAAC;AAC7BE,QAAAA,MAAM,EAAE,CADqB;AAE7BC,QAAAA,KAAK,EAAE;AAFsB,OAAD,CAA9B;AAIAL,MAAAA,MAAM,CAACM,IAAP,CAAYC,MAAZ,CAAmBC,IAAnB,CAAwB,UAACC,SAAD,EAAmC;AACzD,QAAA,MAAI,CAACV,OAAL,GAAeG,eAAe,CAAC;AAC7BI,UAAAA,IAAI,EAAEG,SAAS,CAAC,CAAD,CADc;AAE7BJ,UAAAA,KAAK,EAAEI,SAAS,CAAC,CAAD,CAAT,CAAaJ,KAFS;AAG7BD,UAAAA,MAAM,EAAEK,SAAS,CAAC,CAAD,CAAT,CAAaL;AAHQ,SAAD,CAA9B;;AAKA,QAAA,MAAI,CAACM,YAAL,CAAkBC,YAAlB;AACD,OAPD;AAQA,aAAO,CACL,KAAKjB,KAAL,CAAWkB,eAAX,CAA2B;AACzBC,QAAAA,UAAU,EAAE,aADa;AAEzBC,QAAAA,YAAY,EAAEC,SAFW;AAGzBC,QAAAA,cAAc,EAAEC,SAHS;AAIzBC,QAAAA,aAAa,EAAE1B,wBAJU;AAKzB2B,QAAAA,SAAS,EAAE7B,EAAE,CAAC8B,SALW;AAMzBC,QAAAA,KAAK,EAAE;AAAEC,UAAAA,MAAM,EAAE;AAAV,SANkB;AAOzBC,QAAAA,KAAK,EAAE,KAAKC,QAAL;AAPkB,OAA3B,CADK,CAAP;AAWD;;;WACD,uBAAqB;AACnB,aAAO,KAAKC,UAAL,EAAP;AACD;;;WAED,2BAA4B;AAC1B,aAAO;AACLC,QAAAA,UAAU,EAAE;AACV9B,UAAAA,OAAO,EAAE;AACP+B,YAAAA,IAAI,EAAE,QADC;AAEPC,YAAAA,OAAO,EAAE,CAFF;AAGPC,YAAAA,OAAO,EAAE;AAHF;AADC;AADP,OAAP;AASD;;;WAED,qCAAsC;AAEpC,WAAKC,qBAAL,CAA2BC,sBAA3B,CAAkD;AAChDC,QAAAA,IAAI,EAAE,IAD0C;AAEhDL,QAAAA,IAAI,EAAEtC,aAAa,CAAC4C,SAF4B;AAGhDC,QAAAA,UAAU,EAAE;AACVF,UAAAA,IAAI,EAAE,MADI;AAEVG,UAAAA,MAAM,EAAE;AAENC,YAAAA,KAAK,EAAE9C,EAAE,CAAC+C,YAFJ;AAGN/B,YAAAA,IAAI,EAAE,EAHA;AAINqB,YAAAA,IAAI,EAAErC,EAAE,CAACgD;AAJH,WAFE;AAQVC,UAAAA,IAAI,EAAE,CARI;AASVC,UAAAA,MAAM,EAAE,gBACNC,OADM,EAENC,UAFM,EAGNC,MAHM,EAINC,YAJM,EAKH;AACH,mBAAO,CAACD,MAAM,CAAC,CAAD,CAAP,EAAYA,MAAM,CAAC,CAAD,CAAlB,CAAP;AACD;AAhBS;AAHoC,OAAlD;AAsBD;;;;EA5EqCpD,S;;SAAnBE,U","sourcesContent":["import {\n AttributeType,\n gl,\n IEncodeFeature,\n ILayer,\n ILayerPlugin,\n IModel,\n IModelUniform,\n IRasterParserDataItem,\n IStyleAttributeService,\n ITexture2D,\n lazyInject,\n TYPES,\n} from '@antv/l7-core';\nimport { generateColorRamp, IColorRamp } from '@antv/l7-utils';\nimport BaseModel from '../../core/BaseModel';\nimport { RasterImageTriangulation } from '../../core/triangulation';\nimport ImageFrag from '../shaders/image_frag.glsl';\nimport ImageVert from '../shaders/image_vert.glsl';\n\ninterface IImageLayerStyleOptions {\n opacity: number;\n}\nexport default class ImageModel extends BaseModel {\n protected texture: ITexture2D;\n public getUninforms(): IModelUniform {\n const { opacity } = this.layer.getLayerConfig() as IImageLayerStyleOptions;\n return {\n u_opacity: opacity || 1,\n u_texture: this.texture,\n };\n }\n public initModels() {\n const source = this.layer.getSource();\n const { createTexture2D } = this.rendererService;\n this.texture = createTexture2D({\n height: 0,\n width: 0,\n });\n source.data.images.then((imageData: HTMLImageElement[]) => {\n this.texture = createTexture2D({\n data: imageData[0],\n width: imageData[0].width,\n height: imageData[0].height,\n });\n this.layerService.renderLayers();\n });\n return [\n this.layer.buildLayerModel({\n moduleName: 'RasterImage',\n vertexShader: ImageVert,\n fragmentShader: ImageFrag,\n triangulation: RasterImageTriangulation,\n primitive: gl.TRIANGLES,\n depth: { enable: false },\n blend: this.getBlend(),\n }),\n ];\n }\n public buildModels() {\n return this.initModels();\n }\n\n protected getConfigSchema() {\n return {\n properties: {\n opacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n },\n };\n }\n\n protected registerBuiltinAttributes() {\n // point layer size;\n this.styleAttributeService.registerStyleAttribute({\n name: 'uv',\n type: AttributeType.Attribute,\n descriptor: {\n name: 'a_Uv',\n buffer: {\n // give the WebGL driver a hint that this buffer may change\n usage: gl.DYNAMIC_DRAW,\n data: [],\n type: gl.FLOAT,\n },\n size: 2,\n update: (\n feature: IEncodeFeature,\n featureIdx: number,\n vertex: number[],\n attributeIdx: number,\n ) => {\n return [vertex[3], vertex[4]];\n },\n },\n });\n }\n}\n"],"file":"image.js"}
@@ -1,5 +0,0 @@
1
- export declare type ImageModelType = 'image';
2
- declare const ImageModels: {
3
- [key in ImageModelType]: any;
4
- };
5
- export default ImageModels;
@@ -1,6 +0,0 @@
1
- import ImageModel from './image';
2
- var ImageModels = {
3
- image: ImageModel
4
- };
5
- export default ImageModels;
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/image/models/index.ts"],"names":["ImageModel","ImageModels","image"],"mappings":"AAAA,OAAOA,UAAP,MAAuB,SAAvB;AAGA,IAAMC,WAA6C,GAAG;AACpDC,EAAAA,KAAK,EAAEF;AAD6C,CAAtD;AAIA,eAAeC,WAAf","sourcesContent":["import ImageModel from './image';\nexport type ImageModelType = 'image';\n\nconst ImageModels: { [key in ImageModelType]: any } = {\n image: ImageModel,\n};\n\nexport default ImageModels;\n"],"file":"index.js"}
package/es/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import CityBuildingLayer from './citybuliding/building';
2
- import BaseLayer from './core/BaseLayer';
3
- import './glsl.d';
4
- import HeatmapLayer from './heatmap';
5
- import ImageLayer from './image';
6
- import LineLayer from './line/index';
7
- import PointLayer from './point';
8
- import PolygonLayer from './polygon';
9
- import RasterLayer from './raster';
10
- import EarthLayer from './earth';
11
- export { BaseLayer, PointLayer, PolygonLayer, LineLayer, CityBuildingLayer, ImageLayer, RasterLayer, HeatmapLayer, EarthLayer, };
package/es/index.js DELETED
@@ -1,39 +0,0 @@
1
- import { container, TYPES } from '@antv/l7-core';
2
- import CityBuildingLayer from './citybuliding/building';
3
- import BaseLayer from './core/BaseLayer';
4
- import './glsl.d';
5
- import HeatmapLayer from './heatmap';
6
- import ImageLayer from './image';
7
- import LineLayer from './line/index';
8
- import PointLayer from './point';
9
- import PolygonLayer from './polygon';
10
- import RasterLayer from './raster';
11
- import EarthLayer from './earth';
12
- import DataMappingPlugin from './plugins/DataMappingPlugin';
13
- import DataSourcePlugin from './plugins/DataSourcePlugin';
14
- import FeatureScalePlugin from './plugins/FeatureScalePlugin';
15
- import LayerAnimateStylePlugin from './plugins/LayerAnimateStylePlugin';
16
- import LayerModelPlugin from './plugins/LayerModelPlugin';
17
- import LayerStylePlugin from './plugins/LayerStylePlugin';
18
- import LightingPlugin from './plugins/LightingPlugin';
19
- import MultiPassRendererPlugin from './plugins/MultiPassRendererPlugin';
20
- import PixelPickingPlugin from './plugins/PixelPickingPlugin';
21
- import RegisterStyleAttributePlugin from './plugins/RegisterStyleAttributePlugin';
22
- import ShaderUniformPlugin from './plugins/ShaderUniformPlugin';
23
- import UpdateModelPlugin from './plugins/UpdateModelPlugin';
24
- import UpdateStyleAttributePlugin from './plugins/UpdateStyleAttributePlugin';
25
- container.bind(TYPES.ILayerPlugin).to(DataSourcePlugin).inRequestScope();
26
- container.bind(TYPES.ILayerPlugin).to(RegisterStyleAttributePlugin).inRequestScope();
27
- container.bind(TYPES.ILayerPlugin).to(FeatureScalePlugin).inRequestScope();
28
- container.bind(TYPES.ILayerPlugin).to(DataMappingPlugin).inRequestScope();
29
- container.bind(TYPES.ILayerPlugin).to(LayerStylePlugin).inRequestScope();
30
- container.bind(TYPES.ILayerPlugin).to(UpdateStyleAttributePlugin).inRequestScope();
31
- container.bind(TYPES.ILayerPlugin).to(UpdateModelPlugin).inRequestScope();
32
- container.bind(TYPES.ILayerPlugin).to(MultiPassRendererPlugin).inRequestScope();
33
- container.bind(TYPES.ILayerPlugin).to(ShaderUniformPlugin).inRequestScope();
34
- container.bind(TYPES.ILayerPlugin).to(LayerAnimateStylePlugin).inRequestScope();
35
- container.bind(TYPES.ILayerPlugin).to(LightingPlugin).inRequestScope();
36
- container.bind(TYPES.ILayerPlugin).to(PixelPickingPlugin).inRequestScope();
37
- container.bind(TYPES.ILayerPlugin).to(LayerModelPlugin).inRequestScope();
38
- export { BaseLayer, PointLayer, PolygonLayer, LineLayer, CityBuildingLayer, ImageLayer, RasterLayer, HeatmapLayer, EarthLayer };
39
- //# sourceMappingURL=index.js.map
package/es/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["container","TYPES","CityBuildingLayer","BaseLayer","HeatmapLayer","ImageLayer","LineLayer","PointLayer","PolygonLayer","RasterLayer","EarthLayer","DataMappingPlugin","DataSourcePlugin","FeatureScalePlugin","LayerAnimateStylePlugin","LayerModelPlugin","LayerStylePlugin","LightingPlugin","MultiPassRendererPlugin","PixelPickingPlugin","RegisterStyleAttributePlugin","ShaderUniformPlugin","UpdateModelPlugin","UpdateStyleAttributePlugin","bind","ILayerPlugin","to","inRequestScope"],"mappings":"AAAA,SAASA,SAAT,EAAkCC,KAAlC,QAA+C,eAA/C;AACA,OAAOC,iBAAP,MAA8B,yBAA9B;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAO,UAAP;AACA,OAAOC,YAAP,MAAyB,WAAzB;AACA,OAAOC,UAAP,MAAuB,SAAvB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,UAAP,MAAuB,SAAvB;AACA,OAAOC,YAAP,MAAyB,WAAzB;AACA,OAAOC,WAAP,MAAwB,UAAxB;AAEA,OAAOC,UAAP,MAAuB,SAAvB;AAGA,OAAOC,iBAAP,MAA8B,6BAA9B;AACA,OAAOC,gBAAP,MAA6B,4BAA7B;AACA,OAAOC,kBAAP,MAA+B,8BAA/B;AACA,OAAOC,uBAAP,MAAoC,mCAApC;AACA,OAAOC,gBAAP,MAA6B,4BAA7B;AACA,OAAOC,gBAAP,MAA6B,4BAA7B;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AACA,OAAOC,uBAAP,MAAoC,mCAApC;AACA,OAAOC,kBAAP,MAA+B,8BAA/B;AACA,OAAOC,4BAAP,MAAyC,wCAAzC;AACA,OAAOC,mBAAP,MAAgC,+BAAhC;AACA,OAAOC,iBAAP,MAA8B,6BAA9B;AACA,OAAOC,0BAAP,MAAuC,sCAAvC;AAYAvB,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMd,gBAFN,EAGGe,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMN,4BAFN,EAGGO,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMb,kBAFN,EAGGc,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMf,iBAFN,EAGGgB,cAHH;AAQA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMV,gBAFN,EAGGW,cAHH;AAQA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMH,0BAFN,EAGGI,cAHH;AAQA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMJ,iBAFN,EAGGK,cAHH;AAQA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMR,uBAFN,EAGGS,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEML,mBAFN,EAGGM,cAHH;AAQA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMZ,uBAFN,EAGGa,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMT,cAFN,EAGGU,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMP,kBAFN,EAGGQ,cAHH;AAOA3B,SAAS,CACNwB,IADH,CACsBvB,KAAK,CAACwB,YAD5B,EAEGC,EAFH,CAEMX,gBAFN,EAGGY,cAHH;AAKA,SACExB,SADF,EAEEI,UAFF,EAGEC,YAHF,EAIEF,SAJF,EAKEJ,iBALF,EAMEG,UANF,EAOEI,WAPF,EAQEL,YARF,EASEM,UATF","sourcesContent":["import { container, ILayerPlugin, TYPES } from '@antv/l7-core';\nimport CityBuildingLayer from './citybuliding/building';\nimport BaseLayer from './core/BaseLayer';\nimport './glsl.d';\nimport HeatmapLayer from './heatmap';\nimport ImageLayer from './image';\nimport LineLayer from './line/index';\nimport PointLayer from './point';\nimport PolygonLayer from './polygon';\nimport RasterLayer from './raster';\n\nimport EarthLayer from './earth';\n\n// import ConfigSchemaValidationPlugin from './plugins/ConfigSchemaValidationPlugin';\nimport DataMappingPlugin from './plugins/DataMappingPlugin';\nimport DataSourcePlugin from './plugins/DataSourcePlugin';\nimport FeatureScalePlugin from './plugins/FeatureScalePlugin';\nimport LayerAnimateStylePlugin from './plugins/LayerAnimateStylePlugin';\nimport LayerModelPlugin from './plugins/LayerModelPlugin';\nimport LayerStylePlugin from './plugins/LayerStylePlugin';\nimport LightingPlugin from './plugins/LightingPlugin';\nimport MultiPassRendererPlugin from './plugins/MultiPassRendererPlugin';\nimport PixelPickingPlugin from './plugins/PixelPickingPlugin';\nimport RegisterStyleAttributePlugin from './plugins/RegisterStyleAttributePlugin';\nimport ShaderUniformPlugin from './plugins/ShaderUniformPlugin';\nimport UpdateModelPlugin from './plugins/UpdateModelPlugin';\nimport UpdateStyleAttributePlugin from './plugins/UpdateStyleAttributePlugin';\n/**\n * 校验传入参数配置项的正确性\n * @see /dev-docs/ConfigSchemaValidation.md\n */\n// container\n// .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n// .to(ConfigSchemaValidationPlugin)\n// .inRequestScope();\n/**\n * 获取 Source\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(DataSourcePlugin)\n .inRequestScope();\n/**\n * 根据 StyleAttribute 创建 VertexAttribute\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(RegisterStyleAttributePlugin)\n .inRequestScope();\n/**\n * 根据 Source 创建 Scale\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(FeatureScalePlugin)\n .inRequestScope();\n/**\n * 使用 Scale 进行数据映射\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(DataMappingPlugin)\n .inRequestScope();\n\n/**\n * 更新地图样式配置项 如active, show, hide\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(LayerStylePlugin)\n .inRequestScope();\n\n/**\n * 负责属性更新\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(UpdateStyleAttributePlugin)\n .inRequestScope();\n\n/**\n * 负责Model更新\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(UpdateModelPlugin)\n .inRequestScope();\n\n/**\n * Multi Pass 自定义渲染管线\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(MultiPassRendererPlugin)\n .inRequestScope();\n/**\n * 传入相机坐标系参数\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(ShaderUniformPlugin)\n .inRequestScope();\n\n/**\n * 传入动画参数\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(LayerAnimateStylePlugin)\n .inRequestScope();\n/**\n * 传入光照相关参数\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(LightingPlugin)\n .inRequestScope();\n/**\n * 负责拾取过程中 Encode 以及 Highlight 阶段及结束后恢复\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(PixelPickingPlugin)\n .inRequestScope();\n/**\n * 初始化Model\n */\ncontainer\n .bind<ILayerPlugin>(TYPES.ILayerPlugin)\n .to(LayerModelPlugin)\n .inRequestScope();\n\nexport {\n BaseLayer,\n PointLayer,\n PolygonLayer,\n LineLayer,\n CityBuildingLayer,\n ImageLayer,\n RasterLayer,\n HeatmapLayer,\n EarthLayer,\n};\n"],"file":"index.js"}
@@ -1,25 +0,0 @@
1
- import BaseLayer from '../core/BaseLayer';
2
- import { ILineLayerStyleOptions } from '../core/interface';
3
- import { LineModelType } from './models';
4
- export default class LineLayer extends BaseLayer<ILineLayerStyleOptions> {
5
- type: string;
6
- buildModels(): void;
7
- rebuildModels(): void;
8
- protected getConfigSchema(): {
9
- properties: {
10
- opacity: {
11
- type: string;
12
- minimum: number;
13
- maximum: number;
14
- };
15
- };
16
- };
17
- protected getDefaultConfig(): {} | {
18
- blend: string;
19
- } | {
20
- blend: string;
21
- } | {
22
- blend: string;
23
- };
24
- protected getModelType(): LineModelType;
25
- }
package/es/line/index.js DELETED
@@ -1,95 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
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
-
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
-
13
- import BaseLayer from '../core/BaseLayer';
14
- import LineModels from './models';
15
-
16
- var LineLayer = function (_BaseLayer) {
17
- _inherits(LineLayer, _BaseLayer);
18
-
19
- var _super = _createSuper(LineLayer);
20
-
21
- function LineLayer() {
22
- var _this;
23
-
24
- _classCallCheck(this, LineLayer);
25
-
26
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
- args[_key] = arguments[_key];
28
- }
29
-
30
- _this = _super.call.apply(_super, [this].concat(args));
31
-
32
- _defineProperty(_assertThisInitialized(_this), "type", 'LineLayer');
33
-
34
- return _this;
35
- }
36
-
37
- _createClass(LineLayer, [{
38
- key: "buildModels",
39
- value: function buildModels() {
40
- var shape = this.getModelType();
41
- this.layerModel = new LineModels[shape](this);
42
- this.models = this.layerModel.initModels();
43
- }
44
- }, {
45
- key: "rebuildModels",
46
- value: function rebuildModels() {
47
- this.models = this.layerModel.buildModels();
48
- }
49
- }, {
50
- key: "getConfigSchema",
51
- value: function getConfigSchema() {
52
- return {
53
- properties: {
54
- opacity: {
55
- type: 'number',
56
- minimum: 0,
57
- maximum: 1
58
- }
59
- }
60
- };
61
- }
62
- }, {
63
- key: "getDefaultConfig",
64
- value: function getDefaultConfig() {
65
- var type = this.getModelType();
66
- var defaultConfig = {
67
- line: {},
68
- arc3d: {
69
- blend: 'additive'
70
- },
71
- arc: {
72
- blend: 'additive'
73
- },
74
- greatcircle: {
75
- blend: 'additive'
76
- }
77
- };
78
- return defaultConfig[type];
79
- }
80
- }, {
81
- key: "getModelType",
82
- value: function getModelType() {
83
- var _shapeAttribute$scale;
84
-
85
- var shapeAttribute = this.styleAttributeService.getLayerStyleAttribute('shape');
86
- var shape = shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
87
- return shape || 'line';
88
- }
89
- }]);
90
-
91
- return LineLayer;
92
- }(BaseLayer);
93
-
94
- export { LineLayer as default };
95
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/line/index.ts"],"names":["BaseLayer","LineModels","LineLayer","shape","getModelType","layerModel","models","initModels","buildModels","properties","opacity","type","minimum","maximum","defaultConfig","line","arc3d","blend","arc","greatcircle","shapeAttribute","styleAttributeService","getLayerStyleAttribute","scale","field"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,SAAP,MAAsB,mBAAtB;AAEA,OAAOC,UAAP,MAA0C,UAA1C;;IAEqBC,S;;;;;;;;;;;;;;;;2DACG,W;;;;;;;WAEtB,uBAAqB;AACnB,UAAMC,KAAK,GAAG,KAAKC,YAAL,EAAd;AACA,WAAKC,UAAL,GAAkB,IAAIJ,UAAU,CAACE,KAAD,CAAd,CAAsB,IAAtB,CAAlB;AACA,WAAKG,MAAL,GAAc,KAAKD,UAAL,CAAgBE,UAAhB,EAAd;AACD;;;WACD,yBAAuB;AACrB,WAAKD,MAAL,GAAc,KAAKD,UAAL,CAAgBG,WAAhB,EAAd;AACD;;;WAED,2BAA4B;AAC1B,aAAO;AACLC,QAAAA,UAAU,EAAE;AACVC,UAAAA,OAAO,EAAE;AACPC,YAAAA,IAAI,EAAE,QADC;AAEPC,YAAAA,OAAO,EAAE,CAFF;AAGPC,YAAAA,OAAO,EAAE;AAHF;AADC;AADP,OAAP;AASD;;;WACD,4BAA6B;AAC3B,UAAMF,IAAI,GAAG,KAAKP,YAAL,EAAb;AACA,UAAMU,aAAa,GAAG;AACpBC,QAAAA,IAAI,EAAE,EADc;AAEpBC,QAAAA,KAAK,EAAE;AAAEC,UAAAA,KAAK,EAAE;AAAT,SAFa;AAGpBC,QAAAA,GAAG,EAAE;AAAED,UAAAA,KAAK,EAAE;AAAT,SAHe;AAIpBE,QAAAA,WAAW,EAAE;AAAEF,UAAAA,KAAK,EAAE;AAAT;AAJO,OAAtB;AAMA,aAAOH,aAAa,CAACH,IAAD,CAApB;AACD;;;WACD,wBAAwC;AAAA;;AACtC,UAAMS,cAAc,GAAG,KAAKC,qBAAL,CAA2BC,sBAA3B,CACrB,OADqB,CAAvB;AAGA,UAAMnB,KAAK,GAAGiB,cAAH,aAAGA,cAAH,gDAAGA,cAAc,CAAEG,KAAnB,0DAAG,sBAAuBC,KAArC;AACA,aAAOrB,KAAK,IAAI,MAAhB;AACD;;;;EAvCoCH,S;;SAAlBE,S","sourcesContent":["import BaseLayer from '../core/BaseLayer';\nimport { ILineLayerStyleOptions } from '../core/interface';\nimport LineModels, { LineModelType } from './models';\n\nexport default class LineLayer extends BaseLayer<ILineLayerStyleOptions> {\n public type: string = 'LineLayer';\n\n public buildModels() {\n const shape = this.getModelType();\n this.layerModel = new LineModels[shape](this);\n this.models = this.layerModel.initModels();\n }\n public rebuildModels() {\n this.models = this.layerModel.buildModels();\n }\n\n protected getConfigSchema() {\n return {\n properties: {\n opacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n },\n };\n }\n protected getDefaultConfig() {\n const type = this.getModelType();\n const defaultConfig = {\n line: {},\n arc3d: { blend: 'additive' },\n arc: { blend: 'additive' },\n greatcircle: { blend: 'additive' },\n };\n return defaultConfig[type];\n }\n protected getModelType(): LineModelType {\n const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(\n 'shape',\n );\n const shape = shapeAttribute?.scale?.field as LineModelType;\n return shape || 'line';\n }\n}\n"],"file":"index.js"}
@@ -1,12 +0,0 @@
1
- import { IModel, IModelUniform, ITexture2D } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class ArcModel extends BaseModel {
4
- protected texture: ITexture2D;
5
- getUninforms(): IModelUniform;
6
- getAnimateUniforms(): IModelUniform;
7
- initModels(): IModel[];
8
- clearModels(): void;
9
- buildModels(): IModel[];
10
- protected registerBuiltinAttributes(): void;
11
- private updateTexture;
12
- }