@margoengine/cinematic 0.0.0-stage → 1.0.0

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.
@@ -0,0 +1,13 @@
1
+ import { meshRuntime as e } from "@margoengine/core/extension";
2
+ //#region src/target.ts
3
+ function t(t, n) {
4
+ let r = typeof t == "function" ? t() : t;
5
+ if (!("length" in r)) {
6
+ let t = e(r);
7
+ return t.check(), t.engine.store.tick(!1), n[0] = t.matrix[12], n[1] = t.matrix[13], n[2] = t.matrix[14], n;
8
+ }
9
+ if (r.length !== 3 || !(Number.isFinite(r[0]) && Number.isFinite(r[1]) && Number.isFinite(r[2]))) throw RangeError("Invalid camera target; pass a mesh, three finite numbers or a function giving them");
10
+ return n[0] = r[0], n[1] = r[1], n[2] = r[2], n;
11
+ }
12
+ //#endregion
13
+ export { t };
@@ -0,0 +1,9 @@
1
+ import type { Mesh } from '@margoengine/core';
2
+ /** What a stage follows: a mesh (its world position, read each update), a world point, or a function giving one. */
3
+ export type CameraTarget = Mesh | ArrayLike<number> | (() => ArrayLike<number>);
4
+ /**
5
+ * Writes where `target` is to `out`.
6
+ * @throws RangeError when a point is not three finite numbers.
7
+ * @throws MargoError (code 'disposed') for a disposed mesh.
8
+ */
9
+ export declare function readTarget(target: CameraTarget, out: Float64Array): Float64Array;
package/package.json CHANGED
@@ -1,6 +1,91 @@
1
1
  {
2
2
  "name": "@margoengine/cinematic",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Virtual cameras with priorities and blends, framing, dolly tracks, group framing, camera noise, confiners and focus tracking, on top of damped follow, look-at and shake.",
5
+ "keywords": [
6
+ "margoengine",
7
+ "webgpu",
8
+ "3d",
9
+ "cinematic"
10
+ ],
11
+ "homepage": "https://margoengine.com",
12
+ "bugs": {
13
+ "url": "https://github.com/scottcampbelldata/margoengine/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/scottcampbelldata/margoengine.git",
18
+ "directory": "packages/cinematic"
19
+ },
20
+ "license": "Apache-2.0",
21
+ "author": "Scott Campbell",
22
+ "type": "module",
23
+ "sideEffects": false,
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ },
29
+ "./brain": {
30
+ "types": "./dist/brain.d.ts",
31
+ "import": "./dist/brain.js"
32
+ },
33
+ "./composer": {
34
+ "types": "./dist/composer.d.ts",
35
+ "import": "./dist/composer.js"
36
+ },
37
+ "./dolly": {
38
+ "types": "./dist/dolly.d.ts",
39
+ "import": "./dist/dolly.js"
40
+ },
41
+ "./group": {
42
+ "types": "./dist/group.d.ts",
43
+ "import": "./dist/group.js"
44
+ },
45
+ "./noise": {
46
+ "types": "./dist/noise.d.ts",
47
+ "import": "./dist/noise.js"
48
+ },
49
+ "./confine": {
50
+ "types": "./dist/confine.d.ts",
51
+ "import": "./dist/confine.js"
52
+ },
53
+ "./lens": {
54
+ "types": "./dist/lens.d.ts",
55
+ "import": "./dist/lens.js"
56
+ },
57
+ "./physical-lens": {
58
+ "types": "./dist/physical-lens.d.ts",
59
+ "import": "./dist/physical-lens.js"
60
+ },
61
+ "./ortho": {
62
+ "types": "./dist/ortho.d.ts",
63
+ "import": "./dist/ortho.js"
64
+ }
65
+ },
66
+ "files": [
67
+ "dist",
68
+ "LICENSE",
69
+ "NOTICE"
70
+ ],
71
+ "publishConfig": {
72
+ "access": "public"
73
+ },
74
+ "peerDependencies": {
75
+ "@margoengine/core": "^1.0.0"
76
+ },
77
+ "dependencies": {
78
+ "@margoengine/math": "^1.0.0",
79
+ "@margoengine/splines": "^1.0.0"
80
+ },
81
+ "scripts": {
82
+ "build": "node ../../scripts/build-optional.js cinematic",
83
+ "test": "npm run build && node --test test/*.test.js",
84
+ "prepack": "npm run build",
85
+ "test:gpu": "cd ../.. && node packages/cinematic/test/browser-check.mjs && node packages/cinematic/test/physical-lens-browser.mjs && node packages/cinematic/test/ortho-browser.mjs"
86
+ },
87
+ "devDependencies": {
88
+ "@margoengine/cameras": "^1.0.0",
89
+ "@margoengine/dof": "^1.0.0"
90
+ }
91
+ }