baselode 0.1.4 → 0.1.6
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/README.md +73 -31
- package/dist/baselode.js +1838 -1544
- package/dist/baselode.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,51 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Baselode (JavaScript)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Baselode is an open-source JavaScript toolkit providing structured data models for exploration and mining applications.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Version 0.1.0 focuses on domain-aware data models and validation utilities for drillhole-style data. The goal is to provide a consistent foundation for analytics, visualization, and AI workflows.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Installation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npm install baselode
|
|
13
|
+
```
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
**Requires:** Node.js 20+, React 18+
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
---
|
|
16
18
|
|
|
17
|
-
- **Data Loading:** Efficiently import and manage your exploration and mining data.
|
|
18
|
-
- **Data Models:** Utilize predefined models to
|
|
19
|
-
- **Data Visualization:** Create insightful
|
|
19
|
+
- **Data Loading:** Efficiently import and manage your exploration and mining data (drillholes, assays, geology/lithology, block models, structural measurements).
|
|
20
|
+
- **Data Models:** Utilize predefined models to normalize and interpret your data (40+ column name variants, minimum-curvature desurveying).
|
|
21
|
+
- **Data Visualization:** Create insightful 2D strip logs (Plotly) and interactive 3D scenes (Three.js) with orbit/fly controls, assay coloring, structural disc rendering, and click-select glow.
|
|
20
22
|
- **Common Algorithms:** Access a range of algorithms designed to solve common problems in the industry.
|
|
21
23
|
|
|
22
|
-
##
|
|
24
|
+
## Example
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
```javascript
|
|
27
|
+
import { parseDrillholesCSV } from 'baselode';
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
// Example: file is a File object from an <input type="file" />
|
|
30
|
+
const file = /* your File object */;
|
|
31
|
+
file.text().then(csvText => {
|
|
32
|
+
const { holes } = parseDrillholesCSV(csvText);
|
|
33
|
+
// holes is an array of collar objects
|
|
34
|
+
console.log(holes);
|
|
35
|
+
});
|
|
36
|
+
```
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
---
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
- You must state any significant changes made to the original software.
|
|
32
|
-
- You must distribute your modified source code under the GPL-3.0 license.
|
|
40
|
+
## Included in 0.1.0
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
- Drillhole collar, survey, assay, and geology/lithology models
|
|
43
|
+
- Downhole interval structures
|
|
44
|
+
- Basic validation utilities
|
|
45
|
+
- Strip log visualisations (numeric, categorical, geology)
|
|
46
|
+
- Map visualisations
|
|
47
|
+
- 3D visualisations
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
---
|
|
37
50
|
|
|
38
|
-
|
|
51
|
+
## Design Principles
|
|
39
52
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
53
|
+
- Explicit domain models (not generic tables)
|
|
54
|
+
- Minimal dependencies
|
|
55
|
+
- Visualisation tooling as key to data analysis
|
|
56
|
+
- Designed for integration with analytics, GIS, and AI systems
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
---
|
|
45
59
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
## Roadmap
|
|
61
|
+
|
|
62
|
+
Future releases may include:
|
|
63
|
+
|
|
64
|
+
- Geospatial helpers
|
|
65
|
+
- Interoperability with common mining formats
|
|
66
|
+
- Visualization adapters
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 3D Scene Architecture
|
|
71
|
+
|
|
72
|
+
`Baselode3DScene` is a thin orchestrator; rendering is handled by domain modules:
|
|
73
|
+
|
|
74
|
+
| Module | Responsibility |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `drillholeScene.js` | Cylinder mesh building, assay coloring, camera fit |
|
|
77
|
+
| `blockModelScene.js` | Merged exterior-face block geometry, vertex colors |
|
|
78
|
+
| `structuralScene.js` | Structural disc meshes (dip/azimuth orientation) |
|
|
79
|
+
| `sceneClickHandler.js` | Canvas click/hover raycasting |
|
|
80
|
+
| `selectionGlow.js` | EffectComposer + OutlinePass per-object glow |
|
|
81
|
+
| `baselode3dCameraControls.js` | Orbit, fly, FOV, pan, dolly |
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
GNU General Public License v3.0 or later (GPL-3.0-or-later).
|
|
86
|
+
|
|
87
|
+
See the `LICENSE` file in this repository for full details.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Contributing
|
|
92
|
+
|
|
93
|
+
Contributions and issue reports are welcome via GitHub.
|