@aguacerowx/react-native 0.0.23 → 0.0.25

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