@aguacerowx/react-native 0.0.51 → 0.0.53
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/android/src/main/cpp/satellite_ktx_jni.cpp +6 -1
- package/android/src/main/java/com/aguacerowx/reactnative/SatelliteLayer.java +121 -1
- package/android/src/main/java/com/aguacerowx/reactnative/SatelliteLayerView.java +556 -384
- package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +315 -311
- package/ios/SatelliteLayerView.swift +517 -510
- package/ios/WeatherFrameProcessorModule.swift +222 -219
- package/lib/commonjs/WeatherLayerManager.js +82 -46
- package/lib/commonjs/WeatherLayerManager.js.map +1 -1
- package/lib/commonjs/aguaceroRnDebug.js +9 -1
- package/lib/commonjs/aguaceroRnDebug.js.map +1 -1
- package/lib/commonjs/gridCdnAuth.js +64 -0
- package/lib/commonjs/gridCdnAuth.js.map +1 -0
- package/lib/commonjs/index.js +50 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nexrad/nexradAndroidController.js +25 -25
- package/lib/commonjs/nexrad/nexradAndroidController.js.map +1 -1
- package/lib/commonjs/nexrad/nexradDiag.js +24 -24
- package/lib/commonjs/satellite/satelliteAndroidController.js +32 -24
- package/lib/commonjs/satellite/satelliteAndroidController.js.map +1 -1
- package/lib/commonjs/satelliteRnDebug.js +261 -0
- package/lib/commonjs/satelliteRnDebug.js.map +1 -0
- package/lib/module/WeatherLayerManager.js +82 -46
- package/lib/module/WeatherLayerManager.js.map +1 -1
- package/lib/module/aguaceroRnDebug.js +9 -1
- package/lib/module/aguaceroRnDebug.js.map +1 -1
- package/lib/module/gridCdnAuth.js +56 -0
- package/lib/module/gridCdnAuth.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/nexrad/nexradAndroidController.js +25 -25
- package/lib/module/nexrad/nexradAndroidController.js.map +1 -1
- package/lib/module/nexrad/nexradDiag.js +24 -24
- package/lib/module/satellite/satelliteAndroidController.js +32 -24
- package/lib/module/satellite/satelliteAndroidController.js.map +1 -1
- package/lib/module/satelliteRnDebug.js +248 -0
- package/lib/module/satelliteRnDebug.js.map +1 -0
- package/lib/typescript/WeatherLayerManager.d.ts.map +1 -1
- package/lib/typescript/aguaceroRnDebug.d.ts.map +1 -1
- package/lib/typescript/gridCdnAuth.d.ts +24 -0
- package/lib/typescript/gridCdnAuth.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/satellite/satelliteAndroidController.d.ts.map +1 -1
- package/lib/typescript/satelliteRnDebug.d.ts +81 -0
- package/lib/typescript/satelliteRnDebug.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/WeatherLayerManager.js +2044 -2004
- package/src/aguaceroRnDebug.js +9 -1
- package/src/gridCdnAuth.js +56 -0
- package/src/index.js +27 -15
- package/src/nexrad/nexradAndroidController.js +1078 -1078
- package/src/nexrad/nexradDiag.js +150 -150
- package/src/satellite/satelliteAndroidController.js +257 -245
- package/src/satelliteRnDebug.js +269 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_javascriptSdk","require","_satelliteBridgeDiag","_aguaceroRnDebug","sortFramesByTargetProximity","frames","targetUnix","length","Number","isFinite","withDistance","map","f","_d","Math","abs","unix","sort","a","b","rest","buildSatelliteFetchParts","state","satelliteTimestamp","fileName","resolveSatelliteS3FileName","satelliteChannel","satelliteTimeToFileMap","channelName","variable","channelNameUpper","String","toUpperCase","s3FileName","replace","endsWith","shaderFileName","startsWith","token","toLowerCase","apiKey","url","encodeURIComponent","frameKey","SatelliteAndroidController","constructor","core","satelliteLayerRef","_destroyed","_cachedRunKey","undefined","_cachedTimelineSig","_lastTargetUnix","_lastStyleJson","destroy","native","current","clearSatellite","sync","satBridgeWarn","destroyed","isSatellite","Boolean","instrumentId","satelliteInstrumentId","sector","satelliteSectorLabel","channel","tlMapSize","Object","keys","syncSatellite","refExists","satRunKey","timelineSig","join","mergedState","k","ts","parts","push","console","warn","timelineKeyCount","hasApiKey","mapKeys","nk","filter","n","max","stylePayload","visible","opacity","fillSmoothing","styleJson","JSON","stringify","runKeyChanged","timelineChanged","
|
|
1
|
+
{"version":3,"names":["_javascriptSdk","require","_satelliteBridgeDiag","_aguaceroRnDebug","_satelliteRnDebug","sortFramesByTargetProximity","frames","targetUnix","length","Number","isFinite","withDistance","map","f","_d","Math","abs","unix","sort","a","b","rest","buildSatelliteFetchParts","state","satelliteTimestamp","fileName","resolveSatelliteS3FileName","satelliteChannel","satelliteTimeToFileMap","channelName","variable","channelNameUpper","String","toUpperCase","s3FileName","replace","endsWith","shaderFileName","startsWith","token","toLowerCase","apiKey","url","encodeURIComponent","frameKey","SatelliteAndroidController","constructor","core","satelliteLayerRef","_destroyed","_cachedRunKey","undefined","_cachedTimelineSig","_lastTargetUnix","_lastStyleJson","destroy","native","current","clearSatellite","sync","satBridgeWarn","destroyed","isSatellite","Boolean","instrumentId","satelliteInstrumentId","sector","satelliteSectorLabel","channel","tlMapSize","Object","keys","syncSatellite","refExists","satRunKey","timelineSig","join","mergedState","k","ts","parts","push","console","warn","timelineKeyCount","hasApiKey","gridRequestSiteOrigin","bundleId","mapKeys","hint","nk","filter","n","max","stylePayload","visible","opacity","fillSmoothing","styleJson","JSON","stringify","runKeyChanged","timelineChanged","sortedFrames","logSatelliteSyncReport","runKey","payload","userId","debug","isAguaceroRnDebugEnabled","payloadJson","frameCount","jsonChars","finiteTarget","activateSatelliteCachedUnix","updateSatelliteStyle","exports"],"sourceRoot":"..\\..\\..\\src","sources":["satellite/satelliteAndroidController.js"],"mappings":";;;;;;;;AAIA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAPA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACO,SAASI,2BAA2BA,CAACC,MAAM,EAAEC,UAA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,EAAC,iDAAiD,EAAE;QAAEoD,SAAS,EAAEd,SAAS,CAAC1F;MAAO,CAAC,CAAC;MACjG,IAAI,CAAC8C,cAAc,GAAG4C,SAAS;IACnC;EACJ;AACJ;AAACkB,OAAA,CAAAvE,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SATELLITE_DIAGNOSTIC_EVENT = void 0;
|
|
7
|
+
exports.auditSatelliteIntegration = auditSatelliteIntegration;
|
|
8
|
+
exports.basisFormatLabel = basisFormatLabel;
|
|
9
|
+
exports.installSatelliteDiagnosticListener = installSatelliteDiagnosticListener;
|
|
10
|
+
exports.interpretSatelliteBlackScreenHints = interpretSatelliteBlackScreenHints;
|
|
11
|
+
exports.logSatelliteNativeDiagnostic = logSatelliteNativeDiagnostic;
|
|
12
|
+
exports.logSatelliteSyncReport = logSatelliteSyncReport;
|
|
13
|
+
var _reactNative = require("react-native");
|
|
14
|
+
var _aguaceroRnDebug = require("./aguaceroRnDebug");
|
|
15
|
+
/**
|
|
16
|
+
* Satellite-specific RN diagnostics (Metro + native events → Metro when `debug` is on).
|
|
17
|
+
*
|
|
18
|
+
* Filter Metro: `[AguaceroRN][satellite]`
|
|
19
|
+
* Filter logcat: `AguaceroRN`, `AguaceroSatelliteView`, `AguaceroSatellite`, `AguaceroSatKtx`
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const SATELLITE_DIAGNOSTIC_EVENT = exports.SATELLITE_DIAGNOSTIC_EVENT = 'AguaceroSatelliteDiagnostic';
|
|
23
|
+
const LOG = '[AguaceroRN][satellite]';
|
|
24
|
+
|
|
25
|
+
/** @type {import('react-native').EmitterSubscription | null} */
|
|
26
|
+
let diagSubscription = null;
|
|
27
|
+
const BASIS_FORMAT_NAMES = {
|
|
28
|
+
1: 'ETC2_RGBA (preferred Android)',
|
|
29
|
+
10: 'ASTC_LDR_4x4 (black tiles if GPU cannot sample ASTC)',
|
|
30
|
+
13: 'RGBA32 (universal fallback)'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param {number | undefined} ordinal
|
|
35
|
+
*/
|
|
36
|
+
function basisFormatLabel(ordinal) {
|
|
37
|
+
if (ordinal == null || Number.isNaN(Number(ordinal))) return 'unknown';
|
|
38
|
+
return BASIS_FORMAT_NAMES[Number(ordinal)] ?? `ordinal_${ordinal}`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Actionable hints when imagery is black but JS sync looks healthy.
|
|
43
|
+
* @param {Record<string, unknown>} ctx
|
|
44
|
+
*/
|
|
45
|
+
function interpretSatelliteBlackScreenHints(ctx) {
|
|
46
|
+
const hints = [];
|
|
47
|
+
const frameCount = Number(ctx.frameCount ?? 0);
|
|
48
|
+
const nativeCached = Number(ctx.nativeCachedFrames ?? ctx.cachedFrameCount ?? NaN);
|
|
49
|
+
const targetUnix = ctx.targetUnix;
|
|
50
|
+
const activeUnix = ctx.activeUnix;
|
|
51
|
+
const visible = ctx.visible;
|
|
52
|
+
const opacity = ctx.opacity;
|
|
53
|
+
const basisFormat = ctx.basisFormatOrdinal ?? ctx.transcodeFormatOrdinal;
|
|
54
|
+
if (frameCount === 0) {
|
|
55
|
+
hints.push('JS built zero frame URLs — check satellite listing, channel (geocolor), and sector.');
|
|
56
|
+
}
|
|
57
|
+
if (visible === false) {
|
|
58
|
+
hints.push('Layer visible=false — imagery is hidden by state/UI.');
|
|
59
|
+
}
|
|
60
|
+
if (typeof opacity === 'number' && opacity <= 0) {
|
|
61
|
+
hints.push('Layer opacity=0 — increase opacity in WeatherLayerManager state.');
|
|
62
|
+
}
|
|
63
|
+
if (targetUnix != null && nativeCached === 0 && !Number.isNaN(nativeCached)) {
|
|
64
|
+
hints.push('targetUnix is set but native GPU cache is empty — KTX fetch/decode/upload failed; check native diagnostic events or logcat (AguaceroSatelliteView).');
|
|
65
|
+
}
|
|
66
|
+
if (activeUnix == null && targetUnix != null) {
|
|
67
|
+
hints.push('targetUnix set but no active frame on GPU yet — wait for decode or prior frame failed upload (ASTC on unsupported GPU is common).');
|
|
68
|
+
}
|
|
69
|
+
if (Number(basisFormat) === 10) {
|
|
70
|
+
hints.push('Transcoded to ASTC — if the map footprint is black, rebuild SDK with ETC2-first transcode or check AguaceroSatellite for GPU upload GL errors.');
|
|
71
|
+
}
|
|
72
|
+
if (ctx.bundleIdPresent === false) {
|
|
73
|
+
hints.push('bundleId missing — install react-native-device-info; some keys require x-app-identifier (usually 403, not black tiles).');
|
|
74
|
+
}
|
|
75
|
+
if (ctx.mapLayerAdded === false) {
|
|
76
|
+
hints.push('Mapbox custom satellite layer not attached — ensure WeatherLayerManager is a child of MapManager.');
|
|
77
|
+
}
|
|
78
|
+
if (ctx.satelliteNativeMissing === true) {
|
|
79
|
+
hints.push('SatelliteLayer native view manager not registered — rebuild app / link @aguacerowx/react-native android.');
|
|
80
|
+
}
|
|
81
|
+
if (hints.length === 0) {
|
|
82
|
+
hints.push('JS pipeline looks healthy — inspect native events below (fetch bytes, transcode format, GPU upload). Filter logcat: AguaceroSatelliteView AguaceroSatellite AguaceroSatKtx');
|
|
83
|
+
}
|
|
84
|
+
return hints;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* One-shot integration audit (call when WeatherLayerManager mounts with debug).
|
|
89
|
+
* @param {{ core?: import('@aguacerowx/javascript-sdk').AguaceroCore; satelliteLayerRef?: React.RefObject<unknown> }} opts
|
|
90
|
+
*/
|
|
91
|
+
function auditSatelliteIntegration(opts = {}) {
|
|
92
|
+
if (!(0, _aguaceroRnDebug.isAguaceroRnDebugEnabled)()) return;
|
|
93
|
+
const {
|
|
94
|
+
core,
|
|
95
|
+
satelliteLayerRef
|
|
96
|
+
} = opts;
|
|
97
|
+
let satCmdKeys = [];
|
|
98
|
+
let gridCmdKeys = [];
|
|
99
|
+
let satManagerError = null;
|
|
100
|
+
try {
|
|
101
|
+
satCmdKeys = Object.keys(_reactNative.UIManager.getViewManagerConfig?.('SatelliteLayer')?.Commands ?? {});
|
|
102
|
+
} catch (e) {
|
|
103
|
+
satManagerError = String(e?.message ?? e);
|
|
104
|
+
satCmdKeys = [];
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
gridCmdKeys = Object.keys(_reactNative.UIManager.getViewManagerConfig?.('GridRenderLayer')?.Commands ?? {});
|
|
108
|
+
} catch {
|
|
109
|
+
gridCmdKeys = [];
|
|
110
|
+
}
|
|
111
|
+
let deviceInfoOk = false;
|
|
112
|
+
let deviceInfoBundleId = null;
|
|
113
|
+
try {
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, global-require
|
|
115
|
+
const DeviceInfo = require('react-native-device-info');
|
|
116
|
+
deviceInfoOk = true;
|
|
117
|
+
try {
|
|
118
|
+
deviceInfoBundleId = DeviceInfo.getBundleId?.() ?? null;
|
|
119
|
+
} catch {
|
|
120
|
+
deviceInfoBundleId = null;
|
|
121
|
+
}
|
|
122
|
+
} catch {
|
|
123
|
+
deviceInfoOk = false;
|
|
124
|
+
}
|
|
125
|
+
const snapshot = {
|
|
126
|
+
platform: _reactNative.Platform.OS,
|
|
127
|
+
satelliteNativeCommands: satCmdKeys,
|
|
128
|
+
satelliteNativeMissing: satCmdKeys.length === 0,
|
|
129
|
+
satelliteManagerError: satManagerError,
|
|
130
|
+
gridNativeCommands: gridCmdKeys,
|
|
131
|
+
satelliteRefAttached: Boolean(satelliteLayerRef?.current),
|
|
132
|
+
satelliteRefMethods: satelliteLayerRef?.current ? Object.keys(satelliteLayerRef.current) : [],
|
|
133
|
+
reactNativeDeviceInfo: deviceInfoOk ? {
|
|
134
|
+
installed: true,
|
|
135
|
+
bundleId: deviceInfoBundleId
|
|
136
|
+
} : {
|
|
137
|
+
installed: false,
|
|
138
|
+
hint: 'npm install react-native-device-info — required for core.bundleId / x-app-identifier'
|
|
139
|
+
},
|
|
140
|
+
mapboxNote: 'Requires @rnmapbox/maps v11; WeatherLayerManager must be nested inside MapManager',
|
|
141
|
+
nativeLibraries: ['aguacero_satellite_ktx (KTX2 Basis transcoder JNI)'],
|
|
142
|
+
auth: core ? (0, _aguaceroRnDebug.getAguaceroAuthDiagnosticSnapshot)(core) : undefined
|
|
143
|
+
};
|
|
144
|
+
(0, _aguaceroRnDebug.aguaceroDebug)('integration.audit', snapshot);
|
|
145
|
+
if (satCmdKeys.length === 0) {
|
|
146
|
+
(0, _aguaceroRnDebug.aguaceroDebugWarn)('integration.satelliteNativeMissing', {
|
|
147
|
+
hint: 'SatelliteLayer ViewManager has no commands — satellite will never render on Android.'
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (core && !core.bundleId && _reactNative.Platform.OS !== 'web') {
|
|
151
|
+
(0, _aguaceroRnDebug.aguaceroDebugWarn)('integration.bundleIdMissing', {
|
|
152
|
+
hint: 'core.bundleId is null — CDN may still work; some API keys require react-native-device-info.',
|
|
153
|
+
deviceInfoInstalled: deviceInfoOk
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return snapshot;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @param {object} params
|
|
161
|
+
*/
|
|
162
|
+
function logSatelliteSyncReport(params) {
|
|
163
|
+
if (!(0, _aguaceroRnDebug.isAguaceroRnDebugEnabled)()) return;
|
|
164
|
+
const {
|
|
165
|
+
state,
|
|
166
|
+
core,
|
|
167
|
+
frames,
|
|
168
|
+
targetUnix,
|
|
169
|
+
runKey,
|
|
170
|
+
timelineKeyCount,
|
|
171
|
+
runKeyChanged,
|
|
172
|
+
timelineChanged,
|
|
173
|
+
stylePayload
|
|
174
|
+
} = params;
|
|
175
|
+
const first = frames?.[0];
|
|
176
|
+
const last = frames?.length ? frames[frames.length - 1] : null;
|
|
177
|
+
const report = {
|
|
178
|
+
runKey,
|
|
179
|
+
runKeyChanged,
|
|
180
|
+
timelineChanged,
|
|
181
|
+
timelineKeyCount,
|
|
182
|
+
builtFrameCount: frames?.length ?? 0,
|
|
183
|
+
targetUnix,
|
|
184
|
+
satelliteTimestamp: state?.satelliteTimestamp ?? null,
|
|
185
|
+
style: stylePayload,
|
|
186
|
+
instrument: state?.satelliteInstrumentId,
|
|
187
|
+
sector: state?.satelliteSectorLabel,
|
|
188
|
+
channel: state?.satelliteChannel,
|
|
189
|
+
availableSatelliteTimestamps: state?.availableSatelliteTimestamps?.length ?? 0,
|
|
190
|
+
sampleShaderFileName: first?.shaderFileName ?? null,
|
|
191
|
+
sampleFrameUrl: first?.url ? (0, _aguaceroRnDebug.redactApiKeyFromUrl)(first.url) : null,
|
|
192
|
+
firstUnix: first?.unix ?? null,
|
|
193
|
+
lastUnix: last?.unix ?? null,
|
|
194
|
+
auth: core ? (0, _aguaceroRnDebug.getAguaceroAuthDiagnosticSnapshot)(core) : undefined,
|
|
195
|
+
blackScreenHints: interpretSatelliteBlackScreenHints({
|
|
196
|
+
frameCount: frames?.length ?? 0,
|
|
197
|
+
targetUnix,
|
|
198
|
+
visible: stylePayload?.visible,
|
|
199
|
+
opacity: stylePayload?.opacity,
|
|
200
|
+
bundleIdPresent: Boolean(core?.bundleId)
|
|
201
|
+
})
|
|
202
|
+
};
|
|
203
|
+
(0, _aguaceroRnDebug.aguaceroDebug)('sync.report', report);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Subscribe to native → JS diagnostic events (Android). Returns unsubscribe.
|
|
208
|
+
* @returns {() => void}
|
|
209
|
+
*/
|
|
210
|
+
function installSatelliteDiagnosticListener() {
|
|
211
|
+
if (!(0, _aguaceroRnDebug.isAguaceroRnDebugEnabled)()) return () => {};
|
|
212
|
+
if (_reactNative.Platform.OS !== 'android') {
|
|
213
|
+
(0, _aguaceroRnDebug.aguaceroDebug)('nativeEvents.skipped', {
|
|
214
|
+
reason: 'only Android emits AguaceroSatelliteDiagnostic today'
|
|
215
|
+
});
|
|
216
|
+
return () => {};
|
|
217
|
+
}
|
|
218
|
+
if (diagSubscription) {
|
|
219
|
+
diagSubscription.remove();
|
|
220
|
+
diagSubscription = null;
|
|
221
|
+
}
|
|
222
|
+
const emitter = new _reactNative.NativeEventEmitter();
|
|
223
|
+
diagSubscription = emitter.addListener(SATELLITE_DIAGNOSTIC_EVENT, payload => {
|
|
224
|
+
if (!payload || typeof payload !== 'object') return;
|
|
225
|
+
const phase = payload.phase ?? 'unknown';
|
|
226
|
+
const detail = {
|
|
227
|
+
...payload
|
|
228
|
+
};
|
|
229
|
+
delete detail.phase;
|
|
230
|
+
if (detail.basisFormatOrdinal != null) {
|
|
231
|
+
detail.basisFormat = basisFormatLabel(detail.basisFormatOrdinal);
|
|
232
|
+
}
|
|
233
|
+
if (detail.transcodeFormatOrdinal != null) {
|
|
234
|
+
detail.transcodeFormat = basisFormatLabel(detail.transcodeFormatOrdinal);
|
|
235
|
+
}
|
|
236
|
+
if (phase.includes('fail') || phase.includes('error') || phase === 'render.noDraw' || phase === 'render.poll' && (detail.cachedFrameCount === 0 || detail.activeUnix == null)) {
|
|
237
|
+
detail.blackScreenHints = interpretSatelliteBlackScreenHints(detail);
|
|
238
|
+
(0, _aguaceroRnDebug.aguaceroDebugWarn)(`native.${phase}`, detail);
|
|
239
|
+
} else {
|
|
240
|
+
(0, _aguaceroRnDebug.aguaceroDebug)(`native.${phase}`, detail);
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
(0, _aguaceroRnDebug.aguaceroDebug)('nativeEvents.installed', {
|
|
244
|
+
event: SATELLITE_DIAGNOSTIC_EVENT,
|
|
245
|
+
hint: 'Native fetch/decode/GPU logs will appear here when debug=true on WeatherLayerManager'
|
|
246
|
+
});
|
|
247
|
+
return () => {
|
|
248
|
+
diagSubscription?.remove();
|
|
249
|
+
diagSubscription = null;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @param {Record<string, unknown>} nativePayload
|
|
255
|
+
*/
|
|
256
|
+
function logSatelliteNativeDiagnostic(nativePayload) {
|
|
257
|
+
if (!(0, _aguaceroRnDebug.isAguaceroRnDebugEnabled)() || !nativePayload) return;
|
|
258
|
+
const phase = nativePayload.phase ?? 'event';
|
|
259
|
+
(0, _aguaceroRnDebug.aguaceroDebug)(`native.${phase}`, nativePayload);
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=satelliteRnDebug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_aguaceroRnDebug","SATELLITE_DIAGNOSTIC_EVENT","exports","LOG","diagSubscription","BASIS_FORMAT_NAMES","basisFormatLabel","ordinal","Number","isNaN","interpretSatelliteBlackScreenHints","ctx","hints","frameCount","nativeCached","nativeCachedFrames","cachedFrameCount","NaN","targetUnix","activeUnix","visible","opacity","basisFormat","basisFormatOrdinal","transcodeFormatOrdinal","push","bundleIdPresent","mapLayerAdded","satelliteNativeMissing","length","auditSatelliteIntegration","opts","isAguaceroRnDebugEnabled","core","satelliteLayerRef","satCmdKeys","gridCmdKeys","satManagerError","Object","keys","UIManager","getViewManagerConfig","Commands","e","String","message","deviceInfoOk","deviceInfoBundleId","DeviceInfo","getBundleId","snapshot","platform","Platform","OS","satelliteNativeCommands","satelliteManagerError","gridNativeCommands","satelliteRefAttached","Boolean","current","satelliteRefMethods","reactNativeDeviceInfo","installed","bundleId","hint","mapboxNote","nativeLibraries","auth","getAguaceroAuthDiagnosticSnapshot","undefined","aguaceroDebug","aguaceroDebugWarn","deviceInfoInstalled","logSatelliteSyncReport","params","state","frames","runKey","timelineKeyCount","runKeyChanged","timelineChanged","stylePayload","first","last","report","builtFrameCount","satelliteTimestamp","style","instrument","satelliteInstrumentId","sector","satelliteSectorLabel","channel","satelliteChannel","availableSatelliteTimestamps","sampleShaderFileName","shaderFileName","sampleFrameUrl","url","redactApiKeyFromUrl","firstUnix","unix","lastUnix","blackScreenHints","installSatelliteDiagnosticListener","reason","remove","emitter","NativeEventEmitter","addListener","payload","phase","detail","transcodeFormat","includes","event","logSatelliteNativeDiagnostic","nativePayload"],"sourceRoot":"..\\..\\src","sources":["satelliteRnDebug.js"],"mappings":";;;;;;;;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAME,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,GAAG,6BAA6B;AAEvE,MAAME,GAAG,GAAG,yBAAyB;;AAErC;AACA,IAAIC,gBAAgB,GAAG,IAAI;AAE3B,MAAMC,kBAAkB,GAAG;EACvB,CAAC,EAAE,+BAA+B;EAClC,EAAE,EAAE,sDAAsD;EAC1D,EAAE,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACO,SAASC,gBAAgBA,CAACC,OAAO,EAAE;EACtC,IAAIA,OAAO,IAAI,IAAI,IAAIC,MAAM,CAACC,KAAK,CAACD,MAAM,CAACD,OAAO,CAAC,CAAC,EAAE,OAAO,SAAS;EACtE,OAAOF,kBAAkB,CAACG,MAAM,CAACD,OAAO,CAAC,CAAC,IAAI,WAAWA,OAAO,EAAE;AACtE;;AAEA;AACA;AACA;AACA;AACO,SAASG,kCAAkCA,CAACC,GAAG,EAAE;EACpD,MAAMC,KAAK,GAAG,EAAE;EAChB,MAAMC,UAAU,GAAGL,MAAM,CAACG,GAAG,CAACE,UAAU,IAAI,CAAC,CAAC;EAC9C,MAAMC,YAAY,GAAGN,MAAM,CAACG,GAAG,CAACI,kBAAkB,IAAIJ,GAAG,CAACK,gBAAgB,IAAIC,GAAG,CAAC;EAClF,MAAMC,UAAU,GAAGP,GAAG,CAACO,UAAU;EACjC,MAAMC,UAAU,GAAGR,GAAG,CAACQ,UAAU;EACjC,MAAMC,OAAO,GAAGT,GAAG,CAACS,OAAO;EAC3B,MAAMC,OAAO,GAAGV,GAAG,CAAC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AAKC,MAAM,CAAChG,gBAAgB,KAAK,CAAC,IAAIgG,MAAM,CAAC7F,UAAU,IAAI,IAAI,CAAE,EAC3F;MACE6F,MAAM,CAACT,gBAAgB,GAAG7F,kCAAkC,CAACsG,MAAM,CAAC;MACpE,IAAAzC,kCAAiB,EAAC,UAAUwC,KAAK,EAAE,EAAEC,MAAM,CAAC;IAChD,CAAC,MAAM;MACH,IAAA1C,8BAAa,EAAC,UAAUyC,KAAK,EAAE,EAAEC,MAAM,CAAC;IAC5C;EACJ,CAAC,CAAC;EAEF,IAAA1C,8BAAa,EAAC,wBAAwB,EAAE;IACpC6C,KAAK,EAAElH,0BAA0B;IACjC+D,IAAI,EAAE;EACV,CAAC,CAAC;EAEF,OAAO,MAAM;IACT5D,gBAAgB,EAAEsG,MAAM,CAAC,CAAC;IAC1BtG,gBAAgB,GAAG,IAAI;EAC3B,CAAC;AACL;;AAEA;AACA;AACA;AACO,SAASgH,4BAA4BA,CAACC,aAAa,EAAE;EACxD,IAAI,CAAC,IAAArF,yCAAwB,EAAC,CAAC,IAAI,CAACqF,aAAa,EAAE;EACnD,MAAMN,KAAK,GAAGM,aAAa,CAACN,KAAK,IAAI,OAAO;EAC5C,IAAAzC,8BAAa,EAAC,UAAUyC,KAAK,EAAE,EAAEM,aAAa,CAAC;AACnD","ignoreList":[]}
|
|
@@ -16,6 +16,8 @@ import { mapRegistry } from './MapRegistry';
|
|
|
16
16
|
import { satBridgeWarn } from './satelliteBridgeDiag';
|
|
17
17
|
import { augmentProcessFrameOptionsForDebug, aguaceroDebugWarn, configureAguaceroRnDebug, getAguaceroAuthDiagnosticSnapshot, isAguaceroRnDebugEnabled } from './aguaceroRnDebug';
|
|
18
18
|
import { installAguaceroCoreDebugHooks, logProcessFrameAuthMismatch } from './aguaceroCoreDebugHooks';
|
|
19
|
+
import { resolveGridRequestSiteOrigin } from './gridCdnAuth';
|
|
20
|
+
import { auditSatelliteIntegration, installSatelliteDiagnosticListener } from './satelliteRnDebug';
|
|
19
21
|
const NEXRAD_NATIVE = Platform.OS === 'android' || Platform.OS === 'ios';
|
|
20
22
|
const SATELLITE_NATIVE = Platform.OS === 'android' || Platform.OS === 'ios';
|
|
21
23
|
satBridgeWarn('SDK fingerprint', {
|
|
@@ -24,9 +26,9 @@ satBridgeWarn('SDK fingerprint', {
|
|
|
24
26
|
note: 'If you never see sat-bridge logs, the app bundle is not loading this WeatherLayerManager build.'
|
|
25
27
|
});
|
|
26
28
|
|
|
27
|
-
/**
|
|
28
|
-
* Same filtering as {@link AguaceroCore#_getFilteredMrmsTimestampsForVariable} for older cores
|
|
29
|
-
* where that helper (or {@code setMRMSDurationValue}) is missing from the prototype chain.
|
|
29
|
+
/**
|
|
30
|
+
* Same filtering as {@link AguaceroCore#_getFilteredMrmsTimestampsForVariable} for older cores
|
|
31
|
+
* where that helper (or {@code setMRMSDurationValue}) is missing from the prototype chain.
|
|
30
32
|
*/
|
|
31
33
|
function getFilteredMrmsTimestampsCompat(core, variable) {
|
|
32
34
|
const raw = core.mrmsStatus?.[variable];
|
|
@@ -41,9 +43,9 @@ function getFilteredMrmsTimestampsCompat(core, variable) {
|
|
|
41
43
|
return list;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
/**
|
|
45
|
-
* Older npm installs may resolve an {@link AguaceroCore} without {@code setMRMSDurationValue} /
|
|
46
|
-
* {@code setNexradDurationValue}; mirror those methods here using the same logic as the SDK.
|
|
46
|
+
/**
|
|
47
|
+
* Older npm installs may resolve an {@link AguaceroCore} without {@code setMRMSDurationValue} /
|
|
48
|
+
* {@code setNexradDurationValue}; mirror those methods here using the same logic as the SDK.
|
|
47
49
|
*/
|
|
48
50
|
async function applyMrmsDurationValue(core, value) {
|
|
49
51
|
if (typeof core.setMRMSDurationValue === 'function') {
|
|
@@ -108,12 +110,12 @@ const {
|
|
|
108
110
|
InspectorModule
|
|
109
111
|
} = NativeModules;
|
|
110
112
|
|
|
111
|
-
/**
|
|
112
|
-
* `state:change` payloads can briefly have {@code isNexrad} before {@code nexradSite} / {@code nexradTimestamp}
|
|
113
|
-
* are populated; {@code core.state} is updated first. Merge so readouts match the active radar.
|
|
114
|
-
*
|
|
115
|
-
* @param {object | null} emitted
|
|
116
|
-
* @param {object | null} coreState
|
|
113
|
+
/**
|
|
114
|
+
* `state:change` payloads can briefly have {@code isNexrad} before {@code nexradSite} / {@code nexradTimestamp}
|
|
115
|
+
* are populated; {@code core.state} is updated first. Merge so readouts match the active radar.
|
|
116
|
+
*
|
|
117
|
+
* @param {object | null} emitted
|
|
118
|
+
* @param {object | null} coreState
|
|
117
119
|
*/
|
|
118
120
|
function mergeNexradEmittedWithCore(emitted, coreState) {
|
|
119
121
|
if (!emitted || !coreState) return null;
|
|
@@ -128,10 +130,10 @@ function mergeNexradEmittedWithCore(emitted, coreState) {
|
|
|
128
130
|
};
|
|
129
131
|
}
|
|
130
132
|
|
|
131
|
-
/**
|
|
132
|
-
* Compact timeline identity for deduping {@code state:change}: extending the NEXRAD/satellite window
|
|
133
|
-
* often keeps the same selected unix — without this, {@link WeatherLayerManager} short-circuits and
|
|
134
|
-
* never calls native {@code sync} / preload with the expanded frame list.
|
|
133
|
+
/**
|
|
134
|
+
* Compact timeline identity for deduping {@code state:change}: extending the NEXRAD/satellite window
|
|
135
|
+
* often keeps the same selected unix — without this, {@link WeatherLayerManager} short-circuits and
|
|
136
|
+
* never calls native {@code sync} / preload with the expanded frame list.
|
|
135
137
|
*/
|
|
136
138
|
function nexradObsTimelineSig(state) {
|
|
137
139
|
const arr = [...(state?.availableNexradTimestamps || [])].map(Number).filter(t => Number.isFinite(t)).sort((a, b) => a - b);
|
|
@@ -172,37 +174,34 @@ function wxGridWarn(tag, detail) {
|
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
/**
|
|
176
|
-
* Native {@code processFrame} must mirror browser/AguaceroCore grid auth: encoded {@code apiKey}
|
|
177
|
-
* in the query string and optional {@code Origin} / {@code Referer} (many CloudFront setups require them).
|
|
178
|
-
*
|
|
179
|
-
* @param {string} baseGridUrl
|
|
180
|
-
* @param {string} resourcePath
|
|
181
|
-
* @param {string} apiKey
|
|
182
|
-
* @param {string | null | undefined} bundleId
|
|
183
|
-
* @param {string | undefined} gridRequestSiteOrigin -
|
|
177
|
+
/**
|
|
178
|
+
* Native {@code processFrame} must mirror browser/AguaceroCore grid auth: encoded {@code apiKey}
|
|
179
|
+
* in the query string and optional {@code Origin} / {@code Referer} (many CloudFront setups require them).
|
|
180
|
+
*
|
|
181
|
+
* @param {string} baseGridUrl
|
|
182
|
+
* @param {string} resourcePath
|
|
183
|
+
* @param {string} apiKey
|
|
184
|
+
* @param {string | null | undefined} bundleId
|
|
185
|
+
* @param {string | undefined} gridRequestSiteOrigin - prop or core origin (see {@link resolveGridRequestSiteOrigin})
|
|
186
|
+
* @param {import('@aguacerowx/javascript-sdk').AguaceroCore | null | undefined} core
|
|
184
187
|
*/
|
|
185
|
-
function buildGridFrameProcessOptions(baseGridUrl, resourcePath, apiKey, bundleId, gridRequestSiteOrigin) {
|
|
186
|
-
const
|
|
188
|
+
function buildGridFrameProcessOptions(baseGridUrl, resourcePath, apiKey, bundleId, gridRequestSiteOrigin, core) {
|
|
189
|
+
const trimmedKey = typeof apiKey === 'string' ? apiKey.trim() : apiKey;
|
|
190
|
+
const url = `${baseGridUrl}${resourcePath}?apiKey=${encodeURIComponent(trimmedKey || '')}`;
|
|
187
191
|
const options = {
|
|
188
192
|
url,
|
|
189
|
-
apiKey,
|
|
193
|
+
apiKey: trimmedKey,
|
|
190
194
|
bundleId
|
|
191
195
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
origin = origin.slice(0, -1);
|
|
196
|
-
}
|
|
197
|
-
if (origin.length > 0) {
|
|
198
|
-
options.gridRequestSiteOrigin = origin;
|
|
199
|
-
}
|
|
196
|
+
const origin = resolveGridRequestSiteOrigin(gridRequestSiteOrigin, core);
|
|
197
|
+
if (origin) {
|
|
198
|
+
options.gridRequestSiteOrigin = origin;
|
|
200
199
|
}
|
|
201
200
|
return options;
|
|
202
201
|
}
|
|
203
202
|
|
|
204
|
-
/**
|
|
205
|
-
* A helper function to generate the raw RGBA byte buffer for the colormap texture.
|
|
203
|
+
/**
|
|
204
|
+
* A helper function to generate the raw RGBA byte buffer for the colormap texture.
|
|
206
205
|
*/
|
|
207
206
|
const _generateColormapBytes = colormap => {
|
|
208
207
|
const width = 256;
|
|
@@ -254,6 +253,12 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
254
253
|
customColormaps,
|
|
255
254
|
initialMode,
|
|
256
255
|
initialVariable,
|
|
256
|
+
/** GOES instrument when {@link initialMode} is `"satellite"` (default `GOES19-EAST`). */
|
|
257
|
+
initialSatelliteId,
|
|
258
|
+
/** Sector token or label when {@link initialMode} is `"satellite"` (default `conus` → GOES-EAST CONUS). */
|
|
259
|
+
initialSatelliteSector,
|
|
260
|
+
/** Product/band when {@link initialMode} is `"satellite"` (e.g. `geocolor`, `C13`). Falls back to {@link initialVariable}. */
|
|
261
|
+
initialSatelliteProduct,
|
|
257
262
|
autoRefresh,
|
|
258
263
|
autoRefreshInterval,
|
|
259
264
|
initialModel,
|
|
@@ -273,6 +278,14 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
273
278
|
enabled: Boolean(debug)
|
|
274
279
|
});
|
|
275
280
|
}, [debug]);
|
|
281
|
+
useEffect(() => {
|
|
282
|
+
if (!debug) return undefined;
|
|
283
|
+
auditSatelliteIntegration({
|
|
284
|
+
core,
|
|
285
|
+
satelliteLayerRef
|
|
286
|
+
});
|
|
287
|
+
return installSatelliteDiagnosticListener();
|
|
288
|
+
}, [debug, core]);
|
|
276
289
|
const context = useContext(AguaceroContext);
|
|
277
290
|
|
|
278
291
|
// Create the core here instead of getting it from context
|
|
@@ -283,7 +296,12 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
283
296
|
layerOptions: {
|
|
284
297
|
mode: initialMode,
|
|
285
298
|
variable: initialVariable,
|
|
286
|
-
model: initialModel
|
|
299
|
+
model: initialModel,
|
|
300
|
+
...(initialMode === 'satellite' ? {
|
|
301
|
+
satelliteId: initialSatelliteId,
|
|
302
|
+
sector: initialSatelliteSector,
|
|
303
|
+
satelliteProduct: initialSatelliteProduct ?? initialVariable
|
|
304
|
+
} : {})
|
|
287
305
|
},
|
|
288
306
|
autoRefresh: false // <-- add this
|
|
289
307
|
}), [apiKey, gridRequestSiteOrigin]);
|
|
@@ -408,6 +426,8 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
408
426
|
// Track if we've done the initial load
|
|
409
427
|
const hasInitialLoad = useRef(false);
|
|
410
428
|
const hasPreloadedRef = useRef(false);
|
|
429
|
+
/** Bumped on {@code cancelAllFrames} / full reload so stale {@code processFrame} results are ignored. */
|
|
430
|
+
const preloadGenerationRef = useRef(0);
|
|
411
431
|
|
|
412
432
|
// Track the last state we processed to avoid redundant updates
|
|
413
433
|
const lastProcessedState = useRef(null);
|
|
@@ -488,9 +508,9 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
488
508
|
refreshData: () => {
|
|
489
509
|
_checkForUpdates();
|
|
490
510
|
},
|
|
491
|
-
/**
|
|
492
|
-
* NWS watches/warnings (native map, iOS + Android): same options as mapsgl {@link WeatherLayerManager#configureWatchesWarnings}.
|
|
493
|
-
* @param {object} partial
|
|
511
|
+
/**
|
|
512
|
+
* NWS watches/warnings (native map, iOS + Android): same options as mapsgl {@link WeatherLayerManager#configureWatchesWarnings}.
|
|
513
|
+
* @param {object} partial
|
|
494
514
|
*/
|
|
495
515
|
configureWatchesWarnings: partial => {
|
|
496
516
|
setWatchesWarningsOptions(prev => ({
|
|
@@ -554,6 +574,8 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
554
574
|
|
|
555
575
|
// Only mark as "has preloaded" after validation passes
|
|
556
576
|
hasPreloadedRef.current = true;
|
|
577
|
+
const generation = preloadGenerationRef.current;
|
|
578
|
+
const isStaleGeneration = () => generation !== preloadGenerationRef.current;
|
|
557
579
|
wxGridVerbose('preloadStart', {
|
|
558
580
|
isMRMS,
|
|
559
581
|
model,
|
|
@@ -670,7 +692,7 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
670
692
|
} else {
|
|
671
693
|
resourcePath = `/grids/${model}/${date}/${run}/${currentFrame}/${variable}/0`;
|
|
672
694
|
}
|
|
673
|
-
const options = augmentProcessFrameOptionsForDebug(buildGridFrameProcessOptions(core.baseGridUrl, resourcePath, core.apiKey, core.bundleId, gridRequestSiteOrigin), core);
|
|
695
|
+
const options = augmentProcessFrameOptionsForDebug(buildGridFrameProcessOptions(core.baseGridUrl, resourcePath, core.apiKey, core.bundleId, gridRequestSiteOrigin, core), core);
|
|
674
696
|
logProcessFrameAuthMismatch(core, options, {
|
|
675
697
|
phase: 'preloadCurrent',
|
|
676
698
|
currentCacheKey
|
|
@@ -682,6 +704,13 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
682
704
|
frame: currentFrame
|
|
683
705
|
});
|
|
684
706
|
const result = await WeatherFrameProcessorModule.processFrame(options);
|
|
707
|
+
if (isStaleGeneration()) {
|
|
708
|
+
wxGridVerbose('preloadCurrentFrameStale', {
|
|
709
|
+
currentCacheKey,
|
|
710
|
+
generation
|
|
711
|
+
});
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
685
714
|
if (!result || !result.filePath) {
|
|
686
715
|
hasPreloadedRef.current = false;
|
|
687
716
|
wxGridWarn('preloadAbort', {
|
|
@@ -817,12 +846,15 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
817
846
|
} else {
|
|
818
847
|
resourcePath = `/grids/${model}/${date}/${run}/${frame}/${variable}/0`;
|
|
819
848
|
}
|
|
820
|
-
const options = augmentProcessFrameOptionsForDebug(buildGridFrameProcessOptions(core.baseGridUrl, resourcePath, core.apiKey, core.bundleId, gridRequestSiteOrigin), core);
|
|
849
|
+
const options = augmentProcessFrameOptionsForDebug(buildGridFrameProcessOptions(core.baseGridUrl, resourcePath, core.apiKey, core.bundleId, gridRequestSiteOrigin, core), core);
|
|
821
850
|
logProcessFrameAuthMismatch(core, options, {
|
|
822
851
|
phase: 'preloadBackground',
|
|
823
852
|
cacheKey
|
|
824
853
|
});
|
|
825
854
|
WeatherFrameProcessorModule.processFrame(options).then(result => {
|
|
855
|
+
if (isStaleGeneration()) {
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
826
858
|
if (!result || !result.filePath) {
|
|
827
859
|
return;
|
|
828
860
|
}
|
|
@@ -1210,7 +1242,7 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1210
1242
|
m = (frameDate.getUTCMonth() + 1).toString().padStart(2, '0'),
|
|
1211
1243
|
d = frameDate.getUTCDate().toString().padStart(2, '0');
|
|
1212
1244
|
const resourcePath = `/grids/mrms/${y}${m}${d}/${frame}/0/${currentVariable}/0`;
|
|
1213
|
-
const options = augmentProcessFrameOptionsForDebug(buildGridFrameProcessOptions(core.baseGridUrl, resourcePath, core.apiKey, core.bundleId, gridRequestSiteOrigin), core);
|
|
1245
|
+
const options = augmentProcessFrameOptionsForDebug(buildGridFrameProcessOptions(core.baseGridUrl, resourcePath, core.apiKey, core.bundleId, gridRequestSiteOrigin, core), core);
|
|
1214
1246
|
logProcessFrameAuthMismatch(core, options, {
|
|
1215
1247
|
phase: 'mrmsRefresh',
|
|
1216
1248
|
cacheKey
|
|
@@ -1479,6 +1511,7 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1479
1511
|
}
|
|
1480
1512
|
}
|
|
1481
1513
|
hasPreloadedRef.current = false;
|
|
1514
|
+
preloadGenerationRef.current += 1;
|
|
1482
1515
|
preloadedDataCache.current.clear();
|
|
1483
1516
|
cachedGeometry.current = null;
|
|
1484
1517
|
cachedColormap.current = null;
|
|
@@ -1486,7 +1519,8 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1486
1519
|
WeatherFrameProcessorModule.cancelAllFrames();
|
|
1487
1520
|
wxGridVerbose('cancelAllFrames', {
|
|
1488
1521
|
reason: 'needsFullLoad',
|
|
1489
|
-
variable: newState.variable
|
|
1522
|
+
variable: newState.variable,
|
|
1523
|
+
generation: preloadGenerationRef.current
|
|
1490
1524
|
});
|
|
1491
1525
|
if (!newState.variable) {
|
|
1492
1526
|
previousStateRef.current = newState;
|
|
@@ -1508,6 +1542,8 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1508
1542
|
mrmsTimestamp: newState.mrmsTimestamp,
|
|
1509
1543
|
forecastHour: newState.forecastHour
|
|
1510
1544
|
});
|
|
1545
|
+
hasPreloadedRef.current = false;
|
|
1546
|
+
void preloadAllFramesToDisk(newState);
|
|
1511
1547
|
}
|
|
1512
1548
|
if (success && newState.opacity !== renderProps.opacity) {
|
|
1513
1549
|
setRenderProps(prev => ({
|