@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,79 +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 CityBuildModel from './models/build';
15
-
16
- var CityBuildingLayer = function (_BaseLayer) {
17
- _inherits(CityBuildingLayer, _BaseLayer);
18
-
19
- var _super = _createSuper(CityBuildingLayer);
20
-
21
- function CityBuildingLayer() {
22
- var _this;
23
-
24
- _classCallCheck(this, CityBuildingLayer);
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", 'PolygonLayer');
33
-
34
- return _this;
35
- }
36
-
37
- _createClass(CityBuildingLayer, [{
38
- key: "buildModels",
39
- value: function buildModels() {
40
- this.layerModel = new CityBuildModel(this);
41
- this.models = this.layerModel.initModels();
42
- }
43
- }, {
44
- key: "rebuildModels",
45
- value: function rebuildModels() {
46
- this.models = this.layerModel.buildModels();
47
- }
48
- }, {
49
- key: "setLight",
50
- value: function setLight(t) {
51
- this.updateLayerConfig({
52
- time: t
53
- });
54
- }
55
- }, {
56
- key: "getConfigSchema",
57
- value: function getConfigSchema() {
58
- return {
59
- properties: {
60
- opacity: {
61
- type: 'number',
62
- minimum: 0,
63
- maximum: 1
64
- }
65
- }
66
- };
67
- }
68
- }, {
69
- key: "getModelType",
70
- value: function getModelType() {
71
- return 'citybuilding';
72
- }
73
- }]);
74
-
75
- return CityBuildingLayer;
76
- }(BaseLayer);
77
-
78
- export { CityBuildingLayer as default };
79
- //# sourceMappingURL=building.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/citybuliding/building.ts"],"names":["BaseLayer","CityBuildModel","CityBuildingLayer","layerModel","models","initModels","buildModels","t","updateLayerConfig","time","properties","opacity","type","minimum","maximum"],"mappings":";;;;;;;;;;;;AACA,OAAOA,SAAP,MAAsB,mBAAtB;AACA,OAAOC,cAAP,MAA2B,gBAA3B;;IAEqBC,iB;;;;;;;;;;;;;;;;2DACG,c;;;;;;;WACtB,uBAAqB;AACnB,WAAKC,UAAL,GAAkB,IAAIF,cAAJ,CAAmB,IAAnB,CAAlB;AACA,WAAKG,MAAL,GAAc,KAAKD,UAAL,CAAgBE,UAAhB,EAAd;AACD;;;WACD,yBAAuB;AACrB,WAAKD,MAAL,GAAc,KAAKD,UAAL,CAAgBG,WAAhB,EAAd;AACD;;;WACD,kBAAgBC,CAAhB,EAA2B;AACzB,WAAKC,iBAAL,CAAuB;AACrBC,QAAAA,IAAI,EAAEF;AADe,OAAvB;AAGD;;;WACD,2BAA4B;AAC1B,aAAO;AACLG,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;;;WAED,wBAAiC;AAC/B,aAAO,cAAP;AACD;;;;EA5B4Cd,S;;SAA1BE,iB","sourcesContent":["import { IEncodeFeature } from '@antv/l7-core';\nimport BaseLayer from '../core/BaseLayer';\nimport CityBuildModel from './models/build';\n\nexport default class CityBuildingLayer extends BaseLayer {\n public type: string = 'PolygonLayer';\n public buildModels() {\n this.layerModel = new CityBuildModel(this);\n this.models = this.layerModel.initModels();\n }\n public rebuildModels() {\n this.models = this.layerModel.buildModels();\n }\n public setLight(t: number) {\n this.updateLayerConfig({\n time: t,\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 getModelType(): string {\n return 'citybuilding';\n }\n}\n"],"file":"building.js"}
@@ -1,13 +0,0 @@
1
- import { IModel } from '@antv/l7-core';
2
- import BaseModel from '../../core/BaseModel';
3
- export default class CityBuildModel extends BaseModel {
4
- getUninforms(): {
5
- u_opacity: number;
6
- u_baseColor: number[];
7
- u_brightColor: number[];
8
- u_windowColor: number[];
9
- u_time: number;
10
- };
11
- initModels(): IModel[];
12
- protected registerBuiltinAttributes(): void;
13
- }
@@ -1,124 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
-
7
- 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); }; }
8
-
9
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
-
11
- import { AttributeType, gl } from '@antv/l7-core';
12
- import { rgb2arr } from '@antv/l7-utils';
13
- import BaseModel from '../../core/BaseModel';
14
- import { PolygonExtrudeTriangulation } from '../../core/triangulation';
15
- var buildFrag = "uniform float u_opacity: 1.0;\nuniform vec4 u_baseColor : [ 1.0, 0, 0, 1.0 ];\nuniform vec4 u_brightColor : [ 1.0, 0, 0, 1.0 ];\nuniform vec4 u_windowColor : [ 1.0, 0, 0, 1.0 ];\nuniform float u_near : 0;\nuniform float u_far : 1;\nvarying vec4 v_Color;\nvarying vec2 v_texCoord;\nuniform float u_Zoom : 1;\nuniform float u_time;\n\n#pragma include \"picking\"\n\nvec3 getWindowColor(float n, float hot, vec3 brightColor, vec3 darkColor) {\n float s = step(hot, n);\n vec3 color = mix(brightColor,vec3(0.9,0.9,1.0),n);\n\n return mix(darkColor, color, s);\n}\nfloat random (vec2 st) {\n return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123);\n}\n\nfloat LinearizeDepth()\n{\n float z = gl_FragCoord.z * 2.0 - 1.0;\n return (2.0 * u_near * u_far) / (u_far + u_near - z * (u_far - u_near));\n}\n\nvec3 fog(vec3 color, vec3 fogColor, float depth){\n float fogFactor=clamp(depth,0.0,1.0);\n vec3 output_color=mix(fogColor,color,fogFactor);\n return output_color;\n}\n\nfloat sdRect(vec2 p, vec2 sz) {\n vec2 d = abs(p) - sz;\n float outside = length(max(d, 0.));\n float inside = min(max(d.x, d.y), 0.);\n return outside + inside;\n}\n\nvoid main() {\n gl_FragColor = v_Color;\n vec3 baseColor = u_baseColor.xyz;\n vec3 brightColor = u_brightColor.xyz;\n vec3 windowColor = u_windowColor.xyz;\n float targetColId = 5.;\n float depth = 1.0 - LinearizeDepth() / u_far * u_Zoom;\n vec3 fogColor = vec3(23.0/255.0,31.0/255.0,51.0/255.0);\n if(v_texCoord.x < 0.) { //\u9876\u90E8\u989C\u8272\n vec3 foggedColor = fog(baseColor.xyz + vec3(0.12*0.9,0.2*0.9,0.3*0.9),fogColor,depth);\n gl_FragColor = vec4( foggedColor, v_Color.w);\n }else { // \u4FA7\u9762\u989C\u8272\n vec2 st = v_texCoord;\n vec2 UvScale = v_texCoord;\n float tStep = min(0.08,max(0.05* (18.0-u_Zoom),0.02));\n float tStart = 0.25 * tStep;\n float tEnd = 0.75 * tStep;\n float u = mod(UvScale.x, tStep);\n float v = mod(UvScale.y, tStep);\n float ux = floor(UvScale.x/tStep);\n float uy = floor(UvScale.y/tStep);\n float n = random(vec2(ux,uy));\n float lightP = u_time;\n float head = 1.0- step(0.005,st.y);\n /*step3*/\n // \u5C06\u7A97\u6237\u989C\u8272\u548C\u5899\u9762\u989C\u8272\u533A\u522B\u5F00\u6765\n float sU = step(tStart, u) - step(tEnd, u);\n float sV = step(tStart, v) - step(tEnd, v);\n vec2 windowSize = vec2(abs(tEnd-tStart),abs(tEnd-tStart));\n float dist = sdRect(vec2(u,v), windowSize);\n float s = sU * sV;\n\n float curColId = floor(UvScale.x / tStep);\n float sCol = step(targetColId - 0.2, curColId) - step(targetColId + 0.2, curColId);\n\n float mLightP = mod(lightP, 2.);\n float sRow = step(mLightP - 0.2, st.y) - step(mLightP, st.y);\n if(ux == targetColId){\n n =0.;\n }\n float timeP = min(0.75, abs ( sin(u_time/3.0) ) );\n float hot = smoothstep(1.0,0.0,timeP);\n vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);\n //vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);\n float sFinal = s * sCol * sRow;\n color += mix(baseColor, brightColor, sFinal*n);\n if (st.y<0.01){\n color = baseColor;\n }\n if(head ==1.0) { // \u9876\u90E8\u4EAE\u7EBF\n color = brightColor;\n }\n color = color * v_Color.rgb;\n\n vec3 foggedColor = fog(color,fogColor,depth);\n\n gl_FragColor = vec4(foggedColor,1.0);\n }\n gl_FragColor.a *= u_opacity;\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
16
- var buildVert = "precision highp float;\n\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Normal;\nattribute float a_Size;\nuniform mat4 u_ModelMatrix;\n\nattribute vec2 a_Uv;\nvarying vec2 v_texCoord;\n\nvarying vec4 v_Color;\nuniform mat4 u_Mvp;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n vec4 project_pos = project_position(pos);\n v_texCoord = a_Uv;\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n float lightWeight = calc_lighting(pos);\n // v_Color = a_Color;\n v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);\n\n setPickingColor(a_PickingColor);\n}\n";
17
-
18
- var CityBuildModel = function (_BaseModel) {
19
- _inherits(CityBuildModel, _BaseModel);
20
-
21
- var _super = _createSuper(CityBuildModel);
22
-
23
- function CityBuildModel() {
24
- _classCallCheck(this, CityBuildModel);
25
-
26
- return _super.apply(this, arguments);
27
- }
28
-
29
- _createClass(CityBuildModel, [{
30
- key: "getUninforms",
31
- value: function getUninforms() {
32
- var _ref = this.layer.getLayerConfig(),
33
- _ref$opacity = _ref.opacity,
34
- opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
35
- _ref$baseColor = _ref.baseColor,
36
- baseColor = _ref$baseColor === void 0 ? 'rgb(16,16,16)' : _ref$baseColor,
37
- _ref$brightColor = _ref.brightColor,
38
- brightColor = _ref$brightColor === void 0 ? 'rgb(255,176,38)' : _ref$brightColor,
39
- _ref$windowColor = _ref.windowColor,
40
- windowColor = _ref$windowColor === void 0 ? 'rgb(30,60,89)' : _ref$windowColor,
41
- _ref$time = _ref.time,
42
- time = _ref$time === void 0 ? 0 : _ref$time;
43
-
44
- return {
45
- u_opacity: opacity,
46
- u_baseColor: rgb2arr(baseColor),
47
- u_brightColor: rgb2arr(brightColor),
48
- u_windowColor: rgb2arr(windowColor),
49
- u_time: this.layer.getLayerAnimateTime() || time
50
- };
51
- }
52
- }, {
53
- key: "initModels",
54
- value: function initModels() {
55
- this.startModelAnimate();
56
- return [this.layer.buildLayerModel({
57
- moduleName: 'cityBuilding',
58
- vertexShader: buildVert,
59
- fragmentShader: buildFrag,
60
- triangulation: PolygonExtrudeTriangulation
61
- })];
62
- }
63
- }, {
64
- key: "registerBuiltinAttributes",
65
- value: function registerBuiltinAttributes() {
66
- this.styleAttributeService.registerStyleAttribute({
67
- name: 'normal',
68
- type: AttributeType.Attribute,
69
- descriptor: {
70
- name: 'a_Normal',
71
- buffer: {
72
- usage: gl.STATIC_DRAW,
73
- data: [],
74
- type: gl.FLOAT
75
- },
76
- size: 3,
77
- update: function update(feature, featureIdx, vertex, attributeIdx, normal) {
78
- return normal;
79
- }
80
- }
81
- });
82
- this.styleAttributeService.registerStyleAttribute({
83
- name: 'size',
84
- type: AttributeType.Attribute,
85
- descriptor: {
86
- name: 'a_Size',
87
- buffer: {
88
- usage: gl.DYNAMIC_DRAW,
89
- data: [],
90
- type: gl.FLOAT
91
- },
92
- size: 1,
93
- update: function update(feature, featureIdx, vertex, attributeIdx) {
94
- var _feature$size = feature.size,
95
- size = _feature$size === void 0 ? 10 : _feature$size;
96
- return Array.isArray(size) ? [size[0]] : [size];
97
- }
98
- }
99
- });
100
- this.styleAttributeService.registerStyleAttribute({
101
- name: 'uv',
102
- type: AttributeType.Attribute,
103
- descriptor: {
104
- name: 'a_Uv',
105
- buffer: {
106
- usage: gl.DYNAMIC_DRAW,
107
- data: [],
108
- type: gl.FLOAT
109
- },
110
- size: 2,
111
- update: function update(feature, featureIdx, vertex, attributeIdx) {
112
- var size = feature.size;
113
- return [vertex[3], vertex[4]];
114
- }
115
- }
116
- });
117
- }
118
- }]);
119
-
120
- return CityBuildModel;
121
- }(BaseModel);
122
-
123
- export { CityBuildModel as default };
124
- //# sourceMappingURL=build.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/citybuliding/models/build.ts"],"names":["AttributeType","gl","rgb2arr","BaseModel","PolygonExtrudeTriangulation","CityBuildModel","layer","getLayerConfig","opacity","baseColor","brightColor","windowColor","time","u_opacity","u_baseColor","u_brightColor","u_windowColor","u_time","getLayerAnimateTime","startModelAnimate","buildLayerModel","moduleName","vertexShader","buildVert","fragmentShader","buildFrag","triangulation","styleAttributeService","registerStyleAttribute","name","type","Attribute","descriptor","buffer","usage","STATIC_DRAW","data","FLOAT","size","update","feature","featureIdx","vertex","attributeIdx","normal","DYNAMIC_DRAW","Array","isArray"],"mappings":"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","sourcesContent":["import { AttributeType, gl, IEncodeFeature, IModel } from '@antv/l7-core';\nimport { rgb2arr } from '@antv/l7-utils';\nimport BaseModel from '../../core/BaseModel';\nimport { PolygonExtrudeTriangulation } from '../../core/triangulation';\nimport buildFrag from '../shaders/build_frag.glsl';\nimport buildVert from '../shaders/build_vert.glsl';\ninterface ICityBuildLayerStyleOptions {\n opacity: number;\n baseColor: string;\n brightColor: string;\n windowColor: string;\n time: number;\n}\nexport default class CityBuildModel extends BaseModel {\n public getUninforms() {\n const {\n opacity = 1,\n baseColor = 'rgb(16,16,16)',\n brightColor = 'rgb(255,176,38)',\n windowColor = 'rgb(30,60,89)',\n time = 0,\n } = this.layer.getLayerConfig() as ICityBuildLayerStyleOptions;\n return {\n u_opacity: opacity,\n u_baseColor: rgb2arr(baseColor),\n u_brightColor: rgb2arr(brightColor),\n u_windowColor: rgb2arr(windowColor),\n u_time: this.layer.getLayerAnimateTime() || time,\n };\n }\n\n public initModels(): IModel[] {\n this.startModelAnimate();\n return [\n this.layer.buildLayerModel({\n moduleName: 'cityBuilding',\n vertexShader: buildVert,\n fragmentShader: buildFrag,\n triangulation: PolygonExtrudeTriangulation,\n }),\n ];\n }\n\n protected registerBuiltinAttributes() {\n // point layer size;\n this.styleAttributeService.registerStyleAttribute({\n name: 'normal',\n type: AttributeType.Attribute,\n descriptor: {\n name: 'a_Normal',\n buffer: {\n // give the WebGL driver a hint that this buffer may change\n usage: gl.STATIC_DRAW,\n data: [],\n type: gl.FLOAT,\n },\n size: 3,\n update: (\n feature: IEncodeFeature,\n featureIdx: number,\n vertex: number[],\n attributeIdx: number,\n normal: number[],\n ) => {\n return normal;\n },\n },\n });\n\n this.styleAttributeService.registerStyleAttribute({\n name: 'size',\n type: AttributeType.Attribute,\n descriptor: {\n name: 'a_Size',\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: 1,\n update: (\n feature: IEncodeFeature,\n featureIdx: number,\n vertex: number[],\n attributeIdx: number,\n ) => {\n const { size = 10 } = feature;\n return Array.isArray(size) ? [size[0]] : [size as number];\n },\n },\n });\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 const { size } = feature;\n return [vertex[3], vertex[4]];\n },\n },\n });\n }\n}\n"],"file":"build.js"}
@@ -1,174 +0,0 @@
1
- import { SyncBailHook, SyncHook, SyncWaterfallHook } from '@antv/async-hook';
2
- import { BlendType, IActiveOption, IAnimateOption, ICameraService, ICoordinateSystemService, IDataState, IEncodeFeature, IFontService, IGlobalConfigService, IIconService, IInteractionService, ILayer, ILayerConfig, ILayerModel, ILayerModelInitializationOptions, ILayerPlugin, ILayerService, IMapService, IModel, IModelInitializationOptions, IMultiPassRenderer, IPass, IPickingService, IPostProcessingPass, IRendererService, IScale, IScaleOptions, IShaderModuleService, ISourceCFG, IStyleAttributeService, IStyleAttributeUpdateOptions, StyleAttributeField, StyleAttributeOption } from '@antv/l7-core';
3
- import Source from '@antv/l7-source';
4
- import { EventEmitter } from 'eventemitter3';
5
- import { Container } from 'inversify';
6
- export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter implements ILayer {
7
- id: string;
8
- name: string;
9
- type: string;
10
- visible: boolean;
11
- zIndex: number;
12
- minZoom: number;
13
- maxZoom: number;
14
- inited: boolean;
15
- layerModelNeedUpdate: boolean;
16
- pickedFeatureID: number | null;
17
- selectedFeatureID: number | null;
18
- styleNeedUpdate: boolean;
19
- rendering: boolean;
20
- dataState: IDataState;
21
- hooks: {
22
- init: SyncBailHook;
23
- afterInit: SyncBailHook;
24
- beforeRender: SyncBailHook;
25
- beforeRenderData: SyncWaterfallHook;
26
- afterRender: SyncHook;
27
- beforePickingEncode: SyncHook;
28
- afterPickingEncode: SyncHook;
29
- beforeHighlight: SyncHook;
30
- afterHighlight: SyncHook;
31
- beforeSelect: SyncHook;
32
- afterSelect: SyncHook;
33
- beforeDestroy: SyncHook;
34
- afterDestroy: SyncHook;
35
- };
36
- models: IModel[];
37
- multiPassRenderer: IMultiPassRenderer;
38
- plugins: ILayerPlugin[];
39
- sourceOption: {
40
- data: any;
41
- options?: ISourceCFG;
42
- };
43
- layerModel: ILayerModel;
44
- protected readonly configService: IGlobalConfigService;
45
- protected readonly shaderModuleService: IShaderModuleService;
46
- protected cameraService: ICameraService;
47
- protected coordinateService: ICoordinateSystemService;
48
- protected iconService: IIconService;
49
- protected fontService: IFontService;
50
- protected pickingService: IPickingService;
51
- protected rendererService: IRendererService;
52
- protected layerService: ILayerService;
53
- protected interactionService: IInteractionService;
54
- protected mapService: IMapService;
55
- protected styleAttributeService: IStyleAttributeService;
56
- protected layerSource: Source;
57
- protected postProcessingPassFactory: (name: string) => IPostProcessingPass<unknown>;
58
- protected normalPassFactory: (name: string) => IPass<unknown>;
59
- protected animateOptions: IAnimateOption;
60
- /**
61
- * 图层容器
62
- */
63
- private container;
64
- private encodedData;
65
- private configSchema;
66
- private currentPickId;
67
- private rawConfig;
68
- private needUpdateConfig;
69
- /**
70
- * 待更新样式属性,在初始化阶段完成注册
71
- */
72
- private pendingStyleAttributes;
73
- private scaleOptions;
74
- private animateStartTime;
75
- private aniamateStatus;
76
- constructor(config?: Partial<ILayerConfig & ChildLayerStyleOptions>);
77
- getLayerConfig(): Partial<ILayerConfig & import("@antv/l7-core").ISceneConfig & ChildLayerStyleOptions>;
78
- updateLayerConfig(configToUpdate: Partial<ILayerConfig | ChildLayerStyleOptions>): void;
79
- /**
80
- * 注入图层容器,父容器为场景容器
81
- * RootContainer 1
82
- * -> SceneContainer 1.*
83
- * -> LayerContainer 1.*
84
- */
85
- setContainer(container: Container): void;
86
- getContainer(): Container;
87
- addPlugin(plugin: ILayerPlugin): ILayer;
88
- init(): this;
89
- /**
90
- * Model初始化前需要更新Model样式
91
- */
92
- prepareBuildModel(): void;
93
- color(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
94
- texture(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
95
- rotate(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
96
- size(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
97
- filter(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
98
- shape(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
99
- label(field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): this;
100
- animate(options: IAnimateOption | boolean): this;
101
- source(data: any, options?: ISourceCFG): ILayer;
102
- setData(data: any, options?: ISourceCFG): this;
103
- style(options: Partial<ChildLayerStyleOptions> & Partial<ILayerConfig>): ILayer;
104
- scale(field: string | number | IScaleOptions, cfg?: IScale): this;
105
- /**
106
- * 渲染所有的图层
107
- */
108
- renderLayers(): void;
109
- render(): ILayer;
110
- active(options: IActiveOption | boolean): this;
111
- setActive(id: number | {
112
- x: number;
113
- y: number;
114
- }, options?: IActiveOption): void;
115
- select(option: IActiveOption | boolean): ILayer;
116
- setSelect(id: number | {
117
- x: number;
118
- y: number;
119
- }, options?: IActiveOption): void;
120
- setBlend(type: keyof typeof BlendType): void;
121
- show(): ILayer;
122
- hide(): ILayer;
123
- setIndex(index: number): ILayer;
124
- setCurrentPickId(id: number): void;
125
- getCurrentPickId(): number | null;
126
- setCurrentSelectedId(id: number): void;
127
- getCurrentSelectedId(): number | null;
128
- isVisible(): boolean;
129
- setMinZoom(minZoom: number): ILayer;
130
- getMinZoom(): number;
131
- getMaxZoom(): number;
132
- get(name: string): any;
133
- setMaxZoom(maxZoom: number): ILayer;
134
- /**
135
- * zoom to layer Bounds
136
- */
137
- fitBounds(fitBoundsOptions?: unknown): ILayer;
138
- destroy(): void;
139
- clear(): void;
140
- clearModels(): void;
141
- isDirty(): boolean;
142
- setSource(source: Source): void;
143
- getSource(): Source;
144
- getScaleOptions(): IScaleOptions;
145
- setEncodedData(encodedData: IEncodeFeature[]): void;
146
- getEncodedData(): IEncodeFeature[];
147
- getLegendItems(name: string): any;
148
- pick({ x, y }: {
149
- x: number;
150
- y: number;
151
- }): void;
152
- boxSelect(box: [number, number, number, number], cb: (...args: any[]) => void): void;
153
- buildLayerModel(options: ILayerModelInitializationOptions & Partial<IModelInitializationOptions>): IModel;
154
- getTime(): number;
155
- setAnimateStartTime(): void;
156
- stopAnimate(): void;
157
- getLayerAnimateTime(): number;
158
- needPick(type: string): boolean;
159
- buildModels(): void;
160
- rebuildModels(): void;
161
- renderModels(): this;
162
- updateStyleAttribute(type: string, field: StyleAttributeField, values?: StyleAttributeOption, updateOptions?: Partial<IStyleAttributeUpdateOptions>): void;
163
- /**
164
- * 继承空方法
165
- * @param time
166
- */
167
- setEarthTime(time: number): void;
168
- protected getConfigSchema(): void;
169
- protected getModelType(): unknown;
170
- protected getDefaultConfig(): {};
171
- private sourceEvent;
172
- private reRender;
173
- private splitValuesAndCallbackInAttribute;
174
- }