@pirireis/webglobeplugins 0.9.12 → 0.9.14

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 (177) hide show
  1. package/Math/angle-calculation.js +1 -3
  2. package/Math/arc.js +29 -32
  3. package/Math/bounds/line-bbox.js +1 -3
  4. package/Math/constants.js +1 -6
  5. package/Math/frustum/types.js +1 -2
  6. package/Math/juction/arc-plane.js +32 -35
  7. package/Math/juction/line-sphere.js +9 -12
  8. package/Math/juction/plane-plane.js +15 -18
  9. package/Math/line.js +30 -33
  10. package/Math/methods.js +6 -24
  11. package/Math/plane.js +22 -25
  12. package/Math/quaternion.js +6 -9
  13. package/Math/types.js +1 -2
  14. package/Math/utils.js +2 -4
  15. package/Math/vec3.js +5 -8
  16. package/algorithms/search-binary.js +1 -4
  17. package/altitude-locator/draw-subset-obj.js +1 -3
  18. package/altitude-locator/plugin.js +34 -37
  19. package/altitude-locator/types.js +1 -3
  20. package/arrowfield/adaptor.js +1 -4
  21. package/arrowfield/index.js +3 -10
  22. package/arrowfield/plugin.js +3 -6
  23. package/bearing-line/index.js +2 -8
  24. package/bearing-line/plugin.js +62 -66
  25. package/circle-line-chain/chain-list-map.js +1 -5
  26. package/circle-line-chain/plugin.js +46 -50
  27. package/circle-line-chain/util.js +1 -5
  28. package/compass-rose/compass-rose-padding-flat.js +12 -16
  29. package/compass-rose/compass-text-writer.js +3 -7
  30. package/compass-rose/index.js +3 -7
  31. package/compassrose/compassrose.js +6 -9
  32. package/compassrose/index.js +2 -8
  33. package/heatwave/index.js +3 -10
  34. package/heatwave/isobar/objectarraylabels.js +7 -9
  35. package/heatwave/isobar/plugin.js +14 -54
  36. package/heatwave/isobar/quadtreecontours.js +2 -4
  37. package/heatwave/plugins/heatwaveglobeshell.js +9 -12
  38. package/index.js +12 -58
  39. package/package.json +1 -1
  40. package/partialrings/buffer-manager.js +2 -8
  41. package/partialrings/index.js +2 -41
  42. package/partialrings/plugin.js +13 -20
  43. package/partialrings/program.js +23 -30
  44. package/pin/pin-object-array.js +8 -13
  45. package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +3 -6
  46. package/point-heat-map/plugin-webworker.js +11 -14
  47. package/point-heat-map/point-to-heat-map-flow.js +9 -12
  48. package/point-tracks/key-methods.js +1 -4
  49. package/point-tracks/plugin.js +15 -19
  50. package/programs/arrowfield/index.js +2 -7
  51. package/programs/arrowfield/logic.js +7 -10
  52. package/programs/arrowfield/object.js +7 -13
  53. package/programs/data2legend/density-to-legend.js +6 -9
  54. package/programs/data2legend/point-to-density-texture.js +13 -16
  55. package/programs/float2legendwithratio/index.js +2 -8
  56. package/programs/float2legendwithratio/logic.js +3 -6
  57. package/programs/float2legendwithratio/object.js +5 -11
  58. package/programs/globe-util/is-globe-moved.js +3 -5
  59. package/programs/globeshell/index.js +2 -8
  60. package/programs/globeshell/wiggle/index.js +2 -8
  61. package/programs/globeshell/wiggle/logic.js +3 -6
  62. package/programs/globeshell/wiggle/object.js +5 -11
  63. package/programs/helpers/blender/program.js +3 -6
  64. package/programs/helpers/fadeaway/index.js +2 -7
  65. package/programs/helpers/fadeaway/logic.js +3 -6
  66. package/programs/helpers/fadeaway/object.js +5 -11
  67. package/programs/helpers/index.js +2 -8
  68. package/programs/index.js +9 -58
  69. package/programs/line-on-globe/angled-line.js +19 -22
  70. package/programs/line-on-globe/circle-accurate-3d.js +21 -24
  71. package/programs/line-on-globe/circle-accurate-flat.js +18 -24
  72. package/programs/line-on-globe/circle-accurate.js +27 -30
  73. package/programs/line-on-globe/circle.js +26 -29
  74. package/programs/line-on-globe/degree-padding-around-circle-3d.js +23 -26
  75. package/programs/line-on-globe/lines-color-instanced-flat.js +20 -24
  76. package/programs/line-on-globe/linestrip.js +28 -31
  77. package/programs/line-on-globe/naive-accurate-flexible.js +29 -32
  78. package/programs/line-on-globe/to-the-surface.js +15 -17
  79. package/programs/line-on-globe/util.js +1 -4
  80. package/programs/picking/pickable-renderer.js +25 -28
  81. package/programs/point-on-globe/element-globe-surface-glow.js +22 -25
  82. package/programs/point-on-globe/element-point-glow.js +26 -29
  83. package/programs/point-on-globe/square-pixel-point.js +13 -16
  84. package/programs/programcache.js +1 -6
  85. package/programs/rings/distancering/circleflatprogram.js +20 -56
  86. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +21 -58
  87. package/programs/rings/distancering/circlepaddysharedbuffer.js +1 -4
  88. package/programs/rings/distancering/index.js +5 -14
  89. package/programs/rings/distancering/paddyflatprogram.js +21 -57
  90. package/programs/rings/distancering/paddyflatprogram2d.js +21 -57
  91. package/programs/rings/distancering/paddyflatprogram3d.js +21 -57
  92. package/programs/rings/index.js +1 -17
  93. package/programs/rings/partial-ring/piece-of-pie.js +23 -25
  94. package/programs/totems/camerauniformblock.js +7 -11
  95. package/programs/totems/canvas-webglobe-info.js +6 -10
  96. package/programs/totems/gpu-selection-uniform-block.js +7 -11
  97. package/programs/totems/index.js +2 -40
  98. package/programs/two-d/pixel-padding-for-compass.js +10 -13
  99. package/programs/util.js +1 -3
  100. package/programs/vectorfields/index.js +3 -23
  101. package/programs/vectorfields/logics/drawrectangleparticles.js +9 -12
  102. package/programs/vectorfields/logics/index.js +4 -12
  103. package/programs/vectorfields/logics/pixelbased.js +10 -13
  104. package/programs/vectorfields/logics/ubo.js +1 -7
  105. package/programs/vectorfields/pingpongbuffermanager.js +1 -4
  106. package/rangerings/enum.js +2 -5
  107. package/rangerings/index.js +5 -15
  108. package/rangerings/plugin.js +61 -68
  109. package/rangerings/rangeringangletext.js +26 -29
  110. package/rangerings/ring-account.js +1 -6
  111. package/shaders/fragment-toy/firework.js +1 -4
  112. package/shaders/fragment-toy/singularity.js +1 -4
  113. package/timetracks/adaptors-line-strip.js +3 -9
  114. package/timetracks/adaptors.js +3 -8
  115. package/timetracks/index.js +5 -19
  116. package/timetracks/plugin-line-strip.js +6 -12
  117. package/timetracks/plugin.js +6 -12
  118. package/timetracks/program-line-strip.js +9 -12
  119. package/timetracks/program.js +10 -13
  120. package/timetracks/programpoint-line-strip.js +6 -9
  121. package/timetracks/programpoint.js +6 -9
  122. package/util/account/bufferoffsetmanager.js +1 -4
  123. package/util/account/index.js +3 -23
  124. package/util/account/single-attribute-buffer-management/buffer-manager.js +1 -5
  125. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +1 -5
  126. package/util/account/single-attribute-buffer-management/index.js +4 -9
  127. package/util/account/single-attribute-buffer-management/object-store.js +1 -5
  128. package/util/account/single-attribute-buffer-management/types.js +1 -2
  129. package/util/account/util.js +1 -5
  130. package/util/algorithms/search-binary.js +1 -4
  131. package/util/check/get.js +1 -5
  132. package/util/check/typecheck.js +7 -16
  133. package/util/geometry/index.js +1 -7
  134. package/util/gl-util/buffer/attribute-loader.js +2 -6
  135. package/util/gl-util/buffer/index.js +2 -5
  136. package/util/gl-util/draw-options/methods.js +2 -6
  137. package/util/gl-util/uniform-block/manager.js +2 -5
  138. package/util/heatwavedatamanager/datamanager.js +1 -4
  139. package/util/heatwavedatamanager/index.js +3 -10
  140. package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +3 -9
  141. package/util/heatwavedatamanager/pointcoordsmeta.js +1 -4
  142. package/util/index.js +13 -57
  143. package/util/interpolation/timetrack/index.js +1 -4
  144. package/util/interpolation/timetrack/timetrack-interpolator.js +6 -10
  145. package/util/interpolation/timetrack/web-worker-str.js +1 -4
  146. package/util/interpolation/timetrack/web-worker.js +2 -4
  147. package/util/jshelpers/data-filler.js +1 -4
  148. package/util/jshelpers/equality.js +1 -3
  149. package/util/jshelpers/index.js +2 -37
  150. package/util/jshelpers/timefilters.js +1 -3
  151. package/util/picking/fence.js +1 -4
  152. package/util/picking/picker-displayer.js +6 -9
  153. package/util/programs/draw-texture-on-canvas.js +6 -9
  154. package/util/programs/index.js +1 -17
  155. package/util/programs/shapesonglobe.js +9 -13
  156. package/util/programs/supersampletotextures.js +3 -7
  157. package/util/programs/texturetoglobe.js +8 -11
  158. package/util/shaderfunctions/geometrytransformations.js +24 -31
  159. package/util/shaderfunctions/index.js +2 -18
  160. package/util/shaderfunctions/nodata.js +1 -4
  161. package/util/shaderfunctions/noisefunctions.js +1 -3
  162. package/util/webglobe/gldefaultstates.js +1 -4
  163. package/util/webglobe/index.js +2 -18
  164. package/util/webglobe/rasteroverlay.js +1 -4
  165. package/util/webglobjectbuilders.js +16 -34
  166. package/util/webglobjectbuilders1.js +16 -34
  167. package/waveparticles/adaptor.js +1 -3
  168. package/waveparticles/index.js +3 -10
  169. package/waveparticles/plugin.js +9 -12
  170. package/wind/imagetovectorfieldandmagnitude.js +1 -4
  171. package/wind/index.js +5 -14
  172. package/wind/plugin.js +6 -45
  173. package/wind/vectorfieldimage.js +1 -3
  174. package/write-text/attached-text-writer.js +6 -10
  175. package/write-text/context-text.js +4 -8
  176. package/write-text/context-text3.js +7 -11
  177. package/write-text/index.js +1 -5
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PixelPaddingCompassTextWriter = void 0;
4
- const webglobe_1 = require("@pirireis/webglobe");
1
+ import { CSZMode, CSMeasureTextPositionTypes } from "@pirireis/webglobe";
5
2
  // const defaultStyle = {
6
3
  // textFont: {
7
4
  // name: 'Arial',
@@ -23,7 +20,7 @@ const webglobe_1 = require("@pirireis/webglobe");
23
20
  */
24
21
  const yGapFit = -2;
25
22
  const xGapFit = -5;
26
- class PixelPaddingCompassTextWriter {
23
+ export class PixelPaddingCompassTextWriter {
27
24
  constructor(globe, { font = {
28
25
  name: 'Arial',
29
26
  textColor: '#FFFFFF', // beyaz
@@ -53,7 +50,7 @@ class PixelPaddingCompassTextWriter {
53
50
  let currentAngle = 0;
54
51
  while (currentAngle < 360) {
55
52
  if (currentAngle > 180) {
56
- this.positions.push(webglobe_1.CSMeasureTextPositionTypes.CENTER);
53
+ this.positions.push(CSMeasureTextPositionTypes.CENTER);
57
54
  }
58
55
  else {
59
56
  this.positions.push(null);
@@ -150,4 +147,3 @@ class PixelPaddingCompassTextWriter {
150
147
  this.itemMap.clear();
151
148
  }
152
149
  }
153
- exports.PixelPaddingCompassTextWriter = PixelPaddingCompassTextWriter;
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PixelPaddingCompassTextWriter = exports.PixelPaddingCompassPlugin = void 0;
4
- const compass_text_writer_1 = require("./compass-text-writer");
5
- Object.defineProperty(exports, "PixelPaddingCompassTextWriter", { enumerable: true, get: function () { return compass_text_writer_1.PixelPaddingCompassTextWriter; } });
6
- const compass_rose_padding_flat_1 = require("./compass-rose-padding-flat");
7
- Object.defineProperty(exports, "PixelPaddingCompassPlugin", { enumerable: true, get: function () { return compass_rose_padding_flat_1.PixelPaddingCompassPlugin; } });
1
+ import { PixelPaddingCompassTextWriter } from "./compass-text-writer";
2
+ import { PixelPaddingCompassPlugin } from "./compass-rose-padding-flat";
3
+ export { PixelPaddingCompassPlugin, PixelPaddingCompassTextWriter };
@@ -1,7 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // TODO: REMOVE THIS
4
- const webglobe_1 = require("@pirireis/webglobe");
2
+ import { CSGlobe, CSObjectTypes, CSIconTypes, CSObjectArrayUpdateTypes, GlobeManager } from "@pirireis/webglobe";
5
3
  const object = {
6
4
  "displayName": "CompassRose",
7
5
  "layerType": 3,
@@ -182,12 +180,12 @@ const setData = (object, data) => {
182
180
  object.data = data;
183
181
  };
184
182
  const addSingleImageIconMap = symbolSet => url => {
185
- webglobe_1.GlobeManager.api_AddIconMap(symbolSet, url, null);
183
+ GlobeManager.api_AddIconMap(symbolSet, url, null);
186
184
  };
187
185
  const setFIDKey = (object, key) => {
188
186
  object.style.fidKey = key;
189
187
  };
190
- class CompassRose {
188
+ export default class CompassRose {
191
189
  constructor(id, globe, { size = 100, primaryKey = "__key__", symbolSet = "compassRose", iconSet = null, imageURL = null, data = null }) {
192
190
  this.id = id;
193
191
  this.globe = globe;
@@ -247,10 +245,10 @@ class CompassRose {
247
245
  bucket.attribs.push(currentPayload);
248
246
  }
249
247
  if (addBucket.coords.length > 0) {
250
- this._updateData(addBucket, webglobe_1.CSObjectArrayUpdateTypes.ADD, { attribs: false, icon: false, label: false, heading: false });
248
+ this._updateData(addBucket, CSObjectArrayUpdateTypes.ADD, { attribs: false, icon: false, label: false, heading: false });
251
249
  }
252
250
  if (updateBucket.coords.length > 0) {
253
- this._updateData(updateBucket, webglobe_1.CSObjectArrayUpdateTypes.UPDATE, { attribs: false, icon: false, label: false, heading: false });
251
+ this._updateData(updateBucket, CSObjectArrayUpdateTypes.UPDATE, { attribs: false, icon: false, label: false, heading: false });
254
252
  }
255
253
  }
256
254
  delete(dataIDs) {
@@ -271,7 +269,7 @@ class CompassRose {
271
269
  }
272
270
  });
273
271
  if (deleteBucket.coords.length > 0) {
274
- this._updateData(deleteBucket, webglobe_1.CSObjectArrayUpdateTypes.DELETE);
272
+ this._updateData(deleteBucket, CSObjectArrayUpdateTypes.DELETE);
275
273
  }
276
274
  }
277
275
  removeFromMap() {
@@ -292,5 +290,4 @@ class CompassRose {
292
290
  globe.ObjectArray.UpdateData(object, operation, [data], canChange);
293
291
  }
294
292
  }
295
- exports.default = CompassRose;
296
293
  const getID = (data, primaryKey) => data.attribs[primaryKey];
@@ -1,8 +1,2 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CompassRose = void 0;
7
- const compassrose_1 = __importDefault(require("./compassrose"));
8
- exports.CompassRose = compassrose_1.default;
1
+ import CompassRose from "./compassrose";
2
+ export { CompassRose };
package/heatwave/index.js CHANGED
@@ -1,10 +1,3 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.IsobarRasterToVector = exports.HeatWavePlugin = void 0;
7
- const heatwaveglobeshell_1 = __importDefault(require("./plugins/heatwaveglobeshell"));
8
- exports.HeatWavePlugin = heatwaveglobeshell_1.default;
9
- const plugin_1 = require("./isobar/plugin");
10
- Object.defineProperty(exports, "IsobarRasterToVector", { enumerable: true, get: function () { return plugin_1.IsobarRasterToVector; } });
1
+ import HeatWavePlugin from './plugins/heatwaveglobeshell';
2
+ import { IsobarRasterToVector } from './isobar/plugin';
3
+ export { HeatWavePlugin, IsobarRasterToVector };
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const webglobe_1 = require("@pirireis/webglobe");
1
+ import { CSGlobe, CSIconTypes, CSObjectTypes, CSObjectArrayUpdateTypes, } from "@pirireis/webglobe";
4
2
  /**
5
3
  * @typedef {Object} IconPayload
6
4
  * @property {string} app6DCode
@@ -38,7 +36,7 @@ class ObjectArrayLabels {
38
36
  },
39
37
  ];
40
38
  this.primaryKey = "id";
41
- this.objectType = webglobe_1.CSObjectTypes.POINT;
39
+ this.objectType = CSObjectTypes.POINT;
42
40
  this.filter = null;
43
41
  this.bbox = null;
44
42
  this.startLod = 2;
@@ -66,7 +64,7 @@ class ObjectArrayLabels {
66
64
  }
67
65
  this.style.labels[0].text = "${value}";
68
66
  this.style.fidKey = this.primaryKey;
69
- this.style.iconType = webglobe_1.CSIconTypes.NOICON; // milIcon ekleyebilmek için icon tipi MAP olmalı
67
+ this.style.iconType = CSIconTypes.NOICON; // milIcon ekleyebilmek için icon tipi MAP olmalı
70
68
  }
71
69
  /**
72
70
  * @param {CSGlobe} [globe]
@@ -177,13 +175,13 @@ class ObjectArrayLabels {
177
175
  }
178
176
  });
179
177
  if (paritalData.add.coords.length > 0) {
180
- this.updateData(paritalData.add, webglobe_1.CSObjectArrayUpdateTypes.ADD);
178
+ this.updateData(paritalData.add, CSObjectArrayUpdateTypes.ADD);
181
179
  }
182
180
  if (paritalData.update.coords.length > 0) {
183
- this.updateData(paritalData.update, webglobe_1.CSObjectArrayUpdateTypes.UPDATE, paritalData.canChange);
181
+ this.updateData(paritalData.update, CSObjectArrayUpdateTypes.UPDATE, paritalData.canChange);
184
182
  }
185
183
  if (paritalData.delete.coords.length > 0) {
186
- this.updateData(paritalData.delete, webglobe_1.CSObjectArrayUpdateTypes.DELETE);
184
+ this.updateData(paritalData.delete, CSObjectArrayUpdateTypes.DELETE);
187
185
  }
188
186
  }
189
187
  setPrimarykey(key) {
@@ -199,4 +197,4 @@ class ObjectArrayLabels {
199
197
  this.style.labels[0] = style;
200
198
  }
201
199
  }
202
- exports.default = ObjectArrayLabels;
200
+ export default ObjectArrayLabels;
@@ -1,47 +1,8 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.IsobarRasterToVector = void 0;
40
- const util_1 = require("../../util");
41
- const quadtreecontours_1 = __importStar(require("./quadtreecontours"));
42
- const objectarraylabels_1 = __importDefault(require("./objectarraylabels"));
43
- const typecheck_1 = require("../../util/check/typecheck");
44
- class IsobarRasterToVector {
1
+ import { ShapesOnGlobeProgram, latLongToPixelXY } from "../../util";
2
+ import ContourMipmap, { scaleParameters } from "./quadtreecontours";
3
+ import ObjectArrayLabels from "./objectarraylabels";
4
+ import { isBoolean, opacityCheck } from "../../util/check/typecheck";
5
+ export class IsobarRasterToVector {
45
6
  /**
46
7
  * @typedef {Object} IsobarData
47
8
  * @property {number} threshold
@@ -105,8 +66,8 @@ class IsobarRasterToVector {
105
66
  this.globe.DrawRender();
106
67
  }
107
68
  setFlip(xFlip, yFlip) {
108
- (0, typecheck_1.isBoolean)(xFlip);
109
- (0, typecheck_1.isBoolean)(yFlip);
69
+ isBoolean(xFlip);
70
+ isBoolean(yFlip);
110
71
  if (this.xFlip === xFlip && this.yFlip === yFlip)
111
72
  return;
112
73
  this.xFlip = xFlip;
@@ -125,7 +86,7 @@ class IsobarRasterToVector {
125
86
  this.globe.DrawRender();
126
87
  }
127
88
  setIsLabelsOn(isLabelsOn) {
128
- (0, typecheck_1.isBoolean)(isLabelsOn);
89
+ isBoolean(isLabelsOn);
129
90
  if (this._isLabelsOn === isLabelsOn)
130
91
  return;
131
92
  this._isLabelsOn = isLabelsOn;
@@ -161,7 +122,7 @@ class IsobarRasterToVector {
161
122
  return this._labelsLayer.getLabelStyle();
162
123
  }
163
124
  setOpacity(opacity) {
164
- (0, typecheck_1.opacityCheck)(opacity);
125
+ opacityCheck(opacity);
165
126
  this.program.setOpacity(opacity);
166
127
  }
167
128
  setLabelStyle(style) {
@@ -190,7 +151,7 @@ class IsobarRasterToVector {
190
151
  init(globe, gl) {
191
152
  this.gl = gl;
192
153
  this.globe = globe;
193
- this.program = new util_1.ShapesOnGlobeProgram(gl, globe, 'line_strip');
154
+ this.program = new ShapesOnGlobeProgram(gl, globe, 'line_strip');
194
155
  if (this._isLabelsOn) {
195
156
  this._createLabelsLayer();
196
157
  this._labelsLayer.addToMap();
@@ -229,7 +190,7 @@ class IsobarRasterToVector {
229
190
  return lines;
230
191
  }
231
192
  _calculateAll(data) {
232
- this.contourMipmap = new quadtreecontours_1.default(data, this.width, this.height);
193
+ this.contourMipmap = new ContourMipmap(data, this.width, this.height);
233
194
  this._calculateContours();
234
195
  this._bufferData = this._createBufferData();
235
196
  this.program.setBufferData(this._bufferData);
@@ -286,7 +247,7 @@ class IsobarRasterToVector {
286
247
  for (const line of lines) {
287
248
  let startIndex = pointCounter;
288
249
  for (const [x, y] of line) {
289
- const pixXY = (0, util_1.latLongToPixelXY)(y, x);
250
+ const pixXY = latLongToPixelXY(y, x);
290
251
  bufferData[index++] = pixXY.x;
291
252
  bufferData[index++] = pixXY.y;
292
253
  bufferData[index++] = color[0];
@@ -306,7 +267,7 @@ class IsobarRasterToVector {
306
267
  return bufferData;
307
268
  }
308
269
  _createLabelsLayer() {
309
- this._labelsLayer = new objectarraylabels_1.default(this._labelsLayerId, this.globe, this._labelStyle);
270
+ this._labelsLayer = new ObjectArrayLabels(this._labelsLayerId, this.globe, this._labelStyle);
310
271
  }
311
272
  setGeometry() {
312
273
  this.program.setGeometry();
@@ -319,9 +280,8 @@ class IsobarRasterToVector {
319
280
  this.dataManager.unregister(this.id);
320
281
  }
321
282
  }
322
- exports.IsobarRasterToVector = IsobarRasterToVector;
323
283
  const getTransformationMethod = (xFlip, yFlip, width, height, minX, minY, maxX, maxY) => {
324
- const { scaleX, scaleY } = (0, quadtreecontours_1.scaleParameters)(minX, minY, maxX, maxY, width, height);
284
+ const { scaleX, scaleY } = scaleParameters(minX, minY, maxX, maxY, width, height);
325
285
  if (xFlip && yFlip)
326
286
  return (x, y) => [maxX - x * scaleX, maxY - y * scaleY];
327
287
  if (xFlip && !yFlip)
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scaleParameters = scaleParameters;
4
1
  // © 2019 3D Robotics. License: Apache-2.0
5
2
  /* eslint no-plusplus: "off", prefer-rest-params: "off" */
6
3
  const OUTSIDE = 0;
@@ -297,4 +294,5 @@ function scaleParameters(minLongitude, minLatitude, maxLongitude, maxLatitude, w
297
294
  const scaleY = (maxLatitude - minLatitude) / height;
298
295
  return { scaleX, scaleY };
299
296
  }
300
- exports.default = ContourMipmap;
297
+ export default ContourMipmap;
298
+ export { scaleParameters };
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const util_1 = require("../../util");
4
- const programs_1 = require("../../programs");
5
- const typecheck_1 = require("../../util/check/typecheck");
1
+ import { getColorRampModed, DataManager, PointCoordinatesDataCalculator } from "../../util";
2
+ import { GlobeShellWiggle, Float2LegendWithRatio } from "../../programs";
3
+ import { opacityCheck } from "../../util/check/typecheck";
6
4
  /**
7
5
  * @param id : string
8
6
  * @param dataManager : DataManager
@@ -10,7 +8,7 @@ const typecheck_1 = require("../../util/check/typecheck");
10
8
  * @param dataWidthHeight : {width: number, height: number}
11
9
  * @param options : {bbox: number[], minMaxEdges: {min: number, max: number}, escapeValue: number, resolution: number[], meshPartition: number[]}
12
10
  */
13
- class HeatWaveGlobeShellPlugin {
11
+ export default class HeatWaveGlobeShellPlugin {
14
12
  constructor(id, dataManager, colorRampData, dataWidthHeight, { bbox = [-180, -90, 180, 90], minMaxEdges = { min: -99999, max: 99999 }, escapeValue = 99999, resolution = [2056, 2056], yFlip = true, } = {}) {
15
13
  this.id = id;
16
14
  this.dataManager = dataManager;
@@ -53,7 +51,7 @@ class HeatWaveGlobeShellPlugin {
53
51
  this.heatProgram.setEscapeValue(escapeValue);
54
52
  }
55
53
  _createPointCoordinatesDataCalculator() {
56
- this.coordinatesDataCalculator = new util_1.PointCoordinatesDataCalculator(this._bbox, this._dataWidthHeight.width, this._dataWidthHeight.height);
54
+ this.coordinatesDataCalculator = new PointCoordinatesDataCalculator(this._bbox, this._dataWidthHeight.width, this._dataWidthHeight.height);
57
55
  this.dataManager.register(this._coordinatesDataCalculatorID(), this.coordinatesDataCalculator.updateData.bind(this.coordinatesDataCalculator));
58
56
  }
59
57
  _coordinatesDataCalculatorID() {
@@ -97,7 +95,7 @@ class HeatWaveGlobeShellPlugin {
97
95
  const highest = thresholds[thresholds.length - 1];
98
96
  const range = highest - lowest;
99
97
  const clampedThresholds = thresholds.map((t) => (t - lowest) / range);
100
- const colors = (0, util_1.getColorRampModed)(values, clampedThresholds, mode);
98
+ const colors = getColorRampModed(values, clampedThresholds, mode);
101
99
  this.heatProgram.setColorRampTextureData(colors, 256);
102
100
  this.heatProgram.setColorRampRange(lowest, highest);
103
101
  this.drawHeat();
@@ -141,7 +139,7 @@ class HeatWaveGlobeShellPlugin {
141
139
  this.gl.enable(this.gl.DEPTH_TEST);
142
140
  }
143
141
  setOpacity(opacity) {
144
- (0, typecheck_1.opacityCheck)(opacity);
142
+ opacityCheck(opacity);
145
143
  this.globeShell.setOpacity(opacity);
146
144
  }
147
145
  _setAfterInit() {
@@ -153,7 +151,7 @@ class HeatWaveGlobeShellPlugin {
153
151
  this.setEscapeValue(this._escapeValue);
154
152
  }
155
153
  _init(globe, gl) {
156
- this.globeShell = new programs_1.GlobeShellWiggle(gl, globe, {
154
+ this.globeShell = new GlobeShellWiggle(gl, globe, {
157
155
  minLon: this._bbox[0],
158
156
  minLat: this._bbox[1],
159
157
  maxLon: this._bbox[2],
@@ -164,7 +162,7 @@ class HeatWaveGlobeShellPlugin {
164
162
  eastWestTied: false,
165
163
  displayMesh: false
166
164
  });
167
- this.heatProgram = new programs_1.Float2LegendWithRatio(gl);
165
+ this.heatProgram = new Float2LegendWithRatio(gl);
168
166
  this._frameBuffer = gl.createFramebuffer();
169
167
  this.dataManager.register(this.id, (ratio, t1, t2) => this._updateData(ratio, t1, t2));
170
168
  this.setResolution(this._resolution[0], this._resolution[1]);
@@ -203,4 +201,3 @@ class HeatWaveGlobeShellPlugin {
203
201
  this.heatProgram.free();
204
202
  }
205
203
  }
206
- exports.default = HeatWaveGlobeShellPlugin;
package/index.js CHANGED
@@ -1,58 +1,12 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.pointheatmap = exports.partialring = exports.arrowfield = exports.programs = exports.util = exports.heatwave = exports.compassrose = exports.rangerings = exports.timetracks = exports.waveparticles = exports.wind = void 0;
37
- const wind = __importStar(require("./wind"));
38
- exports.wind = wind;
39
- const waveparticles = __importStar(require("./waveparticles"));
40
- exports.waveparticles = waveparticles;
41
- const timetracks = __importStar(require("./timetracks"));
42
- exports.timetracks = timetracks;
43
- const arrowfield = __importStar(require("./arrowfield"));
44
- exports.arrowfield = arrowfield;
45
- const rangerings = __importStar(require("./rangerings"));
46
- exports.rangerings = rangerings;
47
- const partialring = __importStar(require("./partialrings"));
48
- exports.partialring = partialring;
49
- const compassrose = __importStar(require("./compassrose"));
50
- exports.compassrose = compassrose;
51
- const heatwave = __importStar(require("./heatwave"));
52
- exports.heatwave = heatwave;
53
- const util = __importStar(require("./util"));
54
- exports.util = util;
55
- const programs = __importStar(require("./programs"));
56
- exports.programs = programs;
57
- const pointheatmap = __importStar(require("./point-heat-map"));
58
- exports.pointheatmap = pointheatmap;
1
+ import * as wind from "./wind";
2
+ import * as waveparticles from "./waveparticles";
3
+ import * as timetracks from "./timetracks";
4
+ import * as arrowfield from "./arrowfield";
5
+ import * as rangerings from "./rangerings";
6
+ import * as partialring from "./partialrings";
7
+ import * as compassrose from "./compassrose";
8
+ import * as heatwave from "./heatwave";
9
+ import * as util from "./util";
10
+ import * as programs from "./programs";
11
+ import * as pointheatmap from "./point-heat-map";
12
+ export { wind, waveparticles, timetracks, rangerings, compassrose, heatwave, util, programs, arrowfield, partialring, pointheatmap };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "0.9.12",
3
+ "version": "0.9.14",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -1,11 +1,6 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const bufferoffsetmanager_1 = __importDefault(require("../util/account/bufferoffsetmanager"));
1
+ import BufferOffsetManager from "../util/account/bufferoffsetmanager";
7
2
  const ITEM_SIZE = 10;
8
- class BufferManager extends bufferoffsetmanager_1.default {
3
+ export default class BufferManager extends BufferOffsetManager {
9
4
  constructor(globe, gl, buffer, { initialCapacity = 10, bufferType = "DYNAMIC_DRAW" } = {}) {
10
5
  super(ITEM_SIZE, { capacity: initialCapacity });
11
6
  this.globe = globe;
@@ -78,4 +73,3 @@ class BufferManager extends bufferoffsetmanager_1.default {
78
73
  this.buffer = null;
79
74
  }
80
75
  }
81
- exports.default = BufferManager;
@@ -1,41 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.PART_OFFSET_LOOPUP = exports.RINGPARTIAL_DRAW_MODE = exports.RINGPARTIAL_ALPHA_MODE = exports.PartialRing = void 0;
37
- const plugin_1 = __importStar(require("./plugin"));
38
- exports.PartialRing = plugin_1.default;
39
- Object.defineProperty(exports, "RINGPARTIAL_ALPHA_MODE", { enumerable: true, get: function () { return plugin_1.RINGPARTIAL_ALPHA_MODE; } });
40
- Object.defineProperty(exports, "RINGPARTIAL_DRAW_MODE", { enumerable: true, get: function () { return plugin_1.RINGPARTIAL_DRAW_MODE; } });
41
- Object.defineProperty(exports, "PART_OFFSET_LOOPUP", { enumerable: true, get: function () { return plugin_1.PART_OFFSET_LOOPUP; } });
1
+ import PartialRing, { RINGPARTIAL_ALPHA_MODE, RINGPARTIAL_DRAW_MODE, PART_OFFSET_LOOPUP } from './plugin';
2
+ export { PartialRing, RINGPARTIAL_ALPHA_MODE, RINGPARTIAL_DRAW_MODE, PART_OFFSET_LOOPUP };
@@ -1,23 +1,17 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PART_OFFSET_LOOPUP = exports.RINGPARTIAL_ALPHA_MODE = exports.RINGPARTIAL_DRAW_MODE = void 0;
7
- const bufferoffsetmanager_1 = __importDefault(require("../util/account/bufferoffsetmanager"));
8
- const program_1 = require("./program");
9
- const typecheck_1 = require("../util/check/typecheck");
1
+ import BufferOffsetManager from '../util/account/bufferoffsetmanager';
2
+ import { programCache, ITEM_SIZE } from './program';
3
+ import { opacityCheck } from '../util/check/typecheck';
10
4
  const emptyBlock = new Float32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
11
- exports.RINGPARTIAL_DRAW_MODE = Object.freeze({
5
+ export const RINGPARTIAL_DRAW_MODE = Object.freeze({
12
6
  LINE_STRIP: "LINE_STRIP",
13
7
  TRIANGLE_FAN: "TRIANGLE_FAN",
14
8
  });
15
- exports.RINGPARTIAL_ALPHA_MODE = Object.freeze({
9
+ export const RINGPARTIAL_ALPHA_MODE = Object.freeze({
16
10
  CONSTANT: 0,
17
11
  FADING: 1,
18
12
  HIDE: 2,
19
13
  });
20
- exports.PART_OFFSET_LOOPUP = Object.freeze({
14
+ export const PART_OFFSET_LOOPUP = Object.freeze({
21
15
  LONG: 0,
22
16
  LAT: 1,
23
17
  START_ANGLE: 2,
@@ -26,8 +20,8 @@ exports.PART_OFFSET_LOOPUP = Object.freeze({
26
20
  RADIUS: 8,
27
21
  RGBA_MODE: 9,
28
22
  });
29
- class default_1 {
30
- constructor(id, { edgeCount = 10, drawMode = exports.RINGPARTIAL_DRAW_MODE.LINE_STRIP, startLod = 3, endLod = 13, alphaMultiplier = 1 } = {}) {
23
+ export default class {
24
+ constructor(id, { edgeCount = 10, drawMode = RINGPARTIAL_DRAW_MODE.LINE_STRIP, startLod = 3, endLod = 13, alphaMultiplier = 1 } = {}) {
31
25
  this.id = id;
32
26
  this.edgeCount = edgeCount;
33
27
  this.drawMode = drawMode;
@@ -38,7 +32,7 @@ class default_1 {
38
32
  init(globe, gl) {
39
33
  this.gl = gl;
40
34
  this.globe = globe;
41
- this.program = program_1.programCache.get(globe);
35
+ this.program = programCache.get(globe);
42
36
  const { vao, buffer } = this.program.getVaoBuffer();
43
37
  this.vao = vao;
44
38
  this.buffer = buffer;
@@ -57,7 +51,7 @@ class default_1 {
57
51
  this.drawMode = drawMode;
58
52
  }
59
53
  setOpacity(opacity) {
60
- (0, typecheck_1.opacityCheck)(opacity);
54
+ opacityCheck(opacity);
61
55
  this.alphaMultiplier = opacity;
62
56
  }
63
57
  setStartEndLOD({ startLod = null, endLod = null } = {}) {
@@ -73,12 +67,11 @@ class default_1 {
73
67
  return this.bufferManager;
74
68
  }
75
69
  free() {
76
- program_1.programCache.free(this.globe);
70
+ programCache.free(this.globe);
77
71
  this.bufferManager.free();
78
72
  }
79
73
  }
80
- exports.default = default_1;
81
- class BufferManager extends bufferoffsetmanager_1.default {
74
+ class BufferManager extends BufferOffsetManager {
82
75
  constructor(globe, gl, buffer, { initialCapacity = 10, bufferType, } = {}) {
83
76
  super(10, { capacity: initialCapacity, bufferType, });
84
77
  this.globe = globe;
@@ -86,7 +79,7 @@ class BufferManager extends bufferoffsetmanager_1.default {
86
79
  this.buffer = buffer;
87
80
  this.bufferType = bufferType;
88
81
  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
89
- gl.bufferData(gl.ARRAY_BUFFER, initialCapacity * program_1.ITEM_SIZE * 4, gl[bufferType]);
82
+ gl.bufferData(gl.ARRAY_BUFFER, initialCapacity * ITEM_SIZE * 4, gl[bufferType]);
90
83
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
91
84
  }
92
85
  /**