@pirireis/webglobeplugins 0.9.12 → 0.9.13

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,10 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const programs_1 = require("../programs");
4
- const util_1 = require("../util");
5
- const programs_2 = require("../programs");
6
- const programs_3 = require("../programs");
7
- const { PixelBasedMove, DrawRectangleParticles, PingPongBufferManager, WaveParticalUboManager } = programs_2.vectorfield;
1
+ import { GlobeShellWiggle } from "../programs";
2
+ import { defaultblendfunction } from "../util";
3
+ import { vectorfield } from "../programs";
4
+ import { FadeAway } from "../programs";
5
+ const { PixelBasedMove, DrawRectangleParticles, PingPongBufferManager, WaveParticalUboManager } = vectorfield;
8
6
  const MoveParticle = PixelBasedMove;
9
7
  const DrawParticle = DrawRectangleParticles;
10
8
  /**
@@ -16,7 +14,7 @@ const DrawParticle = DrawRectangleParticles;
16
14
  *
17
15
  */
18
16
  const MAX_PIXELS_ON_DIMENSION = 2200;
19
- class Plugin {
17
+ export default class Plugin {
20
18
  constructor(id, { dataWidth, dataHeight, fadeOpacity = 0.83, opacity = 0.75, minLon = -180, minLat = -90, maxLon = 180, maxLat = 90, patricleCount = 8000, flipY = true, drawTextureMaxPixelOnDimension = MAX_PIXELS_ON_DIMENSION } = {}) {
21
19
  this.id = id;
22
20
  this.globe = null;
@@ -51,8 +49,8 @@ class Plugin {
51
49
  this.gl = gl;
52
50
  this.moveParticle = new MoveParticle(gl);
53
51
  this.drawParticle = new DrawParticle(gl);
54
- this.fadeAway = new programs_3.FadeAway(gl);
55
- this.globeShellWiggle = new programs_1.GlobeShellWiggle(gl, globe, this._globeshellparameters);
52
+ this.fadeAway = new FadeAway(gl);
53
+ this.globeShellWiggle = new GlobeShellWiggle(gl, globe, this._globeshellparameters);
56
54
  const inPositionLocation = this.moveParticle.getInPositionLocation();
57
55
  this.bufferManager = new PingPongBufferManager(gl, this._particleCount, inPositionLocation);
58
56
  this._rgVectorFieldTexture = this._createRGTexture();
@@ -115,7 +113,7 @@ class Plugin {
115
113
  gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this._drawTextures[1 - this.____drawIndex], 0);
116
114
  fadeAway.draw(this._drawTextures[this.____drawIndex], this._fadeOpacity);
117
115
  gl.bindFramebuffer(gl.FRAMEBUFFER, null);
118
- (0, util_1.defaultblendfunction)(gl);
116
+ defaultblendfunction(gl);
119
117
  gl.viewport(0, 0, canvasWidth, canvasHeight);
120
118
  }
121
119
  globeShellWiggle.setTexture(this._drawTextures[this.____drawIndex]);
@@ -263,4 +261,3 @@ class Plugin {
263
261
  this._drawTextures = [this._createDrawTexture(), this._createDrawTexture()];
264
262
  }
265
263
  }
266
- exports.default = Plugin;
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = imageToMagnitude;
4
1
  /**
5
2
  * @param {ImageData} imageData
6
3
  * image
@@ -10,7 +7,7 @@ exports.default = imageToMagnitude;
10
7
  * width
11
8
  * @returns {Float32Array}
12
9
  */
13
- function imageToMagnitude(imageData) {
10
+ export default function imageToMagnitude(imageData) {
14
11
  const { image, uMax, vMax, uMin, vMin, height, width } = imageData;
15
12
  const canvas = document.createElement('canvas');
16
13
  const ctx = canvas.getContext('2d');
package/wind/index.js CHANGED
@@ -1,14 +1,5 @@
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.createImageFromBase64 = exports.WindPlugin = exports.imageToMagnitude = exports.createVectorFieldImage = void 0;
7
- const plugin_1 = __importDefault(require("./plugin"));
8
- exports.WindPlugin = plugin_1.default;
9
- const vectorfieldimage_1 = __importDefault(require("./vectorfieldimage"));
10
- exports.createVectorFieldImage = vectorfieldimage_1.default;
11
- const imagetovectorfieldandmagnitude_1 = __importDefault(require("./imagetovectorfieldandmagnitude"));
12
- exports.imageToMagnitude = imagetovectorfieldandmagnitude_1.default;
13
- const webglobjectbuilders_1 = require("../util/webglobjectbuilders");
14
- Object.defineProperty(exports, "createImageFromBase64", { enumerable: true, get: function () { return webglobjectbuilders_1.createImageFromBase64; } });
1
+ import WindPlugin from "./plugin";
2
+ import createVectorFieldImage from "./vectorfieldimage";
3
+ import imageToMagnitude from "./imagetovectorfieldandmagnitude";
4
+ import { createImageFromBase64 } from "../util/webglobjectbuilders";
5
+ export { createVectorFieldImage, imageToMagnitude, WindPlugin, createImageFromBase64 };
package/wind/plugin.js CHANGED
@@ -1,47 +1,9 @@
1
- "use strict";
2
1
  /**
3
2
  * Author: Toprak Nihat Deniz Ozturk
4
3
  */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- const util = __importStar(require("../util"));
43
- const imagetovectorfieldandmagnitude_1 = __importDefault(require("./imagetovectorfieldandmagnitude"));
44
- const util_1 = require("../util");
4
+ import * as util from "../util";
5
+ import imageToMagnitude from "./imagetovectorfieldandmagnitude";
6
+ import { PointCoordinatesDataCalculator } from "../util";
45
7
  /**
46
8
  * Shader Dökümanı:
47
9
  * * Vektör alan haritasında kaçış değeri
@@ -357,7 +319,7 @@ const windyLegendData = {
357
319
  "#5B88A1"
358
320
  ]
359
321
  };
360
- class WindPlugin {
322
+ export default class WindPlugin {
361
323
  /**
362
324
  * @param {String} id
363
325
  * @param {Object} windDataMeta
@@ -576,14 +538,14 @@ class WindPlugin {
576
538
  }
577
539
  _createPointCoordinatesDataCalculator() {
578
540
  const { bbox, width, height } = this._windDataMeta;
579
- this.coordinatesDataCalculator = new util_1.PointCoordinatesDataCalculator(bbox, width, height);
541
+ this.coordinatesDataCalculator = new PointCoordinatesDataCalculator(bbox, width, height);
580
542
  this._setCoorcinatesDataCalculatorData();
581
543
  }
582
544
  _setCoorcinatesDataCalculatorData() {
583
545
  if (!this.windData || !this.coordinatesDataCalculator) {
584
546
  return;
585
547
  }
586
- const magnitude = (0, imagetovectorfieldandmagnitude_1.default)(this.windData);
548
+ const magnitude = imageToMagnitude(this.windData);
587
549
  this.coordinatesDataCalculator.updateData(0, magnitude, magnitude);
588
550
  }
589
551
  // -----------------------------------------------
@@ -923,4 +885,3 @@ class WindPlugin {
923
885
  gl.deleteBuffer(this.particleIndexBuffer);
924
886
  }
925
887
  }
926
- exports.default = WindPlugin;
@@ -1,5 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  function getVectorField(u, v, width, height, vMin, vMax, uMin, uMax, flip) {
4
2
  const data = new Uint8ClampedArray(width * height * 4);
5
3
  for (let row = 0; row < height; row++) {
@@ -22,4 +20,4 @@ function getVectorField(u, v, width, height, vMin, vMax, uMin, uMax, flip) {
22
20
  }
23
21
  return data;
24
22
  }
25
- exports.default = getVectorField;
23
+ export default getVectorField;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AttachedTextWriter = void 0;
4
- const webglobe_1 = require("@pirireis/webglobe");
5
- const typecheck_1 = require("../util/check/typecheck");
1
+ import { CSZMode } from "@pirireis/webglobe";
2
+ import { isTextFont, opacityCheck } from "../util/check/typecheck";
6
3
  /**
7
4
  * Light wight version of context text writer.
8
5
  * The parameters by text are calculated on user side and inserted as items. (ContextTextWriter3 constructs text data from items)
@@ -14,7 +11,7 @@ const typecheck_1 = require("../util/check/typecheck");
14
11
  * With AttachedTextWriter the glue is created by user.
15
12
  * I observed that the users generally uses a wrapper around the plugin logic anyway. This wrapper can be used as the glue for plugin and attacked writer.
16
13
  */
17
- class AttachedTextWriter {
14
+ export class AttachedTextWriter {
18
15
  constructor(globe, { style = {
19
16
  textFont: {
20
17
  name: 'Arial',
@@ -26,7 +23,7 @@ class AttachedTextWriter {
26
23
  italic: false,
27
24
  },
28
25
  opacity: 1.0,
29
- zMode: webglobe_1.CSZMode.Z_GROUND_PERVERTEX,
26
+ zMode: CSZMode.Z_GROUND_PERVERTEX,
30
27
  }, doDraw = true, angleOnSphere = false, zoomLevelAdaptor = (zoomLevel) => (item) => {
31
28
  return {
32
29
  opacityMultiplier: 1,
@@ -41,12 +38,12 @@ class AttachedTextWriter {
41
38
  this.setStyle(style);
42
39
  }
43
40
  setOpacity(opacity) {
44
- (0, typecheck_1.opacityCheck)(opacity);
41
+ opacityCheck(opacity);
45
42
  this._style.opacity = opacity;
46
43
  this.globe.DrawRender();
47
44
  }
48
45
  setStyle(style) {
49
- (0, typecheck_1.isTextFont)(style.textFont);
46
+ isTextFont(style.textFont);
50
47
  this._style = style;
51
48
  this.globe.DrawRender();
52
49
  }
@@ -88,4 +85,3 @@ class AttachedTextWriter {
88
85
  textFont.size = theSize;
89
86
  }
90
87
  }
91
- exports.AttachedTextWriter = AttachedTextWriter;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContextTextWriter = void 0;
4
- const webglobe_1 = require("@pirireis/webglobe");
1
+ import { CSZMode } from "@pirireis/webglobe";
5
2
  const defaultStyle = {
6
3
  textFont: {
7
4
  name: 'Arial',
@@ -13,9 +10,9 @@ const defaultStyle = {
13
10
  italic: false,
14
11
  },
15
12
  opacity: 1.0,
16
- zMode: webglobe_1.CSZMode.Z_GROUND_PERVERTEX,
13
+ zMode: CSZMode.Z_GROUND_PERVERTEX,
17
14
  };
18
- class ContextTextWriter {
15
+ export class ContextTextWriter {
19
16
  constructor(globe, { style = null, doDraw = true } = {}) {
20
17
  this.globe = globe;
21
18
  this.itemMap = new Map();
@@ -45,7 +42,7 @@ class ContextTextWriter {
45
42
  long: long,
46
43
  lat: lat,
47
44
  z: 0,
48
- }, style.zMode === webglobe_1.CSZMode.Z_MSL);
45
+ }, style.zMode === CSZMode.Z_MSL);
49
46
  const o = opacity === null ? opacity_ : opacity * opacity_;
50
47
  if (x !== null && y !== null)
51
48
  globe.api_DrawContextTextMultiLine(text, textFont, o, { x, y });
@@ -95,4 +92,3 @@ class ContextTextWriter {
95
92
  this.itemMap.clear();
96
93
  }
97
94
  }
98
- exports.ContextTextWriter = ContextTextWriter;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContextTextWriter3 = void 0;
4
- const webglobe_1 = require("@pirireis/webglobe");
5
- const typecheck_1 = require("../util/check/typecheck");
1
+ import { CSZMode } from "@pirireis/webglobe";
2
+ import { isTextFont, opacityCheck } from "../util/check/typecheck";
6
3
  /**
7
4
  * TODOs:
8
5
  * 1) update all if initials change (propably need a context and a callback to iterate over zPayload)
@@ -11,7 +8,7 @@ const typecheck_1 = require("../util/check/typecheck");
11
8
  *
12
9
  * TODO: key check and raise error if doesnt exist
13
10
  */
14
- class ContextTextWriter3 {
11
+ export class ContextTextWriter3 {
15
12
  constructor(globe, { style = {
16
13
  textFont: {
17
14
  name: 'Arial',
@@ -23,7 +20,7 @@ class ContextTextWriter3 {
23
20
  italic: false,
24
21
  },
25
22
  opacity: 1.0,
26
- zMode: webglobe_1.CSZMode.Z_GROUND_PERVERTEX,
23
+ zMode: CSZMode.Z_GROUND_PERVERTEX,
27
24
  }, xOffset = 0, yOffset = 0, doDraw = true, textAdaptor = null, coordinatesAdaptor = null, keyAdaptor = null, opacityAdaptor = null, angleAdaptor = null, angleOnSphere = false, positionAdaptor = (item, i, container, properties) => "left", zoomLevelAdaptor = (zoomLevel) => (item) => {
28
25
  return {
29
26
  opacityMultiplier: 1,
@@ -82,8 +79,8 @@ class ContextTextWriter3 {
82
79
  this.globe.DrawRender();
83
80
  }
84
81
  setStyle(style) {
85
- (0, typecheck_1.isTextFont)(style.textFont);
86
- (0, typecheck_1.opacityCheck)(style.opacity); //TODO: use shallow copy
82
+ isTextFont(style.textFont);
83
+ opacityCheck(style.opacity); //TODO: use shallow copy
87
84
  this.style = style;
88
85
  this.globe.DrawRender();
89
86
  }
@@ -107,7 +104,7 @@ class ContextTextWriter3 {
107
104
  long: long,
108
105
  lat: lat,
109
106
  z: 0,
110
- }, style.zMode === webglobe_1.CSZMode.Z_MSL);
107
+ }, style.zMode === CSZMode.Z_MSL);
111
108
  const { opacityMultiplier, sizeMultiplier } = zoomAdaptor(zPayload);
112
109
  const o = (opacity === null ? opacity_ : opacity * opacity_) * opacityMultiplier;
113
110
  textFont.size = sizeMultiplier * textSize;
@@ -152,4 +149,3 @@ class ContextTextWriter3 {
152
149
  this.itemMap = null;
153
150
  }
154
151
  }
155
- exports.ContextTextWriter3 = ContextTextWriter3;
@@ -1,5 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContextTextWriter = void 0;
4
- var context_text_1 = require("./context-text");
5
- Object.defineProperty(exports, "ContextTextWriter", { enumerable: true, get: function () { return context_text_1.ContextTextWriter; } });
1
+ export { ContextTextWriter } from "./context-text";