ballistics-engine 0.25.0 → 0.25.1
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/ballistics_engine.d.ts +14 -0
- package/ballistics_engine_bg.js +18 -0
- package/ballistics_engine_bg.wasm +0 -0
- package/package.json +1 -1
package/ballistics_engine.d.ts
CHANGED
|
@@ -55,6 +55,20 @@ export class Calculator {
|
|
|
55
55
|
export class WasmBallistics {
|
|
56
56
|
free(): void;
|
|
57
57
|
[Symbol.dispose](): void;
|
|
58
|
+
/**
|
|
59
|
+
* Unload any custom drag table previously installed via [`Self::load_drag_table`],
|
|
60
|
+
* reverting every subsequent `trajectory`, `zero`, `lead`, and `monte-carlo` run to the
|
|
61
|
+
* standard G-model + BC drag (the `-b`/`--bc` value with the selected G1/G7 curve).
|
|
62
|
+
*
|
|
63
|
+
* The inverse of `loadDragTable`. It lets a single engine instance alternate between a
|
|
64
|
+
* measured-curve (CDM) solve and a plain G7-BC solve without constructing a second
|
|
65
|
+
* instance: `load → solve CDM → clear → solve G7`, with the G7 half uncontaminated —
|
|
66
|
+
* the same load/clear pattern `clearWindSegments` provides for segmented wind.
|
|
67
|
+
*
|
|
68
|
+
* Returns `true` if a table was loaded (and is now cleared), `false` if none was loaded
|
|
69
|
+
* (a harmless no-op). Idempotent.
|
|
70
|
+
*/
|
|
71
|
+
clearDragTable(): boolean;
|
|
58
72
|
/**
|
|
59
73
|
* Report whether a BC5D table is currently loaded.
|
|
60
74
|
*/
|
package/ballistics_engine_bg.js
CHANGED
|
@@ -234,6 +234,24 @@ export class WasmBallistics {
|
|
|
234
234
|
const ptr = this.__destroy_into_raw();
|
|
235
235
|
wasm.__wbg_wasmballistics_free(ptr, 0);
|
|
236
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* Unload any custom drag table previously installed via [`Self::load_drag_table`],
|
|
239
|
+
* reverting every subsequent `trajectory`, `zero`, `lead`, and `monte-carlo` run to the
|
|
240
|
+
* standard G-model + BC drag (the `-b`/`--bc` value with the selected G1/G7 curve).
|
|
241
|
+
*
|
|
242
|
+
* The inverse of `loadDragTable`. It lets a single engine instance alternate between a
|
|
243
|
+
* measured-curve (CDM) solve and a plain G7-BC solve without constructing a second
|
|
244
|
+
* instance: `load → solve CDM → clear → solve G7`, with the G7 half uncontaminated —
|
|
245
|
+
* the same load/clear pattern `clearWindSegments` provides for segmented wind.
|
|
246
|
+
*
|
|
247
|
+
* Returns `true` if a table was loaded (and is now cleared), `false` if none was loaded
|
|
248
|
+
* (a harmless no-op). Idempotent.
|
|
249
|
+
* @returns {boolean}
|
|
250
|
+
*/
|
|
251
|
+
clearDragTable() {
|
|
252
|
+
const ret = wasm.wasmballistics_clearDragTable(this.__wbg_ptr);
|
|
253
|
+
return ret !== 0;
|
|
254
|
+
}
|
|
237
255
|
/**
|
|
238
256
|
* Report whether a BC5D table is currently loaded.
|
|
239
257
|
* @returns {boolean}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Alex Jokela <email@tinycomputers.io>"
|
|
6
6
|
],
|
|
7
7
|
"description": "High-performance ballistics trajectory engine with professional physics (WASM build)",
|
|
8
|
-
"version": "0.25.
|
|
8
|
+
"version": "0.25.1",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|