@pirireis/webglobeplugins 0.9.12 → 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.
- package/Math/angle-calculation.js +1 -3
- package/Math/arc.js +29 -32
- package/Math/bounds/line-bbox.js +1 -3
- package/Math/constants.js +1 -6
- package/Math/frustum/types.js +1 -2
- package/Math/juction/arc-plane.js +32 -35
- package/Math/juction/line-sphere.js +9 -12
- package/Math/juction/plane-plane.js +15 -18
- package/Math/line.js +30 -33
- package/Math/methods.js +6 -24
- package/Math/plane.js +22 -25
- package/Math/quaternion.js +6 -9
- package/Math/types.js +1 -2
- package/Math/utils.js +2 -4
- package/Math/vec3.js +5 -8
- package/algorithms/search-binary.js +1 -4
- package/altitude-locator/draw-subset-obj.js +1 -3
- package/altitude-locator/plugin.js +34 -37
- package/altitude-locator/types.js +1 -3
- package/arrowfield/adaptor.js +1 -4
- package/arrowfield/index.js +3 -10
- package/arrowfield/plugin.js +3 -6
- package/bearing-line/index.js +2 -8
- package/bearing-line/plugin.js +62 -66
- package/circle-line-chain/chain-list-map.js +1 -5
- package/circle-line-chain/plugin.js +46 -50
- package/circle-line-chain/util.js +1 -5
- package/compass-rose/compass-rose-padding-flat.js +12 -16
- package/compass-rose/compass-text-writer.js +3 -7
- package/compass-rose/index.js +3 -7
- package/compassrose/compassrose.js +6 -9
- package/compassrose/index.js +2 -8
- package/heatwave/index.js +3 -10
- package/heatwave/isobar/objectarraylabels.js +7 -9
- package/heatwave/isobar/plugin.js +14 -54
- package/heatwave/isobar/quadtreecontours.js +2 -4
- package/heatwave/plugins/heatwaveglobeshell.js +9 -12
- package/index.js +12 -58
- package/package.json +1 -1
- package/partialrings/buffer-manager.js +2 -8
- package/partialrings/index.js +2 -41
- package/partialrings/plugin.js +13 -20
- package/partialrings/program.js +23 -30
- package/pin/pin-object-array.js +8 -13
- package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +3 -6
- package/point-heat-map/plugin-webworker.js +11 -14
- package/point-heat-map/point-to-heat-map-flow.js +9 -12
- package/point-tracks/key-methods.js +1 -4
- package/point-tracks/plugin.js +15 -19
- package/programs/arrowfield/index.js +2 -7
- package/programs/arrowfield/logic.js +7 -10
- package/programs/arrowfield/object.js +7 -13
- package/programs/data2legend/density-to-legend.js +6 -9
- package/programs/data2legend/point-to-density-texture.js +13 -16
- package/programs/float2legendwithratio/index.js +2 -8
- package/programs/float2legendwithratio/logic.js +3 -6
- package/programs/float2legendwithratio/object.js +5 -11
- package/programs/globe-util/is-globe-moved.js +3 -5
- package/programs/globeshell/index.js +2 -8
- package/programs/globeshell/wiggle/index.js +2 -8
- package/programs/globeshell/wiggle/logic.js +3 -6
- package/programs/globeshell/wiggle/object.js +5 -11
- package/programs/helpers/blender/program.js +3 -6
- package/programs/helpers/fadeaway/index.js +2 -7
- package/programs/helpers/fadeaway/logic.js +3 -6
- package/programs/helpers/fadeaway/object.js +5 -11
- package/programs/helpers/index.js +2 -8
- package/programs/index.js +9 -58
- package/programs/line-on-globe/angled-line.js +19 -22
- package/programs/line-on-globe/circle-accurate-3d.js +21 -24
- package/programs/line-on-globe/circle-accurate-flat.js +18 -24
- package/programs/line-on-globe/circle-accurate.js +27 -30
- package/programs/line-on-globe/circle.js +26 -29
- package/programs/line-on-globe/degree-padding-around-circle-3d.js +23 -26
- package/programs/line-on-globe/lines-color-instanced-flat.js +20 -24
- package/programs/line-on-globe/linestrip.js +28 -31
- package/programs/line-on-globe/naive-accurate-flexible.js +29 -32
- package/programs/line-on-globe/to-the-surface.js +15 -17
- package/programs/line-on-globe/util.js +1 -4
- package/programs/picking/pickable-renderer.js +25 -28
- package/programs/point-on-globe/element-globe-surface-glow.js +22 -25
- package/programs/point-on-globe/element-point-glow.js +26 -29
- package/programs/point-on-globe/square-pixel-point.js +13 -16
- package/programs/programcache.js +1 -6
- package/programs/rings/distancering/circleflatprogram.js +20 -56
- package/programs/rings/distancering/circlepaddingfreeangleprogram.js +21 -58
- package/programs/rings/distancering/circlepaddysharedbuffer.js +1 -4
- package/programs/rings/distancering/index.js +5 -14
- package/programs/rings/distancering/paddyflatprogram.js +21 -57
- package/programs/rings/distancering/paddyflatprogram2d.js +21 -57
- package/programs/rings/distancering/paddyflatprogram3d.js +21 -57
- package/programs/rings/index.js +1 -17
- package/programs/rings/partial-ring/piece-of-pie.js +23 -25
- package/programs/totems/camerauniformblock.js +7 -11
- package/programs/totems/canvas-webglobe-info.js +6 -10
- package/programs/totems/gpu-selection-uniform-block.js +7 -11
- package/programs/totems/index.js +2 -40
- package/programs/two-d/pixel-padding-for-compass.js +10 -13
- package/programs/util.js +1 -3
- package/programs/vectorfields/index.js +3 -23
- package/programs/vectorfields/logics/drawrectangleparticles.js +9 -12
- package/programs/vectorfields/logics/index.js +4 -12
- package/programs/vectorfields/logics/pixelbased.js +10 -13
- package/programs/vectorfields/logics/ubo.js +1 -7
- package/programs/vectorfields/pingpongbuffermanager.js +1 -4
- package/rangerings/enum.js +2 -5
- package/rangerings/index.js +5 -15
- package/rangerings/plugin.js +61 -68
- package/rangerings/rangeringangletext.js +26 -29
- package/rangerings/ring-account.js +1 -6
- package/shaders/fragment-toy/firework.js +1 -4
- package/shaders/fragment-toy/singularity.js +1 -4
- package/timetracks/adaptors-line-strip.js +3 -9
- package/timetracks/adaptors.js +3 -8
- package/timetracks/index.js +5 -19
- package/timetracks/plugin-line-strip.js +6 -12
- package/timetracks/plugin.js +6 -12
- package/timetracks/program-line-strip.js +9 -12
- package/timetracks/program.js +10 -13
- package/timetracks/programpoint-line-strip.js +6 -9
- package/timetracks/programpoint.js +6 -9
- package/util/account/bufferoffsetmanager.js +1 -4
- package/util/account/index.js +3 -23
- package/util/account/single-attribute-buffer-management/buffer-manager.js +1 -5
- package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +1 -5
- package/util/account/single-attribute-buffer-management/index.js +4 -9
- package/util/account/single-attribute-buffer-management/object-store.js +1 -5
- package/util/account/single-attribute-buffer-management/types.js +1 -2
- package/util/account/util.js +1 -5
- package/util/algorithms/search-binary.js +1 -4
- package/util/check/get.js +1 -5
- package/util/check/typecheck.js +7 -16
- package/util/geometry/index.js +1 -7
- package/util/gl-util/buffer/attribute-loader.js +2 -6
- package/util/gl-util/buffer/index.js +2 -5
- package/util/gl-util/draw-options/methods.js +2 -6
- package/util/gl-util/uniform-block/manager.js +2 -5
- package/util/heatwavedatamanager/datamanager.js +1 -4
- package/util/heatwavedatamanager/index.js +3 -10
- package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +3 -9
- package/util/heatwavedatamanager/pointcoordsmeta.js +1 -4
- package/util/index.js +13 -57
- package/util/interpolation/timetrack/index.js +1 -4
- package/util/interpolation/timetrack/timetrack-interpolator.js +6 -10
- package/util/interpolation/timetrack/web-worker-str.js +1 -4
- package/util/interpolation/timetrack/web-worker.js +2 -4
- package/util/jshelpers/data-filler.js +1 -4
- package/util/jshelpers/equality.js +1 -3
- package/util/jshelpers/index.js +2 -37
- package/util/jshelpers/timefilters.js +1 -3
- package/util/picking/fence.js +1 -4
- package/util/picking/picker-displayer.js +6 -9
- package/util/programs/draw-texture-on-canvas.js +6 -9
- package/util/programs/index.js +1 -17
- package/util/programs/shapesonglobe.js +9 -13
- package/util/programs/supersampletotextures.js +3 -7
- package/util/programs/texturetoglobe.js +8 -11
- package/util/shaderfunctions/geometrytransformations.js +24 -31
- package/util/shaderfunctions/index.js +2 -18
- package/util/shaderfunctions/nodata.js +1 -4
- package/util/shaderfunctions/noisefunctions.js +1 -3
- package/util/webglobe/gldefaultstates.js +1 -4
- package/util/webglobe/index.js +2 -18
- package/util/webglobe/rasteroverlay.js +1 -4
- package/util/webglobjectbuilders.js +16 -34
- package/util/webglobjectbuilders1.js +16 -34
- package/waveparticles/adaptor.js +1 -3
- package/waveparticles/index.js +3 -10
- package/waveparticles/plugin.js +9 -12
- package/wind/imagetovectorfieldandmagnitude.js +1 -4
- package/wind/index.js +5 -14
- package/wind/plugin.js +6 -45
- package/wind/vectorfieldimage.js +1 -3
- package/write-text/attached-text-writer.js +6 -10
- package/write-text/context-text.js +4 -8
- package/write-text/context-text3.js +7 -11
- package/write-text/index.js +1 -5
package/rangerings/plugin.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* @typedef RangeRingData
|
|
4
3
|
* @property {number} centerX
|
|
@@ -25,30 +24,24 @@
|
|
|
25
24
|
* @method setOneDegreePaddingOn // performance consuming, might be removed
|
|
26
25
|
*
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const rangeringangletext_1 = __importDefault(require("./rangeringangletext"));
|
|
43
|
-
const util_1 = require("../programs/line-on-globe/util");
|
|
44
|
-
Object.defineProperty(exports, "Z_ALPHA_MODE", { enumerable: true, get: function () { return util_1.Z_ALPHA_MODE; } });
|
|
45
|
-
const enum_1 = require("./enum");
|
|
46
|
-
const typecheck_1 = require("../util/check/typecheck");
|
|
47
|
-
const geometry_1 = require("../util/geometry");
|
|
27
|
+
import { centerCoords2dflatDataCreatorWithRadius, CircleCache as CircleCache2D } from "../programs/line-on-globe/circle-accurate-flat";
|
|
28
|
+
import { CircleCache as CircleCache3D } from "../programs/line-on-globe/circle-accurate-3d";
|
|
29
|
+
import { LinesColorInstancedFlatCache } from "../programs/line-on-globe/lines-color-instanced-flat";
|
|
30
|
+
import { BufferOrchestrator, BufferManager } from "../util/account";
|
|
31
|
+
import { mapGetOrThrow } from "../util/check/get";
|
|
32
|
+
import { populateFloat32Array } from "../util/jshelpers/data-filler";
|
|
33
|
+
import { RingAccount, ringBigPaddingKeyMethod, ringKeyMethod } from "./ring-account";
|
|
34
|
+
import { CirclePadding3DCache } from "../programs/line-on-globe/degree-padding-around-circle-3d";
|
|
35
|
+
import { LineOnGlobeCache } from '../programs/line-on-globe/naive-accurate-flexible';
|
|
36
|
+
import RangeRingAngleText from "./rangeringangletext";
|
|
37
|
+
import { Z_ALPHA_MODE } from "../programs/line-on-globe/util";
|
|
38
|
+
import { ENUM_HIDE } from "./enum";
|
|
39
|
+
import { opacityCheck, constraintFloat } from "../util/check/typecheck";
|
|
40
|
+
import { normalize } from "../util/geometry";
|
|
48
41
|
const CIRCLE_FLAT_EDGE_COUNT = 362; // 360 + 2 for closing the circle and a cutting point
|
|
49
42
|
const coordOnSphere = (long, lat, globe, altitude = 0) => {
|
|
50
43
|
const coord = globe.api_GetCartesian3DPoint(long, lat, 0, 0);
|
|
51
|
-
return
|
|
44
|
+
return normalize(coord, 6378.137 + altitude);
|
|
52
45
|
};
|
|
53
46
|
/**
|
|
54
47
|
*
|
|
@@ -74,14 +67,14 @@ const coordOnSphere = (long, lat, globe, altitude = 0) => {
|
|
|
74
67
|
* @property {Array<RangeRing>} rings
|
|
75
68
|
*/
|
|
76
69
|
class RangeRings {
|
|
77
|
-
constructor(id, { oneDegreePadding = true, showNumbers = true, numbersStyle = null, opacity = 1, zAlphaOnDegreePadding =
|
|
70
|
+
constructor(id, { oneDegreePadding = true, showNumbers = true, numbersStyle = null, opacity = 1, zAlphaOnDegreePadding = Z_ALPHA_MODE.ON } = {}, { textDataPreAdaptor = null, textWritersMap = new Map() } = {}) {
|
|
78
71
|
this.id = id;
|
|
79
72
|
this._oneDegreePadding = oneDegreePadding;
|
|
80
73
|
this._zAlphaOnDegreePadding = zAlphaOnDegreePadding;
|
|
81
74
|
this._showNumbers = showNumbers;
|
|
82
75
|
this._numbersStyle = numbersStyle;
|
|
83
76
|
this._opacity = opacity;
|
|
84
|
-
this._ringAccount = new
|
|
77
|
+
this._ringAccount = new RingAccount();
|
|
85
78
|
this._textWritersMap = textWritersMap;
|
|
86
79
|
this._textDataPreAdaptor = textDataPreAdaptor;
|
|
87
80
|
this._textWritersMap.forEach((textWriter) => textWriter.setKeyAdaptor((item) => item.__identity__));
|
|
@@ -243,7 +236,7 @@ class RangeRings {
|
|
|
243
236
|
* @method setOpacity @param { number } opacity
|
|
244
237
|
*/
|
|
245
238
|
setOpacity(opacity) {
|
|
246
|
-
|
|
239
|
+
opacityCheck(opacity);
|
|
247
240
|
this._opacity = opacity;
|
|
248
241
|
this.paddingTextPlugin?.setOpacity(opacity);
|
|
249
242
|
this._textWritersMap.forEach((writer) => writer.setOpacity(opacity));
|
|
@@ -271,72 +264,72 @@ class RangeRings {
|
|
|
271
264
|
// PRIVATE METHODS
|
|
272
265
|
_initPrograms() {
|
|
273
266
|
const { globe } = this;
|
|
274
|
-
this._circleProgram2D =
|
|
275
|
-
this._circleProgram3D =
|
|
276
|
-
this._padding2dProgram =
|
|
277
|
-
this._padding3dProgram =
|
|
278
|
-
this._lineOnGlobe_bigPadding =
|
|
267
|
+
this._circleProgram2D = CircleCache2D.get(globe);
|
|
268
|
+
this._circleProgram3D = CircleCache3D.get(globe);
|
|
269
|
+
this._padding2dProgram = LinesColorInstancedFlatCache.get(globe);
|
|
270
|
+
this._padding3dProgram = CirclePadding3DCache.get(globe);
|
|
271
|
+
this._lineOnGlobe_bigPadding = LineOnGlobeCache.get(globe);
|
|
279
272
|
}
|
|
280
273
|
_initBufferManagers() {
|
|
281
274
|
const { gl } = this;
|
|
282
275
|
const initialCapacity = 10;
|
|
283
276
|
const bufferType = "DYNAMIC_DRAW";
|
|
284
277
|
// circle2d, circle3d, 1 degree paddings,
|
|
285
|
-
this.bufferOrchestrator = new
|
|
278
|
+
this.bufferOrchestrator = new BufferOrchestrator({ capacity: initialCapacity });
|
|
286
279
|
this.bufferManagersCompMap = new Map([
|
|
287
280
|
// circle 3D
|
|
288
281
|
["centerCoords3d", {
|
|
289
|
-
'bufferManager': new
|
|
282
|
+
'bufferManager': new BufferManager(gl, 3, { bufferType, initialCapacity }),
|
|
290
283
|
'adaptor': (item) => new Float32Array(item.centerCoords3d),
|
|
291
284
|
}],
|
|
292
285
|
["targetCoords3d", {
|
|
293
|
-
'bufferManager': new
|
|
286
|
+
'bufferManager': new BufferManager(gl, 3, { bufferType, initialCapacity }),
|
|
294
287
|
'adaptor': (item) => new Float32Array(item.targetCoords3d),
|
|
295
288
|
}],
|
|
296
289
|
["rgba", {
|
|
297
|
-
'bufferManager': new
|
|
298
|
-
'adaptor': (item) => new Float32Array(item.hide ===
|
|
290
|
+
'bufferManager': new BufferManager(gl, 4, { bufferType, initialCapacity }),
|
|
291
|
+
'adaptor': (item) => new Float32Array(item.hide === ENUM_HIDE.HIDE ? [0, 0, 0, 0] : item.rgba)
|
|
299
292
|
}],
|
|
300
293
|
["radius3d", {
|
|
301
|
-
'bufferManager': new
|
|
294
|
+
'bufferManager': new BufferManager(gl, 1, { bufferType, initialCapacity }),
|
|
302
295
|
'adaptor': (item) => new Float32Array([item.radius])
|
|
303
296
|
}],
|
|
304
297
|
["radius3dsmall", {
|
|
305
|
-
'bufferManager': new
|
|
298
|
+
'bufferManager': new BufferManager(gl, 1, { bufferType, initialCapacity }),
|
|
306
299
|
'adaptor': (item) => {
|
|
307
|
-
if (item.hide ===
|
|
300
|
+
if (item.hide === ENUM_HIDE.HIDE_1_DEGREE_PADDINGS)
|
|
308
301
|
return new Float32Array([item.radius]);
|
|
309
302
|
return new Float32Array([item.radius - item.padding / 3]);
|
|
310
303
|
}
|
|
311
304
|
}],
|
|
312
305
|
["circleDashAngle", {
|
|
313
|
-
'bufferManager': new
|
|
306
|
+
'bufferManager': new BufferManager(gl, 1, { bufferType, initialCapacity }),
|
|
314
307
|
'adaptor': (item) => new Float32Array([1]),
|
|
315
308
|
}],
|
|
316
309
|
["dashOpacity", {
|
|
317
|
-
'bufferManager': new
|
|
310
|
+
'bufferManager': new BufferManager(gl, 1, { bufferType, initialCapacity }),
|
|
318
311
|
'adaptor': (item) => new Float32Array([1]),
|
|
319
312
|
}],
|
|
320
313
|
// circle 2D
|
|
321
314
|
["centerCoords2dflatForPadding", {
|
|
322
|
-
'bufferManager': new
|
|
315
|
+
'bufferManager': new BufferManager(gl, CIRCLE_FLAT_EDGE_COUNT * 2, { bufferType, initialCapacity }),
|
|
323
316
|
'adaptor': (item) => item.centerCoords2dflatForPadding,
|
|
324
317
|
}],
|
|
325
318
|
["centerCoords2dflat", {
|
|
326
|
-
'bufferManager': new
|
|
319
|
+
'bufferManager': new BufferManager(gl, CIRCLE_FLAT_EDGE_COUNT * 2, { bufferType, initialCapacity }),
|
|
327
320
|
'adaptor': (item) => item.centerCoords2dflat,
|
|
328
321
|
}],
|
|
329
322
|
["rgbaMercator", {
|
|
330
|
-
'bufferManager': new
|
|
331
|
-
'adaptor': (item) =>
|
|
323
|
+
'bufferManager': new BufferManager(gl, 4 * CIRCLE_FLAT_EDGE_COUNT, { bufferType, initialCapacity }),
|
|
324
|
+
'adaptor': (item) => populateFloat32Array.fillWithListData(CIRCLE_FLAT_EDGE_COUNT, item.hide === ENUM_HIDE.HIDE ? [0, 0, 0, 0] : item.rgba),
|
|
332
325
|
}],
|
|
333
326
|
["circleDashAngleMercator", {
|
|
334
|
-
'bufferManager': new
|
|
335
|
-
'adaptor': (item) =>
|
|
327
|
+
'bufferManager': new BufferManager(gl, CIRCLE_FLAT_EDGE_COUNT, { bufferType, initialCapacity }),
|
|
328
|
+
'adaptor': (item) => populateFloat32Array.fillFloat32Array(CIRCLE_FLAT_EDGE_COUNT, 1),
|
|
336
329
|
}],
|
|
337
330
|
["dashOpacityMercator", {
|
|
338
|
-
'bufferManager': new
|
|
339
|
-
'adaptor': (item) =>
|
|
331
|
+
'bufferManager': new BufferManager(gl, CIRCLE_FLAT_EDGE_COUNT, { bufferType, initialCapacity }),
|
|
332
|
+
'adaptor': (item) => populateFloat32Array.fillFloat32Array(CIRCLE_FLAT_EDGE_COUNT, 1),
|
|
340
333
|
}],
|
|
341
334
|
]);
|
|
342
335
|
const obj = function (bufferManagerComp, divisor = 1) {
|
|
@@ -349,26 +342,26 @@ class RangeRings {
|
|
|
349
342
|
this._oneDegree2DPaddingVao = this._padding2dProgram.createVAO({ buffer: this.bufferManagersCompMap.get("centerCoords2dflat").bufferManager.buffer, size: 2, stride: 0, offset: 0 }, { buffer: this.bufferManagersCompMap.get("centerCoords2dflatForPadding").bufferManager.buffer, size: 2, stride: 0, offset: 0 }, { buffer: this.bufferManagersCompMap.get("rgbaMercator").bufferManager.buffer, size: 4, stride: 0, offset: 0 });
|
|
350
343
|
// PADDING
|
|
351
344
|
// this one needs glue to assosiate rings and their big paddings since the count for center is not fixed
|
|
352
|
-
this.paddingBufferOrchestrator = new
|
|
345
|
+
this.paddingBufferOrchestrator = new BufferOrchestrator({ capacity: initialCapacity });
|
|
353
346
|
this.bufferManagersCompMapPadding = new Map([
|
|
354
347
|
["circlePoint2d", {
|
|
355
|
-
'bufferManager': new
|
|
348
|
+
'bufferManager': new BufferManager(gl, 2, { bufferType, initialCapacity }),
|
|
356
349
|
'adaptor': (item) => item.circlePoint2d,
|
|
357
350
|
}],
|
|
358
351
|
["paddingPoint2d", {
|
|
359
|
-
'bufferManager': new
|
|
352
|
+
'bufferManager': new BufferManager(gl, 2, { bufferType, initialCapacity }),
|
|
360
353
|
'adaptor': (item) => item.paddingPoint2d,
|
|
361
354
|
}],
|
|
362
355
|
["circlePoint3d", {
|
|
363
|
-
'bufferManager': new
|
|
356
|
+
'bufferManager': new BufferManager(gl, 3, { bufferType, initialCapacity }),
|
|
364
357
|
'adaptor': (item) => item.circlePoint3d
|
|
365
358
|
}],
|
|
366
359
|
["paddingPoint3d", {
|
|
367
|
-
'bufferManager': new
|
|
360
|
+
'bufferManager': new BufferManager(gl, 3, { bufferType, initialCapacity }),
|
|
368
361
|
'adaptor': (item) => item.paddingPoint3d
|
|
369
362
|
}],
|
|
370
363
|
["rgba", {
|
|
371
|
-
'bufferManager': new
|
|
364
|
+
'bufferManager': new BufferManager(gl, 4, { bufferType, initialCapacity }),
|
|
372
365
|
'adaptor': (item) => new Float32Array(item.rgba)
|
|
373
366
|
}],
|
|
374
367
|
// ["dashOpacity", {
|
|
@@ -399,7 +392,7 @@ class RangeRings {
|
|
|
399
392
|
const circlePoint = globe.Math.FindPointByPolar(long, lat, radius, azimuthAngle); // long lat
|
|
400
393
|
const paddingPoint = globe.Math.FindPointByPolar(long, lat, radius - padding, azimuthAngle); // long lat
|
|
401
394
|
result.push({
|
|
402
|
-
key:
|
|
395
|
+
key: ringBigPaddingKeyMethod(centerID, ringID, azimuthAngle),
|
|
403
396
|
circlePoint2d: new Float32Array(globe.api_GetMercator2DPoint(circlePoint.long, circlePoint.lat)),
|
|
404
397
|
paddingPoint2d: new Float32Array(globe.api_GetMercator2DPoint(paddingPoint.long, paddingPoint.lat)),
|
|
405
398
|
circlePoint3d: coordOnSphere(circlePoint.long, circlePoint.lat, globe, altitude / 1000),
|
|
@@ -423,11 +416,11 @@ class RangeRings {
|
|
|
423
416
|
const result = [];
|
|
424
417
|
for (const { ringID, radius, padding, __identity__, altitude = centralAltitude } of rings) {
|
|
425
418
|
const key = __identity__;
|
|
426
|
-
const centerCoords2dflat =
|
|
427
|
-
const radiusPadding = hide ===
|
|
419
|
+
const centerCoords2dflat = centerCoords2dflatDataCreatorWithRadius(globe, long, lat, radius, { edgeCount: CIRCLE_FLAT_EDGE_COUNT });
|
|
420
|
+
const radiusPadding = hide === ENUM_HIDE.HIDE_1_DEGREE_PADDINGS ? radius : radius - padding / 3;
|
|
428
421
|
const targetPoint = globe.Math.FindPointByPolar(long, lat, radius, 0); // long lat
|
|
429
422
|
const targetCoords3d = coordOnSphere(targetPoint.long, targetPoint.lat, globe, altitude / 1000);
|
|
430
|
-
const centerCoords2dflatForPadding =
|
|
423
|
+
const centerCoords2dflatForPadding = centerCoords2dflatDataCreatorWithRadius(globe, long, lat, radiusPadding, { edgeCount: CIRCLE_FLAT_EDGE_COUNT });
|
|
431
424
|
result.push({
|
|
432
425
|
key,
|
|
433
426
|
centerCoords3d,
|
|
@@ -453,7 +446,7 @@ class RangeRings {
|
|
|
453
446
|
let angle = 0;
|
|
454
447
|
while (angle < 360) {
|
|
455
448
|
result.push({
|
|
456
|
-
key:
|
|
449
|
+
key: ringBigPaddingKeyMethod(centerID, ringID, angle),
|
|
457
450
|
rgba: hide === 1 ? new Float32Array([0, 0, 0, 0]) : rgba,
|
|
458
451
|
textHide
|
|
459
452
|
});
|
|
@@ -472,7 +465,7 @@ class RangeRings {
|
|
|
472
465
|
const key = __identity__;
|
|
473
466
|
result.push({
|
|
474
467
|
key,
|
|
475
|
-
rgba: hide ===
|
|
468
|
+
rgba: hide === ENUM_HIDE.HIDE ? new Float32Array([0, 0, 0, 0]) : rgba,
|
|
476
469
|
textHide
|
|
477
470
|
});
|
|
478
471
|
}
|
|
@@ -485,7 +478,7 @@ class RangeRings {
|
|
|
485
478
|
this._initPrograms();
|
|
486
479
|
this._initBufferManagers();
|
|
487
480
|
if (this._showNumbers) {
|
|
488
|
-
this.paddingTextPlugin = new
|
|
481
|
+
this.paddingTextPlugin = new RangeRingAngleText(globe, this.id + "text", { style: this._numbersStyle, opacity: this._opacity });
|
|
489
482
|
delete this._numbersStyle;
|
|
490
483
|
}
|
|
491
484
|
}
|
|
@@ -523,11 +516,11 @@ class RangeRings {
|
|
|
523
516
|
this.gl.deleteVertexArray(this._padding3dOneDegreeVao);
|
|
524
517
|
this.gl.deleteVertexArray(this._bigPadding3dFlatVAO);
|
|
525
518
|
// delete programs
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
519
|
+
CircleCache2D.release(globe);
|
|
520
|
+
CircleCache3D.release(globe);
|
|
521
|
+
LinesColorInstancedFlatCache.release(globe);
|
|
522
|
+
CirclePadding3DCache.release(globe);
|
|
523
|
+
LineOnGlobeCache.release(globe);
|
|
531
524
|
this._circleProgram2D = null;
|
|
532
525
|
this._circleProgram3D = null;
|
|
533
526
|
this._padding2dProgram = null;
|
|
@@ -550,5 +543,5 @@ class RangeRings {
|
|
|
550
543
|
centerIDs.forEach((centerID) => { this._ringAccount.textUpdate(centerID, textWriters, this._textDataPreAdaptor); });
|
|
551
544
|
}
|
|
552
545
|
}
|
|
553
|
-
|
|
554
|
-
|
|
546
|
+
const textWriterGetOrThrow = mapGetOrThrow("textWriterIDs is invalid");
|
|
547
|
+
export { RangeRings, Z_ALPHA_MODE };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const webglobe_1 = require("@pirireis/webglobe");
|
|
4
|
-
const enum_1 = require("./enum");
|
|
1
|
+
import { CSObjectArrayUpdateTypes, } from "@pirireis/webglobe";
|
|
2
|
+
import { ENUM_HIDE, ENUM_TEXT_HIDE } from "./enum";
|
|
5
3
|
const fidKey = "__fid__";
|
|
6
4
|
const object = {
|
|
7
5
|
"displayName": "RangeRingAngleText",
|
|
@@ -16,7 +14,7 @@ const object = {
|
|
|
16
14
|
"MVTXYZName": "hd_seyp",
|
|
17
15
|
"rasterize": false,
|
|
18
16
|
};
|
|
19
|
-
class RangeRingAngleText {
|
|
17
|
+
export default class RangeRingAngleText {
|
|
20
18
|
constructor(globe, id, { style = null, hideAll = false, opacity = 1 } = {}) {
|
|
21
19
|
this.globe = globe;
|
|
22
20
|
this.ObjectArray = globe.ObjectArray;
|
|
@@ -84,13 +82,13 @@ class RangeRingAngleText {
|
|
|
84
82
|
coordsZ: [],
|
|
85
83
|
attribs: []
|
|
86
84
|
};
|
|
87
|
-
for (const { centerID, long, lat, rings, stepAngle, hide =
|
|
85
|
+
for (const { centerID, long, lat, rings, stepAngle, hide = ENUM_HIDE.SHOW, textHide = ENUM_TEXT_HIDE.SHOW } of ringDatas) {
|
|
88
86
|
if (this._centerCollection.has(centerID)) {
|
|
89
87
|
this._fillDeleteBucket(centerID, deleteBucket);
|
|
90
88
|
}
|
|
91
89
|
const maxRadius = rings.reduce((acc, { radius }) => Math.max(acc, radius), 0);
|
|
92
|
-
const textHide_ = _hideAll ?
|
|
93
|
-
const show = hide !==
|
|
90
|
+
const textHide_ = _hideAll ? ENUM_TEXT_HIDE.HIDE : textHide;
|
|
91
|
+
const show = hide !== ENUM_HIDE.HIDE && textHide_ === ENUM_TEXT_HIDE.SHOW;
|
|
94
92
|
if (show)
|
|
95
93
|
this._appendCircle(long, lat, maxRadius, stepAngle, centerID, addBucket);
|
|
96
94
|
this._centerCollection.set(centerID, new Map([
|
|
@@ -105,9 +103,9 @@ class RangeRingAngleText {
|
|
|
105
103
|
if (this._hideAll)
|
|
106
104
|
return;
|
|
107
105
|
if (deleteBucket.coords.length > 0)
|
|
108
|
-
this._updateData(deleteBucket,
|
|
106
|
+
this._updateData(deleteBucket, CSObjectArrayUpdateTypes.DELETE);
|
|
109
107
|
if (addBucket.coords.length > 0)
|
|
110
|
-
this._updateData(addBucket,
|
|
108
|
+
this._updateData(addBucket, CSObjectArrayUpdateTypes.ADD);
|
|
111
109
|
}
|
|
112
110
|
/**
|
|
113
111
|
* @param {Array<{centerID, x,y}>} centerDatas
|
|
@@ -126,7 +124,7 @@ class RangeRingAngleText {
|
|
|
126
124
|
centerMap.set("lat", lat);
|
|
127
125
|
const hide = centerMap.get("hide");
|
|
128
126
|
const textHide = centerMap.get("textHide");
|
|
129
|
-
const isHidden = hide ===
|
|
127
|
+
const isHidden = hide === ENUM_HIDE.HIDE || textHide === ENUM_TEXT_HIDE.HIDE;
|
|
130
128
|
if (isHidden)
|
|
131
129
|
continue;
|
|
132
130
|
const maxRadius = centerMap.get("maxRadius");
|
|
@@ -139,7 +137,7 @@ class RangeRingAngleText {
|
|
|
139
137
|
// delete attribs["aci"];
|
|
140
138
|
// }
|
|
141
139
|
if (updateBucket.coords.length > 0) {
|
|
142
|
-
this._updateData(updateBucket,
|
|
140
|
+
this._updateData(updateBucket, CSObjectArrayUpdateTypes.UPDATE);
|
|
143
141
|
}
|
|
144
142
|
}
|
|
145
143
|
/**
|
|
@@ -166,10 +164,10 @@ class RangeRingAngleText {
|
|
|
166
164
|
if (!this._centerCollection.has(centerID))
|
|
167
165
|
continue;
|
|
168
166
|
const centerMap = this._centerCollection.get(centerID);
|
|
169
|
-
const isHidden = centerMap.get("hide") ===
|
|
167
|
+
const isHidden = centerMap.get("hide") === ENUM_HIDE.HIDE || centerMap.get("textHide") === ENUM_TEXT_HIDE.HIDE;
|
|
170
168
|
const _hide = hide !== null ? hide : centerMap.get("hide");
|
|
171
169
|
const _textHide = textHide !== null ? textHide : centerMap.get("textHide");
|
|
172
|
-
const show = (_hide !==
|
|
170
|
+
const show = (_hide !== ENUM_HIDE.HIDE) && (_textHide === ENUM_TEXT_HIDE.SHOW);
|
|
173
171
|
if (!isHidden && !show) {
|
|
174
172
|
this._fillDeleteBucket(centerID, deleteBucket);
|
|
175
173
|
}
|
|
@@ -182,9 +180,9 @@ class RangeRingAngleText {
|
|
|
182
180
|
centerMap.set("textHide", textHide);
|
|
183
181
|
}
|
|
184
182
|
if (deleteBucket.coords.length > 0)
|
|
185
|
-
this._updateData(deleteBucket,
|
|
183
|
+
this._updateData(deleteBucket, CSObjectArrayUpdateTypes.DELETE);
|
|
186
184
|
if (addBucket.coords.length > 0)
|
|
187
|
-
this._updateData(addBucket,
|
|
185
|
+
this._updateData(addBucket, CSObjectArrayUpdateTypes.ADD);
|
|
188
186
|
}
|
|
189
187
|
// TODO : Implement this
|
|
190
188
|
removeCenters(centerIDs) {
|
|
@@ -199,7 +197,7 @@ class RangeRingAngleText {
|
|
|
199
197
|
this._centerCollection.delete(centerID);
|
|
200
198
|
}
|
|
201
199
|
}
|
|
202
|
-
this._updateData(deleteBucket,
|
|
200
|
+
this._updateData(deleteBucket, CSObjectArrayUpdateTypes.DELETE);
|
|
203
201
|
}
|
|
204
202
|
hideAll() {
|
|
205
203
|
this._hideAll = true;
|
|
@@ -211,14 +209,14 @@ class RangeRingAngleText {
|
|
|
211
209
|
for (const [centerID, centerMap] of this._centerCollection) {
|
|
212
210
|
const hide = centerMap.get("hide");
|
|
213
211
|
const hideText = centerMap.get("textHide");
|
|
214
|
-
centerMap.set("textHide",
|
|
215
|
-
if (hide ===
|
|
212
|
+
centerMap.set("textHide", ENUM_TEXT_HIDE.HIDE);
|
|
213
|
+
if (hide === ENUM_HIDE.HIDE)
|
|
216
214
|
continue;
|
|
217
|
-
const isHidden = hideText ===
|
|
215
|
+
const isHidden = hideText === ENUM_TEXT_HIDE.HIDE;
|
|
218
216
|
if (!isHidden)
|
|
219
217
|
this._fillDeleteBucket(centerID, deleteBucket);
|
|
220
218
|
}
|
|
221
|
-
this._updateData(deleteBucket,
|
|
219
|
+
this._updateData(deleteBucket, CSObjectArrayUpdateTypes.DELETE);
|
|
222
220
|
}
|
|
223
221
|
showAll() {
|
|
224
222
|
this._hideAll = false;
|
|
@@ -229,22 +227,22 @@ class RangeRingAngleText {
|
|
|
229
227
|
};
|
|
230
228
|
for (const [centerID, centerMap] of this._centerCollection) {
|
|
231
229
|
const hide = centerMap.get("hide");
|
|
232
|
-
if (hide ===
|
|
230
|
+
if (hide === ENUM_HIDE.HIDE)
|
|
233
231
|
continue;
|
|
234
232
|
const hideText = centerMap.get("textHide");
|
|
235
|
-
const isHidden = hideText ===
|
|
233
|
+
const isHidden = hideText === ENUM_TEXT_HIDE.HIDE;
|
|
236
234
|
if (isHidden) {
|
|
237
235
|
const long = centerMap.get("long");
|
|
238
236
|
const lat = centerMap.get("lat");
|
|
239
237
|
const maxRadius = centerMap.get("maxRadius");
|
|
240
238
|
const stepAngle = centerMap.get("stepAngle");
|
|
241
239
|
this._appendCircle(long, lat, maxRadius, stepAngle, centerID, addBucket);
|
|
242
|
-
centerMap.set("hide",
|
|
243
|
-
centerMap.set("textHide",
|
|
240
|
+
centerMap.set("hide", ENUM_HIDE.SHOW);
|
|
241
|
+
centerMap.set("textHide", ENUM_TEXT_HIDE.SHOW);
|
|
244
242
|
}
|
|
245
243
|
}
|
|
246
244
|
if (addBucket.coords.length)
|
|
247
|
-
this._updateData(addBucket,
|
|
245
|
+
this._updateData(addBucket, CSObjectArrayUpdateTypes.ADD);
|
|
248
246
|
}
|
|
249
247
|
flush() {
|
|
250
248
|
const data = {
|
|
@@ -314,7 +312,7 @@ class RangeRingAngleText {
|
|
|
314
312
|
attribs: []
|
|
315
313
|
};
|
|
316
314
|
for (const [centerID, centerMap] of this._centerCollection) {
|
|
317
|
-
const isHidden = centerMap.get("hide") ===
|
|
315
|
+
const isHidden = centerMap.get("hide") === ENUM_HIDE.HIDE || centerMap.get("textHide") === ENUM_TEXT_HIDE.HIDE;
|
|
318
316
|
if (isHidden)
|
|
319
317
|
continue;
|
|
320
318
|
const long = centerMap.get("long");
|
|
@@ -323,7 +321,6 @@ class RangeRingAngleText {
|
|
|
323
321
|
const stepAngle = centerMap.get("stepAngle");
|
|
324
322
|
this._appendCircle(long, lat, maxRadius, stepAngle, centerID, updateBucket);
|
|
325
323
|
}
|
|
326
|
-
this._updateData(updateBucket,
|
|
324
|
+
this._updateData(updateBucket, CSObjectArrayUpdateTypes.UPDATE);
|
|
327
325
|
}
|
|
328
326
|
}
|
|
329
|
-
exports.default = RangeRingAngleText;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This account interacts with buffer orchestrations and buffers.
|
|
4
3
|
* For rings, coordinates and paddings
|
|
5
4
|
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ringBigPaddingKeyMethod = exports.ringKeyMethod = exports.RingAccount = void 0;
|
|
8
5
|
const ringKeyMethod = (centerID, ringID) => `${centerID}_${ringID}`;
|
|
9
|
-
exports.ringKeyMethod = ringKeyMethod;
|
|
10
6
|
const ringBigPaddingKeyMethod = (centerID, ringID, angle) => `${centerID}_${ringID}_${angle}`;
|
|
11
|
-
exports.ringBigPaddingKeyMethod = ringBigPaddingKeyMethod;
|
|
12
7
|
/**
|
|
13
8
|
* @typedef { Array < { ringID, radius, paddingRange } >} rings
|
|
14
9
|
* @param { Array < centerID: string, x: number, y: number, stepAngle: number, rgba: [4 numbers], rings: rings } items
|
|
@@ -114,4 +109,4 @@ class RingAccount {
|
|
|
114
109
|
});
|
|
115
110
|
}
|
|
116
111
|
}
|
|
117
|
-
|
|
112
|
+
export { RingAccount, ringKeyMethod, ringBigPaddingKeyMethod };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.singularity = void 0;
|
|
4
1
|
const singularity = `
|
|
5
2
|
|
|
6
3
|
vec3 palette(float d){
|
|
@@ -56,4 +53,4 @@ vec4 singularity(vec2 pointCoord, float u_phase) {
|
|
|
56
53
|
|
|
57
54
|
return rm(ro, rd);
|
|
58
55
|
}`;
|
|
59
|
-
|
|
56
|
+
export { singularity };
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.latLongToPixelXY = void 0;
|
|
4
|
-
exports.addCuttingPointLineStrip = addCuttingPointLineStrip;
|
|
5
|
-
exports.featuresToLineStringData = featuresToLineStringData;
|
|
6
|
-
exports.fillSliceOfFloat32ArrayLineStrip = fillSliceOfFloat32ArrayLineStrip;
|
|
7
|
-
const util_1 = require("../util");
|
|
8
|
-
Object.defineProperty(exports, "latLongToPixelXY", { enumerable: true, get: function () { return util_1.latLongToPixelXY; } });
|
|
1
|
+
import { latLongToPixelXY } from "../util";
|
|
9
2
|
/**
|
|
10
3
|
* @param {Array.<Array.<number>>} coordinates
|
|
11
4
|
* @param {Array.<number>} timestamps
|
|
@@ -58,7 +51,7 @@ function fillSliceOfFloat32ArrayLineStrip(floatArray, offset, coordinates, times
|
|
|
58
51
|
const time = timestamps[i];
|
|
59
52
|
const coord = coordinates[i];
|
|
60
53
|
const styleGroupName = styleGroupNameArray ? styleGroupNameArray[i] : "default";
|
|
61
|
-
const { x, y } =
|
|
54
|
+
const { x, y } = latLongToPixelXY(coord[1], coord[0]);
|
|
62
55
|
const z = coord[2] ? coord[2] / 1000.0 : 0;
|
|
63
56
|
floatArray.set([x, y, z, time, ...groupColorFunction(styleGroupName), startTime, endTime], offset);
|
|
64
57
|
offset += 9;
|
|
@@ -69,3 +62,4 @@ function addCuttingPointLineStrip(floatArray, offset) {
|
|
|
69
62
|
floatArray.set(new Float32Array(9).fill(NaN), offset);
|
|
70
63
|
return offset + 9;
|
|
71
64
|
}
|
|
65
|
+
export { addCuttingPointLineStrip, featuresToLineStringData, fillSliceOfFloat32ArrayLineStrip, latLongToPixelXY };
|
package/timetracks/adaptors.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.Adaptor = void 0;
|
|
4
|
-
exports.fillSliceOfFloat32Array = fillSliceOfFloat32Array;
|
|
5
|
-
exports.createFloat32Array = createFloat32Array;
|
|
6
|
-
const util_1 = require("../util");
|
|
7
|
-
const _latLongToPixelXY = util_1.latLongToPixelXY;
|
|
1
|
+
import { latLongToPixelXY } from "../util";
|
|
2
|
+
const _latLongToPixelXY = latLongToPixelXY;
|
|
8
3
|
class Adaptor {
|
|
9
4
|
/**
|
|
10
5
|
* @param {Object.<string, Color>} groupColorMap
|
|
@@ -52,7 +47,6 @@ class Adaptor {
|
|
|
52
47
|
return buffer;
|
|
53
48
|
}
|
|
54
49
|
}
|
|
55
|
-
exports.Adaptor = Adaptor;
|
|
56
50
|
/**
|
|
57
51
|
* @param {Array.<Array.<number>>} coordinates
|
|
58
52
|
* @param {Array.<number>} timestamps
|
|
@@ -120,3 +114,4 @@ function createFloat32Array(coordinatesArray) {
|
|
|
120
114
|
const array = new Float32Array(filteredSize * 9);
|
|
121
115
|
return array;
|
|
122
116
|
}
|
|
117
|
+
export { Adaptor, fillSliceOfFloat32Array, createFloat32Array };
|
package/timetracks/index.js
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.latLongToPixelXY = exports.fillSliceOfFloat32ArrayLineStrip = exports.featuresToLineStringData = exports.addCuttingPointLineStrip = exports.TimeTracksLineStrip = exports.TimeTracks = exports.createFloat32Array = exports.fillSliceOfFloat32Array = exports.Adaptor = void 0;
|
|
7
|
-
const plugin_1 = __importDefault(require("./plugin"));
|
|
8
|
-
exports.TimeTracks = plugin_1.default;
|
|
9
|
-
const adaptors_1 = require("./adaptors");
|
|
10
|
-
Object.defineProperty(exports, "Adaptor", { enumerable: true, get: function () { return adaptors_1.Adaptor; } });
|
|
11
|
-
Object.defineProperty(exports, "fillSliceOfFloat32Array", { enumerable: true, get: function () { return adaptors_1.fillSliceOfFloat32Array; } });
|
|
12
|
-
Object.defineProperty(exports, "createFloat32Array", { enumerable: true, get: function () { return adaptors_1.createFloat32Array; } });
|
|
13
|
-
const plugin_line_strip_1 = __importDefault(require("./plugin-line-strip"));
|
|
14
|
-
exports.TimeTracksLineStrip = plugin_line_strip_1.default;
|
|
15
|
-
const adaptors_line_strip_1 = require("./adaptors-line-strip");
|
|
16
|
-
Object.defineProperty(exports, "addCuttingPointLineStrip", { enumerable: true, get: function () { return adaptors_line_strip_1.addCuttingPointLineStrip; } });
|
|
17
|
-
Object.defineProperty(exports, "featuresToLineStringData", { enumerable: true, get: function () { return adaptors_line_strip_1.featuresToLineStringData; } });
|
|
18
|
-
Object.defineProperty(exports, "fillSliceOfFloat32ArrayLineStrip", { enumerable: true, get: function () { return adaptors_line_strip_1.fillSliceOfFloat32ArrayLineStrip; } });
|
|
19
|
-
Object.defineProperty(exports, "latLongToPixelXY", { enumerable: true, get: function () { return adaptors_line_strip_1.latLongToPixelXY; } });
|
|
1
|
+
import TimeTracks from './plugin';
|
|
2
|
+
import { Adaptor, fillSliceOfFloat32Array, createFloat32Array } from './adaptors';
|
|
3
|
+
import TimeTracksLineStrip from './plugin-line-strip';
|
|
4
|
+
import { addCuttingPointLineStrip, featuresToLineStringData, fillSliceOfFloat32ArrayLineStrip, latLongToPixelXY } from './adaptors-line-strip';
|
|
5
|
+
export { Adaptor, fillSliceOfFloat32Array, createFloat32Array, TimeTracks, TimeTracksLineStrip, addCuttingPointLineStrip, featuresToLineStringData, fillSliceOfFloat32ArrayLineStrip, latLongToPixelXY };
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Author: Toprak Nihat Deniz Ozturk
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const program_line_strip_1 = __importDefault(require("./program-line-strip"));
|
|
10
|
-
const programpoint_line_strip_1 = __importDefault(require("./programpoint-line-strip"));
|
|
4
|
+
import TrackGlowLineProgram from './program-line-strip';
|
|
5
|
+
import PointProgram from './programpoint-line-strip';
|
|
11
6
|
/**
|
|
12
7
|
* @typedef {Float32Array} TimeTrackMultiColorData | A linestring is representation, let A{a1, a2, a3}, B{b1, b2} be the points of the line.
|
|
13
8
|
* TimeTrackMultiColorData is [
|
|
@@ -36,7 +31,7 @@ const programpoint_line_strip_1 = __importDefault(require("./programpoint-line-s
|
|
|
36
31
|
uses float32array in a * {@link TimeTrackMultiColorData} format
|
|
37
32
|
|
|
38
33
|
*/
|
|
39
|
-
class TimeTrackMultiColorPlugin {
|
|
34
|
+
export default class TimeTrackMultiColorPlugin {
|
|
40
35
|
/**
|
|
41
36
|
* @param {String} id
|
|
42
37
|
* @param {Object} options
|
|
@@ -132,7 +127,7 @@ class TimeTrackMultiColorPlugin {
|
|
|
132
127
|
// ------------------------------------------------------------
|
|
133
128
|
_createPointProgram() {
|
|
134
129
|
const { gl } = this;
|
|
135
|
-
const program = new
|
|
130
|
+
const program = new PointProgram(gl, this.globe, this._attrBuffer, this._pointOptions);
|
|
136
131
|
program.setDrawCount(this._totalSize);
|
|
137
132
|
return program;
|
|
138
133
|
}
|
|
@@ -212,9 +207,9 @@ class TimeTrackMultiColorPlugin {
|
|
|
212
207
|
this.globe = globe;
|
|
213
208
|
this.gl = gl;
|
|
214
209
|
this._attrBuffer = gl.createBuffer();
|
|
215
|
-
this.program = new
|
|
210
|
+
this.program = new TrackGlowLineProgram(gl, this._attrBuffer, globe.api_ScrW(), globe.api_ScrH(), this._options);
|
|
216
211
|
if (this._pointOptions?.isOn)
|
|
217
|
-
this.pointProgram = new
|
|
212
|
+
this.pointProgram = new PointProgram(gl, globe, this._attrBuffer);
|
|
218
213
|
// this.pointProgram.setAttrBuffer(_attrBuffer);
|
|
219
214
|
this.setGeometry();
|
|
220
215
|
if (this._data) {
|
|
@@ -243,4 +238,3 @@ class TimeTrackMultiColorPlugin {
|
|
|
243
238
|
};
|
|
244
239
|
}
|
|
245
240
|
}
|
|
246
|
-
exports.default = TimeTrackMultiColorPlugin;
|