@aguacerowx/react-native 0.0.17 → 0.0.19
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/README.md +126 -60
- package/aguacerowx-react-native.podspec +53 -35
- package/android/build/.transforms/42e9b8fa82d77a1c205db5bf0d0ed519/results.bin +1 -0
- package/android/build/.transforms/42e9b8fa82d77a1c205db5bf0d0ed519/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/results.bin +1 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/AguaceroPackage.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/BuildConfig.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayerView.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderManager.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/InspectorModule.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/ShaderUtils.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/WeatherFrameProcessorModule.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.dex +0 -0
- package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -0
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.java +43 -0
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.java +22 -0
- package/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec-generated.cpp +22 -0
- package/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec.h +24 -0
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI-generated.cpp +17 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI.h +19 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.h +24 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.cpp +16 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.h +23 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.cpp +62 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.h +40 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.cpp +17 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.h +32 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.cpp +16 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.h +20 -0
- package/android/build/generated/source/codegen/schema.json +1 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +8 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +4 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +5 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +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/GridRenderManager.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/ShaderUtils.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +6 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +8 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +8 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +13 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +13 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +152 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +20 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.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/GridRenderManager.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/ShaderUtils.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_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +5 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer$VertexInfo.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +107 -83
- package/android/src/main/AndroidManifest.xml +6 -6
- package/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +33 -33
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +657 -611
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +304 -299
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +125 -117
- package/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +71 -71
- package/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +106 -106
- package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +151 -151
- package/android/src/main/res/raw/debug_fragment_shader.glsl +12 -12
- package/android/src/main/res/raw/debug_vertex_shader.glsl +12 -12
- package/android/src/main/res/raw/fragment_shader.glsl +151 -97
- package/android/src/main/res/raw/vertex_shader.glsl +19 -19
- package/index.js +2 -2
- package/ios/AguaceroPackage.m +18 -18
- package/ios/FragmentUniforms.swift +14 -13
- package/ios/GridRenderLayer.swift +995 -962
- package/ios/GridRenderLayerBridge.swift +29 -29
- package/ios/GridRenderLayerManager.mm +157 -145
- package/ios/GridRenderLayerView.h +16 -22
- package/ios/GridRenderLayerView.m +205 -199
- package/ios/InspectorDataCache.swift +65 -65
- package/ios/InspectorModule.m +9 -9
- package/ios/InspectorModule.swift +63 -63
- package/ios/Shaders.metal +178 -130
- package/ios/WeatherFrameProcessorModule.m +15 -15
- package/ios/WeatherFrameProcessorModule.swift +103 -103
- package/ios/compiled-shaders/Shaders-device.metallib +0 -0
- package/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
- package/ios/compiled-shaders/Shaders.metallib +0 -0
- package/lib/commonjs/README.md +126 -60
- package/lib/commonjs/aguacerowx-react-native.podspec +53 -35
- package/lib/commonjs/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -0
- package/lib/commonjs/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.java +43 -0
- package/lib/commonjs/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.java +22 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec-generated.cpp +22 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec.h +24 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI-generated.cpp +17 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI.h +19 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.h +24 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.cpp +16 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.h +23 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.cpp +62 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.h +40 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.cpp +17 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.h +32 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.cpp +16 -0
- package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.h +20 -0
- package/lib/commonjs/android/build/generated/source/codegen/schema.json +1 -0
- package/lib/commonjs/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +8 -0
- package/lib/commonjs/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/lib/commonjs/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/lib/commonjs/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/lib/commonjs/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/lib/commonjs/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/lib/commonjs/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +4 -0
- package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
- package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
- package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
- package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
- package/lib/commonjs/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +5 -0
- package/lib/commonjs/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/lib/commonjs/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/lib/commonjs/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/lib/commonjs/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +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/GridRenderManager.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/ShaderUtils.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/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
- package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
- package/lib/commonjs/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +6 -0
- package/lib/commonjs/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +8 -0
- package/lib/commonjs/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +8 -0
- package/lib/commonjs/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/lib/commonjs/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +13 -0
- package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +13 -0
- package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +152 -0
- package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +20 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.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/GridRenderManager.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/ShaderUtils.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_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
- package/lib/commonjs/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/lib/commonjs/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +5 -0
- package/lib/commonjs/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer$VertexInfo.class.uniqueId0 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer.class.uniqueId1 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/commonjs/android/build.gradle +107 -83
- package/lib/commonjs/android/src/main/AndroidManifest.xml +6 -6
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +33 -33
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +657 -611
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +304 -299
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +125 -117
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +71 -71
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +106 -106
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +151 -151
- package/lib/commonjs/android/src/main/res/raw/debug_fragment_shader.glsl +12 -12
- package/lib/commonjs/android/src/main/res/raw/debug_vertex_shader.glsl +12 -12
- package/lib/commonjs/android/src/main/res/raw/fragment_shader.glsl +151 -97
- package/lib/commonjs/android/src/main/res/raw/vertex_shader.glsl +19 -19
- package/lib/commonjs/babel.config.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ios/AguaceroPackage.m +18 -18
- package/lib/commonjs/ios/FragmentUniforms.swift +14 -13
- package/lib/commonjs/ios/GridRenderLayer.swift +995 -962
- package/lib/commonjs/ios/GridRenderLayerBridge.swift +29 -29
- package/lib/commonjs/ios/GridRenderLayerManager.mm +157 -145
- package/lib/commonjs/ios/GridRenderLayerView.h +16 -22
- package/lib/commonjs/ios/GridRenderLayerView.m +205 -199
- package/lib/commonjs/ios/InspectorDataCache.swift +65 -65
- package/lib/commonjs/ios/InspectorModule.m +9 -9
- package/lib/commonjs/ios/InspectorModule.swift +63 -63
- package/lib/commonjs/ios/Shaders.metal +178 -130
- package/lib/commonjs/ios/WeatherFrameProcessorModule.m +15 -15
- package/lib/commonjs/ios/WeatherFrameProcessorModule.swift +103 -103
- package/lib/commonjs/ios/compiled-shaders/Shaders-device.metallib +0 -0
- package/lib/commonjs/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
- package/lib/commonjs/ios/compiled-shaders/Shaders.metallib +0 -0
- package/lib/commonjs/package.json +72 -67
- package/lib/commonjs/react-native-builder-bob.config.js.map +1 -1
- package/lib/commonjs/scripts/compile-shaders.js +62 -0
- package/lib/commonjs/scripts/compile-shaders.js.map +1 -0
- package/lib/commonjs/scripts/compile-shaders.sh +39 -0
- package/lib/commonjs/src/AguaceroContext.js.map +1 -1
- package/lib/commonjs/src/GridRenderLayer.js +8 -0
- package/lib/commonjs/src/GridRenderLayer.js.map +1 -1
- package/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/src/MapManager.js.map +1 -1
- package/lib/commonjs/src/MapRegistry.js.map +1 -1
- package/lib/commonjs/src/StyleApplicator.js +6 -6
- package/lib/commonjs/src/StyleApplicator.js.map +1 -1
- package/lib/commonjs/src/WeatherLayerManager.js +26 -16
- package/lib/commonjs/src/WeatherLayerManager.js.map +1 -1
- package/lib/commonjs/tsconfig.json +23 -23
- package/lib/module/README.md +126 -60
- package/lib/module/aguacerowx-react-native.podspec +53 -35
- package/lib/module/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -0
- package/lib/module/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.java +43 -0
- package/lib/module/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.java +22 -0
- package/lib/module/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec-generated.cpp +22 -0
- package/lib/module/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec.h +24 -0
- package/lib/module/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI-generated.cpp +17 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI.h +19 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.h +24 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.cpp +16 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.h +23 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.cpp +62 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.h +40 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.cpp +17 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.h +32 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.cpp +16 -0
- package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.h +20 -0
- package/lib/module/android/build/generated/source/codegen/schema.json +1 -0
- package/lib/module/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +8 -0
- package/lib/module/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/lib/module/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/lib/module/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/lib/module/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/lib/module/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/lib/module/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +4 -0
- package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
- package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
- package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
- package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
- package/lib/module/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +5 -0
- package/lib/module/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/lib/module/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/lib/module/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/lib/module/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +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/GridRenderManager.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/ShaderUtils.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/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
- package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
- package/lib/module/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +6 -0
- package/lib/module/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +8 -0
- package/lib/module/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +8 -0
- package/lib/module/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/lib/module/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +13 -0
- package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +13 -0
- package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +152 -0
- package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +20 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.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/GridRenderManager.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/ShaderUtils.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_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
- package/lib/module/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/lib/module/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +5 -0
- package/lib/module/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer$VertexInfo.class.uniqueId0 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer.class.uniqueId1 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/module/android/build.gradle +107 -83
- package/lib/module/android/src/main/AndroidManifest.xml +6 -6
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +33 -33
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +657 -611
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +304 -299
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +125 -117
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +71 -71
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +106 -106
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +151 -151
- package/lib/module/android/src/main/res/raw/debug_fragment_shader.glsl +12 -12
- package/lib/module/android/src/main/res/raw/debug_vertex_shader.glsl +12 -12
- package/lib/module/android/src/main/res/raw/fragment_shader.glsl +151 -97
- package/lib/module/android/src/main/res/raw/vertex_shader.glsl +19 -19
- package/lib/module/babel.config.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ios/AguaceroPackage.m +18 -18
- package/lib/module/ios/FragmentUniforms.swift +14 -13
- package/lib/module/ios/GridRenderLayer.swift +995 -962
- package/lib/module/ios/GridRenderLayerBridge.swift +29 -29
- package/lib/module/ios/GridRenderLayerManager.mm +157 -145
- package/lib/module/ios/GridRenderLayerView.h +16 -22
- package/lib/module/ios/GridRenderLayerView.m +205 -199
- package/lib/module/ios/InspectorDataCache.swift +65 -65
- package/lib/module/ios/InspectorModule.m +9 -9
- package/lib/module/ios/InspectorModule.swift +63 -63
- package/lib/module/ios/Shaders.metal +178 -130
- package/lib/module/ios/WeatherFrameProcessorModule.m +15 -15
- package/lib/module/ios/WeatherFrameProcessorModule.swift +103 -103
- package/lib/module/ios/compiled-shaders/Shaders-device.metallib +0 -0
- package/lib/module/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
- package/lib/module/ios/compiled-shaders/Shaders.metallib +0 -0
- package/lib/module/lib/commonjs/README.md +126 -60
- package/lib/module/lib/commonjs/aguacerowx-react-native.podspec +53 -35
- package/lib/module/lib/commonjs/android/build.gradle +107 -83
- package/lib/module/lib/commonjs/android/src/main/AndroidManifest.xml +6 -6
- package/lib/module/lib/commonjs/babel.config.js.map +1 -1
- package/lib/module/lib/commonjs/index.js.map +1 -1
- package/lib/module/lib/commonjs/ios/AguaceroPackage.m +18 -18
- package/lib/module/lib/commonjs/ios/FragmentUniforms.swift +14 -13
- package/lib/module/lib/commonjs/ios/GridRenderLayer.swift +995 -962
- package/lib/module/lib/commonjs/ios/GridRenderLayerBridge.swift +29 -29
- package/lib/module/lib/commonjs/ios/GridRenderLayerManager.mm +157 -145
- package/lib/module/lib/commonjs/ios/GridRenderLayerView.h +16 -22
- package/lib/module/lib/commonjs/ios/GridRenderLayerView.m +205 -199
- package/lib/module/lib/commonjs/ios/InspectorDataCache.swift +65 -65
- package/lib/module/lib/commonjs/ios/InspectorModule.m +9 -9
- package/lib/module/lib/commonjs/ios/InspectorModule.swift +63 -63
- package/lib/module/lib/commonjs/ios/Shaders.metal +178 -130
- package/lib/module/lib/commonjs/ios/WeatherFrameProcessorModule.m +15 -15
- package/lib/module/lib/commonjs/ios/WeatherFrameProcessorModule.swift +103 -103
- package/lib/module/lib/commonjs/ios/compiled-shaders/Shaders-device.metallib +0 -0
- package/lib/module/lib/commonjs/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
- package/lib/module/lib/commonjs/ios/compiled-shaders/Shaders.metallib +0 -0
- package/lib/module/lib/commonjs/package.json +72 -67
- package/lib/module/lib/commonjs/react-native-builder-bob.config.js.map +1 -1
- package/lib/module/lib/commonjs/scripts/compile-shaders.js +62 -0
- package/lib/module/lib/commonjs/scripts/compile-shaders.js.map +1 -0
- package/lib/module/lib/commonjs/scripts/compile-shaders.sh +39 -0
- package/lib/module/lib/commonjs/src/AguaceroContext.js.map +1 -1
- package/lib/module/lib/commonjs/src/GridRenderLayer.js +8 -0
- package/lib/module/lib/commonjs/src/GridRenderLayer.js.map +1 -1
- package/lib/module/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -1
- package/lib/module/lib/commonjs/src/MapManager.js.map +1 -1
- package/lib/module/lib/commonjs/src/MapRegistry.js.map +1 -1
- package/lib/module/lib/commonjs/src/StyleApplicator.js +6 -6
- package/lib/module/lib/commonjs/src/StyleApplicator.js.map +1 -1
- package/lib/module/lib/commonjs/src/WeatherLayerManager.js +26 -16
- package/lib/module/lib/commonjs/src/WeatherLayerManager.js.map +1 -1
- package/lib/module/lib/commonjs/tsconfig.json +23 -23
- package/lib/module/package.json +72 -67
- package/lib/module/react-native-builder-bob.config.js.map +1 -1
- package/lib/module/scripts/compile-shaders.js +60 -0
- package/lib/module/scripts/compile-shaders.js.map +1 -0
- package/lib/module/scripts/compile-shaders.sh +39 -0
- package/lib/module/src/AguaceroContext.js.map +1 -1
- package/lib/module/src/GridRenderLayer.js +8 -0
- package/lib/module/src/GridRenderLayer.js.map +1 -1
- package/lib/module/src/GridRenderLayerNativeComponent.js.map +1 -1
- package/lib/module/src/MapManager.js.map +1 -1
- package/lib/module/src/MapRegistry.js.map +1 -1
- package/lib/module/src/StyleApplicator.js +6 -6
- package/lib/module/src/StyleApplicator.js.map +1 -1
- package/lib/module/src/WeatherLayerManager.js +26 -16
- package/lib/module/src/WeatherLayerManager.js.map +1 -1
- package/lib/module/tsconfig.json +23 -23
- package/lib/typescript/scripts/compile-shaders.d.ts +3 -0
- package/lib/typescript/scripts/compile-shaders.d.ts.map +1 -0
- package/lib/typescript/src/GridRenderLayer.d.ts.map +1 -1
- package/lib/typescript/src/WeatherLayerManager.d.ts.map +1 -1
- package/package.json +72 -67
- package/src/AguaceroContext.js +3 -3
- package/src/GridRenderLayer.js +217 -204
- package/src/GridRenderLayerNativeComponent.ts +15 -15
- package/src/MapManager.js +155 -155
- package/src/MapRegistry.js +34 -34
- package/src/StyleApplicator.js +240 -240
- package/src/WeatherLayerManager.js +891 -872
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js +0 -1003
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js +0 -381
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js +0 -1229
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js +0 -4023
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js +0 -38
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js +0 -30
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js +0 -27
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js +0 -47
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js +0 -301
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js +0 -126
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/package.json +0 -48
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js +0 -1029
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js +0 -381
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js +0 -1229
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js +0 -4023
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js +0 -38
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js +0 -30
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js +0 -27
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js +0 -41
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js +0 -301
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js.map +0 -1
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js +0 -126
- package/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js +0 -1003
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js +0 -381
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js +0 -1229
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js +0 -4023
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js +0 -38
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/events.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js +0 -30
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js +0 -27
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js +0 -47
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/index.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js +0 -301
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js +0 -126
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/package.json +0 -48
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js +0 -1033
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js +0 -381
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js +0 -1229
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js +0 -4023
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js +0 -38
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/events.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js +0 -30
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js +0 -27
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js +0 -41
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/index.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js +0 -301
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js.map +0 -1
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js +0 -126
- package/lib/module/lib/commonjs/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js +0 -1003
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/AguaceroCore.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js +0 -381
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/coordinate_configs.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js +0 -1229
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/default-colormaps.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js +0 -4023
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/dictionaries.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/events.js +0 -38
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/events.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js +0 -30
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/fill-layer-worker.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js +0 -27
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/getBundleId.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/index.js +0 -47
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/index.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js +0 -301
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/map-styles.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js +0 -126
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/dist/unitConversions.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/package.json +0 -48
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js +0 -1021
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/AguaceroCore.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js +0 -375
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/coordinate_configs.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js +0 -1223
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/default-colormaps.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js +0 -4017
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/dictionaries.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/events.js +0 -31
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/events.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js +0 -29
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/fill-layer-worker.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js +0 -21
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/getBundleId.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/index.js +0 -12
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/index.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js +0 -295
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/map-styles.js.map +0 -1
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js +0 -119
- package/lib/module/node_modules/@aguacerowx/javascript-sdk/src/unitConversions.js.map +0 -1
|
@@ -1,1021 +0,0 @@
|
|
|
1
|
-
// AguaceroCore.js - The Headless "Engine"
|
|
2
|
-
|
|
3
|
-
// --- Non-UI Imports ---
|
|
4
|
-
import { EventEmitter } from './events.js';
|
|
5
|
-
import { COORDINATE_CONFIGS } from './coordinate_configs.js';
|
|
6
|
-
import { getUnitConversionFunction } from './unitConversions.js';
|
|
7
|
-
import { DICTIONARIES, MODEL_CONFIGS } from './dictionaries.js';
|
|
8
|
-
import { DEFAULT_COLORMAPS } from './default-colormaps.js';
|
|
9
|
-
import proj4 from 'proj4';
|
|
10
|
-
import { getBundleId } from './getBundleId';
|
|
11
|
-
|
|
12
|
-
// --- Non-UI Helper Functions ---
|
|
13
|
-
function hrdpsObliqueTransform(rotated_lon, rotated_lat) {
|
|
14
|
-
const o_lat_p = 53.91148;
|
|
15
|
-
const o_lon_p = 245.305142;
|
|
16
|
-
const DEG_TO_RAD = Math.PI / 180.0;
|
|
17
|
-
const RAD_TO_DEG = 180.0 / Math.PI;
|
|
18
|
-
const o_lat_p_rad = o_lat_p * DEG_TO_RAD;
|
|
19
|
-
const rot_lon_rad = rotated_lon * DEG_TO_RAD;
|
|
20
|
-
const rot_lat_rad = rotated_lat * DEG_TO_RAD;
|
|
21
|
-
const sin_rot_lat = Math.sin(rot_lat_rad);
|
|
22
|
-
const cos_rot_lat = Math.cos(rot_lat_rad);
|
|
23
|
-
const sin_rot_lon = Math.sin(rot_lon_rad);
|
|
24
|
-
const cos_rot_lon = Math.cos(rot_lon_rad);
|
|
25
|
-
const sin_o_lat_p = Math.sin(o_lat_p_rad);
|
|
26
|
-
const cos_o_lat_p = Math.cos(o_lat_p_rad);
|
|
27
|
-
const sin_lat = cos_o_lat_p * sin_rot_lat + sin_o_lat_p * cos_rot_lat * cos_rot_lon;
|
|
28
|
-
let lat = Math.asin(sin_lat) * RAD_TO_DEG;
|
|
29
|
-
const sin_lon_num = cos_rot_lat * sin_rot_lon;
|
|
30
|
-
const sin_lon_den = -sin_o_lat_p * sin_rot_lat + cos_o_lat_p * cos_rot_lat * cos_rot_lon;
|
|
31
|
-
let lon = Math.atan2(sin_lon_num, sin_lon_den) * RAD_TO_DEG + o_lon_p;
|
|
32
|
-
if (lon > 180) lon -= 360;else if (lon < -180) lon += 360;
|
|
33
|
-
return [lon, lat];
|
|
34
|
-
}
|
|
35
|
-
function findLatestModelRun(modelsData, modelName) {
|
|
36
|
-
const model = modelsData?.[modelName];
|
|
37
|
-
if (!model) return null;
|
|
38
|
-
const availableDates = Object.keys(model).sort((a, b) => b.localeCompare(a));
|
|
39
|
-
for (const date of availableDates) {
|
|
40
|
-
const runs = model[date];
|
|
41
|
-
if (!runs) continue;
|
|
42
|
-
const availableRuns = Object.keys(runs).sort((a, b) => b.localeCompare(a));
|
|
43
|
-
if (availableRuns.length > 0) return {
|
|
44
|
-
date: date,
|
|
45
|
-
run: availableRuns[0]
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
export class AguaceroCore extends EventEmitter {
|
|
51
|
-
constructor(options = {}) {
|
|
52
|
-
super();
|
|
53
|
-
this.isReactNative = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
|
54
|
-
this.apiKey = options.apiKey;
|
|
55
|
-
this.bundleId = getBundleId();
|
|
56
|
-
this.baseGridUrl = 'https://d3dc62msmxkrd7.cloudfront.net';
|
|
57
|
-
if (!this.isReactNative) {
|
|
58
|
-
this.worker = this.createWorker();
|
|
59
|
-
this.workerRequestId = 0;
|
|
60
|
-
this.workerResolvers = new Map();
|
|
61
|
-
this.worker.addEventListener('message', this._handleWorkerMessage.bind(this));
|
|
62
|
-
this.resultQueue = [];
|
|
63
|
-
this.isProcessingQueue = false;
|
|
64
|
-
} else {
|
|
65
|
-
this.worker = null;
|
|
66
|
-
}
|
|
67
|
-
this.statusUrl = 'https://d3dc62msmxkrd7.cloudfront.net/model-status';
|
|
68
|
-
this.modelStatus = null;
|
|
69
|
-
this.mrmsStatus = null;
|
|
70
|
-
this.dataCache = new Map();
|
|
71
|
-
this.abortControllers = new Map();
|
|
72
|
-
this.isPlaying = false;
|
|
73
|
-
this.playIntervalId = null;
|
|
74
|
-
this.playbackSpeed = options.playbackSpeed || 500;
|
|
75
|
-
this.customColormaps = options.customColormaps || {};
|
|
76
|
-
const userLayerOptions = options.layerOptions || {};
|
|
77
|
-
const initialVariable = userLayerOptions.variable || null;
|
|
78
|
-
this.state = {
|
|
79
|
-
model: userLayerOptions.model || 'gfs',
|
|
80
|
-
isMRMS: false,
|
|
81
|
-
mrmsTimestamp: null,
|
|
82
|
-
variable: initialVariable,
|
|
83
|
-
date: null,
|
|
84
|
-
run: null,
|
|
85
|
-
forecastHour: 0,
|
|
86
|
-
visible: true,
|
|
87
|
-
opacity: userLayerOptions.opacity ?? 1,
|
|
88
|
-
units: options.initialUnit || 'imperial',
|
|
89
|
-
shaderSmoothingEnabled: options.shaderSmoothingEnabled ?? true
|
|
90
|
-
};
|
|
91
|
-
this.autoRefreshEnabled = options.autoRefresh ?? false;
|
|
92
|
-
this.autoRefreshIntervalSeconds = options.autoRefreshInterval ?? 60;
|
|
93
|
-
this.autoRefreshIntervalId = null;
|
|
94
|
-
}
|
|
95
|
-
async setState(newState) {
|
|
96
|
-
Object.assign(this.state, newState);
|
|
97
|
-
this._emitStateChange();
|
|
98
|
-
}
|
|
99
|
-
_emitStateChange() {
|
|
100
|
-
const {
|
|
101
|
-
colormap,
|
|
102
|
-
baseUnit
|
|
103
|
-
} = this._getColormapForVariable(this.state.variable);
|
|
104
|
-
const toUnit = this._getTargetUnit(baseUnit, this.state.units);
|
|
105
|
-
const displayColormap = this._convertColormapUnits(colormap, baseUnit, toUnit);
|
|
106
|
-
let availableTimestamps = [];
|
|
107
|
-
if (this.state.isMRMS && this.state.variable && this.mrmsStatus) {
|
|
108
|
-
const timestamps = this.mrmsStatus[this.state.variable] || [];
|
|
109
|
-
availableTimestamps = [...timestamps].reverse();
|
|
110
|
-
}
|
|
111
|
-
const eventPayload = {
|
|
112
|
-
...this.state,
|
|
113
|
-
availableModels: this.modelStatus ? Object.keys(this.modelStatus).sort() : [],
|
|
114
|
-
availableRuns: this.modelStatus?.[this.state.model] || {},
|
|
115
|
-
availableHours: this.state.isMRMS ? [] : this.modelStatus?.[this.state.model]?.[this.state.date]?.[this.state.run] || [],
|
|
116
|
-
availableVariables: this.getAvailableVariables(this.state.isMRMS ? 'mrms' : this.state.model),
|
|
117
|
-
// We need to confirm this line is working as expected.
|
|
118
|
-
availableMRMSVariables: this.getAvailableVariables('mrms'),
|
|
119
|
-
availableTimestamps: availableTimestamps,
|
|
120
|
-
isPlaying: this.isPlaying,
|
|
121
|
-
colormap: displayColormap,
|
|
122
|
-
colormapBaseUnit: toUnit
|
|
123
|
-
};
|
|
124
|
-
this.emit('state:change', eventPayload);
|
|
125
|
-
}
|
|
126
|
-
async initialize(options = {}) {
|
|
127
|
-
await this.fetchModelStatus(true);
|
|
128
|
-
await this.fetchMRMSStatus(true);
|
|
129
|
-
const latestRun = findLatestModelRun(this.modelStatus, this.state.model);
|
|
130
|
-
let initialState = this.state;
|
|
131
|
-
if (latestRun && !this.state.isMRMS) {
|
|
132
|
-
initialState = {
|
|
133
|
-
...this.state,
|
|
134
|
-
...latestRun,
|
|
135
|
-
forecastHour: 0
|
|
136
|
-
};
|
|
137
|
-
const availableVariables = this.getAvailableVariables(initialState.model);
|
|
138
|
-
if (availableVariables && availableVariables.length > 0) {
|
|
139
|
-
initialState.variable = availableVariables[0];
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
await this.setState(initialState);
|
|
143
|
-
if (options.autoRefresh ?? this.autoRefreshEnabled) {
|
|
144
|
-
this.startAutoRefresh(options.refreshInterval ?? this.autoRefreshIntervalSeconds);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
destroy() {
|
|
148
|
-
this.pause();
|
|
149
|
-
this.stopAutoRefresh();
|
|
150
|
-
this.dataCache.clear();
|
|
151
|
-
if (this.worker) {
|
|
152
|
-
this.worker.terminate();
|
|
153
|
-
}
|
|
154
|
-
this.callbacks = {};
|
|
155
|
-
console.log(`AguaceroCore has been destroyed.`);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// --- Public API Methods ---
|
|
159
|
-
|
|
160
|
-
play() {
|
|
161
|
-
if (this.isPlaying) return;
|
|
162
|
-
this.isPlaying = true;
|
|
163
|
-
clearInterval(this.playIntervalId);
|
|
164
|
-
this.playIntervalId = setInterval(() => {
|
|
165
|
-
this.step(1);
|
|
166
|
-
}, this.playbackSpeed);
|
|
167
|
-
this.emit('playback:start', {
|
|
168
|
-
speed: this.playbackSpeed
|
|
169
|
-
});
|
|
170
|
-
this._emitStateChange(); // Notify UI that isPlaying is now true
|
|
171
|
-
}
|
|
172
|
-
pause() {
|
|
173
|
-
if (!this.isPlaying) return;
|
|
174
|
-
this.isPlaying = false;
|
|
175
|
-
clearInterval(this.playIntervalId);
|
|
176
|
-
this.playIntervalId = null;
|
|
177
|
-
this.emit('playback:stop');
|
|
178
|
-
this._emitStateChange(); // Notify UI that isPlaying is now false
|
|
179
|
-
}
|
|
180
|
-
togglePlay() {
|
|
181
|
-
this.isPlaying ? this.pause() : this.play();
|
|
182
|
-
}
|
|
183
|
-
step(direction = 1) {
|
|
184
|
-
// --- THIS IS THE CORRECTED MRMS LOGIC ---
|
|
185
|
-
if (this.state.isMRMS) {
|
|
186
|
-
const {
|
|
187
|
-
variable,
|
|
188
|
-
mrmsTimestamp
|
|
189
|
-
} = this.state;
|
|
190
|
-
if (!this.mrmsStatus || !this.mrmsStatus[variable]) {
|
|
191
|
-
console.warn('[Core.step] MRMS status or variable not available.');
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// CRITICAL FIX: The UI and state emissions use a REVERSED array (newest first).
|
|
196
|
-
// The step logic MUST use the same reversed array for indexes to match.
|
|
197
|
-
const availableTimestamps = [...(this.mrmsStatus[variable] || [])].reverse();
|
|
198
|
-
if (availableTimestamps.length === 0) return;
|
|
199
|
-
const currentIndex = availableTimestamps.indexOf(mrmsTimestamp);
|
|
200
|
-
if (currentIndex === -1) {
|
|
201
|
-
// If not found, reset to the first (newest) frame
|
|
202
|
-
this.setState({
|
|
203
|
-
mrmsTimestamp: availableTimestamps[0]
|
|
204
|
-
});
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
const maxIndex = availableTimestamps.length - 1;
|
|
208
|
-
let nextIndex = currentIndex + direction;
|
|
209
|
-
|
|
210
|
-
// Loop animation
|
|
211
|
-
if (nextIndex > maxIndex) nextIndex = 0;
|
|
212
|
-
if (nextIndex < 0) nextIndex = maxIndex;
|
|
213
|
-
const newTimestamp = availableTimestamps[nextIndex];
|
|
214
|
-
this.setState({
|
|
215
|
-
mrmsTimestamp: newTimestamp
|
|
216
|
-
});
|
|
217
|
-
} else {
|
|
218
|
-
const {
|
|
219
|
-
model,
|
|
220
|
-
date,
|
|
221
|
-
run,
|
|
222
|
-
forecastHour
|
|
223
|
-
} = this.state;
|
|
224
|
-
const forecastHours = this.modelStatus?.[model]?.[date]?.[run];
|
|
225
|
-
if (!forecastHours || forecastHours.length === 0) return;
|
|
226
|
-
const currentIndex = forecastHours.indexOf(forecastHour);
|
|
227
|
-
if (currentIndex === -1) return;
|
|
228
|
-
const maxIndex = forecastHours.length - 1;
|
|
229
|
-
let nextIndex = currentIndex + direction;
|
|
230
|
-
if (nextIndex > maxIndex) nextIndex = 0;
|
|
231
|
-
if (nextIndex < 0) nextIndex = maxIndex;
|
|
232
|
-
const newHour = forecastHours[nextIndex];
|
|
233
|
-
this.setState({
|
|
234
|
-
forecastHour: newHour
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
setPlaybackSpeed(speed) {
|
|
239
|
-
if (speed > 0) {
|
|
240
|
-
this.playbackSpeed = speed;
|
|
241
|
-
if (this.isPlaying) this.play();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
async setShaderSmoothing(enabled) {
|
|
245
|
-
if (typeof enabled !== 'boolean' || enabled === this.state.shaderSmoothingEnabled) return;
|
|
246
|
-
await this.setState({
|
|
247
|
-
shaderSmoothingEnabled: enabled
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
async setOpacity(newOpacity) {
|
|
251
|
-
const clampedOpacity = Math.max(0, Math.min(1, newOpacity));
|
|
252
|
-
if (clampedOpacity === this.state.opacity) return;
|
|
253
|
-
await this.setState({
|
|
254
|
-
opacity: clampedOpacity
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
async setVariable(variable) {
|
|
258
|
-
await this.setState({
|
|
259
|
-
variable
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
async setModel(modelName) {
|
|
263
|
-
if (modelName === this.state.model || !this.modelStatus?.[modelName]) return;
|
|
264
|
-
const latestRun = findLatestModelRun(this.modelStatus, modelName);
|
|
265
|
-
if (latestRun) {
|
|
266
|
-
await this.setState({
|
|
267
|
-
model: modelName,
|
|
268
|
-
date: latestRun.date,
|
|
269
|
-
run: latestRun.run,
|
|
270
|
-
forecastHour: 0
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
async setRun(runString) {
|
|
275
|
-
const [date, run] = runString.split(':');
|
|
276
|
-
if (date !== this.state.date || run !== this.state.run) {
|
|
277
|
-
await this.setState({
|
|
278
|
-
date,
|
|
279
|
-
run,
|
|
280
|
-
forecastHour: 0
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
async setUnits(newUnits) {
|
|
285
|
-
if (newUnits === this.state.units || !['metric', 'imperial'].includes(newUnits)) return;
|
|
286
|
-
await this.setState({
|
|
287
|
-
units: newUnits
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
async setMRMSVariable(variable) {
|
|
291
|
-
const sortedTimestamps = [...(this.mrmsStatus[variable] || [])].sort((a, b) => b - a);
|
|
292
|
-
const initialTimestamp = sortedTimestamps.length > 0 ? sortedTimestamps[0] : null;
|
|
293
|
-
await this.setState({
|
|
294
|
-
variable,
|
|
295
|
-
isMRMS: true,
|
|
296
|
-
mrmsTimestamp: initialTimestamp
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
async setMRMSTimestamp(timestamp) {
|
|
300
|
-
if (!this.state.isMRMS) return;
|
|
301
|
-
await this.setState({
|
|
302
|
-
mrmsTimestamp: timestamp
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
async switchMode(options) {
|
|
306
|
-
const {
|
|
307
|
-
mode,
|
|
308
|
-
variable,
|
|
309
|
-
model,
|
|
310
|
-
forecastHour,
|
|
311
|
-
mrmsTimestamp
|
|
312
|
-
} = options;
|
|
313
|
-
if (!mode || !variable) {
|
|
314
|
-
console.error("switchMode requires 'mode' ('mrms' | 'model') and 'variable' properties.");
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
if (mode === 'model' && !model) {
|
|
318
|
-
console.error("switchMode with mode 'model' requires a 'model' property.");
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
let targetState = {};
|
|
322
|
-
if (mode === 'mrms') {
|
|
323
|
-
let finalTimestamp = mrmsTimestamp;
|
|
324
|
-
if (finalTimestamp === undefined) {
|
|
325
|
-
const sortedTimestamps = [...(this.mrmsStatus[variable] || [])].sort((a, b) => b - a);
|
|
326
|
-
finalTimestamp = sortedTimestamps.length > 0 ? sortedTimestamps[0] : null;
|
|
327
|
-
}
|
|
328
|
-
targetState = {
|
|
329
|
-
isMRMS: true,
|
|
330
|
-
variable: variable,
|
|
331
|
-
mrmsTimestamp: finalTimestamp,
|
|
332
|
-
model: this.state.model,
|
|
333
|
-
date: null,
|
|
334
|
-
run: null,
|
|
335
|
-
forecastHour: 0
|
|
336
|
-
};
|
|
337
|
-
} else if (mode === 'model') {
|
|
338
|
-
const latestRun = findLatestModelRun(this.modelStatus, model);
|
|
339
|
-
if (!latestRun) {
|
|
340
|
-
console.error(`Could not find a valid run for model: ${model}`);
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
targetState = {
|
|
344
|
-
isMRMS: false,
|
|
345
|
-
model: model,
|
|
346
|
-
variable: variable,
|
|
347
|
-
date: latestRun.date,
|
|
348
|
-
run: latestRun.run,
|
|
349
|
-
forecastHour: forecastHour !== undefined ? forecastHour : 0,
|
|
350
|
-
mrmsTimestamp: null
|
|
351
|
-
};
|
|
352
|
-
} else {
|
|
353
|
-
console.error(`Invalid mode specified in switchMode: '${mode}'`);
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
await this.setState(targetState);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// --- Data and Calculation Methods ---
|
|
360
|
-
|
|
361
|
-
_reconstructData(decompressedDeltas, encoding) {
|
|
362
|
-
const expectedLength = encoding.length;
|
|
363
|
-
const reconstructedData = new Int8Array(expectedLength);
|
|
364
|
-
if (decompressedDeltas.length > 0 && expectedLength > 0) {
|
|
365
|
-
// First value is absolute
|
|
366
|
-
reconstructedData[0] = decompressedDeltas[0] > 127 ? decompressedDeltas[0] - 256 : decompressedDeltas[0];
|
|
367
|
-
|
|
368
|
-
// Subsequent values are deltas from the previous one
|
|
369
|
-
for (let i = 1; i < expectedLength; i++) {
|
|
370
|
-
const delta = decompressedDeltas[i] > 127 ? decompressedDeltas[i] - 256 : decompressedDeltas[i];
|
|
371
|
-
reconstructedData[i] = reconstructedData[i - 1] + delta;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
// Return as a Uint8Array, which is what the rest of the code expects
|
|
375
|
-
return new Uint8Array(reconstructedData.buffer);
|
|
376
|
-
}
|
|
377
|
-
async _loadGridData(state) {
|
|
378
|
-
if (this.isReactNative) {
|
|
379
|
-
console.warn(`[AguaceroCore] _loadGridData was called in React Native. This is a bypass. Data loading is handled natively.`);
|
|
380
|
-
return null;
|
|
381
|
-
}
|
|
382
|
-
const {
|
|
383
|
-
model,
|
|
384
|
-
date,
|
|
385
|
-
run,
|
|
386
|
-
forecastHour,
|
|
387
|
-
variable,
|
|
388
|
-
isMRMS,
|
|
389
|
-
mrmsTimestamp
|
|
390
|
-
} = state;
|
|
391
|
-
let effectiveSmoothing = 0;
|
|
392
|
-
const customVariableSettings = this.customColormaps[variable];
|
|
393
|
-
if (customVariableSettings && typeof customVariableSettings.smoothing === 'number') {
|
|
394
|
-
effectiveSmoothing = customVariableSettings.smoothing;
|
|
395
|
-
}
|
|
396
|
-
let resourcePath;
|
|
397
|
-
let dataUrlIdentifier;
|
|
398
|
-
if (isMRMS) {
|
|
399
|
-
if (!mrmsTimestamp) return null;
|
|
400
|
-
const mrmsDate = new Date(mrmsTimestamp * 1000);
|
|
401
|
-
const y = mrmsDate.getUTCFullYear(),
|
|
402
|
-
m = (mrmsDate.getUTCMonth() + 1).toString().padStart(2, '0'),
|
|
403
|
-
d = mrmsDate.getUTCDate().toString().padStart(2, '0');
|
|
404
|
-
dataUrlIdentifier = `mrms-${mrmsTimestamp}-${variable}-${effectiveSmoothing}`;
|
|
405
|
-
resourcePath = `/grids/mrms/${y}${m}${d}/${mrmsTimestamp}/0/${variable}/${effectiveSmoothing}`;
|
|
406
|
-
} else {
|
|
407
|
-
dataUrlIdentifier = `${model}-${date}-${run}-${forecastHour}-${variable}-${effectiveSmoothing}`;
|
|
408
|
-
resourcePath = `/grids/${model}/${date}/${run}/${forecastHour}/${variable}/${effectiveSmoothing}`;
|
|
409
|
-
}
|
|
410
|
-
if (this.dataCache.has(dataUrlIdentifier)) {
|
|
411
|
-
return this.dataCache.get(dataUrlIdentifier);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
// --- EDITED ---
|
|
415
|
-
// If we are in React Native, this function should NOT do any work.
|
|
416
|
-
// The native WeatherFrameProcessorModule is now responsible for all data loading.
|
|
417
|
-
// This function might still be called by a "cache miss" fallback, but it
|
|
418
|
-
// should not fetch data from JS anymore. We return null so the fallback knows
|
|
419
|
-
// that the native module is the only source of truth for new data.
|
|
420
|
-
if (this.isReactNative) {
|
|
421
|
-
console.warn(`_loadGridData was called in React Native for ${dataUrlIdentifier}. This should be handled by the native module. Returning null.`);
|
|
422
|
-
return null;
|
|
423
|
-
}
|
|
424
|
-
const abortController = new AbortController();
|
|
425
|
-
this.abortControllers.set(dataUrlIdentifier, abortController);
|
|
426
|
-
const loadPromise = (async () => {
|
|
427
|
-
if (!this.apiKey) {
|
|
428
|
-
throw new Error('API key is not configured.');
|
|
429
|
-
}
|
|
430
|
-
try {
|
|
431
|
-
const baseUrl = `${this.baseGridUrl}${resourcePath}`;
|
|
432
|
-
const urlWithApiKeyParam = `${baseUrl}?apiKey=${this.apiKey}`;
|
|
433
|
-
const headers = {
|
|
434
|
-
'x-api-key': this.apiKey
|
|
435
|
-
};
|
|
436
|
-
if (this.bundleId && this.isReactNative) {
|
|
437
|
-
headers['x-app-identifier'] = this.bundleId;
|
|
438
|
-
}
|
|
439
|
-
const response = await fetch(urlWithApiKeyParam, {
|
|
440
|
-
headers: headers,
|
|
441
|
-
signal: abortController.signal
|
|
442
|
-
});
|
|
443
|
-
if (!response.ok) {
|
|
444
|
-
throw new Error(`Failed to fetch grid data: ${response.status} ${response.statusText}`);
|
|
445
|
-
}
|
|
446
|
-
const {
|
|
447
|
-
data: b64Data,
|
|
448
|
-
encoding
|
|
449
|
-
} = await response.json();
|
|
450
|
-
const compressedData = Uint8Array.from(atob(b64Data), c => c.charCodeAt(0));
|
|
451
|
-
|
|
452
|
-
// This path is now ONLY for the web worker
|
|
453
|
-
const requestId = this.workerRequestId++;
|
|
454
|
-
const workerPromise = new Promise((resolve, reject) => {
|
|
455
|
-
this.workerResolvers.set(requestId, {
|
|
456
|
-
resolve,
|
|
457
|
-
reject
|
|
458
|
-
});
|
|
459
|
-
});
|
|
460
|
-
this.worker.postMessage({
|
|
461
|
-
requestId,
|
|
462
|
-
compressedData,
|
|
463
|
-
encoding
|
|
464
|
-
}, [compressedData.buffer]);
|
|
465
|
-
const result = await workerPromise;
|
|
466
|
-
const finalData = result.data;
|
|
467
|
-
const transformedData = new Uint8Array(finalData.length);
|
|
468
|
-
for (let i = 0; i < finalData.length; i++) {
|
|
469
|
-
const signedValue = finalData[i] > 127 ? finalData[i] - 256 : finalData[i];
|
|
470
|
-
transformedData[i] = signedValue + 128;
|
|
471
|
-
}
|
|
472
|
-
this.abortControllers.delete(dataUrlIdentifier);
|
|
473
|
-
return {
|
|
474
|
-
data: transformedData,
|
|
475
|
-
encoding
|
|
476
|
-
};
|
|
477
|
-
} catch (error) {
|
|
478
|
-
if (error.name === 'AbortError') {
|
|
479
|
-
console.log(`Request cancelled for ${resourcePath}`);
|
|
480
|
-
} else {
|
|
481
|
-
console.error(`Failed to load data for path ${resourcePath}:`, error);
|
|
482
|
-
}
|
|
483
|
-
this.dataCache.delete(dataUrlIdentifier);
|
|
484
|
-
this.abortControllers.delete(dataUrlIdentifier);
|
|
485
|
-
return null;
|
|
486
|
-
}
|
|
487
|
-
})();
|
|
488
|
-
this.dataCache.set(dataUrlIdentifier, loadPromise);
|
|
489
|
-
return loadPromise;
|
|
490
|
-
}
|
|
491
|
-
cancelAllRequests() {
|
|
492
|
-
// Abort all in-flight requests
|
|
493
|
-
this.abortControllers.forEach((controller, key) => {
|
|
494
|
-
controller.abort();
|
|
495
|
-
});
|
|
496
|
-
|
|
497
|
-
// Clear both maps
|
|
498
|
-
this.abortControllers.clear();
|
|
499
|
-
this.dataCache.clear();
|
|
500
|
-
console.log('All pending requests cancelled');
|
|
501
|
-
}
|
|
502
|
-
async getValueAtLngLat(lng, lat) {
|
|
503
|
-
const {
|
|
504
|
-
variable,
|
|
505
|
-
isMRMS,
|
|
506
|
-
mrmsTimestamp,
|
|
507
|
-
model,
|
|
508
|
-
date,
|
|
509
|
-
run,
|
|
510
|
-
forecastHour,
|
|
511
|
-
units
|
|
512
|
-
} = this.state;
|
|
513
|
-
if (!variable) return null;
|
|
514
|
-
const gridIndices = this._getGridIndexFromLngLat(lng, lat);
|
|
515
|
-
if (!gridIndices) return null;
|
|
516
|
-
const {
|
|
517
|
-
i,
|
|
518
|
-
j
|
|
519
|
-
} = gridIndices;
|
|
520
|
-
const gridModel = isMRMS ? 'mrms' : model;
|
|
521
|
-
const normalizedGridModel = this._normalizeModelName(gridModel);
|
|
522
|
-
const {
|
|
523
|
-
nx
|
|
524
|
-
} = COORDINATE_CONFIGS[normalizedGridModel].grid_params;
|
|
525
|
-
const customSettings = this.customColormaps[variable];
|
|
526
|
-
const effectiveSmoothing = customSettings && typeof customSettings.smoothing === 'number' ? customSettings.smoothing : 0;
|
|
527
|
-
const dataUrlIdentifier = isMRMS ? `mrms-${mrmsTimestamp}-${variable}-${effectiveSmoothing}` : `${model}-${date}-${run}-${forecastHour}-${variable}-${effectiveSmoothing}`;
|
|
528
|
-
const gridDataPromise = this.dataCache.get(dataUrlIdentifier);
|
|
529
|
-
if (!gridDataPromise) return null;
|
|
530
|
-
try {
|
|
531
|
-
const gridData = await gridDataPromise;
|
|
532
|
-
if (!gridData || !gridData.data) return null;
|
|
533
|
-
const index1D = j * nx + i;
|
|
534
|
-
const byteValue = gridData.data[index1D];
|
|
535
|
-
const signedQuantizedValue = byteValue - 128;
|
|
536
|
-
|
|
537
|
-
// --- START OF FIX ---
|
|
538
|
-
// You were missing 'scale_type' in this destructuring assignment.
|
|
539
|
-
const {
|
|
540
|
-
scale,
|
|
541
|
-
offset,
|
|
542
|
-
missing_quantized,
|
|
543
|
-
scale_type
|
|
544
|
-
} = gridData.encoding;
|
|
545
|
-
// --- END OF FIX ---
|
|
546
|
-
|
|
547
|
-
if (signedQuantizedValue === missing_quantized) return null;
|
|
548
|
-
const intermediateValue = signedQuantizedValue * scale + offset;
|
|
549
|
-
|
|
550
|
-
// Step 2: Apply non-linear scaling if specified
|
|
551
|
-
let nativeValue = intermediateValue;
|
|
552
|
-
if (scale_type === 'sqrt') {
|
|
553
|
-
// Square the value while preserving its sign
|
|
554
|
-
nativeValue = intermediateValue < 0 ? -(intermediateValue * intermediateValue) : intermediateValue * intermediateValue;
|
|
555
|
-
}
|
|
556
|
-
const {
|
|
557
|
-
colormap,
|
|
558
|
-
baseUnit
|
|
559
|
-
} = this._getColormapForVariable(variable);
|
|
560
|
-
|
|
561
|
-
// If the value is outside the colormap's bounds, return null.
|
|
562
|
-
if (colormap && colormap.length >= 2) {
|
|
563
|
-
const minBound = colormap[0];
|
|
564
|
-
const maxBound = colormap[colormap.length - 2];
|
|
565
|
-
if (nativeValue < minBound || nativeValue > maxBound) {
|
|
566
|
-
return null;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
let dataNativeUnit = baseUnit || (DICTIONARIES.fld[variable] || {}).defaultUnit || 'none';
|
|
570
|
-
const displayUnit = this._getTargetUnit(dataNativeUnit, units);
|
|
571
|
-
const conversionFunc = getUnitConversionFunction(dataNativeUnit, displayUnit);
|
|
572
|
-
const displayValue = conversionFunc ? conversionFunc(nativeValue) : nativeValue;
|
|
573
|
-
return {
|
|
574
|
-
lngLat: {
|
|
575
|
-
lng,
|
|
576
|
-
lat
|
|
577
|
-
},
|
|
578
|
-
variable: {
|
|
579
|
-
code: variable,
|
|
580
|
-
name: this.getVariableDisplayName(variable)
|
|
581
|
-
},
|
|
582
|
-
value: displayValue,
|
|
583
|
-
unit: displayUnit
|
|
584
|
-
};
|
|
585
|
-
} catch (error) {
|
|
586
|
-
return null;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
getAvailableVariables(modelName = null) {
|
|
590
|
-
const model = modelName || this.state.model;
|
|
591
|
-
return MODEL_CONFIGS[model]?.vars || [];
|
|
592
|
-
}
|
|
593
|
-
getVariableDisplayName(variableCode) {
|
|
594
|
-
const varInfo = DICTIONARIES.fld[variableCode];
|
|
595
|
-
return varInfo?.displayName || varInfo?.name || variableCode;
|
|
596
|
-
}
|
|
597
|
-
_getColormapForVariable(variable) {
|
|
598
|
-
if (!variable) return {
|
|
599
|
-
colormap: [],
|
|
600
|
-
baseUnit: ''
|
|
601
|
-
};
|
|
602
|
-
if (this.customColormaps[variable] && this.customColormaps[variable].colormap) {
|
|
603
|
-
return {
|
|
604
|
-
colormap: this.customColormaps[variable].colormap,
|
|
605
|
-
baseUnit: this.customColormaps[variable].baseUnit || ''
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
const colormapKey = DICTIONARIES.variable_cmap[variable] || variable;
|
|
609
|
-
const customColormap = this.customColormaps[colormapKey];
|
|
610
|
-
if (customColormap && customColormap.colormap) {
|
|
611
|
-
return {
|
|
612
|
-
colormap: customColormap.colormap,
|
|
613
|
-
baseUnit: customColormap.baseUnit || ''
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
const defaultColormapData = DEFAULT_COLORMAPS[colormapKey];
|
|
617
|
-
if (defaultColormapData && defaultColormapData.units) {
|
|
618
|
-
// ✅ Get defaultUnit from the field dictionary
|
|
619
|
-
const fieldInfo = DICTIONARIES.fld[variable] || {};
|
|
620
|
-
const baseUnit = fieldInfo.defaultUnit || Object.keys(defaultColormapData.units)[0];
|
|
621
|
-
const unitData = defaultColormapData.units[baseUnit];
|
|
622
|
-
if (unitData && unitData.colormap) {
|
|
623
|
-
return {
|
|
624
|
-
colormap: unitData.colormap,
|
|
625
|
-
baseUnit: baseUnit
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return {
|
|
630
|
-
colormap: [],
|
|
631
|
-
baseUnit: ''
|
|
632
|
-
};
|
|
633
|
-
}
|
|
634
|
-
_convertColormapUnits(colormap, fromUnits, toUnits) {
|
|
635
|
-
if (fromUnits === toUnits) return colormap;
|
|
636
|
-
const conversionFunc = getUnitConversionFunction(fromUnits, toUnits);
|
|
637
|
-
if (!conversionFunc) return colormap;
|
|
638
|
-
const newColormap = [];
|
|
639
|
-
for (let i = 0; i < colormap.length; i += 2) {
|
|
640
|
-
newColormap.push(conversionFunc(colormap[i]), colormap[i + 1]);
|
|
641
|
-
}
|
|
642
|
-
return newColormap;
|
|
643
|
-
}
|
|
644
|
-
_normalizeModelName(modelName) {
|
|
645
|
-
const mapping = {
|
|
646
|
-
'hrrr': ['mpashn', 'mpasrt', 'mpasht', 'hrrrsub', 'rrfs', 'namnest', 'mpasrn', 'mpasrn3', 'mpasht2'],
|
|
647
|
-
'arw': ['arw2', 'fv3', 'href'],
|
|
648
|
-
'rtma': ['nbm'],
|
|
649
|
-
'ecmwf': ['ecmwfaifs'],
|
|
650
|
-
'gfs': ['arpege', 'graphcastgfs']
|
|
651
|
-
};
|
|
652
|
-
for (const [normalized, aliases] of Object.entries(mapping)) {
|
|
653
|
-
if (aliases.includes(modelName)) return normalized;
|
|
654
|
-
}
|
|
655
|
-
return modelName;
|
|
656
|
-
}
|
|
657
|
-
_getGridCornersAndDef(model) {
|
|
658
|
-
const normalizedModel = this._normalizeModelName(model);
|
|
659
|
-
const gridDef = {
|
|
660
|
-
...COORDINATE_CONFIGS[normalizedModel],
|
|
661
|
-
modelName: model
|
|
662
|
-
};
|
|
663
|
-
if (!gridDef) return null;
|
|
664
|
-
const {
|
|
665
|
-
nx,
|
|
666
|
-
ny
|
|
667
|
-
} = gridDef.grid_params;
|
|
668
|
-
const gridType = gridDef.type;
|
|
669
|
-
let corners;
|
|
670
|
-
if (gridType === 'latlon') {
|
|
671
|
-
let {
|
|
672
|
-
lon_first,
|
|
673
|
-
lat_first,
|
|
674
|
-
lat_last,
|
|
675
|
-
lon_last,
|
|
676
|
-
dx_degrees,
|
|
677
|
-
dy_degrees
|
|
678
|
-
} = gridDef.grid_params;
|
|
679
|
-
corners = {
|
|
680
|
-
lon_tl: lon_first,
|
|
681
|
-
lat_tl: lat_first,
|
|
682
|
-
lon_tr: lon_last !== undefined ? lon_last : lon_first + (nx - 1) * dx_degrees,
|
|
683
|
-
lat_tr: lat_first,
|
|
684
|
-
lon_bl: lon_first,
|
|
685
|
-
lat_bl: lat_last !== undefined ? lat_last : lat_first + (ny - 1) * dy_degrees,
|
|
686
|
-
lon_br: lon_last !== undefined ? lon_last : lon_first + (nx - 1) * dx_degrees,
|
|
687
|
-
lat_br: lat_last !== undefined ? lat_last : lat_first + (ny - 1) * dy_degrees
|
|
688
|
-
};
|
|
689
|
-
} else if (gridType === 'rotated_latlon') {
|
|
690
|
-
const [lon_tl, lat_tl] = hrdpsObliqueTransform(gridDef.grid_params.lon_first, gridDef.grid_params.lat_first);
|
|
691
|
-
const [lon_tr, lat_tr] = hrdpsObliqueTransform(gridDef.grid_params.lon_first + (nx - 1) * gridDef.grid_params.dx_degrees, gridDef.grid_params.lat_first);
|
|
692
|
-
const [lon_bl, lat_bl] = hrdpsObliqueTransform(gridDef.grid_params.lon_first, gridDef.grid_params.lat_first + (ny - 1) * gridDef.grid_params.dy_degrees);
|
|
693
|
-
const [lon_br, lat_br] = hrdpsObliqueTransform(gridDef.grid_params.lon_first + (nx - 1) * gridDef.grid_params.dx_degrees, gridDef.grid_params.lat_first + (ny - 1) * gridDef.grid_params.dy_degrees);
|
|
694
|
-
corners = {
|
|
695
|
-
lon_tl,
|
|
696
|
-
lat_tl,
|
|
697
|
-
lon_tr,
|
|
698
|
-
lat_tr,
|
|
699
|
-
lon_bl,
|
|
700
|
-
lat_bl,
|
|
701
|
-
lon_br,
|
|
702
|
-
lat_br
|
|
703
|
-
};
|
|
704
|
-
} else if (gridType === 'lambert_conformal_conic' || gridType === 'polar_ stereographic') {
|
|
705
|
-
let projString = Object.entries(gridDef.proj_params).map(([k, v]) => `+${k}=${v}`).join(' ');
|
|
706
|
-
if (gridType === 'polar_stereographic') projString += ' +lat_0=90';
|
|
707
|
-
const {
|
|
708
|
-
x_origin,
|
|
709
|
-
y_origin,
|
|
710
|
-
dx,
|
|
711
|
-
dy
|
|
712
|
-
} = gridDef.grid_params;
|
|
713
|
-
const [lon_tl, lat_tl] = proj4(projString, 'EPSG:4326', [x_origin, y_origin]);
|
|
714
|
-
const [lon_tr, lat_tr] = proj4(projString, 'EPSG:4326', [x_origin + (nx - 1) * dx, y_origin]);
|
|
715
|
-
const [lon_bl, lat_bl] = proj4(projString, 'EPSG:4326', [x_origin, y_origin + (ny - 1) * dy]);
|
|
716
|
-
const [lon_br, lat_br] = proj4(projString, 'EPSG:4326', [x_origin + (nx - 1) * dx, y_origin + (ny - 1) * dy]);
|
|
717
|
-
corners = {
|
|
718
|
-
lon_tl,
|
|
719
|
-
lat_tl,
|
|
720
|
-
lon_tr,
|
|
721
|
-
lat_tr,
|
|
722
|
-
lon_bl,
|
|
723
|
-
lat_bl,
|
|
724
|
-
lon_br,
|
|
725
|
-
lat_br
|
|
726
|
-
};
|
|
727
|
-
} else {
|
|
728
|
-
return null;
|
|
729
|
-
}
|
|
730
|
-
return {
|
|
731
|
-
corners,
|
|
732
|
-
gridDef
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
_getTargetUnit(defaultUnit, system) {
|
|
736
|
-
if (system === 'metric') {
|
|
737
|
-
if (['°F', '°C', 'fahrenheit', 'celsius'].includes(defaultUnit)) return '°C';
|
|
738
|
-
if (['kts', 'mph', 'm/s'].includes(defaultUnit)) return 'km/h';
|
|
739
|
-
if (['in', 'mm', 'cm'].includes(defaultUnit)) return 'mm';
|
|
740
|
-
}
|
|
741
|
-
if (system === 'imperial') {
|
|
742
|
-
if (['°F', '°C', 'fahrenheit', 'celsius'].includes(defaultUnit)) return '°F';
|
|
743
|
-
if (['kts', 'mph', 'm/s'].includes(defaultUnit)) return 'mph';
|
|
744
|
-
if (['in', 'mm', 'cm'].includes(defaultUnit)) return 'in';
|
|
745
|
-
}
|
|
746
|
-
return defaultUnit;
|
|
747
|
-
}
|
|
748
|
-
_getGridIndexFromLngLat(lng, lat) {
|
|
749
|
-
const gridModel = this.state.isMRMS ? 'mrms' : this.state.model;
|
|
750
|
-
const normalizedGridModel = this._normalizeModelName(gridModel);
|
|
751
|
-
const gridDef = COORDINATE_CONFIGS[normalizedGridModel];
|
|
752
|
-
if (!gridDef) return null;
|
|
753
|
-
const {
|
|
754
|
-
nx,
|
|
755
|
-
ny
|
|
756
|
-
} = gridDef.grid_params;
|
|
757
|
-
const pixelCoords = this.latLonToGridPixel(lat, lng, gridDef, gridModel);
|
|
758
|
-
if (!pixelCoords || !isFinite(pixelCoords.x) || !isFinite(pixelCoords.y) || pixelCoords.x < 0 || pixelCoords.y < 0) return null;
|
|
759
|
-
const i = Math.round(pixelCoords.x);
|
|
760
|
-
const j = Math.round(pixelCoords.y);
|
|
761
|
-
if (i >= 0 && i < nx && j >= 0 && j < ny) return {
|
|
762
|
-
i,
|
|
763
|
-
j
|
|
764
|
-
};
|
|
765
|
-
return null;
|
|
766
|
-
}
|
|
767
|
-
latLonToProjected(lat, lon, gridDef) {
|
|
768
|
-
if (!isFinite(lat) || !isFinite(lon)) throw new Error(`Invalid coordinates: lat=${lat}, lon=${lon}`);
|
|
769
|
-
const gridType = gridDef.type;
|
|
770
|
-
if (gridType === 'latlon') return {
|
|
771
|
-
x: lon,
|
|
772
|
-
y: lat
|
|
773
|
-
};
|
|
774
|
-
let projString = Object.entries(gridDef.proj_params).map(([k, v]) => `+${k}=${v}`).join(' ');
|
|
775
|
-
if (gridType === 'polar_stereographic') projString += ' +lat_0=90';
|
|
776
|
-
const projected = proj4('EPSG:4326', projString, [lon, lat]);
|
|
777
|
-
return {
|
|
778
|
-
x: projected[0],
|
|
779
|
-
y: projected[1]
|
|
780
|
-
};
|
|
781
|
-
}
|
|
782
|
-
latLonToGridPixel(lat, lon, gridDef, modelName) {
|
|
783
|
-
if (!gridDef) return null;
|
|
784
|
-
if (modelName === 'rgem' && gridDef.type === 'polar_stereographic') return this.latLonToGridPixelPolarStereographic(lat, lon, gridDef);
|
|
785
|
-
const projected = this.latLonToProjected(lat, lon, gridDef);
|
|
786
|
-
let x, y;
|
|
787
|
-
const gridOrigin = {
|
|
788
|
-
x: gridDef.grid_params.lon_first,
|
|
789
|
-
y: gridDef.grid_params.lat_first
|
|
790
|
-
};
|
|
791
|
-
const gridPixelSize = {
|
|
792
|
-
x: gridDef.grid_params.dx_degrees,
|
|
793
|
-
y: gridDef.grid_params.dy_degrees
|
|
794
|
-
};
|
|
795
|
-
if (gridDef.type === 'latlon' || gridDef.type === 'rotated_latlon') {
|
|
796
|
-
let adjustedLon = projected.x;
|
|
797
|
-
if (modelName === 'mrms') {
|
|
798
|
-
if (adjustedLon < 0) adjustedLon += 360;
|
|
799
|
-
x = (adjustedLon - gridOrigin.x) / gridPixelSize.x;
|
|
800
|
-
y = (gridOrigin.y - projected.y) / gridPixelSize.y;
|
|
801
|
-
} else {
|
|
802
|
-
const isGFSType = gridDef.grid_params && gridDef.grid_params.lon_first === 0.0 && Math.abs(gridDef.grid_params.lat_first) === 90.0;
|
|
803
|
-
const isECMWFType = gridDef.grid_params && gridDef.grid_params.lon_first === 180.0 && gridDef.grid_params.lat_first === 90.0;
|
|
804
|
-
const isGEMType = modelName === 'gem' || gridDef.grid_params.lon_first === 180.0 && gridDef.grid_params.lat_first === -90.0 && gridDef.grid_params.lon_last === 179.85;
|
|
805
|
-
if (isGEMType) {
|
|
806
|
-
while (adjustedLon < gridOrigin.x) adjustedLon += 360;
|
|
807
|
-
x = (adjustedLon - gridOrigin.x) / gridPixelSize.x;
|
|
808
|
-
y = (projected.y - gridOrigin.y) / gridPixelSize.y;
|
|
809
|
-
return {
|
|
810
|
-
x,
|
|
811
|
-
y
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
let isFlippedGrid = isECMWFType ? true : gridDef.grid_params.lat_first < (gridDef.grid_params.lat_last || (gridDef.grid_params.ny - 1) * gridDef.grid_params.dy_degrees);
|
|
815
|
-
if (isGFSType) adjustedLon = projected.x + 180;else if (isECMWFType) {
|
|
816
|
-
if (adjustedLon < gridOrigin.x) adjustedLon += 360;
|
|
817
|
-
} else if (['arome1', 'arome25', 'arpegeeu', 'iconeu', 'icond2'].includes(modelName)) {
|
|
818
|
-
while (adjustedLon < 0) adjustedLon += 360;
|
|
819
|
-
while (adjustedLon >= 360) adjustedLon -= 360;
|
|
820
|
-
x = adjustedLon >= gridOrigin.x ? (adjustedLon - gridOrigin.x) / gridPixelSize.x : (adjustedLon + 360 - gridOrigin.x) / gridPixelSize.x;
|
|
821
|
-
if (['arome1', 'arome25', 'arpegeeu'].includes(modelName)) y = (gridOrigin.y - projected.y) / Math.abs(gridPixelSize.y);else if (['iconeu', 'icond2'].includes(modelName)) y = (projected.y - gridOrigin.y) / gridPixelSize.y;
|
|
822
|
-
return {
|
|
823
|
-
x,
|
|
824
|
-
y
|
|
825
|
-
};
|
|
826
|
-
} else {
|
|
827
|
-
const lonFirst = gridOrigin.x;
|
|
828
|
-
if (lonFirst > 180 && adjustedLon < 0) adjustedLon += 360;else if (lonFirst < 0 && adjustedLon > 180) adjustedLon -= 360;
|
|
829
|
-
}
|
|
830
|
-
x = (adjustedLon - gridOrigin.x) / gridPixelSize.x;
|
|
831
|
-
if (isFlippedGrid) {
|
|
832
|
-
if (isECMWFType) y = (gridOrigin.y - projected.y) / Math.abs(gridPixelSize.y);else {
|
|
833
|
-
const maxLat = gridDef.grid_params.lat_last || (gridDef.grid_params.ny - 1) * gridDef.grid_params.dy_degrees;
|
|
834
|
-
y = (maxLat - projected.y) / Math.abs(gridPixelSize.y);
|
|
835
|
-
}
|
|
836
|
-
} else y = (projected.y - gridOrigin.y) / gridPixelSize.y;
|
|
837
|
-
}
|
|
838
|
-
} else {
|
|
839
|
-
const projOrigin = {
|
|
840
|
-
x: gridDef.grid_params.x_origin,
|
|
841
|
-
y: gridDef.grid_params.y_origin
|
|
842
|
-
};
|
|
843
|
-
const projPixelSize = {
|
|
844
|
-
x: gridDef.grid_params.dx,
|
|
845
|
-
y: gridDef.grid_params.dy
|
|
846
|
-
};
|
|
847
|
-
x = (projected.x - projOrigin.x) / projPixelSize.x;
|
|
848
|
-
y = (projOrigin.y - projected.y) / Math.abs(projPixelSize.y);
|
|
849
|
-
}
|
|
850
|
-
return {
|
|
851
|
-
x,
|
|
852
|
-
y
|
|
853
|
-
};
|
|
854
|
-
}
|
|
855
|
-
latLonToGridPixelPolarStereographic(lat, lon, gridDef) {
|
|
856
|
-
try {
|
|
857
|
-
const projParams = gridDef.proj_params;
|
|
858
|
-
let projectionString = `+proj=${projParams.proj}`;
|
|
859
|
-
Object.keys(projParams).forEach(key => {
|
|
860
|
-
if (key !== 'proj') projectionString += ` +${key}=${projParams[key]}`;
|
|
861
|
-
});
|
|
862
|
-
projectionString += ' +lat_0=90 +no_defs';
|
|
863
|
-
const {
|
|
864
|
-
nx,
|
|
865
|
-
ny,
|
|
866
|
-
dx,
|
|
867
|
-
dy,
|
|
868
|
-
x_origin,
|
|
869
|
-
y_origin
|
|
870
|
-
} = gridDef.grid_params;
|
|
871
|
-
const x_min = x_origin;
|
|
872
|
-
const x_max = x_origin + (nx - 1) * dx;
|
|
873
|
-
const y_max = y_origin;
|
|
874
|
-
const y_min = y_origin + (ny - 1) * dy;
|
|
875
|
-
const [proj_x, proj_y] = proj4('EPSG:4326', projectionString, [lon, lat]);
|
|
876
|
-
if (!isFinite(proj_x) || !isFinite(proj_y)) return {
|
|
877
|
-
x: -1,
|
|
878
|
-
y: -1
|
|
879
|
-
};
|
|
880
|
-
const t_x = (proj_x - x_min) / (x_max - x_min);
|
|
881
|
-
const t_y = (proj_y - y_max) / (y_min - y_max);
|
|
882
|
-
const x = t_x * (nx - 1);
|
|
883
|
-
const y = t_y * (ny - 1);
|
|
884
|
-
return {
|
|
885
|
-
x,
|
|
886
|
-
y
|
|
887
|
-
};
|
|
888
|
-
} catch (error) {
|
|
889
|
-
console.warn(`[GridAccessor] RGEM polar stereographic conversion failed for ${lat}, ${lon}:`, error);
|
|
890
|
-
return {
|
|
891
|
-
x: -1,
|
|
892
|
-
y: -1
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
// --- Worker and Status Methods ---
|
|
898
|
-
|
|
899
|
-
createWorker() {
|
|
900
|
-
if (this.isReactNative) return null;
|
|
901
|
-
const workerCode = `
|
|
902
|
-
import { decompress } from 'https://cdn.skypack.dev/fzstd@0.1.1';
|
|
903
|
-
|
|
904
|
-
function _reconstructData(decompressedDeltas, encoding) {
|
|
905
|
-
const expectedLength = encoding.length;
|
|
906
|
-
const reconstructedData = new Int8Array(expectedLength);
|
|
907
|
-
if (decompressedDeltas.length > 0 && expectedLength > 0) {
|
|
908
|
-
reconstructedData[0] = decompressedDeltas[0] > 127 ? decompressedDeltas[0] - 256 : decompressedDeltas[0];
|
|
909
|
-
for (let i = 1; i < expectedLength; i++) {
|
|
910
|
-
const delta = decompressedDeltas[i] > 127 ? decompressedDeltas[i] - 256 : decompressedDeltas[i];
|
|
911
|
-
reconstructedData[i] = reconstructedData[i - 1] + delta;
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
return new Uint8Array(reconstructedData.buffer);
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
self.onmessage = async (e) => {
|
|
918
|
-
const { requestId, compressedData, encoding } = e.data;
|
|
919
|
-
try {
|
|
920
|
-
const decompressedDeltas = await decompress(compressedData);
|
|
921
|
-
const finalData = _reconstructData(decompressedDeltas, encoding);
|
|
922
|
-
self.postMessage({ success: true, requestId: requestId, decompressedData: finalData, encoding: encoding }, [finalData.buffer]);
|
|
923
|
-
} catch (error) {
|
|
924
|
-
self.postMessage({ success: false, requestId: requestId, error: error.message });
|
|
925
|
-
}
|
|
926
|
-
};
|
|
927
|
-
`;
|
|
928
|
-
const blob = new Blob([workerCode], {
|
|
929
|
-
type: 'application/javascript'
|
|
930
|
-
});
|
|
931
|
-
return new Worker(URL.createObjectURL(blob), {
|
|
932
|
-
type: 'module'
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
_processResultQueue() {
|
|
936
|
-
while (this.resultQueue.length > 0) {
|
|
937
|
-
const {
|
|
938
|
-
success,
|
|
939
|
-
requestId,
|
|
940
|
-
decompressedData,
|
|
941
|
-
encoding,
|
|
942
|
-
error
|
|
943
|
-
} = this.resultQueue.shift();
|
|
944
|
-
if (this.workerResolvers.has(requestId)) {
|
|
945
|
-
const {
|
|
946
|
-
resolve,
|
|
947
|
-
reject
|
|
948
|
-
} = this.workerResolvers.get(requestId);
|
|
949
|
-
if (success) {
|
|
950
|
-
resolve({
|
|
951
|
-
data: decompressedData
|
|
952
|
-
}); // Return as { data: ... }
|
|
953
|
-
} else {
|
|
954
|
-
reject(new Error(error));
|
|
955
|
-
}
|
|
956
|
-
this.workerResolvers.delete(requestId);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
this.isProcessingQueue = false;
|
|
960
|
-
}
|
|
961
|
-
_handleWorkerMessage(e) {
|
|
962
|
-
if (this.isReactNative) return;
|
|
963
|
-
const {
|
|
964
|
-
success,
|
|
965
|
-
requestId,
|
|
966
|
-
decompressedData,
|
|
967
|
-
encoding,
|
|
968
|
-
error
|
|
969
|
-
} = e.data;
|
|
970
|
-
this.resultQueue.push({
|
|
971
|
-
success,
|
|
972
|
-
requestId,
|
|
973
|
-
decompressedData,
|
|
974
|
-
encoding,
|
|
975
|
-
error
|
|
976
|
-
});
|
|
977
|
-
if (!this.isProcessingQueue) {
|
|
978
|
-
this.isProcessingQueue = true;
|
|
979
|
-
requestAnimationFrame(() => this._processResultQueue());
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
async fetchModelStatus(force = false) {
|
|
983
|
-
if (!this.modelStatus || force) {
|
|
984
|
-
try {
|
|
985
|
-
const response = await fetch(this.statusUrl);
|
|
986
|
-
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`);
|
|
987
|
-
this.modelStatus = (await response.json()).models;
|
|
988
|
-
} catch (error) {
|
|
989
|
-
this.modelStatus = null;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
return this.modelStatus;
|
|
993
|
-
}
|
|
994
|
-
async fetchMRMSStatus(force = false) {
|
|
995
|
-
const mrmsStatusUrl = 'https://h3dfvh5pq6euq36ymlpz4zqiha0obqju.lambda-url.us-east-2.on.aws';
|
|
996
|
-
if (!this.mrmsStatus || force) {
|
|
997
|
-
try {
|
|
998
|
-
const response = await fetch(mrmsStatusUrl);
|
|
999
|
-
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`);
|
|
1000
|
-
this.mrmsStatus = await response.json();
|
|
1001
|
-
} catch (error) {
|
|
1002
|
-
this.mrmsStatus = null;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
return this.mrmsStatus;
|
|
1006
|
-
}
|
|
1007
|
-
startAutoRefresh(intervalSeconds) {
|
|
1008
|
-
this.stopAutoRefresh();
|
|
1009
|
-
this.autoRefreshIntervalId = setInterval(async () => {
|
|
1010
|
-
await this.fetchModelStatus(true);
|
|
1011
|
-
this._emitStateChange();
|
|
1012
|
-
}, (intervalSeconds || 60) * 1000);
|
|
1013
|
-
}
|
|
1014
|
-
stopAutoRefresh() {
|
|
1015
|
-
if (this.autoRefreshIntervalId) {
|
|
1016
|
-
clearInterval(this.autoRefreshIntervalId);
|
|
1017
|
-
this.autoRefreshIntervalId = null;
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
//# sourceMappingURL=AguaceroCore.js.map
|