@pirireis/webglobeplugins 0.16.4 → 0.17.0

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 (168) hide show
  1. package/Math/angle-calculation.js +1 -0
  2. package/Math/arc.js +92 -2
  3. package/Math/circle-cdf-points.js +2 -2
  4. package/Math/circle.js +2 -2
  5. package/Math/contour/quadtreecontours.js +300 -0
  6. package/Math/finite-line-2d.js +58 -0
  7. package/Math/juction/arc-plane.js +67 -12
  8. package/Math/juction/line-sphere.js +6 -6
  9. package/Math/juction/plane-plane.js +4 -6
  10. package/Math/methods.js +5 -5
  11. package/Math/templete-shapes/grid-visually-equal.js +0 -1
  12. package/Math/tessellation/earcut/adapters.js +37 -0
  13. package/Math/tessellation/hybrid-triangle-tessellation-meta.js +123 -0
  14. package/Math/tessellation/methods.js +46 -0
  15. package/Math/tessellation/shred-input.js +18 -0
  16. package/Math/tessellation/tile-merger.js +56 -0
  17. package/Math/tessellation/tiler.js +50 -0
  18. package/Math/tessellation/triangle-tessellation-meta.js +516 -0
  19. package/Math/tessellation/triangle-tessellation.js +14 -0
  20. package/Math/tessellation/zoom-catch.js +1 -0
  21. package/Math/vec3.js +26 -1
  22. package/compass-rose/compass-text-writer.js +39 -33
  23. package/constants.js +3 -0
  24. package/{util/heatwavedatamanager → heatwave}/datamanager.js +1 -1
  25. package/heatwave/{plugins/heatwaveglobeshell.js → heatwave.js} +8 -6
  26. package/heatwave/index.js +5 -3
  27. package/heatwave/{isobar/plugin.js → isobar.js} +6 -5
  28. package/{util/heatwavedatamanager → heatwave}/texture-point-sampler.js +24 -3
  29. package/package.json +7 -3
  30. package/programs/arrowfield/{object.js → arrow-field.js} +1 -1
  31. package/programs/arrowfield/logic.js +1 -1
  32. package/programs/data2legend/density-to-legend.js +24 -29
  33. package/programs/data2legend/point-to-density-texture.js +14 -17
  34. package/programs/float2legendwithratio/logic.js +2 -2
  35. package/programs/float2legendwithratio/object.js +1 -1
  36. package/programs/helpers/{blender/program.js → blender.js} +1 -1
  37. package/programs/helpers/{fadeaway/logic.js → fadeaway.js} +11 -2
  38. package/programs/index.js +20 -9
  39. package/programs/line-on-globe/circle-accurate-3d.js +12 -14
  40. package/programs/line-on-globe/circle-accurate-flat.js +0 -1
  41. package/programs/line-on-globe/degree-padding-around-circle-3d.js +13 -15
  42. package/programs/line-on-globe/lines-color-instanced-flat.js +15 -18
  43. package/programs/line-on-globe/naive-accurate-flexible.js +0 -1
  44. package/programs/picking/pickable-polygon-renderer.js +1 -1
  45. package/programs/picking/pickable-renderer.js +2 -2
  46. package/programs/point-on-globe/element-globe-surface-glow.js +2 -2
  47. package/programs/point-on-globe/element-point-glow.js +1 -1
  48. package/programs/point-on-globe/square-pixel-point.js +1 -1
  49. package/programs/polygon-on-globe/texture-dem-triangle-test-plugin-triangle.js +204 -0
  50. package/programs/polygon-on-globe/texture-dem-triangle-test-plugin.js +31 -10
  51. package/programs/polygon-on-globe/texture-dem-triangles.js +81 -12
  52. package/programs/rings/partial-ring/piece-of-pie.js +26 -29
  53. package/programs/totems/camerauniformblock.js +34 -45
  54. package/programs/two-d/pixel-padding-for-compass.js +14 -24
  55. package/programs/vectorfields/logics/drawrectangleparticles.js +1 -2
  56. package/programs/vectorfields/logics/pixelbased.js +1 -2
  57. package/programs/vectorfields/pingpongbuffermanager.js +1 -1
  58. package/range-tools-on-terrain/bearing-line/adapters.js +1 -1
  59. package/range-tools-on-terrain/circle-line-chain/adapters.js +0 -5
  60. package/range-tools-on-terrain/circle-line-chain/plugin.js +1 -1
  61. package/range-tools-on-terrain/range-ring/plugin.js +4 -6
  62. package/semiplugins/lightweight/line-plugin.js +0 -1
  63. package/semiplugins/shape-on-terrain/arc-plugin.js +5 -7
  64. package/semiplugins/shape-on-terrain/circle-plugin.js +2 -2
  65. package/semiplugins/shape-on-terrain/padding-1-degree.js +1 -2
  66. package/semiplugins/shell/bbox-renderer/index.js +2 -0
  67. package/{programs/globeshell/wiggle → semiplugins/shell/bbox-renderer}/logic.js +101 -102
  68. package/{programs/globeshell/wiggle → semiplugins/shell/bbox-renderer}/object.js +6 -7
  69. package/semiplugins/utility/container-plugin.js +94 -0
  70. package/semiplugins/utility/object-pass-container-plugin.js +80 -0
  71. package/{point-heat-map → tracks/point-heat-map}/adaptors/timetracksplugin-format-to-this.js +1 -1
  72. package/{point-heat-map → tracks/point-heat-map}/plugin-webworker.js +3 -3
  73. package/{point-heat-map → tracks/point-heat-map}/point-to-heat-map-flow.js +11 -14
  74. package/{point-tracks → tracks/point-tracks}/plugin.js +5 -5
  75. package/{timetracks → tracks/timetracks}/adaptors-line-strip.js +1 -1
  76. package/{timetracks → tracks/timetracks}/program-line-strip.js +49 -49
  77. package/{timetracks → tracks/timetracks}/programpoint-line-strip.js +16 -13
  78. package/types.js +6 -0
  79. package/util/account/bufferoffsetmanager.js +1 -1
  80. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +9 -95
  81. package/util/gl-util/uniform-block/manager.js +4 -5
  82. package/util/gl-util/uniform-block/types.js +0 -7
  83. package/util/index.js +10 -13
  84. package/util/picking/fence.js +16 -18
  85. package/util/picking/picker-displayer.js +4 -6
  86. package/util/programs/{shapesonglobe.js → draw-from-pixel-coords.js} +4 -7
  87. package/util/programs/draw-texture-on-canvas.js +1 -1
  88. package/util/programs/texturetoglobe.js +3 -3
  89. package/util/shaderfunctions/geometrytransformations.js +6 -0
  90. package/util/webglobe/rasteroverlay.js +1 -0
  91. package/vectorfield/arrowfield/index.js +3 -0
  92. package/{arrowfield → vectorfield/arrowfield}/plugin.js +2 -2
  93. package/{waveparticles → vectorfield/waveparticles}/plugin.js +12 -12
  94. package/{wind → vectorfield/wind}/index.js +1 -1
  95. package/{wind → vectorfield/wind}/plugin.js +32 -32
  96. package/write-text/attached-text-writer.js +9 -1
  97. package/write-text/context-text3.js +0 -1
  98. package/write-text/objectarraylabels/index.js +2 -0
  99. package/Math/mesh/mapbox-delaunay.js +0 -544
  100. package/arrowfield/index.js +0 -3
  101. package/bearing-line/index.js +0 -2
  102. package/bearing-line/plugin.js +0 -444
  103. package/circle-line-chain/chain-list-map.js +0 -201
  104. package/circle-line-chain/plugin.js +0 -411
  105. package/circle-line-chain/util.js +0 -1
  106. package/compassrose/compassrose.js +0 -293
  107. package/compassrose/index.js +0 -2
  108. package/index.js +0 -12
  109. package/partialrings/buffer-manager.js +0 -75
  110. package/partialrings/index.js +0 -2
  111. package/partialrings/plugin.js +0 -128
  112. package/partialrings/program.js +0 -279
  113. package/programs/arrowfield/index.js +0 -2
  114. package/programs/globe-util/is-globe-moved.js +0 -19
  115. package/programs/globeshell/index.js +0 -2
  116. package/programs/globeshell/wiggle/index.js +0 -2
  117. package/programs/helpers/blender/index.js +0 -1
  118. package/programs/helpers/fadeaway/index.js +0 -2
  119. package/programs/helpers/fadeaway/object.js +0 -14
  120. package/programs/helpers/index.js +0 -2
  121. package/programs/rings/distancering/circleflatprogram.js +0 -116
  122. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +0 -326
  123. package/programs/rings/distancering/circlepaddysharedbuffer.js +0 -368
  124. package/programs/rings/distancering/index.js +0 -6
  125. package/programs/rings/distancering/paddyflatprogram.js +0 -127
  126. package/programs/rings/distancering/paddyflatprogram2d.js +0 -129
  127. package/programs/rings/distancering/paddyflatprogram3d.js +0 -128
  128. package/programs/two-d/pixel-circle.js +0 -1
  129. package/programs/vectorfields/index.js +0 -3
  130. package/rangerings/enum.js +0 -2
  131. package/rangerings/index.js +0 -5
  132. package/rangerings/plugin.js +0 -543
  133. package/rangerings/rangeringangletext.js +0 -326
  134. package/rangerings/ring-account.js +0 -112
  135. package/timetracks/index.js +0 -1
  136. package/util/build-strategy/general-strategy.js +0 -62
  137. package/util/gl-util/uniform-block/shader.js +0 -1
  138. package/util/heatwavedatamanager/index.js +0 -2
  139. package/util/heatwavedatamanager/pointcoordsmeta.js +0 -22
  140. package/util/jshelpers/data-filler.js +0 -17
  141. package/util/jshelpers/equality.js +0 -18
  142. package/util/jshelpers/index.js +0 -2
  143. package/util/jshelpers/timefilters.js +0 -30
  144. package/util/programs/index.js +0 -1
  145. package/util/surface-line-data/arc-bboxes.js +0 -25
  146. package/util/surface-line-data/arcs-to-cuts.js +0 -50
  147. package/util/surface-line-data/cut-arc.js +0 -1
  148. package/util/surface-line-data/flow.js +0 -28
  149. package/util/surface-line-data/rbush-manager.js +0 -1
  150. package/util/surface-line-data/web-worker.js +0 -1
  151. package/write-text/context-text3old.js +0 -152
  152. package/write-text/index.js +0 -1
  153. package/write-text/writer-plugin.js +0 -8
  154. /package/{heatwave/isobar/quadtreecontours.js → Math/contour/quadtreecontours1.js} +0 -0
  155. /package/{util/surface-line-data → Math/tessellation}/types.js +0 -0
  156. /package/pin/{pin-object-array.js → pin-object-array1.js} +0 -0
  157. /package/pin/{pin-point-totem.js → pin-point-totem1.js} +0 -0
  158. /package/{circle-line-chain/init.js → programs/polygon-on-globe/partial-tesselation.js} +0 -0
  159. /package/{point-heat-map → tracks/point-heat-map}/index.js +0 -0
  160. /package/{point-tracks → tracks/point-tracks}/key-methods.js +0 -0
  161. /package/{timetracks → tracks/timetracks}/plugin-line-strip.js +0 -0
  162. /package/{arrowfield → vectorfield/arrowfield}/adaptor.js +0 -0
  163. /package/{waveparticles → vectorfield/waveparticles}/adaptor.js +0 -0
  164. /package/{waveparticles → vectorfield/waveparticles}/index.js +0 -0
  165. /package/{wind → vectorfield/wind}/imagetovectorfieldandmagnitude.js +0 -0
  166. /package/{wind → vectorfield/wind}/vectorfieldimage.js +0 -0
  167. /package/write-text/{context-text.js → context-textDELETE.js} +0 -0
  168. /package/{heatwave/isobar → write-text/objectarraylabels}/objectarraylabels.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import WindPlugin from "./plugin";
2
2
  import createVectorFieldImage from "./vectorfieldimage";
3
3
  import imageToMagnitude, { imageToRadianAngle } from "./imagetovectorfieldandmagnitude";
4
- import { createImageFromBase64 } from "../util/webglobjectbuilders";
4
+ import { createImageFromBase64 } from "../../util/webglobjectbuilders";
5
5
  export { createVectorFieldImage, imageToMagnitude, WindPlugin, createImageFromBase64, imageToRadianAngle };
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Author: Toprak Nihat Deniz Ozturk
3
3
  */
4
- import * as util from "../util";
4
+ import { createImageFromBase64, createProgramWrapper, createTexture, createBuffer, bindAttribute, bindFramebuffer, bindTexture, getColorRamp } from "../../util/webglobjectbuilders";
5
5
  import imageToMagnitude, { imageToRadianAngle } from "./imagetovectorfieldandmagnitude";
6
- import { TexturePointSampler } from "../util/heatwavedatamanager/texture-point-sampler";
6
+ import { TexturePointSampler } from "../../heatwave/texture-point-sampler";
7
7
  /**
8
8
  * Shader Dökümanı:
9
9
  * * Vektör alan haritasında kaçış değeri
@@ -415,7 +415,7 @@ export default class WindPlugin {
415
415
  if (this.gl == null) {
416
416
  return;
417
417
  }
418
- this.colorRampTexture = util.createTexture(this.gl, this.gl.LINEAR, util.getColorRamp(colors), 16, 16);
418
+ this.colorRampTexture = createTexture(this.gl, this.gl.LINEAR, getColorRamp(colors), 16, 16);
419
419
  }
420
420
  setColorRampDefault() {
421
421
  const { uMax, uMin, vMax, vMin } = this.windData;
@@ -452,8 +452,8 @@ export default class WindPlugin {
452
452
  values[i]
453
453
  ]);
454
454
  }
455
- const colorRamp = util.getColorRamp(colors);
456
- this.colorRampTexture = util.createTexture(gl, gl.LINEAR, colorRamp, 16, 16);
455
+ const colorRamp = getColorRamp(colors);
456
+ this.colorRampTexture = createTexture(gl, gl.LINEAR, colorRamp, 16, 16);
457
457
  this._rampMax = maxVelocity;
458
458
  this._loadRampMax();
459
459
  }
@@ -468,8 +468,8 @@ export default class WindPlugin {
468
468
  particleState[i] = Math.floor(Math.random() * 256); // randomize the initial particle positions
469
469
  }
470
470
  // textures to hold the particle state for the current and the next frame
471
- this.particleStateTexture0 = util.createTexture(gl, gl.NEAREST, particleState, particleRes, particleRes);
472
- this.particleStateTexture1 = util.createTexture(gl, gl.NEAREST, particleState, particleRes, particleRes);
471
+ this.particleStateTexture0 = createTexture(gl, gl.NEAREST, particleState, particleRes, particleRes);
472
+ this.particleStateTexture1 = createTexture(gl, gl.NEAREST, particleState, particleRes, particleRes);
473
473
  const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
474
474
  gl.useProgram(this.updateProgram.program);
475
475
  gl.uniform1f(this.updateProgram.u_wind_res, this.particleStateResolution);
@@ -482,7 +482,7 @@ export default class WindPlugin {
482
482
  const particleIndices = new Float32Array(this._numParticles);
483
483
  for (let i = 0; i < this._numParticles; i++)
484
484
  particleIndices[i] = i;
485
- this.particleIndexBuffer = util.createBuffer(gl, particleIndices);
485
+ this.particleIndexBuffer = createBuffer(gl, particleIndices);
486
486
  }
487
487
  get numParticles() {
488
488
  return this._numParticles;
@@ -504,7 +504,7 @@ export default class WindPlugin {
504
504
  const windDataMeta = this._windDataMeta;
505
505
  const gl = this.gl;
506
506
  this.windData = windData;
507
- this.windTexture = util.createTexture(gl, gl.LINEAR, windData.image);
507
+ this.windTexture = createTexture(gl, gl.LINEAR, windData.image);
508
508
  const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
509
509
  gl.useProgram(this.updateProgram.program);
510
510
  gl.uniform2f(this.updateProgram.u_wind_res, windDataMeta.width, windDataMeta.height);
@@ -532,7 +532,7 @@ export default class WindPlugin {
532
532
  * @param {Array} windData.bbox - bounding box [minLon, minLat, maxLon, maxLat]
533
533
  */
534
534
  setWindDataWithImageBase64(windData) {
535
- const image = util.createImageFromBase64(windData.image);
535
+ const image = createImageFromBase64(windData.image);
536
536
  image.onload = () => {
537
537
  windData.image = image;
538
538
  this.setWind(windData);
@@ -543,14 +543,14 @@ export default class WindPlugin {
543
543
  * @returns
544
544
  */
545
545
  getTexturePointSampler(type = `magnitude`) {
546
- if (type == `magnitude`) {
546
+ if (type === `magnitude`) {
547
547
  if (!this.texturePointSampler) {
548
548
  this._createTexturePointSampler();
549
549
  this._setCoorcinatesDataCalculatorData();
550
550
  }
551
551
  return this.texturePointSampler;
552
552
  }
553
- else if (type == `angle`) {
553
+ else if (type === `angle`) {
554
554
  if (!this.texturePointSamplerAngle) {
555
555
  this._createTexturePointSamplerAngle();
556
556
  this._setCoorcinatesDataCalculatorData();
@@ -665,16 +665,16 @@ export default class WindPlugin {
665
665
  }
666
666
  _drawScreen() {
667
667
  const { gl, globe } = this;
668
- util.bindTexture(gl, this.windTexture, 0);
669
- util.bindTexture(gl, this.particleStateTexture0, 1);
668
+ bindTexture(gl, this.windTexture, 0);
669
+ bindTexture(gl, this.particleStateTexture0, 1);
670
670
  // draw the screen into a temporary framebuffer to retain it as the background on the next frame
671
- util.bindFramebuffer(gl, this.framebuffer, this.screenTexture);
671
+ bindFramebuffer(gl, this.framebuffer, this.screenTexture);
672
672
  gl.viewport(0, 0, globe.api_ScrW(), globe.api_ScrH());
673
673
  gl.enable(gl.BLEND);
674
674
  gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); // non-premultiplied alpha
675
675
  this._drawTexture(this.backgroundTexture, this._fadeOpacity);
676
676
  this._drawParticles();
677
- util.bindFramebuffer(gl, null);
677
+ bindFramebuffer(gl, null);
678
678
  this._drawTexture(this.screenTexture, 1.0);
679
679
  gl.disable(gl.BLEND);
680
680
  // save the current screen as the background for the next frame
@@ -686,8 +686,8 @@ export default class WindPlugin {
686
686
  const gl = this.gl;
687
687
  const program = this.screenProgram;
688
688
  gl.useProgram(program.program);
689
- util.bindAttribute(gl, this.quadBuffer, program.a_pos, 2);
690
- util.bindTexture(gl, texture, 2);
689
+ bindAttribute(gl, this.quadBuffer, program.a_pos, 2);
690
+ bindTexture(gl, texture, 2);
691
691
  gl.uniform1i(program.u_screen, 2);
692
692
  gl.uniform1f(program.u_opacity, opacity);
693
693
  gl.drawArrays(gl.TRIANGLES, 0, 6);
@@ -706,8 +706,8 @@ export default class WindPlugin {
706
706
  const { gl, projMatrix, modelviewMatrix, transPos } = this;
707
707
  const program = this.drawSphereProgram;
708
708
  gl.useProgram(program.program);
709
- util.bindAttribute(gl, this.particleIndexBuffer, program.a_index, 1);
710
- util.bindTexture(gl, this.colorRampTexture, 2);
709
+ bindAttribute(gl, this.particleIndexBuffer, program.a_index, 1);
710
+ bindTexture(gl, this.colorRampTexture, 2);
711
711
  gl.uniform1i(program.u_wind, 0);
712
712
  gl.uniform1i(program.u_particles, 1);
713
713
  gl.uniform1i(program.u_color_ramp, 2);
@@ -720,8 +720,8 @@ export default class WindPlugin {
720
720
  const { gl, transPos, projMatrix, globe } = this;
721
721
  const program = this.drawFlatProgram;
722
722
  gl.useProgram(program.program);
723
- util.bindAttribute(gl, this.particleIndexBuffer, program.a_index, 1);
724
- util.bindTexture(gl, this.colorRampTexture, 2);
723
+ bindAttribute(gl, this.particleIndexBuffer, program.a_index, 1);
724
+ bindTexture(gl, this.colorRampTexture, 2);
725
725
  gl.uniform1i(program.u_wind, 0);
726
726
  gl.uniform1i(program.u_particles, 1);
727
727
  gl.uniform1i(program.u_color_ramp, 2);
@@ -763,12 +763,12 @@ export default class WindPlugin {
763
763
  const program = this.updateProgram;
764
764
  gl.useProgram(program.program);
765
765
  gl.viewport(0, 0, this.particleStateResolution, this.particleStateResolution);
766
- util.bindAttribute(gl, this.quadBuffer, program.a_pos, 2);
766
+ bindAttribute(gl, this.quadBuffer, program.a_pos, 2);
767
767
  gl.uniform1i(program.u_wind, 0);
768
768
  gl.uniform1i(program.u_particles, 1);
769
- util.bindAttribute(gl, this.quadBuffer, program.a_pos, 2);
769
+ bindAttribute(gl, this.quadBuffer, program.a_pos, 2);
770
770
  gl.uniform1f(program.u_rand_seed, Math.random());
771
- util.bindFramebuffer(gl, this.framebuffer, this.particleStateTexture1);
771
+ bindFramebuffer(gl, this.framebuffer, this.particleStateTexture1);
772
772
  gl.drawArrays(gl.TRIANGLES, 0, 6);
773
773
  // swap the particle state textures so the new one becomes the current one
774
774
  const temp = this.particleStateTexture0;
@@ -873,11 +873,11 @@ export default class WindPlugin {
873
873
  // console.log("init wind plugin")
874
874
  this.globe = globe;
875
875
  this.gl = gl;
876
- this.drawSphereProgram = util.createProgramWrapper(gl, drawSphereVert, drawFrag);
877
- this.screenProgram = util.createProgramWrapper(gl, quadVert, screenFrag);
878
- this.updateProgram = util.createProgramWrapper(gl, quadVert, updateFrag);
879
- this.drawFlatProgram = util.createProgramWrapper(gl, drawFlatVert, drawFrag);
880
- this.quadBuffer = util.createBuffer(gl, new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]));
876
+ this.drawSphereProgram = createProgramWrapper(gl, drawSphereVert, drawFrag);
877
+ this.screenProgram = createProgramWrapper(gl, quadVert, screenFrag);
878
+ this.updateProgram = createProgramWrapper(gl, quadVert, updateFrag);
879
+ this.drawFlatProgram = createProgramWrapper(gl, drawFlatVert, drawFrag);
880
+ this.quadBuffer = createBuffer(gl, new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]));
881
881
  this.framebuffer = gl.createFramebuffer();
882
882
  this._loadFadeOpacity();
883
883
  this._loadSpeedFactor();
@@ -897,8 +897,8 @@ export default class WindPlugin {
897
897
  const { gl, globe } = this;
898
898
  const emptyPixels = new Uint8Array(globe.api_ScrW() * globe.api_ScrH() * 4);
899
899
  // screen textures to hold the drawn screen for the previous and the current frame
900
- this.backgroundTexture = util.createTexture(gl, gl.LINEAR, emptyPixels, globe.api_ScrW(), globe.api_ScrH());
901
- this.screenTexture = util.createTexture(gl, gl.LINEAR, emptyPixels, globe.api_ScrW(), globe.api_ScrH());
900
+ this.backgroundTexture = createTexture(gl, gl.LINEAR, emptyPixels, globe.api_ScrW(), globe.api_ScrH());
901
+ this.screenTexture = createTexture(gl, gl.LINEAR, emptyPixels, globe.api_ScrW(), globe.api_ScrH());
902
902
  gl.viewport(0, 0, globe.api_ScrW(), globe.api_ScrH());
903
903
  }
904
904
  // globe calls this `free` on plugin object unregistration
@@ -9,7 +9,7 @@ import { isTextFont, opacityCheck } from "../util/check/typecheck";
9
9
  * This makes the code more readable and maintainable.
10
10
  *
11
11
  * With AttachedTextWriter the glue is created by user.
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.
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 attached writer.
13
13
  */
14
14
  export class AttachedTextWriter {
15
15
  constructor(globe, { style = {
@@ -57,6 +57,14 @@ export class AttachedTextWriter {
57
57
  this._itemMap.set(key, item);
58
58
  this.globe.DrawRender();
59
59
  }
60
+ removeItem(item) {
61
+ const key = this.keyAdaptor ? this.keyAdaptor(item) : item;
62
+ if (this._itemMap.delete(key)) {
63
+ this.globe.DrawRender();
64
+ return true;
65
+ }
66
+ return false;
67
+ }
60
68
  // TODO: use item style
61
69
  draw() {
62
70
  if (!this.doDraw) {
@@ -1,4 +1,3 @@
1
- // @ts-ignore
2
1
  import { CSZMode } from "@pirireis/webglobe";
3
2
  import { isTextFont, opacityCheck } from "../util/check/typecheck";
4
3
  /**
@@ -0,0 +1,2 @@
1
+ import ObjectArrayLabels from "./objectarraylabels";
2
+ export default ObjectArrayLabels;