fast-mesh-wasm 0.3.0 → 0.4.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.
Files changed (38) hide show
  1. package/README.md +7 -2
  2. package/dist/{client-Bp9FRd70.js → client-Bpjy-eFY.js} +1 -1
  3. package/dist/{client-m2zSdFlu.d.ts → client-D-O5-tAg.d.ts} +2 -2
  4. package/dist/{colormap-D_xH5hI5.js → colormap-DxGMYVfs.js} +1 -1
  5. package/dist/{engine-B-ZEzR1c.js → engine-D6MpGb9i.js} +155 -20
  6. package/dist/{mesh-B16gV3oX.d.ts → mesh-BUVxv3jo.d.ts} +8 -1
  7. package/dist/{mesh-B8pae8WA.js → mesh-zj7-wJBw.js} +52 -5
  8. package/dist/node.d.ts +2 -2
  9. package/dist/node.js +1 -1
  10. package/dist/{protocol-W9R-iGl5.d.ts → protocol-CK6_3aqo.d.ts} +1 -1
  11. package/dist/r3f.d.ts +3 -3
  12. package/dist/r3f.js +2 -2
  13. package/dist/react.d.ts +2 -2
  14. package/dist/{scene-BG3EEyfw.js → scene-D6m9XM3O.js} +111 -12
  15. package/dist/{scene-like-B_3qm0u6.d.ts → scene-like-DJKQP5uf.d.ts} +46 -5
  16. package/dist/{store-D3ErV6o-.js → store-Ml3TQGsR.js} +2 -2
  17. package/dist/{store-DNnHN33A.d.ts → store-QWRDXlAn.d.ts} +2 -2
  18. package/dist/store.d.ts +2 -2
  19. package/dist/store.js +1 -1
  20. package/dist/three.d.ts +7 -6
  21. package/dist/three.js +7 -2
  22. package/dist/{views-BaZqBxlX.js → views-Dh3aWc2q.js} +1 -1
  23. package/dist/wasm/fast_mesh_wasm.d.ts +61 -12
  24. package/dist/wasm/fast_mesh_wasm.js +116 -20
  25. package/dist/wasm/fast_mesh_wasm_bg.wasm +0 -0
  26. package/dist/wasm/fast_mesh_wasm_bg.wasm.d.ts +7 -1
  27. package/dist/wasm-threads/fast_mesh_wasm.d.ts +61 -12
  28. package/dist/wasm-threads/fast_mesh_wasm.js +116 -20
  29. package/dist/wasm-threads/fast_mesh_wasm_bg.wasm +0 -0
  30. package/dist/wasm-threads/fast_mesh_wasm_bg.wasm.d.ts +7 -1
  31. package/dist/web.d.ts +2 -2
  32. package/dist/web.js +1 -1
  33. package/dist/worker-engine.d.ts +16 -7
  34. package/dist/worker-engine.js +1 -1
  35. package/dist/worker-entry.js +1 -1
  36. package/dist/worker.d.ts +1 -1
  37. package/dist/worker.js +1 -1
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { a as WorkerMessage, i as Result, n as InitMessage, r as Request, t as ClientId } from "./protocol-W9R-iGl5.js";
1
+ import { a as WorkerMessage, i as Result, n as InitMessage, r as Request, t as ClientId } from "./protocol-CK6_3aqo.js";
2
2
  import { WasmScene } from "./wasm/fast_mesh_wasm.js";
3
3
  //#region src/worker/load.d.ts
4
4
  /** What the engine needs of a wasm-bindgen glue module. */
@@ -133,8 +133,8 @@ export interface EngineOptions {
133
133
  * field's client id), every step of a field add's build
134
134
  * (`"fieldBuildStep"`, with the id) and every such build abandoned for a
135
135
  * superseded display (`"fieldBuildAbandon"`), every background add started
136
- * (`"addMeshBegin"`), stepped (`"addMeshStep"`) and landed (`"addMesh"`),
137
- * with the mesh's id, every operation of a repair
136
+ * (`"addMeshBegin"`), stepped (`"addMeshStep"`), copied out
137
+ * (`"addMeshPack"`) and landed (`"addMesh"`), with the mesh's id, every operation of a repair
138
138
  * list run in steps (`"repairOp"`), every field step (`"fieldStep"`) and
139
139
  * every abandoned field step unit (`"fieldStepAbandon"`).
140
140
  */
@@ -181,10 +181,13 @@ export interface EngineOptions {
181
181
  */
182
182
  backgroundAddTriangles?: number;
183
183
  /**
184
- * The work of one step of a background add's BVH build
185
- * ({@link ADD_STEP_WORK} by default): a triangle's box, or a triangle
186
- * visited per tree level. Clamped to 1 to 2^32 − 1; NaN or less than 1
187
- * keeps the default.
184
+ * The work of one step of a background add ({@link ADD_STEP_WORK} by
185
+ * default): 64 bytes of the upload of its positions and indices into
186
+ * wasm memory; a vertex or triangle of its store build; a triangle's
187
+ * box, or a triangle visited per tree level, of its BVH build; 4
188
+ * triangles or 16 vertices of its normals; 64 bytes of the copy of its
189
+ * render buffers. Clamped to 1 to 2^32 − 1; NaN or less than 1 keeps
190
+ * the default.
188
191
  */
189
192
  addStepWork?: number;
190
193
  /**
@@ -195,6 +198,12 @@ export interface EngineOptions {
195
198
  * with yields, which costs the same, so newer batches still arrive.
196
199
  */
197
200
  threads?: number;
201
+ /**
202
+ * Test-only: never drop a landed add's copied-out buffers early (see
203
+ * {@link Engine.#unpack}), so that only the check at packing time guards
204
+ * them.
205
+ */
206
+ keepCopies?: boolean;
198
207
  }
199
208
  /** The default {@link EngineOptions.yieldMs}. */
200
209
  export declare const YIELD_MS = 4;
@@ -1 +1 @@
1
- export { t as ADD_STEP_WORK, n as BACKGROUND_ADD_TRIANGLES, r as STALE_GUARD_MS, i as STEP_POINTS, a as YIELD_MS, c as loadEngine, u as probeSharedGrowth, o as runEngine, s as serveEngine, l as startEngine } from "./engine-B-ZEzR1c.js";
1
+ export { t as ADD_STEP_WORK, n as BACKGROUND_ADD_TRIANGLES, r as STALE_GUARD_MS, i as STEP_POINTS, a as YIELD_MS, c as loadEngine, u as probeSharedGrowth, o as runEngine, s as serveEngine, l as startEngine } from "./engine-D6MpGb9i.js";
@@ -1,4 +1,4 @@
1
- import { l as startEngine, s as serveEngine } from "./engine-B-ZEzR1c.js";
1
+ import { l as startEngine, s as serveEngine } from "./engine-D6MpGb9i.js";
2
2
  //#region src/worker/entry.ts
3
3
  const scope = globalThis;
4
4
  serveEngine({
package/dist/worker.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as createWorkerScene, i as WorkerSceneOptions, n as WorkerLike, r as WorkerScene, t as KeyStatus } from "./client-m2zSdFlu.js";
1
+ import { a as createWorkerScene, i as WorkerSceneOptions, n as WorkerLike, r as WorkerScene, t as KeyStatus } from "./client-D-O5-tAg.js";
2
2
  export { type KeyStatus, type WorkerLike, WorkerScene, type WorkerSceneOptions, createWorkerScene };
package/dist/worker.js CHANGED
@@ -1 +1 @@
1
- export { t as WorkerScene, r as createWorkerScene } from "./client-Bp9FRd70.js";
1
+ export { t as WorkerScene, r as createWorkerScene } from "./client-Bpjy-eFY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-mesh-wasm",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Fast triangle mesh utilities for JavaScript, written in Rust and compiled to WebAssembly",
5
5
  "keywords": [
6
6
  "mesh",