@buley/hexgrid-3d 1.0.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 (46) hide show
  1. package/.eslintrc.json +28 -0
  2. package/LICENSE +39 -0
  3. package/README.md +291 -0
  4. package/examples/basic-usage.tsx +52 -0
  5. package/package.json +65 -0
  6. package/public/hexgrid-worker.js +1763 -0
  7. package/rust/Cargo.toml +41 -0
  8. package/rust/src/lib.rs +740 -0
  9. package/rust/src/math.rs +574 -0
  10. package/rust/src/spatial.rs +245 -0
  11. package/rust/src/statistics.rs +496 -0
  12. package/src/HexGridEnhanced.ts +16 -0
  13. package/src/Snapshot.ts +1402 -0
  14. package/src/adapters.ts +65 -0
  15. package/src/algorithms/AdvancedStatistics.ts +328 -0
  16. package/src/algorithms/BayesianStatistics.ts +317 -0
  17. package/src/algorithms/FlowField.ts +126 -0
  18. package/src/algorithms/FluidSimulation.ts +99 -0
  19. package/src/algorithms/GraphAlgorithms.ts +184 -0
  20. package/src/algorithms/OutlierDetection.ts +391 -0
  21. package/src/algorithms/ParticleSystem.ts +85 -0
  22. package/src/algorithms/index.ts +13 -0
  23. package/src/compat.ts +96 -0
  24. package/src/components/HexGrid.tsx +31 -0
  25. package/src/components/NarrationOverlay.tsx +221 -0
  26. package/src/components/index.ts +2 -0
  27. package/src/features.ts +125 -0
  28. package/src/index.ts +30 -0
  29. package/src/math/HexCoordinates.ts +15 -0
  30. package/src/math/Matrix4.ts +35 -0
  31. package/src/math/Quaternion.ts +37 -0
  32. package/src/math/SpatialIndex.ts +114 -0
  33. package/src/math/Vector3.ts +69 -0
  34. package/src/math/index.ts +11 -0
  35. package/src/note-adapter.ts +124 -0
  36. package/src/ontology-adapter.ts +77 -0
  37. package/src/stores/index.ts +1 -0
  38. package/src/stores/uiStore.ts +85 -0
  39. package/src/types/index.ts +3 -0
  40. package/src/types.ts +152 -0
  41. package/src/utils/image-utils.ts +25 -0
  42. package/src/wasm/HexGridWasmWrapper.ts +753 -0
  43. package/src/wasm/index.ts +7 -0
  44. package/src/workers/hexgrid-math.ts +177 -0
  45. package/src/workers/hexgrid-worker.worker.ts +1807 -0
  46. package/tsconfig.json +18 -0
@@ -0,0 +1,41 @@
1
+ [package]
2
+ name = "hexgrid-wasm"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ authors = ["Portfolio Team"]
6
+ description = "High-performance hexgrid computations in WebAssembly"
7
+ license-file = "../LICENSE"
8
+
9
+ [lib]
10
+ crate-type = ["cdylib", "rlib"]
11
+
12
+ [features]
13
+ default = ["console_error_panic_hook"]
14
+
15
+ [dependencies]
16
+ wasm-bindgen = "0.2.87"
17
+ js-sys = "0.3.64"
18
+ # For SIMD-optimized math
19
+ packed_simd_2 = { version = "0.3", optional = true }
20
+ # Better panic messages in console
21
+ console_error_panic_hook = { version = "0.1.7", optional = true }
22
+ # Parallel iteration (falls back to sequential in wasm)
23
+ rayon = { version = "1.8", optional = true }
24
+ # Serialization for complex data structures
25
+ serde = { version = "1.0", features = ["derive"] }
26
+ serde-wasm-bindgen = "0.6"
27
+ # Random number generation
28
+ getrandom = { version = "0.2", features = ["js"] }
29
+ rand = "0.8"
30
+
31
+ [dev-dependencies]
32
+ wasm-bindgen-test = "0.3.37"
33
+
34
+ [profile.release]
35
+ # Optimize for small code size
36
+ opt-level = "s"
37
+ lto = true
38
+
39
+ [profile.dev]
40
+ # Faster compile times during development
41
+ opt-level = 0