@thi.ng/geom-resample
Advanced tools
Comparing version 2.3.53 to 3.0.0
@@ -14,6 +14,8 @@ import type { ReadonlyVec } from "@thi.ng/vectors"; | ||
* @example | ||
* ```ts | ||
* ```ts tangle:../export/sample-uniform.ts | ||
* import { sampleUniformX } from "@thi.ng/geom-resample"; | ||
* | ||
* sampleUniformX([[0, 0], [3, 5], [5, 2]], 0, 5) | ||
* console.log( | ||
* sampleUniformX([[0, 0], [3, 5], [5, 2]], 0, 5) | ||
* ); | ||
* // [ | ||
@@ -20,0 +22,0 @@ * // [ 0, 0 ], |
# Change Log | ||
- **Last updated**: 2024-05-08T18:24:32Z | ||
- **Last updated**: 2024-06-21T19:34:38Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -12,2 +12,12 @@ | ||
# [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-resample@3.0.0) (2024-06-21) | ||
#### 🛑 Breaking changes | ||
- migrate types from [@thi.ng/geom-api](https://github.com/thi-ng/umbrella/tree/main/packages/geom-api) ([2a61784](https://github.com/thi-ng/umbrella/commit/2a61784)) | ||
- BREAKING CHANGE: migrate/internalize types from [@thi.ng/geom-api](https://github.com/thi-ng/umbrella/tree/main/packages/geom-api) | ||
- add/migrate SamplingOpts, DEFAULT_SAMPLES, setDefaultSamples() | ||
- update imports | ||
- update deps | ||
### [2.3.50](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-resample@2.3.50) (2024-04-20) | ||
@@ -14,0 +24,0 @@ |
@@ -0,1 +1,2 @@ | ||
export * from "./api.js"; | ||
export * from "./axis.js"; | ||
@@ -2,0 +3,0 @@ export * from "./resample.js"; |
@@ -0,1 +1,2 @@ | ||
export * from "./api.js"; | ||
export * from "./axis.js"; | ||
@@ -2,0 +3,0 @@ export * from "./resample.js"; |
{ | ||
"name": "@thi.ng/geom-resample", | ||
"version": "2.3.53", | ||
"version": "3.0.0", | ||
"description": "Customizable nD polyline interpolation, re-sampling, splitting & nearest point computation", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
}, | ||
"homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/geom-resample#readme", | ||
"homepage": "https://thi.ng/geom-resample", | ||
"funding": [ | ||
@@ -40,15 +40,14 @@ { | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.2", | ||
"@thi.ng/checks": "^3.6.4", | ||
"@thi.ng/geom-api": "^4.0.10", | ||
"@thi.ng/geom-closest-point": "^2.1.127", | ||
"@thi.ng/geom-isec": "^3.1.0", | ||
"@thi.ng/math": "^5.10.13", | ||
"@thi.ng/vectors": "^7.10.31" | ||
"@thi.ng/api": "^8.11.3", | ||
"@thi.ng/checks": "^3.6.5", | ||
"@thi.ng/geom-closest-point": "^2.1.128", | ||
"@thi.ng/geom-isec": "^4.0.0", | ||
"@thi.ng/math": "^5.11.0", | ||
"@thi.ng/vectors": "^7.11.0" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.43.2", | ||
"esbuild": "^0.21.1", | ||
"@microsoft/api-extractor": "^7.47.0", | ||
"esbuild": "^0.21.5", | ||
"typedoc": "^0.25.13", | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.5.2" | ||
}, | ||
@@ -87,2 +86,5 @@ "keywords": [ | ||
}, | ||
"./api": { | ||
"default": "./api.js" | ||
}, | ||
"./axis": { | ||
@@ -106,3 +108,3 @@ "default": "./axis.js" | ||
}, | ||
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n" | ||
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n" | ||
} |
@@ -10,3 +10,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
> [!NOTE] | ||
> This is one of 192 standalone projects, maintained as part | ||
> This is one of 193 standalone projects, maintained as part | ||
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo | ||
@@ -70,3 +70,3 @@ > and anti-framework. | ||
Package sizes (brotli'd, pre-treeshake): ESM: 1.48 KB | ||
Package sizes (brotli'd, pre-treeshake): ESM: 1.49 KB | ||
@@ -77,3 +77,2 @@ ## Dependencies | ||
- [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/develop/packages/checks) | ||
- [@thi.ng/geom-api](https://github.com/thi-ng/umbrella/tree/develop/packages/geom-api) | ||
- [@thi.ng/geom-closest-point](https://github.com/thi-ng/umbrella/tree/develop/packages/geom-closest-point) | ||
@@ -80,0 +79,0 @@ - [@thi.ng/geom-isec](https://github.com/thi-ng/umbrella/tree/develop/packages/geom-isec) |
@@ -1,4 +0,4 @@ | ||
import { type SamplingOpts } from "@thi.ng/geom-api/sample"; | ||
import type { ReadonlyVec } from "@thi.ng/vectors"; | ||
import { type SamplingOpts } from "./api.js"; | ||
export declare const resample: (pts: ReadonlyVec[], opts?: number | Partial<SamplingOpts>, closed?: boolean, copy?: boolean) => ReadonlyVec[]; | ||
//# sourceMappingURL=resample.d.ts.map |
import { isNumber } from "@thi.ng/checks/is-number"; | ||
import { isPlainObject } from "@thi.ng/checks/is-plain-object"; | ||
import { DEFAULT_SAMPLES } from "@thi.ng/geom-api/sample"; | ||
import { copyVectors } from "@thi.ng/vectors/copy"; | ||
import { DEFAULT_SAMPLES } from "./api.js"; | ||
import { Sampler } from "./sampler.js"; | ||
@@ -6,0 +6,0 @@ const resample = (pts, opts, closed = false, copy = false) => { |
@@ -20,3 +20,3 @@ import type { Maybe } from "@thi.ng/api"; | ||
* @example | ||
* ```ts | ||
* ```ts tangle:../export/extract-range.ts | ||
* import { Sampler } from "@thi.ng/geom-resample"; | ||
@@ -27,3 +27,5 @@ * | ||
* | ||
* new Sampler(square).extractRange(0.2, 0.7); | ||
* console.log( | ||
* new Sampler(square, true).extractRange(0.2, 0.7) | ||
* ); | ||
* // [[80, 0], [100, 0], [100, 100], [20, 100]] | ||
@@ -30,0 +32,0 @@ * ``` |
@@ -118,3 +118,3 @@ import { | ||
* @example | ||
* ```ts | ||
* ```ts tangle:../export/extract-range.ts | ||
* import { Sampler } from "@thi.ng/geom-resample"; | ||
@@ -125,3 +125,5 @@ * | ||
* | ||
* new Sampler(square).extractRange(0.2, 0.7); | ||
* console.log( | ||
* new Sampler(square, true).extractRange(0.2, 0.7) | ||
* ); | ||
* // [[80, 0], [100, 0], [100, 100], [20, 100]] | ||
@@ -128,0 +130,0 @@ * ``` |
39131
6
16
476
131
+ Added@thi.ng/geom-isec@4.0.34(transitive)
- Removed@thi.ng/geom-api@^4.0.10
- Removed@thi.ng/geom-api@4.0.10(transitive)
- Removed@thi.ng/geom-isec@3.1.0(transitive)
Updated@thi.ng/api@^8.11.3
Updated@thi.ng/checks@^3.6.5
Updated@thi.ng/geom-isec@^4.0.0
Updated@thi.ng/math@^5.11.0
Updated@thi.ng/vectors@^7.11.0