@antv/l7-layers 2.5.36 → 2.5.37-mini12

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 (286) hide show
  1. package/lib/core/BaseLayer.js +10 -4
  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/core/shape/Path.js +5 -4
  6. package/lib/core/shape/Path.js.map +1 -1
  7. package/lib/core/shape/extrude.js +1 -1
  8. package/lib/core/triangulation.js +13 -9
  9. package/lib/core/triangulation.js.map +1 -1
  10. package/lib/earth/utils.js +1 -1
  11. package/lib/heatmap/models/heatmap.js +13 -18
  12. package/lib/heatmap/models/heatmap.js.map +1 -1
  13. package/lib/image/models/image.js +28 -7
  14. package/lib/image/models/image.js.map +1 -1
  15. package/lib/imagetile/index.js +95 -0
  16. package/lib/imagetile/index.js.map +1 -0
  17. package/lib/imagetile/models/imagetile.js +177 -0
  18. package/lib/imagetile/models/imagetile.js.map +1 -0
  19. package/lib/imagetile/models/index.js +17 -0
  20. package/lib/imagetile/models/index.js.map +1 -0
  21. package/lib/imagetile/utils/ImageTile.js +99 -0
  22. package/lib/imagetile/utils/ImageTile.js.map +1 -0
  23. package/lib/imagetile/utils/Tile.js +324 -0
  24. package/lib/imagetile/utils/Tile.js.map +1 -0
  25. package/lib/imagetile/utils/lruCache.js +109 -0
  26. package/lib/imagetile/utils/lruCache.js.map +1 -0
  27. package/lib/imagetile/utils/tileCache.js +58 -0
  28. package/lib/imagetile/utils/tileCache.js.map +1 -0
  29. package/lib/index.js +16 -8
  30. package/lib/index.js.map +1 -1
  31. package/lib/line/index.js +3 -0
  32. package/lib/line/index.js.map +1 -1
  33. package/lib/line/models/arc.js +2 -2
  34. package/lib/line/models/arc_3d.js +2 -2
  35. package/lib/line/models/arcmini.js +160 -0
  36. package/lib/line/models/arcmini.js.map +1 -0
  37. package/lib/line/models/great_circle.js +2 -2
  38. package/lib/line/models/index.js +3 -0
  39. package/lib/line/models/index.js.map +1 -1
  40. package/lib/line/models/line.js +2 -2
  41. package/lib/plugins/DataMappingPlugin.js +1 -1
  42. package/lib/plugins/DataSourcePlugin.js +5 -1
  43. package/lib/plugins/DataSourcePlugin.js.map +1 -1
  44. package/lib/plugins/FeatureScalePlugin.js +5 -1
  45. package/lib/plugins/FeatureScalePlugin.js.map +1 -1
  46. package/lib/plugins/LayerAnimateStylePlugin.js +1 -1
  47. package/lib/plugins/LayerStylePlugin.js.map +1 -1
  48. package/lib/plugins/LightingPlugin.js +5 -3
  49. package/lib/plugins/LightingPlugin.js.map +1 -1
  50. package/lib/plugins/MultiPassRendererPlugin.js +1 -1
  51. package/lib/plugins/ShaderUniformPlugin.js +3 -1
  52. package/lib/plugins/ShaderUniformPlugin.js.map +1 -1
  53. package/lib/plugins/UpdateStyleAttributePlugin.js +6 -6
  54. package/lib/plugins/UpdateStyleAttributePlugin.js.map +1 -1
  55. package/lib/point/models/image.js.map +1 -1
  56. package/lib/point/shape/Path.js +5 -4
  57. package/lib/point/shape/Path.js.map +1 -1
  58. package/lib/raster/raster.js +1 -1
  59. package/lib/utils/dataMappingStyle.js +1 -1
  60. package/lib/utils/extrude_polyline.js +1 -1
  61. package/lib/utils/polylineNormal.js +1 -1
  62. package/lib/utils/symbol-layout.js +1 -1
  63. package/package.json +7 -6
  64. package/CHANGELOG.md +0 -492
  65. package/LICENSE.md +0 -21
  66. package/es/citybuliding/building.d.ts +0 -17
  67. package/es/citybuliding/building.js +0 -79
  68. package/es/citybuliding/building.js.map +0 -1
  69. package/es/citybuliding/models/build.d.ts +0 -13
  70. package/es/citybuliding/models/build.js +0 -124
  71. package/es/citybuliding/models/build.js.map +0 -1
  72. package/es/core/BaseLayer.d.ts +0 -174
  73. package/es/core/BaseLayer.js +0 -974
  74. package/es/core/BaseLayer.js.map +0 -1
  75. package/es/core/BaseModel.d.ts +0 -135
  76. package/es/core/BaseModel.js +0 -412
  77. package/es/core/BaseModel.js.map +0 -1
  78. package/es/core/interface.d.ts +0 -19
  79. package/es/core/interface.js +0 -7
  80. package/es/core/interface.js.map +0 -1
  81. package/es/core/schema.d.ts +0 -27
  82. package/es/core/schema.js +0 -23
  83. package/es/core/schema.js.map +0 -1
  84. package/es/core/shape/Path.d.ts +0 -39
  85. package/es/core/shape/Path.js +0 -57
  86. package/es/core/shape/Path.js.map +0 -1
  87. package/es/core/shape/extrude.d.ts +0 -17
  88. package/es/core/shape/extrude.js +0 -143
  89. package/es/core/shape/extrude.js.map +0 -1
  90. package/es/core/triangulation.d.ts +0 -109
  91. package/es/core/triangulation.js +0 -328
  92. package/es/core/triangulation.js.map +0 -1
  93. package/es/earth/index.d.ts +0 -17
  94. package/es/earth/index.js +0 -81
  95. package/es/earth/index.js.map +0 -1
  96. package/es/earth/models/atmosphere.d.ts +0 -9
  97. package/es/earth/models/atmosphere.js +0 -125
  98. package/es/earth/models/atmosphere.js.map +0 -1
  99. package/es/earth/models/base.d.ts +0 -16
  100. package/es/earth/models/base.js +0 -193
  101. package/es/earth/models/base.js.map +0 -1
  102. package/es/earth/models/bloomsphere.d.ts +0 -9
  103. package/es/earth/models/bloomsphere.js +0 -125
  104. package/es/earth/models/bloomsphere.js.map +0 -1
  105. package/es/earth/utils.d.ts +0 -26
  106. package/es/earth/utils.js +0 -81
  107. package/es/earth/utils.js.map +0 -1
  108. package/es/glsl.d.js +0 -2
  109. package/es/glsl.d.js.map +0 -1
  110. package/es/heatmap/index.d.ts +0 -22
  111. package/es/heatmap/index.js +0 -123
  112. package/es/heatmap/index.js.map +0 -1
  113. package/es/heatmap/models/grid.d.ts +0 -8
  114. package/es/heatmap/models/grid.js +0 -90
  115. package/es/heatmap/models/grid.js.map +0 -1
  116. package/es/heatmap/models/grid3d.d.ts +0 -8
  117. package/es/heatmap/models/grid3d.js +0 -122
  118. package/es/heatmap/models/grid3d.js.map +0 -1
  119. package/es/heatmap/models/heatmap.d.ts +0 -24
  120. package/es/heatmap/models/heatmap.js +0 -399
  121. package/es/heatmap/models/heatmap.js.map +0 -1
  122. package/es/heatmap/models/hexagon.d.ts +0 -8
  123. package/es/heatmap/models/hexagon.js +0 -90
  124. package/es/heatmap/models/hexagon.js.map +0 -1
  125. package/es/heatmap/models/index.d.ts +0 -5
  126. package/es/heatmap/models/index.js +0 -13
  127. package/es/heatmap/models/index.js.map +0 -1
  128. package/es/heatmap/triangulation.d.ts +0 -5
  129. package/es/heatmap/triangulation.js +0 -38
  130. package/es/heatmap/triangulation.js.map +0 -1
  131. package/es/image/index.d.ts +0 -22
  132. package/es/image/index.js +0 -82
  133. package/es/image/index.js.map +0 -1
  134. package/es/image/models/image.d.ts +0 -18
  135. package/es/image/models/image.js +0 -127
  136. package/es/image/models/image.js.map +0 -1
  137. package/es/image/models/index.d.ts +0 -5
  138. package/es/image/models/index.js +0 -6
  139. package/es/image/models/index.js.map +0 -1
  140. package/es/index.d.ts +0 -11
  141. package/es/index.js +0 -39
  142. package/es/index.js.map +0 -1
  143. package/es/line/index.d.ts +0 -25
  144. package/es/line/index.js +0 -95
  145. package/es/line/index.js.map +0 -1
  146. package/es/line/models/arc.d.ts +0 -12
  147. package/es/line/models/arc.js +0 -281
  148. package/es/line/models/arc.js.map +0 -1
  149. package/es/line/models/arc_3d.d.ts +0 -12
  150. package/es/line/models/arc_3d.js +0 -277
  151. package/es/line/models/arc_3d.js.map +0 -1
  152. package/es/line/models/great_circle.d.ts +0 -12
  153. package/es/line/models/great_circle.js +0 -269
  154. package/es/line/models/great_circle.js.map +0 -1
  155. package/es/line/models/index.d.ts +0 -5
  156. package/es/line/models/index.js +0 -12
  157. package/es/line/models/index.js.map +0 -1
  158. package/es/line/models/line.d.ts +0 -13
  159. package/es/line/models/line.js +0 -342
  160. package/es/line/models/line.js.map +0 -1
  161. package/es/plugins/DataMappingPlugin.d.ts +0 -13
  162. package/es/plugins/DataMappingPlugin.js +0 -199
  163. package/es/plugins/DataMappingPlugin.js.map +0 -1
  164. package/es/plugins/DataSourcePlugin.d.ts +0 -7
  165. package/es/plugins/DataSourcePlugin.js +0 -73
  166. package/es/plugins/DataSourcePlugin.js.map +0 -1
  167. package/es/plugins/FeatureScalePlugin.d.ts +0 -26
  168. package/es/plugins/FeatureScalePlugin.js +0 -270
  169. package/es/plugins/FeatureScalePlugin.js.map +0 -1
  170. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -7
  171. package/es/plugins/LayerAnimateStylePlugin.js +0 -50
  172. package/es/plugins/LayerAnimateStylePlugin.js.map +0 -1
  173. package/es/plugins/LayerModelPlugin.d.ts +0 -8
  174. package/es/plugins/LayerModelPlugin.js +0 -34
  175. package/es/plugins/LayerModelPlugin.js.map +0 -1
  176. package/es/plugins/LayerStylePlugin.d.ts +0 -8
  177. package/es/plugins/LayerStylePlugin.js +0 -35
  178. package/es/plugins/LayerStylePlugin.js.map +0 -1
  179. package/es/plugins/LightingPlugin.d.ts +0 -36
  180. package/es/plugins/LightingPlugin.js +0 -100
  181. package/es/plugins/LightingPlugin.js.map +0 -1
  182. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -37
  183. package/es/plugins/MultiPassRendererPlugin.js +0 -79
  184. package/es/plugins/MultiPassRendererPlugin.js.map +0 -1
  185. package/es/plugins/PixelPickingPlugin.d.ts +0 -8
  186. package/es/plugins/PixelPickingPlugin.js +0 -112
  187. package/es/plugins/PixelPickingPlugin.js.map +0 -1
  188. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -11
  189. package/es/plugins/RegisterStyleAttributePlugin.js +0 -98
  190. package/es/plugins/RegisterStyleAttributePlugin.js.map +0 -1
  191. package/es/plugins/ShaderUniformPlugin.d.ts +0 -16
  192. package/es/plugins/ShaderUniformPlugin.js +0 -78
  193. package/es/plugins/ShaderUniformPlugin.js.map +0 -1
  194. package/es/plugins/UpdateModelPlugin.d.ts +0 -8
  195. package/es/plugins/UpdateModelPlugin.js +0 -27
  196. package/es/plugins/UpdateModelPlugin.js.map +0 -1
  197. package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -12
  198. package/es/plugins/UpdateStyleAttributePlugin.js +0 -74
  199. package/es/plugins/UpdateStyleAttributePlugin.js.map +0 -1
  200. package/es/point/index.d.ts +0 -30
  201. package/es/point/index.js +0 -130
  202. package/es/point/index.js.map +0 -1
  203. package/es/point/models/extrude.d.ts +0 -14
  204. package/es/point/models/extrude.js +0 -180
  205. package/es/point/models/extrude.js.map +0 -1
  206. package/es/point/models/fill.d.ts +0 -17
  207. package/es/point/models/fill.js +0 -247
  208. package/es/point/models/fill.js.map +0 -1
  209. package/es/point/models/icon-font.d.ts +0 -11
  210. package/es/point/models/icon-font.js +0 -181
  211. package/es/point/models/icon-font.js.map +0 -1
  212. package/es/point/models/image.d.ts +0 -11
  213. package/es/point/models/image.js +0 -207
  214. package/es/point/models/image.js.map +0 -1
  215. package/es/point/models/index.d.ts +0 -5
  216. package/es/point/models/index.js +0 -16
  217. package/es/point/models/index.js.map +0 -1
  218. package/es/point/models/normal.d.ts +0 -21
  219. package/es/point/models/normal.js +0 -155
  220. package/es/point/models/normal.js.map +0 -1
  221. package/es/point/models/text.d.ts +0 -56
  222. package/es/point/models/text.js +0 -522
  223. package/es/point/models/text.js.map +0 -1
  224. package/es/point/shape/Path.d.ts +0 -40
  225. package/es/point/shape/Path.js +0 -57
  226. package/es/point/shape/Path.js.map +0 -1
  227. package/es/point/shape/extrude.d.ts +0 -15
  228. package/es/point/shape/extrude.js +0 -58
  229. package/es/point/shape/extrude.js.map +0 -1
  230. package/es/polygon/index.d.ts +0 -22
  231. package/es/polygon/index.js +0 -124
  232. package/es/polygon/index.js.map +0 -1
  233. package/es/polygon/models/extrude.d.ts +0 -13
  234. package/es/polygon/models/extrude.js +0 -139
  235. package/es/polygon/models/extrude.js.map +0 -1
  236. package/es/polygon/models/fill.d.ts +0 -13
  237. package/es/polygon/models/fill.js +0 -108
  238. package/es/polygon/models/fill.js.map +0 -1
  239. package/es/polygon/models/index.d.ts +0 -5
  240. package/es/polygon/models/index.js +0 -20
  241. package/es/polygon/models/index.js.map +0 -1
  242. package/es/raster/buffers/triangulation.d.ts +0 -6
  243. package/es/raster/buffers/triangulation.js +0 -28
  244. package/es/raster/buffers/triangulation.js.map +0 -1
  245. package/es/raster/image.d.ts +0 -0
  246. package/es/raster/image.js +0 -2
  247. package/es/raster/image.js.map +0 -1
  248. package/es/raster/index.d.ts +0 -28
  249. package/es/raster/index.js +0 -83
  250. package/es/raster/index.js.map +0 -1
  251. package/es/raster/models/index.d.ts +0 -5
  252. package/es/raster/models/index.js +0 -7
  253. package/es/raster/models/index.js.map +0 -1
  254. package/es/raster/models/raster.d.ts +0 -19
  255. package/es/raster/models/raster.js +0 -152
  256. package/es/raster/models/raster.js.map +0 -1
  257. package/es/raster/raster.d.ts +0 -30
  258. package/es/raster/raster.js +0 -178
  259. package/es/raster/raster.js.map +0 -1
  260. package/es/raster/raster2d.d.ts +0 -27
  261. package/es/raster/raster2d.js +0 -158
  262. package/es/raster/raster2d.js.map +0 -1
  263. package/es/utils/blend.d.ts +0 -2
  264. package/es/utils/blend.js +0 -55
  265. package/es/utils/blend.js.map +0 -1
  266. package/es/utils/collision-index.d.ts +0 -47
  267. package/es/utils/collision-index.js +0 -87
  268. package/es/utils/collision-index.js.map +0 -1
  269. package/es/utils/dataMappingStyle.d.ts +0 -30
  270. package/es/utils/dataMappingStyle.js +0 -88
  271. package/es/utils/dataMappingStyle.js.map +0 -1
  272. package/es/utils/extrude_polyline.d.ts +0 -48
  273. package/es/utils/extrude_polyline.js +0 -405
  274. package/es/utils/extrude_polyline.js.map +0 -1
  275. package/es/utils/geo.d.ts +0 -3
  276. package/es/utils/geo.js +0 -24
  277. package/es/utils/geo.js.map +0 -1
  278. package/es/utils/grid-index.d.ts +0 -28
  279. package/es/utils/grid-index.js +0 -193
  280. package/es/utils/grid-index.js.map +0 -1
  281. package/es/utils/polylineNormal.d.ts +0 -9
  282. package/es/utils/polylineNormal.js +0 -171
  283. package/es/utils/polylineNormal.js.map +0 -1
  284. package/es/utils/symbol-layout.d.ts +0 -43
  285. package/es/utils/symbol-layout.js +0 -260
  286. 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
- }