@woosh/meep-engine 2.129.4 → 2.131.0

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 (81) hide show
  1. package/package.json +1 -1
  2. package/src/core/collection/queue/Deque.d.ts +4 -0
  3. package/src/core/color/illuminant/D65_spd_analytical.d.ts +12 -0
  4. package/src/core/color/illuminant/D65_spd_analytical.d.ts.map +1 -0
  5. package/src/core/color/illuminant/D65_spd_analytical.js +70 -0
  6. package/src/core/color/illuminant/D65_spd_tabulated.d.ts +13 -0
  7. package/src/core/color/illuminant/D65_spd_tabulated.d.ts.map +1 -0
  8. package/src/core/color/illuminant/D65_spd_tabulated.js +105 -0
  9. package/src/core/color/sRGB/sRGB_cmf.d.ts +11 -0
  10. package/src/core/color/sRGB/sRGB_cmf.d.ts.map +1 -0
  11. package/src/core/color/sRGB/sRGB_cmf.js +22 -0
  12. package/src/core/color/xyz/xyz_cmf_tabulated.d.ts +22 -0
  13. package/src/core/color/xyz/xyz_cmf_tabulated.d.ts.map +1 -0
  14. package/src/core/color/xyz/xyz_cmf_tabulated.js +212 -0
  15. package/src/core/color/xyz/xyz_cmf_wyman.d.ts +13 -0
  16. package/src/core/color/xyz/xyz_cmf_wyman.d.ts.map +1 -0
  17. package/src/core/color/xyz/xyz_cmf_wyman.js +65 -0
  18. package/src/core/color/xyz/xyz_to_rgb.d.ts +3 -3
  19. package/src/core/color/xyz/xyz_to_rgb.d.ts.map +1 -1
  20. package/src/core/color/xyz/xyz_to_rgb.js +2 -2
  21. package/src/core/math/complex/complex_add.d.ts +8 -0
  22. package/src/core/math/complex/complex_add.d.ts.map +1 -0
  23. package/src/core/math/complex/complex_add.js +11 -0
  24. package/src/core/math/complex/complex_div.d.ts +8 -0
  25. package/src/core/math/complex/complex_div.d.ts.map +1 -0
  26. package/src/core/math/complex/complex_div.js +12 -0
  27. package/src/core/math/complex/complex_mul.d.ts +8 -0
  28. package/src/core/math/complex/complex_mul.d.ts.map +1 -0
  29. package/src/core/math/complex/complex_mul.js +10 -0
  30. package/src/core/math/complex/complex_sub.d.ts +8 -0
  31. package/src/core/math/complex/complex_sub.d.ts.map +1 -0
  32. package/src/core/math/complex/complex_sub.js +10 -0
  33. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.d.ts +40 -0
  34. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.d.ts.map +1 -0
  35. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.js +124 -0
  36. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts +168 -0
  37. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts.map +1 -0
  38. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.js +163 -0
  39. package/src/core/math/physics/mie/compute_bhmie_optical_properties.d.ts +18 -0
  40. package/src/core/math/physics/mie/compute_bhmie_optical_properties.d.ts.map +1 -0
  41. package/src/core/math/physics/mie/compute_bhmie_optical_properties.js +151 -0
  42. package/src/core/math/physics/mie/compute_lorenz_mie_optical_properties.d.ts +12 -0
  43. package/src/core/math/physics/mie/compute_lorenz_mie_optical_properties.d.ts.map +1 -0
  44. package/src/core/math/physics/mie/compute_lorenz_mie_optical_properties.js +363 -0
  45. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts +15 -0
  46. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts.map +1 -0
  47. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.js +148 -0
  48. package/src/core/math/physics/mie/ri_air.d.ts +7 -0
  49. package/src/core/math/physics/mie/ri_air.d.ts.map +1 -0
  50. package/src/core/math/physics/mie/ri_air.js +69 -0
  51. package/src/core/math/physics/mie/ri_ammonium_sulfate.d.ts +7 -0
  52. package/src/core/math/physics/mie/ri_ammonium_sulfate.d.ts.map +1 -0
  53. package/src/core/math/physics/mie/ri_ammonium_sulfate.js +140 -0
  54. package/src/core/math/physics/mie/ri_brine.d.ts +7 -0
  55. package/src/core/math/physics/mie/ri_brine.d.ts.map +1 -0
  56. package/src/core/math/physics/mie/ri_brine.js +145 -0
  57. package/src/core/math/physics/mie/ri_dust.d.ts +7 -0
  58. package/src/core/math/physics/mie/ri_dust.d.ts.map +1 -0
  59. package/src/core/math/physics/mie/ri_dust.js +153 -0
  60. package/src/core/math/physics/mie/ri_pollen.d.ts +7 -0
  61. package/src/core/math/physics/mie/ri_pollen.d.ts.map +1 -0
  62. package/src/core/math/physics/mie/ri_pollen.js +146 -0
  63. package/src/core/math/physics/mie/ri_smoke.d.ts +7 -0
  64. package/src/core/math/physics/mie/ri_smoke.d.ts.map +1 -0
  65. package/src/core/math/physics/mie/ri_smoke.js +151 -0
  66. package/src/core/math/physics/mie/ri_soot.d.ts +7 -0
  67. package/src/core/math/physics/mie/ri_soot.d.ts.map +1 -0
  68. package/src/core/math/physics/mie/ri_soot.js +148 -0
  69. package/src/core/math/physics/mie/ri_water.d.ts +7 -0
  70. package/src/core/math/physics/mie/ri_water.d.ts.map +1 -0
  71. package/src/core/math/physics/mie/ri_water.js +148 -0
  72. package/src/core/model/node-graph/node/NodeInstancePortReference.d.ts.map +1 -1
  73. package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -0
  74. package/src/engine/ecs/storage/binary/BinaryClassSerializationAdapter.d.ts.map +1 -1
  75. package/src/engine/ecs/storage/binary/BinaryClassSerializationAdapter.js +28 -19
  76. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +1 -1
  77. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts +2 -2
  78. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts.map +1 -1
  79. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +9 -9
  80. package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +3 -3
  81. package/src/engine/ecs/storage/binary/object/BinaryObjectSerializationAdapter.js +3 -3
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Add two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_add(result, a, b) {
8
+ result[0] = a[0] + b[0];
9
+ result[1] = a[1] + b[1];
10
+ }
11
+
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Divide two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_div(result: number[], a: number[], b: number[]): void;
8
+ //# sourceMappingURL=complex_div.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complex_div.d.ts","sourceRoot":"","sources":["../../../../../src/core/math/complex/complex_div.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oCAJW,MAAM,EAAE,KACR,MAAM,EAAE,KACR,MAAM,EAAE,QAOlB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Divide two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_div(result, a, b) {
8
+ const sqr_norm_b = b[0] * b[0] + b[1] * b[1];
9
+
10
+ result[0] = (a[0] * b[0] + a[1] * b[1]) / sqr_norm_b;
11
+ result[1] = (a[1] * b[0] - a[0] * b[1]) / sqr_norm_b;
12
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Multiply two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_mul(result: number[], a: number[], b: number[]): void;
8
+ //# sourceMappingURL=complex_mul.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complex_mul.d.ts","sourceRoot":"","sources":["../../../../../src/core/math/complex/complex_mul.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oCAJW,MAAM,EAAE,KACR,MAAM,EAAE,KACR,MAAM,EAAE,QAKlB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Multiply two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_mul(result, a, b) {
8
+ result[0] = a[0] * b[0] - a[1] * b[1];
9
+ result[1] = a[0] * b[1] + a[1] * b[0];
10
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Subtract two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_sub(result: number[], a: number[], b: number[]): void;
8
+ //# sourceMappingURL=complex_sub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complex_sub.d.ts","sourceRoot":"","sources":["../../../../../src/core/math/complex/complex_sub.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oCAJW,MAAM,EAAE,KACR,MAAM,EAAE,KACR,MAAM,EAAE,QAKlB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Subtract two complex numbers
3
+ * @param {number[]} result
4
+ * @param {number[]} a
5
+ * @param {number[]} b
6
+ */
7
+ export function complex_sub(result, a, b) {
8
+ result[0] = a[0] - b[0];
9
+ result[1] = a[1] - b[1];
10
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * 📚 A standard library of common atmospheric particles for use in rendering.
3
+ *
4
+ * This list provides physically-based, wavelength-dependent presets.
5
+ *
6
+ * Note: the medium is Air.
7
+ */
8
+ export type MIE_PARTICLES_STANDARD = any;
9
+ export namespace MIE_PARTICLES_STANDARD {
10
+ namespace CONTINENTAL_HAZE_SMALL {
11
+ export { diameter_m as diameter };
12
+ export { radius };
13
+ export { refraction as particle_refraction };
14
+ export let cross_section_scattering: number[];
15
+ export let cross_section_extinction: number[];
16
+ export let extinction_intercept: number[];
17
+ }
18
+ namespace CONTINENTAL_HAZE_MEDIUM { }
19
+ namespace CONTINENTAL_HAZE_LARGE { }
20
+ namespace MARITIME_HAZE_SMALL { }
21
+ namespace MARITIME_HAZE_MEDIUM { }
22
+ namespace MARITIME_HAZE_LARGE { }
23
+ namespace FOG_DROPLET_SMALL { }
24
+ namespace FOG_DROPLET_MEDIUM { }
25
+ namespace CLOUD_DROPLET_LARGE { }
26
+ namespace SMOKE_PARTICLE_SMALL { }
27
+ namespace SMOKE_PARTICLE_MEDIUM { }
28
+ namespace SMOKE_PARTICLE_LARGE { }
29
+ namespace SOOT_PARTICLE_SMALL { }
30
+ namespace SOOT_AGGREGATE_MEDIUM { }
31
+ namespace SOOT_AGGREGATE_LARGE { }
32
+ namespace FINE_DUST_SMALL { }
33
+ namespace COARSE_DUST_MEDIUM { }
34
+ namespace COARSE_DUST_LARGE { }
35
+ namespace POLLEN_PARTICLE_MEDIUM { }
36
+ namespace POLLEN_PARTICLE_LARGE { }
37
+ }
38
+ declare const radius: number;
39
+ export {};
40
+ //# sourceMappingURL=MIE_PARTICLES_STANDARD.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MIE_PARTICLES_STANDARD.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/mie/MIE_PARTICLES_STANDARD.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBI,6BAAgC"}
@@ -0,0 +1,124 @@
1
+ import { compute_mie_particle_properties_rgb } from "./compute_mie_particle_properties_rgb.js";
2
+ import { ri_air } from "./ri_air.js";
3
+ import { ri_ammonium_sulfate } from "./ri_ammonium_sulfate.js";
4
+ import { ri_brine } from "./ri_brine.js";
5
+ import { ri_dust } from "./ri_dust.js";
6
+ import { ri_pollen } from "./ri_pollen.js";
7
+ import { ri_smoke } from "./ri_smoke.js";
8
+ import { ri_soot } from "./ri_soot.js";
9
+ import { ri_water } from "./ri_water.js";
10
+
11
+
12
+ /**
13
+ * Helper function to build a standard particle definition.
14
+ * Assumes the medium is air (n=1.0).
15
+ * Computes the spectrally-averaged RGB Mie properties.
16
+ * @param {number} diameter_m (in meters)
17
+ * @param {function(result:number[], wavelength:number):number[]} refraction refraction [n, k] - Complex refractive index of the particle. (n=real, k=imaginary)
18
+ */
19
+ function make(diameter_m, refraction){
20
+ const radius = diameter_m * 0.5;
21
+
22
+ // perform the full spectral sweep (380nm-780nm) and integrate against sRGB CMFs.
23
+ const mie = compute_mie_particle_properties_rgb(
24
+ radius,
25
+ refraction,
26
+ ri_air,
27
+ );
28
+
29
+ return {
30
+ diameter: diameter_m,
31
+ radius,
32
+ particle_refraction: refraction,
33
+ cross_section_scattering: mie.scattering_coefficients, // [R_sca, G_sca, B_sca]
34
+ cross_section_extinction: mie.extinction_coefficients, // [R_ext, G_ext, B_ext]
35
+ extinction_intercept: mie.extinction_intercept,
36
+ }
37
+ }
38
+
39
+ // TODO we can pre-compute these, as integration can be a little time intense
40
+
41
+
42
+ /**
43
+ * 📚 A standard library of common atmospheric particles for use in rendering.
44
+ *
45
+ * This list provides physically-based, wavelength-dependent presets.
46
+ *
47
+ * Note: the medium is Air.
48
+ * @enum
49
+ */
50
+ export const MIE_PARTICLES_STANDARD = {
51
+ // --- 💧 Water-Based (Haze, Fog, Clouds) ---
52
+
53
+ /**
54
+ * Continental haze (ammonium sulfate surrogate)
55
+ * SMALL — faint land/city haze: distant skyline slightly washed out on a sunny day.
56
+ */
57
+ CONTINENTAL_HAZE_SMALL: make(0.1e-6, ri_ammonium_sulfate), // 100 nm
58
+ /** MEDIUM — typical daytime urban/valley haze with gentle desaturation. */
59
+ CONTINENTAL_HAZE_MEDIUM: make(0.5e-6, ri_ammonium_sulfate), // 500 nm
60
+ /** LARGE — thicker land haze; think post‑inversion murk softening hills. */
61
+ CONTINENTAL_HAZE_LARGE: make(1.0e-6, ri_ammonium_sulfate), // 1.0 µm
62
+
63
+ /**
64
+ * Maritime haze (sea‑salt/brine)
65
+ * SMALL — light coastal humidity haze over the ocean.
66
+ */
67
+ MARITIME_HAZE_SMALL: make(0.1e-6, ri_brine), // 100 nm
68
+ /** MEDIUM — bright, milky air on a breezy beach or around harbors. */
69
+ MARITIME_HAZE_MEDIUM: make(0.5e-6, ri_brine), // 500 nm
70
+ /** LARGE — thick marine layer look before it becomes fog. */
71
+ MARITIME_HAZE_LARGE: make(1.0e-6, ri_brine), // 1.0 µm
72
+
73
+ /** Larger droplets that create classic white fog and clouds */
74
+ /** SMALL — light mist: dawn over a lake, waterfall spray, breath fog. */
75
+ FOG_DROPLET_SMALL: make(2.0e-6, ri_water), // 2.0 µm
76
+ /** MEDIUM — typical road fog reducing visibility to a few hundred meters. */
77
+ FOG_DROPLET_MEDIUM: make(10.0e-6, ri_water), // 10.0 µm
78
+ /** LARGE — bright, thick cloud core or dense sea fog. */
79
+ CLOUD_DROPLET_LARGE: make(20.0e-6, ri_water), // 20.0 µm
80
+
81
+
82
+ // --- 🔥 Combustion (Smoke & Soot) ---
83
+
84
+ /**
85
+ * Biomass Smoke (e.g., Wood, Wildfire) — "Brown Carbon"
86
+ * SMALL — fresh wood‑smoke right above the flames.
87
+ */
88
+ SMOKE_PARTICLE_SMALL: make(0.1e-6, ri_smoke), // 100 nm
89
+ /** MEDIUM — typical wildfire/chimney smoke drifting across a valley. */
90
+ SMOKE_PARTICLE_MEDIUM: make(0.25e-6, ri_smoke), // 250 nm
91
+ /** LARGE — aged regional smoke layers that turn the sun orange. */
92
+ SMOKE_PARTICLE_LARGE: make(0.5e-6, ri_smoke), // 500 nm
93
+
94
+ /**
95
+ * Soot (e.g., Diesel Exhaust) — "Black Carbon"
96
+ * SMALL — very dark sooty exhaust: candle wick zone or fresh tailpipe soot.
97
+ */
98
+ SOOT_PARTICLE_SMALL: make(0.05e-6, ri_soot), // 50 nm (Primary particle)
99
+ /** MEDIUM — traffic/industrial pollution haze mixing into city air. */
100
+ SOOT_AGGREGATE_MEDIUM: make(0.2e-6, ri_soot), // 200 nm (Clumped)
101
+ /** LARGE — heavy dirty smoke near source: burning oil/tires. */
102
+ SOOT_AGGREGATE_LARGE: make(0.4e-6, ri_soot), // 400 nm (Clumped)
103
+
104
+
105
+ // --- 💨 Solid Particulates (Dust & Pollen) ---
106
+
107
+ /**
108
+ * Mineral Dust (e.g., Desert, Sand)
109
+ * SMALL — far‑range dusty air softening distant mountains.
110
+ */
111
+ FINE_DUST_SMALL: make(1.5e-6, ri_dust), // 1.5 µm
112
+ /** MEDIUM — moving dust clouds from vehicles or field winds. */
113
+ COARSE_DUST_MEDIUM: make(5.0e-6, ri_dust), // 5.0 µm
114
+ /** LARGE — sandstorm wall: near‑camera blowing sand/tan curtains. */
115
+ COARSE_DUST_LARGE: make(15.0e-6, ri_dust), // 15.0 µm
116
+
117
+ /**
118
+ * Pollen (Organic)
119
+ * MEDIUM — seasonal pollen haze; yellow‑green tint in spring air.
120
+ */
121
+ POLLEN_PARTICLE_MEDIUM: make(15.0e-6, ri_pollen), // 15.0 µm
122
+ /** LARGE — visible puffs from trees (e.g., pine) or catkins in forests. */
123
+ POLLEN_PARTICLE_LARGE: make(30.0e-6, ri_pollen), // 30.0 µm
124
+ }
@@ -0,0 +1,168 @@
1
+ /**
2
+ * 📚 Precomputed standard atmospheric particle library for rendering (zero runtime compute).
3
+ *
4
+ * This file is GENERATED. Do not edit by hand.
5
+ * Generation settings: 380–780 nm, step_count=74, sRGB CMFs, medium=air.
6
+ * Source: MIE_PARTICLES_STANDARD at generation time.
7
+ */
8
+ export type MIE_PARTICLES_STANDARD_PRECOMPUTED = any;
9
+ export namespace MIE_PARTICLES_STANDARD_PRECOMPUTED {
10
+ namespace CONTINENTAL_HAZE_SMALL {
11
+ let radius: number;
12
+ let cross_section_scattering: number[];
13
+ let cross_section_extinction: number[];
14
+ }
15
+ namespace CONTINENTAL_HAZE_MEDIUM {
16
+ let radius_1: number;
17
+ export { radius_1 as radius };
18
+ let cross_section_scattering_1: number[];
19
+ export { cross_section_scattering_1 as cross_section_scattering };
20
+ let cross_section_extinction_1: number[];
21
+ export { cross_section_extinction_1 as cross_section_extinction };
22
+ }
23
+ namespace CONTINENTAL_HAZE_LARGE {
24
+ let radius_2: number;
25
+ export { radius_2 as radius };
26
+ let cross_section_scattering_2: number[];
27
+ export { cross_section_scattering_2 as cross_section_scattering };
28
+ let cross_section_extinction_2: number[];
29
+ export { cross_section_extinction_2 as cross_section_extinction };
30
+ }
31
+ namespace MARITIME_HAZE_SMALL {
32
+ let radius_3: number;
33
+ export { radius_3 as radius };
34
+ let cross_section_scattering_3: number[];
35
+ export { cross_section_scattering_3 as cross_section_scattering };
36
+ let cross_section_extinction_3: number[];
37
+ export { cross_section_extinction_3 as cross_section_extinction };
38
+ }
39
+ namespace MARITIME_HAZE_MEDIUM {
40
+ let radius_4: number;
41
+ export { radius_4 as radius };
42
+ let cross_section_scattering_4: number[];
43
+ export { cross_section_scattering_4 as cross_section_scattering };
44
+ let cross_section_extinction_4: number[];
45
+ export { cross_section_extinction_4 as cross_section_extinction };
46
+ }
47
+ namespace MARITIME_HAZE_LARGE {
48
+ let radius_5: number;
49
+ export { radius_5 as radius };
50
+ let cross_section_scattering_5: number[];
51
+ export { cross_section_scattering_5 as cross_section_scattering };
52
+ let cross_section_extinction_5: number[];
53
+ export { cross_section_extinction_5 as cross_section_extinction };
54
+ }
55
+ namespace FOG_DROPLET_SMALL {
56
+ let radius_6: number;
57
+ export { radius_6 as radius };
58
+ let cross_section_scattering_6: number[];
59
+ export { cross_section_scattering_6 as cross_section_scattering };
60
+ let cross_section_extinction_6: number[];
61
+ export { cross_section_extinction_6 as cross_section_extinction };
62
+ }
63
+ namespace FOG_DROPLET_MEDIUM {
64
+ let radius_7: number;
65
+ export { radius_7 as radius };
66
+ let cross_section_scattering_7: number[];
67
+ export { cross_section_scattering_7 as cross_section_scattering };
68
+ let cross_section_extinction_7: number[];
69
+ export { cross_section_extinction_7 as cross_section_extinction };
70
+ }
71
+ namespace CLOUD_DROPLET_LARGE {
72
+ let radius_8: number;
73
+ export { radius_8 as radius };
74
+ let cross_section_scattering_8: number[];
75
+ export { cross_section_scattering_8 as cross_section_scattering };
76
+ let cross_section_extinction_8: number[];
77
+ export { cross_section_extinction_8 as cross_section_extinction };
78
+ }
79
+ namespace SMOKE_PARTICLE_SMALL {
80
+ let radius_9: number;
81
+ export { radius_9 as radius };
82
+ let cross_section_scattering_9: number[];
83
+ export { cross_section_scattering_9 as cross_section_scattering };
84
+ let cross_section_extinction_9: number[];
85
+ export { cross_section_extinction_9 as cross_section_extinction };
86
+ }
87
+ namespace SMOKE_PARTICLE_MEDIUM {
88
+ let radius_10: number;
89
+ export { radius_10 as radius };
90
+ let cross_section_scattering_10: number[];
91
+ export { cross_section_scattering_10 as cross_section_scattering };
92
+ let cross_section_extinction_10: number[];
93
+ export { cross_section_extinction_10 as cross_section_extinction };
94
+ }
95
+ namespace SMOKE_PARTICLE_LARGE {
96
+ let radius_11: number;
97
+ export { radius_11 as radius };
98
+ let cross_section_scattering_11: number[];
99
+ export { cross_section_scattering_11 as cross_section_scattering };
100
+ let cross_section_extinction_11: number[];
101
+ export { cross_section_extinction_11 as cross_section_extinction };
102
+ }
103
+ namespace SOOT_PARTICLE_SMALL {
104
+ let radius_12: number;
105
+ export { radius_12 as radius };
106
+ let cross_section_scattering_12: number[];
107
+ export { cross_section_scattering_12 as cross_section_scattering };
108
+ let cross_section_extinction_12: number[];
109
+ export { cross_section_extinction_12 as cross_section_extinction };
110
+ }
111
+ namespace SOOT_AGGREGATE_MEDIUM {
112
+ let radius_13: number;
113
+ export { radius_13 as radius };
114
+ let cross_section_scattering_13: number[];
115
+ export { cross_section_scattering_13 as cross_section_scattering };
116
+ let cross_section_extinction_13: number[];
117
+ export { cross_section_extinction_13 as cross_section_extinction };
118
+ }
119
+ namespace SOOT_AGGREGATE_LARGE {
120
+ let radius_14: number;
121
+ export { radius_14 as radius };
122
+ let cross_section_scattering_14: number[];
123
+ export { cross_section_scattering_14 as cross_section_scattering };
124
+ let cross_section_extinction_14: number[];
125
+ export { cross_section_extinction_14 as cross_section_extinction };
126
+ }
127
+ namespace FINE_DUST_SMALL {
128
+ let radius_15: number;
129
+ export { radius_15 as radius };
130
+ let cross_section_scattering_15: number[];
131
+ export { cross_section_scattering_15 as cross_section_scattering };
132
+ let cross_section_extinction_15: number[];
133
+ export { cross_section_extinction_15 as cross_section_extinction };
134
+ }
135
+ namespace COARSE_DUST_MEDIUM {
136
+ let radius_16: number;
137
+ export { radius_16 as radius };
138
+ let cross_section_scattering_16: number[];
139
+ export { cross_section_scattering_16 as cross_section_scattering };
140
+ let cross_section_extinction_16: number[];
141
+ export { cross_section_extinction_16 as cross_section_extinction };
142
+ }
143
+ namespace COARSE_DUST_LARGE {
144
+ let radius_17: number;
145
+ export { radius_17 as radius };
146
+ let cross_section_scattering_17: number[];
147
+ export { cross_section_scattering_17 as cross_section_scattering };
148
+ let cross_section_extinction_17: number[];
149
+ export { cross_section_extinction_17 as cross_section_extinction };
150
+ }
151
+ namespace POLLEN_PARTICLE_MEDIUM {
152
+ let radius_18: number;
153
+ export { radius_18 as radius };
154
+ let cross_section_scattering_18: number[];
155
+ export { cross_section_scattering_18 as cross_section_scattering };
156
+ let cross_section_extinction_18: number[];
157
+ export { cross_section_extinction_18 as cross_section_extinction };
158
+ }
159
+ namespace POLLEN_PARTICLE_LARGE {
160
+ let radius_19: number;
161
+ export { radius_19 as radius };
162
+ let cross_section_scattering_19: number[];
163
+ export { cross_section_scattering_19 as cross_section_scattering };
164
+ let cross_section_extinction_19: number[];
165
+ export { cross_section_extinction_19 as cross_section_extinction };
166
+ }
167
+ }
168
+ //# sourceMappingURL=MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.js"],"names":[],"mappings":""}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * 📚 Precomputed standard atmospheric particle library for rendering (zero runtime compute).
3
+ *
4
+ * This file is GENERATED. Do not edit by hand.
5
+ * Generation settings: 380–780 nm, step_count=74, sRGB CMFs, medium=air.
6
+ * Source: MIE_PARTICLES_STANDARD at generation time.
7
+ * @see MIE_PARTICLES_STANDARD
8
+ * @see generate_precomputed_mie_particles.mjs
9
+ * @enum
10
+ */
11
+ export const MIE_PARTICLES_STANDARD_PRECOMPUTED = {
12
+ // --- 💧 Water-Based (Haze, Fog, Clouds) ---
13
+
14
+ /**
15
+ * Continental haze (ammonium sulfate surrogate)
16
+ * SMALL — faint land/city haze: distant skyline slightly washed out on a sunny day.
17
+ */
18
+ CONTINENTAL_HAZE_SMALL: {
19
+ radius: 0.05e-6,
20
+ cross_section_scattering: [1.0372407655007736e-16, 2.1697944057740125e-16, 4.9834807086220629e-16],
21
+ cross_section_extinction: [1.0390516262084864e-16, 2.1717567402093127e-16, 4.9879160600450892e-16],
22
+ },
23
+ /** MEDIUM — typical daytime urban/valley haze with gentle desaturation. */
24
+ CONTINENTAL_HAZE_MEDIUM: {
25
+ radius: 0.25e-6,
26
+ cross_section_scattering: [5.4565604512921649e-13, 6.8622003246048663e-13, 8.2870024363643223e-13],
27
+ cross_section_extinction: [5.4570929795444263e-13, 6.8627297263235853e-13, 8.2882026711065046e-13],
28
+ },
29
+ /** LARGE — thicker land haze; think post‑inversion murk softening hills. */
30
+ CONTINENTAL_HAZE_LARGE: {
31
+ radius: 0.5e-6,
32
+ cross_section_scattering: [3.0366197068566991e-12, 2.1644339349300699e-12, 1.3934801792509724e-12],
33
+ cross_section_extinction: [3.0370663616112397e-12, 2.1649140149488240e-12, 1.3945032069537524e-12],
34
+ },
35
+
36
+ /**
37
+ * Maritime haze (sea‑salt/brine)
38
+ * SMALL — light coastal humidity haze over the ocean.
39
+ */
40
+ MARITIME_HAZE_SMALL: {
41
+ radius: 0.05e-6,
42
+ cross_section_scattering: [5.5914464254699590e-17, 1.1568131262669868e-16, 2.6209633277373954e-16],
43
+ cross_section_extinction: [5.5915758170359112e-17, 1.1568241778493796e-16, 2.6209809109662223e-16],
44
+ },
45
+ /** MEDIUM — bright, milky air on a breezy beach or around harbors. */
46
+ MARITIME_HAZE_MEDIUM: {
47
+ radius: 0.25e-6,
48
+ cross_section_scattering: [2.7132968972073048e-13, 4.0042274695424540e-13, 5.5420130011596224e-13],
49
+ cross_section_extinction: [2.7132995584828778e-13, 4.0042298657367437e-13, 5.5420166908930809e-13],
50
+ },
51
+ /** LARGE — thick marine layer look before it becomes fog. */
52
+ MARITIME_HAZE_LARGE: {
53
+ radius: 0.5e-6,
54
+ cross_section_scattering: [3.0886981238491608e-12, 3.1506290546356762e-12, 2.6753797206317263e-12],
55
+ cross_section_extinction: [3.0887005785916678e-12, 3.1506311260919391e-12, 2.6753829166661686e-12],
56
+ },
57
+
58
+ /** Larger droplets that create classic white fog and clouds */
59
+ /** SMALL — light mist: dawn over a lake, waterfall spray, breath fog. */
60
+ FOG_DROPLET_SMALL: {
61
+ radius: 1.0e-6,
62
+ cross_section_scattering: [6.6871570270074052e-12, 5.4309427410389770e-12, 7.5575449765853189e-12],
63
+ cross_section_extinction: [6.6871595378323066e-12, 5.4309431516598268e-12, 7.5575452925636131e-12],
64
+ },
65
+ /** MEDIUM — typical road fog reducing visibility to a few hundred meters. */
66
+ FOG_DROPLET_MEDIUM: {
67
+ radius: 5.0e-6,
68
+ cross_section_scattering: [1.7316926453733402e-10, 1.6605756824151961e-10, 1.6592498324988880e-10],
69
+ cross_section_extinction: [1.7316959394334112e-10, 1.6605760278267214e-10, 1.6592500282854191e-10],
70
+ },
71
+ /** LARGE — bright, thick cloud core or dense sea fog. */
72
+ CLOUD_DROPLET_LARGE: {
73
+ radius: 10.0e-6,
74
+ cross_section_scattering: [6.5197095812758498e-10, 6.5349550921083126e-10, 6.5384329788317203e-10],
75
+ cross_section_extinction: [6.5197199508475796e-10, 6.5349565822644719e-10, 6.5384339898122785e-10],
76
+ },
77
+
78
+ // --- 🔥 Combustion (Smoke & Soot) ---
79
+
80
+ /**
81
+ * Biomass Smoke (e.g., Wood, Wildfire) — "Brown Carbon"
82
+ * SMALL — fresh wood‑smoke right above the flames.
83
+ */
84
+ SMOKE_PARTICLE_SMALL: {
85
+ radius: 0.05e-6,
86
+ cross_section_scattering: [1.1385189064946861e-16, 2.4068885318662801e-16, 5.6703231058527902e-16],
87
+ cross_section_extinction: [1.2608332795772137e-16, 2.5983427495073982e-16, 6.0993192464455740e-16],
88
+ },
89
+ /** MEDIUM — typical wildfire/chimney smoke drifting across a valley. */
90
+ SMOKE_PARTICLE_MEDIUM: {
91
+ radius: 0.125e-6,
92
+ cross_section_scattering: [2.3785570711758885e-14, 4.0444762406195023e-14, 8.1882149645316101e-14],
93
+ cross_section_extinction: [2.4061852555120587e-14, 4.0934032778509765e-14, 8.3203081374883472e-14],
94
+ },
95
+ /** LARGE — aged regional smoke layers that turn the sun orange. */
96
+ SMOKE_PARTICLE_LARGE: {
97
+ radius: 0.25e-6,
98
+ cross_section_scattering: [6.0660578316854483e-13, 7.2285541567565703e-13, 8.4663317340238114e-13],
99
+ cross_section_extinction: [6.1046973791426257e-13, 7.2817186974654381e-13, 8.5854543364273271e-13],
100
+ },
101
+
102
+ /**
103
+ * Soot (e.g., Diesel Exhaust) — "Black Carbon"
104
+ * SMALL — very dark sooty exhaust: candle wick zone or fresh tailpipe soot.
105
+ */
106
+ SOOT_PARTICLE_SMALL: {
107
+ radius: 0.025e-6,
108
+ cross_section_scattering: [4.9471330718737624e-18, 1.1425655620156528e-17, 3.3950347490168058e-17],
109
+ cross_section_extinction: [4.9469990103109046e-16, 6.4148353040364531e-16, 9.4380273910433696e-16],
110
+ },
111
+ /** MEDIUM — traffic/industrial pollution haze mixing into city air. */
112
+ SOOT_AGGREGATE_MEDIUM: {
113
+ radius: 0.1e-6,
114
+ cross_section_scattering: [1.6352854546128040e-14, 2.6526194830212333e-14, 3.7046093596342311e-14],
115
+ cross_section_extinction: [5.6514530217559579e-14, 7.3826969343710883e-14, 8.8338535647949242e-14],
116
+ },
117
+ /** LARGE — heavy dirty smoke near source: burning oil/tires. */
118
+ SOOT_AGGREGATE_LARGE: {
119
+ radius: 0.2e-6,
120
+ cross_section_scattering: [1.6063642291966415e-13, 1.6542559814548711e-13, 1.6709610840580629e-13],
121
+ cross_section_extinction: [3.6165278413413643e-13, 3.6212327105835705e-13, 3.5517888510337905e-13],
122
+ },
123
+
124
+ // --- 💨 Solid Particulates (Dust & Pollen) ---
125
+
126
+ /**
127
+ * Mineral Dust (e.g., Desert, Sand)
128
+ * SMALL — far‑range dusty air softening distant mountains.
129
+ */
130
+ FINE_DUST_SMALL: {
131
+ radius: 0.75e-6,
132
+ cross_section_scattering: [2.6567716108736166e-12, 3.7000600340351709e-12, 4.5461877128947888e-12],
133
+ cross_section_extinction: [2.8817016426305008e-12, 4.1013539958892520e-12, 5.1657861830223932e-12],
134
+ },
135
+ /** MEDIUM — moving dust clouds from vehicles or field winds. */
136
+ COARSE_DUST_MEDIUM: {
137
+ radius: 2.5e-6,
138
+ cross_section_scattering: [3.5402159937399897e-11, 3.4676838822224554e-11, 3.3935776143602683e-11],
139
+ cross_section_extinction: [4.2922059842758115e-11, 4.3544295684829637e-11, 4.3786612417574868e-11],
140
+ },
141
+ /** LARGE — sandstorm wall: near‑camera blowing sand/tan curtains. */
142
+ COARSE_DUST_LARGE: {
143
+ radius: 7.5e-6,
144
+ cross_section_scattering: [3.2009871370816270e-10, 2.9679915057976214e-10, 2.7170050898778131e-10],
145
+ cross_section_extinction: [3.7268701202180954e-10, 3.7040732546910420e-10, 3.6975018275072762e-10],
146
+ },
147
+
148
+ /**
149
+ * Pollen (Organic)
150
+ * MEDIUM — seasonal pollen haze; yellow‑green tint in spring air.
151
+ */
152
+ POLLEN_PARTICLE_MEDIUM: {
153
+ radius: 7.5e-6,
154
+ cross_section_scattering: [3.6436190053386620e-10, 3.5570447403441868e-10, 3.3822498357554905e-10],
155
+ cross_section_extinction: [3.7552155775356996e-10, 3.7011487872242141e-10, 3.6844677025827028e-10],
156
+ },
157
+ /** LARGE — visible puffs from trees (e.g., pine) or catkins in forests. */
158
+ POLLEN_PARTICLE_LARGE: {
159
+ radius: 15.0e-6,
160
+ cross_section_scattering: [1.4020197769557275e-9, 1.3777156444096327e-9, 1.2798203157720485e-9],
161
+ cross_section_extinction: [1.4599679536172092e-9, 1.4588039863597781e-9, 1.4514473917124675e-9],
162
+ },
163
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Canonical Bohren–Huffman Mie solver (reference implementation)
3
+ * Computes scattering/extinction cross-sections and asymmetry parameter for a
4
+ * homogeneous sphere embedded in a host medium.
5
+ *
6
+ * @param {number} wavelength Vacuum wavelength (meters)
7
+ * @param {number} radius Sphere radius (meters)
8
+ * @param {[number,number]} n_p Particle complex RI [n, k]
9
+ * @param {[number,number]} n_med Medium complex RI [n, k]
10
+ * @returns {{sigma_a_med:number, C_ext:number, C_sca:number, g:number}}
11
+ */
12
+ export function compute_bhmie_optical_properties(wavelength: number, radius: number, n_p: [number, number], n_med: [number, number]): {
13
+ sigma_a_med: number;
14
+ C_ext: number;
15
+ C_sca: number;
16
+ g: number;
17
+ };
18
+ //# sourceMappingURL=compute_bhmie_optical_properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute_bhmie_optical_properties.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/mie/compute_bhmie_optical_properties.js"],"names":[],"mappings":"AAUA;;;;;;;;;;GAUG;AACH,6DANW,MAAM,UACN,MAAM,OACN,CAAC,MAAM,EAAC,MAAM,CAAC,SACf,CAAC,MAAM,EAAC,MAAM,CAAC;iBACA,MAAM;WAAQ,MAAM;WAAQ,MAAM;OAAI,MAAM;EAmIrE"}