@aguacerowx/react-native 0.0.8 → 0.0.9
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/build/.transforms/78b892a9dae44f36e51ff0649e9c6e36/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayerView.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/InspectorModule.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/WeatherFrameProcessorModule.dex +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +126 -122
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +3 -1
- package/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +13 -5
- package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +4 -18
- package/ios/AguaceroPackage.m +19 -0
- package/ios/FragmentUniforms.swift +14 -0
- package/ios/GridRenderLayer.swift +959 -59
- package/ios/GridRenderLayerBridge.swift +30 -0
- package/ios/GridRenderLayerManager.mm +104 -98
- package/ios/GridRenderLayerView.h +23 -0
- package/ios/GridRenderLayerView.m +199 -0
- package/ios/InspectorDataCache.swift +66 -0
- package/ios/InspectorModule.m +10 -0
- package/ios/InspectorModule.swift +64 -0
- package/ios/Shaders.metal +131 -0
- package/ios/WeatherFrameProcessorModule.m +16 -0
- package/ios/WeatherFrameProcessorModule.swift +104 -0
- package/ios/aguacerowx-react-native.podspec +21 -14
- package/lib/commonjs/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +126 -122
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +3 -1
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +13 -5
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +4 -18
- package/lib/commonjs/ios/AguaceroPackage.m +19 -0
- package/lib/commonjs/ios/FragmentUniforms.swift +14 -0
- package/lib/commonjs/ios/GridRenderLayer.swift +962 -0
- package/lib/commonjs/ios/GridRenderLayerBridge.swift +30 -0
- package/lib/commonjs/ios/GridRenderLayerManager.mm +146 -0
- package/lib/commonjs/ios/GridRenderLayerView.h +23 -0
- package/lib/commonjs/ios/GridRenderLayerView.m +199 -0
- package/lib/commonjs/ios/InspectorDataCache.swift +66 -0
- package/lib/commonjs/ios/InspectorModule.m +10 -0
- package/lib/commonjs/ios/InspectorModule.swift +64 -0
- package/lib/commonjs/ios/Shaders.metal +131 -0
- package/lib/commonjs/ios/WeatherFrameProcessorModule.m +16 -0
- package/lib/commonjs/ios/WeatherFrameProcessorModule.swift +104 -0
- package/lib/commonjs/ios/aguacerowx-react-native.podspec +36 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js +1003 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js +381 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js +1229 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js +4023 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js +38 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js +30 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js +27 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js +47 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js +301 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js +126 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/package.json +48 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js +1029 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js +381 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js +1229 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js +4023 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js +38 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js +30 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js +27 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js +41 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js +301 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js.map +1 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js +126 -0
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js.map +1 -0
- package/lib/commonjs/package.json +9 -17
- package/lib/commonjs/src/GridRenderLayer.js +32 -7
- package/lib/commonjs/src/GridRenderLayer.js.map +1 -1
- package/lib/commonjs/src/MapManager.js +1 -4
- package/lib/commonjs/src/MapManager.js.map +1 -1
- package/lib/commonjs/src/WeatherLayerManager.js +236 -210
- package/lib/commonjs/src/WeatherLayerManager.js.map +1 -1
- package/lib/module/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +126 -122
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +3 -1
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +13 -5
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +4 -18
- package/lib/module/ios/AguaceroPackage.m +19 -0
- package/lib/module/ios/FragmentUniforms.swift +14 -0
- package/lib/module/ios/GridRenderLayer.swift +962 -0
- package/lib/module/ios/GridRenderLayerBridge.swift +30 -0
- package/lib/module/ios/GridRenderLayerManager.mm +146 -0
- package/lib/module/ios/GridRenderLayerView.h +23 -0
- package/lib/module/ios/GridRenderLayerView.m +199 -0
- package/lib/module/ios/InspectorDataCache.swift +66 -0
- package/lib/module/ios/InspectorModule.m +10 -0
- package/lib/module/ios/InspectorModule.swift +64 -0
- package/lib/module/ios/Shaders.metal +131 -0
- package/lib/module/ios/WeatherFrameProcessorModule.m +16 -0
- package/lib/module/ios/WeatherFrameProcessorModule.swift +104 -0
- package/lib/module/ios/aguacerowx-react-native.podspec +36 -0
- package/lib/module/lib/commonjs/ios/AguaceroPackage.m +19 -0
- package/lib/module/lib/commonjs/ios/FragmentUniforms.swift +14 -0
- package/lib/module/lib/commonjs/ios/GridRenderLayer.swift +962 -0
- package/lib/module/lib/commonjs/ios/GridRenderLayerBridge.swift +30 -0
- package/lib/module/lib/commonjs/ios/GridRenderLayerManager.mm +146 -0
- package/lib/module/lib/commonjs/ios/GridRenderLayerView.h +23 -0
- package/lib/module/lib/commonjs/ios/GridRenderLayerView.m +199 -0
- package/lib/module/lib/commonjs/ios/InspectorDataCache.swift +66 -0
- package/lib/module/lib/commonjs/ios/InspectorModule.m +10 -0
- package/lib/module/lib/commonjs/ios/InspectorModule.swift +64 -0
- package/lib/module/lib/commonjs/ios/Shaders.metal +131 -0
- package/lib/module/lib/commonjs/ios/WeatherFrameProcessorModule.m +16 -0
- package/lib/module/lib/commonjs/ios/WeatherFrameProcessorModule.swift +104 -0
- package/lib/module/lib/commonjs/ios/aguacerowx-react-native.podspec +36 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js +1003 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js +381 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js +1229 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js +4023 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js +38 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js +30 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js +27 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js +47 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js +301 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js +126 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/package.json +48 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js +1033 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js +381 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js +1229 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js +4023 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js +38 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js +30 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js +27 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js +41 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js +301 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js.map +1 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js +126 -0
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js.map +1 -0
- package/lib/module/lib/commonjs/package.json +9 -17
- package/lib/module/lib/commonjs/src/GridRenderLayer.js +32 -7
- package/lib/module/lib/commonjs/src/GridRenderLayer.js.map +1 -1
- package/lib/module/lib/commonjs/src/MapManager.js +1 -4
- package/lib/module/lib/commonjs/src/MapManager.js.map +1 -1
- package/lib/module/lib/commonjs/src/WeatherLayerManager.js +236 -210
- package/lib/module/lib/commonjs/src/WeatherLayerManager.js.map +1 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js +1003 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js +381 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js +1229 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js +4023 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/events.js +38 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/events.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js +30 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js +27 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/index.js +47 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/index.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js +301 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js +126 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/package.json +48 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js +1021 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js +375 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js +1223 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js +4017 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/events.js +31 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/events.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js +29 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js +21 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/index.js +12 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/index.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js +295 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js.map +1 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js +119 -0
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js.map +1 -0
- package/lib/module/package.json +9 -17
- package/lib/module/src/GridRenderLayer.js +32 -7
- package/lib/module/src/GridRenderLayer.js.map +1 -1
- package/lib/module/src/MapManager.js +1 -4
- package/lib/module/src/MapManager.js.map +1 -1
- package/lib/module/src/WeatherLayerManager.js +237 -211
- package/lib/module/src/WeatherLayerManager.js.map +1 -1
- package/lib/typescript/src/GridRenderLayer.d.ts.map +1 -1
- package/lib/typescript/src/MapManager.d.ts.map +1 -1
- package/lib/typescript/src/WeatherLayerManager.d.ts.map +1 -1
- package/package.json +9 -17
- package/src/AguaceroContext.js +4 -0
- package/src/GridRenderLayer.js +205 -0
- package/src/GridRenderLayerNativeComponent.ts +16 -0
- package/src/MapManager.js +156 -0
- package/src/MapRegistry.js +35 -0
- package/src/StyleApplicator.js +241 -0
- package/src/WeatherLayerManager.js +873 -0
|
@@ -5,8 +5,14 @@ import { AguaceroCore, getUnitConversionFunction } from '@aguacerowx/javascript-
|
|
|
5
5
|
import { AguaceroContext } from './AguaceroContext';
|
|
6
6
|
import { GridRenderLayer } from './GridRenderLayer';
|
|
7
7
|
import { fromByteArray } from 'base64-js';
|
|
8
|
-
import { NativeModules } from 'react-native';
|
|
8
|
+
import { Platform, NativeModules } from 'react-native';
|
|
9
9
|
import { mapRegistry } from './MapRegistry';
|
|
10
|
+
console.log("--- Aguacero Native Module Initial State Check ---");
|
|
11
|
+
console.log("All NativeModules:", Object.keys(NativeModules));
|
|
12
|
+
console.log("WeatherFrameProcessorModule available?:", !!NativeModules.WeatherFrameProcessorModule);
|
|
13
|
+
console.log("InspectorModule available?:", !!NativeModules.InspectorModule);
|
|
14
|
+
console.log("GridRenderLayerManager available?:", !!NativeModules.GridRenderLayerManager);
|
|
15
|
+
console.log("-------------------------------------------------");
|
|
10
16
|
const {
|
|
11
17
|
WeatherFrameProcessorModule,
|
|
12
18
|
InspectorModule
|
|
@@ -88,6 +94,7 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
88
94
|
|
|
89
95
|
// Track if we've done the initial load
|
|
90
96
|
const hasInitialLoad = useRef(false);
|
|
97
|
+
const hasPreloadedRef = useRef(false);
|
|
91
98
|
|
|
92
99
|
// Track the last state we processed to avoid redundant updates
|
|
93
100
|
const lastProcessedState = useRef(null);
|
|
@@ -129,6 +136,12 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
129
136
|
};
|
|
130
137
|
}, [core]);
|
|
131
138
|
const preloadAllFramesToDisk = state => {
|
|
139
|
+
if (hasPreloadedRef.current) {
|
|
140
|
+
console.log('✅ [Preload] Gating preload; already initiated for this dataset.');
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
hasPreloadedRef.current = true;
|
|
144
|
+
console.log('🚀 [Preload] Initiating parallel preload for new dataset...');
|
|
132
145
|
const {
|
|
133
146
|
isMRMS,
|
|
134
147
|
model,
|
|
@@ -137,13 +150,49 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
137
150
|
variable,
|
|
138
151
|
units,
|
|
139
152
|
availableHours,
|
|
140
|
-
availableTimestamps
|
|
153
|
+
availableTimestamps,
|
|
154
|
+
forecastHour,
|
|
155
|
+
mrmsTimestamp
|
|
141
156
|
} = state;
|
|
157
|
+
if (!cachedGeometry.current || !cachedColormap.current) {
|
|
158
|
+
const gridModel = isMRMS ? 'mrms' : model;
|
|
159
|
+
const {
|
|
160
|
+
corners,
|
|
161
|
+
gridDef
|
|
162
|
+
} = core._getGridCornersAndDef(gridModel);
|
|
163
|
+
gridLayerRef.current.updateGeometry(corners, gridDef);
|
|
164
|
+
cachedGeometry.current = {
|
|
165
|
+
model: gridModel,
|
|
166
|
+
variable
|
|
167
|
+
};
|
|
168
|
+
const {
|
|
169
|
+
colormap,
|
|
170
|
+
baseUnit
|
|
171
|
+
} = core._getColormapForVariable(variable);
|
|
172
|
+
const toUnit = core._getTargetUnit(baseUnit, units);
|
|
173
|
+
const finalColormap = core._convertColormapUnits(colormap, baseUnit, toUnit);
|
|
174
|
+
const dataRange = [finalColormap[0], finalColormap[finalColormap.length - 2]];
|
|
175
|
+
const colormapBytes = _generateColormapBytes(finalColormap);
|
|
176
|
+
const colormapAsBase64 = fromByteArray(colormapBytes);
|
|
177
|
+
gridLayerRef.current.updateColormapTexture(colormapAsBase64);
|
|
178
|
+
cachedColormap.current = {
|
|
179
|
+
key: `${variable}-${units}`
|
|
180
|
+
};
|
|
181
|
+
cachedDataRange.current = dataRange;
|
|
182
|
+
setRenderProps({
|
|
183
|
+
opacity: state.opacity,
|
|
184
|
+
dataRange: dataRange
|
|
185
|
+
});
|
|
186
|
+
hasInitialLoad.current = true;
|
|
187
|
+
}
|
|
142
188
|
const allFrames = isMRMS ? availableTimestamps : availableHours;
|
|
143
189
|
if (!allFrames || allFrames.length === 0) {
|
|
144
190
|
console.warn('🟡 [preloadAllFramesToDisk] No frames available to download.');
|
|
145
191
|
return;
|
|
146
192
|
}
|
|
193
|
+
const currentFrame = isMRMS ? mrmsTimestamp : forecastHour;
|
|
194
|
+
const prioritizedFrames = [currentFrame, ...allFrames.filter(frame => frame !== currentFrame)];
|
|
195
|
+
console.log(`[Preload] Prioritizing frame: ${currentFrame}. Total frames: ${prioritizedFrames.length}`);
|
|
147
196
|
const {
|
|
148
197
|
corners,
|
|
149
198
|
gridDef
|
|
@@ -152,14 +201,10 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
152
201
|
nx,
|
|
153
202
|
ny
|
|
154
203
|
} = gridDef.grid_params;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
let errorCount = 0;
|
|
158
|
-
for (const frame of allFrames) {
|
|
159
|
-
const cacheKey = isMRMS ? `mrms-${frame}-${variable}-${units}` : `${model}-${date}-${run}-${frame}-${variable}-${units}`;
|
|
204
|
+
prioritizedFrames.forEach((frame, index) => {
|
|
205
|
+
const cacheKey = isMRMS ? `mrms-${frame}-${variable}` : `${model}-${date}-${run}-${frame}-${variable}`;
|
|
160
206
|
if (preloadedDataCache.current.has(cacheKey)) {
|
|
161
|
-
|
|
162
|
-
continue;
|
|
207
|
+
return; // Use 'return' here as it's a forEach loop
|
|
163
208
|
}
|
|
164
209
|
let resourcePath;
|
|
165
210
|
if (isMRMS) {
|
|
@@ -177,39 +222,97 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
177
222
|
apiKey: core.apiKey,
|
|
178
223
|
bundleId: core.bundleId
|
|
179
224
|
};
|
|
180
|
-
WeatherFrameProcessorModule.processFrame(options
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
console.warn(`⚠️ [preloadAllFramesToDisk] Failed frame ${frame}:`, error || "No filePath");
|
|
225
|
+
WeatherFrameProcessorModule.processFrame(options).then(result => {
|
|
226
|
+
if (!result || !result.filePath) {
|
|
227
|
+
console.warn(`⚠️ [preloadAllFramesToDisk] Failed frame ${frame}: No filePath`);
|
|
184
228
|
return;
|
|
185
229
|
}
|
|
186
|
-
|
|
187
|
-
|
|
230
|
+
const {
|
|
231
|
+
baseUnit
|
|
232
|
+
} = core._getColormapForVariable(variable);
|
|
233
|
+
const toUnit = core._getTargetUnit(baseUnit, units);
|
|
234
|
+
let dataScale = result.scale;
|
|
235
|
+
let dataOffset = result.offset;
|
|
236
|
+
|
|
237
|
+
// Calculate converted values for immediate use
|
|
238
|
+
let convertedScale = dataScale;
|
|
239
|
+
let convertedOffset = dataOffset;
|
|
240
|
+
if (baseUnit !== toUnit) {
|
|
241
|
+
const conversionFunc = getUnitConversionFunction(baseUnit, toUnit);
|
|
242
|
+
if (conversionFunc) {
|
|
243
|
+
if (result.scaleType === 'sqrt') {
|
|
244
|
+
const physicalAtOffset = dataOffset * dataOffset;
|
|
245
|
+
const physicalAtOffsetPlusScale = (dataOffset + dataScale) * (dataOffset + dataScale);
|
|
246
|
+
const convertedPhysicalAtOffset = conversionFunc(physicalAtOffset);
|
|
247
|
+
const convertedPhysicalAtOffsetPlusScale = conversionFunc(physicalAtOffsetPlusScale);
|
|
248
|
+
convertedOffset = Math.sqrt(Math.abs(convertedPhysicalAtOffset)) * Math.sign(convertedPhysicalAtOffset);
|
|
249
|
+
const newOffsetPlusScale = Math.sqrt(Math.abs(convertedPhysicalAtOffsetPlusScale)) * Math.sign(convertedPhysicalAtOffsetPlusScale);
|
|
250
|
+
convertedScale = newOffsetPlusScale - convertedOffset;
|
|
251
|
+
} else {
|
|
252
|
+
convertedOffset = conversionFunc(dataOffset);
|
|
253
|
+
const convertedOffsetPlusScale = conversionFunc(dataOffset + dataScale);
|
|
254
|
+
convertedScale = convertedOffsetPlusScale - convertedOffset;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Store with ORIGINAL values for unit conversion later
|
|
260
|
+
const frameData = {
|
|
188
261
|
filePath: result.filePath,
|
|
189
262
|
nx,
|
|
190
263
|
ny,
|
|
191
|
-
scale:
|
|
192
|
-
|
|
264
|
+
scale: convertedScale,
|
|
265
|
+
// Current converted values
|
|
266
|
+
offset: convertedOffset,
|
|
193
267
|
missing: result.missing,
|
|
194
268
|
corners,
|
|
195
269
|
gridDef,
|
|
196
270
|
scaleType: result.scaleType,
|
|
197
271
|
originalScale: result.scale,
|
|
198
|
-
//
|
|
199
|
-
originalOffset: result.offset //
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
console.log(`🎯 [
|
|
205
|
-
|
|
272
|
+
// CRITICAL: Always original
|
|
273
|
+
originalOffset: result.offset // CRITICAL: Always original
|
|
274
|
+
};
|
|
275
|
+
preloadedDataCache.current.set(cacheKey, frameData);
|
|
276
|
+
const isCurrentFrame = index === 0;
|
|
277
|
+
if (isCurrentFrame) {
|
|
278
|
+
console.log(`🎯 [Preload] Using FAST LANE to process and draw current frame (${frame}) immediately.`);
|
|
279
|
+
gridLayerRef.current.updateDataTextureFromFile(frameData.filePath, frameData.nx, frameData.ny, frameData.scale, frameData.offset, frameData.missing, frameData.scaleType);
|
|
280
|
+
currentGridDataRef.current = {
|
|
281
|
+
nx: frameData.nx,
|
|
282
|
+
ny: frameData.ny,
|
|
283
|
+
scale: frameData.scale,
|
|
284
|
+
offset: frameData.offset,
|
|
285
|
+
missing: frameData.missing,
|
|
286
|
+
gridDef: frameData.gridDef,
|
|
287
|
+
variable: variable,
|
|
288
|
+
units: units
|
|
289
|
+
};
|
|
290
|
+
} else {
|
|
291
|
+
if (Platform.OS === 'ios' && gridLayerRef.current.primeGpuCache) {
|
|
292
|
+
const frameInfoForGpu = {
|
|
293
|
+
[cacheKey]: {
|
|
294
|
+
filePath: frameData.filePath,
|
|
295
|
+
nx: frameData.nx,
|
|
296
|
+
ny: frameData.ny,
|
|
297
|
+
scale: frameData.scale,
|
|
298
|
+
// Current converted scale
|
|
299
|
+
offset: frameData.offset,
|
|
300
|
+
// Current converted offset
|
|
301
|
+
missing: frameData.missing,
|
|
302
|
+
scaleType: frameData.scaleType || 'linear',
|
|
303
|
+
originalScale: frameData.originalScale,
|
|
304
|
+
// ADD THIS
|
|
305
|
+
originalOffset: frameData.originalOffset // ADD THIS
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
gridLayerRef.current.primeGpuCache(frameInfoForGpu);
|
|
309
|
+
}
|
|
206
310
|
}
|
|
311
|
+
}).catch(error => {
|
|
312
|
+
console.warn(`⚠️ [preloadAllFramesToDisk] Failed frame ${frame}:`, error);
|
|
207
313
|
});
|
|
208
|
-
}
|
|
314
|
+
});
|
|
209
315
|
};
|
|
210
|
-
|
|
211
|
-
// In WeatherLayerManager.js - Add extensive logging throughout
|
|
212
|
-
|
|
213
316
|
const updateGPUWithCachedData = state => {
|
|
214
317
|
const {
|
|
215
318
|
model,
|
|
@@ -221,16 +324,41 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
221
324
|
isMRMS,
|
|
222
325
|
mrmsTimestamp
|
|
223
326
|
} = state;
|
|
224
|
-
const cacheKey = isMRMS ? `mrms-${mrmsTimestamp}-${variable}
|
|
327
|
+
const cacheKey = isMRMS ? `mrms-${mrmsTimestamp}-${variable}` : `${model}-${date}-${run}-${forecastHour}-${variable}`;
|
|
328
|
+
if (Platform.OS === 'ios' && gridLayerRef.current.setActiveFrame) {
|
|
329
|
+
// Get the cached data BEFORE calling setActiveFrame
|
|
330
|
+
const cachedData = preloadedDataCache.current.get(cacheKey);
|
|
331
|
+
if (cachedData) {
|
|
332
|
+
currentGridDataRef.current = {
|
|
333
|
+
nx: cachedData.nx,
|
|
334
|
+
ny: cachedData.ny,
|
|
335
|
+
scale: cachedData.scale,
|
|
336
|
+
offset: cachedData.offset,
|
|
337
|
+
missing: cachedData.missing,
|
|
338
|
+
gridDef: cachedData.gridDef,
|
|
339
|
+
variable: variable,
|
|
340
|
+
units: units,
|
|
341
|
+
scaleType: cachedData.scaleType
|
|
342
|
+
};
|
|
343
|
+
console.log('📱 [iOS] Updated currentGridDataRef for inspector:', {
|
|
344
|
+
scale: cachedData.scale,
|
|
345
|
+
offset: cachedData.offset,
|
|
346
|
+
scaleType: cachedData.scaleType // ADD THIS
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Now call setActiveFrame (which will async update the native cache)
|
|
351
|
+
gridLayerRef.current.setActiveFrame(cacheKey);
|
|
352
|
+
return true;
|
|
353
|
+
}
|
|
225
354
|
const cachedData = preloadedDataCache.current.get(cacheKey);
|
|
226
355
|
if (!cachedData) {
|
|
227
356
|
const timeKey = isMRMS ? `timestamp ${mrmsTimestamp}` : `hour +${forecastHour}`;
|
|
228
|
-
console.
|
|
229
|
-
console.error('❌ [updateGPUWithCachedData] Available keys:', Array.from(preloadedDataCache.current.keys()));
|
|
357
|
+
console.log(`⏳ [updateGPUWithCachedData] Frame not ready yet for ${timeKey}. Still preloading...`); // CHANGED
|
|
230
358
|
return false;
|
|
231
359
|
}
|
|
232
360
|
if (!gridLayerRef.current) {
|
|
233
|
-
console.
|
|
361
|
+
console.warn(`⚠️ [updateGPUWithCachedData] GridLayer ref not available`); // CHANGED
|
|
234
362
|
return false;
|
|
235
363
|
}
|
|
236
364
|
if (!cachedGeometry.current || cachedGeometry.current.model !== (isMRMS ? 'mrms' : model) || cachedGeometry.current.variable !== variable) {
|
|
@@ -336,8 +464,6 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
336
464
|
i,
|
|
337
465
|
j
|
|
338
466
|
} = gridIndices;
|
|
339
|
-
|
|
340
|
-
// The native module uses the cached scale/offset which we update via updateDataParameters
|
|
341
467
|
const value = await InspectorModule.getValueAtGridIndex(i, j);
|
|
342
468
|
if (value === null) {
|
|
343
469
|
return null;
|
|
@@ -347,10 +473,12 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
347
473
|
baseUnit
|
|
348
474
|
} = core._getColormapForVariable(core.state.variable);
|
|
349
475
|
const displayUnit = core._getTargetUnit(baseUnit, core.state.units);
|
|
350
|
-
|
|
351
|
-
// Get the converted colormap to check min threshold
|
|
352
476
|
const finalColormap = core._convertColormapUnits(colormap, baseUnit, displayUnit);
|
|
353
|
-
const minThreshold = finalColormap[0];
|
|
477
|
+
const minThreshold = finalColormap[0];
|
|
478
|
+
if (value < minThreshold) {
|
|
479
|
+
console.log('🔍 [Inspector] Rejected: below threshold'); // ADD THIS LOG
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
354
482
|
|
|
355
483
|
// Filter out values below the minimum threshold (matching shader behavior)
|
|
356
484
|
if (value < minThreshold) {
|
|
@@ -418,7 +546,7 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
418
546
|
run,
|
|
419
547
|
forecastHour
|
|
420
548
|
} = newState;
|
|
421
|
-
const oldCacheKey = isMRMS ? `mrms-${mrmsTimestamp}-${variable}
|
|
549
|
+
const oldCacheKey = isMRMS ? `mrms-${mrmsTimestamp}-${variable}` : `${model}-${date}-${run}-${forecastHour}-${variable}`;
|
|
422
550
|
const cachedData = preloadedDataCache.current.get(oldCacheKey);
|
|
423
551
|
if (cachedData && cachedData.originalScale !== undefined && cachedData.originalOffset !== undefined) {
|
|
424
552
|
const {
|
|
@@ -428,42 +556,83 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
428
556
|
let dataScale = cachedData.originalScale;
|
|
429
557
|
let dataOffset = cachedData.originalOffset;
|
|
430
558
|
if (baseUnit !== toUnit) {
|
|
431
|
-
const conversionFunc = getUnitConversionFunction(baseUnit, toUnit);
|
|
559
|
+
const conversionFunc = getUnitConversionFunction(baseUnit, toUnit);
|
|
560
|
+
console.log('🔧 [Unit Conversion] Conversion function exists:', !!conversionFunc);
|
|
432
561
|
if (conversionFunc) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
562
|
+
if (cachedData.scaleType === 'sqrt') {
|
|
563
|
+
// Calculate what the physical values would be at offset and offset+scale
|
|
564
|
+
const physicalAtOffset = dataOffset * dataOffset;
|
|
565
|
+
const physicalAtOffsetPlusScale = (dataOffset + dataScale) * (dataOffset + dataScale);
|
|
566
|
+
|
|
567
|
+
// Convert these physical values to the new unit
|
|
568
|
+
const convertedPhysicalAtOffset = conversionFunc(physicalAtOffset);
|
|
569
|
+
const convertedPhysicalAtOffsetPlusScale = conversionFunc(physicalAtOffsetPlusScale);
|
|
570
|
+
|
|
571
|
+
// Take sqrt to get back to intermediate values
|
|
572
|
+
const newOffset = Math.sqrt(Math.abs(convertedPhysicalAtOffset)) * Math.sign(convertedPhysicalAtOffset);
|
|
573
|
+
const newOffsetPlusScale = Math.sqrt(Math.abs(convertedPhysicalAtOffsetPlusScale)) * Math.sign(convertedPhysicalAtOffsetPlusScale);
|
|
574
|
+
dataScale = newOffsetPlusScale - newOffset;
|
|
575
|
+
dataOffset = newOffset;
|
|
576
|
+
} else {
|
|
577
|
+
const convertedOffset = conversionFunc(dataOffset);
|
|
578
|
+
const convertedOffsetPlusScale = conversionFunc(dataOffset + dataScale);
|
|
579
|
+
dataScale = convertedOffsetPlusScale - convertedOffset;
|
|
580
|
+
dataOffset = convertedOffset;
|
|
581
|
+
}
|
|
437
582
|
}
|
|
438
583
|
}
|
|
439
584
|
|
|
440
|
-
//
|
|
585
|
+
// Update the colormap AND data range
|
|
586
|
+
const {
|
|
587
|
+
colormap
|
|
588
|
+
} = core._getColormapForVariable(variable);
|
|
589
|
+
const finalColormap = core._convertColormapUnits(colormap, baseUnit, toUnit);
|
|
590
|
+
const dataRange = [finalColormap[0], finalColormap[finalColormap.length - 2]];
|
|
591
|
+
const colormapBytes = _generateColormapBytes(finalColormap);
|
|
592
|
+
const colormapAsBase64 = fromByteArray(colormapBytes);
|
|
593
|
+
gridLayerRef.current.updateColormapTexture(colormapAsBase64);
|
|
594
|
+
cachedColormap.current = {
|
|
595
|
+
key: `${variable}-${units}`
|
|
596
|
+
};
|
|
597
|
+
cachedDataRange.current = dataRange;
|
|
598
|
+
setRenderProps(prev => ({
|
|
599
|
+
...prev,
|
|
600
|
+
dataRange,
|
|
601
|
+
opacity: newState.opacity
|
|
602
|
+
}));
|
|
441
603
|
if (gridLayerRef.current && gridLayerRef.current.updateDataParameters) {
|
|
442
|
-
|
|
443
|
-
}
|
|
604
|
+
const scaleTypeValue = cachedData.scaleType === 'sqrt' ? 1 : 0; // Convert to number
|
|
444
605
|
|
|
445
|
-
|
|
446
|
-
|
|
606
|
+
console.log('🔄 [Unit Conversion] Calling updateDataParameters with:', {
|
|
607
|
+
scale: dataScale,
|
|
608
|
+
offset: dataOffset,
|
|
609
|
+
missing: cachedData.missing,
|
|
610
|
+
scaleType: scaleTypeValue
|
|
611
|
+
});
|
|
612
|
+
gridLayerRef.current.updateDataParameters(dataScale, dataOffset, cachedData.missing, scaleTypeValue); // Pass scaleType
|
|
613
|
+
}
|
|
614
|
+
const newCacheKey = isMRMS ? `mrms-${mrmsTimestamp}-${variable}` : `${model}-${date}-${run}-${forecastHour}-${variable}`;
|
|
447
615
|
preloadedDataCache.current.set(newCacheKey, {
|
|
448
616
|
...cachedData,
|
|
449
617
|
scale: dataScale,
|
|
450
618
|
offset: dataOffset
|
|
451
619
|
});
|
|
620
|
+
} else {
|
|
621
|
+
console.warn('⚠️ [Unit Conversion] No cached data found for key:', oldCacheKey);
|
|
452
622
|
}
|
|
453
623
|
previousStateRef.current = newState;
|
|
454
|
-
if (newState.opacity !== renderProps.opacity) {
|
|
455
|
-
setRenderProps(prev => ({
|
|
456
|
-
...prev,
|
|
457
|
-
opacity: newState.opacity
|
|
458
|
-
}));
|
|
459
|
-
}
|
|
460
624
|
return;
|
|
461
625
|
}
|
|
462
626
|
const needsFullLoad = !hasInitialLoad.current || newState.model !== previousStateRef.current.model || newState.isMRMS !== previousStateRef.current.isMRMS || newState.variable !== previousStateRef.current.variable || newState.date !== previousStateRef.current.date || newState.run !== previousStateRef.current.run;
|
|
463
627
|
if (needsFullLoad) {
|
|
464
628
|
if (gridLayerRef.current) {
|
|
465
629
|
gridLayerRef.current.clear();
|
|
630
|
+
// --- OPTIMIZATION: Clear the native GPU cache on iOS ---
|
|
631
|
+
if (Platform.OS === 'ios' && gridLayerRef.current.clearGpuCache) {
|
|
632
|
+
gridLayerRef.current.clearGpuCache();
|
|
633
|
+
}
|
|
466
634
|
}
|
|
635
|
+
hasPreloadedRef.current = false;
|
|
467
636
|
preloadedDataCache.current.clear();
|
|
468
637
|
cachedGeometry.current = null;
|
|
469
638
|
cachedColormap.current = null;
|
|
@@ -475,166 +644,23 @@ export const WeatherLayerManager = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
475
644
|
previousStateRef.current = newState;
|
|
476
645
|
return;
|
|
477
646
|
}
|
|
478
|
-
|
|
479
|
-
const {
|
|
480
|
-
model,
|
|
481
|
-
date,
|
|
482
|
-
run,
|
|
483
|
-
forecastHour,
|
|
484
|
-
variable,
|
|
485
|
-
units,
|
|
486
|
-
isMRMS,
|
|
487
|
-
mrmsTimestamp
|
|
488
|
-
} = newState;
|
|
489
|
-
const gridModel = isMRMS ? 'mrms' : model;
|
|
490
|
-
const {
|
|
491
|
-
corners,
|
|
492
|
-
gridDef
|
|
493
|
-
} = core._getGridCornersAndDef(gridModel);
|
|
494
|
-
const {
|
|
495
|
-
nx,
|
|
496
|
-
ny
|
|
497
|
-
} = gridDef.grid_params;
|
|
498
|
-
let resourcePath;
|
|
499
|
-
if (isMRMS) {
|
|
500
|
-
if (!mrmsTimestamp) {
|
|
501
|
-
previousStateRef.current = newState;
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
const mrmsDate = new Date(mrmsTimestamp * 1000);
|
|
505
|
-
const y = mrmsDate.getUTCFullYear();
|
|
506
|
-
const m = (mrmsDate.getUTCMonth() + 1).toString().padStart(2, '0');
|
|
507
|
-
const d = mrmsDate.getUTCDate().toString().padStart(2, '0');
|
|
508
|
-
resourcePath = `/grids/mrms/${y}${m}${d}/${mrmsTimestamp}/0/${variable}/0`;
|
|
509
|
-
} else {
|
|
510
|
-
resourcePath = `/grids/${model}/${date}/${run}/${forecastHour}/${variable}/0`;
|
|
511
|
-
}
|
|
512
|
-
const url = `${core.baseGridUrl}${resourcePath}?apiKey=${core.apiKey}`;
|
|
513
|
-
const options = {
|
|
514
|
-
url,
|
|
515
|
-
apiKey: core.apiKey,
|
|
516
|
-
bundleId: core.bundleId
|
|
517
|
-
};
|
|
518
|
-
const result = await new Promise((resolve, reject) => {
|
|
519
|
-
WeatherFrameProcessorModule.processFrame(options, (error, res) => {
|
|
520
|
-
if (error) {
|
|
521
|
-
resolve(null);
|
|
522
|
-
} else {
|
|
523
|
-
resolve(res);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
if (!result) {
|
|
528
|
-
hasInitialLoad.current = true;
|
|
529
|
-
previousStateRef.current = newState;
|
|
530
|
-
preloadAllFramesToDisk(newState);
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
if (result && gridLayerRef.current) {
|
|
534
|
-
gridLayerRef.current.updateGeometry(corners, gridDef);
|
|
535
|
-
cachedGeometry.current = {
|
|
536
|
-
model: gridModel,
|
|
537
|
-
variable
|
|
538
|
-
};
|
|
539
|
-
const {
|
|
540
|
-
colormap,
|
|
541
|
-
baseUnit
|
|
542
|
-
} = core._getColormapForVariable(variable);
|
|
543
|
-
const toUnit = core._getTargetUnit(baseUnit, units);
|
|
544
|
-
let dataScale = result.scale;
|
|
545
|
-
let dataOffset = result.offset;
|
|
546
|
-
|
|
547
|
-
// Store original scale/offset for unit conversion later
|
|
548
|
-
const originalScale = result.scale;
|
|
549
|
-
const originalOffset = result.offset;
|
|
550
|
-
if (baseUnit !== toUnit) {
|
|
551
|
-
const conversionFunc = getUnitConversionFunction(baseUnit, toUnit);
|
|
552
|
-
if (conversionFunc) {
|
|
553
|
-
const convertedOffset = conversionFunc(dataOffset);
|
|
554
|
-
const convertedOffsetPlusScale = conversionFunc(dataOffset + dataScale);
|
|
555
|
-
dataScale = convertedOffsetPlusScale - convertedOffset;
|
|
556
|
-
dataOffset = convertedOffset;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
if (result.dataAsBase64) {
|
|
560
|
-
const binaryString = atob(result.dataAsBase64);
|
|
561
|
-
const uint8Array = new Uint8Array(binaryString.length);
|
|
562
|
-
for (let i = 0; i < binaryString.length; i++) {
|
|
563
|
-
uint8Array[i] = binaryString.charCodeAt(i);
|
|
564
|
-
}
|
|
565
|
-
currentGridDataRef.current = {
|
|
566
|
-
data: uint8Array,
|
|
567
|
-
nx,
|
|
568
|
-
ny,
|
|
569
|
-
scale: dataScale,
|
|
570
|
-
offset: dataOffset,
|
|
571
|
-
missing: result.missing,
|
|
572
|
-
gridDef: gridDef,
|
|
573
|
-
variable: variable,
|
|
574
|
-
units: units
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
// Now upload to GPU
|
|
579
|
-
if (result.filePath) {
|
|
580
|
-
gridLayerRef.current.updateDataTextureFromFile(result.filePath, nx, ny, dataScale, dataOffset, result.missing, result.scaleType);
|
|
581
|
-
} else if (result.dataAsBase64) {
|
|
582
|
-
gridLayerRef.current.updateDataTexture(result.dataAsBase64, nx, ny, dataScale, dataOffset, result.missing, result.scaleType);
|
|
583
|
-
}
|
|
584
|
-
const finalColormap = core._convertColormapUnits(colormap, baseUnit, toUnit);
|
|
585
|
-
const dataRange = [finalColormap[0], finalColormap[finalColormap.length - 2]];
|
|
586
|
-
const colormapBytes = _generateColormapBytes(finalColormap);
|
|
587
|
-
const colormapAsBase64 = fromByteArray(colormapBytes);
|
|
588
|
-
gridLayerRef.current.updateColormapTexture(colormapAsBase64);
|
|
589
|
-
cachedColormap.current = {
|
|
590
|
-
key: `${variable}-${units}`
|
|
591
|
-
};
|
|
592
|
-
cachedDataRange.current = dataRange;
|
|
593
|
-
setRenderProps({
|
|
594
|
-
opacity: newState.opacity,
|
|
595
|
-
dataRange: dataRange
|
|
596
|
-
});
|
|
597
|
-
hasInitialLoad.current = true;
|
|
598
|
-
const cacheKey = isMRMS ? `mrms-${mrmsTimestamp}-${variable}-${units}` : `${model}-${date}-${run}-${forecastHour}-${variable}-${units}`;
|
|
599
|
-
const dataToCache = {
|
|
600
|
-
nx,
|
|
601
|
-
ny,
|
|
602
|
-
scale: dataScale,
|
|
603
|
-
offset: dataOffset,
|
|
604
|
-
originalScale: originalScale,
|
|
605
|
-
// Store original for unit conversion
|
|
606
|
-
originalOffset: originalOffset,
|
|
607
|
-
// Store original for unit conversion
|
|
608
|
-
missing: result.missing,
|
|
609
|
-
corners,
|
|
610
|
-
gridDef
|
|
611
|
-
};
|
|
612
|
-
if (result.filePath) dataToCache.filePath = result.filePath;
|
|
613
|
-
if (result.dataAsBase64) dataToCache.dataAsBase64 = result.dataAsBase64;
|
|
614
|
-
if (result.scaleType) dataToCache.scaleType = result.scaleType;
|
|
615
|
-
preloadedDataCache.current.set(cacheKey, dataToCache);
|
|
616
|
-
preloadAllFramesToDisk(newState);
|
|
617
|
-
}
|
|
618
|
-
} catch (error) {
|
|
619
|
-
console.error("❌❌❌ [handleStateChange] CRITICAL ERROR:", error);
|
|
620
|
-
console.error("❌ [handleStateChange] Stack:", error.stack);
|
|
621
|
-
}
|
|
647
|
+
preloadAllFramesToDisk(newState);
|
|
622
648
|
} else if (newState.forecastHour !== previousStateRef.current.forecastHour || newState.isMRMS && newState.mrmsTimestamp !== previousStateRef.current.mrmsTimestamp) {
|
|
623
649
|
const success = updateGPUWithCachedData(newState);
|
|
624
650
|
if (!success) {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
651
|
+
// CHANGED: Don't error, just log and wait for preload
|
|
652
|
+
const timeKey = newState.isMRMS ? `timestamp ${newState.mrmsTimestamp}` : `hour +${newState.forecastHour}`;
|
|
653
|
+
console.log(`⏳ [handleStateChange] Frame ${timeKey} not ready yet, waiting for preload...`);
|
|
654
|
+
// Don't clear the layer - keep showing the previous frame until new one is ready
|
|
655
|
+
// The preload will eventually complete and trigger a re-render
|
|
656
|
+
} else {
|
|
657
|
+
// Only update inspector cache when we successfully loaded new data
|
|
658
|
+
if (newState.opacity !== renderProps.opacity) {
|
|
659
|
+
setRenderProps(prev => ({
|
|
660
|
+
...prev,
|
|
661
|
+
opacity: newState.opacity
|
|
662
|
+
}));
|
|
630
663
|
}
|
|
631
|
-
currentGridDataRef.current = null; // ADD THIS LINE - Clear inspector cache when no data
|
|
632
|
-
}
|
|
633
|
-
if (newState.opacity !== renderProps.opacity) {
|
|
634
|
-
setRenderProps(prev => ({
|
|
635
|
-
...prev,
|
|
636
|
-
opacity: newState.opacity
|
|
637
|
-
}));
|
|
638
664
|
}
|
|
639
665
|
}
|
|
640
666
|
previousStateRef.current = newState;
|