curvy 1.0.1 → 1.0.2

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 (70) hide show
  1. package/dist/curve/cubic2d.d.mts +1 -1
  2. package/dist/curve/cubic2d.d.ts +1 -1
  3. package/dist/curve/cubic2d.mjs +4 -4
  4. package/dist/curve/linear2d.d.mts +1 -1
  5. package/dist/curve/linear2d.d.ts +1 -1
  6. package/dist/curve/linear2d.mjs +3 -3
  7. package/dist/curve/quadratic2d.d.mts +1 -1
  8. package/dist/curve/quadratic2d.d.ts +1 -1
  9. package/dist/curve/quadratic2d.mjs +4 -4
  10. package/dist/interval.mjs +1 -1
  11. package/dist/matrix/matrix2x2.d.mts +1 -1
  12. package/dist/matrix/matrix2x2.d.ts +1 -1
  13. package/dist/matrix/matrix2x2.mjs +3 -3
  14. package/dist/matrix/matrix3x3.d.mts +1 -1
  15. package/dist/matrix/matrix3x3.d.ts +1 -1
  16. package/dist/matrix/matrix3x3.mjs +5 -5
  17. package/dist/matrix/matrix4x4.d.mts +1 -1
  18. package/dist/matrix/matrix4x4.d.ts +1 -1
  19. package/dist/matrix/matrix4x4.mjs +6 -6
  20. package/dist/path/cubic2d.d.mts +1 -1
  21. package/dist/path/cubic2d.d.ts +1 -1
  22. package/dist/path/cubic2d.mjs +5 -4
  23. package/dist/path/linear2d.d.mts +1 -1
  24. package/dist/path/linear2d.d.ts +1 -1
  25. package/dist/path/linear2d.mjs +3 -3
  26. package/dist/path/quadratic2d.d.mts +1 -1
  27. package/dist/path/quadratic2d.d.ts +1 -1
  28. package/dist/path/quadratic2d.mjs +4 -4
  29. package/dist/polynomial/cubic.d.mts +1 -1
  30. package/dist/polynomial/cubic.d.ts +1 -1
  31. package/dist/polynomial/cubic.mjs +3 -3
  32. package/dist/polynomial/linear.d.mts +1 -1
  33. package/dist/polynomial/linear.d.ts +1 -1
  34. package/dist/polynomial/linear.mjs +2 -2
  35. package/dist/polynomial/quadratic.d.mts +1 -1
  36. package/dist/polynomial/quadratic.d.ts +1 -1
  37. package/dist/polynomial/quadratic.mjs +3 -3
  38. package/dist/shared/{curvy.Cty3LrOR.mjs → curvy.B1zfBfvf.mjs} +6 -2
  39. package/dist/shared/{curvy.DOSsf40r.mjs → curvy.BPOevbwG.mjs} +7 -8
  40. package/dist/shared/{curvy.CT38g_II.d.mts → curvy.Bf5TIk31.d.mts} +1 -1
  41. package/dist/shared/{curvy.CT38g_II.d.ts → curvy.Bf5TIk31.d.ts} +1 -1
  42. package/dist/shared/{curvy.DM6AiKbn.mjs → curvy.BrrC9QVB.mjs} +2 -2
  43. package/dist/shared/{curvy.ChkqgKuv.mjs → curvy.DLOeble8.mjs} +9 -1
  44. package/dist/shared/curvy.DN9ptodP.mjs +55 -0
  45. package/dist/shared/{curvy.bvP77ZZm.mjs → curvy.DTco5vku.mjs} +3 -3
  46. package/dist/shared/{curvy.D7bhnwZy.mjs → curvy.DV4S13Cq.mjs} +3 -2
  47. package/dist/shared/{curvy.DB7nQmVs.mjs → curvy.O57gIOmy.mjs} +1 -1
  48. package/dist/shared/{curvy.D7MEXd5g.mjs → curvy.ZjG-q57I.mjs} +2 -2
  49. package/dist/splines/basis2d.d.mts +36 -0
  50. package/dist/splines/basis2d.d.ts +36 -0
  51. package/dist/splines/basis2d.mjs +86 -0
  52. package/dist/splines/bezier2d.d.mts +1 -1
  53. package/dist/splines/bezier2d.d.ts +1 -1
  54. package/dist/splines/bezier2d.mjs +15 -49
  55. package/dist/splines/cardinal2d.d.mts +44 -0
  56. package/dist/splines/cardinal2d.d.ts +44 -0
  57. package/dist/splines/cardinal2d.mjs +116 -0
  58. package/dist/splines/hermite2d.d.mts +31 -0
  59. package/dist/splines/hermite2d.d.ts +31 -0
  60. package/dist/splines/hermite2d.mjs +74 -0
  61. package/dist/vector/vector2.d.mts +6 -2
  62. package/dist/vector/vector2.d.ts +6 -2
  63. package/dist/vector/vector2.mjs +4 -3
  64. package/dist/vector/vector3.d.mts +6 -2
  65. package/dist/vector/vector3.d.ts +6 -2
  66. package/dist/vector/vector3.mjs +4 -3
  67. package/dist/vector/vector4.d.mts +6 -2
  68. package/dist/vector/vector4.d.ts +6 -2
  69. package/dist/vector/vector4.mjs +4 -3
  70. package/package.json +13 -1
@@ -1,5 +1,5 @@
1
- import { i as isVector2$1, m as make$1, a as magnitude$1, n as normalize$1, d as dot$1, c as cross$1, b as components$1, s as softmax$1, e as add$1, f as subtract$1, h as hadamard$1 } from '../shared/curvy.DOSsf40r.mjs';
2
- import '../shared/curvy.ChkqgKuv.mjs';
1
+ import { i as isVector2$1, m as make$1, a as magnitude$1, n as normalize$1, d as dot$1, c as cross$1, b as components$1, s as softmax$1, e as add$1, f as subtract$1, h as hadamard$1, g as scale$1 } from '../shared/curvy.BPOevbwG.mjs';
2
+ import '../shared/curvy.DLOeble8.mjs';
3
3
 
4
4
  const isVector2 = isVector2$1;
5
5
  const make = make$1;
@@ -13,5 +13,6 @@ const zero = make(0);
13
13
  const add = add$1;
14
14
  const subtract = subtract$1;
15
15
  const hadamard = hadamard$1;
16
+ const scale = scale$1;
16
17
 
17
- export { add, components, cross, dot, hadamard, isVector2, magnitude, make, normalize, softmax, subtract, zero };
18
+ export { add, components, cross, dot, hadamard, isVector2, magnitude, make, normalize, scale, softmax, subtract, zero };
@@ -1,4 +1,4 @@
1
- import { g as ThreeDimensional } from '../shared/curvy.CT38g_II.mjs';
1
+ import { g as ThreeDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
 
4
4
  declare const Vector3TypeId: unique symbol;
@@ -34,5 +34,9 @@ declare const hadamard: {
34
34
  (a: Vector3, b: Vector3): Vector3;
35
35
  (b: Vector3): (a: Vector3) => Vector3;
36
36
  };
37
+ declare const scale: {
38
+ (s: number): (v: Vector3) => Vector3;
39
+ (v: Vector3, s: number): Vector3;
40
+ };
37
41
 
38
- export { type Vector3, add, components, dot, hadamard, isVector3, magnitude, make, normalize, softmax, subtract, zero };
42
+ export { type Vector3, add, components, dot, hadamard, isVector3, magnitude, make, normalize, scale, softmax, subtract, zero };
@@ -1,4 +1,4 @@
1
- import { g as ThreeDimensional } from '../shared/curvy.CT38g_II.js';
1
+ import { g as ThreeDimensional } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
 
4
4
  declare const Vector3TypeId: unique symbol;
@@ -34,5 +34,9 @@ declare const hadamard: {
34
34
  (a: Vector3, b: Vector3): Vector3;
35
35
  (b: Vector3): (a: Vector3) => Vector3;
36
36
  };
37
+ declare const scale: {
38
+ (s: number): (v: Vector3) => Vector3;
39
+ (v: Vector3, s: number): Vector3;
40
+ };
37
41
 
38
- export { type Vector3, add, components, dot, hadamard, isVector3, magnitude, make, normalize, softmax, subtract, zero };
42
+ export { type Vector3, add, components, dot, hadamard, isVector3, magnitude, make, normalize, scale, softmax, subtract, zero };
@@ -1,5 +1,5 @@
1
- import { i as isVector3$1, m as make$1, a as magnitude$1, n as normalize$1, d as dot$1, c as components$1, s as softmax$1, b as add$1, e as subtract$1, h as hadamard$1 } from '../shared/curvy.D7bhnwZy.mjs';
2
- import '../shared/curvy.ChkqgKuv.mjs';
1
+ import { i as isVector3$1, m as make$1, a as magnitude$1, n as normalize$1, d as dot$1, c as components$1, s as softmax$1, b as add$1, e as subtract$1, h as hadamard$1, f as scale$1 } from '../shared/curvy.DV4S13Cq.mjs';
2
+ import '../shared/curvy.DLOeble8.mjs';
3
3
 
4
4
  const isVector3 = isVector3$1;
5
5
  const make = make$1;
@@ -12,5 +12,6 @@ const zero = make(0);
12
12
  const add = add$1;
13
13
  const subtract = subtract$1;
14
14
  const hadamard = hadamard$1;
15
+ const scale = scale$1;
15
16
 
16
- export { add, components, dot, hadamard, isVector3, magnitude, make, normalize, softmax, subtract, zero };
17
+ export { add, components, dot, hadamard, isVector3, magnitude, make, normalize, scale, softmax, subtract, zero };
@@ -1,4 +1,4 @@
1
- import { f as FourDimensional } from '../shared/curvy.CT38g_II.mjs';
1
+ import { f as FourDimensional } from '../shared/curvy.Bf5TIk31.mjs';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.mjs';
3
3
 
4
4
  declare const Vector4TypeId: unique symbol;
@@ -35,5 +35,9 @@ declare const hadamard: {
35
35
  (a: Vector4, b: Vector4): Vector4;
36
36
  (b: Vector4): (a: Vector4) => Vector4;
37
37
  };
38
+ declare const scale: {
39
+ (s: number): (v: Vector4) => Vector4;
40
+ (v: Vector4, s: number): Vector4;
41
+ };
38
42
 
39
- export { type Vector4, add, components, dot, hadamard, isVector4, magnitude, make, normalize, softmax, subtract, zero };
43
+ export { type Vector4, add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, zero };
@@ -1,4 +1,4 @@
1
- import { f as FourDimensional } from '../shared/curvy.CT38g_II.js';
1
+ import { f as FourDimensional } from '../shared/curvy.Bf5TIk31.js';
2
2
  import { P as Pipeable } from '../shared/curvy.BN-oFBsc.js';
3
3
 
4
4
  declare const Vector4TypeId: unique symbol;
@@ -35,5 +35,9 @@ declare const hadamard: {
35
35
  (a: Vector4, b: Vector4): Vector4;
36
36
  (b: Vector4): (a: Vector4) => Vector4;
37
37
  };
38
+ declare const scale: {
39
+ (s: number): (v: Vector4) => Vector4;
40
+ (v: Vector4, s: number): Vector4;
41
+ };
38
42
 
39
- export { type Vector4, add, components, dot, hadamard, isVector4, magnitude, make, normalize, softmax, subtract, zero };
43
+ export { type Vector4, add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, zero };
@@ -1,5 +1,5 @@
1
- import { i as isVector4$1, m as make$1, a as magnitude$1, n as normalize$1, d as dot$1, c as components$1, s as softmax$1, b as add$1, e as subtract$1, h as hadamard$1 } from '../shared/curvy.Cty3LrOR.mjs';
2
- import '../shared/curvy.ChkqgKuv.mjs';
1
+ import { i as isVector4$1, m as make$1, a as magnitude$1, n as normalize$1, d as dot$1, c as components$1, s as softmax$1, b as add$1, e as subtract$1, h as hadamard$1, f as scale$1 } from '../shared/curvy.B1zfBfvf.mjs';
2
+ import '../shared/curvy.DLOeble8.mjs';
3
3
 
4
4
  const isVector4 = isVector4$1;
5
5
  const make = make$1;
@@ -12,5 +12,6 @@ const zero = make(0);
12
12
  const add = add$1;
13
13
  const subtract = subtract$1;
14
14
  const hadamard = hadamard$1;
15
+ const scale = scale$1;
15
16
 
16
- export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, softmax, subtract, zero };
17
+ export { add, components, dot, hadamard, isVector4, magnitude, make, normalize, scale, softmax, subtract, zero };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curvy",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Spline and Curve utilities",
5
5
  "author": "Tim Morris <timthewebguy@gmail.com>",
6
6
  "homepage": "https://github.com/tkofh/curvy#readme",
@@ -75,6 +75,18 @@
75
75
  "./splines/bezier2d": {
76
76
  "types": "./dist/splines/bezier2d.d.ts",
77
77
  "import": "./dist/splines/bezier2d.mjs"
78
+ },
79
+ "./splines/hermite2d": {
80
+ "types": "./dist/splines/hermite2d.d.ts",
81
+ "import": "./dist/splines/hermite2d.mjs"
82
+ },
83
+ "./splines/cardinal2d": {
84
+ "types": "./dist/splines/cardinal2d.d.ts",
85
+ "import": "./dist/splines/cardinal2d.mjs"
86
+ },
87
+ "./splines/basis2d": {
88
+ "types": "./dist/splines/basis2d.d.ts",
89
+ "import": "./dist/splines/basis2d.mjs"
78
90
  }
79
91
  },
80
92
  "files": [