@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/Math/plane.js
CHANGED
|
@@ -1,58 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const _1vector = /*@__PURE__*/ vec3_1.vec3.create(1, 1, 1);
|
|
8
|
-
exports.plane = Object.freeze({
|
|
9
|
-
create(normal = vec3_1.vec3.create(), distance = 0) {
|
|
1
|
+
import { EPSILON } from "./constants";
|
|
2
|
+
import { vec3 } from "./vec3";
|
|
3
|
+
const _0vector = /*@__PURE__*/ vec3.create(0, 0, 0);
|
|
4
|
+
const _1vector = /*@__PURE__*/ vec3.create(1, 1, 1);
|
|
5
|
+
export const plane = Object.freeze({
|
|
6
|
+
create(normal = vec3.create(), distance = 0) {
|
|
10
7
|
return {
|
|
11
|
-
normal:
|
|
8
|
+
normal: vec3.clone(normal),
|
|
12
9
|
distance: distance
|
|
13
10
|
};
|
|
14
11
|
},
|
|
15
12
|
set(out, normal, distance) {
|
|
16
|
-
|
|
13
|
+
vec3.copy(out.normal, normal);
|
|
17
14
|
out.distance = distance;
|
|
18
15
|
return out;
|
|
19
16
|
},
|
|
20
17
|
fromValues(out, nx, ny, nz, distance) {
|
|
21
|
-
|
|
18
|
+
vec3.set(out.normal, nx, ny, nz);
|
|
22
19
|
out.distance = distance;
|
|
23
20
|
},
|
|
24
21
|
copy(out, a) {
|
|
25
|
-
|
|
22
|
+
vec3.copy(out.normal, a.normal);
|
|
26
23
|
out.distance = a.distance;
|
|
27
24
|
return out;
|
|
28
25
|
},
|
|
29
26
|
clone(a) {
|
|
30
27
|
return {
|
|
31
|
-
normal:
|
|
28
|
+
normal: vec3.clone(a.normal),
|
|
32
29
|
distance: a.distance
|
|
33
30
|
};
|
|
34
31
|
},
|
|
35
32
|
distanceToPoint(plane, point) {
|
|
36
|
-
return
|
|
33
|
+
return vec3.dot(plane.normal, point) - plane.distance;
|
|
37
34
|
},
|
|
38
35
|
projectPoint(out, plane, point) {
|
|
39
36
|
const distance = this.distanceToPoint(plane, point);
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
vec3.multiplyScalar(out, plane.normal, distance);
|
|
38
|
+
vec3.subtract(out, point, out);
|
|
42
39
|
},
|
|
43
40
|
equals(plane, other) {
|
|
44
|
-
return
|
|
41
|
+
return vec3.equals(plane.normal, other.normal) && Math.abs(plane.distance - other.distance) < EPSILON;
|
|
45
42
|
},
|
|
46
43
|
fromNormalAndCoplanarPoint(out, normal, point) {
|
|
47
|
-
|
|
48
|
-
out.distance =
|
|
44
|
+
vec3.copy(out.normal, normal);
|
|
45
|
+
out.distance = vec3.dot(point, normal);
|
|
49
46
|
},
|
|
50
47
|
fromPoints(out, a, b, c) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
out.distance =
|
|
48
|
+
vec3.subtract(_0vector, b, a);
|
|
49
|
+
vec3.subtract(_1vector, c, a);
|
|
50
|
+
vec3.cross(out.normal, _0vector, _1vector);
|
|
51
|
+
vec3.normalize(out.normal, out.normal);
|
|
52
|
+
out.distance = vec3.dot(out.normal, a);
|
|
56
53
|
},
|
|
57
54
|
getUnitSphereRadiusAngle(plane) {
|
|
58
55
|
return Math.acos(Math.max(Math.min(plane.distance, 1), -1));
|
package/Math/quaternion.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const vec3_1 = require("./vec3");
|
|
5
|
-
const constants_1 = require("./constants");
|
|
6
|
-
exports.quaternion = Object.freeze({
|
|
1
|
+
import { vec3 } from './vec3';
|
|
2
|
+
import { EPSILON } from './constants';
|
|
3
|
+
export const quaternion = Object.freeze({
|
|
7
4
|
create(x = 0, y = 0, z = 0, w = 1) {
|
|
8
5
|
return [x, y, z, w];
|
|
9
6
|
},
|
|
@@ -60,7 +57,7 @@ exports.quaternion = Object.freeze({
|
|
|
60
57
|
},
|
|
61
58
|
normalize(out, input) {
|
|
62
59
|
const len = Math.sqrt(this.lengthSquared(input));
|
|
63
|
-
if (len <
|
|
60
|
+
if (len < EPSILON) {
|
|
64
61
|
this.set(out, 0, 0, 0, 1);
|
|
65
62
|
}
|
|
66
63
|
else {
|
|
@@ -69,8 +66,8 @@ exports.quaternion = Object.freeze({
|
|
|
69
66
|
}
|
|
70
67
|
},
|
|
71
68
|
fromUnitVectors(out, from, to) {
|
|
72
|
-
const d =
|
|
73
|
-
if (d <
|
|
69
|
+
const d = vec3.dot(from, to) + 1;
|
|
70
|
+
if (d < EPSILON) {
|
|
74
71
|
if (Math.abs(from[0]) > Math.abs(from[2])) {
|
|
75
72
|
this.set(out, -from[1], from[0], 0, 0);
|
|
76
73
|
}
|
package/Math/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/Math/utils.js
CHANGED
package/Math/vec3.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.
|
|
3
|
-
exports.vec3 = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
exports.vec3 = Object.freeze({
|
|
1
|
+
import { EPSILON } from './constants';
|
|
2
|
+
export const vec3 = Object.freeze({
|
|
6
3
|
create(x = 0, y = 0, z = 1) {
|
|
7
4
|
return [x, y, z];
|
|
8
5
|
},
|
|
@@ -80,9 +77,9 @@ exports.vec3 = Object.freeze({
|
|
|
80
77
|
return Math.sqrt(this.distanceSquared(a, b));
|
|
81
78
|
},
|
|
82
79
|
equals(a, b) {
|
|
83
|
-
return (Math.abs(a[0] - b[0]) <
|
|
84
|
-
Math.abs(a[1] - b[1]) <
|
|
85
|
-
Math.abs(a[2] - b[2]) <
|
|
80
|
+
return (Math.abs(a[0] - b[0]) < EPSILON &&
|
|
81
|
+
Math.abs(a[1] - b[1]) < EPSILON &&
|
|
82
|
+
Math.abs(a[2] - b[2]) < EPSILON);
|
|
86
83
|
},
|
|
87
84
|
toUnitVectorLongLat(out, a) {
|
|
88
85
|
const len = this.length(a); // TODO Might drop length check
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findFirstIndexInRange = void 0;
|
|
4
1
|
const findFirstIndexInRange = (container, value) => {
|
|
5
2
|
let start = 0;
|
|
6
3
|
let end = container.length - 1;
|
|
@@ -16,4 +13,4 @@ const findFirstIndexInRange = (container, value) => {
|
|
|
16
13
|
}
|
|
17
14
|
return null;
|
|
18
15
|
};
|
|
19
|
-
|
|
16
|
+
export { findFirstIndexInRange };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const typecheck_js_1 = require("../util/check/typecheck.js");
|
|
13
|
-
const attribute_loader_1 = require("../util/gl-util/buffer/attribute-loader");
|
|
14
|
-
const camerauniformblock_js_1 = require("../programs/totems/camerauniformblock.js");
|
|
1
|
+
import './types.js';
|
|
2
|
+
import { PickableRendererProgramCache } from '../programs/picking/pickable-renderer.js';
|
|
3
|
+
import { ElementPointGlowProgramCache } from '../programs/point-on-globe/element-point-glow.js';
|
|
4
|
+
import { ElementGlobeSufaceGlowCache } from '../programs/point-on-globe/element-globe-surface-glow.js';
|
|
5
|
+
import { LineOnGlobeCache } from '../programs/line-on-globe/naive-accurate-flexible.js';
|
|
6
|
+
import { BufferOrchestrator, BufferManager } from "../util/account";
|
|
7
|
+
import { PickerDisplayer } from '../util/picking/picker-displayer.js';
|
|
8
|
+
import { wgs84ToCartesian3d, wgs84ToMercator } from '../Math/methods.js';
|
|
9
|
+
import { constraintFloat, opacityCheck } from '../util/check/typecheck.js';
|
|
10
|
+
import { createBufferAndReadInfo } from '../util/gl-util/buffer/attribute-loader';
|
|
11
|
+
import { CameraUniformBlockTotemCache } from '../programs/totems/camerauniformblock.js';
|
|
15
12
|
/**
|
|
16
13
|
* is used with depth we can create a line from surface to the point.
|
|
17
14
|
*/
|
|
@@ -44,41 +41,41 @@ class PointGlowLineToEarthPlugin {
|
|
|
44
41
|
this.globe = globe;
|
|
45
42
|
this.gl = gl;
|
|
46
43
|
this._init();
|
|
47
|
-
this._cameraBlockTotem =
|
|
44
|
+
this._cameraBlockTotem = CameraUniformBlockTotemCache.get(this.globe);
|
|
48
45
|
}
|
|
49
46
|
_init() {
|
|
50
47
|
const { globe, gl, _pickableWrapper, _glowPointWrapper, _glowSurfaceWrapper, _lineProgramWrapper } = this;
|
|
51
48
|
const bufferType = "STATIC_DRAW";
|
|
52
49
|
const initialCapacity = 50;
|
|
53
|
-
this._bufferOrchestrator = new
|
|
50
|
+
this._bufferOrchestrator = new BufferOrchestrator({ initialCapacity });
|
|
54
51
|
this._bufferManagersMap = new Map([
|
|
55
52
|
['pos3D', {
|
|
56
|
-
bufferManager: new
|
|
57
|
-
adaptor: (item) => new Float32Array([...
|
|
53
|
+
bufferManager: new BufferManager(gl, 6, { bufferType, initialCapacity }),
|
|
54
|
+
adaptor: (item) => new Float32Array([...wgs84ToCartesian3d(item.long, item.lat, item.altitude / 1000), ...wgs84ToCartesian3d(item.long, item.lat, 0 / 1000)])
|
|
58
55
|
}],
|
|
59
56
|
['pos2D', {
|
|
60
|
-
bufferManager: new
|
|
61
|
-
adaptor: (item) => new Float32Array(
|
|
57
|
+
bufferManager: new BufferManager(gl, 2, { bufferType, initialCapacity }),
|
|
58
|
+
adaptor: (item) => new Float32Array(wgs84ToMercator(item.long, item.lat))
|
|
62
59
|
}],
|
|
63
60
|
['rgba', {
|
|
64
|
-
bufferManager: new
|
|
61
|
+
bufferManager: new BufferManager(gl, 8, { bufferType, initialCapacity }),
|
|
65
62
|
adaptor: (item) => new Float32Array([...item.color, ...item.color])
|
|
66
63
|
}],
|
|
67
64
|
['size', {
|
|
68
|
-
bufferManager: new
|
|
65
|
+
bufferManager: new BufferManager(gl, 1, { bufferType, initialCapacity }),
|
|
69
66
|
adaptor: (item) => new Float32Array([item.size])
|
|
70
67
|
}],
|
|
71
68
|
]);
|
|
72
|
-
_pickableWrapper.program =
|
|
73
|
-
_glowPointWrapper.program =
|
|
74
|
-
_lineProgramWrapper.program =
|
|
75
|
-
this._pickerDisplayer = new
|
|
76
|
-
const obj = (key) => key === null ? null :
|
|
77
|
-
_pickableWrapper.vao = _pickableWrapper.program.createVAO(
|
|
69
|
+
_pickableWrapper.program = PickableRendererProgramCache.get(globe);
|
|
70
|
+
_glowPointWrapper.program = ElementPointGlowProgramCache.get(globe);
|
|
71
|
+
_lineProgramWrapper.program = LineOnGlobeCache.get(globe);
|
|
72
|
+
this._pickerDisplayer = new PickerDisplayer(globe);
|
|
73
|
+
const obj = (key) => key === null ? null : createBufferAndReadInfo(this._bufferManagersMap.get(key).bufferManager.buffer);
|
|
74
|
+
_pickableWrapper.vao = _pickableWrapper.program.createVAO(createBufferAndReadInfo(this._bufferManagersMap.get('pos3D').bufferManager.buffer, 6 * 4, 0), createBufferAndReadInfo(this._bufferManagersMap.get('pos2D').bufferManager.buffer), createBufferAndReadInfo(this._bufferManagersMap.get('rgba').bufferManager.buffer, 8 * 4, 0), createBufferAndReadInfo(this._bufferManagersMap.get('size').bufferManager.buffer));
|
|
78
75
|
_pickableWrapper.vaoLine = _pickableWrapper.program.createVAO(...['pos3D', 'pos2D', 'rgba', null].map(obj));
|
|
79
|
-
_pickableWrapper.vaoHoverPoint = _pickableWrapper.program.createVAO(
|
|
76
|
+
_pickableWrapper.vaoHoverPoint = _pickableWrapper.program.createVAO(createBufferAndReadInfo(this._bufferManagersMap.get('pos3D').bufferManager.buffer, 6 * 4, 0), createBufferAndReadInfo(this._bufferManagersMap.get('pos2D').bufferManager.buffer), null, createBufferAndReadInfo(this._bufferManagersMap.get('size').bufferManager.buffer));
|
|
80
77
|
_pickableWrapper.vaoHoverLine = _pickableWrapper.program.createVAO(...['pos3D', 'pos2D', null, null].map(obj));
|
|
81
|
-
_glowPointWrapper.vao = _glowPointWrapper.program.createVAO(
|
|
78
|
+
_glowPointWrapper.vao = _glowPointWrapper.program.createVAO(createBufferAndReadInfo(this._bufferManagersMap.get('pos3D').bufferManager.buffer, 6 * 4, 0), createBufferAndReadInfo(this._bufferManagersMap.get('pos2D').bufferManager.buffer), null, createBufferAndReadInfo(this._bufferManagersMap.get('size').bufferManager.buffer));
|
|
82
79
|
// _lineProgramWrapper.vao = _lineProgramWrapper.program.createVAO(
|
|
83
80
|
// ...[null, 'pos3D', null, 'reverse3D', null, null, "rgba"].map(obj)
|
|
84
81
|
// );
|
|
@@ -153,7 +150,7 @@ class PointGlowLineToEarthPlugin {
|
|
|
153
150
|
this._changed();
|
|
154
151
|
}
|
|
155
152
|
setPointSizeMultiplier(sizeMultiplier) {
|
|
156
|
-
|
|
153
|
+
constraintFloat(sizeMultiplier, 0.1, null);
|
|
157
154
|
this._pickableWrapper.ubo.update(new Map([["u_size_multiplier", [sizeMultiplier]]]));
|
|
158
155
|
this._glowPointWrapper.ubo.update(new Map([["u_size_multiplier", [sizeMultiplier * 1.25]]]));
|
|
159
156
|
this._changed();
|
|
@@ -182,7 +179,7 @@ class PointGlowLineToEarthPlugin {
|
|
|
182
179
|
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint32Array(glowIndexes), gl.DYNAMIC_DRAW);
|
|
183
180
|
}
|
|
184
181
|
setOpacity(opacity) {
|
|
185
|
-
|
|
182
|
+
opacityCheck(opacity);
|
|
186
183
|
this._opacity = opacity;
|
|
187
184
|
this._pickableWrapper.ubo.update(new Map([["u_opacity", [opacity]]]));
|
|
188
185
|
this._pickableWrapper.uboLine.update(new Map([["u_opacity", [opacity]]]));
|
|
@@ -286,16 +283,16 @@ class PointGlowLineToEarthPlugin {
|
|
|
286
283
|
ubo?.free();
|
|
287
284
|
this.gl.deleteVertexArray(vao);
|
|
288
285
|
});
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
PickableRendererProgramCache.release(this.globe);
|
|
287
|
+
ElementPointGlowProgramCache.release(this.globe);
|
|
291
288
|
// ElementGlobeSufaceGlowCache.release(this.globe); // TODO: uncomment when needed
|
|
292
|
-
|
|
289
|
+
LineOnGlobeCache.release(this.globe);
|
|
293
290
|
if (this._elementBuffer)
|
|
294
291
|
this.gl.deleteBuffer(this._elementBuffer);
|
|
295
292
|
this._pickerDisplayer.free();
|
|
296
293
|
this._bufferManagersMap.forEach((item) => item.bufferManager.free());
|
|
297
294
|
this._bufferManagersMap.clear();
|
|
298
|
-
|
|
295
|
+
CameraUniformBlockTotemCache.release(this.globe);
|
|
299
296
|
}
|
|
300
297
|
_phaseTick() {
|
|
301
298
|
this._tickPhase += 0.003;
|
|
@@ -338,4 +335,4 @@ class PointGlowLineToEarthPlugin {
|
|
|
338
335
|
this.globe.DrawRender();
|
|
339
336
|
}
|
|
340
337
|
}
|
|
341
|
-
|
|
338
|
+
export { PointGlowLineToEarthPlugin };
|
package/arrowfield/adaptor.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.centigradePlus90ToRadians = centigradePlus90ToRadians;
|
|
4
|
-
function centigradePlus90ToRadians(centigradeArray, noDataValue = -9999) {
|
|
1
|
+
export function centigradePlus90ToRadians(centigradeArray, noDataValue = -9999) {
|
|
5
2
|
const radiansArray = new Float32Array(centigradeArray.length);
|
|
6
3
|
for (let i = 0; i < centigradeArray.length; i++) {
|
|
7
4
|
if (centigradeArray[i] === noDataValue) {
|
package/arrowfield/index.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.centigradePlus90ToRadians = exports.ArrowField = void 0;
|
|
7
|
-
const plugin_1 = __importDefault(require("./plugin"));
|
|
8
|
-
exports.ArrowField = plugin_1.default;
|
|
9
|
-
const 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 };
|
package/arrowfield/plugin.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const programs_1 = require("../programs");
|
|
4
|
-
class ArrowFieldPlugin {
|
|
1
|
+
import { ArrowField } from '../programs';
|
|
2
|
+
export default class ArrowFieldPlugin {
|
|
5
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 } = {}) {
|
|
6
4
|
this.id = id;
|
|
7
5
|
this.options = {
|
|
@@ -28,7 +26,7 @@ class ArrowFieldPlugin {
|
|
|
28
26
|
init(globe, gl) {
|
|
29
27
|
this.globe = globe;
|
|
30
28
|
this.gl = gl;
|
|
31
|
-
this.arrowFieldObj = new
|
|
29
|
+
this.arrowFieldObj = new ArrowField(gl, globe, this.options);
|
|
32
30
|
}
|
|
33
31
|
draw3D() {
|
|
34
32
|
if (this._doDraw) {
|
|
@@ -83,4 +81,3 @@ class ArrowFieldPlugin {
|
|
|
83
81
|
this.arrowFieldObj.setData(rotationData);
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
|
-
exports.default = ArrowFieldPlugin;
|
package/bearing-line/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BearingLinePlugin = void 0;
|
|
7
|
-
const plugin_1 = __importDefault(require("./plugin"));
|
|
8
|
-
exports.BearingLinePlugin = plugin_1.default;
|
|
1
|
+
import BearingLinePlugin from "./plugin";
|
|
2
|
+
export { BearingLinePlugin };
|