@pirireis/webglobeplugins 0.16.7 → 0.17.1
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 -0
- package/Math/contour/quadtreecontours.js +300 -0
- package/Math/finite-line-2d.js +58 -0
- package/Math/methods.js +6 -0
- package/Math/tessellation/hybrid-triangle-tessellation-meta.js +123 -0
- package/Math/tessellation/tile-merger.js +298 -0
- package/Math/tessellation/triangle-tessellation-meta.js +195 -42
- package/Math/tessellation/triangle-tessellation.js +5 -1
- package/compass-rose/compass-text-writer.js +39 -33
- package/constants.js +3 -0
- package/{util/heatwavedatamanager → heatwave}/datamanager.js +1 -1
- package/heatwave/{plugins/heatwaveglobeshell.js → heatwave.js} +8 -6
- package/heatwave/index.js +5 -3
- package/heatwave/{isobar/plugin.js → isobar.js} +6 -5
- package/{util/heatwavedatamanager → heatwave}/texture-point-sampler.js +24 -3
- package/investigation-tools/draw/tiles/adapters.js +67 -0
- package/investigation-tools/draw/tiles/tiles.js +128 -0
- package/package.json +4 -2
- package/programs/arrowfield/{object.js → arrow-field.js} +1 -1
- package/programs/arrowfield/logic.js +1 -1
- package/programs/data2legend/density-to-legend.js +24 -29
- package/programs/data2legend/point-to-density-texture.js +14 -17
- package/programs/float2legendwithratio/logic.js +2 -2
- package/programs/float2legendwithratio/object.js +1 -1
- package/programs/helpers/{blender/program.js → blender.js} +1 -1
- package/programs/helpers/{fadeaway/logic.js → fadeaway.js} +11 -2
- package/programs/index.js +20 -9
- package/programs/line-on-globe/circle-accurate-3d.js +12 -14
- package/programs/line-on-globe/circle-accurate-flat.js +0 -1
- package/programs/line-on-globe/degree-padding-around-circle-3d.js +13 -15
- package/programs/line-on-globe/lines-color-instanced-flat.js +15 -18
- package/programs/line-on-globe/naive-accurate-flexible.js +0 -1
- package/programs/picking/pickable-polygon-renderer.js +1 -1
- package/programs/picking/pickable-renderer.js +2 -2
- package/programs/point-on-globe/element-globe-surface-glow.js +2 -2
- package/programs/point-on-globe/element-point-glow.js +1 -1
- package/programs/point-on-globe/square-pixel-point.js +1 -1
- package/programs/polygon-on-globe/texture-dem-triangle-test-plugin-triangle.js +180 -30
- package/programs/polygon-on-globe/texture-dem-triangles.js +93 -34
- package/programs/rings/partial-ring/piece-of-pie.js +26 -29
- package/programs/totems/camerauniformblock.js +31 -42
- package/programs/two-d/pixel-padding-for-compass.js +14 -24
- package/programs/vectorfields/logics/drawrectangleparticles.js +9 -8
- package/programs/vectorfields/logics/drawrectangleparticles1.js +112 -0
- package/programs/vectorfields/logics/pixelbased.js +1 -2
- package/programs/vectorfields/pingpongbuffermanager.js +1 -1
- package/range-tools-on-terrain/bearing-line/adapters.js +1 -1
- package/range-tools-on-terrain/circle-line-chain/adapters.js +0 -5
- package/range-tools-on-terrain/circle-line-chain/plugin.js +1 -1
- package/range-tools-on-terrain/range-ring/plugin.js +4 -6
- package/semiplugins/lightweight/line-plugin.js +0 -1
- package/semiplugins/shape-on-terrain/arc-plugin.js +9 -2
- package/semiplugins/shape-on-terrain/circle-plugin.js +2 -2
- package/semiplugins/shape-on-terrain/padding-1-degree.js +1 -1
- package/semiplugins/shell/bbox-renderer/index.js +2 -0
- package/{programs/globeshell/wiggle → semiplugins/shell/bbox-renderer}/logic.js +101 -102
- package/{programs/globeshell/wiggle → semiplugins/shell/bbox-renderer}/object.js +6 -7
- package/semiplugins/utility/container-plugin.js +94 -0
- package/semiplugins/utility/object-pass-container-plugin.js +80 -0
- package/{point-heat-map → tracks/point-heat-map}/adaptors/timetracksplugin-format-to-this.js +1 -1
- package/{point-heat-map → tracks/point-heat-map}/plugin-webworker.js +3 -3
- package/{point-heat-map → tracks/point-heat-map}/point-to-heat-map-flow.js +11 -14
- package/{point-tracks → tracks/point-tracks}/plugin.js +6 -5
- package/{timetracks → tracks/timetracks}/adaptors-line-strip.js +1 -1
- package/{timetracks → tracks/timetracks}/program-line-strip.js +49 -49
- package/{timetracks → tracks/timetracks}/programpoint-line-strip.js +16 -13
- package/types.js +6 -0
- package/util/account/bufferoffsetmanager.js +1 -1
- package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +9 -95
- package/util/gl-util/uniform-block/manager.js +0 -1
- package/util/gl-util/uniform-block/types.js +0 -7
- package/util/index.js +10 -13
- package/util/picking/fence.js +16 -18
- package/util/picking/picker-displayer.js +6 -8
- package/util/programs/{shapesonglobe.js → draw-from-pixel-coords.js} +4 -7
- package/util/programs/draw-texture-on-canvas.js +1 -1
- package/util/programs/texturetoglobe.js +3 -3
- package/util/shaderfunctions/geometrytransformations.js +1 -1
- package/vectorfield/arrowfield/index.js +3 -0
- package/{arrowfield → vectorfield/arrowfield}/plugin.js +2 -2
- package/{waveparticles → vectorfield/waveparticles}/plugin.js +12 -12
- package/{wind → vectorfield/wind}/index.js +1 -1
- package/{wind → vectorfield/wind}/plugin.js +65 -51
- package/write-text/context-text3.js +0 -1
- package/write-text/context-text4.js +2 -1
- package/write-text/objectarraylabels/index.js +2 -0
- package/Math/tessellation/tessellation-algorithm.js +0 -67
- package/arrowfield/index.js +0 -3
- package/bearing-line/index.js +0 -2
- package/bearing-line/plugin.js +0 -444
- package/circle-line-chain/chain-list-map.js +0 -201
- package/circle-line-chain/init.js +0 -1
- package/circle-line-chain/plugin.js +0 -411
- package/circle-line-chain/util.js +0 -1
- package/compassrose/compassrose.js +0 -293
- package/compassrose/index.js +0 -2
- package/index.js +0 -12
- package/partialrings/buffer-manager.js +0 -75
- package/partialrings/index.js +0 -2
- package/partialrings/plugin.js +0 -128
- package/partialrings/program.js +0 -279
- package/programs/arrowfield/index.js +0 -2
- package/programs/globe-util/is-globe-moved.js +0 -19
- package/programs/globeshell/index.js +0 -2
- package/programs/globeshell/wiggle/index.js +0 -2
- package/programs/helpers/blender/index.js +0 -1
- package/programs/helpers/fadeaway/index.js +0 -2
- package/programs/helpers/fadeaway/object.js +0 -14
- package/programs/helpers/index.js +0 -2
- package/programs/polygon-on-globe/texture-dem-triangle-test-plugin.js +0 -118
- package/programs/rings/distancering/circleflatprogram.js +0 -116
- package/programs/rings/distancering/circlepaddingfreeangleprogram.js +0 -326
- package/programs/rings/distancering/circlepaddysharedbuffer.js +0 -368
- package/programs/rings/distancering/index.js +0 -6
- package/programs/rings/distancering/paddyflatprogram.js +0 -127
- package/programs/rings/distancering/paddyflatprogram2d.js +0 -129
- package/programs/rings/distancering/paddyflatprogram3d.js +0 -128
- package/programs/two-d/pixel-circle.js +0 -1
- package/programs/vectorfields/index.js +0 -3
- package/rangerings/enum.js +0 -2
- package/rangerings/index.js +0 -5
- package/rangerings/plugin.js +0 -543
- package/rangerings/rangeringangletext.js +0 -326
- package/rangerings/ring-account.js +0 -112
- package/timetracks/index.js +0 -1
- package/util/build-strategy/general-strategy.js +0 -62
- package/util/gl-util/uniform-block/shader.js +0 -1
- package/util/heatwavedatamanager/index.js +0 -2
- package/util/heatwavedatamanager/pointcoordsmeta.js +0 -22
- package/util/jshelpers/data-filler.js +0 -17
- package/util/jshelpers/equality.js +0 -18
- package/util/jshelpers/index.js +0 -2
- package/util/jshelpers/timefilters.js +0 -30
- package/util/programs/index.js +0 -1
- package/util/surface-line-data/arc-bboxes.js +0 -25
- package/util/surface-line-data/arcs-to-cuts.js +0 -50
- package/util/surface-line-data/cut-arc.js +0 -1
- package/util/surface-line-data/flow.js +0 -28
- package/util/surface-line-data/rbush-manager.js +0 -1
- package/util/surface-line-data/types.js +0 -1
- package/util/surface-line-data/web-worker.js +0 -1
- package/util/webglobe/rasteroverlay.js +0 -75
- package/write-text/attached-text-writer.js +0 -87
- package/write-text/context-text3old.js +0 -152
- package/write-text/index.js +0 -1
- package/write-text/writer-plugin.js +0 -8
- /package/{heatwave/isobar/quadtreecontours.js → Math/contour/quadtreecontours1.js} +0 -0
- /package/pin/{pin-object-array.js → pin-object-array1.js} +0 -0
- /package/pin/{pin-point-totem.js → pin-point-totem1.js} +0 -0
- /package/{point-heat-map → tracks/point-heat-map}/index.js +0 -0
- /package/{point-tracks → tracks/point-tracks}/key-methods.js +0 -0
- /package/{timetracks → tracks/timetracks}/plugin-line-strip.js +0 -0
- /package/{arrowfield → vectorfield/arrowfield}/adaptor.js +0 -0
- /package/{waveparticles → vectorfield/waveparticles}/adaptor.js +0 -0
- /package/{waveparticles → vectorfield/waveparticles}/index.js +0 -0
- /package/{wind → vectorfield/wind}/imagetovectorfieldandmagnitude.js +0 -0
- /package/{wind → vectorfield/wind}/vectorfieldimage.js +0 -0
- /package/write-text/{context-text.js → context-textDELETE.js} +0 -0
- /package/{heatwave/isobar → write-text/objectarraylabels}/objectarraylabels.js +0 -0
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { programCache as circleProgramCache } from './circleflatprogram';
|
|
3
|
-
// import { PaddingProgramCache } from './paddyflatprogram';
|
|
4
|
-
// import CirclePaddySharedBuffer from './circlepaddysharedbuffer';
|
|
5
|
-
// // import { PaddingFreeAngleCache } from './circlepaddingfreeangleprogram';
|
|
6
|
-
// // export { circleProgramCache, PaddingProgramCache, CirclePaddySharedBuffer, PaddingFreeAngleCache };
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// TODO: Delete this file if it is not needed anymore.
|
|
3
|
-
// import { createProgram, shaderfunctions } from "../../../util";
|
|
4
|
-
// import CameraUniformBlockTotem, { CameraUniformBlockString } from "../../totems/camerauniformblock";
|
|
5
|
-
// import { globeProgramCache, noRegisterGlobeProgramCache } from "../../programcache";
|
|
6
|
-
// const vertexShader = `#version 300 es ` +
|
|
7
|
-
// shaderfunctions.PI +
|
|
8
|
-
// shaderfunctions.R +
|
|
9
|
-
// shaderfunctions.POLE +
|
|
10
|
-
// CameraUniformBlockString +
|
|
11
|
-
// shaderfunctions.mercatorXYToGLPosition +
|
|
12
|
-
// shaderfunctions.longLatRadToMercator +
|
|
13
|
-
// shaderfunctions.longLatRadToCartesian3D +
|
|
14
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterCartesian3D +
|
|
15
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorCompass +
|
|
16
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistancePadding +
|
|
17
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistance + `
|
|
18
|
-
// in vec2 center;
|
|
19
|
-
// in float radius;
|
|
20
|
-
// in float pad_range;
|
|
21
|
-
// in vec4 color;
|
|
22
|
-
// in float flag;
|
|
23
|
-
// uniform int compass;
|
|
24
|
-
// uniform float pad_count;
|
|
25
|
-
// uniform float opacity;
|
|
26
|
-
// out vec2 v_limp;
|
|
27
|
-
// out vec4 v_color;
|
|
28
|
-
// void main() {
|
|
29
|
-
// float alpha_padding = z_level * z_level / (pad_range/ 100.0 );
|
|
30
|
-
// if( flag == 2.0 || flag == 1.0 || radius == 0.0 || alpha_padding < 0.1 || z_level < 3.0 ) return; // 1.0 is hide
|
|
31
|
-
// v_color = vec4(color.rgb, color.a * alpha_padding * opacity);
|
|
32
|
-
// gl_PointSize = 2.0;
|
|
33
|
-
// float odd = mod(float(gl_VertexID), 2.0);
|
|
34
|
-
// float index = (float(gl_VertexID)- odd ) / 2.0;
|
|
35
|
-
// float angle = 3.1415926535897932384626433832795 * 2.0 * (index / pad_count );
|
|
36
|
-
// float radius_ = radius - (pad_range * odd);
|
|
37
|
-
// if ( is3D){
|
|
38
|
-
// gl_Position = projection * view * vec4(
|
|
39
|
-
// circleLimpFromLongLatRadCenterCartesian3D( center, radius_, angle) - translate, 1.0);
|
|
40
|
-
// v_limp = vec2(0.0, 0.0);
|
|
41
|
-
// return;
|
|
42
|
-
// }
|
|
43
|
-
// vec2 limp;
|
|
44
|
-
// if ( compass == 1 ){
|
|
45
|
-
// limp = circleLimpFromLongLatRadCenterMercatorCompass(center , radius_, angle);
|
|
46
|
-
// } else {
|
|
47
|
-
// // limp = circleLimpFromLongLatRadCenterMercatorRealDistancePadding(center, radius_, angle);
|
|
48
|
-
// limp = circleLimpFromLongLatRadCenterMercatorRealDistance(center, radius_, angle);
|
|
49
|
-
// }
|
|
50
|
-
// v_limp = limp;
|
|
51
|
-
// gl_Position = mercatorXYToGLPosition(limp);
|
|
52
|
-
// }`;
|
|
53
|
-
// const fragmentShader = `#version 300 es
|
|
54
|
-
// precision highp float; `+
|
|
55
|
-
// shaderfunctions.POLE + `
|
|
56
|
-
// in vec4 v_color;
|
|
57
|
-
// in vec2 v_limp;
|
|
58
|
-
// out vec4 outColor;
|
|
59
|
-
// void main() {
|
|
60
|
-
// if ( v_limp.x < -POLE || v_limp.x > POLE || v_limp.y < -POLE || v_limp.y > POLE ){ discard; }
|
|
61
|
-
// outColor = v_color;
|
|
62
|
-
// }`;
|
|
63
|
-
// class Logic {
|
|
64
|
-
// constructor(globe) {
|
|
65
|
-
// this.globe = globe;
|
|
66
|
-
// this.gl = globe.gl;
|
|
67
|
-
// this.program = createProgram(this.gl, vertexShader, fragmentShader);
|
|
68
|
-
// { // bind positions so bufferManager can use them
|
|
69
|
-
// this.gl.bindAttribLocation(this.program, 0, "center");
|
|
70
|
-
// this.gl.bindAttribLocation(this.program, 1, "radius");
|
|
71
|
-
// this.gl.bindAttribLocation(this.program, 2, "pad_range");
|
|
72
|
-
// this.gl.bindAttribLocation(this.program, 3, "color");
|
|
73
|
-
// this.gl.bindAttribLocation(this.program, 4, "flag");
|
|
74
|
-
// }
|
|
75
|
-
// this.cameraBlockBindingPoint = 0;
|
|
76
|
-
// const cameraBlockIndex = this.gl.getUniformBlockIndex(this.program, "CameraUniformBlock");
|
|
77
|
-
// this.gl.uniformBlockBinding(this.program, cameraBlockIndex, this.cameraBlockBindingPoint);
|
|
78
|
-
// this.cameraBlockTotem = globeProgramCache.getProgram(globe, CameraUniformBlockTotem);
|
|
79
|
-
// this._padCountLocation = this.gl.getUniformLocation(this.program, "pad_count");
|
|
80
|
-
// this._opacityLocation = this.gl.getUniformLocation(this.program, "opacity");
|
|
81
|
-
// this._compassLocation = this.gl.getUniformLocation(this.program, "compass");
|
|
82
|
-
// this._compassMode = 1;
|
|
83
|
-
// this._opacity = 1.0;
|
|
84
|
-
// this._padCount = 360;
|
|
85
|
-
// {
|
|
86
|
-
// const currentProgram = this.gl.getParameter(this.gl.CURRENT_PROGRAM);
|
|
87
|
-
// this.gl.useProgram(this.program);
|
|
88
|
-
// this.gl.uniform1i(this._compassLocation, 1);
|
|
89
|
-
// this.gl.uniform1f(this._opacityLocation, 1.0);
|
|
90
|
-
// this.gl.uniform1f(this._padCountLocation, 360)
|
|
91
|
-
// this.gl.useProgram(currentProgram);
|
|
92
|
-
// }
|
|
93
|
-
// }
|
|
94
|
-
// draw(attrBufferManager, padCount, compass, opacity) {
|
|
95
|
-
// const { gl, program, _padCountLocation, cameraBlockBindingPoint, cameraBlockTotem, _compassLocation } = this;
|
|
96
|
-
// gl.useProgram(program);
|
|
97
|
-
// attrBufferManager.bindPaddingVAO();
|
|
98
|
-
// cameraBlockTotem.bind(cameraBlockBindingPoint);
|
|
99
|
-
// // draw instanced
|
|
100
|
-
// if (padCount !== this._padCount) {
|
|
101
|
-
// this._padCount = padCount;
|
|
102
|
-
// // console.log("padCount", padCount);
|
|
103
|
-
// gl.uniform1f(_padCountLocation, padCount);
|
|
104
|
-
// }
|
|
105
|
-
// if (compass !== this._compassMode) {
|
|
106
|
-
// // console.log("compass", compass);
|
|
107
|
-
// gl.uniform1i(_compassLocation, compass);
|
|
108
|
-
// this._compassMode = compass;
|
|
109
|
-
// }
|
|
110
|
-
// if (opacity !== this._opacity) {
|
|
111
|
-
// // console.log("opacity", opacity);
|
|
112
|
-
// this._opacity = opacity;
|
|
113
|
-
// gl.uniform1f(this._opacityLocation, opacity);
|
|
114
|
-
// }
|
|
115
|
-
// gl.drawArraysInstanced(gl.LINES, 0, padCount * 2, attrBufferManager.length);
|
|
116
|
-
// gl.bindVertexArray(null);
|
|
117
|
-
// cameraBlockTotem.unbind(cameraBlockBindingPoint);
|
|
118
|
-
// }
|
|
119
|
-
// free() {
|
|
120
|
-
// this.gl.deleteProgram(this.program);
|
|
121
|
-
// globeProgramCache.releaseProgram(this.globe, CameraUniformBlockTotem);
|
|
122
|
-
// }
|
|
123
|
-
// }
|
|
124
|
-
// export const PaddingProgramCache = Object.freeze({
|
|
125
|
-
// getProgram: (globe) => { return noRegisterGlobeProgramCache.getProgram(globe, Logic) },
|
|
126
|
-
// releaseProgram: (globe) => { noRegisterGlobeProgramCache.releaseProgram(globe, Logic) }
|
|
127
|
-
// })
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// TODO: Delete this file if it is not needed anymore.
|
|
3
|
-
// import { createProgram, shaderfunctions } from "../../../util";
|
|
4
|
-
// import CameraUniformBlockTotem, { CameraUniformBlockString } from "../../totems/camerauniformblock";
|
|
5
|
-
// import { globeProgramCache, noRegisterGlobeProgramCache } from "../../programcache";
|
|
6
|
-
// const vertexShader = `#version 300 es ` +
|
|
7
|
-
// shaderfunctions.PI +
|
|
8
|
-
// shaderfunctions.R +
|
|
9
|
-
// shaderfunctions.POLE +
|
|
10
|
-
// CameraUniformBlockString +
|
|
11
|
-
// shaderfunctions.mercatorXYToGLPosition +
|
|
12
|
-
// shaderfunctions.longLatRadToMercator +
|
|
13
|
-
// shaderfunctions.longLatRadToCartesian3D +
|
|
14
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterCartesian3D +
|
|
15
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorCompass +
|
|
16
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistancePadding +
|
|
17
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistance + `
|
|
18
|
-
// in vec2 center;
|
|
19
|
-
// in float radius;
|
|
20
|
-
// in float pad_range;
|
|
21
|
-
// in vec4 color;
|
|
22
|
-
// in float flag;
|
|
23
|
-
// uniform int compass;
|
|
24
|
-
// uniform float pad_count;
|
|
25
|
-
// uniform float opacity;
|
|
26
|
-
// out vec2 v_limp;
|
|
27
|
-
// out vec4 v_color;
|
|
28
|
-
// void main() {
|
|
29
|
-
// float alpha_padding = z_level * z_level / (pad_range/ 100.0 );
|
|
30
|
-
// if( flag == 2.0 || flag == 1.0 || radius == 0.0 || alpha_padding < 0.1 || z_level < 3.0 ) return; // 1.0 is hide
|
|
31
|
-
// v_color = vec4(color.rgb, color.a * alpha_padding * opacity);
|
|
32
|
-
// gl_PointSize = 2.0;
|
|
33
|
-
// float odd = mod(float(gl_VertexID), 2.0);
|
|
34
|
-
// float index = (float(gl_VertexID)- odd ) / 2.0;
|
|
35
|
-
// float angle = 3.1415926535897932384626433832795 * 2.0 * (index / pad_count );
|
|
36
|
-
// float radius_ = radius - (pad_range * odd);
|
|
37
|
-
// if ( is3D){
|
|
38
|
-
// gl_Position = projection * view * vec4(
|
|
39
|
-
// circleLimpFromLongLatRadCenterCartesian3D( center, radius_, angle) - translate, 1.0);
|
|
40
|
-
// v_limp = vec2(0.0, 0.0);
|
|
41
|
-
// return;
|
|
42
|
-
// }
|
|
43
|
-
// vec2 limp;
|
|
44
|
-
// if ( compass == 1 ){
|
|
45
|
-
// limp = circleLimpFromLongLatRadCenterMercatorCompass(center , radius_, angle);
|
|
46
|
-
// } else {
|
|
47
|
-
// // limp = circleLimpFromLongLatRadCenterMercatorRealDistancePadding(center, radius_, angle);
|
|
48
|
-
// limp = circleLimpFromLongLatRadCenterMercatorRealDistance(center, radius_, angle);
|
|
49
|
-
// }
|
|
50
|
-
// v_limp = limp;
|
|
51
|
-
// gl_Position = mercatorXYToGLPosition(limp);
|
|
52
|
-
// }`;
|
|
53
|
-
// const fragmentShader = `#version 300 es
|
|
54
|
-
// precision highp float; `+
|
|
55
|
-
// shaderfunctions.POLE + `
|
|
56
|
-
// in vec4 v_color;
|
|
57
|
-
// in vec2 v_limp;
|
|
58
|
-
// out vec4 outColor;
|
|
59
|
-
// void main() {
|
|
60
|
-
// if ( v_limp.x < -POLE || v_limp.x > POLE || v_limp.y < -POLE || v_limp.y > POLE ){ discard; }
|
|
61
|
-
// outColor = v_color;
|
|
62
|
-
// }`;
|
|
63
|
-
// class Logic {
|
|
64
|
-
// constructor(globe) {
|
|
65
|
-
// this.globe = globe;
|
|
66
|
-
// this.gl = globe.gl;
|
|
67
|
-
// this.program = createProgram(this.gl, vertexShader, fragmentShader);
|
|
68
|
-
// { // bind positions so bufferManager can use them
|
|
69
|
-
// this.gl.bindAttribLocation(this.program, 0, "center");
|
|
70
|
-
// this.gl.bindAttribLocation(this.program, 1, "radius");
|
|
71
|
-
// this.gl.bindAttribLocation(this.program, 2, "pad_range");
|
|
72
|
-
// this.gl.bindAttribLocation(this.program, 3, "color");
|
|
73
|
-
// this.gl.bindAttribLocation(this.program, 4, "flag");
|
|
74
|
-
// }
|
|
75
|
-
// this.cameraBlockBindingPoint = 0;
|
|
76
|
-
// const cameraBlockIndex = this.gl.getUniformBlockIndex(this.program, "CameraUniformBlock");
|
|
77
|
-
// this.gl.uniformBlockBinding(this.program, cameraBlockIndex, this.cameraBlockBindingPoint);
|
|
78
|
-
// this.cameraBlockTotem = globeProgramCache.getProgram(globe, CameraUniformBlockTotem);
|
|
79
|
-
// this._padCountLocation = this.gl.getUniformLocation(this.program, "pad_count");
|
|
80
|
-
// this._opacityLocation = this.gl.getUniformLocation(this.program, "opacity");
|
|
81
|
-
// this._compassLocation = this.gl.getUniformLocation(this.program, "compass");
|
|
82
|
-
// this._compassMode = 1;
|
|
83
|
-
// this._opacity = 1.0;
|
|
84
|
-
// this._padCount = 360;
|
|
85
|
-
// {
|
|
86
|
-
// const currentProgram = this.gl.getParameter(this.gl.CURRENT_PROGRAM);
|
|
87
|
-
// this.gl.useProgram(this.program);
|
|
88
|
-
// this.gl.uniform1i(this._compassLocation, 1);
|
|
89
|
-
// this.gl.uniform1f(this._opacityLocation, 1.0);
|
|
90
|
-
// this.gl.uniform1f(this._padCountLocation, 360)
|
|
91
|
-
// this.gl.useProgram(currentProgram);
|
|
92
|
-
// }
|
|
93
|
-
// }
|
|
94
|
-
// draw(vao, length, opaity) {
|
|
95
|
-
// }
|
|
96
|
-
// draw(attrBufferManager, padCount, compass, opacity) {
|
|
97
|
-
// const { gl, program, _padCountLocation, cameraBlockBindingPoint, cameraBlockTotem, _compassLocation } = this;
|
|
98
|
-
// gl.useProgram(program);
|
|
99
|
-
// attrBufferManager.bindPaddingVAO();
|
|
100
|
-
// cameraBlockTotem.bind(cameraBlockBindingPoint);
|
|
101
|
-
// // draw instanced
|
|
102
|
-
// if (padCount !== this._padCount) {
|
|
103
|
-
// this._padCount = padCount;
|
|
104
|
-
// // console.log("padCount", padCount);
|
|
105
|
-
// gl.uniform1f(_padCountLocation, padCount);
|
|
106
|
-
// }
|
|
107
|
-
// if (compass !== this._compassMode) {
|
|
108
|
-
// // console.log("compass", compass);
|
|
109
|
-
// gl.uniform1i(_compassLocation, compass);
|
|
110
|
-
// this._compassMode = compass;
|
|
111
|
-
// }
|
|
112
|
-
// if (opacity !== this._opacity) {
|
|
113
|
-
// // console.log("opacity", opacity);
|
|
114
|
-
// this._opacity = opacity;
|
|
115
|
-
// gl.uniform1f(this._opacityLocation, opacity);
|
|
116
|
-
// }
|
|
117
|
-
// gl.drawArraysInstanced(gl.LINES, 0, padCount * 2, attrBufferManager.length);
|
|
118
|
-
// gl.bindVertexArray(null);
|
|
119
|
-
// cameraBlockTotem.unbind(cameraBlockBindingPoint);
|
|
120
|
-
// }
|
|
121
|
-
// free() {
|
|
122
|
-
// this.gl.deleteProgram(this.program);
|
|
123
|
-
// globeProgramCache.releaseProgram(this.globe, CameraUniformBlockTotem);
|
|
124
|
-
// }
|
|
125
|
-
// }
|
|
126
|
-
// export const PaddingProgramCache = Object.freeze({
|
|
127
|
-
// getProgram: (globe) => { return noRegisterGlobeProgramCache.getProgram(globe, Logic) },
|
|
128
|
-
// releaseProgram: (globe) => { noRegisterGlobeProgramCache.releaseProgram(globe, Logic) }
|
|
129
|
-
// })
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// TODO: Delete this file if it is not needed anymore.
|
|
3
|
-
// import { createProgram, shaderfunctions } from "../../../util";
|
|
4
|
-
// import CameraUniformBlockTotem, { CameraUniformBlockString } from "../../totems/camerauniformblock";
|
|
5
|
-
// import { globeProgramCache, noRegisterGlobeProgramCache } from "../../programcache";
|
|
6
|
-
// const vertexShader = `#version 300 es ` +
|
|
7
|
-
// shaderfunctions.PI +
|
|
8
|
-
// shaderfunctions.R +
|
|
9
|
-
// shaderfunctions.POLE +
|
|
10
|
-
// CameraUniformBlockString +
|
|
11
|
-
// shaderfunctions.mercatorXYToGLPosition +
|
|
12
|
-
// shaderfunctions.longLatRadToMercator +
|
|
13
|
-
// shaderfunctions.longLatRadToCartesian3D +
|
|
14
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterCartesian3D +
|
|
15
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorCompass +
|
|
16
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistancePadding +
|
|
17
|
-
// shaderfunctions.circleLimpFromLongLatRadCenterMercatorRealDistance + `
|
|
18
|
-
// in vec2 center;
|
|
19
|
-
// in float radius;
|
|
20
|
-
// in float pad_range;
|
|
21
|
-
// in vec4 color;
|
|
22
|
-
// in float flag;
|
|
23
|
-
// uniform int compass;
|
|
24
|
-
// uniform float pad_count;
|
|
25
|
-
// uniform float opacity;
|
|
26
|
-
// out vec2 v_limp;
|
|
27
|
-
// out vec4 v_color;
|
|
28
|
-
// void main() {
|
|
29
|
-
// float alpha_padding = z_level * z_level / (pad_range/ 100.0 );
|
|
30
|
-
// if( flag == 2.0 || flag == 1.0 || radius == 0.0 || alpha_padding < 0.1 || z_level < 3.0 ) return; // 1.0 is hide
|
|
31
|
-
// v_color = vec4(color.rgb, color.a * alpha_padding * opacity);
|
|
32
|
-
// gl_PointSize = 2.0;
|
|
33
|
-
// float odd = mod(float(gl_VertexID), 2.0);
|
|
34
|
-
// float index = (float(gl_VertexID)- odd ) / 2.0;
|
|
35
|
-
// float angle = 3.1415926535897932384626433832795 * 2.0 * (index / pad_count );
|
|
36
|
-
// float radius_ = radius - (pad_range * odd);
|
|
37
|
-
// if ( is3D){
|
|
38
|
-
// gl_Position = projection * view * vec4(
|
|
39
|
-
// circleLimpFromLongLatRadCenterCartesian3D( center, radius_, angle) - translate, 1.0);
|
|
40
|
-
// v_limp = vec2(0.0, 0.0);
|
|
41
|
-
// return;
|
|
42
|
-
// }
|
|
43
|
-
// vec2 limp;
|
|
44
|
-
// if ( compass == 1 ){
|
|
45
|
-
// limp = circleLimpFromLongLatRadCenterMercatorCompass(center , radius_, angle);
|
|
46
|
-
// } else {
|
|
47
|
-
// // limp = circleLimpFromLongLatRadCenterMercatorRealDistancePadding(center, radius_, angle);
|
|
48
|
-
// limp = circleLimpFromLongLatRadCenterMercatorRealDistance(center, radius_, angle);
|
|
49
|
-
// }
|
|
50
|
-
// v_limp = limp;
|
|
51
|
-
// gl_Position = mercatorXYToGLPosition(limp);
|
|
52
|
-
// }`;
|
|
53
|
-
// const fragmentShader = `#version 300 es
|
|
54
|
-
// precision highp float; `+
|
|
55
|
-
// shaderfunctions.POLE + `
|
|
56
|
-
// in vec4 v_color;
|
|
57
|
-
// in vec2 v_limp;
|
|
58
|
-
// out vec4 outColor;
|
|
59
|
-
// void main() {
|
|
60
|
-
// if ( v_limp.x < -POLE || v_limp.x > POLE || v_limp.y < -POLE || v_limp.y > POLE ){ discard; }
|
|
61
|
-
// outColor = v_color;
|
|
62
|
-
// }`;
|
|
63
|
-
// class Logic {
|
|
64
|
-
// constructor(globe) {
|
|
65
|
-
// this.globe = globe;
|
|
66
|
-
// this.gl = globe.gl;
|
|
67
|
-
// this.program = createProgram(this.gl, vertexShader, fragmentShader);
|
|
68
|
-
// { // bind positions so bufferManager can use them
|
|
69
|
-
// this.gl.bindAttribLocation(this.program, 0, "center");
|
|
70
|
-
// this.gl.bindAttribLocation(this.program, 1, "radius");
|
|
71
|
-
// this.gl.bindAttribLocation(this.program, 2, "pad_range");
|
|
72
|
-
// this.gl.bindAttribLocation(this.program, 3, "color");
|
|
73
|
-
// this.gl.bindAttribLocation(this.program, 4, "flag");
|
|
74
|
-
// }
|
|
75
|
-
// this.cameraBlockBindingPoint = 0;
|
|
76
|
-
// const cameraBlockIndex = this.gl.getUniformBlockIndex(this.program, "CameraUniformBlock");
|
|
77
|
-
// this.gl.uniformBlockBinding(this.program, cameraBlockIndex, this.cameraBlockBindingPoint);
|
|
78
|
-
// this.cameraBlockTotem = globeProgramCache.getProgram(globe, CameraUniformBlockTotem);
|
|
79
|
-
// this._padCountLocation = this.gl.getUniformLocation(this.program, "pad_count");
|
|
80
|
-
// this._opacityLocation = this.gl.getUniformLocation(this.program, "opacity");
|
|
81
|
-
// this._compassLocation = this.gl.getUniformLocation(this.program, "compass");
|
|
82
|
-
// this._compassMode = 1;
|
|
83
|
-
// this._opacity = 1.0;
|
|
84
|
-
// this._padCount = 360;
|
|
85
|
-
// {
|
|
86
|
-
// const currentProgram = this.gl.getParameter(this.gl.CURRENT_PROGRAM);
|
|
87
|
-
// this.gl.useProgram(this.program);
|
|
88
|
-
// this.gl.uniform1i(this._compassLocation, 1);
|
|
89
|
-
// this.gl.uniform1f(this._opacityLocation, 1.0);
|
|
90
|
-
// this.gl.uniform1f(this._padCountLocation, 360)
|
|
91
|
-
// this.gl.useProgram(currentProgram);
|
|
92
|
-
// }
|
|
93
|
-
// }
|
|
94
|
-
// draw(attrBufferManager, padCount, compass, opacity) {
|
|
95
|
-
// const { gl, program, _padCountLocation, cameraBlockBindingPoint, cameraBlockTotem, _compassLocation } = this;
|
|
96
|
-
// gl.useProgram(program);
|
|
97
|
-
// attrBufferManager.bindPaddingVAO();
|
|
98
|
-
// cameraBlockTotem.bind(cameraBlockBindingPoint);
|
|
99
|
-
// // draw instanced
|
|
100
|
-
// if (padCount !== this._padCount) {
|
|
101
|
-
// this._padCount = padCount;
|
|
102
|
-
// // console.log("padCount", padCount);
|
|
103
|
-
// gl.uniform1f(_padCountLocation, padCount);
|
|
104
|
-
// }
|
|
105
|
-
// if (compass !== this._compassMode) {
|
|
106
|
-
// // console.log("compass", compass);
|
|
107
|
-
// gl.uniform1i(_compassLocation, compass);
|
|
108
|
-
// this._compassMode = compass;
|
|
109
|
-
// }
|
|
110
|
-
// if (opacity !== this._opacity) {
|
|
111
|
-
// // console.log("opacity", opacity);
|
|
112
|
-
// this._opacity = opacity;
|
|
113
|
-
// gl.uniform1f(this._opacityLocation, opacity);
|
|
114
|
-
// }
|
|
115
|
-
// gl.drawArraysInstanced(gl.LINES, 0, padCount * 2, attrBufferManager.length);
|
|
116
|
-
// gl.bindVertexArray(null);
|
|
117
|
-
// cameraBlockTotem.unbind(cameraBlockBindingPoint);
|
|
118
|
-
// }
|
|
119
|
-
// free() {
|
|
120
|
-
// this.gl.deleteProgram(this.program);
|
|
121
|
-
// globeProgramCache.releaseProgram(this.globe, CameraUniformBlockTotem);
|
|
122
|
-
// }
|
|
123
|
-
// }
|
|
124
|
-
// //
|
|
125
|
-
// export const PaddingProgramCache = Object.freeze({
|
|
126
|
-
// getProgram: (globe) => { return noRegisterGlobeProgramCache.getProgram(globe, Logic) },
|
|
127
|
-
// releaseProgram: (globe) => { noRegisterGlobeProgramCache.releaseProgram(globe, Logic) }
|
|
128
|
-
// })
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/rangerings/enum.js
DELETED
package/rangerings/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RangeRings } from "./plugin";
|
|
2
|
-
import { ringKeyMethod } from "./ring-account";
|
|
3
|
-
import RangeRingAngleText from './rangeringangletext';
|
|
4
|
-
import { ENUM_HIDE, ENUM_TEXT_HIDE } from './enum';
|
|
5
|
-
export { RangeRings, ENUM_HIDE, ENUM_TEXT_HIDE, RangeRingAngleText, ringKeyMethod };
|