@twinmatrix/spatialverse-sdk-web 0.0.4 → 0.0.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.
Files changed (32) hide show
  1. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js +293 -0
  2. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js.map +1 -0
  3. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js +35 -0
  4. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js.map +1 -0
  5. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js +33 -0
  6. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js.map +1 -0
  7. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js +307 -0
  8. package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js.map +1 -0
  9. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/focustree.json +121 -0
  10. package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/whatTaxonomies.json +170 -0
  11. package/lib/cjs/meta-atlas-sdk/combined_style.json +2313 -0
  12. package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js +166 -0
  13. package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js.map +1 -0
  14. package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js +229 -0
  15. package/lib/cjs/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js.map +1 -0
  16. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js +286 -0
  17. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.js.map +1 -0
  18. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js +27 -0
  19. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.js.map +1 -0
  20. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js +27 -0
  21. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.js.map +1 -0
  22. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js +305 -0
  23. package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js.map +1 -0
  24. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/focustree.json +121 -0
  25. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +2 -2
  26. package/lib/esm/meta-atlas-sdk/MetaAtlasCore/whatTaxonomies.json +170 -0
  27. package/lib/esm/meta-atlas-sdk/combined_style.json +2313 -0
  28. package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js +158 -0
  29. package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.js.map +1 -0
  30. package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js +221 -0
  31. package/lib/esm/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.js.map +1 -0
  32. package/package.json +3 -3
@@ -0,0 +1,305 @@
1
+ /*
2
+ (c) 2011-2015, Vladimir Agafonkin
3
+ SunCalc is a JavaScript library for calculating sun/moon position and light phases.
4
+ https://github.com/mourner/suncalc
5
+ */
6
+
7
+ (function () {
8
+ 'use strict';
9
+
10
+ // shortcuts for easier to read formulas
11
+ var PI = Math.PI,
12
+ sin = Math.sin,
13
+ cos = Math.cos,
14
+ tan = Math.tan,
15
+ asin = Math.asin,
16
+ atan = Math.atan2,
17
+ acos = Math.acos,
18
+ rad = PI / 180;
19
+
20
+ // sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas
21
+
22
+ // date/time constants and conversions
23
+
24
+ var dayMs = 1000 * 60 * 60 * 24,
25
+ J1970 = 2440588,
26
+ J2000 = 2451545;
27
+ function toJulian(date) {
28
+ return date.valueOf() / dayMs - 0.5 + J1970;
29
+ }
30
+ function fromJulian(j) {
31
+ return new Date((j + 0.5 - J1970) * dayMs);
32
+ }
33
+ function toDays(date) {
34
+ return toJulian(date) - J2000;
35
+ }
36
+
37
+ // general calculations for position
38
+
39
+ var e = rad * 23.4397; // obliquity of the Earth
40
+
41
+ function rightAscension(l, b) {
42
+ return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l));
43
+ }
44
+ function declination(l, b) {
45
+ return asin(sin(b) * cos(e) + cos(b) * sin(e) * sin(l));
46
+ }
47
+ function azimuth(H, phi, dec) {
48
+ return atan(sin(H), cos(H) * sin(phi) - tan(dec) * cos(phi));
49
+ }
50
+ function altitude(H, phi, dec) {
51
+ return asin(sin(phi) * sin(dec) + cos(phi) * cos(dec) * cos(H));
52
+ }
53
+ function siderealTime(d, lw) {
54
+ return rad * (280.16 + 360.9856235 * d) - lw;
55
+ }
56
+ function astroRefraction(h) {
57
+ if (h < 0)
58
+ // the following formula works for positive altitudes only.
59
+ h = 0; // if h = -0.08901179 a div/0 would occur.
60
+
61
+ // formula 16.4 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
62
+ // 1.02 / tan(h + 10.26 / (h + 5.10)) h in degrees, result in arc minutes -> converted to rad:
63
+ return 0.0002967 / Math.tan(h + 0.00312536 / (h + 0.08901179));
64
+ }
65
+
66
+ // general sun calculations
67
+
68
+ function solarMeanAnomaly(d) {
69
+ return rad * (357.5291 + 0.98560028 * d);
70
+ }
71
+ function eclipticLongitude(M) {
72
+ var C = rad * (1.9148 * sin(M) + 0.02 * sin(2 * M) + 0.0003 * sin(3 * M)),
73
+ // equation of center
74
+ P = rad * 102.9372; // perihelion of the Earth
75
+
76
+ return M + C + P + PI;
77
+ }
78
+ function sunCoords(d) {
79
+ var M = solarMeanAnomaly(d),
80
+ L = eclipticLongitude(M);
81
+ return {
82
+ dec: declination(L, 0),
83
+ ra: rightAscension(L, 0)
84
+ };
85
+ }
86
+ var SunCalc = {};
87
+
88
+ // calculates sun position for a given date and latitude/longitude
89
+
90
+ SunCalc.getPosition = function (date, lat, lng) {
91
+ var lw = rad * -lng,
92
+ phi = rad * lat,
93
+ d = toDays(date),
94
+ c = sunCoords(d),
95
+ H = siderealTime(d, lw) - c.ra;
96
+ return {
97
+ azimuth: azimuth(H, phi, c.dec),
98
+ altitude: altitude(H, phi, c.dec)
99
+ };
100
+ };
101
+ SunCalc.toJulian = function (date) {
102
+ return toJulian(date);
103
+ };
104
+
105
+ // sun times configuration (angle, morning name, evening name)
106
+
107
+ var times = SunCalc.times = [[-0.833, 'sunrise', 'sunset'], [-0.3, 'sunriseEnd', 'sunsetStart'], [-6, 'dawn', 'dusk'], [-12, 'nauticalDawn', 'nauticalDusk'], [-18, 'nightEnd', 'night'], [6, 'goldenHourEnd', 'goldenHour']];
108
+
109
+ // adds a custom time to the times config
110
+
111
+ SunCalc.addTime = function (angle, riseName, setName) {
112
+ times.push([angle, riseName, setName]);
113
+ };
114
+
115
+ // calculations for sun times
116
+
117
+ var J0 = 0.0009;
118
+ function julianCycle(d, lw) {
119
+ return Math.round(d - J0 - lw / (2 * PI));
120
+ }
121
+ function approxTransit(Ht, lw, n) {
122
+ return J0 + (Ht + lw) / (2 * PI) + n;
123
+ }
124
+ function solarTransitJ(ds, M, L) {
125
+ return J2000 + ds + 0.0053 * sin(M) - 0.0069 * sin(2 * L);
126
+ }
127
+ function hourAngle(h, phi, d) {
128
+ return acos((sin(h) - sin(phi) * sin(d)) / (cos(phi) * cos(d)));
129
+ }
130
+ function observerAngle(height) {
131
+ return -2.076 * Math.sqrt(height) / 60;
132
+ }
133
+
134
+ // returns set time for the given sun altitude
135
+ function getSetJ(h, lw, phi, dec, n, M, L) {
136
+ var w = hourAngle(h, phi, dec),
137
+ a = approxTransit(w, lw, n);
138
+ return solarTransitJ(a, M, L);
139
+ }
140
+
141
+ // calculates sun times for a given date, latitude/longitude, and, optionally,
142
+ // the observer height (in meters) relative to the horizon
143
+
144
+ SunCalc.getTimes = function (date, lat, lng, height) {
145
+ height = height || 0;
146
+ var lw = rad * -lng,
147
+ phi = rad * lat,
148
+ dh = observerAngle(height),
149
+ d = toDays(date),
150
+ n = julianCycle(d, lw),
151
+ ds = approxTransit(0, lw, n),
152
+ M = solarMeanAnomaly(ds),
153
+ L = eclipticLongitude(M),
154
+ dec = declination(L, 0),
155
+ Jnoon = solarTransitJ(ds, M, L),
156
+ i,
157
+ len,
158
+ time,
159
+ h0,
160
+ Jset,
161
+ Jrise;
162
+ var result = {
163
+ solarNoon: fromJulian(Jnoon),
164
+ nadir: fromJulian(Jnoon - 0.5)
165
+ };
166
+ for (i = 0, len = times.length; i < len; i += 1) {
167
+ time = times[i];
168
+ h0 = (time[0] + dh) * rad;
169
+ Jset = getSetJ(h0, lw, phi, dec, n, M, L);
170
+ Jrise = Jnoon - (Jset - Jnoon);
171
+ result[time[1]] = fromJulian(Jrise);
172
+ result[time[2]] = fromJulian(Jset);
173
+ }
174
+ return result;
175
+ };
176
+
177
+ // moon calculations, based on http://aa.quae.nl/en/reken/hemelpositie.html formulas
178
+
179
+ function moonCoords(d) {
180
+ // geocentric ecliptic coordinates of the moon
181
+
182
+ var L = rad * (218.316 + 13.176396 * d),
183
+ // ecliptic longitude
184
+ M = rad * (134.963 + 13.064993 * d),
185
+ // mean anomaly
186
+ F = rad * (93.272 + 13.229350 * d),
187
+ // mean distance
188
+
189
+ l = L + rad * 6.289 * sin(M),
190
+ // longitude
191
+ b = rad * 5.128 * sin(F),
192
+ // latitude
193
+ dt = 385001 - 20905 * cos(M); // distance to the moon in km
194
+
195
+ return {
196
+ ra: rightAscension(l, b),
197
+ dec: declination(l, b),
198
+ dist: dt
199
+ };
200
+ }
201
+ SunCalc.getMoonPosition = function (date, lat, lng) {
202
+ var lw = rad * -lng,
203
+ phi = rad * lat,
204
+ d = toDays(date),
205
+ c = moonCoords(d),
206
+ H = siderealTime(d, lw) - c.ra,
207
+ h = altitude(H, phi, c.dec),
208
+ // formula 14.1 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
209
+ pa = atan(sin(H), tan(phi) * cos(c.dec) - sin(c.dec) * cos(H));
210
+ h = h + astroRefraction(h); // altitude correction for refraction
211
+
212
+ return {
213
+ azimuth: azimuth(H, phi, c.dec),
214
+ altitude: h,
215
+ distance: c.dist,
216
+ parallacticAngle: pa
217
+ };
218
+ };
219
+
220
+ // calculations for illumination parameters of the moon,
221
+ // based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and
222
+ // Chapter 48 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
223
+
224
+ SunCalc.getMoonIllumination = function (date) {
225
+ var d = toDays(date || new Date()),
226
+ s = sunCoords(d),
227
+ m = moonCoords(d),
228
+ sdist = 149598000,
229
+ // distance from Earth to Sun in km
230
+
231
+ phi = acos(sin(s.dec) * sin(m.dec) + cos(s.dec) * cos(m.dec) * cos(s.ra - m.ra)),
232
+ inc = atan(sdist * sin(phi), m.dist - sdist * cos(phi)),
233
+ angle = atan(cos(s.dec) * sin(s.ra - m.ra), sin(s.dec) * cos(m.dec) - cos(s.dec) * sin(m.dec) * cos(s.ra - m.ra));
234
+ return {
235
+ fraction: (1 + cos(inc)) / 2,
236
+ phase: 0.5 + 0.5 * inc * (angle < 0 ? -1 : 1) / Math.PI,
237
+ angle: angle
238
+ };
239
+ };
240
+ function hoursLater(date, h) {
241
+ return new Date(date.valueOf() + h * dayMs / 24);
242
+ }
243
+
244
+ // calculations for moon rise/set times are based on http://www.stargazing.net/kepler/moonrise.html article
245
+
246
+ SunCalc.getMoonTimes = function (date, lat, lng, inUTC) {
247
+ var t = new Date(date);
248
+ if (inUTC) t.setUTCHours(0, 0, 0, 0);else t.setHours(0, 0, 0, 0);
249
+ var hc = 0.133 * rad,
250
+ h0 = SunCalc.getMoonPosition(t, lat, lng).altitude - hc,
251
+ h1,
252
+ h2,
253
+ rise,
254
+ set,
255
+ a,
256
+ b,
257
+ xe,
258
+ ye,
259
+ d,
260
+ roots,
261
+ x1,
262
+ x2,
263
+ dx;
264
+
265
+ // go in 2-hour chunks, each time seeing if a 3-point quadratic curve crosses zero (which means rise or set)
266
+ for (var i = 1; i <= 24; i += 2) {
267
+ h1 = SunCalc.getMoonPosition(hoursLater(t, i), lat, lng).altitude - hc;
268
+ h2 = SunCalc.getMoonPosition(hoursLater(t, i + 1), lat, lng).altitude - hc;
269
+ a = (h0 + h2) / 2 - h1;
270
+ b = (h2 - h0) / 2;
271
+ xe = -b / (2 * a);
272
+ ye = (a * xe + b) * xe + h1;
273
+ d = b * b - 4 * a * h1;
274
+ roots = 0;
275
+ if (d >= 0) {
276
+ dx = Math.sqrt(d) / (Math.abs(a) * 2);
277
+ x1 = xe - dx;
278
+ x2 = xe + dx;
279
+ if (Math.abs(x1) <= 1) roots++;
280
+ if (Math.abs(x2) <= 1) roots++;
281
+ if (x1 < -1) x1 = x2;
282
+ }
283
+ if (roots === 1) {
284
+ if (h0 < 0) rise = i + x1;else set = i + x1;
285
+ } else if (roots === 2) {
286
+ rise = i + (ye < 0 ? x2 : x1);
287
+ set = i + (ye < 0 ? x1 : x2);
288
+ }
289
+ if (rise && set) break;
290
+ h0 = h2;
291
+ }
292
+ var result = {};
293
+ if (rise) result.rise = hoursLater(t, rise);
294
+ if (set) result.set = hoursLater(t, set);
295
+ if (!rise && !set) result[ye > 0 ? 'alwaysUp' : 'alwaysDown'] = true;
296
+ return result;
297
+ };
298
+
299
+ //// export as Node module / AMD module / browser variable
300
+ //if (typeof exports === 'object' && typeof module !== 'undefined') module.exports = SunCalc;
301
+ //else if (typeof define === 'function' && define.amd) define(SunCalc);
302
+ //else window.SunCalc = SunCalc;
303
+ module.exports = exports = SunCalc;
304
+ })();
305
+ //# sourceMappingURL=suncalc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suncalc.js","names":["PI","Math","sin","cos","tan","asin","atan","atan2","acos","rad","dayMs","J1970","J2000","toJulian","date","valueOf","fromJulian","j","Date","toDays","e","rightAscension","l","b","declination","azimuth","H","phi","dec","altitude","siderealTime","d","lw","astroRefraction","h","solarMeanAnomaly","eclipticLongitude","M","C","P","sunCoords","L","ra","SunCalc","getPosition","lat","lng","c","times","addTime","angle","riseName","setName","push","J0","julianCycle","round","approxTransit","Ht","n","solarTransitJ","ds","hourAngle","observerAngle","height","sqrt","getSetJ","w","a","getTimes","dh","Jnoon","i","len","time","h0","Jset","Jrise","result","solarNoon","nadir","length","moonCoords","F","dt","dist","getMoonPosition","pa","distance","parallacticAngle","getMoonIllumination","s","m","sdist","inc","fraction","phase","hoursLater","getMoonTimes","inUTC","t","setUTCHours","setHours","hc","h1","h2","rise","set","xe","ye","roots","x1","x2","dx","abs","module","exports"],"sources":["../../../../../../src/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.js"],"sourcesContent":["/*\n (c) 2011-2015, Vladimir Agafonkin\n SunCalc is a JavaScript library for calculating sun/moon position and light phases.\n https://github.com/mourner/suncalc\n*/\n\n(function () {\n 'use strict';\n\n // shortcuts for easier to read formulas\n\n var PI = Math.PI,\n sin = Math.sin,\n cos = Math.cos,\n tan = Math.tan,\n asin = Math.asin,\n atan = Math.atan2,\n acos = Math.acos,\n rad = PI / 180;\n\n // sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas\n\n\n // date/time constants and conversions\n\n var dayMs = 1000 * 60 * 60 * 24,\n J1970 = 2440588,\n J2000 = 2451545;\n\n function toJulian(date) { return date.valueOf() / dayMs - 0.5 + J1970; }\n function fromJulian(j) { return new Date((j + 0.5 - J1970) * dayMs); }\n function toDays(date) { return toJulian(date) - J2000; }\n\n // general calculations for position\n\n var e = rad * 23.4397; // obliquity of the Earth\n\n function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }\n function declination(l, b) { return asin(sin(b) * cos(e) + cos(b) * sin(e) * sin(l)); }\n\n function azimuth(H, phi, dec) { return atan(sin(H), cos(H) * sin(phi) - tan(dec) * cos(phi)); }\n function altitude(H, phi, dec) { return asin(sin(phi) * sin(dec) + cos(phi) * cos(dec) * cos(H)); }\n\n function siderealTime(d, lw) { return rad * (280.16 + 360.9856235 * d) - lw; }\n\n function astroRefraction(h) {\n if (h < 0) // the following formula works for positive altitudes only.\n h = 0; // if h = -0.08901179 a div/0 would occur.\n\n // formula 16.4 of \"Astronomical Algorithms\" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.\n // 1.02 / tan(h + 10.26 / (h + 5.10)) h in degrees, result in arc minutes -> converted to rad:\n return 0.0002967 / Math.tan(h + 0.00312536 / (h + 0.08901179));\n }\n\n // general sun calculations\n\n function solarMeanAnomaly(d) { return rad * (357.5291 + 0.98560028 * d); }\n\n function eclipticLongitude(M) {\n\n var C = rad * (1.9148 * sin(M) + 0.02 * sin(2 * M) + 0.0003 * sin(3 * M)), // equation of center\n P = rad * 102.9372; // perihelion of the Earth\n\n return M + C + P + PI;\n }\n\n function sunCoords(d) {\n\n var M = solarMeanAnomaly(d),\n L = eclipticLongitude(M);\n\n return {\n dec: declination(L, 0),\n ra: rightAscension(L, 0)\n };\n }\n\n\n var SunCalc = {};\n\n\n // calculates sun position for a given date and latitude/longitude\n\n SunCalc.getPosition = function (date, lat, lng) {\n\n var lw = rad * -lng,\n phi = rad * lat,\n d = toDays(date),\n\n c = sunCoords(d),\n H = siderealTime(d, lw) - c.ra;\n\n return {\n azimuth: azimuth(H, phi, c.dec),\n altitude: altitude(H, phi, c.dec)\n };\n };\n\n SunCalc.toJulian = function (date) {\n return toJulian(date);\n };\n\n // sun times configuration (angle, morning name, evening name)\n\n var times = SunCalc.times = [\n [-0.833, 'sunrise', 'sunset'],\n [-0.3, 'sunriseEnd', 'sunsetStart'],\n [-6, 'dawn', 'dusk'],\n [-12, 'nauticalDawn', 'nauticalDusk'],\n [-18, 'nightEnd', 'night'],\n [6, 'goldenHourEnd', 'goldenHour']\n ];\n\n // adds a custom time to the times config\n\n SunCalc.addTime = function (angle, riseName, setName) {\n times.push([angle, riseName, setName]);\n };\n\n\n // calculations for sun times\n\n var J0 = 0.0009;\n\n function julianCycle(d, lw) { return Math.round(d - J0 - lw / (2 * PI)); }\n\n function approxTransit(Ht, lw, n) { return J0 + (Ht + lw) / (2 * PI) + n; }\n function solarTransitJ(ds, M, L) { return J2000 + ds + 0.0053 * sin(M) - 0.0069 * sin(2 * L); }\n\n function hourAngle(h, phi, d) { return acos((sin(h) - sin(phi) * sin(d)) / (cos(phi) * cos(d))); }\n function observerAngle(height) { return -2.076 * Math.sqrt(height) / 60; }\n\n // returns set time for the given sun altitude\n function getSetJ(h, lw, phi, dec, n, M, L) {\n\n var w = hourAngle(h, phi, dec),\n a = approxTransit(w, lw, n);\n return solarTransitJ(a, M, L);\n }\n\n\n // calculates sun times for a given date, latitude/longitude, and, optionally,\n // the observer height (in meters) relative to the horizon\n\n SunCalc.getTimes = function (date, lat, lng, height) {\n\n height = height || 0;\n\n var lw = rad * -lng,\n phi = rad * lat,\n\n dh = observerAngle(height),\n\n d = toDays(date),\n n = julianCycle(d, lw),\n ds = approxTransit(0, lw, n),\n\n M = solarMeanAnomaly(ds),\n L = eclipticLongitude(M),\n dec = declination(L, 0),\n\n Jnoon = solarTransitJ(ds, M, L),\n\n i, len, time, h0, Jset, Jrise;\n\n\n var result = {\n solarNoon: fromJulian(Jnoon),\n nadir: fromJulian(Jnoon - 0.5)\n };\n\n for (i = 0, len = times.length; i < len; i += 1) {\n time = times[i];\n h0 = (time[0] + dh) * rad;\n\n Jset = getSetJ(h0, lw, phi, dec, n, M, L);\n Jrise = Jnoon - (Jset - Jnoon);\n\n result[time[1]] = fromJulian(Jrise);\n result[time[2]] = fromJulian(Jset);\n }\n\n return result;\n };\n\n\n // moon calculations, based on http://aa.quae.nl/en/reken/hemelpositie.html formulas\n\n function moonCoords(d) { // geocentric ecliptic coordinates of the moon\n\n var L = rad * (218.316 + 13.176396 * d), // ecliptic longitude\n M = rad * (134.963 + 13.064993 * d), // mean anomaly\n F = rad * (93.272 + 13.229350 * d), // mean distance\n\n l = L + rad * 6.289 * sin(M), // longitude\n b = rad * 5.128 * sin(F), // latitude\n dt = 385001 - 20905 * cos(M); // distance to the moon in km\n\n return {\n ra: rightAscension(l, b),\n dec: declination(l, b),\n dist: dt\n };\n }\n\n SunCalc.getMoonPosition = function (date, lat, lng) {\n\n var lw = rad * -lng,\n phi = rad * lat,\n d = toDays(date),\n\n c = moonCoords(d),\n H = siderealTime(d, lw) - c.ra,\n h = altitude(H, phi, c.dec),\n // formula 14.1 of \"Astronomical Algorithms\" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.\n pa = atan(sin(H), tan(phi) * cos(c.dec) - sin(c.dec) * cos(H));\n\n h = h + astroRefraction(h); // altitude correction for refraction\n\n return {\n azimuth: azimuth(H, phi, c.dec),\n altitude: h,\n distance: c.dist,\n parallacticAngle: pa\n };\n };\n\n\n // calculations for illumination parameters of the moon,\n // based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and\n // Chapter 48 of \"Astronomical Algorithms\" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.\n\n SunCalc.getMoonIllumination = function (date) {\n\n var d = toDays(date || new Date()),\n s = sunCoords(d),\n m = moonCoords(d),\n\n sdist = 149598000, // distance from Earth to Sun in km\n\n phi = acos(sin(s.dec) * sin(m.dec) + cos(s.dec) * cos(m.dec) * cos(s.ra - m.ra)),\n inc = atan(sdist * sin(phi), m.dist - sdist * cos(phi)),\n angle = atan(cos(s.dec) * sin(s.ra - m.ra), sin(s.dec) * cos(m.dec) -\n cos(s.dec) * sin(m.dec) * cos(s.ra - m.ra));\n\n return {\n fraction: (1 + cos(inc)) / 2,\n phase: 0.5 + 0.5 * inc * (angle < 0 ? -1 : 1) / Math.PI,\n angle: angle\n };\n };\n\n\n function hoursLater(date, h) {\n return new Date(date.valueOf() + h * dayMs / 24);\n }\n\n // calculations for moon rise/set times are based on http://www.stargazing.net/kepler/moonrise.html article\n\n SunCalc.getMoonTimes = function (date, lat, lng, inUTC) {\n var t = new Date(date);\n if (inUTC) t.setUTCHours(0, 0, 0, 0);\n else t.setHours(0, 0, 0, 0);\n\n var hc = 0.133 * rad,\n h0 = SunCalc.getMoonPosition(t, lat, lng).altitude - hc,\n h1, h2, rise, set, a, b, xe, ye, d, roots, x1, x2, dx;\n\n // go in 2-hour chunks, each time seeing if a 3-point quadratic curve crosses zero (which means rise or set)\n for (var i = 1; i <= 24; i += 2) {\n h1 = SunCalc.getMoonPosition(hoursLater(t, i), lat, lng).altitude - hc;\n h2 = SunCalc.getMoonPosition(hoursLater(t, i + 1), lat, lng).altitude - hc;\n\n a = (h0 + h2) / 2 - h1;\n b = (h2 - h0) / 2;\n xe = -b / (2 * a);\n ye = (a * xe + b) * xe + h1;\n d = b * b - 4 * a * h1;\n roots = 0;\n\n if (d >= 0) {\n dx = Math.sqrt(d) / (Math.abs(a) * 2);\n x1 = xe - dx;\n x2 = xe + dx;\n if (Math.abs(x1) <= 1) roots++;\n if (Math.abs(x2) <= 1) roots++;\n if (x1 < -1) x1 = x2;\n }\n\n if (roots === 1) {\n if (h0 < 0) rise = i + x1;\n else set = i + x1;\n\n } else if (roots === 2) {\n rise = i + (ye < 0 ? x2 : x1);\n set = i + (ye < 0 ? x1 : x2);\n }\n\n if (rise && set) break;\n\n h0 = h2;\n }\n\n var result = {};\n\n if (rise) result.rise = hoursLater(t, rise);\n if (set) result.set = hoursLater(t, set);\n\n if (!rise && !set) result[ye > 0 ? 'alwaysUp' : 'alwaysDown'] = true;\n\n return result;\n };\n\n\n //// export as Node module / AMD module / browser variable\n //if (typeof exports === 'object' && typeof module !== 'undefined') module.exports = SunCalc;\n //else if (typeof define === 'function' && define.am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MAAM,CAACC,OAAO,GAAGA,OAAO,GAAGzE,OAAO;AACtC,CAAC,EAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,121 @@
1
+ {
2
+ "site": {
3
+ "name": "Singapore",
4
+ "taxonomyPath": "where.singapore",
5
+ "cameraConfigs": {
6
+ "mobile": {
7
+ "zoom": 20,
8
+ "center": [103.852996655352, 1.2944483519089962],
9
+ "bearing": -55,
10
+ "pitch": 42
11
+ },
12
+ "web": {
13
+ "zoom": 20,
14
+ "center": [103.852996655352, 1.2944483519089962],
15
+ "bearing": -55,
16
+ "pitch": 42
17
+ }
18
+ },
19
+ "buildings": [
20
+ {
21
+ "name": "RCCC",
22
+ "taxonomyPath": "where.singapore.rfcc",
23
+ "defaultFloorPath": "where.singapore.rfcc.level_4",
24
+ "cameraConfigs": {
25
+ "mobile": {
26
+ "zoom": 20,
27
+ "center": [103.852996655352, 1.2944483519089962],
28
+ "bearing": -55,
29
+ "pitch": 42
30
+ },
31
+ "web": {
32
+ "zoom": 20,
33
+ "center": [103.852996655352, 1.2944483519089962],
34
+ "bearing": -55,
35
+ "pitch": 42
36
+ }
37
+ },
38
+ "bounds": [
39
+ [103.85320731171177, 1.2948914975277541],
40
+ [103.85421314010136, 1.2941272630719642],
41
+ [103.85348894366088, 1.2929286211985838],
42
+ [103.85317244299428, 1.2948914975277541]
43
+ ],
44
+ "floors": [
45
+ {
46
+ "name": "Level 1",
47
+ "taxonomyPath": "where.singapore.rfcc.level_1",
48
+ "cameraConfigs": {
49
+ "mobile": {
50
+ "zoom": 19.35,
51
+ "center": [103.85364319364783, 1.294008192054065],
52
+ "bearing": -55,
53
+ "pitch": 42
54
+ },
55
+ "web": {
56
+ "zoom": 19.5,
57
+ "center": [103.85346012604555, 1.293763243193382],
58
+ "bearing": -53,
59
+ "pitch": 38.23
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "name": "Level 4",
65
+ "taxonomyPath": "where.singapore.rfcc.level_4",
66
+ "cameraConfigs": {
67
+ "mobile": {
68
+ "zoom": 20,
69
+ "center": [103.852996655352, 1.2944483519089962],
70
+ "bearing": -55,
71
+ "pitch": 42
72
+ },
73
+ "web": {
74
+ "zoom": 20,
75
+ "center": [103.852996655352, 1.2944483519089962],
76
+ "bearing": -55,
77
+ "pitch": 42
78
+ }
79
+ }
80
+ },
81
+ {
82
+ "name": "Level 69",
83
+ "taxonomyPath": "where.singapore.rfcc.level_69",
84
+ "cameraConfigs": {
85
+ "mobile": {
86
+ "zoom": 18.1,
87
+ "center": [103.85374636384404, 1.293577568494925],
88
+ "bearing": -55,
89
+ "pitch": 42
90
+ },
91
+ "web": {
92
+ "zoom": 19.4,
93
+ "center": [103.85361309798509, 1.293664890336487],
94
+ "bearing": -54.3,
95
+ "pitch": 44.5
96
+ }
97
+ }
98
+ },
99
+ {
100
+ "name": "Level 70",
101
+ "taxonomyPath": "where.singapore.rfcc.level_70",
102
+ "cameraConfigs": {
103
+ "mobile": {
104
+ "zoom": 18.1,
105
+ "center": [103.85374636384404, 1.293577568494925],
106
+ "bearing": -55,
107
+ "pitch": 42
108
+ },
109
+ "web": {
110
+ "zoom": 19.4,
111
+ "center": [103.85361309798509, 1.293664890336487],
112
+ "bearing": -54.3,
113
+ "pitch": 44.5
114
+ }
115
+ }
116
+ }
117
+ ]
118
+ }
119
+ ]
120
+ }
121
+ }
@@ -3,8 +3,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
3
3
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- import focusTree from "./focustree.json.js";
7
- import whatTaxonomies from "./whatTaxonomies.json.js";
6
+ import focusTree from './focustree.json';
7
+ import whatTaxonomies from './whatTaxonomies.json';
8
8
  import length from '@turf/length';
9
9
  import { feature as turfFeature, lineString as turfLine, point as turfPoint, polygon as turfPolygon } from '@turf/helpers';
10
10
  import center from '@turf/center';
@@ -0,0 +1,170 @@
1
+ {
2
+ "food": [
3
+ "what.shop.food_anchor",
4
+ "what.shop.food"
5
+ ],
6
+ "fun": [
7
+ "what.shop.fun"
8
+ ],
9
+ "retail": [
10
+ "what.shop.retail_anchor",
11
+ "what.shop.retail"
12
+ ],
13
+ "carpark": [
14
+ "what.infra.carpark"
15
+ ],
16
+ "entrance": [
17
+ "what.infra.entrance"
18
+ ],
19
+ "exit": [
20
+ "what.infra.exit"
21
+ ],
22
+ "escalator": [
23
+ "what.infra.escalator"
24
+ ],
25
+ "lift": [
26
+ "what.infra.lift"
27
+ ],
28
+ "stairs": [
29
+ "what.infra.stairs"
30
+ ],
31
+ "bicycle parking": [
32
+ "what.infra.parking_bike"
33
+ ],
34
+ "bicycle locker": [
35
+ "what.infra.parking_bike_locked"
36
+ ],
37
+ "airport transfer": [
38
+ "what.service.airport_transfer"
39
+ ],
40
+ "immigration": [
41
+ "what.service.immigration"
42
+ ],
43
+ "ground transport concierge": [
44
+ "what.service.ground_transport_concierge"
45
+ ],
46
+ "tax refund": [
47
+ "what.service.tax_refund"
48
+ ],
49
+ "information": [
50
+ "what.service.information"
51
+ ],
52
+ "baggage claim": [
53
+ "what.service.baggage_claim"
54
+ ],
55
+ "baggage storage": [
56
+ "what.service.baggage_storage"
57
+ ],
58
+ "checkin": [
59
+ "what.service.checkin"
60
+ ],
61
+ "checkin early": [
62
+ "what.service.checkin_early"
63
+ ],
64
+ "money exchange": [
65
+ "what.service.money_exchange"
66
+ ],
67
+ "movie theatre": [
68
+ "what.service.movie_theatre"
69
+ ],
70
+ "changi rewards": [
71
+ "what.service.changi_rewards"
72
+ ],
73
+ "connect changi": [
74
+ "what.service.connect_changi"
75
+ ],
76
+ "attraction tour": [
77
+ "what.service.attraction_tour"
78
+ ],
79
+ "atm": [
80
+ "what.service.atm"
81
+ ],
82
+ "charging point": [
83
+ "what.service.device_charging"
84
+ ],
85
+ "internet": [
86
+ "what.service.internet"
87
+ ],
88
+ "clinic": [
89
+ "what.service.clinic"
90
+ ],
91
+ "lost and found": [
92
+ "what.service.lost_and_found"
93
+ ],
94
+ "post": [
95
+ "what.service.post"
96
+ ],
97
+ "airline lounge": [
98
+ "what.service.airline_lounge"
99
+ ],
100
+ "changi lounge": [
101
+ "what.service.lounge_changi"
102
+ ],
103
+ "pay per use lounge": [
104
+ "what.service.pay_per_use_lounge"
105
+ ],
106
+ "tv lounge": [
107
+ "what.service.tv_lounge"
108
+ ],
109
+ "lodging": [
110
+ "what.service.lodging"
111
+ ],
112
+ "meditation room": [
113
+ "what.service.meditation_room"
114
+ ],
115
+ "prayer room": [
116
+ "what.service.prayer_room"
117
+ ],
118
+ "rest area": [
119
+ "what.service.rest_area"
120
+ ],
121
+ "smoking area": [
122
+ "what.service.smoking_area"
123
+ ],
124
+ "adult diaper change": [
125
+ "what.service.adult_diaper_change"
126
+ ],
127
+ "baby care": [
128
+ "what.service.baby_care"
129
+ ],
130
+ "shower": [
131
+ "what.service.shower"
132
+ ],
133
+ "toilet": [
134
+ "what.service.toilet"
135
+ ],
136
+ "toilet accessible": [
137
+ "what.service.toilet_accessible"
138
+ ],
139
+ "transit entry": [
140
+ "what.transit.transit_entry"
141
+ ],
142
+ "transit exit": [
143
+ "what.transit.transit_exit"
144
+ ],
145
+ "bus": [
146
+ "what.transport.bus",
147
+ "what.transport.type_bus"
148
+ ],
149
+ "meeting point": [
150
+ "what.transport.meeting_point"
151
+ ],
152
+ "pickup": [
153
+ "what.transport.pickup"
154
+ ],
155
+ "skytrain": [
156
+ "what.transport.skytrain"
157
+ ],
158
+ "taxi queue": [
159
+ "what.transport.taxi_queue"
160
+ ],
161
+ "train": [
162
+ "what.transport.train"
163
+ ],
164
+ "airplane gate": [
165
+ "what.airplane_gate"
166
+ ],
167
+ "security": [
168
+ "what.security"
169
+ ]
170
+ }