@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,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,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