@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.
Files changed (264) hide show
  1. package/README.md +51 -6
  2. package/android/build/.transforms/78b892a9dae44f36e51ff0649e9c6e36/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.dex +0 -0
  4. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer.dex +0 -0
  5. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayerView.dex +0 -0
  6. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderManager.dex +0 -0
  7. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/WeatherFrameProcessorModule.dex +0 -0
  8. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  9. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  10. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  11. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
  12. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  13. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  14. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  15. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  16. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  17. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +13 -2
  18. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  19. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  20. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  21. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  22. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  23. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  24. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/AguaceroPackage.class.uniqueId1 +0 -0
  25. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
  26. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderManager.class.uniqueId3 +0 -0
  27. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
  28. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  29. package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +21 -52
  30. package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +13 -2
  31. package/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +21 -14
  32. package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +15 -0
  33. package/android/src/main/res/raw/fragment_shader.glsl +13 -2
  34. package/ios/GridRenderLayer.swift +62 -0
  35. package/ios/GridRenderLayerManager.mm +140 -0
  36. package/ios/aguacerowx-react-native.podspec +29 -0
  37. package/lib/commonjs/README.md +61 -0
  38. package/lib/commonjs/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -0
  39. package/lib/commonjs/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +8 -0
  40. package/lib/commonjs/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  41. package/lib/commonjs/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  42. package/lib/commonjs/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  43. package/lib/commonjs/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  44. package/lib/commonjs/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  45. package/lib/commonjs/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +4 -0
  46. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
  47. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
  48. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  49. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
  50. package/lib/commonjs/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +5 -0
  51. package/lib/commonjs/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  52. package/lib/commonjs/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  53. package/lib/commonjs/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  54. package/lib/commonjs/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  55. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  56. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  57. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  58. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  59. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  60. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  61. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  62. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  63. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  64. package/lib/commonjs/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +6 -0
  65. package/lib/commonjs/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +8 -0
  66. package/lib/commonjs/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +8 -0
  67. package/lib/commonjs/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  68. package/lib/commonjs/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  69. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +13 -0
  70. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +13 -0
  71. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +98 -0
  72. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +20 -0
  73. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  74. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  75. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  76. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  77. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  78. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  79. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  80. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  81. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  82. package/lib/commonjs/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  83. package/lib/commonjs/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +5 -0
  84. package/lib/commonjs/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  85. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/AguaceroPackage.class.uniqueId1 +0 -0
  86. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
  87. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderManager.class.uniqueId3 +0 -0
  88. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
  89. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  90. package/lib/commonjs/android/build.gradle +85 -0
  91. package/lib/commonjs/android/src/main/AndroidManifest.xml +7 -0
  92. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +34 -0
  93. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +608 -0
  94. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +298 -0
  95. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +118 -0
  96. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +64 -0
  97. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +107 -0
  98. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +166 -0
  99. package/lib/commonjs/android/src/main/res/raw/debug_fragment_shader.glsl +13 -0
  100. package/lib/commonjs/android/src/main/res/raw/debug_vertex_shader.glsl +13 -0
  101. package/lib/commonjs/android/src/main/res/raw/fragment_shader.glsl +98 -0
  102. package/lib/commonjs/android/src/main/res/raw/vertex_shader.glsl +20 -0
  103. package/lib/commonjs/babel.config.js +7 -0
  104. package/lib/commonjs/babel.config.js.map +1 -0
  105. package/lib/commonjs/index.js +20 -0
  106. package/lib/commonjs/index.js.map +1 -0
  107. package/lib/commonjs/package.json +73 -0
  108. package/lib/commonjs/react-native-builder-bob.config.js +13 -0
  109. package/lib/commonjs/react-native-builder-bob.config.js.map +1 -0
  110. package/lib/commonjs/src/AguaceroContext.js +11 -0
  111. package/lib/commonjs/src/AguaceroContext.js.map +1 -0
  112. package/lib/commonjs/src/GridRenderLayer.js +132 -0
  113. package/lib/commonjs/src/GridRenderLayer.js.map +1 -0
  114. package/lib/commonjs/src/GridRenderLayerNativeComponent.js +11 -0
  115. package/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -0
  116. package/lib/commonjs/src/MapManager.js +164 -0
  117. package/lib/commonjs/src/MapManager.js.map +1 -0
  118. package/lib/commonjs/src/MapRegistry.js +36 -0
  119. package/lib/commonjs/src/MapRegistry.js.map +1 -0
  120. package/lib/commonjs/src/StyleApplicator.js +262 -0
  121. package/lib/commonjs/src/StyleApplicator.js.map +1 -0
  122. package/lib/commonjs/src/WeatherLayerManager.js +782 -0
  123. package/lib/commonjs/src/WeatherLayerManager.js.map +1 -0
  124. package/lib/commonjs/tsconfig.json +24 -0
  125. package/lib/module/README.md +61 -0
  126. package/lib/module/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -0
  127. package/lib/module/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +8 -0
  128. package/lib/module/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  129. package/lib/module/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  130. package/lib/module/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  131. package/lib/module/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  132. package/lib/module/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  133. package/lib/module/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +4 -0
  134. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
  135. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
  136. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  137. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
  138. package/lib/module/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +5 -0
  139. package/lib/module/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  140. package/lib/module/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  141. package/lib/module/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  142. package/lib/module/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  143. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  144. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  145. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  146. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  147. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  148. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  149. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  150. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  151. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  152. package/lib/module/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +6 -0
  153. package/lib/module/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +8 -0
  154. package/lib/module/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +8 -0
  155. package/lib/module/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  156. package/lib/module/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  157. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +13 -0
  158. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +13 -0
  159. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +98 -0
  160. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +20 -0
  161. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  162. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  163. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  164. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  165. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  166. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  167. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  168. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  169. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  170. package/lib/module/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  171. package/lib/module/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +5 -0
  172. package/lib/module/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  173. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/AguaceroPackage.class.uniqueId1 +0 -0
  174. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
  175. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderManager.class.uniqueId3 +0 -0
  176. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/InspectorModule.class.uniqueId0 +0 -0
  177. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  178. package/lib/module/android/build.gradle +85 -0
  179. package/lib/module/android/src/main/AndroidManifest.xml +7 -0
  180. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +34 -0
  181. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +608 -0
  182. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +298 -0
  183. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +118 -0
  184. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +64 -0
  185. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +107 -0
  186. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +166 -0
  187. package/lib/module/android/src/main/res/raw/debug_fragment_shader.glsl +13 -0
  188. package/lib/module/android/src/main/res/raw/debug_vertex_shader.glsl +13 -0
  189. package/lib/module/android/src/main/res/raw/fragment_shader.glsl +98 -0
  190. package/lib/module/android/src/main/res/raw/vertex_shader.glsl +20 -0
  191. package/lib/module/babel.config.js +5 -0
  192. package/lib/module/babel.config.js.map +1 -0
  193. package/lib/module/index.js +3 -0
  194. package/lib/module/index.js.map +1 -0
  195. package/lib/module/lib/commonjs/README.md +61 -0
  196. package/lib/module/lib/commonjs/android/build.gradle +85 -0
  197. package/lib/module/lib/commonjs/android/src/main/AndroidManifest.xml +7 -0
  198. package/lib/module/lib/commonjs/babel.config.js +7 -0
  199. package/lib/module/lib/commonjs/babel.config.js.map +1 -0
  200. package/lib/module/lib/commonjs/index.js +20 -0
  201. package/lib/module/lib/commonjs/index.js.map +1 -0
  202. package/lib/module/lib/commonjs/package.json +73 -0
  203. package/lib/module/lib/commonjs/react-native-builder-bob.config.js +13 -0
  204. package/lib/module/lib/commonjs/react-native-builder-bob.config.js.map +1 -0
  205. package/lib/module/lib/commonjs/src/AguaceroContext.js +15 -0
  206. package/lib/module/lib/commonjs/src/AguaceroContext.js.map +1 -0
  207. package/lib/module/lib/commonjs/src/GridRenderLayer.js +155 -0
  208. package/lib/module/lib/commonjs/src/GridRenderLayer.js.map +1 -0
  209. package/lib/module/lib/commonjs/src/GridRenderLayerNativeComponent.js +15 -0
  210. package/lib/module/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -0
  211. package/lib/module/lib/commonjs/src/MapManager.js +187 -0
  212. package/lib/module/lib/commonjs/src/MapManager.js.map +1 -0
  213. package/lib/module/lib/commonjs/src/MapRegistry.js +36 -0
  214. package/lib/module/lib/commonjs/src/MapRegistry.js.map +1 -0
  215. package/lib/module/lib/commonjs/src/StyleApplicator.js +286 -0
  216. package/lib/module/lib/commonjs/src/StyleApplicator.js.map +1 -0
  217. package/lib/module/lib/commonjs/src/WeatherLayerManager.js +801 -0
  218. package/lib/module/lib/commonjs/src/WeatherLayerManager.js.map +1 -0
  219. package/lib/module/lib/commonjs/tsconfig.json +24 -0
  220. package/lib/module/package.json +73 -0
  221. package/lib/module/react-native-builder-bob.config.js +11 -0
  222. package/lib/module/react-native-builder-bob.config.js.map +1 -0
  223. package/lib/module/src/AguaceroContext.js +5 -0
  224. package/lib/module/src/AguaceroContext.js.map +1 -0
  225. package/lib/module/src/GridRenderLayer.js +125 -0
  226. package/lib/module/src/GridRenderLayer.js.map +1 -0
  227. package/lib/module/src/GridRenderLayerNativeComponent.js +5 -0
  228. package/lib/module/src/GridRenderLayerNativeComponent.js.map +1 -0
  229. package/lib/module/src/MapManager.js +155 -0
  230. package/lib/module/src/MapManager.js.map +1 -0
  231. package/lib/module/src/MapRegistry.js +30 -0
  232. package/lib/module/src/MapRegistry.js.map +1 -0
  233. package/lib/module/src/StyleApplicator.js +255 -0
  234. package/lib/module/src/StyleApplicator.js.map +1 -0
  235. package/lib/module/src/WeatherLayerManager.js +775 -0
  236. package/lib/module/src/WeatherLayerManager.js.map +1 -0
  237. package/lib/module/tsconfig.json +24 -0
  238. package/lib/typescript/babel.config.d.ts +3 -0
  239. package/lib/typescript/babel.config.d.ts.map +1 -0
  240. package/lib/typescript/index.d.ts +3 -0
  241. package/lib/typescript/index.d.ts.map +1 -0
  242. package/lib/typescript/react-native-builder-bob.config.d.ts +6 -0
  243. package/lib/typescript/react-native-builder-bob.config.d.ts.map +1 -0
  244. package/lib/typescript/src/AguaceroContext.d.ts +2 -0
  245. package/lib/typescript/src/AguaceroContext.d.ts.map +1 -0
  246. package/lib/typescript/src/GridRenderLayer.d.ts +2 -0
  247. package/lib/typescript/src/GridRenderLayer.d.ts.map +1 -0
  248. package/lib/typescript/src/GridRenderLayerNativeComponent.d.ts +12 -0
  249. package/lib/typescript/src/GridRenderLayerNativeComponent.d.ts.map +1 -0
  250. package/lib/typescript/src/MapManager.d.ts +8 -0
  251. package/lib/typescript/src/MapManager.d.ts.map +1 -0
  252. package/lib/typescript/src/MapRegistry.d.ts +12 -0
  253. package/lib/typescript/src/MapRegistry.d.ts.map +1 -0
  254. package/lib/typescript/src/StyleApplicator.d.ts +4 -0
  255. package/lib/typescript/src/StyleApplicator.d.ts.map +1 -0
  256. package/lib/typescript/src/WeatherLayerManager.d.ts +2 -0
  257. package/lib/typescript/src/WeatherLayerManager.d.ts.map +1 -0
  258. package/package.json +53 -15
  259. package/src/AguaceroContext.js +0 -4
  260. package/src/GridRenderLayer.js +0 -121
  261. package/src/MapManager.js +0 -158
  262. package/src/MapRegistry.js +0 -35
  263. package/src/StyleApplicator.js +0 -241
  264. 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
- ### Android Setup
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
- Add the zstd-jni dependency to your `android/app/build.gradle`:
50
+ In your `android/app/build.gradle` file, add your public token inside the `defaultConfig` block:
9
51
  ```groovy
10
- dependencies {
11
- // ... your other dependencies
12
- implementation 'com.github.luben:zstd-jni:1.5.7-6@aar'
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
- This dependency provides native compression support and is required for the library to function.
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.
@@ -1,4 +1,4 @@
1
- #Wed Nov 05 19:31:04 EST 2025
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
@@ -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
- // De-quantize the texture value to its actual physical value
75
+ // Step 1: Standard linear dequantization
72
76
  float quantized_value = value_in_texture - 128.0;
73
- float raw_value = quantized_value * u_scale + u_offset;
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) {
@@ -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
- if (args != null && args.size() >= 5) {
76
- String data = args.getString(0);
77
- int nx = args.getInt(1);
78
- int ny = args.getInt(2);
79
- float scale = (float) args.getDouble(3);
80
- float offset = (float) args.getDouble(4);
81
- float missing = args.size() > 5 ? (float) args.getDouble(5) : 127.0f;
82
- view.updateDataTexture(data, nx, ny, scale, offset, missing);
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 scale = (float) args.getDouble(0);
104
- float offset = (float) args.getDouble(1);
105
- float missing = (float) args.getDouble(2);
106
- view.updateDataParameters(scale, offset, missing);
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
- // De-quantize the texture value to its actual physical value
75
+ // Step 1: Standard linear dequantization
72
76
  float quantized_value = value_in_texture - 128.0;
73
- float raw_value = quantized_value * u_scale + u_offset;
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
+ }