@pirireis/webglobeplugins 0.9.9 → 0.9.11

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 (212) hide show
  1. package/Math/angle-calculation.js +15 -0
  2. package/Math/arc.js +65 -0
  3. package/Math/bounds/line-bbox.js +190 -0
  4. package/Math/constants.js +9 -0
  5. package/Math/frustum/camera.js +24 -0
  6. package/Math/frustum/from-globeinfo.js +48 -0
  7. package/Math/frustum/types.js +2 -0
  8. package/Math/globe-util/horizon-plane.js +112 -0
  9. package/Math/index.js +1 -0
  10. package/Math/juction/arc-plane.js +83 -0
  11. package/Math/juction/line-sphere.js +25 -0
  12. package/Math/juction/plane-plane.js +58 -0
  13. package/Math/line.js +58 -0
  14. package/Math/matrix4.js +1 -0
  15. package/Math/methods.js +206 -0
  16. package/Math/plane.js +62 -0
  17. package/Math/quaternion.js +108 -0
  18. package/Math/types.js +2 -0
  19. package/Math/utils.js +4 -0
  20. package/Math/vec3.js +129 -0
  21. package/algorithms/search-binary.js +19 -0
  22. package/altitude-locator/adaptors.js +1 -0
  23. package/altitude-locator/draw-subset-obj.js +19 -0
  24. package/altitude-locator/keymethod.js +1 -0
  25. package/altitude-locator/plugin.js +357 -0
  26. package/altitude-locator/types.js +23 -0
  27. package/arrowfield/adaptor.js +15 -0
  28. package/arrowfield/index.js +10 -0
  29. package/arrowfield/plugin.js +89 -0
  30. package/bearing-line/index.js +8 -0
  31. package/bearing-line/plugin.js +474 -0
  32. package/circle-line-chain/chain-list-map.js +211 -0
  33. package/circle-line-chain/init.js +1 -0
  34. package/circle-line-chain/plugin.js +449 -0
  35. package/circle-line-chain/util.js +5 -0
  36. package/compass-rose/compass-rose-padding-flat.js +247 -0
  37. package/compass-rose/compass-text-writer.js +161 -0
  38. package/compass-rose/index.js +7 -0
  39. package/compassrose/compassrose.js +300 -0
  40. package/compassrose/index.js +8 -0
  41. package/globe-types.js +1 -0
  42. package/heatwave/index.js +10 -0
  43. package/heatwave/isobar/objectarraylabels.js +206 -0
  44. package/heatwave/isobar/plugin.js +362 -0
  45. package/heatwave/isobar/quadtreecontours.js +316 -0
  46. package/heatwave/plugins/heatwaveglobeshell.js +224 -0
  47. package/index.js +11 -11
  48. package/jest.config.js +7 -0
  49. package/package.json +4 -4
  50. package/partialrings/buffer-manager.js +113 -0
  51. package/partialrings/index.js +41 -0
  52. package/partialrings/plugin.js +171 -0
  53. package/partialrings/program.js +197 -0
  54. package/pin/pin-object-array.js +308 -0
  55. package/pin/pin-point-totem.js +61 -0
  56. package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +66 -0
  57. package/point-heat-map/index.js +1 -0
  58. package/point-heat-map/plugin-webworker.js +131 -0
  59. package/point-heat-map/point-to-heat-map-flow.js +129 -0
  60. package/point-tracks/key-methods.js +5 -0
  61. package/point-tracks/plugin.js +353 -0
  62. package/programs/arrowfield/index.js +7 -0
  63. package/programs/arrowfield/logic.js +149 -0
  64. package/programs/arrowfield/object.js +68 -0
  65. package/programs/data2legend/density-to-legend.js +77 -0
  66. package/programs/data2legend/point-to-density-texture.js +75 -0
  67. package/programs/float2legendwithratio/index.js +8 -0
  68. package/programs/float2legendwithratio/logic.js +125 -0
  69. package/programs/float2legendwithratio/object.js +113 -0
  70. package/programs/globe-util/is-globe-moved.js +22 -0
  71. package/programs/globeshell/index.js +8 -0
  72. package/programs/globeshell/noise/noises.js +1 -0
  73. package/programs/globeshell/wiggle/index.js +8 -0
  74. package/programs/globeshell/wiggle/logic.js +252 -0
  75. package/programs/globeshell/wiggle/object.js +74 -0
  76. package/programs/helpers/blender/index.js +1 -0
  77. package/programs/helpers/blender/program.js +62 -0
  78. package/programs/helpers/fadeaway/index.js +7 -0
  79. package/programs/helpers/fadeaway/logic.js +50 -0
  80. package/programs/helpers/fadeaway/object.js +21 -0
  81. package/programs/helpers/index.js +8 -0
  82. package/programs/index.js +58 -0
  83. package/programs/interface.js +1 -0
  84. package/programs/line-on-globe/angled-line.js +117 -0
  85. package/programs/line-on-globe/circle-accurate-3d.js +91 -0
  86. package/programs/line-on-globe/circle-accurate-flat.js +158 -0
  87. package/programs/line-on-globe/circle-accurate.js +108 -0
  88. package/programs/line-on-globe/circle.js +102 -0
  89. package/programs/line-on-globe/degree-padding-around-circle-3d.js +109 -0
  90. package/programs/line-on-globe/index.js +1 -0
  91. package/programs/line-on-globe/lines-color-instanced-flat.js +91 -0
  92. package/programs/line-on-globe/linestrip.js +110 -0
  93. package/programs/line-on-globe/naive-accurate-flexible.js +125 -0
  94. package/programs/line-on-globe/to-the-surface.js +82 -0
  95. package/programs/line-on-globe/util.js +8 -0
  96. package/programs/picking/pickable-renderer.js +104 -0
  97. package/programs/point-on-globe/element-globe-surface-glow.js +102 -0
  98. package/programs/point-on-globe/element-point-glow.js +85 -0
  99. package/programs/point-on-globe/square-pixel-point.js +125 -0
  100. package/programs/programcache.js +131 -0
  101. package/programs/rings/distancering/circleflatprogram.js +114 -0
  102. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +358 -0
  103. package/programs/rings/distancering/circlepaddysharedbuffer.js +433 -0
  104. package/programs/rings/distancering/index.js +14 -0
  105. package/programs/rings/distancering/paddyflatprogram.js +119 -0
  106. package/programs/rings/distancering/paddyflatprogram2d.js +121 -0
  107. package/programs/rings/distancering/paddyflatprogram3d.js +119 -0
  108. package/programs/rings/distancering/shader.js +1 -0
  109. package/programs/rings/index.js +17 -0
  110. package/programs/rings/partial-ring/piece-of-pie.js +173 -0
  111. package/programs/totems/camerauniformblock.js +147 -0
  112. package/programs/totems/canvas-webglobe-info.js +102 -0
  113. package/programs/totems/gpu-selection-uniform-block.js +104 -0
  114. package/programs/totems/index.js +40 -0
  115. package/programs/two-d/pixel-circle.js +1 -0
  116. package/programs/two-d/pixel-padding-for-compass.js +101 -0
  117. package/programs/util.js +18 -0
  118. package/programs/vectorfields/index.js +23 -0
  119. package/programs/vectorfields/logics/drawrectangleparticles.js +66 -0
  120. package/programs/vectorfields/logics/index.js +12 -0
  121. package/programs/vectorfields/logics/pixelbased.js +86 -0
  122. package/programs/vectorfields/logics/ubo.js +57 -0
  123. package/programs/vectorfields/pingpongbuffermanager.js +80 -0
  124. package/rangerings/enum.js +5 -0
  125. package/rangerings/index.js +15 -0
  126. package/rangerings/plugin.js +610 -0
  127. package/rangerings/rangeringangletext.js +341 -0
  128. package/rangerings/ring-account.js +134 -0
  129. package/shaders/fragment-toy/firework.js +4 -0
  130. package/shaders/fragment-toy/singularity.js +5 -0
  131. package/shape-on-terrain/arc/naive/plugin.js +252 -0
  132. package/timetracks/adaptors-line-strip.js +82 -0
  133. package/timetracks/adaptors.js +136 -0
  134. package/timetracks/index.js +19 -0
  135. package/timetracks/plugin-line-strip.js +254 -0
  136. package/timetracks/plugin.js +262 -0
  137. package/timetracks/program-line-strip.js +418 -0
  138. package/timetracks/program.js +466 -0
  139. package/timetracks/programpoint-line-strip.js +101 -0
  140. package/timetracks/programpoint.js +101 -0
  141. package/types.js +15 -0
  142. package/util/account/bufferoffsetmanager.js +202 -0
  143. package/util/account/index.js +23 -0
  144. package/util/account/single-attribute-buffer-management/buffer-manager.js +112 -0
  145. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +180 -0
  146. package/util/account/single-attribute-buffer-management/index.js +9 -0
  147. package/util/account/single-attribute-buffer-management/object-store.js +53 -0
  148. package/util/account/single-attribute-buffer-management/types.js +2 -0
  149. package/util/account/util.js +24 -0
  150. package/util/algorithms/index.js +1 -0
  151. package/util/algorithms/search-binary.js +28 -0
  152. package/util/check/get.js +18 -0
  153. package/util/check/index.js +1 -0
  154. package/util/check/typecheck.js +51 -0
  155. package/util/geometry/index.js +53 -0
  156. package/util/gl-util/buffer/attribute-loader.js +81 -0
  157. package/util/gl-util/buffer/index.js +6 -0
  158. package/util/gl-util/buffer/types.js +1 -0
  159. package/util/gl-util/draw-options/methods.js +38 -0
  160. package/util/gl-util/draw-options/types.js +15 -0
  161. package/util/gl-util/uniform-block/manager.js +168 -0
  162. package/util/gl-util/uniform-block/shader.js +1 -0
  163. package/util/gl-util/uniform-block/types.js +8 -0
  164. package/util/heatwavedatamanager/datamanager.js +212 -0
  165. package/util/heatwavedatamanager/index.js +10 -0
  166. package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +125 -0
  167. package/util/heatwavedatamanager/pointcoordsmeta.js +21 -0
  168. package/util/index.js +57 -0
  169. package/util/interpolation/index.js +1 -0
  170. package/util/interpolation/timetrack/index.js +5 -0
  171. package/util/interpolation/timetrack/timetrack-interpolator.js +81 -0
  172. package/util/interpolation/timetrack/web-worker-str.js +5 -0
  173. package/util/interpolation/timetrack/web-worker.js +48 -0
  174. package/util/jshelpers/data-filler.js +20 -0
  175. package/util/jshelpers/equality.js +20 -0
  176. package/util/jshelpers/index.js +37 -0
  177. package/util/jshelpers/timefilters.js +32 -0
  178. package/util/picking/fence.js +46 -0
  179. package/util/picking/picker-displayer.js +145 -0
  180. package/util/programs/draw-texture-on-canvas.js +71 -0
  181. package/util/programs/index.js +17 -0
  182. package/util/programs/shapesonglobe.js +174 -0
  183. package/util/programs/supersampletotextures.js +107 -0
  184. package/util/programs/texturetoglobe.js +132 -0
  185. package/util/shaderfunctions/geometrytransformations.js +45 -0
  186. package/util/shaderfunctions/index.js +18 -0
  187. package/util/shaderfunctions/nodata.js +5 -0
  188. package/util/shaderfunctions/noisefunctions.js +13 -0
  189. package/util/surface-line-data/arc-bboxes.js +25 -0
  190. package/util/surface-line-data/arcs-to-cuts.js +53 -0
  191. package/util/surface-line-data/cut-arc.js +1 -0
  192. package/util/surface-line-data/flow.js +28 -0
  193. package/util/surface-line-data/rbush-manager.js +1 -0
  194. package/util/surface-line-data/types.js +1 -0
  195. package/util/surface-line-data/web-worker.js +1 -0
  196. package/util/webglobe/gldefaultstates.js +7 -0
  197. package/util/webglobe/index.js +18 -0
  198. package/util/webglobe/rasteroverlay.js +80 -0
  199. package/util/webglobjectbuilders.js +393 -0
  200. package/util/webglobjectbuilders1.js +238 -0
  201. package/waveparticles/adaptor.js +18 -0
  202. package/waveparticles/index.js +10 -0
  203. package/waveparticles/plugin.js +271 -0
  204. package/wind/imagetovectorfieldandmagnitude.js +35 -0
  205. package/wind/index.js +14 -0
  206. package/wind/plugin.js +724 -0
  207. package/wind/vectorfieldimage.js +25 -0
  208. package/write-text/attached-text-writer.js +93 -0
  209. package/write-text/context-text.js +105 -0
  210. package/write-text/context-text3.js +160 -0
  211. package/write-text/index.js +5 -0
  212. package/write-text/writer-plugin.js +8 -0
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * Manages PingPong Buffers.
4
+ * Updated positions are written to the target buffer.
5
+ * Then source and target buffers are swapped.
6
+ *
7
+ * update coords and draw particles programs will use this class.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ var default_1 = /** @class */ (function () {
11
+ function default_1(gl, particleCount, inPositionLocation) {
12
+ if (inPositionLocation === void 0) { inPositionLocation = 0; }
13
+ this.gl = gl;
14
+ this._inPositionLocation = inPositionLocation;
15
+ this._buffers = [gl.createBuffer(), gl.createBuffer()];
16
+ this._tfs = this._createTransformFeedbacksAndBindBuffers();
17
+ this._vaos = this._createVaos();
18
+ this.setParticleCount(particleCount);
19
+ this._index = 0;
20
+ }
21
+ default_1.prototype.setParticleCount = function (count) {
22
+ var gl = this.gl;
23
+ this.length = count;
24
+ gl.bindBuffer(gl.ARRAY_BUFFER, this._buffers[0]);
25
+ gl.bufferData(gl.ARRAY_BUFFER, randomNumbers(this.length * 2), gl.DYNAMIC_DRAW);
26
+ gl.bindBuffer(gl.ARRAY_BUFFER, this._buffers[1]);
27
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(this.length * 2), gl.DYNAMIC_DRAW);
28
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
29
+ this._index = 0;
30
+ };
31
+ default_1.prototype._createTransformFeedbacksAndBindBuffers = function () {
32
+ var _this = this;
33
+ var gl = this.gl;
34
+ var tfs = [gl.createTransformFeedback(), gl.createTransformFeedback()];
35
+ tfs.forEach(function (tf, idx) {
36
+ gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, tf);
37
+ gl.bindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, 0, _this._buffers[idx]);
38
+ });
39
+ gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, null);
40
+ return tfs;
41
+ };
42
+ default_1.prototype._createVaos = function () {
43
+ var _this = this;
44
+ var gl = this.gl;
45
+ var vaos = [gl.createVertexArray(), gl.createVertexArray()];
46
+ vaos.forEach(function (vao, idx) {
47
+ gl.bindVertexArray(vao);
48
+ gl.bindBuffer(gl.ARRAY_BUFFER, _this._buffers[idx]);
49
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
50
+ gl.vertexAttribDivisor(0, 1);
51
+ gl.enableVertexAttribArray(_this._inPositionLocation);
52
+ gl.bindVertexArray(null);
53
+ });
54
+ return vaos;
55
+ };
56
+ default_1.prototype.getSourceVao = function () { return this._vaos[this._index]; };
57
+ default_1.prototype.getTargetVao = function () { return this._vaos[1 - this._index]; };
58
+ default_1.prototype.sourceBuffer = function () { return this._buffers[this._index]; };
59
+ default_1.prototype.targetBuffer = function () { return this._buffers[1 - this._index]; };
60
+ default_1.prototype.getTargetTF = function () { return this._tfs[1 - this._index]; };
61
+ default_1.prototype.swap = function () { this._index = 1 - this._index; };
62
+ default_1.prototype.free = function () {
63
+ this.gl.deleteBuffer(this._buffers[0]);
64
+ this.gl.deleteBuffer(this._buffers[1]);
65
+ this.gl.deleteTransformFeedback(this._tfs[0]);
66
+ this.gl.deleteTransformFeedback(this._tfs[1]);
67
+ this.gl.deleteVertexArray(this._vaos[0]);
68
+ this.gl.deleteVertexArray(this._vaos[1]);
69
+ };
70
+ return default_1;
71
+ }());
72
+ exports.default = default_1;
73
+ function randomNumbers(count) {
74
+ var result = new Float32Array(count);
75
+ var random = Math.random;
76
+ for (var i = 0; i < count; i++) {
77
+ result[i] = random() * 2 - 1;
78
+ }
79
+ return result;
80
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENUM_TEXT_HIDE = exports.ENUM_HIDE = void 0;
4
+ exports.ENUM_HIDE = Object.freeze({ SHOW: 0, HIDE: 1, HIDE_1_DEGREE_PADDINGS: 2 });
5
+ exports.ENUM_TEXT_HIDE = Object.freeze({ SHOW: 0, HIDE: 1 });
@@ -0,0 +1,15 @@
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.ringKeyMethod = exports.RangeRingAngleText = exports.ENUM_TEXT_HIDE = exports.ENUM_HIDE = exports.RangeRings = void 0;
7
+ var plugin_1 = require("./plugin");
8
+ Object.defineProperty(exports, "RangeRings", { enumerable: true, get: function () { return plugin_1.RangeRings; } });
9
+ var ring_account_1 = require("./ring-account");
10
+ Object.defineProperty(exports, "ringKeyMethod", { enumerable: true, get: function () { return ring_account_1.ringKeyMethod; } });
11
+ var rangeringangletext_1 = __importDefault(require("./rangeringangletext"));
12
+ exports.RangeRingAngleText = rangeringangletext_1.default;
13
+ var enum_1 = require("./enum");
14
+ Object.defineProperty(exports, "ENUM_HIDE", { enumerable: true, get: function () { return enum_1.ENUM_HIDE; } });
15
+ Object.defineProperty(exports, "ENUM_TEXT_HIDE", { enumerable: true, get: function () { return enum_1.ENUM_TEXT_HIDE; } });