@pirireis/webglobeplugins 0.9.11 → 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 (179) hide show
  1. package/Math/angle-calculation.js +9 -11
  2. package/Math/arc.js +38 -41
  3. package/Math/bounds/line-bbox.js +79 -83
  4. package/Math/constants.js +4 -9
  5. package/Math/frustum/types.js +1 -2
  6. package/Math/juction/arc-plane.js +33 -36
  7. package/Math/juction/line-sphere.js +15 -18
  8. package/Math/juction/plane-plane.js +20 -23
  9. package/Math/line.js +42 -47
  10. package/Math/methods.js +69 -92
  11. package/Math/plane.js +33 -38
  12. package/Math/quaternion.js +48 -55
  13. package/Math/types.js +1 -2
  14. package/Math/utils.js +2 -4
  15. package/Math/vec3.js +46 -52
  16. package/algorithms/search-binary.js +5 -8
  17. package/altitude-locator/draw-subset-obj.js +8 -11
  18. package/altitude-locator/plugin.js +114 -133
  19. package/altitude-locator/types.js +1 -3
  20. package/arrowfield/adaptor.js +3 -7
  21. package/arrowfield/index.js +3 -10
  22. package/arrowfield/plugin.js +63 -69
  23. package/bearing-line/index.js +2 -8
  24. package/bearing-line/plugin.js +218 -248
  25. package/circle-line-chain/chain-list-map.js +82 -92
  26. package/circle-line-chain/plugin.js +147 -182
  27. package/circle-line-chain/util.js +1 -5
  28. package/compass-rose/compass-rose-padding-flat.js +111 -140
  29. package/compass-rose/compass-text-writer.js +63 -75
  30. package/compass-rose/index.js +3 -7
  31. package/compassrose/compassrose.js +50 -57
  32. package/compassrose/index.js +2 -8
  33. package/heatwave/index.js +3 -10
  34. package/heatwave/isobar/objectarraylabels.js +50 -56
  35. package/heatwave/isobar/plugin.js +111 -170
  36. package/heatwave/isobar/quadtreecontours.js +78 -96
  37. package/heatwave/plugins/heatwaveglobeshell.js +73 -94
  38. package/index.js +12 -58
  39. package/package.json +1 -1
  40. package/partialrings/buffer-manager.js +32 -70
  41. package/partialrings/index.js +2 -41
  42. package/partialrings/plugin.js +55 -98
  43. package/partialrings/program.js +141 -59
  44. package/pin/pin-object-array.js +89 -97
  45. package/pin/pin-point-totem.js +21 -22
  46. package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +11 -14
  47. package/point-heat-map/plugin-webworker.js +45 -53
  48. package/point-heat-map/point-to-heat-map-flow.js +46 -51
  49. package/point-tracks/key-methods.js +2 -5
  50. package/point-tracks/plugin.js +141 -170
  51. package/programs/arrowfield/index.js +2 -7
  52. package/programs/arrowfield/logic.js +172 -67
  53. package/programs/arrowfield/object.js +35 -43
  54. package/programs/data2legend/density-to-legend.js +47 -26
  55. package/programs/data2legend/point-to-density-texture.js +56 -34
  56. package/programs/float2legendwithratio/index.js +2 -8
  57. package/programs/float2legendwithratio/logic.js +88 -45
  58. package/programs/float2legendwithratio/object.js +45 -54
  59. package/programs/globe-util/is-globe-moved.js +10 -13
  60. package/programs/globeshell/index.js +2 -8
  61. package/programs/globeshell/wiggle/index.js +2 -8
  62. package/programs/globeshell/wiggle/logic.js +191 -101
  63. package/programs/globeshell/wiggle/object.js +35 -43
  64. package/programs/helpers/blender/program.js +36 -22
  65. package/programs/helpers/fadeaway/index.js +2 -7
  66. package/programs/helpers/fadeaway/logic.js +36 -17
  67. package/programs/helpers/fadeaway/object.js +11 -18
  68. package/programs/helpers/index.js +2 -8
  69. package/programs/index.js +9 -58
  70. package/programs/line-on-globe/angled-line.js +95 -39
  71. package/programs/line-on-globe/circle-accurate-3d.js +86 -39
  72. package/programs/line-on-globe/circle-accurate-flat.js +116 -64
  73. package/programs/line-on-globe/circle-accurate.js +113 -46
  74. package/programs/line-on-globe/circle.js +106 -44
  75. package/programs/line-on-globe/degree-padding-around-circle-3d.js +89 -42
  76. package/programs/line-on-globe/lines-color-instanced-flat.js +84 -43
  77. package/programs/line-on-globe/linestrip.js +126 -63
  78. package/programs/line-on-globe/naive-accurate-flexible.js +126 -59
  79. package/programs/line-on-globe/to-the-surface.js +62 -35
  80. package/programs/line-on-globe/util.js +2 -5
  81. package/programs/picking/pickable-renderer.js +127 -46
  82. package/programs/point-on-globe/element-globe-surface-glow.js +83 -46
  83. package/programs/point-on-globe/element-point-glow.js +112 -47
  84. package/programs/point-on-globe/square-pixel-point.js +80 -34
  85. package/programs/programcache.js +14 -19
  86. package/programs/rings/distancering/circleflatprogram.js +76 -70
  87. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +168 -194
  88. package/programs/rings/distancering/circlepaddysharedbuffer.js +121 -200
  89. package/programs/rings/distancering/index.js +5 -14
  90. package/programs/rings/distancering/paddyflatprogram.js +87 -70
  91. package/programs/rings/distancering/paddyflatprogram2d.js +89 -72
  92. package/programs/rings/distancering/paddyflatprogram3d.js +87 -70
  93. package/programs/rings/index.js +1 -17
  94. package/programs/rings/partial-ring/piece-of-pie.js +144 -44
  95. package/programs/totems/camerauniformblock.js +65 -56
  96. package/programs/totems/canvas-webglobe-info.js +49 -45
  97. package/programs/totems/gpu-selection-uniform-block.js +45 -45
  98. package/programs/totems/index.js +2 -40
  99. package/programs/two-d/pixel-padding-for-compass.js +94 -36
  100. package/programs/util.js +7 -10
  101. package/programs/vectorfields/index.js +3 -23
  102. package/programs/vectorfields/logics/drawrectangleparticles.js +73 -35
  103. package/programs/vectorfields/logics/index.js +4 -12
  104. package/programs/vectorfields/logics/pixelbased.js +94 -41
  105. package/programs/vectorfields/logics/ubo.js +32 -32
  106. package/programs/vectorfields/pingpongbuffermanager.js +30 -37
  107. package/rangerings/enum.js +2 -5
  108. package/rangerings/index.js +5 -15
  109. package/rangerings/plugin.js +223 -286
  110. package/rangerings/rangeringangletext.js +122 -137
  111. package/rangerings/ring-account.js +53 -75
  112. package/shaders/fragment-toy/firework.js +55 -4
  113. package/shaders/fragment-toy/singularity.js +56 -5
  114. package/timetracks/adaptors-line-strip.js +27 -44
  115. package/timetracks/adaptors.js +48 -67
  116. package/timetracks/index.js +5 -19
  117. package/timetracks/plugin-line-strip.js +65 -79
  118. package/timetracks/plugin.js +71 -85
  119. package/timetracks/program-line-strip.js +297 -107
  120. package/timetracks/program.js +421 -118
  121. package/timetracks/programpoint-line-strip.js +98 -48
  122. package/timetracks/programpoint.js +91 -48
  123. package/util/account/bufferoffsetmanager.js +72 -98
  124. package/util/account/index.js +3 -23
  125. package/util/account/single-attribute-buffer-management/buffer-manager.js +44 -48
  126. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +68 -98
  127. package/util/account/single-attribute-buffer-management/index.js +4 -9
  128. package/util/account/single-attribute-buffer-management/object-store.js +29 -34
  129. package/util/account/single-attribute-buffer-management/types.js +1 -2
  130. package/util/account/util.js +2 -8
  131. package/util/algorithms/search-binary.js +5 -8
  132. package/util/check/get.js +5 -9
  133. package/util/check/typecheck.js +13 -24
  134. package/util/geometry/index.js +10 -18
  135. package/util/gl-util/buffer/attribute-loader.js +10 -26
  136. package/util/gl-util/buffer/index.js +2 -5
  137. package/util/gl-util/draw-options/methods.js +10 -15
  138. package/util/gl-util/uniform-block/manager.js +69 -72
  139. package/util/heatwavedatamanager/datamanager.js +56 -119
  140. package/util/heatwavedatamanager/index.js +3 -10
  141. package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +38 -47
  142. package/util/heatwavedatamanager/pointcoordsmeta.js +9 -13
  143. package/util/index.js +13 -57
  144. package/util/interpolation/timetrack/index.js +2 -5
  145. package/util/interpolation/timetrack/timetrack-interpolator.js +30 -36
  146. package/util/interpolation/timetrack/web-worker-str.js +180 -5
  147. package/util/interpolation/timetrack/web-worker.js +4 -6
  148. package/util/jshelpers/data-filler.js +8 -11
  149. package/util/jshelpers/equality.js +1 -3
  150. package/util/jshelpers/index.js +2 -37
  151. package/util/jshelpers/timefilters.js +8 -10
  152. package/util/picking/fence.js +8 -11
  153. package/util/picking/picker-displayer.js +49 -58
  154. package/util/programs/draw-texture-on-canvas.js +41 -26
  155. package/util/programs/index.js +1 -17
  156. package/util/programs/shapesonglobe.js +104 -68
  157. package/util/programs/supersampletotextures.js +45 -43
  158. package/util/programs/texturetoglobe.js +99 -52
  159. package/util/shaderfunctions/geometrytransformations.js +323 -35
  160. package/util/shaderfunctions/index.js +2 -18
  161. package/util/shaderfunctions/nodata.js +8 -5
  162. package/util/shaderfunctions/noisefunctions.js +40 -12
  163. package/util/surface-line-data/arcs-to-cuts.js +20 -23
  164. package/util/webglobe/gldefaultstates.js +1 -4
  165. package/util/webglobe/index.js +2 -18
  166. package/util/webglobe/rasteroverlay.js +36 -41
  167. package/util/webglobjectbuilders.js +70 -93
  168. package/util/webglobjectbuilders1.js +63 -82
  169. package/waveparticles/adaptor.js +7 -10
  170. package/waveparticles/index.js +3 -10
  171. package/waveparticles/plugin.js +82 -90
  172. package/wind/imagetovectorfieldandmagnitude.js +16 -19
  173. package/wind/index.js +5 -14
  174. package/wind/plugin.js +454 -291
  175. package/wind/vectorfieldimage.js +6 -8
  176. package/write-text/attached-text-writer.js +48 -54
  177. package/write-text/context-text.js +52 -63
  178. package/write-text/context-text3.js +71 -80
  179. package/write-text/index.js +1 -5
@@ -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.centigradePlus90ToRadians = exports.ArrowField = void 0;
7
- var plugin_1 = __importDefault(require("./plugin"));
8
- exports.ArrowField = plugin_1.default;
9
- var adaptor_1 = require("./adaptor");
10
- Object.defineProperty(exports, "centigradePlus90ToRadians", { enumerable: true, get: function () { return adaptor_1.centigradePlus90ToRadians; } });
1
+ import ArrowField from "./plugin";
2
+ import { centigradePlus90ToRadians } from "./adaptor";
3
+ export { ArrowField, centigradePlus90ToRadians };
@@ -1,89 +1,83 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var programs_1 = require("../programs");
4
- var ArrowFieldPlugin = /** @class */ (function () {
5
- function ArrowFieldPlugin(id, _a) {
6
- var _b = _a === void 0 ? {} : _a, _c = _b.minLon, minLon = _c === void 0 ? -180 : _c, _d = _b.maxLon, maxLon = _d === void 0 ? 180 : _d, _e = _b.minLat, minLat = _e === void 0 ? -90 : _e, _f = _b.maxLat, maxLat = _f === void 0 ? 90 : _f, _g = _b.height, height = _g === void 0 ? 0 : _g, _h = _b.opacity, opacity = _h === void 0 ? 1 : _h, _j = _b.tailLengthRatio, tailLengthRatio = _j === void 0 ? 1 : _j, _k = _b.wingLengthRatio, wingLengthRatio = _k === void 0 ? 0.5 : _k, _l = _b.color, color = _l === void 0 ? [0.04, 0.2, 0.8] : _l, _m = _b.targetWidth, targetWidth = _m === void 0 ? 100 : _m, _o = _b.targetHeight, targetHeight = _o === void 0 ? 100 : _o, _p = _b.data, data = _p === void 0 ? null : _p, _q = _b.dataWidth, dataWidth = _q === void 0 ? null : _q, _r = _b.dataHeight, dataHeight = _r === void 0 ? null : _r, _s = _b.maxMagnitude, maxMagnitude = _s === void 0 ? null : _s, _t = _b.noDataValue, noDataValue = _t === void 0 ? null : _t;
1
+ import { ArrowField } from '../programs';
2
+ export default class ArrowFieldPlugin {
3
+ constructor(id, { minLon = -180, maxLon = 180, minLat = -90, maxLat = 90, height = 0, opacity = 1, tailLengthRatio = 1, wingLengthRatio = 0.5, color = [0.04, 0.2, 0.8], targetWidth = 100, targetHeight = 100, data = null, dataWidth = null, dataHeight = null, maxMagnitude = null, noDataValue = null } = {}) {
7
4
  this.id = id;
8
5
  this.options = {
9
- minLon: minLon,
10
- maxLon: maxLon,
11
- minLat: minLat,
12
- maxLat: maxLat,
13
- height: height,
14
- tailLengthRatio: tailLengthRatio,
15
- wingLengthRatio: wingLengthRatio,
16
- opacity: opacity,
17
- color: color,
18
- data: data,
19
- targetHeight: targetHeight,
20
- targetWidth: targetWidth,
21
- dataWidth: dataWidth,
22
- dataHeight: dataHeight,
23
- maxMagnitude: maxMagnitude,
24
- noDataValue: noDataValue
6
+ minLon,
7
+ maxLon,
8
+ minLat,
9
+ maxLat,
10
+ height,
11
+ tailLengthRatio,
12
+ wingLengthRatio,
13
+ opacity,
14
+ color,
15
+ data,
16
+ targetHeight,
17
+ targetWidth,
18
+ dataWidth,
19
+ dataHeight,
20
+ maxMagnitude,
21
+ noDataValue
25
22
  };
26
23
  this.arrowFieldObj = null;
27
24
  this._doDraw = true;
28
25
  }
29
- ArrowFieldPlugin.prototype.init = function (globe, gl) {
26
+ init(globe, gl) {
30
27
  this.globe = globe;
31
28
  this.gl = gl;
32
- this.arrowFieldObj = new programs_1.ArrowField(gl, globe, this.options);
33
- };
34
- ArrowFieldPlugin.prototype.draw3D = function () {
29
+ this.arrowFieldObj = new ArrowField(gl, globe, this.options);
30
+ }
31
+ draw3D() {
35
32
  if (this._doDraw) {
36
- var _a = this, gl = _a.gl, arrowFieldObj = _a.arrowFieldObj;
33
+ const { gl, arrowFieldObj } = this;
37
34
  gl.disable(gl.DEPTH_TEST);
38
35
  arrowFieldObj.draw();
39
36
  gl.enable(gl.DEPTH_TEST);
40
37
  }
41
- };
42
- ArrowFieldPlugin.prototype.free = function () {
38
+ }
39
+ free() {
43
40
  this.arrowFieldObj.free();
44
41
  this.arrowFieldObj = null;
45
- };
42
+ }
46
43
  // user interaction methods
47
- ArrowFieldPlugin.prototype.on = function () {
44
+ on() {
48
45
  this._doDraw = true;
49
- };
50
- ArrowFieldPlugin.prototype.off = function () {
46
+ }
47
+ off() {
51
48
  this._doDraw = false;
52
- };
53
- ArrowFieldPlugin.prototype.setBBox = function (_a) {
54
- var _b = _a === void 0 ? {} : _a, _c = _b.minLon, minLon = _c === void 0 ? -180 : _c, _d = _b.maxLon, maxLon = _d === void 0 ? 180 : _d, _e = _b.minLat, minLat = _e === void 0 ? -90 : _e, _f = _b.maxLat, maxLat = _f === void 0 ? 90 : _f;
55
- this.arrowFieldObj.setBBox({ minLon: minLon, maxLon: maxLon, minLat: minLat, maxLat: maxLat });
56
- };
57
- ArrowFieldPlugin.prototype.setHeight = function (height) {
58
- this.arrowFieldObj.update({ height: height });
59
- };
60
- ArrowFieldPlugin.prototype.setColor = function (color) {
61
- this.arrowFieldObj.update({ color: color });
62
- };
63
- ArrowFieldPlugin.prototype.setOpacity = function (opacity) {
64
- this.arrowFieldObj.update({ opacity: opacity });
65
- };
66
- ArrowFieldPlugin.prototype.setTailLengthRatio = function (tailLengthRatio) {
67
- this.arrowFieldObj.update({ tailLengthRatio: tailLengthRatio });
68
- };
69
- ArrowFieldPlugin.prototype.setWingLengthRatio = function (wingLengthRatio) {
70
- this.arrowFieldObj.update({ wingLengthRatio: wingLengthRatio });
71
- };
72
- ArrowFieldPlugin.prototype.setDataResolution = function (dataWidth, dataHeight) {
73
- this.arrowFieldObj.update({ dataWidth: dataWidth, dataHeight: dataHeight });
74
- };
75
- ArrowFieldPlugin.prototype.setTargetResolution = function (targetWidth, targetHeight) {
49
+ }
50
+ setBBox({ minLon = -180, maxLon = 180, minLat = -90, maxLat = 90 } = {}) {
51
+ this.arrowFieldObj.setBBox({ minLon, maxLon, minLat, maxLat });
52
+ }
53
+ setHeight(height) {
54
+ this.arrowFieldObj.update({ height });
55
+ }
56
+ setColor(color) {
57
+ this.arrowFieldObj.update({ color });
58
+ }
59
+ setOpacity(opacity) {
60
+ this.arrowFieldObj.update({ opacity });
61
+ }
62
+ setTailLengthRatio(tailLengthRatio) {
63
+ this.arrowFieldObj.update({ tailLengthRatio });
64
+ }
65
+ setWingLengthRatio(wingLengthRatio) {
66
+ this.arrowFieldObj.update({ wingLengthRatio });
67
+ }
68
+ setDataResolution(dataWidth, dataHeight) {
69
+ this.arrowFieldObj.update({ dataWidth, dataHeight });
70
+ }
71
+ setTargetResolution(targetWidth, targetHeight) {
76
72
  this.arrowFieldObj.update({ resolution: [targetWidth, targetHeight] });
77
- };
78
- ArrowFieldPlugin.prototype.setMaxMagnitude = function (maxMagnitude) {
79
- this.arrowFieldObj.update({ maxMagnitude: maxMagnitude });
80
- };
81
- ArrowFieldPlugin.prototype.setNoDataValue = function (noDataValue) {
82
- this.arrowFieldObj.update({ noDataValue: noDataValue });
83
- };
84
- ArrowFieldPlugin.prototype.setData = function (rotationData) {
73
+ }
74
+ setMaxMagnitude(maxMagnitude) {
75
+ this.arrowFieldObj.update({ maxMagnitude });
76
+ }
77
+ setNoDataValue(noDataValue) {
78
+ this.arrowFieldObj.update({ noDataValue });
79
+ }
80
+ setData(rotationData) {
85
81
  this.arrowFieldObj.setData(rotationData);
86
- };
87
- return ArrowFieldPlugin;
88
- }());
89
- exports.default = ArrowFieldPlugin;
82
+ }
83
+ }
@@ -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.BearingLinePlugin = void 0;
7
- var plugin_1 = __importDefault(require("./plugin"));
8
- exports.BearingLinePlugin = plugin_1.default;
1
+ import BearingLinePlugin from "./plugin";
2
+ export { BearingLinePlugin };