@aguacerowx/react-native 0.0.32 → 0.0.34

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 (400) hide show
  1. package/README.md +126 -126
  2. package/aguacerowx-react-native.podspec +38 -38
  3. package/android/build.gradle +107 -107
  4. package/android/src/main/AndroidManifest.xml +6 -6
  5. package/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +33 -33
  6. package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +688 -672
  7. package/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +304 -304
  8. package/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +125 -125
  9. package/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +71 -71
  10. package/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +106 -106
  11. package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +151 -151
  12. package/android/src/main/res/raw/debug_fragment_shader.glsl +12 -12
  13. package/android/src/main/res/raw/debug_vertex_shader.glsl +12 -12
  14. package/android/src/main/res/raw/fragment_shader.glsl +188 -161
  15. package/android/src/main/res/raw/vertex_shader.glsl +19 -19
  16. package/index.js +2 -2
  17. package/ios/AguaceroPackage.m +18 -18
  18. package/ios/FragmentUniforms.swift +15 -15
  19. package/ios/GridRenderLayer.swift +1004 -986
  20. package/ios/GridRenderLayerBridge.swift +36 -36
  21. package/ios/GridRenderLayerManager.mm +157 -157
  22. package/ios/GridRenderLayerView.h +30 -30
  23. package/ios/GridRenderLayerView.m +216 -216
  24. package/ios/InspectorDataCache.swift +65 -65
  25. package/ios/InspectorModule.m +9 -9
  26. package/ios/InspectorModule.swift +63 -63
  27. package/ios/Shaders.metal +327 -190
  28. package/ios/WeatherFrameProcessorModule.m +15 -15
  29. package/ios/WeatherFrameProcessorModule.swift +103 -103
  30. package/ios/compiled-shaders/Shaders-device.metallib +0 -0
  31. package/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
  32. package/lib/commonjs/README.md +126 -126
  33. package/lib/commonjs/aguacerowx-react-native.podspec +38 -38
  34. package/lib/commonjs/android/build.gradle +107 -107
  35. package/lib/commonjs/android/src/main/AndroidManifest.xml +6 -6
  36. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +33 -33
  37. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +688 -672
  38. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +304 -304
  39. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +125 -125
  40. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +71 -71
  41. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +106 -106
  42. package/lib/commonjs/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +151 -151
  43. package/lib/commonjs/android/src/main/res/raw/debug_fragment_shader.glsl +12 -12
  44. package/lib/commonjs/android/src/main/res/raw/debug_vertex_shader.glsl +12 -12
  45. package/lib/commonjs/android/src/main/res/raw/fragment_shader.glsl +188 -161
  46. package/lib/commonjs/android/src/main/res/raw/vertex_shader.glsl +19 -19
  47. package/lib/commonjs/babel.config.js.map +1 -1
  48. package/lib/commonjs/index.js.map +1 -1
  49. package/lib/commonjs/ios/AguaceroPackage.m +18 -18
  50. package/lib/commonjs/ios/FragmentUniforms.swift +15 -15
  51. package/lib/commonjs/ios/GridRenderLayer.swift +1004 -986
  52. package/lib/commonjs/ios/GridRenderLayerBridge.swift +36 -36
  53. package/lib/commonjs/ios/GridRenderLayerManager.mm +157 -157
  54. package/lib/commonjs/ios/GridRenderLayerView.h +30 -30
  55. package/lib/commonjs/ios/GridRenderLayerView.m +216 -216
  56. package/lib/commonjs/ios/InspectorDataCache.swift +65 -65
  57. package/lib/commonjs/ios/InspectorModule.m +9 -9
  58. package/lib/commonjs/ios/InspectorModule.swift +63 -63
  59. package/lib/commonjs/ios/Shaders.metal +327 -190
  60. package/lib/commonjs/ios/WeatherFrameProcessorModule.m +15 -15
  61. package/lib/commonjs/ios/WeatherFrameProcessorModule.swift +103 -103
  62. package/lib/commonjs/ios/compiled-shaders/Shaders-device.metallib +0 -0
  63. package/lib/commonjs/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
  64. package/lib/commonjs/package.json +72 -72
  65. package/lib/commonjs/react-native-builder-bob.config.js.map +1 -1
  66. package/lib/commonjs/scripts/compile-shaders.js.map +1 -1
  67. package/lib/commonjs/scripts/compile-shaders.sh +38 -38
  68. package/lib/commonjs/src/AguaceroContext.js.map +1 -1
  69. package/lib/commonjs/src/GridRenderLayer.js.map +1 -1
  70. package/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -1
  71. package/lib/commonjs/src/MapManager.js.map +1 -1
  72. package/lib/commonjs/src/MapRegistry.js.map +1 -1
  73. package/lib/commonjs/src/StyleApplicator.js +6 -6
  74. package/lib/commonjs/src/StyleApplicator.js.map +1 -1
  75. package/lib/commonjs/src/WeatherLayerManager.js +5 -5
  76. package/lib/commonjs/src/WeatherLayerManager.js.map +1 -1
  77. package/lib/commonjs/tsconfig.json +23 -23
  78. package/lib/module/README.md +126 -126
  79. package/lib/module/aguacerowx-react-native.podspec +38 -38
  80. package/lib/module/android/build.gradle +107 -107
  81. package/lib/module/android/src/main/AndroidManifest.xml +6 -6
  82. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/AguaceroPackage.java +33 -33
  83. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java +688 -672
  84. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayerView.java +304 -304
  85. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/GridRenderManager.java +125 -125
  86. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/InspectorModule.java +71 -71
  87. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/ShaderUtils.java +106 -106
  88. package/lib/module/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +151 -151
  89. package/lib/module/android/src/main/res/raw/debug_fragment_shader.glsl +12 -12
  90. package/lib/module/android/src/main/res/raw/debug_vertex_shader.glsl +12 -12
  91. package/lib/module/android/src/main/res/raw/fragment_shader.glsl +188 -161
  92. package/lib/module/android/src/main/res/raw/vertex_shader.glsl +19 -19
  93. package/lib/module/babel.config.js.map +1 -1
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/ios/AguaceroPackage.m +18 -18
  96. package/lib/module/ios/FragmentUniforms.swift +15 -15
  97. package/lib/module/ios/GridRenderLayer.swift +1004 -986
  98. package/lib/module/ios/GridRenderLayerBridge.swift +36 -36
  99. package/lib/module/ios/GridRenderLayerManager.mm +157 -157
  100. package/lib/module/ios/GridRenderLayerView.h +30 -30
  101. package/lib/module/ios/GridRenderLayerView.m +216 -216
  102. package/lib/module/ios/InspectorDataCache.swift +65 -65
  103. package/lib/module/ios/InspectorModule.m +9 -9
  104. package/lib/module/ios/InspectorModule.swift +63 -63
  105. package/lib/module/ios/Shaders.metal +327 -190
  106. package/lib/module/ios/WeatherFrameProcessorModule.m +15 -15
  107. package/lib/module/ios/WeatherFrameProcessorModule.swift +103 -103
  108. package/lib/module/ios/compiled-shaders/Shaders-device.metallib +0 -0
  109. package/lib/module/ios/compiled-shaders/Shaders-simulator.metallib +0 -0
  110. package/lib/module/lib/commonjs/README.md +126 -126
  111. package/lib/module/lib/commonjs/aguacerowx-react-native.podspec +38 -38
  112. package/lib/module/lib/commonjs/babel.config.js.map +1 -1
  113. package/lib/module/lib/commonjs/index.js.map +1 -1
  114. package/lib/module/lib/commonjs/package.json +72 -72
  115. package/lib/module/lib/commonjs/react-native-builder-bob.config.js.map +1 -1
  116. package/lib/module/lib/commonjs/scripts/compile-shaders.js.map +1 -1
  117. package/lib/module/lib/commonjs/src/AguaceroContext.js.map +1 -1
  118. package/lib/module/lib/commonjs/src/GridRenderLayer.js.map +1 -1
  119. package/lib/module/lib/commonjs/src/GridRenderLayerNativeComponent.js.map +1 -1
  120. package/lib/module/lib/commonjs/src/MapManager.js.map +1 -1
  121. package/lib/module/lib/commonjs/src/MapRegistry.js.map +1 -1
  122. package/lib/module/lib/commonjs/src/StyleApplicator.js +6 -6
  123. package/lib/module/lib/commonjs/src/StyleApplicator.js.map +1 -1
  124. package/lib/module/lib/commonjs/src/WeatherLayerManager.js +5 -5
  125. package/lib/module/lib/commonjs/src/WeatherLayerManager.js.map +1 -1
  126. package/lib/module/lib/commonjs/tsconfig.json +23 -23
  127. package/lib/module/package.json +72 -72
  128. package/lib/module/react-native-builder-bob.config.js.map +1 -1
  129. package/lib/module/scripts/compile-shaders.js.map +1 -1
  130. package/lib/module/scripts/compile-shaders.sh +38 -38
  131. package/lib/module/src/AguaceroContext.js.map +1 -1
  132. package/lib/module/src/GridRenderLayer.js.map +1 -1
  133. package/lib/module/src/GridRenderLayerNativeComponent.js.map +1 -1
  134. package/lib/module/src/MapManager.js.map +1 -1
  135. package/lib/module/src/MapRegistry.js.map +1 -1
  136. package/lib/module/src/StyleApplicator.js +6 -6
  137. package/lib/module/src/StyleApplicator.js.map +1 -1
  138. package/lib/module/src/WeatherLayerManager.js +5 -5
  139. package/lib/module/src/WeatherLayerManager.js.map +1 -1
  140. package/lib/module/tsconfig.json +23 -23
  141. package/package.json +72 -72
  142. package/src/AguaceroContext.js +3 -3
  143. package/src/GridRenderLayer.js +215 -215
  144. package/src/GridRenderLayerNativeComponent.ts +15 -15
  145. package/src/MapManager.js +218 -218
  146. package/src/MapRegistry.js +34 -34
  147. package/src/StyleApplicator.js +240 -240
  148. package/src/WeatherLayerManager.js +1151 -1151
  149. package/android/build/.transforms/42e9b8fa82d77a1c205db5bf0d0ed519/results.bin +0 -1
  150. package/android/build/.transforms/42e9b8fa82d77a1c205db5bf0d0ed519/transformed/classes/classes_dex/classes.dex +0 -0
  151. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/results.bin +0 -1
  152. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/AguaceroPackage.dex +0 -0
  153. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/BuildConfig.dex +0 -0
  154. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.dex +0 -0
  155. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer.dex +0 -0
  156. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayerView.dex +0 -0
  157. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderManager.dex +0 -0
  158. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/InspectorModule.dex +0 -0
  159. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/ShaderUtils.dex +0 -0
  160. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/WeatherFrameProcessorModule.dex +0 -0
  161. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.dex +0 -0
  162. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.dex +0 -0
  163. package/android/build/.transforms/c8ab78b63f2cc835ac936d58e29a17ab/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  164. package/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +0 -10
  165. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.java +0 -43
  166. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.java +0 -22
  167. package/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec-generated.cpp +0 -22
  168. package/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec.h +0 -24
  169. package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
  170. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI-generated.cpp +0 -17
  171. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI.h +0 -19
  172. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.cpp +0 -22
  173. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.h +0 -24
  174. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.cpp +0 -16
  175. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.h +0 -23
  176. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.cpp +0 -62
  177. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.h +0 -40
  178. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.cpp +0 -17
  179. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.h +0 -32
  180. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.cpp +0 -16
  181. package/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.h +0 -20
  182. package/android/build/generated/source/codegen/schema.json +0 -1
  183. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -8
  184. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  185. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  186. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  187. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  188. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  189. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -4
  190. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
  191. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
  192. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  193. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
  194. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -5
  195. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  196. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  197. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  198. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  199. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  200. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  201. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  202. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  203. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  204. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  205. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  206. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  207. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  208. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
  209. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
  210. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -6
  211. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -8
  212. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -8
  213. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  214. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  215. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +0 -13
  216. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +0 -13
  217. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +0 -162
  218. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +0 -20
  219. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  220. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  221. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  222. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  223. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  224. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  225. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  226. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  227. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  228. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
  229. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
  230. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  231. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -5
  232. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
  233. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer$VertexInfo.class.uniqueId0 +0 -0
  234. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer.class.uniqueId1 +0 -0
  235. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
  236. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  237. package/lib/commonjs/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +0 -10
  238. package/lib/commonjs/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.java +0 -43
  239. package/lib/commonjs/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.java +0 -22
  240. package/lib/commonjs/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec-generated.cpp +0 -22
  241. package/lib/commonjs/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec.h +0 -24
  242. package/lib/commonjs/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
  243. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI-generated.cpp +0 -17
  244. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI.h +0 -19
  245. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.cpp +0 -22
  246. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.h +0 -24
  247. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.cpp +0 -16
  248. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.h +0 -23
  249. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.cpp +0 -62
  250. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.h +0 -40
  251. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.cpp +0 -17
  252. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.h +0 -32
  253. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.cpp +0 -16
  254. package/lib/commonjs/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.h +0 -20
  255. package/lib/commonjs/android/build/generated/source/codegen/schema.json +0 -1
  256. package/lib/commonjs/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -8
  257. package/lib/commonjs/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  258. package/lib/commonjs/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  259. package/lib/commonjs/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  260. package/lib/commonjs/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  261. package/lib/commonjs/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  262. package/lib/commonjs/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -4
  263. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
  264. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
  265. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  266. package/lib/commonjs/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
  267. package/lib/commonjs/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -5
  268. package/lib/commonjs/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  269. package/lib/commonjs/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  270. package/lib/commonjs/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  271. package/lib/commonjs/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  272. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  273. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  274. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  275. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  276. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  277. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  278. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  279. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  280. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  281. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
  282. package/lib/commonjs/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
  283. package/lib/commonjs/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -6
  284. package/lib/commonjs/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -8
  285. package/lib/commonjs/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -8
  286. package/lib/commonjs/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  287. package/lib/commonjs/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  288. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +0 -13
  289. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +0 -13
  290. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +0 -162
  291. package/lib/commonjs/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +0 -20
  292. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  293. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  294. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  295. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  296. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  297. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  298. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  299. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  300. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  301. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
  302. package/lib/commonjs/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
  303. package/lib/commonjs/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  304. package/lib/commonjs/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -5
  305. package/lib/commonjs/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
  306. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer$VertexInfo.class.uniqueId0 +0 -0
  307. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer.class.uniqueId1 +0 -0
  308. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
  309. package/lib/commonjs/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  310. package/lib/module/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +0 -10
  311. package/lib/module/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.java +0 -43
  312. package/lib/module/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.java +0 -22
  313. package/lib/module/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec-generated.cpp +0 -22
  314. package/lib/module/android/build/generated/source/codegen/jni/AguaceroWxReactNativeSpec.h +0 -24
  315. package/lib/module/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
  316. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI-generated.cpp +0 -17
  317. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/AguaceroWxReactNativeSpecJSI.h +0 -19
  318. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.cpp +0 -22
  319. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ComponentDescriptors.h +0 -24
  320. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.cpp +0 -16
  321. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/EventEmitters.h +0 -23
  322. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.cpp +0 -62
  323. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/Props.h +0 -40
  324. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.cpp +0 -17
  325. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/ShadowNodes.h +0 -32
  326. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.cpp +0 -16
  327. package/lib/module/android/build/generated/source/codegen/jni/react/renderer/components/AguaceroWxReactNativeSpec/States.h +0 -20
  328. package/lib/module/android/build/generated/source/codegen/schema.json +0 -1
  329. package/lib/module/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -8
  330. package/lib/module/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  331. package/lib/module/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  332. package/lib/module/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  333. package/lib/module/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  334. package/lib/module/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  335. package/lib/module/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -4
  336. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
  337. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
  338. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  339. package/lib/module/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
  340. package/lib/module/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -5
  341. package/lib/module/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  342. package/lib/module/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  343. package/lib/module/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  344. package/lib/module/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  345. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  346. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  347. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  348. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  349. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  350. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  351. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  352. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  353. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  354. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
  355. package/lib/module/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
  356. package/lib/module/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -6
  357. package/lib/module/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -8
  358. package/lib/module/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -8
  359. package/lib/module/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  360. package/lib/module/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  361. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +0 -13
  362. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +0 -13
  363. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +0 -162
  364. package/lib/module/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +0 -20
  365. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  366. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  367. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  368. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  369. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  370. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  371. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  372. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  373. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  374. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerDelegate.class +0 -0
  375. package/lib/module/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/GridRenderLayerManagerInterface.class +0 -0
  376. package/lib/module/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  377. package/lib/module/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -5
  378. package/lib/module/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
  379. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer$VertexInfo.class.uniqueId0 +0 -0
  380. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayer.class.uniqueId1 +0 -0
  381. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GridRenderLayerView.class.uniqueId2 +0 -0
  382. package/lib/module/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  383. package/lib/module/lib/commonjs/android/build.gradle +0 -108
  384. package/lib/module/lib/commonjs/android/src/main/AndroidManifest.xml +0 -7
  385. package/lib/module/lib/commonjs/ios/AguaceroPackage.m +0 -19
  386. package/lib/module/lib/commonjs/ios/FragmentUniforms.swift +0 -16
  387. package/lib/module/lib/commonjs/ios/GridRenderLayer.swift +0 -986
  388. package/lib/module/lib/commonjs/ios/GridRenderLayerBridge.swift +0 -37
  389. package/lib/module/lib/commonjs/ios/GridRenderLayerManager.mm +0 -158
  390. package/lib/module/lib/commonjs/ios/GridRenderLayerView.h +0 -31
  391. package/lib/module/lib/commonjs/ios/GridRenderLayerView.m +0 -217
  392. package/lib/module/lib/commonjs/ios/InspectorDataCache.swift +0 -66
  393. package/lib/module/lib/commonjs/ios/InspectorModule.m +0 -10
  394. package/lib/module/lib/commonjs/ios/InspectorModule.swift +0 -64
  395. package/lib/module/lib/commonjs/ios/Shaders.metal +0 -191
  396. package/lib/module/lib/commonjs/ios/WeatherFrameProcessorModule.m +0 -16
  397. package/lib/module/lib/commonjs/ios/WeatherFrameProcessorModule.swift +0 -104
  398. package/lib/module/lib/commonjs/ios/compiled-shaders/Shaders-device.metallib +0 -0
  399. package/lib/module/lib/commonjs/ios/generated/AguaceroWxReactNativeSpec-generated.mm +0 -0
  400. package/lib/module/lib/commonjs/scripts/compile-shaders.sh +0 -39
@@ -1,673 +1,689 @@
1
- // packages/react-native/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java
2
-
3
- package com.aguacerowx.reactnative;
4
-
5
- import android.content.Context;
6
- import android.opengl.GLES20;
7
- import android.util.Log;
8
-
9
- import com.facebook.react.bridge.ReadableArray;
10
- import com.facebook.react.bridge.ReadableMap;
11
- import com.mapbox.maps.CustomLayerHost;
12
- import com.mapbox.maps.CustomLayerRenderParameters;
13
-
14
- import java.io.InputStream;
15
- import java.nio.ByteBuffer;
16
- import java.nio.ByteOrder;
17
- import java.nio.FloatBuffer;
18
- import java.nio.ShortBuffer;
19
- import java.util.ArrayList;
20
- import java.util.List;
21
- import java.util.Scanner;
22
-
23
- import java.io.File;
24
- import java.io.FileInputStream;
25
- import java.io.IOException;
26
- import com.github.luben.zstd.Zstd;
27
-
28
- public class GridRenderLayer implements CustomLayerHost {
29
- private final Context context;
30
- private final String TAG = "AguaceroWX";
31
- private int program;
32
-
33
- // Uniform and Attribute locations
34
- private int uMatrix, uDataTexture, uColormapTexture, uOpacity, uDataRange,
35
- uScale, uOffset, uMissingQuantized, uTextureSize, uConversionType, uSmoothing,
36
- uScaleType, uIsPtype;
37
- private int aPosition, aTexCoord;
38
-
39
- // GPU-side resource IDs
40
- private int dataTextureId = 0;
41
- private int colormapTextureId = 0;
42
- private int vboId = 0;
43
- private int iboId = 0;
44
- private int indexCount = 0;
45
-
46
- // Layer properties
47
- private float opacity = 1.0f;
48
- private float[] dataRange = new float[]{0.0f, 1.0f};
49
- private float scale = 1.0f;
50
- private float offset = 0.0f;
51
- private float missingQuantized = 127.0f;
52
- private int textureWidth = 0;
53
- private int textureHeight = 0;
54
- private int conversionType = 0;
55
- private boolean smoothingEnabled = true;
56
- private int scaleType = 0;
57
- private boolean isPtype = false; // ADDED
58
- private String currentVariable = "";
59
- private boolean textureParametersDirty = true;
60
- private volatile boolean isVisible = true;
61
-
62
- // Pending data buffers for thread-safe uploads
63
- private final Object dataLock = new Object();
64
- private ByteBuffer pendingDataBuffer = null;
65
- private int pendingNx = 0, pendingNy = 0;
66
- private float pendingScale = 1.0f, pendingOffset = 0.0f, pendingMissing = 127.0f;
67
- private int pendingScaleType = 0;
68
- private ByteBuffer pendingColormapBuffer = null;
69
- private FloatBuffer pendingVertexBuffer = null;
70
- private ShortBuffer pendingIndexBuffer = null;
71
- private int uIsMRMS;
72
- private boolean isMRMS = false;
73
-
74
- public GridRenderLayer(Context context) {
75
- this.context = context;
76
- }
77
-
78
- private double getDouble(ReadableMap map, String key, double defaultValue) {
79
- return map.hasKey(key) ? map.getDouble(key) : defaultValue;
80
- }
81
-
82
- private String loadShaderSource(int resourceId) {
83
- InputStream inputStream = context.getResources().openRawResource(resourceId);
84
- return new Scanner(inputStream).useDelimiter("\\A").next();
85
- }
86
-
87
- private int createShader(int type, String source) {
88
- int shader = GLES20.glCreateShader(type);
89
- if (shader == 0) return 0;
90
- GLES20.glShaderSource(shader, source);
91
- GLES20.glCompileShader(shader);
92
- final int[] compileStatus = new int[1];
93
- GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compileStatus, 0);
94
- if (compileStatus[0] == 0) {
95
- Log.e(TAG, "Error compiling shader: " + GLES20.glGetShaderInfoLog(shader));
96
- GLES20.glDeleteShader(shader);
97
- return 0;
98
- }
99
- return shader;
100
- }
101
-
102
- @Override
103
- public void initialize() {
104
- String vertexSource = loadShaderSource(R.raw.vertex_shader);
105
- String fragmentSource = loadShaderSource(R.raw.fragment_shader);
106
- int vertexShader = createShader(GLES20.GL_VERTEX_SHADER, vertexSource);
107
- int fragmentShader = createShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource);
108
-
109
- program = GLES20.glCreateProgram();
110
- GLES20.glAttachShader(program, vertexShader);
111
- GLES20.glAttachShader(program, fragmentShader);
112
- GLES20.glLinkProgram(program);
113
-
114
- uMatrix = GLES20.glGetUniformLocation(program, "u_matrix");
115
- uDataTexture = GLES20.glGetUniformLocation(program, "u_data_texture");
116
- uColormapTexture = GLES20.glGetUniformLocation(program, "u_colormap_texture");
117
- uOpacity = GLES20.glGetUniformLocation(program, "u_opacity");
118
- uDataRange = GLES20.glGetUniformLocation(program, "u_data_range");
119
- uScale = GLES20.glGetUniformLocation(program, "u_scale");
120
- uOffset = GLES20.glGetUniformLocation(program, "u_offset");
121
- uMissingQuantized = GLES20.glGetUniformLocation(program, "u_missing_quantized");
122
- uTextureSize = GLES20.glGetUniformLocation(program, "u_texture_size");
123
- uConversionType = GLES20.glGetUniformLocation(program, "u_conversion_type");
124
- uSmoothing = GLES20.glGetUniformLocation(program, "u_smoothing");
125
- uScaleType = GLES20.glGetUniformLocation(program, "u_scale_type");
126
- uIsPtype = GLES20.glGetUniformLocation(program, "u_is_ptype");
127
- uIsMRMS = GLES20.glGetUniformLocation(program, "u_is_mrms");
128
- aPosition = GLES20.glGetAttribLocation(program, "a_position");
129
- aTexCoord = GLES20.glGetAttribLocation(program, "a_texCoord");
130
- }
131
-
132
- public void setVariable(String variable) {
133
- if (variable == null) {
134
- this.currentVariable = "";
135
- } else {
136
- this.currentVariable = variable;
137
- }
138
- // MODIFICATION: Add detailed logging here
139
- this.isPtype = "ptypeRefl".equals(this.currentVariable) || "ptypeRate".equals(this.currentVariable);
140
- Log.d(TAG, "setVariable called. Variable: '" + this.currentVariable + "', isPtype set to: " + this.isPtype);
141
- }
142
-
143
- public void setIsMRMS(boolean isMRMS) {
144
- this.isMRMS = isMRMS;
145
- Log.d(TAG, "setIsMRMS called with: " + isMRMS);
146
- }
147
-
148
- public void clearData() {
149
- this.isVisible = false;
150
- // Also clear any pending data to prevent a stale frame from rendering
151
- synchronized (dataLock) {
152
- pendingDataBuffer = null;
153
- }
154
- }
155
-
156
- @Override
157
- public void render(CustomLayerRenderParameters renderParameters) {
158
- if (program == 0 || !isVisible) return;
159
-
160
- synchronized (dataLock) {
161
- if (pendingVertexBuffer != null && pendingIndexBuffer != null) {
162
- this.indexCount = pendingIndexBuffer.capacity();
163
- if (vboId == 0) {
164
- int[] bufs = new int[2];
165
- GLES20.glGenBuffers(2, bufs, 0);
166
- vboId = bufs[0];
167
- iboId = bufs[1];
168
- }
169
- GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vboId);
170
- GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, pendingVertexBuffer.capacity() * 4, pendingVertexBuffer, GLES20.GL_STATIC_DRAW);
171
- GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, iboId);
172
- GLES20.glBufferData(GLES20.GL_ELEMENT_ARRAY_BUFFER, pendingIndexBuffer.capacity() * 2, pendingIndexBuffer, GLES20.GL_STATIC_DRAW);
173
- pendingVertexBuffer = null;
174
- pendingIndexBuffer = null;
175
- }
176
-
177
- if (pendingDataBuffer != null) {
178
- // --- FIX 2: LOGICAL FIX FOR TEXTURE RESIZING ---
179
- boolean dimensionsChanged = (pendingNx != this.textureWidth || pendingNy != this.textureHeight);
180
-
181
- this.textureWidth = pendingNx;
182
- this.textureHeight = pendingNy;
183
- this.scale = pendingScale;
184
- this.offset = pendingOffset;
185
- this.missingQuantized = pendingMissing;
186
- this.scaleType = pendingScaleType;
187
-
188
- if (dataTextureId == 0) {
189
- int[] t = new int[1];
190
- GLES20.glGenTextures(1, t, 0);
191
- dataTextureId = t[0];
192
- }
193
-
194
- GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
195
-
196
- if (dimensionsChanged || dataTextureId == 0) {
197
- int filter = smoothingEnabled ? GLES20.GL_LINEAR : GLES20.GL_NEAREST;
198
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, filter);
199
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, filter);
200
-
201
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
202
-
203
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
204
- GLES20.glPixelStorei(GLES20.GL_UNPACK_ALIGNMENT, 1);
205
-
206
- pendingDataBuffer.position(0);
207
- GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_ALPHA, pendingNx, pendingNy, 0, GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, pendingDataBuffer);
208
- } else {
209
- // Texture dimensions are the same, so just update its contents efficiently
210
- pendingDataBuffer.position(0);
211
- GLES20.glTexSubImage2D(GLES20.GL_TEXTURE_2D, 0, 0, 0, pendingNx, pendingNy, GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, pendingDataBuffer);
212
- }
213
- pendingDataBuffer = null;
214
- }
215
-
216
- if (pendingColormapBuffer != null) {
217
- if (colormapTextureId == 0) {
218
- int[] t = new int[1];
219
- GLES20.glGenTextures(1, t, 0);
220
- colormapTextureId = t[0];
221
- }
222
- GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, colormapTextureId);
223
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
224
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST);
225
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
226
- pendingColormapBuffer.position(0);
227
- GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, 256, 1, 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pendingColormapBuffer);
228
- pendingColormapBuffer = null;
229
- }
230
- }
231
-
232
- double zoom = renderParameters.getZoom();
233
-
234
- if (vboId == 0 || iboId == 0 || indexCount == 0 || dataTextureId == 0 || colormapTextureId == 0) return;
235
-
236
- if (textureParametersDirty) {
237
- GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
238
- int filter = smoothingEnabled ? GLES20.GL_LINEAR : GLES20.GL_NEAREST;
239
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, filter);
240
- GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, filter);
241
- textureParametersDirty = false;
242
- }
243
-
244
- GLES20.glUseProgram(program);
245
-
246
- double scale = Math.pow(2.0, zoom);
247
-
248
- List<Double> matrix = renderParameters.getProjectionMatrix();
249
- float[] floatMatrix = new float[16];
250
- for (int i = 0; i < 16; i++) {
251
- floatMatrix[i] = matrix.get(i).floatValue();
252
- }
253
-
254
- floatMatrix[0] *= scale; // X scale
255
- floatMatrix[1] *= scale; // X rotation
256
- floatMatrix[2] *= scale; // X Z-component
257
- floatMatrix[3] *= scale; // X translation
258
- floatMatrix[4] *= scale; // Y rotation
259
- floatMatrix[5] *= scale; // Y scale
260
- floatMatrix[6] *= scale; // Y Z-component
261
- floatMatrix[7] *= scale; // Y translation
262
- floatMatrix[8] *= scale; // Z X-component
263
- floatMatrix[9] *= scale; // Z Y-component
264
- floatMatrix[10] *= scale; // Z scale
265
- floatMatrix[11] *= scale; // Z translation
266
-
267
- GLES20.glUniformMatrix4fv(uMatrix, 1, false, floatMatrix, 0);
268
- GLES20.glUniform1f(uOpacity, opacity);
269
- GLES20.glUniform2fv(uDataRange, 1, dataRange, 0);
270
- GLES20.glUniform1f(uScale, this.scale);
271
- GLES20.glUniform1f(uOffset, offset);
272
- GLES20.glUniform1f(uMissingQuantized, missingQuantized);
273
- GLES20.glUniform2f(uTextureSize, (float) textureWidth, (float) textureHeight);
274
- GLES20.glUniform1i(uConversionType, conversionType);
275
- GLES20.glUniform1i(uSmoothing, smoothingEnabled ? 1 : 0);
276
- GLES20.glUniform1i(uScaleType, this.scaleType);
277
- GLES20.glUniform1i(uIsPtype, this.isPtype ? 1 : 0);
278
- GLES20.glUniform1i(uIsMRMS, this.isMRMS ? 1 : 0);
279
-
280
- GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
281
- GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
282
- GLES20.glUniform1i(uDataTexture, 0);
283
-
284
- GLES20.glActiveTexture(GLES20.GL_TEXTURE1);
285
- GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, colormapTextureId);
286
- GLES20.glUniform1i(uColormapTexture, 1);
287
-
288
- GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vboId);
289
- GLES20.glEnableVertexAttribArray(aPosition);
290
- GLES20.glVertexAttribPointer(aPosition, 2, GLES20.GL_FLOAT, false, 16, 0);
291
- GLES20.glEnableVertexAttribArray(aTexCoord);
292
- GLES20.glVertexAttribPointer(aTexCoord, 2, GLES20.GL_FLOAT, false, 16, 8);
293
- GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, iboId);
294
-
295
- GLES20.glEnable(GLES20.GL_BLEND);
296
- GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
297
- GLES20.glDisable(GLES20.GL_DEPTH_TEST);
298
-
299
- GLES20.glDrawElements(GLES20.GL_TRIANGLES, indexCount, GLES20.GL_UNSIGNED_SHORT, 0);
300
-
301
- GLES20.glDisableVertexAttribArray(aPosition);
302
- GLES20.glDisableVertexAttribArray(aTexCoord);
303
- GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);
304
- GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, 0);
305
- }
306
-
307
- @Override
308
- public void deinitialize() {
309
- if (program != 0) { GLES20.glDeleteProgram(program); program = 0; }
310
- int[] texturesToDelete = {dataTextureId, colormapTextureId};
311
- GLES20.glDeleteTextures(2, texturesToDelete, 0);
312
- dataTextureId = 0; colormapTextureId = 0;
313
- int[] buffersToDelete = {vboId, iboId};
314
- GLES20.glDeleteBuffers(2, buffersToDelete, 0);
315
- vboId = 0; iboId = 0;
316
- }
317
-
318
- @Override
319
- public void contextLost() {
320
- program = 0; dataTextureId = 0; colormapTextureId = 0; vboId = 0; iboId = 0;
321
- }
322
-
323
- public void setOpacity(float opacity) { this.opacity = opacity; }
324
- public void setDataRange(float[] dataRange) { this.dataRange = dataRange; }
325
- public void setConversionType(int type) { this.conversionType = type; }
326
- public void setSmoothing(boolean enabled) {
327
- if (this.smoothingEnabled != enabled) {
328
- this.smoothingEnabled = enabled;
329
- this.textureParametersDirty = true;
330
- }
331
- }
332
-
333
- // Add this method to GridRenderLayer.java (around line 270)
334
- public void updateDataParameters(float scale, float offset, float missing) {
335
- synchronized (dataLock) {
336
- this.scale = scale;
337
- this.offset = offset;
338
- this.missingQuantized = missing;
339
- }
340
- }
341
-
342
- // This existing method is now used by both the old JS path and our new native path
343
- public void updateDataTexture(byte[] bytes, int nx, int ny, float scale, float offset, float missing, String scaleType) {
344
- ByteBuffer dataBuffer = ByteBuffer.allocateDirect(bytes.length);
345
- dataBuffer.put(bytes);
346
- dataBuffer.position(0);
347
- synchronized (dataLock) {
348
- this.pendingDataBuffer = dataBuffer;
349
- this.pendingNx = nx;
350
- this.pendingNy = ny;
351
- this.pendingScale = scale;
352
- this.pendingOffset = offset;
353
- this.pendingMissing = missing;
354
- this.pendingScaleType = "sqrt".equals(scaleType) ? 1 : 0;
355
- }
356
- // When new data is provided, ensure the layer is visible
357
- this.isVisible = true;
358
- }
359
-
360
- public void updateColormapTexture(ByteBuffer data) {
361
- synchronized (dataLock) { this.pendingColormapBuffer = data; }
362
- }
363
-
364
- private void generateLCCGeometry(ReadableMap gridDefMap, ArrayList<Float> vertices, ArrayList<Short> indices) {
365
- ReadableMap gridParams = gridDefMap.getMap("grid_params");
366
- ReadableMap projParams = gridDefMap.getMap("proj_params");
367
-
368
- if (gridParams == null || projParams == null) {
369
- Log.e(TAG, "Missing grid or projection parameters for LCC");
370
- return;
371
- }
372
-
373
- int nx = gridParams.getInt("nx");
374
- int ny = gridParams.getInt("ny");
375
- double dx = getDouble(gridParams, "dx", 0);
376
- double dy = getDouble(gridParams, "dy", 0);
377
- double x_origin = getDouble(gridParams, "x_origin", 0);
378
- double y_origin = getDouble(gridParams, "y_origin", 0);
379
-
380
- int subdivisions = 60;
381
- final double TILE_SIZE = 512.0;
382
-
383
- double x_min = x_origin;
384
- double y_max = y_origin;
385
- double x_max = x_origin + (nx - 1) * dx;
386
- double y_min = y_origin + (ny - 1) * dy;
387
-
388
- Object[][] vertexGrid = new Object[subdivisions + 1][subdivisions + 1];
389
- int validVertexCount = 0;
390
-
391
- for (int row = 0; row <= subdivisions; row++) {
392
- for (int col = 0; col <= subdivisions; col++) {
393
- double t_x = (double) col / subdivisions;
394
- double t_y = (double) row / subdivisions;
395
-
396
- double proj_x = x_min + t_x * (x_max - x_min);
397
- double proj_y = y_max + t_y * (y_min - y_max);
398
-
399
- double[] latLon = projectLCCToLatLon(proj_x, proj_y, projParams);
400
-
401
- if (latLon == null) {
402
- vertexGrid[row][col] = null;
403
- continue;
404
- }
405
-
406
- double lon = latLon[0];
407
- double lat = latLon[1];
408
-
409
- double mercX_normalized = (lon + 180.0) / 360.0;
410
- double clampedLat = Math.max(-85.05112878, Math.min(85.05112878, lat));
411
- double sinLatitude = Math.sin(Math.toRadians(clampedLat));
412
- double mercY_normalized = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
413
-
414
- double mercX = mercX_normalized * TILE_SIZE;
415
- double mercY = mercY_normalized * TILE_SIZE;
416
-
417
- if (!Double.isFinite(mercX) || !Double.isFinite(mercY)) {
418
- vertexGrid[row][col] = null;
419
- continue;
420
- }
421
-
422
- float tex_u = (float) t_x;
423
- float tex_v = (float) t_y;
424
-
425
- VertexInfo vInfo = new VertexInfo();
426
- vInfo.mercX = (float) mercX;
427
- vInfo.mercY = (float) mercY;
428
- vInfo.texU = tex_u;
429
- vInfo.texV = tex_v;
430
- vInfo.index = (short) validVertexCount;
431
-
432
- vertexGrid[row][col] = vInfo;
433
-
434
- vertices.add((float) mercX);
435
- vertices.add((float) mercY);
436
- vertices.add(tex_u);
437
- vertices.add(tex_v);
438
-
439
- validVertexCount++;
440
- }
441
- }
442
-
443
- if (vertices.isEmpty()) {
444
- Log.e(TAG, "No valid vertices generated for LCC grid");
445
- return;
446
- }
447
-
448
- for (int row = 0; row < subdivisions; row++) {
449
- for (int col = 0; col < subdivisions; col++) {
450
- VertexInfo topLeft = (VertexInfo) vertexGrid[row][col];
451
- VertexInfo topRight = (VertexInfo) vertexGrid[row][col + 1];
452
- VertexInfo bottomLeft = (VertexInfo) vertexGrid[row + 1][col];
453
- VertexInfo bottomRight = (VertexInfo) vertexGrid[row + 1][col + 1];
454
-
455
- if (topLeft != null && topRight != null && bottomLeft != null && bottomRight != null) {
456
- indices.add(topLeft.index);
457
- indices.add(bottomLeft.index);
458
- indices.add(topRight.index);
459
-
460
- indices.add(topRight.index);
461
- indices.add(bottomLeft.index);
462
- indices.add(bottomRight.index);
463
- }
464
- }
465
- }
466
- }
467
-
468
- private static class VertexInfo {
469
- float mercX, mercY, texU, texV;
470
- short index;
471
- }
472
-
473
- private double[] projectLCCToLatLon(double x, double y, ReadableMap projParams) {
474
- try {
475
- StringBuilder projString = new StringBuilder("+proj=lcc");
476
-
477
- if (projParams.hasKey("lat_1")) projString.append(" +lat_1=").append(projParams.getDouble("lat_1"));
478
- if (projParams.hasKey("lat_2")) projString.append(" +lat_2=").append(projParams.getDouble("lat_2"));
479
- if (projParams.hasKey("lat_0")) projString.append(" +lat_0=").append(projParams.getDouble("lat_0"));
480
- if (projParams.hasKey("lon_0")) projString.append(" +lon_0=").append(projParams.getDouble("lon_0"));
481
- if (projParams.hasKey("x_0")) projString.append(" +x_0=").append(projParams.getDouble("x_0"));
482
- if (projParams.hasKey("y_0")) projString.append(" +y_0=").append(projParams.getDouble("y_0"));
483
- if (projParams.hasKey("ellps")) projString.append(" +ellps=").append(projParams.getString("ellps"));
484
- if (projParams.hasKey("a")) projString.append(" +a=").append(projParams.getDouble("a"));
485
- if (projParams.hasKey("b")) projString.append(" +b=").append(projParams.getDouble("b"));
486
- projString.append(" +units=m +no_defs");
487
-
488
- org.locationtech.proj4j.CRSFactory crsFactory = new org.locationtech.proj4j.CRSFactory();
489
- org.locationtech.proj4j.CoordinateReferenceSystem srcCRS = crsFactory.createFromParameters("LCC", projString.toString());
490
- org.locationtech.proj4j.CoordinateReferenceSystem dstCRS = crsFactory.createFromParameters("WGS84", "+proj=longlat +datum=WGS84 +no_defs");
491
-
492
- org.locationtech.proj4j.CoordinateTransformFactory ctFactory = new org.locationtech.proj4j.CoordinateTransformFactory();
493
- org.locationtech.proj4j.CoordinateTransform transform = ctFactory.createTransform(srcCRS, dstCRS);
494
-
495
- org.locationtech.proj4j.ProjCoordinate srcCoord = new org.locationtech.proj4j.ProjCoordinate(x, y);
496
- org.locationtech.proj4j.ProjCoordinate dstCoord = new org.locationtech.proj4j.ProjCoordinate();
497
- transform.transform(srcCoord, dstCoord);
498
-
499
- return new double[]{dstCoord.x, dstCoord.y};
500
-
501
- } catch (Exception e) {
502
- Log.e(TAG, "Error in LCC projection: " + e.getMessage());
503
- return null;
504
- }
505
- }
506
-
507
- private boolean isLCCType(ReadableMap gridDefMap) {
508
- if (gridDefMap == null) return false;
509
- ReadableMap projParams = gridDefMap.getMap("proj_params");
510
- if (projParams == null) return false;
511
- return projParams.hasKey("proj") && "lcc".equals(projParams.getString("proj"));
512
- }
513
-
514
- public void updateGeometry(ReadableMap cornersMap, ReadableMap gridDefMap) {
515
- if (gridDefMap == null) return;
516
- ArrayList<Float> vertices = new ArrayList<>();
517
- ArrayList<Short> indices = new ArrayList<>();
518
- generateGeometryData(gridDefMap, vertices, indices);
519
- if (vertices.isEmpty() || indices.isEmpty()) {
520
- Log.e(TAG, "Generated geometry is empty, aborting GPU buffer update.");
521
- return;
522
- }
523
- FloatBuffer vb = ByteBuffer.allocateDirect(vertices.size() * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
524
- float[] vertexArray = new float[vertices.size()];
525
- for (int i = 0; i < vertices.size(); i++) vertexArray[i] = vertices.get(i);
526
- vb.put(vertexArray).position(0);
527
- ShortBuffer ib = ByteBuffer.allocateDirect(indices.size() * 2).order(ByteOrder.nativeOrder()).asShortBuffer();
528
- short[] indexArray = new short[indices.size()];
529
- for (int i = 0; i < indices.size(); i++) indexArray[i] = indices.get(i);
530
- ib.put(indexArray).position(0);
531
- synchronized (dataLock) {
532
- pendingVertexBuffer = vb;
533
- pendingIndexBuffer = ib;
534
- }
535
- }
536
-
537
- private boolean isGFSType(ReadableMap gridParams) {
538
- if (gridParams == null) return false;
539
- return getDouble(gridParams, "lon_first", -1) == 0.0 &&
540
- Math.abs(getDouble(gridParams, "lat_first", -1)) == 90.0;
541
- }
542
-
543
- private void generateGeometryData(ReadableMap gridDefMap, ArrayList<Float> vertices, ArrayList<Short> indices) {
544
- ReadableMap gridParams = gridDefMap.getMap("grid_params");
545
- if (gridParams == null) {
546
- Log.e(TAG, " [Geometry] grid_params is null. Aborting mesh generation.");
547
- return;
548
- }
549
-
550
- // --- Path 1: Specialized GFS Global Grid Logic (Working Correctly) ---
551
- if (isGFSType(gridParams)) {
552
- // This proven logic remains unchanged.
553
- int subdivisions = 120;
554
- int verticesPerRow = (subdivisions * 3) + 1;
555
- final double TILE_SIZE = 512.0;
556
- for (int row = 0; row <= subdivisions; row++) {
557
- for (int col = 0; col <= subdivisions * 3; col++) {
558
- float v_interp = (float) row / subdivisions;
559
- float u_interp = (float) col / subdivisions;
560
- double lon = -540.0 + u_interp * 1080.0;
561
- double lat = -90.0 + v_interp * 180.0;
562
- double mercX_normalized = (lon + 180.0) / 360.0;
563
- double clampedLat = Math.max(-85.05112878, Math.min(85.05112878, lat));
564
- double sinLatitude = Math.sin(Math.toRadians(clampedLat));
565
- double mercY_normalized = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
566
- double mercX = mercX_normalized * TILE_SIZE;
567
- double mercY = mercY_normalized * TILE_SIZE;
568
- vertices.add((float) mercX);
569
- vertices.add((float) mercY);
570
- float tex_u = (float) ((lon + 180.0) / 360.0);
571
- float tex_v = 1.0f - v_interp;
572
- vertices.add(tex_u);
573
- vertices.add(tex_v);
574
- }
575
- }
576
- for (short row = 0; row < subdivisions; row++) {
577
- for (short col = 0; col < subdivisions * 3; col++) {
578
- short tl = (short) (row * verticesPerRow + col);
579
- short tr = (short) (tl + 1);
580
- short bl = (short) ((row + 1) * verticesPerRow + col);
581
- short br = (short) (bl + 1);
582
- indices.add(tl); indices.add(bl); indices.add(tr);
583
- indices.add(tr); indices.add(bl); indices.add(br);
584
- }
585
- }
586
- return;
587
- }
588
-
589
- // --- Path 2: LCC Grid Logic ---
590
- if (isLCCType(gridDefMap)) {
591
- generateLCCGeometry(gridDefMap, vertices, indices);
592
- return;
593
- }
594
-
595
- // Step 1: Extract grid parameters
596
- int nx = gridParams.getInt("nx");
597
- int ny = gridParams.getInt("ny");
598
- double lon_first = getDouble(gridParams, "lon_first", 0.0);
599
- double lat_first = getDouble(gridParams, "lat_first", 90.0);
600
- double dx = getDouble(gridParams, "dx_degrees", 0.0);
601
- double dy = getDouble(gridParams, "dy_degrees", 0.0);
602
- double lon_last = getDouble(gridParams, "lon_last", lon_first + (nx - 1) * dx);
603
- double lat_last = getDouble(gridParams, "lat_last", lat_first + (ny - 1) * dy);
604
- double lat_span = lat_last - lat_first;
605
- boolean isSouthToNorth = lat_span > 0;
606
-
607
- // Step 2: Normalize data longitudes to the -180 to +180 range for consistent placement.
608
- double data_lon_first_180 = lon_first > 180 ? lon_first - 360 : lon_first;
609
- double data_lon_last_180 = lon_last > 180 ? lon_last - 360 : lon_last;
610
- double data_lon_range = data_lon_last_180 - data_lon_first_180;
611
-
612
- // Step 3: Define mesh properties
613
- int subdivisions_x = 120; // Subdivisions for a single mesh instance
614
- int subdivisions_y = 60;
615
- int verticesPerMesh = (subdivisions_y + 1) * (subdivisions_x + 1);
616
- int verticesPerRow = subdivisions_x + 1;
617
- final double TILE_SIZE = 512.0;
618
-
619
- // Step 4: Generate three separate, non-connected meshes to prevent seam artifacts
620
- for (int world_copy = -1; world_copy <= 1; world_copy++) {
621
- short vertexStartIndex = (short) (vertices.size() / 4); // 4 floats per vertex (x,y,u,v)
622
- double lon_offset = world_copy * 360.0;
623
-
624
- // Generate vertices for this specific world copy
625
- for (int row = 0; row <= subdivisions_y; row++) {
626
- for (int col = 0; col <= subdivisions_x; col++) {
627
- float v_interp = (float) row / subdivisions_y;
628
- float u_interp = (float) col / subdivisions_x;
629
-
630
- // Vertex position is interpolated across the data's native bounds, then offset for the world copy
631
- double vertex_lon = data_lon_first_180 + (u_interp * data_lon_range);
632
- double vertex_lat = lat_first + (v_interp * lat_span);
633
-
634
- // Convert to map coordinates, adding the world copy offset
635
- double mercX_normalized = ((vertex_lon + lon_offset) + 180.0) / 360.0;
636
- double clampedLat = Math.max(-85.05112878, Math.min(85.05112878, vertex_lat));
637
- double sinLatitude = Math.sin(Math.toRadians(clampedLat));
638
- double mercY_normalized = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
639
- double mercX = mercX_normalized * TILE_SIZE;
640
- double mercY = mercY_normalized * TILE_SIZE;
641
-
642
- vertices.add((float) mercX);
643
- vertices.add((float) mercY);
644
-
645
- // Texture coordinates are always a clean 0.0 to 1.0 for each mesh instance
646
- float tex_u = u_interp;
647
- float tex_v = isSouthToNorth ? (1.0f - v_interp) : v_interp;
648
-
649
- vertices.add(tex_u);
650
- vertices.add(tex_v);
651
- }
652
- }
653
-
654
- // Generate indices for this specific world copy, offsetting by the starting index
655
- for (short row = 0; row < subdivisions_y; row++) {
656
- for (short col = 0; col < subdivisions_x; col++) {
657
- short tl = (short) (vertexStartIndex + row * verticesPerRow + col);
658
- short tr = (short) (tl + 1);
659
- short bl = (short) (vertexStartIndex + (row + 1) * verticesPerRow + col);
660
- short br = (short) (bl + 1);
661
-
662
- if (isSouthToNorth) {
663
- indices.add(tl); indices.add(bl); indices.add(tr);
664
- indices.add(tr); indices.add(bl); indices.add(br);
665
- } else { // North-to-South (MRMS)
666
- indices.add(tl); indices.add(tr); indices.add(bl);
667
- indices.add(bl); indices.add(tr); indices.add(br);
668
- }
669
- }
670
- }
671
- }
672
- }
1
+ // packages/react-native/android/src/main/java/com/aguacerowx/reactnative/GridRenderLayer.java
2
+
3
+ package com.aguacerowx.reactnative;
4
+
5
+ import android.content.Context;
6
+ import android.opengl.GLES20;
7
+ import android.util.Log;
8
+
9
+ import com.facebook.react.bridge.ReadableArray;
10
+ import com.facebook.react.bridge.ReadableMap;
11
+ import com.mapbox.maps.CustomLayerHost;
12
+ import com.mapbox.maps.CustomLayerRenderParameters;
13
+
14
+ import java.io.InputStream;
15
+ import java.nio.ByteBuffer;
16
+ import java.nio.ByteOrder;
17
+ import java.nio.FloatBuffer;
18
+ import java.nio.ShortBuffer;
19
+ import java.util.ArrayList;
20
+ import java.util.List;
21
+ import java.util.Scanner;
22
+
23
+ import java.io.File;
24
+ import java.io.FileInputStream;
25
+ import java.io.IOException;
26
+ import com.github.luben.zstd.Zstd;
27
+
28
+ public class GridRenderLayer implements CustomLayerHost {
29
+ private final Context context;
30
+ private final String TAG = "AguaceroWX";
31
+ private int program;
32
+
33
+ // Uniform and Attribute locations
34
+ private int uMatrix, uDataTexture, uColormapTexture, uOpacity, uDataRange,
35
+ uScale, uOffset, uMissingQuantized, uTextureSize, uConversionType, uSmoothing,
36
+ uScaleType, uIsPtype;
37
+ private int aPosition, aTexCoord;
38
+
39
+ // GPU-side resource IDs
40
+ private int dataTextureId = 0;
41
+ private int colormapTextureId = 0;
42
+ private int vboId = 0;
43
+ private int iboId = 0;
44
+ private int indexCount = 0;
45
+
46
+ // Layer properties
47
+ private float opacity = 1.0f;
48
+ private float[] dataRange = new float[]{0.0f, 1.0f};
49
+ private float scale = 1.0f;
50
+ private float offset = 0.0f;
51
+ private float missingQuantized = 127.0f;
52
+ private int textureWidth = 0;
53
+ private int textureHeight = 0;
54
+ private int conversionType = 0;
55
+ private boolean smoothingEnabled = true;
56
+ private int scaleType = 0;
57
+ private boolean isPtype = false; // ADDED
58
+ private String currentVariable = "";
59
+ private boolean textureParametersDirty = true;
60
+ private volatile boolean isVisible = true;
61
+
62
+ // Pending data buffers for thread-safe uploads
63
+ private final Object dataLock = new Object();
64
+ private ByteBuffer pendingDataBuffer = null;
65
+ private int pendingNx = 0, pendingNy = 0;
66
+ private float pendingScale = 1.0f, pendingOffset = 0.0f, pendingMissing = 127.0f;
67
+ private int pendingScaleType = 0;
68
+ private ByteBuffer pendingColormapBuffer = null;
69
+ private FloatBuffer pendingVertexBuffer = null;
70
+ private ShortBuffer pendingIndexBuffer = null;
71
+ private int uIsMRMS;
72
+ private boolean isMRMS = false;
73
+
74
+ public GridRenderLayer(Context context) {
75
+ this.context = context;
76
+ }
77
+
78
+ private double getDouble(ReadableMap map, String key, double defaultValue) {
79
+ return map.hasKey(key) ? map.getDouble(key) : defaultValue;
80
+ }
81
+
82
+ private String loadShaderSource(int resourceId) {
83
+ InputStream inputStream = context.getResources().openRawResource(resourceId);
84
+ return new Scanner(inputStream).useDelimiter("\\A").next();
85
+ }
86
+
87
+ private int createShader(int type, String source) {
88
+ int shader = GLES20.glCreateShader(type);
89
+ if (shader == 0) return 0;
90
+ GLES20.glShaderSource(shader, source);
91
+ GLES20.glCompileShader(shader);
92
+ final int[] compileStatus = new int[1];
93
+ GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compileStatus, 0);
94
+ if (compileStatus[0] == 0) {
95
+ Log.e(TAG, "Error compiling shader: " + GLES20.glGetShaderInfoLog(shader));
96
+ GLES20.glDeleteShader(shader);
97
+ return 0;
98
+ }
99
+ return shader;
100
+ }
101
+
102
+ @Override
103
+ public void initialize() {
104
+ String vertexSource = loadShaderSource(R.raw.vertex_shader);
105
+ String fragmentSource = loadShaderSource(R.raw.fragment_shader);
106
+ int vertexShader = createShader(GLES20.GL_VERTEX_SHADER, vertexSource);
107
+ int fragmentShader = createShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource);
108
+
109
+ program = GLES20.glCreateProgram();
110
+ GLES20.glAttachShader(program, vertexShader);
111
+ GLES20.glAttachShader(program, fragmentShader);
112
+ GLES20.glLinkProgram(program);
113
+
114
+ uMatrix = GLES20.glGetUniformLocation(program, "u_matrix");
115
+ uDataTexture = GLES20.glGetUniformLocation(program, "u_data_texture");
116
+ uColormapTexture = GLES20.glGetUniformLocation(program, "u_colormap_texture");
117
+ uOpacity = GLES20.glGetUniformLocation(program, "u_opacity");
118
+ uDataRange = GLES20.glGetUniformLocation(program, "u_data_range");
119
+ uScale = GLES20.glGetUniformLocation(program, "u_scale");
120
+ uOffset = GLES20.glGetUniformLocation(program, "u_offset");
121
+ uMissingQuantized = GLES20.glGetUniformLocation(program, "u_missing_quantized");
122
+ uTextureSize = GLES20.glGetUniformLocation(program, "u_texture_size");
123
+ uConversionType = GLES20.glGetUniformLocation(program, "u_conversion_type");
124
+ uSmoothing = GLES20.glGetUniformLocation(program, "u_smoothing");
125
+ uScaleType = GLES20.glGetUniformLocation(program, "u_scale_type");
126
+ uIsPtype = GLES20.glGetUniformLocation(program, "u_is_ptype");
127
+ uIsMRMS = GLES20.glGetUniformLocation(program, "u_is_mrms");
128
+ aPosition = GLES20.glGetAttribLocation(program, "a_position");
129
+ aTexCoord = GLES20.glGetAttribLocation(program, "a_texCoord");
130
+ }
131
+
132
+ public void setVariable(String variable) {
133
+ if (variable == null) {
134
+ this.currentVariable = "";
135
+ } else {
136
+ this.currentVariable = variable;
137
+ }
138
+ // MODIFICATION: Add detailed logging here
139
+ this.isPtype = "ptypeRefl".equals(this.currentVariable) || "ptypeRate".equals(this.currentVariable);
140
+ Log.d(TAG, "setVariable called. Variable: '" + this.currentVariable + "', isPtype set to: " + this.isPtype);
141
+ }
142
+
143
+ public void setIsMRMS(boolean isMRMS) {
144
+ this.isMRMS = isMRMS;
145
+ Log.d(TAG, "setIsMRMS called with: " + isMRMS);
146
+ }
147
+
148
+ public void clearData() {
149
+ this.isVisible = false;
150
+ // Also clear any pending data to prevent a stale frame from rendering
151
+ synchronized (dataLock) {
152
+ pendingDataBuffer = null;
153
+ }
154
+ }
155
+
156
+ @Override
157
+ public void render(CustomLayerRenderParameters renderParameters) {
158
+ if (program == 0 || !isVisible) return;
159
+
160
+ synchronized (dataLock) {
161
+ if (pendingVertexBuffer != null && pendingIndexBuffer != null) {
162
+ this.indexCount = pendingIndexBuffer.capacity();
163
+ if (vboId == 0) {
164
+ int[] bufs = new int[2];
165
+ GLES20.glGenBuffers(2, bufs, 0);
166
+ vboId = bufs[0];
167
+ iboId = bufs[1];
168
+ }
169
+ GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vboId);
170
+ GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, pendingVertexBuffer.capacity() * 4, pendingVertexBuffer, GLES20.GL_STATIC_DRAW);
171
+ GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, iboId);
172
+ GLES20.glBufferData(GLES20.GL_ELEMENT_ARRAY_BUFFER, pendingIndexBuffer.capacity() * 2, pendingIndexBuffer, GLES20.GL_STATIC_DRAW);
173
+ pendingVertexBuffer = null;
174
+ pendingIndexBuffer = null;
175
+ }
176
+
177
+ if (pendingDataBuffer != null) {
178
+ // --- FIX 2: LOGICAL FIX FOR TEXTURE RESIZING ---
179
+ boolean dimensionsChanged = (pendingNx != this.textureWidth || pendingNy != this.textureHeight);
180
+
181
+ this.textureWidth = pendingNx;
182
+ this.textureHeight = pendingNy;
183
+ this.scale = pendingScale;
184
+ this.offset = pendingOffset;
185
+ this.missingQuantized = pendingMissing;
186
+ this.scaleType = pendingScaleType;
187
+
188
+ if (dataTextureId == 0) {
189
+ int[] t = new int[1];
190
+ GLES20.glGenTextures(1, t, 0);
191
+ dataTextureId = t[0];
192
+ }
193
+
194
+ GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
195
+
196
+ if (dimensionsChanged || dataTextureId == 0) {
197
+ int filter = smoothingEnabled ? GLES20.GL_LINEAR : GLES20.GL_NEAREST;
198
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, filter);
199
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, filter);
200
+
201
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
202
+
203
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
204
+ GLES20.glPixelStorei(GLES20.GL_UNPACK_ALIGNMENT, 1);
205
+
206
+ pendingDataBuffer.position(0);
207
+ GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_ALPHA, pendingNx, pendingNy, 0, GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, pendingDataBuffer);
208
+ } else {
209
+ // Texture dimensions are the same, so just update its contents efficiently
210
+ pendingDataBuffer.position(0);
211
+ GLES20.glTexSubImage2D(GLES20.GL_TEXTURE_2D, 0, 0, 0, pendingNx, pendingNy, GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, pendingDataBuffer);
212
+ }
213
+ pendingDataBuffer = null;
214
+ }
215
+
216
+ if (pendingColormapBuffer != null) {
217
+ if (colormapTextureId == 0) {
218
+ int[] t = new int[1];
219
+ GLES20.glGenTextures(1, t, 0);
220
+ colormapTextureId = t[0];
221
+ }
222
+ GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, colormapTextureId);
223
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
224
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST);
225
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
226
+ pendingColormapBuffer.position(0);
227
+ GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, 256, 1, 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pendingColormapBuffer);
228
+ pendingColormapBuffer = null;
229
+ }
230
+ }
231
+
232
+ double zoom = renderParameters.getZoom();
233
+
234
+ if (vboId == 0 || iboId == 0 || indexCount == 0 || dataTextureId == 0 || colormapTextureId == 0) return;
235
+
236
+ if (textureParametersDirty) {
237
+ GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
238
+ int filter = smoothingEnabled ? GLES20.GL_LINEAR : GLES20.GL_NEAREST;
239
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, filter);
240
+ GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, filter);
241
+ textureParametersDirty = false;
242
+ }
243
+
244
+ GLES20.glUseProgram(program);
245
+
246
+ double scale = Math.pow(2.0, zoom);
247
+
248
+ List<Double> matrix = renderParameters.getProjectionMatrix();
249
+ float[] floatMatrix = new float[16];
250
+ for (int i = 0; i < 16; i++) {
251
+ floatMatrix[i] = matrix.get(i).floatValue();
252
+ }
253
+
254
+ floatMatrix[0] *= scale; // X scale
255
+ floatMatrix[1] *= scale; // X rotation
256
+ floatMatrix[2] *= scale; // X Z-component
257
+ floatMatrix[3] *= scale; // X translation
258
+ floatMatrix[4] *= scale; // Y rotation
259
+ floatMatrix[5] *= scale; // Y scale
260
+ floatMatrix[6] *= scale; // Y Z-component
261
+ floatMatrix[7] *= scale; // Y translation
262
+ floatMatrix[8] *= scale; // Z X-component
263
+ floatMatrix[9] *= scale; // Z Y-component
264
+ floatMatrix[10] *= scale; // Z scale
265
+ floatMatrix[11] *= scale; // Z translation
266
+
267
+ GLES20.glUniformMatrix4fv(uMatrix, 1, false, floatMatrix, 0);
268
+ GLES20.glUniform1f(uOpacity, opacity);
269
+ GLES20.glUniform2fv(uDataRange, 1, dataRange, 0);
270
+ GLES20.glUniform1f(uScale, this.scale);
271
+ GLES20.glUniform1f(uOffset, offset);
272
+ GLES20.glUniform1f(uMissingQuantized, missingQuantized);
273
+ GLES20.glUniform2f(uTextureSize, (float) textureWidth, (float) textureHeight);
274
+ GLES20.glUniform1i(uConversionType, conversionType);
275
+ GLES20.glUniform1i(uSmoothing, smoothingEnabled ? 1 : 0);
276
+ GLES20.glUniform1i(uScaleType, this.scaleType);
277
+ GLES20.glUniform1i(uIsPtype, this.isPtype ? 1 : 0);
278
+ GLES20.glUniform1i(uIsMRMS, this.isMRMS ? 1 : 0);
279
+
280
+ GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
281
+ GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, dataTextureId);
282
+ GLES20.glUniform1i(uDataTexture, 0);
283
+
284
+ GLES20.glActiveTexture(GLES20.GL_TEXTURE1);
285
+ GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, colormapTextureId);
286
+ GLES20.glUniform1i(uColormapTexture, 1);
287
+
288
+ GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vboId);
289
+ GLES20.glEnableVertexAttribArray(aPosition);
290
+ GLES20.glVertexAttribPointer(aPosition, 2, GLES20.GL_FLOAT, false, 16, 0);
291
+ GLES20.glEnableVertexAttribArray(aTexCoord);
292
+ GLES20.glVertexAttribPointer(aTexCoord, 2, GLES20.GL_FLOAT, false, 16, 8);
293
+ GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, iboId);
294
+
295
+ GLES20.glEnable(GLES20.GL_BLEND);
296
+ GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
297
+ GLES20.glDisable(GLES20.GL_DEPTH_TEST);
298
+
299
+ GLES20.glDrawElements(GLES20.GL_TRIANGLES, indexCount, GLES20.GL_UNSIGNED_SHORT, 0);
300
+
301
+ GLES20.glDisableVertexAttribArray(aPosition);
302
+ GLES20.glDisableVertexAttribArray(aTexCoord);
303
+ GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);
304
+ GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, 0);
305
+ }
306
+
307
+ @Override
308
+ public void deinitialize() {
309
+ if (program != 0) { GLES20.glDeleteProgram(program); program = 0; }
310
+ int[] texturesToDelete = {dataTextureId, colormapTextureId};
311
+ GLES20.glDeleteTextures(2, texturesToDelete, 0);
312
+ dataTextureId = 0; colormapTextureId = 0;
313
+ int[] buffersToDelete = {vboId, iboId};
314
+ GLES20.glDeleteBuffers(2, buffersToDelete, 0);
315
+ vboId = 0; iboId = 0;
316
+ }
317
+
318
+ @Override
319
+ public void contextLost() {
320
+ program = 0; dataTextureId = 0; colormapTextureId = 0; vboId = 0; iboId = 0;
321
+ }
322
+
323
+ public void setOpacity(float opacity) { this.opacity = opacity; }
324
+ public void setDataRange(float[] dataRange) { this.dataRange = dataRange; }
325
+ public void setConversionType(int type) { this.conversionType = type; }
326
+ public void setSmoothing(boolean enabled) {
327
+ if (this.smoothingEnabled != enabled) {
328
+ this.smoothingEnabled = enabled;
329
+ this.textureParametersDirty = true;
330
+ }
331
+ }
332
+
333
+ // Add this method to GridRenderLayer.java (around line 270)
334
+ public void updateDataParameters(float scale, float offset, float missing) {
335
+ synchronized (dataLock) {
336
+ this.scale = scale;
337
+ this.offset = offset;
338
+ this.missingQuantized = missing;
339
+ }
340
+ }
341
+
342
+ // This existing method is now used by both the old JS path and our new native path
343
+ public void updateDataTexture(byte[] bytes, int nx, int ny, float scale, float offset, float missing, String scaleType) {
344
+ ByteBuffer dataBuffer = ByteBuffer.allocateDirect(bytes.length);
345
+ dataBuffer.put(bytes);
346
+ dataBuffer.position(0);
347
+ synchronized (dataLock) {
348
+ this.pendingDataBuffer = dataBuffer;
349
+ this.pendingNx = nx;
350
+ this.pendingNy = ny;
351
+ this.pendingScale = scale;
352
+ this.pendingOffset = offset;
353
+ this.pendingMissing = missing;
354
+ this.pendingScaleType = "sqrt".equals(scaleType) ? 1 : 0;
355
+ }
356
+ // When new data is provided, ensure the layer is visible
357
+ this.isVisible = true;
358
+ }
359
+
360
+ public void updateColormapTexture(ByteBuffer data) {
361
+ synchronized (dataLock) { this.pendingColormapBuffer = data; }
362
+ }
363
+
364
+ private void generateLCCGeometry(ReadableMap gridDefMap, ArrayList<Float> vertices, ArrayList<Short> indices) {
365
+ ReadableMap gridParams = gridDefMap.getMap("grid_params");
366
+ ReadableMap projParams = gridDefMap.getMap("proj_params");
367
+
368
+ if (gridParams == null || projParams == null) {
369
+ Log.e(TAG, "Missing grid or projection parameters for LCC");
370
+ return;
371
+ }
372
+
373
+ int nx = gridParams.getInt("nx");
374
+ int ny = gridParams.getInt("ny");
375
+ double dx = getDouble(gridParams, "dx", 0);
376
+ double dy = getDouble(gridParams, "dy", 0);
377
+ double x_origin = getDouble(gridParams, "x_origin", 0);
378
+ double y_origin = getDouble(gridParams, "y_origin", 0);
379
+
380
+ int subdivisions = 60;
381
+ final double TILE_SIZE = 512.0;
382
+
383
+ double x_min = x_origin;
384
+ double y_max = y_origin;
385
+ double x_max = x_origin + (nx - 1) * dx;
386
+ double y_min = y_origin + (ny - 1) * dy;
387
+
388
+ Object[][] vertexGrid = new Object[subdivisions + 1][subdivisions + 1];
389
+ int validVertexCount = 0;
390
+
391
+ for (int row = 0; row <= subdivisions; row++) {
392
+ for (int col = 0; col <= subdivisions; col++) {
393
+ double t_x = (double) col / subdivisions;
394
+ double t_y = (double) row / subdivisions;
395
+
396
+ double proj_x = x_min + t_x * (x_max - x_min);
397
+ double proj_y = y_max + t_y * (y_min - y_max);
398
+
399
+ double[] latLon = projectLCCToLatLon(proj_x, proj_y, projParams);
400
+
401
+ if (latLon == null) {
402
+ vertexGrid[row][col] = null;
403
+ continue;
404
+ }
405
+
406
+ double lon = latLon[0];
407
+ double lat = latLon[1];
408
+
409
+ double mercX_normalized = (lon + 180.0) / 360.0;
410
+ double clampedLat = Math.max(-85.05112878, Math.min(85.05112878, lat));
411
+ double sinLatitude = Math.sin(Math.toRadians(clampedLat));
412
+ double mercY_normalized = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
413
+
414
+ double mercX = mercX_normalized * TILE_SIZE;
415
+ double mercY = mercY_normalized * TILE_SIZE;
416
+
417
+ if (!Double.isFinite(mercX) || !Double.isFinite(mercY)) {
418
+ vertexGrid[row][col] = null;
419
+ continue;
420
+ }
421
+
422
+ float tex_u = (float) t_x;
423
+ float tex_v = (float) t_y;
424
+
425
+ VertexInfo vInfo = new VertexInfo();
426
+ vInfo.mercX = (float) mercX;
427
+ vInfo.mercY = (float) mercY;
428
+ vInfo.texU = tex_u;
429
+ vInfo.texV = tex_v;
430
+ vInfo.index = (short) validVertexCount;
431
+
432
+ vertexGrid[row][col] = vInfo;
433
+
434
+ vertices.add((float) mercX);
435
+ vertices.add((float) mercY);
436
+ vertices.add(tex_u);
437
+ vertices.add(tex_v);
438
+
439
+ validVertexCount++;
440
+ }
441
+ }
442
+
443
+ if (vertices.isEmpty()) {
444
+ Log.e(TAG, "No valid vertices generated for LCC grid");
445
+ return;
446
+ }
447
+
448
+ for (int row = 0; row < subdivisions; row++) {
449
+ for (int col = 0; col < subdivisions; col++) {
450
+ VertexInfo topLeft = (VertexInfo) vertexGrid[row][col];
451
+ VertexInfo topRight = (VertexInfo) vertexGrid[row][col + 1];
452
+ VertexInfo bottomLeft = (VertexInfo) vertexGrid[row + 1][col];
453
+ VertexInfo bottomRight = (VertexInfo) vertexGrid[row + 1][col + 1];
454
+
455
+ if (topLeft != null && topRight != null && bottomLeft != null && bottomRight != null) {
456
+ indices.add(topLeft.index);
457
+ indices.add(bottomLeft.index);
458
+ indices.add(topRight.index);
459
+
460
+ indices.add(topRight.index);
461
+ indices.add(bottomLeft.index);
462
+ indices.add(bottomRight.index);
463
+ }
464
+ }
465
+ }
466
+ }
467
+
468
+ private static class VertexInfo {
469
+ float mercX, mercY, texU, texV;
470
+ short index;
471
+ }
472
+
473
+ private double[] projectLCCToLatLon(double x, double y, ReadableMap projParams) {
474
+ try {
475
+ StringBuilder projString = new StringBuilder("+proj=lcc");
476
+
477
+ if (projParams.hasKey("lat_1")) projString.append(" +lat_1=").append(projParams.getDouble("lat_1"));
478
+ if (projParams.hasKey("lat_2")) projString.append(" +lat_2=").append(projParams.getDouble("lat_2"));
479
+ if (projParams.hasKey("lat_0")) projString.append(" +lat_0=").append(projParams.getDouble("lat_0"));
480
+ if (projParams.hasKey("lon_0")) projString.append(" +lon_0=").append(projParams.getDouble("lon_0"));
481
+ if (projParams.hasKey("x_0")) projString.append(" +x_0=").append(projParams.getDouble("x_0"));
482
+ if (projParams.hasKey("y_0")) projString.append(" +y_0=").append(projParams.getDouble("y_0"));
483
+ if (projParams.hasKey("ellps")) projString.append(" +ellps=").append(projParams.getString("ellps"));
484
+ if (projParams.hasKey("a")) projString.append(" +a=").append(projParams.getDouble("a"));
485
+ if (projParams.hasKey("b")) projString.append(" +b=").append(projParams.getDouble("b"));
486
+ projString.append(" +units=m +no_defs");
487
+
488
+ org.locationtech.proj4j.CRSFactory crsFactory = new org.locationtech.proj4j.CRSFactory();
489
+ org.locationtech.proj4j.CoordinateReferenceSystem srcCRS = crsFactory.createFromParameters("LCC", projString.toString());
490
+ org.locationtech.proj4j.CoordinateReferenceSystem dstCRS = crsFactory.createFromParameters("WGS84", "+proj=longlat +datum=WGS84 +no_defs");
491
+
492
+ org.locationtech.proj4j.CoordinateTransformFactory ctFactory = new org.locationtech.proj4j.CoordinateTransformFactory();
493
+ org.locationtech.proj4j.CoordinateTransform transform = ctFactory.createTransform(srcCRS, dstCRS);
494
+
495
+ org.locationtech.proj4j.ProjCoordinate srcCoord = new org.locationtech.proj4j.ProjCoordinate(x, y);
496
+ org.locationtech.proj4j.ProjCoordinate dstCoord = new org.locationtech.proj4j.ProjCoordinate();
497
+ transform.transform(srcCoord, dstCoord);
498
+
499
+ return new double[]{dstCoord.x, dstCoord.y};
500
+
501
+ } catch (Exception e) {
502
+ Log.e(TAG, "Error in LCC projection: " + e.getMessage());
503
+ return null;
504
+ }
505
+ }
506
+
507
+ private boolean isLCCType(ReadableMap gridDefMap) {
508
+ if (gridDefMap == null) return false;
509
+ ReadableMap projParams = gridDefMap.getMap("proj_params");
510
+ if (projParams == null) return false;
511
+ return projParams.hasKey("proj") && "lcc".equals(projParams.getString("proj"));
512
+ }
513
+
514
+ public void updateGeometry(ReadableMap cornersMap, ReadableMap gridDefMap) {
515
+ if (gridDefMap == null) return;
516
+ ArrayList<Float> vertices = new ArrayList<>();
517
+ ArrayList<Short> indices = new ArrayList<>();
518
+ generateGeometryData(gridDefMap, vertices, indices);
519
+ if (vertices.isEmpty() || indices.isEmpty()) {
520
+ Log.e(TAG, "Generated geometry is empty, aborting GPU buffer update.");
521
+ return;
522
+ }
523
+ FloatBuffer vb = ByteBuffer.allocateDirect(vertices.size() * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
524
+ float[] vertexArray = new float[vertices.size()];
525
+ for (int i = 0; i < vertices.size(); i++) vertexArray[i] = vertices.get(i);
526
+ vb.put(vertexArray).position(0);
527
+ ShortBuffer ib = ByteBuffer.allocateDirect(indices.size() * 2).order(ByteOrder.nativeOrder()).asShortBuffer();
528
+ short[] indexArray = new short[indices.size()];
529
+ for (int i = 0; i < indices.size(); i++) indexArray[i] = indices.get(i);
530
+ ib.put(indexArray).position(0);
531
+ synchronized (dataLock) {
532
+ pendingVertexBuffer = vb;
533
+ pendingIndexBuffer = ib;
534
+ }
535
+ }
536
+
537
+ private boolean isGFSType(ReadableMap gridParams) {
538
+ if (gridParams == null) return false;
539
+ return getDouble(gridParams, "lon_first", -1) == 0.0 &&
540
+ Math.abs(getDouble(gridParams, "lat_first", -1)) == 90.0;
541
+ }
542
+
543
+ private boolean isECMWFType(ReadableMap gridParams) {
544
+ if (gridParams == null) return false;
545
+ return getDouble(gridParams, "lon_first", -1) == 180.0 &&
546
+ getDouble(gridParams, "lat_first", -1) == 90.0;
547
+ }
548
+
549
+ private void generateGeometryData(ReadableMap gridDefMap, ArrayList<Float> vertices, ArrayList<Short> indices) {
550
+ ReadableMap gridParams = gridDefMap.getMap("grid_params");
551
+ if (gridParams == null) {
552
+ Log.e(TAG, "❌ [Geometry] grid_params is null. Aborting mesh generation.");
553
+ return;
554
+ }
555
+
556
+ // --- Path 1: Specialized GFS Global Grid Logic (Working Correctly) ---
557
+ if (isGFSType(gridParams)) {
558
+ // This proven logic remains unchanged.
559
+ int subdivisions = 120;
560
+ int verticesPerRow = (subdivisions * 3) + 1;
561
+ final double TILE_SIZE = 512.0;
562
+ for (int row = 0; row <= subdivisions; row++) {
563
+ for (int col = 0; col <= subdivisions * 3; col++) {
564
+ float v_interp = (float) row / subdivisions;
565
+ float u_interp = (float) col / subdivisions;
566
+ double lon = -540.0 + u_interp * 1080.0;
567
+ double lat = -90.0 + v_interp * 180.0;
568
+ double mercX_normalized = (lon + 180.0) / 360.0;
569
+ double clampedLat = Math.max(-85.05112878, Math.min(85.05112878, lat));
570
+ double sinLatitude = Math.sin(Math.toRadians(clampedLat));
571
+ double mercY_normalized = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
572
+ double mercX = mercX_normalized * TILE_SIZE;
573
+ double mercY = mercY_normalized * TILE_SIZE;
574
+ vertices.add((float) mercX);
575
+ vertices.add((float) mercY);
576
+ float tex_u = (float) ((lon + 180.0) / 360.0);
577
+ float tex_v = 1.0f - v_interp;
578
+ vertices.add(tex_u);
579
+ vertices.add(tex_v);
580
+ }
581
+ }
582
+ for (short row = 0; row < subdivisions; row++) {
583
+ for (short col = 0; col < subdivisions * 3; col++) {
584
+ short tl = (short) (row * verticesPerRow + col);
585
+ short tr = (short) (tl + 1);
586
+ short bl = (short) ((row + 1) * verticesPerRow + col);
587
+ short br = (short) (bl + 1);
588
+ indices.add(tl); indices.add(bl); indices.add(tr);
589
+ indices.add(tr); indices.add(bl); indices.add(br);
590
+ }
591
+ }
592
+ return;
593
+ }
594
+
595
+ // --- Path 2: LCC Grid Logic ---
596
+ if (isLCCType(gridDefMap)) {
597
+ generateLCCGeometry(gridDefMap, vertices, indices);
598
+ return;
599
+ }
600
+
601
+ int nx = gridParams.getInt("nx");
602
+ int ny = gridParams.getInt("ny");
603
+ double lon_first = getDouble(gridParams, "lon_first", 0.0);
604
+ double lat_first = getDouble(gridParams, "lat_first", 90.0);
605
+ double dx = getDouble(gridParams, "dx_degrees", 0.0);
606
+ double dy = getDouble(gridParams, "dy_degrees", 0.0);
607
+ double lon_last = getDouble(gridParams, "lon_last", lon_first + (nx - 1) * dx);
608
+ double lat_last = getDouble(gridParams, "lat_last", lat_first + (ny - 1) * dy);
609
+ double lat_span = lat_last - lat_first;
610
+ boolean isSouthToNorth = lat_span > 0;
611
+
612
+ // Step 2: Check if this is ECMWF and normalize longitudes
613
+ boolean isECMWF = isECMWFType(gridParams);
614
+ double data_lon_first_180 = lon_first;
615
+ double data_lon_last_180 = lon_last;
616
+
617
+ if (isECMWF) {
618
+ // Convert ECMWF's 180 to -180 range to -180 to 180
619
+ data_lon_first_180 = lon_first >= 180 ? lon_first - 360 : lon_first;
620
+ data_lon_last_180 = lon_last >= 180 ? lon_last - 360 : lon_last;
621
+ } else {
622
+ // For GFS and other models
623
+ data_lon_first_180 = lon_first > 180 ? lon_first - 360 : lon_first;
624
+ data_lon_last_180 = lon_last > 180 ? lon_last - 360 : lon_last;
625
+ }
626
+
627
+ double data_lon_range = data_lon_last_180 - data_lon_first_180;
628
+
629
+ // Step 3: Define mesh properties
630
+ int subdivisions_x = 120;
631
+ int subdivisions_y = 60;
632
+ int verticesPerRow = subdivisions_x + 1;
633
+ final double TILE_SIZE = 512.0;
634
+
635
+ // Step 4: Generate three separate meshes for wrapping
636
+ for (int world_copy = -1; world_copy <= 1; world_copy++) {
637
+ short vertexStartIndex = (short) (vertices.size() / 4);
638
+ double lon_offset = world_copy * 360.0;
639
+
640
+ // Generate vertices for this world copy
641
+ for (int row = 0; row <= subdivisions_y; row++) {
642
+ for (int col = 0; col <= subdivisions_x; col++) {
643
+ float v_interp = (float) row / subdivisions_y;
644
+ float u_interp = (float) col / subdivisions_x;
645
+
646
+ // Vertex position interpolated across data's native bounds
647
+ double vertex_lon = data_lon_first_180 + (u_interp * data_lon_range);
648
+ double vertex_lat = lat_first + (v_interp * lat_span);
649
+
650
+ // Convert to map coordinates with world copy offset
651
+ double mercX_normalized = ((vertex_lon + lon_offset) + 180.0) / 360.0;
652
+ double clampedLat = Math.max(-85.05112878, Math.min(85.05112878, vertex_lat));
653
+ double sinLatitude = Math.sin(Math.toRadians(clampedLat));
654
+ double mercY_normalized = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
655
+ double mercX = mercX_normalized * TILE_SIZE;
656
+ double mercY = mercY_normalized * TILE_SIZE;
657
+
658
+ vertices.add((float) mercX);
659
+ vertices.add((float) mercY);
660
+
661
+ // Texture coordinates: clean 0.0 to 1.0 for each mesh
662
+ float tex_u = u_interp;
663
+ float tex_v = isSouthToNorth ? (1.0f - v_interp) : v_interp;
664
+
665
+ vertices.add(tex_u);
666
+ vertices.add(tex_v);
667
+ }
668
+ }
669
+
670
+ // Generate indices for this world copy
671
+ for (short row = 0; row < subdivisions_y; row++) {
672
+ for (short col = 0; col < subdivisions_x; col++) {
673
+ short tl = (short) (vertexStartIndex + row * verticesPerRow + col);
674
+ short tr = (short) (tl + 1);
675
+ short bl = (short) (vertexStartIndex + (row + 1) * verticesPerRow + col);
676
+ short br = (short) (bl + 1);
677
+
678
+ if (isSouthToNorth) {
679
+ indices.add(tl); indices.add(bl); indices.add(tr);
680
+ indices.add(tr); indices.add(bl); indices.add(br);
681
+ } else {
682
+ indices.add(tl); indices.add(tr); indices.add(bl);
683
+ indices.add(bl); indices.add(tr); indices.add(br);
684
+ }
685
+ }
686
+ }
687
+ }
688
+ }
673
689
  }