@aguacerowx/react-native 0.0.4 → 0.0.7
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 +51 -6
- package/android/build/.transforms/78b892a9dae44f36e51ff0649e9c6e36/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayerView.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderManager.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/WeatherFrameProcessorModule.dex +0 -0
- package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
- 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/WeatherFrameProcessorModule.class +0 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +13 -2
- 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/WeatherFrameProcessorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/AguaceroPackage.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderManager.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +21 -52
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +13 -2
- package/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +21 -14
- package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +15 -0
- package/android/src/main/res/raw/fragment_shader.glsl +13 -2
- package/ios/GridRenderLayer.swift +62 -0
- package/ios/GridRenderLayerManager.mm +140 -0
- package/ios/aguacerowx-react-native.podspec +29 -0
- package/lib/commonjs/README.md +61 -0
- package/lib/commonjs/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -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/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 +98 -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_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/AguaceroPackage.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/compileTransaction/stash-dir/GridRenderManager.class.uniqueId3 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
- package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/commonjs/android/build.gradle +85 -0
- package/lib/commonjs/android/src/main/AndroidManifest.xml +7 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +34 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +608 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +298 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +118 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +64 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +107 -0
- package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +166 -0
- package/lib/commonjs/android/src/main/res/raw/debug_fragment_shader.glsl +13 -0
- package/lib/commonjs/android/src/main/res/raw/debug_vertex_shader.glsl +13 -0
- package/lib/commonjs/android/src/main/res/raw/fragment_shader.glsl +98 -0
- package/lib/commonjs/android/src/main/res/raw/vertex_shader.glsl +20 -0
- package/lib/commonjs/babel.config.js +7 -0
- package/lib/commonjs/babel.config.js.map +1 -0
- package/lib/commonjs/index.js +20 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +73 -0
- package/lib/commonjs/react-native-builder-bob.config.js +13 -0
- package/lib/commonjs/react-native-builder-bob.config.js.map +1 -0
- package/lib/commonjs/src/AguaceroContext.js +11 -0
- package/lib/commonjs/src/AguaceroContext.js.map +1 -0
- package/lib/commonjs/src/GridRenderLayer.js +132 -0
- package/lib/commonjs/src/GridRenderLayer.js.map +1 -0
- package/lib/commonjs/src/GridRenderLayerNativeComponent.js +11 -0
- package/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -0
- package/lib/commonjs/src/MapManager.js +164 -0
- package/lib/commonjs/src/MapManager.js.map +1 -0
- package/lib/commonjs/src/MapRegistry.js +36 -0
- package/lib/commonjs/src/MapRegistry.js.map +1 -0
- package/lib/commonjs/src/StyleApplicator.js +262 -0
- package/lib/commonjs/src/StyleApplicator.js.map +1 -0
- package/lib/commonjs/src/WeatherLayerManager.js +782 -0
- package/lib/commonjs/src/WeatherLayerManager.js.map +1 -0
- package/lib/commonjs/tsconfig.json +24 -0
- package/lib/module/README.md +61 -0
- package/lib/module/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -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/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 +98 -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_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/AguaceroPackage.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/compileTransaction/stash-dir/GridRenderManager.class.uniqueId3 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
- package/lib/module/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/module/android/build.gradle +85 -0
- package/lib/module/android/src/main/AndroidManifest.xml +7 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +34 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +608 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +298 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +118 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +64 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +107 -0
- package/lib/module/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +166 -0
- package/lib/module/android/src/main/res/raw/debug_fragment_shader.glsl +13 -0
- package/lib/module/android/src/main/res/raw/debug_vertex_shader.glsl +13 -0
- package/lib/module/android/src/main/res/raw/fragment_shader.glsl +98 -0
- package/lib/module/android/src/main/res/raw/vertex_shader.glsl +20 -0
- package/lib/module/babel.config.js +5 -0
- package/lib/module/babel.config.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lib/commonjs/README.md +61 -0
- package/lib/module/lib/commonjs/android/build.gradle +85 -0
- package/lib/module/lib/commonjs/android/src/main/AndroidManifest.xml +7 -0
- package/lib/module/lib/commonjs/babel.config.js +7 -0
- package/lib/module/lib/commonjs/babel.config.js.map +1 -0
- package/lib/module/lib/commonjs/index.js +20 -0
- package/lib/module/lib/commonjs/index.js.map +1 -0
- package/lib/module/lib/commonjs/package.json +73 -0
- package/lib/module/lib/commonjs/react-native-builder-bob.config.js +13 -0
- package/lib/module/lib/commonjs/react-native-builder-bob.config.js.map +1 -0
- package/lib/module/lib/commonjs/src/AguaceroContext.js +15 -0
- package/lib/module/lib/commonjs/src/AguaceroContext.js.map +1 -0
- package/lib/module/lib/commonjs/src/GridRenderLayer.js +155 -0
- package/lib/module/lib/commonjs/src/GridRenderLayer.js.map +1 -0
- package/lib/module/lib/commonjs/src/GridRenderLayerNativeComponent.js +15 -0
- package/lib/module/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -0
- package/lib/module/lib/commonjs/src/MapManager.js +187 -0
- package/lib/module/lib/commonjs/src/MapManager.js.map +1 -0
- package/lib/module/lib/commonjs/src/MapRegistry.js +36 -0
- package/lib/module/lib/commonjs/src/MapRegistry.js.map +1 -0
- package/lib/module/lib/commonjs/src/StyleApplicator.js +286 -0
- package/lib/module/lib/commonjs/src/StyleApplicator.js.map +1 -0
- package/lib/module/lib/commonjs/src/WeatherLayerManager.js +801 -0
- package/lib/module/lib/commonjs/src/WeatherLayerManager.js.map +1 -0
- package/lib/module/lib/commonjs/tsconfig.json +24 -0
- package/lib/module/package.json +73 -0
- package/lib/module/react-native-builder-bob.config.js +11 -0
- package/lib/module/react-native-builder-bob.config.js.map +1 -0
- package/lib/module/src/AguaceroContext.js +5 -0
- package/lib/module/src/AguaceroContext.js.map +1 -0
- package/lib/module/src/GridRenderLayer.js +125 -0
- package/lib/module/src/GridRenderLayer.js.map +1 -0
- package/lib/module/src/GridRenderLayerNativeComponent.js +5 -0
- package/lib/module/src/GridRenderLayerNativeComponent.js.map +1 -0
- package/lib/module/src/MapManager.js +155 -0
- package/lib/module/src/MapManager.js.map +1 -0
- package/lib/module/src/MapRegistry.js +30 -0
- package/lib/module/src/MapRegistry.js.map +1 -0
- package/lib/module/src/StyleApplicator.js +255 -0
- package/lib/module/src/StyleApplicator.js.map +1 -0
- package/lib/module/src/WeatherLayerManager.js +775 -0
- package/lib/module/src/WeatherLayerManager.js.map +1 -0
- package/lib/module/tsconfig.json +24 -0
- package/lib/typescript/babel.config.d.ts +3 -0
- package/lib/typescript/babel.config.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/react-native-builder-bob.config.d.ts +6 -0
- package/lib/typescript/react-native-builder-bob.config.d.ts.map +1 -0
- package/lib/typescript/src/AguaceroContext.d.ts +2 -0
- package/lib/typescript/src/AguaceroContext.d.ts.map +1 -0
- package/lib/typescript/src/GridRenderLayer.d.ts +2 -0
- package/lib/typescript/src/GridRenderLayer.d.ts.map +1 -0
- package/lib/typescript/src/GridRenderLayerNativeComponent.d.ts +12 -0
- package/lib/typescript/src/GridRenderLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/MapManager.d.ts +8 -0
- package/lib/typescript/src/MapManager.d.ts.map +1 -0
- package/lib/typescript/src/MapRegistry.d.ts +12 -0
- package/lib/typescript/src/MapRegistry.d.ts.map +1 -0
- package/lib/typescript/src/StyleApplicator.d.ts +4 -0
- package/lib/typescript/src/StyleApplicator.d.ts.map +1 -0
- package/lib/typescript/src/WeatherLayerManager.d.ts +2 -0
- package/lib/typescript/src/WeatherLayerManager.d.ts.map +1 -0
- package/package.json +53 -15
- package/src/AguaceroContext.js +0 -4
- package/src/GridRenderLayer.js +0 -121
- package/src/MapManager.js +0 -158
- package/src/MapRegistry.js +0 -35
- package/src/StyleApplicator.js +0 -241
- package/src/WeatherLayerManager.js +0 -754
package/README.md
CHANGED
|
@@ -1,16 +1,61 @@
|
|
|
1
|
+
# @aguacerowx/react-native
|
|
2
|
+
|
|
3
|
+
Welcome to the official React Native SDK for AguaceroWX.
|
|
4
|
+
|
|
1
5
|
## Installation
|
|
2
6
|
```bash
|
|
3
7
|
npm install @aguacerowx/react-native
|
|
4
8
|
```
|
|
5
9
|
|
|
6
|
-
###
|
|
10
|
+
### Important Prerequisite: Mapbox SDK v11
|
|
11
|
+
|
|
12
|
+
This library is built on top of `@rnmapbox/maps` and requires the Mapbox Maps SDK v11 for both iOS and Android. You must perform the following manual setup steps to configure your project correctly.
|
|
13
|
+
|
|
14
|
+
## iOS Setup
|
|
15
|
+
|
|
16
|
+
You must explicitly enable Mapbox SDK v11 in your iOS project.
|
|
17
|
+
|
|
18
|
+
### Modify your Podfile
|
|
19
|
+
|
|
20
|
+
Open your project's `ios/Podfile` and add the following lines near the top of the file. This tells the `@rnmapbox/maps` library to use a v11 version of the native SDK.
|
|
21
|
+
```ruby
|
|
22
|
+
# Add these lines near the top of your ios/Podfile
|
|
23
|
+
require_relative '../node_modules/@rnmapbox/maps/scripts/mapbox-rb'
|
|
24
|
+
$RNMapboxMapsVersion = '~> 11.0' # This enforces Mapbox SDK v11
|
|
25
|
+
use_mapbox_maps!
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Install Pods
|
|
29
|
+
|
|
30
|
+
After saving the Podfile, navigate to your `ios` directory in the terminal and run a fresh pod installation.
|
|
31
|
+
```bash
|
|
32
|
+
cd ios
|
|
33
|
+
pod install
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Android Setup
|
|
37
|
+
|
|
38
|
+
Android requires configuration for Mapbox credentials and an additional native dependency.
|
|
39
|
+
|
|
40
|
+
### Configure Mapbox Credentials
|
|
41
|
+
|
|
42
|
+
You will need a secret token with `DOWNLOADS:READ` scope and a public token.
|
|
43
|
+
|
|
44
|
+
In your `android/gradle.properties` file, add your secret token:
|
|
45
|
+
```properties
|
|
46
|
+
# android/gradle.properties
|
|
47
|
+
MAPBOX_DOWNLOADS_TOKEN=sk.xxxxxxxxxx
|
|
48
|
+
```
|
|
7
49
|
|
|
8
|
-
|
|
50
|
+
In your `android/app/build.gradle` file, add your public token inside the `defaultConfig` block:
|
|
9
51
|
```groovy
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
52
|
+
// android/app/build.gradle
|
|
53
|
+
android {
|
|
54
|
+
defaultConfig {
|
|
55
|
+
// ... other configs
|
|
56
|
+
buildConfigField "String", "MAPBOX_ACCESS_TOKEN", "\"pk.xxxxxxxxxx\""
|
|
57
|
+
}
|
|
13
58
|
}
|
|
14
59
|
```
|
|
15
60
|
|
|
16
|
-
|
|
61
|
+
After completing these steps, your application should be correctly configured to use the library. For more detailed information or troubleshooting, please refer to the official `@rnmapbox/maps` documentation.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#Wed Nov
|
|
1
|
+
#Wed Nov 12 11:54:27 EST 2025
|
|
2
2
|
com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/fragment_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\fragment_shader.glsl
|
|
3
3
|
com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/debug_vertex_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\debug_vertex_shader.glsl
|
|
4
4
|
com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/vertex_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\vertex_shader.glsl
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -13,6 +13,10 @@ uniform vec2 u_data_range;
|
|
|
13
13
|
uniform vec2 u_texture_size;
|
|
14
14
|
uniform int u_smoothing;
|
|
15
15
|
|
|
16
|
+
// --- START OF FIX: Add the new uniform ---
|
|
17
|
+
uniform int u_scale_type; // 0 for linear, 1 for sqrt
|
|
18
|
+
// --- END OF FIX ---
|
|
19
|
+
|
|
16
20
|
// Custom bilinear filtering that respects NaN boundaries
|
|
17
21
|
float sampleDataTextureSmooth(vec2 uv) {
|
|
18
22
|
float missing_in_texture_range = u_missing_quantized + 128.0;
|
|
@@ -68,9 +72,16 @@ void main() {
|
|
|
68
72
|
discard;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
//
|
|
75
|
+
// Step 1: Standard linear dequantization
|
|
72
76
|
float quantized_value = value_in_texture - 128.0;
|
|
73
|
-
float
|
|
77
|
+
float intermediate_value = quantized_value * u_scale + u_offset;
|
|
78
|
+
float raw_value = intermediate_value; // Default to linear
|
|
79
|
+
|
|
80
|
+
// Step 2: Apply non-linear inverse scaling if specified
|
|
81
|
+
if (u_scale_type == 1) { // 1 represents 'sqrt'
|
|
82
|
+
// Square the intermediate value while preserving its sign
|
|
83
|
+
raw_value = intermediate_value * abs(intermediate_value);
|
|
84
|
+
}
|
|
74
85
|
|
|
75
86
|
// If the data is below the specified minimum range, make it invisible.
|
|
76
87
|
if (raw_value < u_data_range.x) {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -32,7 +32,8 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
32
32
|
|
|
33
33
|
// Uniform and Attribute locations
|
|
34
34
|
private int uMatrix, uDataTexture, uColormapTexture, uOpacity, uDataRange,
|
|
35
|
-
uScale, uOffset, uMissingQuantized, uTextureSize, uConversionType, uSmoothing
|
|
35
|
+
uScale, uOffset, uMissingQuantized, uTextureSize, uConversionType, uSmoothing,
|
|
36
|
+
uScaleType;
|
|
36
37
|
private int aPosition, aTexCoord;
|
|
37
38
|
|
|
38
39
|
// GPU-side resource IDs
|
|
@@ -52,13 +53,16 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
52
53
|
private int textureHeight = 0;
|
|
53
54
|
private int conversionType = 0;
|
|
54
55
|
private boolean smoothingEnabled = true;
|
|
56
|
+
private int scaleType = 0;
|
|
55
57
|
private boolean textureParametersDirty = true;
|
|
58
|
+
private volatile boolean isVisible = true;
|
|
56
59
|
|
|
57
60
|
// Pending data buffers for thread-safe uploads
|
|
58
61
|
private final Object dataLock = new Object();
|
|
59
62
|
private ByteBuffer pendingDataBuffer = null;
|
|
60
63
|
private int pendingNx = 0, pendingNy = 0;
|
|
61
64
|
private float pendingScale = 1.0f, pendingOffset = 0.0f, pendingMissing = 127.0f;
|
|
65
|
+
private int pendingScaleType = 0;
|
|
62
66
|
private ByteBuffer pendingColormapBuffer = null;
|
|
63
67
|
private FloatBuffer pendingVertexBuffer = null;
|
|
64
68
|
private ShortBuffer pendingIndexBuffer = null;
|
|
@@ -115,13 +119,22 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
115
119
|
uTextureSize = GLES20.glGetUniformLocation(program, "u_texture_size");
|
|
116
120
|
uConversionType = GLES20.glGetUniformLocation(program, "u_conversion_type");
|
|
117
121
|
uSmoothing = GLES20.glGetUniformLocation(program, "u_smoothing");
|
|
122
|
+
uScaleType = GLES20.glGetUniformLocation(program, "u_scale_type");
|
|
118
123
|
aPosition = GLES20.glGetAttribLocation(program, "a_position");
|
|
119
124
|
aTexCoord = GLES20.glGetAttribLocation(program, "a_texCoord");
|
|
120
125
|
}
|
|
121
126
|
|
|
127
|
+
public void clearData() {
|
|
128
|
+
this.isVisible = false;
|
|
129
|
+
// Also clear any pending data to prevent a stale frame from rendering
|
|
130
|
+
synchronized (dataLock) {
|
|
131
|
+
pendingDataBuffer = null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
122
135
|
@Override
|
|
123
136
|
public void render(CustomLayerRenderParameters renderParameters) {
|
|
124
|
-
if (program == 0) return;
|
|
137
|
+
if (program == 0 || !isVisible) return;
|
|
125
138
|
|
|
126
139
|
synchronized (dataLock) {
|
|
127
140
|
if (pendingVertexBuffer != null && pendingIndexBuffer != null) {
|
|
@@ -149,6 +162,7 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
149
162
|
this.scale = pendingScale;
|
|
150
163
|
this.offset = pendingOffset;
|
|
151
164
|
this.missingQuantized = pendingMissing;
|
|
165
|
+
this.scaleType = pendingScaleType;
|
|
152
166
|
|
|
153
167
|
if (dataTextureId == 0) {
|
|
154
168
|
int[] t = new int[1];
|
|
@@ -228,6 +242,7 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
228
242
|
GLES20.glUniform2f(uTextureSize, (float) textureWidth, (float) textureHeight);
|
|
229
243
|
GLES20.glUniform1i(uConversionType, conversionType);
|
|
230
244
|
GLES20.glUniform1i(uSmoothing, smoothingEnabled ? 1 : 0);
|
|
245
|
+
GLES20.glUniform1i(uScaleType, this.scaleType);
|
|
231
246
|
|
|
232
247
|
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
|
|
233
248
|
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
|
|
@@ -281,58 +296,9 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
281
296
|
this.textureParametersDirty = true;
|
|
282
297
|
}
|
|
283
298
|
}
|
|
284
|
-
|
|
285
|
-
public void updateDataTextureFromFile(String filePath, int nx, int ny, float scale, float offset, float missing) {
|
|
286
|
-
Log.d(TAG, "Starting texture update from file: " + filePath);
|
|
287
|
-
|
|
288
|
-
// This whole block runs on a background thread thanks to React Native,
|
|
289
|
-
// so file I/O and decompression are safe here.
|
|
290
|
-
File file = new File(filePath);
|
|
291
|
-
if (!file.exists()) {
|
|
292
|
-
Log.e(TAG, "File not found for texture update: " + filePath);
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
try (FileInputStream fis = new FileInputStream(file)) {
|
|
297
|
-
// 1. Read the compressed file into a byte array
|
|
298
|
-
byte[] compressedData = new byte[(int) file.length()];
|
|
299
|
-
fis.read(compressedData);
|
|
300
|
-
|
|
301
|
-
// 2. Decompress using the zstd-jni library
|
|
302
|
-
// NOTE: The decompressed size needs to be known. We assume it's the grid size.
|
|
303
|
-
// If your encoding is different, you may need to adjust this.
|
|
304
|
-
long decompressedSize = (long) nx * ny;
|
|
305
|
-
byte[] decompressedDeltas = Zstd.decompress(compressedData, (int) decompressedSize);
|
|
306
|
-
|
|
307
|
-
// 3. Reconstruct delta-encoded data (Ported from your AguaceroCore.js)
|
|
308
|
-
byte[] reconstructedData = new byte[decompressedDeltas.length];
|
|
309
|
-
if (decompressedDeltas.length > 0) {
|
|
310
|
-
// First value is absolute
|
|
311
|
-
reconstructedData[0] = decompressedDeltas[0];
|
|
312
|
-
// Subsequent values are deltas
|
|
313
|
-
for (int i = 1; i < decompressedDeltas.length; i++) {
|
|
314
|
-
reconstructedData[i] = (byte) (reconstructedData[i - 1] + decompressedDeltas[i]);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// 4. Transform for GPU texture format (signed to unsigned)
|
|
319
|
-
byte[] textureData = new byte[reconstructedData.length];
|
|
320
|
-
for (int i = 0; i < reconstructedData.length; i++) {
|
|
321
|
-
textureData[i] = (byte) (reconstructedData[i] + 128);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// 5. Queue the final data for OpenGL using your existing thread-safe mechanism
|
|
325
|
-
updateDataTexture(textureData, nx, ny, scale, offset, missing);
|
|
326
|
-
Log.d(TAG, "Successfully queued texture data from file: " + filePath);
|
|
327
|
-
|
|
328
|
-
} catch (IOException e) {
|
|
329
|
-
Log.e(TAG, "Failed to read or decompress file: " + filePath, e);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
299
|
|
|
334
300
|
// This existing method is now used by both the old JS path and our new native path
|
|
335
|
-
public void updateDataTexture(byte[] bytes, int nx, int ny, float scale, float offset, float missing) {
|
|
301
|
+
public void updateDataTexture(byte[] bytes, int nx, int ny, float scale, float offset, float missing, String scaleType) {
|
|
336
302
|
ByteBuffer dataBuffer = ByteBuffer.allocateDirect(bytes.length);
|
|
337
303
|
dataBuffer.put(bytes);
|
|
338
304
|
dataBuffer.position(0);
|
|
@@ -343,7 +309,10 @@ public class GridRenderLayer implements CustomLayerHost {
|
|
|
343
309
|
this.pendingScale = scale;
|
|
344
310
|
this.pendingOffset = offset;
|
|
345
311
|
this.pendingMissing = missing;
|
|
312
|
+
this.pendingScaleType = "sqrt".equals(scaleType) ? 1 : 0;
|
|
346
313
|
}
|
|
314
|
+
// When new data is provided, ensure the layer is visible
|
|
315
|
+
this.isVisible = true;
|
|
347
316
|
}
|
|
348
317
|
|
|
349
318
|
public void updateColormapTexture(ByteBuffer data) {
|
|
@@ -38,13 +38,18 @@ public class GridRenderLayerView extends FrameLayout {
|
|
|
38
38
|
private static float lastDataScale = 1.0f;
|
|
39
39
|
private static float lastDataOffset = 0.0f;
|
|
40
40
|
private static float lastDataMissing = 127.0f;
|
|
41
|
+
private static String lastDataScaleType = "linear";
|
|
41
42
|
|
|
42
43
|
public GridRenderLayerView(@NonNull ThemedReactContext context) {
|
|
43
44
|
super(context);
|
|
44
45
|
this.gridLayerImplementation = new GridRenderLayer(context);
|
|
45
46
|
}
|
|
47
|
+
|
|
48
|
+
public static String getLastDataScaleType() {
|
|
49
|
+
return lastDataScaleType;
|
|
50
|
+
}
|
|
46
51
|
|
|
47
|
-
public void updateDataTexture(String dataFilePathOrBase64, int nx, int ny, float scale, float offset, float missing) {
|
|
52
|
+
public void updateDataTexture(String dataFilePathOrBase64, int nx, int ny, float scale, float offset, float missing, String scaleType) {
|
|
48
53
|
if (dataFilePathOrBase64 == null) {
|
|
49
54
|
Log.e(TAG, "❌ [View] Data from manager is null!");
|
|
50
55
|
return;
|
|
@@ -78,8 +83,9 @@ public class GridRenderLayerView extends FrameLayout {
|
|
|
78
83
|
lastDataScale = scale;
|
|
79
84
|
lastDataOffset = offset;
|
|
80
85
|
lastDataMissing = missing;
|
|
86
|
+
lastDataScaleType = scaleType; // FIX: Update the cached scaleType
|
|
81
87
|
|
|
82
|
-
gridLayerImplementation.updateDataTexture(finalTextureBytes, nx, ny, scale, offset, missing);
|
|
88
|
+
gridLayerImplementation.updateDataTexture(finalTextureBytes, nx, ny, scale, offset, missing, scaleType);
|
|
83
89
|
triggerRepaint();
|
|
84
90
|
|
|
85
91
|
} catch (Exception e) {
|
|
@@ -284,4 +290,9 @@ public class GridRenderLayerView extends FrameLayout {
|
|
|
284
290
|
lastDataOffset = offset;
|
|
285
291
|
lastDataMissing = missing;
|
|
286
292
|
}
|
|
293
|
+
|
|
294
|
+
public void clearData() {
|
|
295
|
+
gridLayerImplementation.clearData();
|
|
296
|
+
triggerRepaint();
|
|
297
|
+
}
|
|
287
298
|
}
|
|
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReadableMap;
|
|
|
8
8
|
import com.facebook.react.uimanager.SimpleViewManager;
|
|
9
9
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
10
10
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
11
|
+
import android.util.Log;
|
|
11
12
|
|
|
12
13
|
import java.util.Map;
|
|
13
14
|
import java.util.HashMap;
|
|
@@ -19,6 +20,7 @@ public class GridRenderManager extends SimpleViewManager<GridRenderLayerView> {
|
|
|
19
20
|
private static final int COMMAND_UPDATE_COLORMAP_TEXTURE = 2;
|
|
20
21
|
private static final int COMMAND_UPDATE_GEOMETRY = 3;
|
|
21
22
|
private static final int COMMAND_UPDATE_DATA_PARAMETERS = 4;
|
|
23
|
+
private static final int COMMAND_CLEAR = 5;
|
|
22
24
|
|
|
23
25
|
@NonNull
|
|
24
26
|
@Override
|
|
@@ -65,22 +67,23 @@ public class GridRenderManager extends SimpleViewManager<GridRenderLayerView> {
|
|
|
65
67
|
commands.put("updateColormapTexture", COMMAND_UPDATE_COLORMAP_TEXTURE);
|
|
66
68
|
commands.put("updateGeometry", COMMAND_UPDATE_GEOMETRY);
|
|
67
69
|
commands.put("updateDataParameters", COMMAND_UPDATE_DATA_PARAMETERS);
|
|
70
|
+
commands.put("clear", COMMAND_CLEAR);
|
|
68
71
|
return commands;
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
@Override
|
|
72
75
|
public void receiveCommand(@NonNull GridRenderLayerView view, int commandId, @Nullable ReadableArray args) {
|
|
73
76
|
switch (commandId) {
|
|
74
|
-
case COMMAND_UPDATE_DATA_TEXTURE:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
case COMMAND_UPDATE_DATA_TEXTURE:
|
|
78
|
+
String data = args.getString(0);
|
|
79
|
+
int nx = args.getInt(1);
|
|
80
|
+
int ny = args.getInt(2);
|
|
81
|
+
float scale = (float) args.getDouble(3);
|
|
82
|
+
float offset = (float) args.getDouble(4);
|
|
83
|
+
float missing = (float) args.getDouble(5);
|
|
84
|
+
String scaleType = args.getString(6);
|
|
85
|
+
|
|
86
|
+
view.updateDataTexture(data, nx, ny, scale, offset, missing, scaleType);
|
|
84
87
|
break;
|
|
85
88
|
|
|
86
89
|
case COMMAND_UPDATE_COLORMAP_TEXTURE:
|
|
@@ -100,12 +103,16 @@ public class GridRenderManager extends SimpleViewManager<GridRenderLayerView> {
|
|
|
100
103
|
|
|
101
104
|
case COMMAND_UPDATE_DATA_PARAMETERS:
|
|
102
105
|
if (args != null && args.size() >= 3) {
|
|
103
|
-
float
|
|
104
|
-
float
|
|
105
|
-
float
|
|
106
|
-
view.updateDataParameters(
|
|
106
|
+
float scaleParam = (float) args.getDouble(0);
|
|
107
|
+
float offsetParam = (float) args.getDouble(1);
|
|
108
|
+
float missingParam = (float) args.getDouble(2);
|
|
109
|
+
view.updateDataParameters(scaleParam, offsetParam, missingParam);
|
|
107
110
|
}
|
|
108
111
|
break;
|
|
112
|
+
|
|
113
|
+
case COMMAND_CLEAR:
|
|
114
|
+
view.clearData();
|
|
115
|
+
break;
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
}
|
|
@@ -13,6 +13,7 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
13
13
|
import com.facebook.react.bridge.ReadableMap;
|
|
14
14
|
import com.facebook.react.bridge.WritableMap;
|
|
15
15
|
import com.facebook.react.modules.network.OkHttpClientProvider;
|
|
16
|
+
import android.util.Log;
|
|
16
17
|
|
|
17
18
|
import org.json.JSONObject;
|
|
18
19
|
|
|
@@ -108,9 +109,20 @@ public class WeatherFrameProcessorModule extends ReactContextBaseJavaModule {
|
|
|
108
109
|
|
|
109
110
|
// The rest of your logic remains the same
|
|
110
111
|
JSONObject jsonResponse = new JSONObject(responseString);
|
|
112
|
+
if (!jsonResponse.has("data") || !jsonResponse.has("encoding")) {
|
|
113
|
+
// If the core keys are missing, the response is invalid. Log it and fail.
|
|
114
|
+
throw new IOException("Invalid API response. 'data' or 'encoding' key is missing. Response: " + responseString);
|
|
115
|
+
}
|
|
116
|
+
|
|
111
117
|
String b64CompressedData = jsonResponse.getString("data");
|
|
112
118
|
JSONObject encoding = jsonResponse.getJSONObject("encoding");
|
|
113
119
|
|
|
120
|
+
|
|
121
|
+
if (!encoding.has("scale") || !encoding.has("offset") || !encoding.has("missing_quantized")) {
|
|
122
|
+
// If the encoding object is missing required values, fail with a clear error.
|
|
123
|
+
throw new IOException("Invalid 'encoding' object in API response. Required keys are missing. Response: " + responseString);
|
|
124
|
+
}
|
|
125
|
+
|
|
114
126
|
byte[] compressedData = Base64.decode(b64CompressedData, Base64.DEFAULT);
|
|
115
127
|
|
|
116
128
|
File cacheDir = reactContext.getCacheDir();
|
|
@@ -128,6 +140,9 @@ public class WeatherFrameProcessorModule extends ReactContextBaseJavaModule {
|
|
|
128
140
|
responseMap.putDouble("scale", encoding.getDouble("scale"));
|
|
129
141
|
responseMap.putDouble("offset", encoding.getDouble("offset"));
|
|
130
142
|
responseMap.putDouble("missing", encoding.getDouble("missing_quantized"));
|
|
143
|
+
if (encoding.has("scale_type")) {
|
|
144
|
+
responseMap.putString("scaleType", encoding.getString("scale_type"));
|
|
145
|
+
}
|
|
131
146
|
responseMap.putString("dataAsBase64", b64CompressedData);
|
|
132
147
|
|
|
133
148
|
callback.invoke(null, responseMap);
|
|
@@ -13,6 +13,10 @@ uniform vec2 u_data_range;
|
|
|
13
13
|
uniform vec2 u_texture_size;
|
|
14
14
|
uniform int u_smoothing;
|
|
15
15
|
|
|
16
|
+
// --- START OF FIX: Add the new uniform ---
|
|
17
|
+
uniform int u_scale_type; // 0 for linear, 1 for sqrt
|
|
18
|
+
// --- END OF FIX ---
|
|
19
|
+
|
|
16
20
|
// Custom bilinear filtering that respects NaN boundaries
|
|
17
21
|
float sampleDataTextureSmooth(vec2 uv) {
|
|
18
22
|
float missing_in_texture_range = u_missing_quantized + 128.0;
|
|
@@ -68,9 +72,16 @@ void main() {
|
|
|
68
72
|
discard;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
//
|
|
75
|
+
// Step 1: Standard linear dequantization
|
|
72
76
|
float quantized_value = value_in_texture - 128.0;
|
|
73
|
-
float
|
|
77
|
+
float intermediate_value = quantized_value * u_scale + u_offset;
|
|
78
|
+
float raw_value = intermediate_value; // Default to linear
|
|
79
|
+
|
|
80
|
+
// Step 2: Apply non-linear inverse scaling if specified
|
|
81
|
+
if (u_scale_type == 1) { // 1 represents 'sqrt'
|
|
82
|
+
// Square the intermediate value while preserving its sign
|
|
83
|
+
raw_value = intermediate_value * abs(intermediate_value);
|
|
84
|
+
}
|
|
74
85
|
|
|
75
86
|
// If the data is below the specified minimum range, make it invisible.
|
|
76
87
|
if (raw_value < u_data_range.x) {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// packages/react-native/ios/GridRenderLayer.swift
|
|
2
|
+
|
|
3
|
+
import Foundation
|
|
4
|
+
import UIKit
|
|
5
|
+
|
|
6
|
+
// The class must be `public` to be visible outside of the SDK module.
|
|
7
|
+
// `@objc` exposes this class to the Objective-C runtime.
|
|
8
|
+
@objc(GridRenderLayer)
|
|
9
|
+
public class GridRenderLayer: UIView {
|
|
10
|
+
|
|
11
|
+
// ---- Properties ----
|
|
12
|
+
// These properties must also be `@objc public` so the React Native
|
|
13
|
+
// framework can set them from the props defined in the manager.
|
|
14
|
+
@objc public var opacity: Float = 1.0
|
|
15
|
+
@objc public var dataRange: NSArray = []
|
|
16
|
+
@objc public var belowID: NSString = ""
|
|
17
|
+
@objc public var smoothing: Bool = true
|
|
18
|
+
|
|
19
|
+
// ---- Initializers ----
|
|
20
|
+
override public init(frame: CGRect) {
|
|
21
|
+
super.init(frame: frame)
|
|
22
|
+
// For testing, make the view highly visible to confirm it has rendered.
|
|
23
|
+
self.backgroundColor = UIColor.systemTeal
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
required public init?(coder: NSCoder) {
|
|
27
|
+
fatalError("init(coder:) has not been implemented")
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ---- Custom Methods ----
|
|
31
|
+
// These are the functions that will be called by the Objective-C++ Manager.
|
|
32
|
+
// They must be `public` and exposed to Objective-C with `@objc`.
|
|
33
|
+
//
|
|
34
|
+
// NOTE: Objective-C will see this Swift function:
|
|
35
|
+
// func updateGeometry(corners: [String: Any], gridDef: [String: Any])
|
|
36
|
+
// as this Objective-C selector:
|
|
37
|
+
// - (void)updateGeometryWithCorners:(NSDictionary *)corners gridDef:(NSDictionary *)gridDef;
|
|
38
|
+
|
|
39
|
+
@objc
|
|
40
|
+
public func updateGeometry(corners: [String: Any], gridDef: [String: Any]) {
|
|
41
|
+
NSLog("[AguaceroSDK] Swift: updateGeometry called successfully.")
|
|
42
|
+
// Your actual rendering logic goes here.
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@objc
|
|
46
|
+
public func updateDataTexture(data: String, nx: NSNumber, ny: NSNumber, scale: NSNumber, offset: NSNumber, missing: NSNumber) {
|
|
47
|
+
NSLog("[AguaceroSDK] Swift: updateDataTexture called successfully.")
|
|
48
|
+
// Your actual rendering logic goes here.
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@objc
|
|
52
|
+
public func updateColormapTexture(colormapAsBase64: String) {
|
|
53
|
+
NSLog("[AguaceroSDK] Swift: updateColormapTexture called successfully.")
|
|
54
|
+
// Your actual rendering logic goes here.
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@objc
|
|
58
|
+
public func updateDataParameters(scale: NSNumber, offset: NSNumber, missing: NSNumber) {
|
|
59
|
+
NSLog("[AguaceroSDK] Swift: updateDataParameters called successfully.")
|
|
60
|
+
// Your actual rendering logic goes here.
|
|
61
|
+
}
|
|
62
|
+
}
|