@dtour/scatter 0.3.0 → 0.4.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.
@@ -12,8 +12,11 @@
12
12
  *
13
13
  * @param bases - array of p×2 column-major basis matrices
14
14
  * @param p - number of dimensions
15
+ * @param orthonormalize - passed through to interpolateBases. When false,
16
+ * geodesic distance is unreliable on non-orthonormal intermediates, so
17
+ * uniform segment lengths are used instead.
15
18
  */
16
- export declare const computeArcLengths: (bases: Float32Array[], p: number) => Float32Array;
19
+ export declare const computeArcLengths: (bases: Float32Array[], p: number, orthonormalize?: boolean) => Float32Array;
17
20
  export type ResolvedPosition = {
18
21
  segment: number;
19
22
  localT: number;
@@ -28,5 +31,5 @@ export declare const resolvePosition: (arcLengths: Float32Array, t: number) => R
28
31
  /**
29
32
  * Convenience: resolve position and compute the interpolated basis in one call.
30
33
  */
31
- export declare const interpolateAtPosition: (out: Float32Array, bases: Float32Array[], arcLengths: Float32Array, p: number, t: number) => Float32Array;
34
+ export declare const interpolateAtPosition: (out: Float32Array, bases: Float32Array[], arcLengths: Float32Array, p: number, t: number, orthonormalize?: boolean) => Float32Array;
32
35
  //# sourceMappingURL=arc-length.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"arc-length.d.ts","sourceRoot":"","sources":["../../src/tour/arc-length.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,YAAY,EAAE,EAAE,GAAG,MAAM,KAAG,YAuCpE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,YAAY,EAAE,GAAG,MAAM,KAAG,gBAsBrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,KAAK,YAAY,EACjB,OAAO,YAAY,EAAE,EACrB,YAAY,YAAY,EACxB,GAAG,MAAM,EACT,GAAG,MAAM,KACR,YAQF,CAAC"}
1
+ {"version":3,"file":"arc-length.d.ts","sourceRoot":"","sources":["../../src/tour/arc-length.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,YAAY,EAAE,EACrB,GAAG,MAAM,EACT,wBAAqB,KACpB,YAgDF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,YAAY,EAAE,GAAG,MAAM,KAAG,gBAsBrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,KAAK,YAAY,EACjB,OAAO,YAAY,EAAE,EACrB,YAAY,YAAY,EACxB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,wBAAqB,KACpB,YAiBF,CAAC"}
@@ -17,8 +17,13 @@
17
17
  * @param P3 - next basis (neighbor after end)
18
18
  * @param p - number of dimensions
19
19
  * @param t - interpolation parameter [0, 1]
20
+ * @param orthonormalize - when true (default), apply Gram-Schmidt after
21
+ * blending. Set to false for parameter tours where bases are selectors
22
+ * into a stacked embedding — skipping GS yields direct Catmull-Rom
23
+ * interpolation of the 2D coordinates, avoiding the "breathing" artifact
24
+ * caused by GS renormalization inflating the projection mid-transition.
20
25
  */
21
- export declare const interpolateBases: (out: Float32Array, P0: Float32Array, P1: Float32Array, P2: Float32Array, P3: Float32Array, p: number, t: number) => Float32Array;
26
+ export declare const interpolateBases: (out: Float32Array, P0: Float32Array, P1: Float32Array, P2: Float32Array, P3: Float32Array, p: number, t: number, orthonormalize?: boolean) => Float32Array;
22
27
  /**
23
28
  * Geodesic distance between two p×2 basis matrices.
24
29
  * Distance = sqrt(tau_0^2 + tau_1^2) where tau_i are principal angles.
@@ -1 +1 @@
1
- {"version":3,"file":"geodesic.d.ts","sourceRoot":"","sources":["../../src/tour/geodesic.ts"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,KAAK,YAAY,EACjB,IAAI,YAAY,EAChB,IAAI,YAAY,EAChB,IAAI,YAAY,EAChB,IAAI,YAAY,EAChB,GAAG,MAAM,EACT,GAAG,MAAM,KACR,YAkBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,YAAY,EAAE,IAAI,YAAY,EAAE,GAAG,MAAM,KAAG,MAkBhF,CAAC"}
1
+ {"version":3,"file":"geodesic.d.ts","sourceRoot":"","sources":["../../src/tour/geodesic.ts"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,KAAK,YAAY,EACjB,IAAI,YAAY,EAChB,IAAI,YAAY,EAChB,IAAI,YAAY,EAChB,IAAI,YAAY,EAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,wBAAqB,KACpB,YAmBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,YAAY,EAAE,IAAI,YAAY,EAAE,GAAG,MAAM,KAAG,MAkBhF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/webgl/client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAiB,MAAM,kBAAkB,CAAC;AAWvF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,cAAc,KAAG,eA2V5D,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/webgl/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAiB,MAAM,kBAAkB,CAAC;AAYvF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,cAAc,KAAG,eA6W5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtour/scatter",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "main": "./dist/scatter.js",
6
6
  "module": "./dist/scatter.js",