@pirireis/webglobeplugins 0.16.7 → 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 (152) hide show
  1. package/Math/angle-calculation.js +1 -0
  2. package/Math/contour/quadtreecontours.js +300 -0
  3. package/Math/finite-line-2d.js +58 -0
  4. package/Math/tessellation/hybrid-triangle-tessellation-meta.js +123 -0
  5. package/Math/tessellation/tile-merger.js +56 -0
  6. package/Math/tessellation/triangle-tessellation-meta.js +178 -32
  7. package/Math/tessellation/triangle-tessellation.js +5 -1
  8. package/compass-rose/compass-text-writer.js +39 -33
  9. package/constants.js +3 -0
  10. package/{util/heatwavedatamanager → heatwave}/datamanager.js +1 -1
  11. package/heatwave/{plugins/heatwaveglobeshell.js → heatwave.js} +8 -6
  12. package/heatwave/index.js +5 -3
  13. package/heatwave/{isobar/plugin.js → isobar.js} +6 -5
  14. package/{util/heatwavedatamanager → heatwave}/texture-point-sampler.js +24 -3
  15. package/package.json +4 -2
  16. package/programs/arrowfield/{object.js → arrow-field.js} +1 -1
  17. package/programs/arrowfield/logic.js +1 -1
  18. package/programs/data2legend/density-to-legend.js +24 -29
  19. package/programs/data2legend/point-to-density-texture.js +14 -17
  20. package/programs/float2legendwithratio/logic.js +2 -2
  21. package/programs/float2legendwithratio/object.js +1 -1
  22. package/programs/helpers/{blender/program.js → blender.js} +1 -1
  23. package/programs/helpers/{fadeaway/logic.js → fadeaway.js} +11 -2
  24. package/programs/index.js +20 -9
  25. package/programs/line-on-globe/circle-accurate-3d.js +12 -14
  26. package/programs/line-on-globe/circle-accurate-flat.js +0 -1
  27. package/programs/line-on-globe/degree-padding-around-circle-3d.js +13 -15
  28. package/programs/line-on-globe/lines-color-instanced-flat.js +15 -18
  29. package/programs/line-on-globe/naive-accurate-flexible.js +0 -1
  30. package/programs/picking/pickable-polygon-renderer.js +1 -1
  31. package/programs/picking/pickable-renderer.js +2 -2
  32. package/programs/point-on-globe/element-globe-surface-glow.js +2 -2
  33. package/programs/point-on-globe/element-point-glow.js +1 -1
  34. package/programs/point-on-globe/square-pixel-point.js +1 -1
  35. package/programs/polygon-on-globe/texture-dem-triangle-test-plugin-triangle.js +32 -6
  36. package/programs/polygon-on-globe/texture-dem-triangles.js +32 -5
  37. package/programs/rings/partial-ring/piece-of-pie.js +26 -29
  38. package/programs/totems/camerauniformblock.js +31 -42
  39. package/programs/two-d/pixel-padding-for-compass.js +14 -24
  40. package/programs/vectorfields/logics/drawrectangleparticles.js +1 -2
  41. package/programs/vectorfields/logics/pixelbased.js +1 -2
  42. package/programs/vectorfields/pingpongbuffermanager.js +1 -1
  43. package/range-tools-on-terrain/bearing-line/adapters.js +1 -1
  44. package/range-tools-on-terrain/circle-line-chain/adapters.js +0 -5
  45. package/range-tools-on-terrain/circle-line-chain/plugin.js +1 -1
  46. package/range-tools-on-terrain/range-ring/plugin.js +4 -6
  47. package/semiplugins/lightweight/line-plugin.js +0 -1
  48. package/semiplugins/shape-on-terrain/arc-plugin.js +0 -2
  49. package/semiplugins/shape-on-terrain/circle-plugin.js +2 -2
  50. package/semiplugins/shape-on-terrain/padding-1-degree.js +1 -1
  51. package/semiplugins/shell/bbox-renderer/index.js +2 -0
  52. package/{programs/globeshell/wiggle → semiplugins/shell/bbox-renderer}/logic.js +101 -102
  53. package/{programs/globeshell/wiggle → semiplugins/shell/bbox-renderer}/object.js +6 -7
  54. package/semiplugins/utility/container-plugin.js +94 -0
  55. package/semiplugins/utility/object-pass-container-plugin.js +80 -0
  56. package/{point-heat-map → tracks/point-heat-map}/adaptors/timetracksplugin-format-to-this.js +1 -1
  57. package/{point-heat-map → tracks/point-heat-map}/plugin-webworker.js +3 -3
  58. package/{point-heat-map → tracks/point-heat-map}/point-to-heat-map-flow.js +11 -14
  59. package/{point-tracks → tracks/point-tracks}/plugin.js +5 -5
  60. package/{timetracks → tracks/timetracks}/adaptors-line-strip.js +1 -1
  61. package/{timetracks → tracks/timetracks}/program-line-strip.js +49 -49
  62. package/{timetracks → tracks/timetracks}/programpoint-line-strip.js +16 -13
  63. package/types.js +6 -0
  64. package/util/account/bufferoffsetmanager.js +1 -1
  65. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +9 -95
  66. package/util/gl-util/uniform-block/manager.js +0 -1
  67. package/util/gl-util/uniform-block/types.js +0 -7
  68. package/util/index.js +10 -13
  69. package/util/picking/fence.js +16 -18
  70. package/util/picking/picker-displayer.js +4 -6
  71. package/util/programs/{shapesonglobe.js → draw-from-pixel-coords.js} +4 -7
  72. package/util/programs/draw-texture-on-canvas.js +1 -1
  73. package/util/programs/texturetoglobe.js +3 -3
  74. package/util/webglobe/rasteroverlay.js +1 -0
  75. package/vectorfield/arrowfield/index.js +3 -0
  76. package/{arrowfield → vectorfield/arrowfield}/plugin.js +2 -2
  77. package/{waveparticles → vectorfield/waveparticles}/plugin.js +12 -12
  78. package/{wind → vectorfield/wind}/index.js +1 -1
  79. package/{wind → vectorfield/wind}/plugin.js +32 -32
  80. package/write-text/attached-text-writer.js +9 -1
  81. package/write-text/context-text3.js +0 -1
  82. package/write-text/objectarraylabels/index.js +2 -0
  83. package/Math/tessellation/tessellation-algorithm.js +0 -67
  84. package/arrowfield/index.js +0 -3
  85. package/bearing-line/index.js +0 -2
  86. package/bearing-line/plugin.js +0 -444
  87. package/circle-line-chain/chain-list-map.js +0 -201
  88. package/circle-line-chain/plugin.js +0 -411
  89. package/circle-line-chain/util.js +0 -1
  90. package/compassrose/compassrose.js +0 -293
  91. package/compassrose/index.js +0 -2
  92. package/index.js +0 -12
  93. package/partialrings/buffer-manager.js +0 -75
  94. package/partialrings/index.js +0 -2
  95. package/partialrings/plugin.js +0 -128
  96. package/partialrings/program.js +0 -279
  97. package/programs/arrowfield/index.js +0 -2
  98. package/programs/globe-util/is-globe-moved.js +0 -19
  99. package/programs/globeshell/index.js +0 -2
  100. package/programs/globeshell/wiggle/index.js +0 -2
  101. package/programs/helpers/blender/index.js +0 -1
  102. package/programs/helpers/fadeaway/index.js +0 -2
  103. package/programs/helpers/fadeaway/object.js +0 -14
  104. package/programs/helpers/index.js +0 -2
  105. package/programs/rings/distancering/circleflatprogram.js +0 -116
  106. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +0 -326
  107. package/programs/rings/distancering/circlepaddysharedbuffer.js +0 -368
  108. package/programs/rings/distancering/index.js +0 -6
  109. package/programs/rings/distancering/paddyflatprogram.js +0 -127
  110. package/programs/rings/distancering/paddyflatprogram2d.js +0 -129
  111. package/programs/rings/distancering/paddyflatprogram3d.js +0 -128
  112. package/programs/two-d/pixel-circle.js +0 -1
  113. package/programs/vectorfields/index.js +0 -3
  114. package/rangerings/enum.js +0 -2
  115. package/rangerings/index.js +0 -5
  116. package/rangerings/plugin.js +0 -543
  117. package/rangerings/rangeringangletext.js +0 -326
  118. package/rangerings/ring-account.js +0 -112
  119. package/timetracks/index.js +0 -1
  120. package/util/build-strategy/general-strategy.js +0 -62
  121. package/util/gl-util/uniform-block/shader.js +0 -1
  122. package/util/heatwavedatamanager/index.js +0 -2
  123. package/util/heatwavedatamanager/pointcoordsmeta.js +0 -22
  124. package/util/jshelpers/data-filler.js +0 -17
  125. package/util/jshelpers/equality.js +0 -18
  126. package/util/jshelpers/index.js +0 -2
  127. package/util/jshelpers/timefilters.js +0 -30
  128. package/util/programs/index.js +0 -1
  129. package/util/surface-line-data/arc-bboxes.js +0 -25
  130. package/util/surface-line-data/arcs-to-cuts.js +0 -50
  131. package/util/surface-line-data/cut-arc.js +0 -1
  132. package/util/surface-line-data/flow.js +0 -28
  133. package/util/surface-line-data/rbush-manager.js +0 -1
  134. package/util/surface-line-data/types.js +0 -1
  135. package/util/surface-line-data/web-worker.js +0 -1
  136. package/write-text/context-text3old.js +0 -152
  137. package/write-text/index.js +0 -1
  138. package/write-text/writer-plugin.js +0 -8
  139. /package/{heatwave/isobar/quadtreecontours.js → Math/contour/quadtreecontours1.js} +0 -0
  140. /package/pin/{pin-object-array.js → pin-object-array1.js} +0 -0
  141. /package/pin/{pin-point-totem.js → pin-point-totem1.js} +0 -0
  142. /package/{circle-line-chain/init.js → programs/polygon-on-globe/partial-tesselation.js} +0 -0
  143. /package/{point-heat-map → tracks/point-heat-map}/index.js +0 -0
  144. /package/{point-tracks → tracks/point-tracks}/key-methods.js +0 -0
  145. /package/{timetracks → tracks/timetracks}/plugin-line-strip.js +0 -0
  146. /package/{arrowfield → vectorfield/arrowfield}/adaptor.js +0 -0
  147. /package/{waveparticles → vectorfield/waveparticles}/adaptor.js +0 -0
  148. /package/{waveparticles → vectorfield/waveparticles}/index.js +0 -0
  149. /package/{wind → vectorfield/wind}/imagetovectorfieldandmagnitude.js +0 -0
  150. /package/{wind → vectorfield/wind}/vectorfieldimage.js +0 -0
  151. /package/write-text/{context-text.js → context-textDELETE.js} +0 -0
  152. /package/{heatwave/isobar → write-text/objectarraylabels}/objectarraylabels.js +0 -0
@@ -1,28 +0,0 @@
1
- "use strict";
2
- // class FlowManager {
3
- // _populateCount: number;
4
- // _rbush: RBush<any>;
5
- // _arcToCutsManager: ArcToCutsManager;
6
- // consturctor({ populateCount = 36, dotDistanceOfArcCuts = 1 / Math.pow(2, 10 - 1) }) {
7
- // this._populateCount = populateCount;
8
- // // does the cutting and id mapping(one to many)
9
- // // cuts have their bbox ready for rbush
10
- // this._rbush = new RBush(1000);
11
- // this._arcToCutsManager = new ArcToCutsManager({ dotDistanceOfArcCuts, rbush: this._rbush }); // 10km
12
- // }
13
- // /**
14
- // * adds or updates an arc in the rbush and the cuts manager
15
- // */
16
- // insertArc(arc: Arc) {
17
- // this._arcToCutsManager.insertArc(arc);
18
- // }
19
- // deleteArc(id: Arc['id']) {
20
- // this._arcToCutsManager.deleteArc(id);
21
- // }
22
- // queryBBox(bbox: BBox) {
23
- // const arcIDSet = new Set(this._rbush.query(bbox).map(x => x.id)); // sets Of ids of arcs
24
- // // arcs U bbox => arcs
25
- // // populate points
26
- // // return typed array of points belonging to all the arcs of cuts
27
- // }
28
- // }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,152 +0,0 @@
1
- "use strict";
2
- // import { CSZMode } from "@pirireis/webglobe";
3
- // import { isTextFont, opacityCheck } from "../util/check/typecheck";
4
- // /**
5
- // * TODOs:
6
- // * 1) update all if initials change (propably need a context and a callback to iterate over zPayload)
7
- // * 2) expose a mechanic to update text on zoom change
8
- // * 3) extend the mechanic on 2 to other events
9
- // *
10
- // * TODO: key check and raise error if doesnt exist
11
- // */
12
- // export class ContextTextWriter3 {
13
- // constructor(globe, {
14
- // style = {
15
- // textFont: {
16
- // name: 'Arial',
17
- // textColor: '#FFFFFF', // beyaz
18
- // hollowColor: '#000000', // siyah
19
- // size: 12, // piksel
20
- // hollow: true,
21
- // bold: true,
22
- // italic: false,
23
- // },
24
- // opacity: 1.0,
25
- // zMode: CSZMode.Z_GROUND_PERVERTEX,
26
- // },
27
- // xOffset = 0,
28
- // yOffset = 0,
29
- // doDraw = true,
30
- // textAdaptor = null,
31
- // coordinatesAdaptor = null,
32
- // keyAdaptor = null,
33
- // opacityAdaptor = null,
34
- // angleAdaptor = null,
35
- // angleOnSphere = false,
36
- // positionAdaptor = (item, i, container, properties) => "left",
37
- // zoomLevelAdaptor = (zoomLevel) => (item) => {
38
- // return {
39
- // opacityMultiplier: 1,
40
- // sizeMultiplier: 1
41
- // }
42
- // }
43
- // } = {}) {
44
- // this.globe = globe;
45
- // this.itemMap = new Map();
46
- // this.setStyle(style);
47
- // this.doDraw = doDraw;
48
- // this._checkParameterTypes(textAdaptor, coordinatesAdaptor, keyAdaptor, opacityAdaptor, angleAdaptor, xOffset, yOffset);
49
- // this.textAdaptor = textAdaptor;
50
- // this.coordinatesAdaptor = coordinatesAdaptor;
51
- // this.keyAdaptor = keyAdaptor;
52
- // this.zoomLevelAdaptor = zoomLevelAdaptor;
53
- // this.positionAdaptor = positionAdaptor;
54
- // this.opacityAdaptor = opacityAdaptor ? opacityAdaptor : () => 1;
55
- // this.angleOnSphere = angleOnSphere;
56
- // if (angleAdaptor) {
57
- // this.angleAdaptor = angleAdaptor
58
- // this.angleAdaptorIsOn = true;
59
- // } else {
60
- // this.angleAdaptor = () => null
61
- // this.angleAdaptorIsOn = false
62
- // }
63
- // this.xOffset = xOffset;
64
- // this.yOffset = yOffset;
65
- // }
66
- // _checkParameterTypes(textAdaptor, coordinatesAdaptor, keyAdaptor, opacityAdaptor, angleAdaptor, xOffset, yOffset) {
67
- // if (textAdaptor !== null) if (!(textAdaptor instanceof Function)) throw new Error("textAdaptor is not an instance of a Function");
68
- // if (coordinatesAdaptor !== null) if (!(coordinatesAdaptor instanceof Function)) throw new Error("coordinatesAdaptor is not an instance of a Function");
69
- // if (keyAdaptor !== null) if (!(keyAdaptor instanceof Function)) throw new Error("keyAdaptor is not an instance of a Function");
70
- // if (opacityAdaptor !== null) if (!(opacityAdaptor instanceof Function)) throw new Error("opacityAdaptor is not an instance of a Function");
71
- // if (angleAdaptor !== null) if (!(angleAdaptor instanceof Function)) throw new Error("angleAdaptor is not an instance of a Function");
72
- // if (typeof xOffset !== "number") throw new Error("xOffset type is not a number");
73
- // if (typeof yOffset !== "number") throw new Error("yOffset type is not a number");
74
- // }
75
- // setKeyAdaptor(adaptor) {
76
- // this.keyAdaptor = adaptor;
77
- // }
78
- // setDoDraw(bool) {
79
- // this.doDraw = bool;
80
- // this.globe.DrawRender();
81
- // }
82
- // setStyle(style) {
83
- // isTextFont(style.textFont);
84
- // opacityCheck(style.opacity); //TODO: use shallow copy
85
- // this.style = style;
86
- // this.globe.DrawRender();
87
- // }
88
- // setOpacity(opacity) {
89
- // this.style.opacity = opacity;
90
- // this.globe.DrawRender();
91
- // }
92
- // draw() {
93
- // if (!this.doDraw) return;
94
- // const { globe, style, itemMap, xOffset, yOffset } = this;
95
- // const { textFont, opacity: opacity_ } = style;
96
- // const textSize = textFont.size;
97
- // const is3D = globe.api_GetCurrentGeometry() === 0;
98
- // const angleIsOn = is3D ? (this.angleAdaptorIsOn && this.angleOnSphere) : (this.angleAdaptorIsOn)
99
- // const zoomLevel = globe.api_GetCurrentLODWithDecimal();
100
- // const zoomAdaptor = this.zoomLevelAdaptor(zoomLevel);
101
- // for (const item of itemMap.values()) {
102
- // const { lat, long, text, opacity = null, angle = null, zPayload, position } = item;
103
- // const { x, y } = globe.api_GetScreenPointFromGeo(
104
- // {
105
- // long: long,
106
- // lat: lat,
107
- // z: 0,
108
- // },
109
- // style.zMode === CSZMode.Z_MSL,
110
- // );
111
- // const { opacityMultiplier, sizeMultiplier } = zoomAdaptor(zPayload);
112
- // const o = (opacity === null ? opacity_ : opacity * opacity_) * opacityMultiplier;
113
- // textFont.size = sizeMultiplier * textSize;
114
- // textFont.position = position;
115
- // if (x !== null && y !== null) globe.api_DrawContextTextMultiLine(text, textFont, o, { x: x + xOffset, y: y - yOffset }, angleIsOn, angle);
116
- // }
117
- // textFont.size = textSize;
118
- // }
119
- // insertTextBulk(container, properties) {
120
- // container.forEach((v, i, c) => {
121
- // this.insertText(v, i, c, properties);
122
- // });
123
- // }
124
- // deleteTextBulk(keys) {
125
- // for (const key of keys) {
126
- // this.itemMap.delete(key);
127
- // }
128
- // }
129
- // insertText(item, id, container, properties) {
130
- // const key = this.keyAdaptor(item, id, container, properties)
131
- // const coords = this.coordinatesAdaptor(item, id, container, properties)
132
- // if (coords == null) {
133
- // this.itemMap.delete(key);
134
- // return;
135
- // }
136
- // const text = this.textAdaptor(item, id, container, properties)
137
- // if (text == null) {
138
- // this.itemMap.delete(key);
139
- // return
140
- // };
141
- // const opacity = this.opacityAdaptor(item, id, container, properties);
142
- // const angle = this.angleAdaptor(item, id, container, properties);
143
- // const position = this.positionAdaptor(item, id, container, properties);
144
- // this.itemMap.set(key, { long: coords.long, lat: coords.lat, text, opacity, angle, zPayload: item, position });
145
- // }
146
- // clear() {
147
- // this.itemMap.clear();
148
- // }
149
- // free() {
150
- // this.itemMap = null;
151
- // }
152
- // }
@@ -1 +0,0 @@
1
- export { ContextTextWriter } from "./context-text";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * registerMap(id, aMap, textFont)
4
- * aMap key, object map.
5
- * aMap is a specifical tem for a use case.
6
- * The object has { text, long, lat, opacity, angle, zPayload, achor, xOffset, yOffset, ...extraPropertiesForZoomLevelAdaptor } properties.
7
- * the plugin runs over items in aMap and draw text on the globe.
8
- */
File without changes
File without changes