@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.
- package/.eslintrc.json +28 -0
- package/LICENSE +39 -0
- package/README.md +291 -0
- package/examples/basic-usage.tsx +52 -0
- package/package.json +65 -0
- package/public/hexgrid-worker.js +1763 -0
- package/rust/Cargo.toml +41 -0
- package/rust/src/lib.rs +740 -0
- package/rust/src/math.rs +574 -0
- package/rust/src/spatial.rs +245 -0
- package/rust/src/statistics.rs +496 -0
- package/src/HexGridEnhanced.ts +16 -0
- package/src/Snapshot.ts +1402 -0
- package/src/adapters.ts +65 -0
- package/src/algorithms/AdvancedStatistics.ts +328 -0
- package/src/algorithms/BayesianStatistics.ts +317 -0
- package/src/algorithms/FlowField.ts +126 -0
- package/src/algorithms/FluidSimulation.ts +99 -0
- package/src/algorithms/GraphAlgorithms.ts +184 -0
- package/src/algorithms/OutlierDetection.ts +391 -0
- package/src/algorithms/ParticleSystem.ts +85 -0
- package/src/algorithms/index.ts +13 -0
- package/src/compat.ts +96 -0
- package/src/components/HexGrid.tsx +31 -0
- package/src/components/NarrationOverlay.tsx +221 -0
- package/src/components/index.ts +2 -0
- package/src/features.ts +125 -0
- package/src/index.ts +30 -0
- package/src/math/HexCoordinates.ts +15 -0
- package/src/math/Matrix4.ts +35 -0
- package/src/math/Quaternion.ts +37 -0
- package/src/math/SpatialIndex.ts +114 -0
- package/src/math/Vector3.ts +69 -0
- package/src/math/index.ts +11 -0
- package/src/note-adapter.ts +124 -0
- package/src/ontology-adapter.ts +77 -0
- package/src/stores/index.ts +1 -0
- package/src/stores/uiStore.ts +85 -0
- package/src/types/index.ts +3 -0
- package/src/types.ts +152 -0
- package/src/utils/image-utils.ts +25 -0
- package/src/wasm/HexGridWasmWrapper.ts +753 -0
- package/src/wasm/index.ts +7 -0
- package/src/workers/hexgrid-math.ts +177 -0
- package/src/workers/hexgrid-worker.worker.ts +1807 -0
- package/tsconfig.json +18 -0
package/rust/Cargo.toml
ADDED
|
@@ -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
|