@francisdb/vpin-wasm 0.1.0 → 0.20.7
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 +5 -3
- package/package.json +1 -1
- package/vpin_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ WASM bindings for extracting and assembling VPX (Visual Pinball X) table files.
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @francisdb/vpin-wasm
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import init, { extract, assemble } from '@
|
|
14
|
+
import init, { extract, assemble } from '@francisdb/vpin-wasm';
|
|
15
15
|
|
|
16
16
|
await init();
|
|
17
17
|
```
|
|
@@ -31,6 +31,7 @@ const files = extract(vpxBytes, (message) => {
|
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
**Parameters:**
|
|
34
|
+
|
|
34
35
|
- `data: Uint8Array` - VPX file bytes
|
|
35
36
|
- `callback?: (message: string) => void` - Optional progress callback
|
|
36
37
|
|
|
@@ -55,6 +56,7 @@ const vpxBytes = assemble(files, (message) => {
|
|
|
55
56
|
```
|
|
56
57
|
|
|
57
58
|
**Parameters:**
|
|
59
|
+
|
|
58
60
|
- `files: Record<string, Uint8Array>` - Object mapping file paths to contents
|
|
59
61
|
- `callback?: (message: string) => void` - Optional progress callback
|
|
60
62
|
|
|
@@ -77,7 +79,7 @@ Extracted files use paths starting with `/vpx/`:
|
|
|
77
79
|
## Example: Round-trip
|
|
78
80
|
|
|
79
81
|
```typescript
|
|
80
|
-
import init, { extract, assemble } from '@
|
|
82
|
+
import init, { extract, assemble } from '@francisdb/vpin-wasm';
|
|
81
83
|
|
|
82
84
|
await init();
|
|
83
85
|
|
package/package.json
CHANGED
package/vpin_bg.wasm
CHANGED
|
Binary file
|