@aguacerowx/react-native 0.0.21 → 0.0.22

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