curvy 1.0.5 → 1.0.7
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.
- package/dist/curve/cubic2d.mjs +1 -1
- package/dist/curve/linear2d.mjs +1 -1
- package/dist/curve/quadratic2d.mjs +1 -1
- package/dist/matrix/matrix2x2.mjs +2 -2
- package/dist/matrix/matrix3x3.mjs +4 -4
- package/dist/matrix/matrix4x4.mjs +4 -4
- package/dist/path/cubic2d.mjs +1 -1
- package/dist/path/linear2d.mjs +1 -1
- package/dist/path/quadratic2d.mjs +1 -1
- package/dist/shared/{curvy.48SmIWxE.mjs → curvy.BZ_mTkJe.mjs} +2 -1
- package/dist/shared/{curvy.Wcdc9gLh.mjs → curvy.Ck0of1PI.mjs} +7 -2
- package/dist/shared/{curvy.Ct6KbNL5.mjs → curvy.Cps2R_RU.mjs} +1 -1
- package/dist/shared/{curvy.CREzSbNe.mjs → curvy.NLeFCr-9.mjs} +2 -2
- package/dist/splines/basis2d.mjs +4 -4
- package/dist/splines/bezier2d.mjs +4 -4
- package/dist/splines/cardinal2d.mjs +4 -4
- package/dist/splines/hermite2d.mjs +4 -4
- package/dist/vector/vector2.d.mts +2 -1
- package/dist/vector/vector2.d.ts +2 -1
- package/dist/vector/vector2.mjs +3 -2
- package/dist/vector/vector3.d.mts +2 -1
- package/dist/vector/vector3.d.ts +2 -1
- package/dist/vector/vector3.mjs +3 -2
- package/package.json +1 -1
package/dist/curve/cubic2d.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { solve as solve$4 } from './linear2d.mjs';
|
|
|
9
9
|
import { length as length$2, fromPolynomials as fromPolynomials$2, solve as solve$3, derivative as derivative$1 } from './quadratic2d.mjs';
|
|
10
10
|
import '../shared/curvy.BzVmUIKm.mjs';
|
|
11
11
|
import '../shared/curvy.BDhiZ7He.mjs';
|
|
12
|
-
import '../shared/curvy.
|
|
12
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
13
13
|
import '../polynomial/linear.mjs';
|
|
14
14
|
|
|
15
15
|
const CubicCurve2dTypeId = Symbol("curvy/curve/cubic2d");
|
package/dist/curve/linear2d.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { round } from '../utils.mjs';
|
|
|
4
4
|
import { make as make$1 } from '../vector/vector2.mjs';
|
|
5
5
|
import '../shared/curvy.BDhiZ7He.mjs';
|
|
6
6
|
import '../interval.mjs';
|
|
7
|
-
import '../shared/curvy.
|
|
7
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
8
8
|
|
|
9
9
|
const LinearCurve2dTypeId = Symbol("curvy/curve/linear2d");
|
|
10
10
|
class LinearCurve2dImpl extends Pipeable {
|
|
@@ -8,7 +8,7 @@ import { make as make$1, magnitude, cross } from '../vector/vector2.mjs';
|
|
|
8
8
|
import { fromPolynomials as fromPolynomials$2, length as length$2, solve as solve$3, derivative as derivative$3 } from './linear2d.mjs';
|
|
9
9
|
import '../shared/curvy.BDhiZ7He.mjs';
|
|
10
10
|
import '../shared/curvy.BzVmUIKm.mjs';
|
|
11
|
-
import '../shared/curvy.
|
|
11
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
12
12
|
|
|
13
13
|
const QuadraticCurve2dTypeId = Symbol(
|
|
14
14
|
"curvy/curve/quadratic2d"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as isMatrix2x2$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, v as vectorProductLeft$1, c as vectorProductRight$1, e as solveSystem$1, t as toRows$1, g as toColumns$1, r as rowVector$1, h as columnVector$1, j as transpose$1, k as reverseRows$1, l as reverseColumns$1 } from '../shared/curvy.
|
|
1
|
+
import { i as isMatrix2x2$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, v as vectorProductLeft$1, c as vectorProductRight$1, e as solveSystem$1, t as toRows$1, g as toColumns$1, r as rowVector$1, h as columnVector$1, j as transpose$1, k as reverseRows$1, l as reverseColumns$1 } from '../shared/curvy.Cps2R_RU.mjs';
|
|
2
2
|
import '../utils.mjs';
|
|
3
3
|
import '../pipe.mjs';
|
|
4
|
-
import '../shared/curvy.
|
|
4
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
5
5
|
|
|
6
6
|
const isMatrix2x2 = isMatrix2x2$1;
|
|
7
7
|
const matrix2x2 = make;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as isMatrix3x3$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, c as minor$1, v as vectorProductLeft$1, e as vectorProductRight$1, g as solveSystem$1, t as toRows$1, h as toColumns$1, r as rowVector$1, j as columnVector$1, k as transpose$1, l as reverseRows$1, n as reverseColumns$1 } from '../shared/curvy.
|
|
2
|
-
import '../shared/curvy.
|
|
1
|
+
import { i as isMatrix3x3$1, m as make, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, c as minor$1, v as vectorProductLeft$1, e as vectorProductRight$1, g as solveSystem$1, t as toRows$1, h as toColumns$1, r as rowVector$1, j as columnVector$1, k as transpose$1, l as reverseRows$1, n as reverseColumns$1 } from '../shared/curvy.NLeFCr-9.mjs';
|
|
2
|
+
import '../shared/curvy.Cps2R_RU.mjs';
|
|
3
3
|
import '../utils.mjs';
|
|
4
4
|
import '../pipe.mjs';
|
|
5
|
-
import '../shared/curvy.
|
|
6
|
-
import '../shared/curvy.
|
|
5
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
6
|
+
import '../shared/curvy.Ck0of1PI.mjs';
|
|
7
7
|
|
|
8
8
|
const isMatrix3x3 = isMatrix3x3$1;
|
|
9
9
|
const matrix3x3 = make;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as toFourDimensionalIndex } from '../shared/curvy.
|
|
1
|
+
import { n as toFourDimensionalIndex } from '../shared/curvy.Cps2R_RU.mjs';
|
|
2
2
|
import { dual, Pipeable } from '../pipe.mjs';
|
|
3
3
|
import { round, invariant } from '../utils.mjs';
|
|
4
4
|
import { c as components, m as make$3, d as dot } from '../shared/curvy.C2XGH0R0.mjs';
|
|
5
|
-
import { d as determinant$2, m as make$2 } from '../shared/curvy.
|
|
6
|
-
import '../shared/curvy.
|
|
7
|
-
import '../shared/curvy.
|
|
5
|
+
import { d as determinant$2, m as make$2 } from '../shared/curvy.NLeFCr-9.mjs';
|
|
6
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
7
|
+
import '../shared/curvy.Ck0of1PI.mjs';
|
|
8
8
|
|
|
9
9
|
const Matrix4x4TypeId = Symbol.for("curvy/matrix4x4");
|
|
10
10
|
class Matrix4x4Impl extends Pipeable {
|
package/dist/path/cubic2d.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import '../shared/curvy.BzVmUIKm.mjs';
|
|
|
8
8
|
import '../shared/curvy.BDhiZ7He.mjs';
|
|
9
9
|
import '../polynomial/quadratic.mjs';
|
|
10
10
|
import '../vector/vector2.mjs';
|
|
11
|
-
import '../shared/curvy.
|
|
11
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
12
12
|
import '../curve/linear2d.mjs';
|
|
13
13
|
import '../polynomial/linear.mjs';
|
|
14
14
|
import '../curve/quadratic2d.mjs';
|
package/dist/path/linear2d.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { round } from '../utils.mjs';
|
|
|
5
5
|
import '../polynomial/linear.mjs';
|
|
6
6
|
import '../shared/curvy.BDhiZ7He.mjs';
|
|
7
7
|
import '../vector/vector2.mjs';
|
|
8
|
-
import '../shared/curvy.
|
|
8
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
9
9
|
|
|
10
10
|
const LinearPath2dTypeId = Symbol("curvy/path/linear2d");
|
|
11
11
|
class LinearPath2dImpl extends Pipeable {
|
|
@@ -8,7 +8,7 @@ import '../shared/curvy.BDhiZ7He.mjs';
|
|
|
8
8
|
import '../polynomial/quadratic.mjs';
|
|
9
9
|
import '../shared/curvy.BzVmUIKm.mjs';
|
|
10
10
|
import '../vector/vector2.mjs';
|
|
11
|
-
import '../shared/curvy.
|
|
11
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
12
12
|
import '../curve/linear2d.mjs';
|
|
13
13
|
|
|
14
14
|
const QuadraticPath2dTypeId = Symbol(
|
|
@@ -26,6 +26,7 @@ class Vector2Impl extends Pipeable {
|
|
|
26
26
|
}
|
|
27
27
|
const isVector2 = (v) => typeof v === "object" && v !== null && Vector2TypeId in v;
|
|
28
28
|
const make = (v0, v1 = v0) => new Vector2Impl(v0, v1);
|
|
29
|
+
const fromPolar = (r, theta) => make(r * Math.cos(theta), r * Math.sin(theta));
|
|
29
30
|
const components = (v) => [v.x, v.y];
|
|
30
31
|
const magnitude = (vector) => round(Math.hypot(vector.x, vector.y));
|
|
31
32
|
const normalize = (vector) => {
|
|
@@ -56,4 +57,4 @@ const setTheta = dual(2, (v, theta) => {
|
|
|
56
57
|
return make(r * Math.cos(theta), r * Math.sin(theta));
|
|
57
58
|
});
|
|
58
59
|
|
|
59
|
-
export { magnitude as a, components as b, cross as c, dot as d, add as e,
|
|
60
|
+
export { magnitude as a, components as b, cross as c, dot as d, add as e, fromPolar as f, subtract as g, hadamard as h, isVector2 as i, scale as j, getX as k, setX as l, make as m, normalize as n, getY as o, setY as p, setR as q, getTheta as r, softmax as s, setTheta as t };
|
|
@@ -30,6 +30,12 @@ class Vector3Impl extends Pipeable {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
const isVector3 = (v) => typeof v === "object" && v !== null && Vector3TypeId in v;
|
|
33
|
+
const make = (v0, v1 = v0, v2 = v1) => new Vector3Impl(v0, v1, v2);
|
|
34
|
+
const fromSpherical = (r, theta, phi) => make(
|
|
35
|
+
r * Math.sin(phi) * Math.cos(theta),
|
|
36
|
+
r * Math.sin(phi) * Math.sin(theta),
|
|
37
|
+
r * Math.cos(phi)
|
|
38
|
+
);
|
|
33
39
|
const magnitude = (vector) => round(Math.hypot(vector.x, vector.y, vector.z));
|
|
34
40
|
const normalize = (vector) => {
|
|
35
41
|
const m = magnitude(vector);
|
|
@@ -45,7 +51,6 @@ const softmax = (v) => {
|
|
|
45
51
|
const sum = v0 + v1 + v2;
|
|
46
52
|
return make(v0 / sum, v1 / sum, v2 / sum);
|
|
47
53
|
};
|
|
48
|
-
const make = (v0, v1 = v0, v2 = v1) => new Vector3Impl(v0, v1, v2);
|
|
49
54
|
const add = dual(2, (a, b) => make(a.x + b.x, a.y + b.y, a.z + b.z));
|
|
50
55
|
const subtract = dual(2, (a, b) => make(a.x - b.x, a.y - b.y, a.z - b.z));
|
|
51
56
|
const hadamard = dual(2, (a, b) => make(a.x * b.x, a.y * b.y, a.z * b.z));
|
|
@@ -73,4 +78,4 @@ const setTheta = dual(2, (v, theta) => {
|
|
|
73
78
|
return make(m * Math.cos(theta), m * Math.sin(theta), v.z);
|
|
74
79
|
});
|
|
75
80
|
|
|
76
|
-
export { magnitude as a, add as b, components as c, dot as d, subtract as e,
|
|
81
|
+
export { magnitude as a, add as b, components as c, dot as d, subtract as e, fromSpherical as f, scale as g, hadamard as h, isVector3 as i, getX as j, setX as k, getY as l, make as m, normalize as n, setY as o, getZ as p, setZ as q, setR as r, softmax as s, getTheta as t, setTheta as u, getPhi as v, setPhi as w };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { invariant, round } from '../utils.mjs';
|
|
2
2
|
import { dual, Pipeable } from '../pipe.mjs';
|
|
3
|
-
import { m as make$1, d as dot } from './curvy.
|
|
3
|
+
import { m as make$1, d as dot } from './curvy.BZ_mTkJe.mjs';
|
|
4
4
|
|
|
5
5
|
function toIndex(input) {
|
|
6
6
|
if (typeof input === "number") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as toThreeDimensionalIndex, d as determinant$1, m as make$1 } from './curvy.
|
|
1
|
+
import { o as toThreeDimensionalIndex, d as determinant$1, m as make$1 } from './curvy.Cps2R_RU.mjs';
|
|
2
2
|
import { dual, Pipeable } from '../pipe.mjs';
|
|
3
3
|
import { round, invariant } from '../utils.mjs';
|
|
4
|
-
import { c as components, m as make$2, d as dot } from './curvy.
|
|
4
|
+
import { c as components, m as make$2, d as dot } from './curvy.Ck0of1PI.mjs';
|
|
5
5
|
|
|
6
6
|
const Matrix3x3TypeId = Symbol.for("curvy/matrix3x3");
|
|
7
7
|
class Matrix3x3Impl extends Pipeable {
|
package/dist/splines/basis2d.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { fromCurves } from '../path/cubic2d.mjs';
|
|
|
3
3
|
import { dual, Pipeable } from '../pipe.mjs';
|
|
4
4
|
import { roundDown, invariant } from '../utils.mjs';
|
|
5
5
|
import { t as toCurves, f as fromSpline } from '../shared/curvy.CE4X6_Is.mjs';
|
|
6
|
-
import '../shared/curvy.
|
|
7
|
-
import '../shared/curvy.
|
|
6
|
+
import '../shared/curvy.Cps2R_RU.mjs';
|
|
7
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
8
8
|
import '../shared/curvy.C2XGH0R0.mjs';
|
|
9
|
-
import '../shared/curvy.
|
|
10
|
-
import '../shared/curvy.
|
|
9
|
+
import '../shared/curvy.NLeFCr-9.mjs';
|
|
10
|
+
import '../shared/curvy.Ck0of1PI.mjs';
|
|
11
11
|
import '../curve/cubic2d.mjs';
|
|
12
12
|
import '../interval.mjs';
|
|
13
13
|
import '../shared/curvy.DmVFTi0N.mjs';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { b as append, h as appendAccelerationAligned, e as appendCurvatureMirrored, d as appendTangentAligned, g as appendVelocityAligned, c as characteristic, a as fromArray, f as fromSpline, i as isCubicBezier2d, m as make, j as toPath } from '../shared/curvy.CE4X6_Is.mjs';
|
|
2
2
|
import '../matrix/matrix4x4.mjs';
|
|
3
|
-
import '../shared/curvy.
|
|
3
|
+
import '../shared/curvy.Cps2R_RU.mjs';
|
|
4
4
|
import '../utils.mjs';
|
|
5
5
|
import '../pipe.mjs';
|
|
6
|
-
import '../shared/curvy.
|
|
6
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
7
7
|
import '../shared/curvy.C2XGH0R0.mjs';
|
|
8
|
-
import '../shared/curvy.
|
|
9
|
-
import '../shared/curvy.
|
|
8
|
+
import '../shared/curvy.NLeFCr-9.mjs';
|
|
9
|
+
import '../shared/curvy.Ck0of1PI.mjs';
|
|
10
10
|
import '../path/cubic2d.mjs';
|
|
11
11
|
import '../curve/cubic2d.mjs';
|
|
12
12
|
import '../interval.mjs';
|
|
@@ -4,11 +4,11 @@ import { dual, Pipeable } from '../pipe.mjs';
|
|
|
4
4
|
import { invariant } from '../utils.mjs';
|
|
5
5
|
import { subtract, scale, add } from '../vector/vector2.mjs';
|
|
6
6
|
import { t as toCurves, f as fromSpline } from '../shared/curvy.CE4X6_Is.mjs';
|
|
7
|
-
import '../shared/curvy.
|
|
8
|
-
import '../shared/curvy.
|
|
7
|
+
import '../shared/curvy.Cps2R_RU.mjs';
|
|
8
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
9
9
|
import '../shared/curvy.C2XGH0R0.mjs';
|
|
10
|
-
import '../shared/curvy.
|
|
11
|
-
import '../shared/curvy.
|
|
10
|
+
import '../shared/curvy.NLeFCr-9.mjs';
|
|
11
|
+
import '../shared/curvy.Ck0of1PI.mjs';
|
|
12
12
|
import '../curve/cubic2d.mjs';
|
|
13
13
|
import '../interval.mjs';
|
|
14
14
|
import '../shared/curvy.DmVFTi0N.mjs';
|
|
@@ -3,11 +3,11 @@ import { fromCurves } from '../path/cubic2d.mjs';
|
|
|
3
3
|
import { dual, Pipeable } from '../pipe.mjs';
|
|
4
4
|
import { invariant } from '../utils.mjs';
|
|
5
5
|
import { t as toCurves, f as fromSpline } from '../shared/curvy.CE4X6_Is.mjs';
|
|
6
|
-
import '../shared/curvy.
|
|
7
|
-
import '../shared/curvy.
|
|
6
|
+
import '../shared/curvy.Cps2R_RU.mjs';
|
|
7
|
+
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
8
8
|
import '../shared/curvy.C2XGH0R0.mjs';
|
|
9
|
-
import '../shared/curvy.
|
|
10
|
-
import '../shared/curvy.
|
|
9
|
+
import '../shared/curvy.NLeFCr-9.mjs';
|
|
10
|
+
import '../shared/curvy.Ck0of1PI.mjs';
|
|
11
11
|
import '../curve/cubic2d.mjs';
|
|
12
12
|
import '../interval.mjs';
|
|
13
13
|
import '../shared/curvy.DmVFTi0N.mjs';
|
|
@@ -12,6 +12,7 @@ declare const make: {
|
|
|
12
12
|
(xy: number): Vector2;
|
|
13
13
|
(x: number, y: number): Vector2;
|
|
14
14
|
};
|
|
15
|
+
declare const fromPolar: (r: number, theta: number) => Vector2;
|
|
15
16
|
declare const magnitude: (vector: Vector2) => number;
|
|
16
17
|
declare const normalize: (vector: Vector2) => Vector2;
|
|
17
18
|
declare const dot: {
|
|
@@ -62,4 +63,4 @@ declare const setTheta: {
|
|
|
62
63
|
(theta: number): (v: Vector2) => Vector2;
|
|
63
64
|
};
|
|
64
65
|
|
|
65
|
-
export { type Vector2, add, components, cross, dot, getR, getTheta, getX, getY, hadamard, isVector2, magnitude, make, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, zero };
|
|
66
|
+
export { type Vector2, add, components, cross, dot, fromPolar, getR, getTheta, getX, getY, hadamard, isVector2, magnitude, make, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, zero };
|
package/dist/vector/vector2.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare const make: {
|
|
|
12
12
|
(xy: number): Vector2;
|
|
13
13
|
(x: number, y: number): Vector2;
|
|
14
14
|
};
|
|
15
|
+
declare const fromPolar: (r: number, theta: number) => Vector2;
|
|
15
16
|
declare const magnitude: (vector: Vector2) => number;
|
|
16
17
|
declare const normalize: (vector: Vector2) => Vector2;
|
|
17
18
|
declare const dot: {
|
|
@@ -62,4 +63,4 @@ declare const setTheta: {
|
|
|
62
63
|
(theta: number): (v: Vector2) => Vector2;
|
|
63
64
|
};
|
|
64
65
|
|
|
65
|
-
export { type Vector2, add, components, cross, dot, getR, getTheta, getX, getY, hadamard, isVector2, magnitude, make, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, zero };
|
|
66
|
+
export { type Vector2, add, components, cross, dot, fromPolar, getR, getTheta, getX, getY, hadamard, isVector2, magnitude, make, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, zero };
|
package/dist/vector/vector2.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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,
|
|
1
|
+
import { i as isVector2$1, m as make$1, f as fromPolar$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, g as subtract$1, h as hadamard$1, j as scale$1, k as getX$1, l as setX$1, o as getY$1, p as setY$1, q as setR$1, r as getTheta$1, t as setTheta$1 } from '../shared/curvy.BZ_mTkJe.mjs';
|
|
2
2
|
import '../pipe.mjs';
|
|
3
3
|
import '../utils.mjs';
|
|
4
4
|
|
|
5
5
|
const isVector2 = isVector2$1;
|
|
6
6
|
const make = make$1;
|
|
7
|
+
const fromPolar = fromPolar$1;
|
|
7
8
|
const magnitude = magnitude$1;
|
|
8
9
|
const normalize = normalize$1;
|
|
9
10
|
const dot = dot$1;
|
|
@@ -24,4 +25,4 @@ const setR = setR$1;
|
|
|
24
25
|
const getTheta = getTheta$1;
|
|
25
26
|
const setTheta = setTheta$1;
|
|
26
27
|
|
|
27
|
-
export { add, components, cross, dot, getR, getTheta, getX, getY, hadamard, isVector2, magnitude, make, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, zero };
|
|
28
|
+
export { add, components, cross, dot, fromPolar, getR, getTheta, getX, getY, hadamard, isVector2, magnitude, make, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, zero };
|
|
@@ -13,6 +13,7 @@ declare const make: {
|
|
|
13
13
|
(x: number, yz: number): Vector3;
|
|
14
14
|
(x: number, y: number, z: number): Vector3;
|
|
15
15
|
};
|
|
16
|
+
declare const fromSpherical: (r: number, theta: number, phi: number) => Vector3;
|
|
16
17
|
declare const magnitude: (vector: Vector3) => number;
|
|
17
18
|
declare const normalize: (vector: Vector3) => Vector3;
|
|
18
19
|
declare const dot: {
|
|
@@ -69,4 +70,4 @@ declare const setPhi: {
|
|
|
69
70
|
(phi: number): (v: Vector3) => Vector3;
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
export { type Vector3, add, components, dot, getPhi, getR, getTheta, getX, getY, getZ, hadamard, isVector3, magnitude, make, normalize, scale, setPhi, setR, setTheta, setX, setY, setZ, softmax, subtract, zero };
|
|
73
|
+
export { type Vector3, add, components, dot, fromSpherical, getPhi, getR, getTheta, getX, getY, getZ, hadamard, isVector3, magnitude, make, normalize, scale, setPhi, setR, setTheta, setX, setY, setZ, softmax, subtract, zero };
|
package/dist/vector/vector3.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ declare const make: {
|
|
|
13
13
|
(x: number, yz: number): Vector3;
|
|
14
14
|
(x: number, y: number, z: number): Vector3;
|
|
15
15
|
};
|
|
16
|
+
declare const fromSpherical: (r: number, theta: number, phi: number) => Vector3;
|
|
16
17
|
declare const magnitude: (vector: Vector3) => number;
|
|
17
18
|
declare const normalize: (vector: Vector3) => Vector3;
|
|
18
19
|
declare const dot: {
|
|
@@ -69,4 +70,4 @@ declare const setPhi: {
|
|
|
69
70
|
(phi: number): (v: Vector3) => Vector3;
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
export { type Vector3, add, components, dot, getPhi, getR, getTheta, getX, getY, getZ, hadamard, isVector3, magnitude, make, normalize, scale, setPhi, setR, setTheta, setX, setY, setZ, softmax, subtract, zero };
|
|
73
|
+
export { type Vector3, add, components, dot, fromSpherical, getPhi, getR, getTheta, getX, getY, getZ, hadamard, isVector3, magnitude, make, normalize, scale, setPhi, setR, setTheta, setX, setY, setZ, softmax, subtract, zero };
|
package/dist/vector/vector3.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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,
|
|
1
|
+
import { i as isVector3$1, m as make$1, f as fromSpherical$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, g as scale$1, j as getX$1, k as setX$1, l as getY$1, o as setY$1, p as getZ$1, q as setZ$1, r as setR$1, t as getTheta$1, u as setTheta$1, v as getPhi$1, w as setPhi$1 } from '../shared/curvy.Ck0of1PI.mjs';
|
|
2
2
|
import '../pipe.mjs';
|
|
3
3
|
import '../utils.mjs';
|
|
4
4
|
|
|
5
5
|
const isVector3 = isVector3$1;
|
|
6
6
|
const make = make$1;
|
|
7
|
+
const fromSpherical = fromSpherical$1;
|
|
7
8
|
const magnitude = magnitude$1;
|
|
8
9
|
const normalize = normalize$1;
|
|
9
10
|
const dot = dot$1;
|
|
@@ -27,4 +28,4 @@ const setTheta = setTheta$1;
|
|
|
27
28
|
const getPhi = getPhi$1;
|
|
28
29
|
const setPhi = setPhi$1;
|
|
29
30
|
|
|
30
|
-
export { add, components, dot, getPhi, getR, getTheta, getX, getY, getZ, hadamard, isVector3, magnitude, make, normalize, scale, setPhi, setR, setTheta, setX, setY, setZ, softmax, subtract, zero };
|
|
31
|
+
export { add, components, dot, fromSpherical, getPhi, getR, getTheta, getX, getY, getZ, hadamard, isVector3, magnitude, make, normalize, scale, setPhi, setR, setTheta, setX, setY, setZ, softmax, subtract, zero };
|