@flighthq/motionpath 0.2.1-next.841.373388f → 0.3.0-next.1032.e2b99fc
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/contract.d.ts +2 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +2 -0
- package/dist/contract.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/motionPath.d.ts +1 -1
- package/dist/motionPath.d.ts.map +1 -1
- package/dist/motionPath.js +2 -2
- package/dist/motionPath.js.map +1 -1
- package/package.json +8 -4
- package/src/motionPath.test.ts +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/dist/contract.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createMotionPath, getMotionPathHeading, getMotionPathPosition, getMotionPathProgress, setMotionPathDistance, setMotionPathProgress, updateMotionPath, } from './contract';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createMotionPath, getMotionPathHeading, getMotionPathPosition, getMotionPathProgress, setMotionPathDistance, setMotionPathProgress, updateMotionPath, } from './contract';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
package/dist/motionPath.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MotionPath, MotionPathLoopMode, Path, Vector2Like } from '@flighthq/types';
|
|
1
|
+
import type { MotionPath, MotionPathLoopMode, Path, Vector2Like } from '@flighthq/types/contract';
|
|
2
2
|
export declare function createMotionPath(path: Path, speed?: number, loopMode?: MotionPathLoopMode, tolerance?: number): MotionPath;
|
|
3
3
|
export declare function getMotionPathHeading(mp: Readonly<MotionPath>): number;
|
|
4
4
|
export declare function getMotionPathPosition(mp: Readonly<MotionPath>, pointOut: Vector2Like, tangentOut: Vector2Like): boolean;
|
package/dist/motionPath.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motionPath.d.ts","sourceRoot":"","sources":["../src/motionPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"motionPath.d.ts","sourceRoot":"","sources":["../src/motionPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AASlG,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,KAAK,SAAI,EACT,QAAQ,GAAE,kBAA4B,EACtC,SAAS,CAAC,EAAE,MAAM,GACjB,UAAU,CASZ;AAMD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAGrE;AAQD,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC,EACxB,QAAQ,EAAE,WAAW,EACrB,UAAU,EAAE,WAAW,GACtB,OAAO,CAET;AAID,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAEtE;AAID,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAM5E;AAID,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAKrE;AAMD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAQxE"}
|
package/dist/motionPath.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createVector2 } from '@flighthq/geometry';
|
|
2
|
-
import { getPathLength, getPathPositionAtDistance, getPathTangentAtDistance } from '@flighthq/path';
|
|
1
|
+
import { createVector2 } from '@flighthq/geometry/contract';
|
|
2
|
+
import { getPathLength, getPathPositionAtDistance, getPathTangentAtDistance } from '@flighthq/path/contract';
|
|
3
3
|
// Allocate a `MotionPath` marker at the start of `path` (`distance` 0, `direction` forward).
|
|
4
4
|
// `speed` is the traversal rate in path units per second (a magnitude; default 0 = stationary),
|
|
5
5
|
// `loopMode` the end behavior (default `clamp`). The path's total arc length is measured once here
|
package/dist/motionPath.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motionPath.js","sourceRoot":"","sources":["../src/motionPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"motionPath.js","sourceRoot":"","sources":["../src/motionPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAG7G,6FAA6F;AAC7F,gGAAgG;AAChG,mGAAmG;AACnG,kGAAkG;AAClG,+FAA+F;AAC/F,mGAAmG;AACnG,2BAA2B;AAC3B,MAAM,UAAU,gBAAgB,CAC9B,IAAU,EACV,KAAK,GAAG,CAAC,EACT,WAA+B,OAAO,EACtC,SAAkB;IAElB,OAAO;QACL,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC;QACtC,QAAQ;QACR,IAAI;QACJ,KAAK;KACN,CAAC;AACJ,CAAC;AAED,oGAAoG;AACpG,+FAA+F;AAC/F,iGAAiG;AACjG,yDAAyD;AACzD,MAAM,UAAU,oBAAoB,CAAC,EAAwB;IAC3D,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC/D,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,cAAc,GAAG,aAAa,EAAE,CAAC;AAEvC,gGAAgG;AAChG,mGAAmG;AACnG,kGAAkG;AAClG,+BAA+B;AAC/B,MAAM,UAAU,qBAAqB,CACnC,EAAwB,EACxB,QAAqB,EACrB,UAAuB;IAEvB,OAAO,yBAAyB,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,Q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GAAG,QAAQ,CAAC;YAChC,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QACpB,CAAC;QACD,OAAO;IACT,CAAC;IAED,QAAQ;IACR,IAAI,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1C,IAAI,OAAO,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC,CAAC;SACxB,IAAI,OAAO,GAAG,MAAM;QAAE,OAAO,GAAG,MAAM,CAAC;IAC5C,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/motionpath",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-next.1032.e2b99fc",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/flighthq/flight.git",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./contract": {
|
|
18
|
+
"types": "./dist/contract.d.ts",
|
|
19
|
+
"default": "./dist/contract.js"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"files": [
|
|
@@ -32,9 +36,9 @@
|
|
|
32
36
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@flighthq/geometry": "0.
|
|
36
|
-
"@flighthq/path": "0.
|
|
37
|
-
"@flighthq/types": "0.
|
|
39
|
+
"@flighthq/geometry": "0.3.0-next.1032.e2b99fc",
|
|
40
|
+
"@flighthq/path": "0.3.0-next.1032.e2b99fc",
|
|
41
|
+
"@flighthq/types": "0.3.0-next.1032.e2b99fc"
|
|
38
42
|
},
|
|
39
43
|
"devDependencies": {
|
|
40
44
|
"typescript": "^5.3.0"
|
package/src/motionPath.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createVector2 } from '@flighthq/geometry';
|
|
2
|
-
import { appendPathLineTo, appendPathMoveTo, createPath } from '@flighthq/path';
|
|
3
|
-
import type { Path } from '@flighthq/types';
|
|
1
|
+
import { createVector2 } from '@flighthq/geometry/contract';
|
|
2
|
+
import { appendPathLineTo, appendPathMoveTo, createPath } from '@flighthq/path/contract';
|
|
3
|
+
import type { Path } from '@flighthq/types/contract';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
createMotionPath,
|