@pirireis/webglobeplugins 0.7.3 → 0.7.5
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/compass-rose/compass-text-writer.js +0 -1
- package/package.json +1 -1
- package/point-heat-map/plugin-webworker.js +6 -6
- package/point-heat-map/plugin.js +3 -5
- package/rangerings/rangeringangletext.js +1 -15
- package/timetracks/plugin-line-strip.js +0 -1
- package/util/interpolation/timetrack/timetrack-interpolator.js +0 -1
- package/util/interpolation/timetrack/web-worker-str.js +0 -1
- package/util/webglobjectbuilders.js +1 -1
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ class PointHeatmapPlugin {
|
|
|
16
16
|
this._legendTexture = null;
|
|
17
17
|
|
|
18
18
|
this._throttleListener = null;
|
|
19
|
+
this._timeTracksAreSet = false;
|
|
19
20
|
const blob = new Blob([webworkerStr], { type: 'application/javascript' });
|
|
20
21
|
this.timeTrackInterpolationWorker = new Worker(URL.createObjectURL(blob), { type: 'module' });
|
|
21
22
|
this.timeTrackInterpolationWorker.onmessage = (e) => {
|
|
@@ -39,7 +40,8 @@ class PointHeatmapPlugin {
|
|
|
39
40
|
this.globe = globe;
|
|
40
41
|
this.gl = gl;
|
|
41
42
|
this.flow = new PointHeatmapFlow(globe);
|
|
42
|
-
|
|
43
|
+
this.setGeometry();
|
|
44
|
+
this.resize();
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
|
|
@@ -62,11 +64,8 @@ class PointHeatmapPlugin {
|
|
|
62
64
|
if (this.gl === null) {
|
|
63
65
|
throw new Error('Plugin not initialized');
|
|
64
66
|
};
|
|
65
|
-
console.log(values, thresholds, mode);
|
|
66
67
|
const rampData = getColorRampModed(values, thresholds, mode);
|
|
67
|
-
console.log(rampData);
|
|
68
68
|
const texture = createTexture(gl, gl.LINEAR, rampData, 256, 1);
|
|
69
|
-
console.log(texture);
|
|
70
69
|
if (this._legendTexture) {
|
|
71
70
|
this.gl.deleteTexture(this._legendTexture);
|
|
72
71
|
}
|
|
@@ -78,7 +77,7 @@ class PointHeatmapPlugin {
|
|
|
78
77
|
setTime(time) {
|
|
79
78
|
// TODO: WORK ON THIS
|
|
80
79
|
this._time = time;
|
|
81
|
-
if (this._throttleListener === null) {
|
|
80
|
+
if (this.isReady() && this._throttleListener === null) {
|
|
82
81
|
this._throttleListener = setTimeout(() => {
|
|
83
82
|
this.timeTrackInterpolationWorker.postMessage({ time: this._time });
|
|
84
83
|
}, 0);
|
|
@@ -87,6 +86,7 @@ class PointHeatmapPlugin {
|
|
|
87
86
|
|
|
88
87
|
|
|
89
88
|
setTimetracks(timeTracks) {
|
|
89
|
+
this._timeTracksAreSet = true;
|
|
90
90
|
this.timeTrackInterpolationWorker.postMessage({ timeTracks });
|
|
91
91
|
if (this._time !== null) {
|
|
92
92
|
this.setTime(this._time);
|
|
@@ -130,7 +130,7 @@ class PointHeatmapPlugin {
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
isReady() {
|
|
133
|
-
return (this.gl !== null && this._legendTexture !== null);
|
|
133
|
+
return (this.gl !== null && this._legendTexture !== null && this._timeTracksAreSet);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
free() {
|
package/point-heat-map/plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PointHeatmapFlow } from "./point-to-heat-map-flow";
|
|
2
2
|
import { TimeTrackInterpolator } from "../util/interpolation/timetrack/timetrack-interpolator";
|
|
3
3
|
import { createTexture, getColorRampModed } from "../util";
|
|
4
|
-
|
|
4
|
+
// TODO: DEPRECATED
|
|
5
5
|
class PointHeatmapPlugin {
|
|
6
6
|
|
|
7
7
|
constructor(id, { opacity = 1.0, pointSize = 5.0 } = {}) {
|
|
@@ -24,7 +24,8 @@ class PointHeatmapPlugin {
|
|
|
24
24
|
this.globe = globe;
|
|
25
25
|
this.gl = gl;
|
|
26
26
|
this.flow = new PointHeatmapFlow(globe);
|
|
27
|
-
|
|
27
|
+
this.setGeometry();
|
|
28
|
+
this.resize();
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
|
|
@@ -47,11 +48,8 @@ class PointHeatmapPlugin {
|
|
|
47
48
|
if (this.gl === null) {
|
|
48
49
|
throw new Error('Plugin not initialized');
|
|
49
50
|
};
|
|
50
|
-
console.log(values, thresholds, mode);
|
|
51
51
|
const rampData = getColorRampModed(values, thresholds, mode);
|
|
52
|
-
console.log(rampData);
|
|
53
52
|
const texture = createTexture(gl, gl.LINEAR, rampData, 256, 1);
|
|
54
|
-
console.log(texture);
|
|
55
53
|
if (this._legendTexture) {
|
|
56
54
|
this.gl.deleteTexture(this._legendTexture);
|
|
57
55
|
}
|
|
@@ -364,18 +364,4 @@ export default class RangeRingAngleText {
|
|
|
364
364
|
this._updateData(updateBucket, CSObjectArrayUpdateTypes.UPDATE);
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const realCircle = (globe, longitude, latitude, radius, stepAngle) => {
|
|
372
|
-
const pointsLongLat = globe.Math.F(
|
|
373
|
-
longitude,
|
|
374
|
-
latitude,
|
|
375
|
-
radius,
|
|
376
|
-
radius,
|
|
377
|
-
0,
|
|
378
|
-
stepAngle);
|
|
379
|
-
console.log("pointsLongLat", stepAngle, pointsLongLat)
|
|
380
|
-
return pointsLongLat;
|
|
381
|
-
}
|
|
367
|
+
}
|
|
@@ -51,7 +51,7 @@ export function createProgramWrapper(gl, vertexSource, fragmentSource) {
|
|
|
51
51
|
|
|
52
52
|
gl.linkProgram(program);
|
|
53
53
|
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
|
54
|
-
console.log(gl.getProgramInfoLog(program));
|
|
54
|
+
// console.log(gl.getProgramInfoLog(program));
|
|
55
55
|
throw new Error(gl.getProgramInfoLog(program));
|
|
56
56
|
}
|
|
57
57
|
|