mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
style: format remaining owned runtime modules
This commit is contained in:
1 parent
ae99843c14
commit
2aca7aecbb
94 files changed
+8865
-3151
No files matched your search
@@ -33,10 +33,13 @@ export function deriveWeatherEffectProfile(weather) {
|
||||
const precipitation = Math.max(0, Number(weather.precipitationMm) || 0);
|
||||
const wind = range01(weather.windKph, 4, 90);
|
||||
const visibilityM = Number(weather.visibilityM);
|
||||
const visibilityFog = Number.isFinite(visibilityM) ? range01(12000 - visibilityM, 0, 11500) : 0;
|
||||
const visibilityFog = Number.isFinite(visibilityM)
|
||||
? range01(12000 - visibilityM, 0, 11500)
|
||||
: 0;
|
||||
|
||||
const drizzle = code >= 51 && code <= 57;
|
||||
const rainCode = (code >= 61 && code <= 67) || (code >= 80 && code <= 82) || code >= 95;
|
||||
const rainCode =
|
||||
(code >= 61 && code <= 67) || (code >= 80 && code <= 82) || code >= 95;
|
||||
const snowCode = (code >= 71 && code <= 77) || (code >= 85 && code <= 86);
|
||||
const fogCode = code === 45 || code === 48;
|
||||
const stormCode = code >= 95;
|
||||
@@ -48,7 +51,13 @@ export function deriveWeatherEffectProfile(weather) {
|
||||
const snow = snowCode ? Math.max(snowFloor, observedPrecip) : 0;
|
||||
const fog = Math.max(fogCode ? 0.78 : 0, visibilityFog);
|
||||
const storm = stormCode ? Math.max(0.55, observedPrecip) : 0;
|
||||
const forcedCloud = stormCode ? 0.92 : (rain || snow) ? 0.7 : fogCode ? 0.55 : 0;
|
||||
const forcedCloud = stormCode
|
||||
? 0.92
|
||||
: rain || snow
|
||||
? 0.7
|
||||
: fogCode
|
||||
? 0.55
|
||||
: 0;
|
||||
const cloud = Math.max(cover, forcedCloud);
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user