@weasel-js/geom 1.13.0 → 1.14.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 (50) hide show
  1. package/README.md +6 -2
  2. package/dist/3d/index.d.ts +8 -1
  3. package/dist/3d/index.js +25 -1
  4. package/dist/3d/index.js.map +1 -1
  5. package/dist/booleans/index.d.ts +6 -5
  6. package/dist/booleans/index.js +583 -73
  7. package/dist/booleans/index.js.map +1 -1
  8. package/dist/{chunk-CE7IY7TB.js → chunk-2N6OWA7E.js} +3 -3
  9. package/dist/{chunk-CE7IY7TB.js.map → chunk-2N6OWA7E.js.map} +1 -1
  10. package/dist/{chunk-Q66NA2FU.js → chunk-3HQJGI63.js} +8 -5
  11. package/dist/chunk-3HQJGI63.js.map +1 -0
  12. package/dist/{chunk-YPWFGFQX.js → chunk-3YH5XU3H.js} +125 -8
  13. package/dist/chunk-3YH5XU3H.js.map +1 -0
  14. package/dist/{chunk-UI3FUWXM.js → chunk-42TZDN5C.js} +4 -4
  15. package/dist/{chunk-UI3FUWXM.js.map → chunk-42TZDN5C.js.map} +1 -1
  16. package/dist/{chunk-B53BERKG.js → chunk-B3D6KWW3.js} +110 -8
  17. package/dist/chunk-B3D6KWW3.js.map +1 -0
  18. package/dist/{chunk-2PKPKU4P.js → chunk-EURWZUNY.js} +25 -22
  19. package/dist/chunk-EURWZUNY.js.map +1 -0
  20. package/dist/{chunk-VHXOCDZ2.js → chunk-FROQPADA.js} +6 -6
  21. package/dist/{chunk-VHXOCDZ2.js.map → chunk-FROQPADA.js.map} +1 -1
  22. package/dist/{chunk-UGE57OTX.js → chunk-GWSJQSQE.js} +11 -8
  23. package/dist/chunk-GWSJQSQE.js.map +1 -0
  24. package/dist/chunk-XXNK4N7Z.js +683 -0
  25. package/dist/chunk-XXNK4N7Z.js.map +1 -0
  26. package/dist/chunk-ZOMUTU7J.js +249 -0
  27. package/dist/chunk-ZOMUTU7J.js.map +1 -0
  28. package/dist/{curvature-PkoLduGc.d.ts → curvature-CDOI32hv.d.ts} +46 -3
  29. package/dist/curves/index.d.ts +2 -2
  30. package/dist/curves/index.js +4 -4
  31. package/dist/index.d.ts +172 -45
  32. package/dist/index.js +244 -178
  33. package/dist/index.js.map +1 -1
  34. package/dist/nd/index.d.ts +28 -1
  35. package/dist/nd/index.js +27 -675
  36. package/dist/nd/index.js.map +1 -1
  37. package/dist/{path-BW8d_2RY.d.ts → path-t80OoJnM.d.ts} +11 -0
  38. package/dist/tessellate/index.d.ts +11 -4
  39. package/dist/tessellate/index.js +4 -4
  40. package/dist/warp/index.d.ts +1 -1
  41. package/dist/warp/index.js +238 -64
  42. package/dist/warp/index.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-2PKPKU4P.js.map +0 -1
  45. package/dist/chunk-B53BERKG.js.map +0 -1
  46. package/dist/chunk-Q66NA2FU.js.map +0 -1
  47. package/dist/chunk-STGSBIOL.js +0 -152
  48. package/dist/chunk-STGSBIOL.js.map +0 -1
  49. package/dist/chunk-UGE57OTX.js.map +0 -1
  50. package/dist/chunk-YPWFGFQX.js.map +0 -1
@@ -131,4 +131,31 @@ interface Bvh<K> {
131
131
  * given. Entries with an invalid box are skipped. */
132
132
  declare function createBvh<K>(dim: number, entries?: Iterable<readonly [K, BoxN]>): Bvh<K>;
133
133
 
134
- export { type BoxN, type Bvh, type Flat, type HalfSpace, type ProbeRole, type SnapCandidate, type SnapProbe, type SnapProblem, type SnapResolution, type SnapTier, type Vec, closestBetweenFlats, closestOnFlat, createBvh, flatDim, intersectFlats, resolveSnap, stepLine };
134
+ /**
135
+ * A value built from a source only once the source has held still. Each read
136
+ * passes the source's key, a tuple of whatever its value is a function of
137
+ * (versions, generations, the identity of an input). A read at a key that
138
+ * differs from the last one records it and answers null, so the caller works
139
+ * without the value; the `reads`-th read in a row at one key builds it, and
140
+ * later reads at that key return the same value. A source whose key changes
141
+ * before every read never pays for a build.
142
+ *
143
+ * Keys match element by element under `Object.is`.
144
+ */
145
+ interface SettledCache<T> {
146
+ /** The value for `key`, built by `build` on the read that settles it; null before that. */
147
+ read(key: readonly unknown[], build: () => T): T | null;
148
+ /** Forget the recorded key and any value, as if never read. */
149
+ clear(): void;
150
+ }
151
+ /** Options for {@link createSettledCache}. */
152
+ interface SettledCacheOptions {
153
+ /** Which read in a row at one key builds the value. Default 2: a source must
154
+ * be read once unchanged before it is worth building over. 1 builds on the
155
+ * first read, which makes the cache a plain memo keyed the same way. */
156
+ reads?: number;
157
+ }
158
+ /** A {@link SettledCache} that builds on the `reads`-th read in a row at one key. */
159
+ declare function createSettledCache<T>({ reads }?: SettledCacheOptions): SettledCache<T>;
160
+
161
+ export { type BoxN, type Bvh, type Flat, type HalfSpace, type ProbeRole, type SettledCache, type SettledCacheOptions, type SnapCandidate, type SnapProbe, type SnapProblem, type SnapResolution, type SnapTier, type Vec, closestBetweenFlats, closestOnFlat, createBvh, createSettledCache, flatDim, intersectFlats, resolveSnap, stepLine };