fast-mesh-wasm 0.2.0 → 0.3.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.
Files changed (50) hide show
  1. package/README.md +490 -1
  2. package/dist/{api-D0o2HjaU.js → api-BUy7FRx7.js} +11 -11
  3. package/dist/client-Bp9FRd70.js +2278 -0
  4. package/dist/client-m2zSdFlu.d.ts +305 -0
  5. package/dist/colormap-D_xH5hI5.js +303 -0
  6. package/dist/core-Cke_kZ2e.js +113 -0
  7. package/dist/core-D2X9GPfK.d.ts +15 -0
  8. package/dist/engine-BpnthBYQ.js +1927 -0
  9. package/dist/mesh-B16gV3oX.d.ts +130 -0
  10. package/dist/mesh-B8pae8WA.js +428 -0
  11. package/dist/node.d.ts +3 -2
  12. package/dist/node.js +5 -4
  13. package/dist/protocol-CAUYm1gd.js +68 -0
  14. package/dist/protocol-W9R-iGl5.d.ts +293 -0
  15. package/dist/r3f.d.ts +59 -0
  16. package/dist/r3f.js +165 -0
  17. package/dist/react-CTADh3NN.js +124 -0
  18. package/dist/react.d.ts +65 -0
  19. package/dist/react.js +1 -0
  20. package/dist/scene-BFd6nYRe.js +1256 -0
  21. package/dist/scene-like-B_3qm0u6.d.ts +925 -0
  22. package/dist/snapshot-Cf6NgDl7.js +104 -0
  23. package/dist/store-D3ErV6o-.js +1379 -0
  24. package/dist/store-DNnHN33A.d.ts +285 -0
  25. package/dist/store.d.ts +61 -0
  26. package/dist/store.js +105 -0
  27. package/dist/three.d.ts +118 -0
  28. package/dist/three.js +390 -0
  29. package/dist/views-BaZqBxlX.js +189 -0
  30. package/dist/wasm/fast_mesh_wasm.d.ts +475 -0
  31. package/dist/wasm/fast_mesh_wasm.js +1184 -0
  32. package/dist/wasm/fast_mesh_wasm_bg.wasm +0 -0
  33. package/dist/wasm/fast_mesh_wasm_bg.wasm.d.ts +76 -0
  34. package/dist/wasm-threads/fast_mesh_wasm.d.ts +557 -0
  35. package/dist/wasm-threads/fast_mesh_wasm.js +1547 -0
  36. package/dist/wasm-threads/fast_mesh_wasm_bg.wasm +0 -0
  37. package/dist/wasm-threads/fast_mesh_wasm_bg.wasm.d.ts +95 -0
  38. package/dist/wasm-threads/package.json +7 -0
  39. package/dist/wasm-threads/snippets/fast-mesh-wasm-ae14781a92c2789e/inline0.js +16 -0
  40. package/dist/wasm-threads/snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js +107 -0
  41. package/dist/web.d.ts +3 -2
  42. package/dist/web.js +4 -2
  43. package/dist/worker-engine.d.ts +255 -0
  44. package/dist/worker-engine.js +1 -0
  45. package/dist/worker-entry.d.ts +1 -0
  46. package/dist/worker-entry.js +11 -0
  47. package/dist/worker.d.ts +2 -0
  48. package/dist/worker.js +1 -0
  49. package/package.json +53 -4
  50. package/dist/api-HcskOwd7.d.ts +0 -43
@@ -1,43 +0,0 @@
1
- import { InitInput } from "./wasm/fast_mesh_wasm.js";
2
- //#region src/api.d.ts
3
- /** A 3D vector `[x, y, z]`. */
4
- type Vec3 = [x: number, y: number, z: number];
5
- /**
6
- * Flat vertex positions `[x0, y0, z0, x1, y1, z1, ...]`.
7
- * A `Float32Array` is used as is; any other array is converted once.
8
- */
9
- type Positions = Float32Array | ArrayLike<number>;
10
- /**
11
- * Flat triangle indices `[a0, b0, c0, a1, ...]`.
12
- * A `Uint32Array` is used as is; `Uint16Array` (common in three.js) and plain arrays are converted once.
13
- */
14
- type Indices = Uint32Array | Uint16Array | ArrayLike<number>;
15
- /** Axis-aligned bounding box. */
16
- interface Bounds {
17
- /** Smallest coordinate on each axis. */
18
- min: Vec3;
19
- /** Largest coordinate on each axis. */
20
- max: Vec3;
21
- /** Box center. */
22
- center: Vec3;
23
- /** Box extent: `[width, height, depth]`. */
24
- size: Vec3;
25
- }
26
- /**
27
- * Computes smooth, area-weighted per-vertex normals.
28
- *
29
- * @param positions - Vertex positions. Length must be a multiple of 3.
30
- * @param indices - Triangle indices. Length must be a multiple of 3.
31
- * @returns Normals with the same length as `positions`. Vertices not used by any triangle get `[0, 0, 0]`.
32
- * @throws If a length is not a multiple of 3 or an index is out of range.
33
- */
34
- declare function computeVertexNormals(positions: Positions, indices: Indices): Float32Array;
35
- /**
36
- * Computes the axis-aligned bounding box of a mesh.
37
- *
38
- * @param positions - Vertex positions. Length must be a non-zero multiple of 3.
39
- * @throws If `positions` is empty or its length is not a multiple of 3.
40
- */
41
- declare function computeBounds(positions: Positions): Bounds;
42
- //#endregion
43
- export { Vec3 as a, Positions as i, Indices as n, computeBounds as o, InitInput as r, computeVertexNormals as s, Bounds as t };