@pirireis/webglobeplugins 0.6.11 → 0.6.12
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/package.json
CHANGED
|
@@ -55,7 +55,7 @@ void main() {
|
|
|
55
55
|
v_limp = vec2(0.0, 0.0);
|
|
56
56
|
} else {
|
|
57
57
|
vec2 position;
|
|
58
|
-
if (radius <
|
|
58
|
+
if (radius < 1400.0) {
|
|
59
59
|
position = circleLimpFromLongLatRadCenterMercatorCompass( center_position, radius/ cos(center_position.y), angle);
|
|
60
60
|
} else {
|
|
61
61
|
position = circleLimpFromLongLatRadCenterMercatorRealDistance( center_position, radius, angle);
|
|
@@ -18,6 +18,7 @@ export const R = `
|
|
|
18
18
|
export const PI = `
|
|
19
19
|
#ifndef PI
|
|
20
20
|
#define PI 3.141592653589793
|
|
21
|
+
|
|
21
22
|
#endif
|
|
22
23
|
`;
|
|
23
24
|
|
|
@@ -77,6 +78,7 @@ export const longLatRadToMercator = R + PI + `
|
|
|
77
78
|
vec2 longLatRadToMercator( vec2 longLatRad) {
|
|
78
79
|
float x = R * longLatRad.x;
|
|
79
80
|
float y = R * log( tan( PI / 4.0 + longLatRad.y / 2.0 ) );
|
|
81
|
+
y -= mix(-60.0, 60.0, abs(longLatRad.y + PI / 8.0) / (PI / 4.0));
|
|
80
82
|
return vec2(x, y);
|
|
81
83
|
}
|
|
82
84
|
`;
|
|
@@ -110,7 +112,7 @@ vec3 circleLimpFromLongLatRadCenterCartesian3D( vec2 center, float radius, float
|
|
|
110
112
|
|
|
111
113
|
// TODO: Make it precise. Y axis is not correct.
|
|
112
114
|
|
|
113
|
-
export const
|
|
115
|
+
export const circleLimpFromLongLatRadCenterMercatorRealDistanceNew = PI + `
|
|
114
116
|
vec2 circleLimpFromLongLatRadCenterMercatorRealDistance(vec2 center, float radius, float angle) {
|
|
115
117
|
float ang = angle + PI / 2.0; // Shift angle to align with +x axis
|
|
116
118
|
float r = radius / R;
|
|
@@ -130,7 +132,7 @@ vec2 circleLimpFromLongLatRadCenterMercatorRealDistance(vec2 center, float radiu
|
|
|
130
132
|
}`;
|
|
131
133
|
|
|
132
134
|
|
|
133
|
-
export const
|
|
135
|
+
export const circleLimpFromLongLatRadCenterMercatorRealDistance = PI + `
|
|
134
136
|
vec2 circleLimpFromLongLatRadCenterMercatorRealDistance(vec2 center, float radius, float angle){
|
|
135
137
|
float ang = angle + PI / 2.0; // this is there because the other methods are implemented in, angle 0 is +x axis orientatation
|
|
136
138
|
float r = radius / R;
|