@francisdb/vpin-wasm 0.24.0 → 0.25.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/README.md CHANGED
@@ -62,6 +62,33 @@ const vpxBytes = assemble(files, (message) => {
62
62
 
63
63
  **Returns:** `Uint8Array` - VPX file bytes
64
64
 
65
+ ### Exporting from Blender
66
+
67
+ `assemble` accepts Blender's OBJ output directly - n-gons are
68
+ fan-triangulated and `(position, uv, normal)` corners are deduplicated
69
+ on read. The natural workflow
70
+
71
+ ```
72
+ extract -> open primitive's .obj in Blender -> edit -> save over
73
+ the extracted file -> assemble
74
+ ```
75
+
76
+ just works. A few Blender export choices keep the result predictable:
77
+
78
+ 1. **One mesh per file.** VPinball stores one primitive per OBJ. Export
79
+ exactly one selected mesh.
80
+ 2. **Triangulate.** Either apply a Triangulate modifier, or tick *Triangulated
81
+ Mesh* in the OBJ exporter. The reader will fan-triangulate too, but
82
+ doing it in Blender keeps the output predictable for non-convex faces.
83
+ 3. **Include Normals and UVs.** VPinball requires `vn` and `vt` for every
84
+ face corner. In the exporter make sure *Normals* and *UV Coordinates*
85
+ are checked.
86
+ 4. **Apply transforms.** Apply Location, Rotation and Scale before export
87
+ so vertex positions are in the mesh's local frame.
88
+ 5. **Material/MTL not used.** VPinball reads materials from the table, not
89
+ from the `.mtl` file. The `mtllib` line in the OBJ is harmless and is
90
+ ignored on read.
91
+
65
92
  ## File Structure
66
93
 
67
94
  Extracted files use paths starting with `/vpx/`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@francisdb/vpin-wasm",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "WASM bindings for vpin, a rust library for the visual/virtual pinball ecosystem.",
5
5
  "homepage": "https://github.com/francisdb/vpin",
6
6
  "bugs": {
package/vpin_bg.wasm CHANGED
Binary file