@aguacerowx/react-native 0.0.1 → 0.0.3

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 (66) hide show
  1. package/android/build/.transforms/78b892a9dae44f36e51ff0649e9c6e36/results.bin +1 -0
  2. package/android/build/.transforms/78b892a9dae44f36e51ff0649e9c6e36/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/results.bin +1 -0
  4. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/AguaceroPackage.dex +0 -0
  5. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/BuildConfig.dex +0 -0
  6. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.dex +0 -0
  7. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayer.dex +0 -0
  8. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderLayerView.dex +0 -0
  9. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/GridRenderManager.dex +0 -0
  10. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/InspectorModule.dex +0 -0
  11. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/ShaderUtils.dex +0 -0
  12. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/aguacerowx/reactnative/WeatherFrameProcessorModule.dex +0 -0
  13. package/android/build/.transforms/f4de14556a82e99f0d27ddcab762b219/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  14. package/android/build/generated/source/buildConfig/debug/com/aguacerowx/reactnative/BuildConfig.java +10 -0
  15. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +8 -0
  16. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  17. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  18. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  19. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  20. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  21. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +4 -0
  22. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_fragment_shader.glsl.flat +0 -0
  23. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_debug_vertex_shader.glsl.flat +0 -0
  24. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_fragment_shader.glsl.flat +0 -0
  25. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/raw_vertex_shader.glsl.flat +0 -0
  26. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +5 -0
  27. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  28. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  29. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  30. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  31. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  32. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  33. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  34. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  35. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  36. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  37. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  38. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  39. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  40. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +6 -0
  41. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +8 -0
  42. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +8 -0
  43. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  44. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  45. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_fragment_shader.glsl +13 -0
  46. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/debug_vertex_shader.glsl +13 -0
  47. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/fragment_shader.glsl +87 -0
  48. package/android/build/intermediates/packaged_res/debug/packageDebugResources/raw/vertex_shader.glsl +20 -0
  49. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/AguaceroPackage.class +0 -0
  50. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/BuildConfig.class +0 -0
  51. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer$VertexInfo.class +0 -0
  52. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayer.class +0 -0
  53. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderLayerView.class +0 -0
  54. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/GridRenderManager.class +0 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/InspectorModule.class +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/ShaderUtils.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/aguacerowx/reactnative/WeatherFrameProcessorModule.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  59. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +5 -0
  60. package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  61. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/AguaceroPackage.class.uniqueId0 +0 -0
  62. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/WeatherFrameProcessorModule.class.uniqueId1 +0 -0
  63. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  64. package/android/build.gradle +28 -12
  65. package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +44 -38
  66. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Automatically generated file. DO NOT MODIFY
3
+ */
4
+ package com.aguacerowx.reactnative;
5
+
6
+ public final class BuildConfig {
7
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
8
+ public static final String LIBRARY_PACKAGE_NAME = "com.aguacerowx.reactnative";
9
+ public static final String BUILD_TYPE = "debug";
10
+ }
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.aguacerowx.reactnative" > <!-- This manifest is for a library module. It requires very little. -->
4
+ <!-- The package name MUST exactly match the namespace in build.gradle -->
5
+ <!-- and the package declarations in your Java files. -->
6
+ <uses-sdk android:minSdkVersion="23" />
7
+
8
+ </manifest>
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.aguacerowx.reactnative",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false
@@ -0,0 +1,4 @@
1
+ int raw debug_fragment_shader 0x0
2
+ int raw debug_vertex_shader 0x0
3
+ int raw fragment_shader 0x0
4
+ int raw vertex_shader 0x0
@@ -0,0 +1,5 @@
1
+ #Tue Nov 04 18:55:58 EST 2025
2
+ com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/fragment_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\fragment_shader.glsl
3
+ com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/debug_vertex_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\debug_vertex_shader.glsl
4
+ com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/vertex_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\vertex_shader.glsl
5
+ com.aguacerowx.reactnative.aguacerowx_react-native-main-6\:/raw/debug_fragment_shader.glsl=C\:\\Users\\my41m\\aguacero\\ReactNativeApp\\node_modules\\@aguacerowx\\react-native\\android\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\raw\\debug_fragment_shader.glsl
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\res"><file name="debug_fragment_shader" path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\res\raw\debug_fragment_shader.glsl" qualifiers="" type="raw"/><file name="debug_vertex_shader" path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\res\raw\debug_vertex_shader.glsl" qualifiers="" type="raw"/><file name="fragment_shader" path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\res\raw\fragment_shader.glsl" qualifiers="" type="raw"/><file name="vertex_shader" path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\res\raw\vertex_shader.glsl" qualifiers="" type="raw"/></source></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\debug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\debug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\build\generated\res\resValues\debug"/></dataSet><mergedItems/></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\debug\assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\build\intermediates\shader_assets\debug\compileDebugShaders\out"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\debug\jniLibs"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\debug\shaders"/></dataSet></merger>
@@ -0,0 +1,6 @@
1
+ R_DEF: Internal format may change without notice
2
+ local
3
+ raw debug_fragment_shader
4
+ raw debug_vertex_shader
5
+ raw fragment_shader
6
+ raw vertex_shader
@@ -0,0 +1,8 @@
1
+ 1<?xml version="1.0" encoding="utf-8"?>
2
+ 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ 3 package="com.aguacerowx.reactnative" > <!-- This manifest is for a library module. It requires very little. -->
4
+ 4 <!-- The package name MUST exactly match the namespace in build.gradle -->
5
+ 5 <!-- and the package declarations in your Java files. -->
6
+ 6 <uses-sdk android:minSdkVersion="23" />
7
+ 7
8
+ 8</manifest>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.aguacerowx.reactnative" > <!-- This manifest is for a library module. It requires very little. -->
4
+ <!-- The package name MUST exactly match the namespace in build.gradle -->
5
+ <!-- and the package declarations in your Java files. -->
6
+ <uses-sdk android:minSdkVersion="23" />
7
+
8
+ </manifest>
@@ -0,0 +1,13 @@
1
+ precision highp float;
2
+
3
+ varying vec2 v_texCoord;
4
+ uniform sampler2D u_data_texture;
5
+
6
+ void main() {
7
+ // Read the raw normalized value [0.0, 1.0] from the texture's alpha channel.
8
+ float raw_normalized_value = texture2D(u_data_texture, v_texCoord).a;
9
+
10
+ // Output this value directly as a grayscale color.
11
+ // If the data is valid, this will produce a black and white weather map.
12
+ gl_FragColor = vec4(raw_normalized_value, raw_normalized_value, raw_normalized_value, 1.0);
13
+ }
@@ -0,0 +1,13 @@
1
+ attribute vec2 a_position; // Vertex position in Mercator coordinates (0.0 to 1.0)
2
+ attribute vec2 a_texCoord;
3
+
4
+ varying vec2 v_texCoord;
5
+
6
+ void main() {
7
+ // This is a "passthrough" shader. It IGNORES the u_matrix from the map camera.
8
+ // It converts the input position (0..1) directly to OpenGL clip space (-1..1).
9
+ // This should paint a giant square over the entire screen, regardless of map pan/zoom.
10
+ gl_Position = vec4(a_position.x * 2.0 - 1.0, (1.0 - a_position.y) * 2.0 - 1.0, 0.0, 1.0);
11
+
12
+ v_texCoord = a_texCoord;
13
+ }
@@ -0,0 +1,87 @@
1
+ // packages/react-native/android/src/main/res/raw/fragment_shader.glsl
2
+
3
+ precision highp float;
4
+ varying vec2 v_texCoord;
5
+
6
+ uniform sampler2D u_data_texture;
7
+ uniform sampler2D u_colormap_texture;
8
+ uniform float u_scale;
9
+ uniform float u_offset;
10
+ uniform float u_missing_quantized;
11
+ uniform float u_opacity;
12
+ uniform vec2 u_data_range;
13
+ uniform vec2 u_texture_size;
14
+ uniform int u_smoothing;
15
+
16
+ // Custom bilinear filtering that respects NaN boundaries
17
+ float sampleDataTextureSmooth(vec2 uv) {
18
+ float missing_in_texture_range = u_missing_quantized + 128.0;
19
+
20
+ // Get the four corner samples for bilinear interpolation
21
+ vec2 pixel_coord = uv * u_texture_size;
22
+ vec2 pixel_floor = floor(pixel_coord - 0.5) + 0.5;
23
+ vec2 f = pixel_coord - pixel_floor;
24
+
25
+ // Sample the 2x2 grid
26
+ float s00 = texture2D(u_data_texture, (pixel_floor + vec2(0.0, 0.0)) / u_texture_size).a * 255.0;
27
+ float s10 = texture2D(u_data_texture, (pixel_floor + vec2(1.0, 0.0)) / u_texture_size).a * 255.0;
28
+ float s01 = texture2D(u_data_texture, (pixel_floor + vec2(0.0, 1.0)) / u_texture_size).a * 255.0;
29
+ float s11 = texture2D(u_data_texture, (pixel_floor + vec2(1.0, 1.0)) / u_texture_size).a * 255.0;
30
+
31
+ // Check which samples are valid (not NaN)
32
+ bool valid00 = abs(s00 - missing_in_texture_range) >= 0.5;
33
+ bool valid10 = abs(s10 - missing_in_texture_range) >= 0.5;
34
+ bool valid01 = abs(s01 - missing_in_texture_range) >= 0.5;
35
+ bool valid11 = abs(s11 - missing_in_texture_range) >= 0.5;
36
+
37
+ // If ANY sample is NaN, return NaN (this pixel is on an edge)
38
+ if (!valid00 || !valid10 || !valid01 || !valid11) {
39
+ return missing_in_texture_range;
40
+ }
41
+
42
+ // All samples are valid - do proper bilinear interpolation
43
+ float s0 = mix(s00, s10, f.x);
44
+ float s1 = mix(s01, s11, f.x);
45
+ return mix(s0, s1, f.y);
46
+ }
47
+
48
+ // Simple nearest-neighbor sampling
49
+ float sampleDataTextureNearest(vec2 uv) {
50
+ // Snap to exact pixel center
51
+ vec2 snapped_coord = floor(uv * u_texture_size + 0.5) / u_texture_size;
52
+ return texture2D(u_data_texture, snapped_coord).a * 255.0;
53
+ }
54
+
55
+ void main() {
56
+ // Choose sampling method based on smoothing setting
57
+ float value_in_texture;
58
+ if (u_smoothing == 1) {
59
+ value_in_texture = sampleDataTextureSmooth(v_texCoord);
60
+ } else {
61
+ value_in_texture = sampleDataTextureNearest(v_texCoord);
62
+ }
63
+
64
+ float missing_in_texture_range = u_missing_quantized + 128.0;
65
+
66
+ // Check if this pixel is a predefined missing value
67
+ if (abs(value_in_texture - missing_in_texture_range) < 0.5) {
68
+ discard;
69
+ }
70
+
71
+ // De-quantize the texture value to its actual physical value
72
+ float quantized_value = value_in_texture - 128.0;
73
+ float raw_value = quantized_value * u_scale + u_offset;
74
+
75
+ // If the data is below the specified minimum range, make it invisible.
76
+ if (raw_value < u_data_range.x) {
77
+ discard;
78
+ }
79
+
80
+ // Normalize the value to a 0-1 coordinate for colormap lookup
81
+ float colormap_coord = (raw_value - u_data_range.x) / (u_data_range.y - u_data_range.x);
82
+ colormap_coord = clamp(colormap_coord, 0.0, 1.0);
83
+
84
+ // Sample the colormap and apply opacity
85
+ vec4 color = texture2D(u_colormap_texture, vec2(colormap_coord, 0.5));
86
+ gl_FragColor = vec4(color.rgb, color.a * u_opacity);
87
+ }
@@ -0,0 +1,20 @@
1
+ // The view-projection matrix from the Mapbox camera
2
+ uniform mat4 u_matrix;
3
+
4
+ // Attributes passed from the vertex buffer
5
+ attribute vec2 a_position; // Vertex position in Mercator coordinates (0.0 to 1.0)
6
+ attribute vec2 a_texCoord; // Texture coordinate (0.0 to 1.0)
7
+
8
+ // Passed to the fragment shader
9
+ varying vec2 v_texCoord;
10
+
11
+ void main() {
12
+ // This is the intended use.
13
+ // The u_matrix correctly transforms the 2D Mercator coordinate (a_position)
14
+ // into the final 4D clip space position for the GPU.
15
+ // We construct a vec4 with z=0.0 and w=1.0 to treat it as a point on the map's surface.
16
+ gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);
17
+
18
+ // Pass the texture coordinate to the fragment shader
19
+ v_texCoord = a_texCoord;
20
+ }
@@ -0,0 +1,5 @@
1
+ com.aguacerowx.reactnative
2
+ raw debug_fragment_shader
3
+ raw debug_vertex_shader
4
+ raw fragment_shader
5
+ raw vertex_shader
@@ -0,0 +1,17 @@
1
+ -- Merging decision tree log ---
2
+ manifest
3
+ ADDED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml:2:1-7:12
4
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml:2:1-7:12
5
+ package
6
+ ADDED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml:3:5-41
7
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml
8
+ xmlns:android
9
+ ADDED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml:2:11-69
10
+ uses-sdk
11
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml reason: use-sdk injection requested
12
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml
13
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml
14
+ android:targetSdkVersion
15
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml
16
+ android:minSdkVersion
17
+ INJECTED from C:\Users\my41m\aguacero\ReactNativeApp\node_modules\@aguacerowx\react-native\android\src\main\AndroidManifest.xml
@@ -10,6 +10,7 @@ repositories {
10
10
  basic(BasicAuthentication)
11
11
  }
12
12
  credentials {
13
+ // It's good practice to check for the property on the root project
13
14
  username = "mapbox"
14
15
  password = project.rootProject.findProperty("MAPBOX_DOWNLOADS_TOKEN") ?: System.getenv("MAPBOX_DOWNLOADS_TOKEN")
15
16
  }
@@ -20,10 +21,10 @@ apply plugin: 'com.android.library'
20
21
 
21
22
  android {
22
23
  namespace 'com.aguacerowx.reactnative'
23
- compileSdk 34
24
+ compileSdk 34 // Consider using rootProject.ext.compileSdkVersion for consistency
24
25
 
25
26
  defaultConfig {
26
- minSdk 23
27
+ minSdk 23 // Consider using rootProject.ext.minSdkVersion
27
28
  targetSdk 34
28
29
  }
29
30
 
@@ -46,24 +47,39 @@ dependencies {
46
47
  compileOnly 'com.github.luben:zstd-jni:1.5.7-6@aar'
47
48
  }
48
49
 
49
- // --- THIS IS THE FINAL FIX ---
50
- // This block delays the dependency resolution until after the main project is configured,
51
- // which guarantees that 'mapboxMapsVersion' will be available to read.
50
+
51
+ // --- THIS IS THE ENHANCED, SELF-CONFIGURING BLOCK ---
52
+ // This block delays dependency resolution until the whole project is configured.
53
+ // It detects the environment and chooses the correct Mapbox artifact automatically.
52
54
  project.afterEvaluate {
55
+ // 1. Resolve the Mapbox Version (your existing logic)
53
56
  def resolvedMapboxVersion
54
57
  if (project.rootProject.hasProperty('mapboxMapsVersion')) {
55
- // If the property from @rnmapbox/maps exists, use their exact version.
56
58
  resolvedMapboxVersion = project.rootProject.mapboxMapsVersion
57
- println "[aguacerowx] Found and using mapboxMapsVersion: ${resolvedMapboxVersion}"
59
+ println "[aguacerowx] Found mapboxMapsVersion: ${resolvedMapboxVersion}"
58
60
  } else {
59
- // If for some reason it doesn't exist, fall back to a specific, known-good version.
60
- // We avoid '11.+' because we know it is broken in this environment.
61
- resolvedMapboxVersion = "11.15.2"
61
+ resolvedMapboxVersion = "11.15.2" // A known-good fallback
62
62
  println "[aguacerowx] WARNING: Could not find 'mapboxMapsVersion' property. Falling back to ${resolvedMapboxVersion}."
63
63
  }
64
64
 
65
- // Add the Mapbox dependency using the version we just determined.
65
+ // 2. Detect if @rnmapbox/maps is present in the user's project
66
+ // We check the root project to see all included modules.
67
+ def rnMapboxIsPresent = project.rootProject.findProject(':rnmapbox_maps') != null
68
+ def mapboxArtifact
69
+
70
+ // 3. Choose the correct Mapbox artifact based on the detection
71
+ if (rnMapboxIsPresent) {
72
+ // If @rnmapbox/maps is present, we MUST use the ndk27 variant to avoid conflicts.
73
+ mapboxArtifact = "android-ndk27"
74
+ println "[aguacerowx] @rnmapbox/maps detected. Using Mapbox artifact: '${mapboxArtifact}' to ensure compatibility."
75
+ } else {
76
+ // If it's not present, use the standard 'android' variant.
77
+ mapboxArtifact = "android"
78
+ println "[aguacerowx] @rnmapbox/maps not detected. Using standard Mapbox artifact: '${mapboxArtifact}'."
79
+ }
80
+
81
+ // 4. Add the chosen Mapbox dependency using the version and artifact we just determined.
66
82
  dependencies {
67
- implementation "com.mapbox.maps:android:${resolvedMapboxVersion}"
83
+ implementation "com.mapbox.maps:${mapboxArtifact}:${resolvedMapboxVersion}"
68
84
  }
69
85
  }
@@ -1,3 +1,5 @@
1
+ // packages/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java
2
+
1
3
  package com.aguacerowx.reactnative;
2
4
 
3
5
  import androidx.annotation.NonNull;
@@ -10,6 +12,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
10
12
  import com.facebook.react.bridge.ReactMethod;
11
13
  import com.facebook.react.bridge.ReadableMap;
12
14
  import com.facebook.react.bridge.WritableMap;
15
+ import com.facebook.react.modules.network.OkHttpClientProvider;
13
16
 
14
17
  import org.json.JSONObject;
15
18
 
@@ -17,12 +20,16 @@ import java.io.ByteArrayOutputStream;
17
20
  import java.io.File;
18
21
  import java.io.FileOutputStream;
19
22
  import java.io.IOException;
20
- import java.net.HttpURLConnection;
21
- import java.net.URL;
23
+
22
24
  import java.nio.charset.StandardCharsets;
23
25
  import java.util.concurrent.ExecutorService;
24
26
  import java.util.concurrent.Executors;
25
27
 
28
+ import okhttp3.OkHttpClient;
29
+ import okhttp3.Request;
30
+ import okhttp3.Response;
31
+ import okhttp3.ResponseBody;
32
+
26
33
 
27
34
  public class WeatherFrameProcessorModule extends ReactContextBaseJavaModule {
28
35
 
@@ -59,74 +66,73 @@ public class WeatherFrameProcessorModule extends ReactContextBaseJavaModule {
59
66
  FileOutputStream fos = null;
60
67
  try {
61
68
  if (taskToken != this.currentRunToken) {
62
- // Task was cancelled, do nothing.
63
- return;
69
+ return; // Task was cancelled
64
70
  }
65
-
66
- // 1. Network Request (This part is perfect, no changes needed)
71
+
72
+ // --- START OF REPLACEMENT ---
73
+
74
+ // 1. Get the shared OkHttpClient instance from React Native
75
+ OkHttpClient client = OkHttpClientProvider.getOkHttpClient();
76
+
77
+ // 2. Get request details from options
67
78
  String urlString = options.getString("url");
68
79
  String apiKey = options.getString("apiKey");
69
80
  String bundleId = options.getString("bundleId");
70
- URL requestUrl = new URL(urlString);
71
- HttpURLConnection conn = (HttpURLConnection) requestUrl.openConnection();
72
- conn.setRequestMethod("GET");
73
- conn.setRequestProperty("x-api-key", apiKey);
81
+
82
+ // 3. Build the OkHttp Request
83
+ Request.Builder requestBuilder = new Request.Builder()
84
+ .url(urlString)
85
+ .header("x-api-key", apiKey);
86
+
74
87
  if (bundleId != null) {
75
- conn.setRequestProperty("x-app-identifier", bundleId);
76
- }
77
-
78
- if (conn.getResponseCode() != 200) {
79
- throw new IOException("HTTP Error: " + conn.getResponseCode());
88
+ requestBuilder.header("x-app-identifier", bundleId);
80
89
  }
81
90
 
82
- ByteArrayOutputStream result = new ByteArrayOutputStream();
83
- byte[] buffer = new byte[8192];
84
- int length;
85
- while ((length = conn.getInputStream().read(buffer)) != -1) {
86
- result.write(buffer, 0, length);
91
+ Request request = requestBuilder.build();
92
+
93
+ String responseString;
94
+ // 4. Execute the request and handle the response
95
+ try (Response response = client.newCall(request).execute()) {
96
+ if (!response.isSuccessful()) {
97
+ throw new IOException("HTTP Error: " + response.code());
98
+ }
99
+
100
+ ResponseBody body = response.body();
101
+ if (body == null) {
102
+ throw new IOException("Response body was null");
103
+ }
104
+ responseString = body.string();
87
105
  }
88
- String responseString = result.toString(StandardCharsets.UTF_8.name());
89
- JSONObject jsonResponse = new JSONObject(responseString);
90
- conn.disconnect();
91
106
 
107
+ // --- END OF REPLACEMENT ---
108
+
109
+ // The rest of your logic remains the same
110
+ JSONObject jsonResponse = new JSONObject(responseString);
92
111
  String b64CompressedData = jsonResponse.getString("data");
93
112
  JSONObject encoding = jsonResponse.getJSONObject("encoding");
94
-
95
- // --- START OF EDITS ---
96
113
 
97
- // 2. Decode Base64 into the RAW COMPRESSED bytes.
98
- // DO NOT decompress it here.
99
114
  byte[] compressedData = Base64.decode(b64CompressedData, Base64.DEFAULT);
100
115
 
101
- // 3. Write the SMALL, COMPRESSED data to a file.
102
116
  File cacheDir = reactContext.getCacheDir();
103
- // Use a predictable filename to avoid creating duplicate files for the same frame
104
117
  String fileName = "frame_" + urlString.hashCode() + ".zst";
105
118
  File dataFile = new File(cacheDir, fileName);
106
119
 
107
120
  fos = new FileOutputStream(dataFile);
108
- fos.write(compressedData); // Write the compressed bytes
121
+ fos.write(compressedData);
109
122
  fos.flush();
110
123
  fos.close();
111
- fos = null; // Set to null after successful close
124
+ fos = null;
112
125
 
113
- // 4. Prepare Success Response with the file path and metadata
114
126
  WritableMap responseMap = Arguments.createMap();
115
127
  responseMap.putString("filePath", dataFile.getAbsolutePath());
116
128
  responseMap.putDouble("scale", encoding.getDouble("scale"));
117
129
  responseMap.putDouble("offset", encoding.getDouble("offset"));
118
130
  responseMap.putDouble("missing", encoding.getDouble("missing_quantized"));
119
-
120
- // We still pass this for the very first frame to load instantly without a flicker.
121
- // The preloader logic on the JS side will ignore this and just use the filePath.
122
131
  responseMap.putString("dataAsBase64", b64CompressedData);
123
132
 
124
133
  callback.invoke(null, responseMap);
125
134
 
126
- // --- END OF EDITS ---
127
-
128
135
  } catch (Exception e) {
129
- // Don't invoke callback if task was cancelled, to avoid spamming logs
130
136
  if (taskToken == this.currentRunToken) {
131
137
  android.util.Log.e("AguaceroWX", "Error processing frame", e);
132
138
  callback.invoke(e.getMessage(), null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aguacerowx/react-native",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Native weather rendering for React Native",
5
5
  "main": "index.js",
6
6
  "react-native": "index.js",