agentcut 0.2.26 → 0.2.27
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/README.md +177 -177
- package/dist/studio/agents/claude.js +3 -2
- package/dist/studio/agents/claude.js.map +1 -1
- package/dist/studio/chat.js +1 -1
- package/dist/studio/chat.js.map +1 -1
- package/dist/studio/cli.js +24 -24
- package/dist/studio/download.d.ts +24 -0
- package/dist/studio/download.js +234 -0
- package/dist/studio/download.js.map +1 -0
- package/dist/studio/host.js +8 -0
- package/dist/studio/host.js.map +1 -1
- package/dist/studio/housekeeping.d.ts +2 -2
- package/dist/studio/housekeeping.js +18 -17
- package/dist/studio/housekeeping.js.map +1 -1
- package/dist/studio/release-cursor.js +21 -21
- package/dist/studio/release-video.js +10 -10
- package/dist/studio/tools.js +7 -0
- package/dist/studio/tools.js.map +1 -1
- package/package.json +56 -56
- package/template/AGENTS.md +14 -14
- package/template/components/README.md +70 -70
- package/template/components/before-after/BeforeAfter.tsx +89 -89
- package/template/components/catalog.ts +107 -107
- package/template/components/cinematic/Device3D.tsx +324 -324
- package/template/components/cinematic/devices3d/display-model.ts +184 -184
- package/template/components/cinematic/devices3d/iphone-model.ts +643 -643
- package/template/components/cinematic/devices3d/macbook-model.ts +608 -608
- package/template/components/cinematic/devices3d/models.ts +657 -657
- package/template/components/cinematic/devices3d/runtime.ts +267 -267
- package/template/components/cinematic/math.ts +100 -100
- package/template/components/color/grade-effect.ts +650 -650
- package/template/components/color/grade.ts +512 -512
- package/template/components/color/looks.ts +154 -154
- package/template/components/countdown/Countdown.tsx +166 -166
- package/template/components/dot-trace-title/DotTraceTitle.tsx +181 -181
- package/template/components/dot-trace-title/meta.json +51 -51
- package/template/components/generate/GenerateReveal.tsx +381 -381
- package/template/components/hook-card/HookCard.tsx +554 -554
- package/template/components/index.ts +199 -199
- package/template/components/lib.ts +191 -191
- package/template/components/line-diagram/LineDiagram.tsx +205 -205
- package/template/components/line-diagram/meta.json +215 -215
- package/template/components/list-card/ListCard.tsx +104 -104
- package/template/components/live-clip.ts +75 -75
- package/template/components/looks.tsx +1447 -1447
- package/template/components/loops/LoopCanvas.tsx +132 -132
- package/template/components/loops/engine.ts +184 -184
- package/template/components/loops/library.ts +667 -667
- package/template/components/loops/library2.ts +777 -777
- package/template/components/motion-loop/MotionLoop.tsx +37 -37
- package/template/components/motion-loop/meta.json +311 -311
- package/template/components/props.ts +73 -73
- package/template/components/quote-card/QuoteCard.tsx +71 -71
- package/template/components/style-layer.tsx +233 -233
- package/template/components/styles.ts +113 -113
- package/template/components/types.ts +66 -66
- package/template/components/word-pop/WordPop.tsx +59 -59
- package/template/components/word-stack/WordStack.tsx +122 -122
- package/template/presets/charcoal-sketch/PROMPT.md +48 -48
- package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -34
- package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -376
- package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -73
- package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -119
- package/template/runtime/composition.tsx +1189 -1189
- package/template/runtime/helpers.tsx +230 -230
- package/template/runtime/index.tsx +22 -22
- package/template/runtime/types.ts +315 -315
- package/template/skill/SKILL.md +186 -187
- package/template/skill/references/broll.md +44 -44
- package/template/skill/references/browser-export.md +61 -61
- package/template/skill/references/cinematic.md +206 -206
- package/template/skill/references/color.md +79 -79
- package/template/skill/references/craft.md +97 -97
- package/template/skill/references/editing-styles.md +57 -57
- package/template/skill/references/feature-launch.md +34 -34
- package/template/skill/references/footage.md +72 -72
- package/template/skill/references/format.md +142 -142
- package/template/skill/references/how-to.md +146 -146
- package/template/skill/references/launch-direction.md +89 -89
- package/template/skill/references/loops.md +151 -151
- package/template/skill/references/mcp-external.md +19 -19
- package/template/skill/references/performance.md +93 -93
- package/template/skill/references/person-cutout.md +19 -19
- package/template/skill/references/presets.md +60 -60
- package/template/skill/references/product-launch.md +134 -134
- package/template/skill/references/release-capture.md +53 -53
- package/template/skill/references/sound.md +167 -166
- package/template/skill/references/style-spy.md +160 -160
- package/template/skill/references/website-howto.md +45 -45
- package/template/starter/.studio/chat.json +1 -1
- package/template/starter/layers.json +46 -46
- package/template/starter/notes.md +4 -4
- package/template/starter/project.json +13 -13
- package/template/starter/scenes/Title.tsx +38 -38
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
// 4×4 matrix math for the cinematic camera (row-major, column vectors, CSS axes: x right, y down,
|
|
2
|
-
// z toward the viewer). No DOM, no React: the stage computes one matrix3d() per plane.
|
|
3
|
-
import { Easing } from "remotion";
|
|
4
|
-
|
|
5
|
-
export type M4 = number[];
|
|
6
|
-
|
|
7
|
-
export const identity = (): M4 => [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8
|
-
|
|
9
|
-
export function mul(...ms: M4[]): M4 {
|
|
10
|
-
return ms.reduce((a, b) => {
|
|
11
|
-
const o = new Array<number>(16).fill(0);
|
|
12
|
-
for (let i = 0; i < 4; i++)
|
|
13
|
-
for (let j = 0; j < 4; j++)
|
|
14
|
-
for (let k = 0; k < 4; k++) o[i * 4 + j] += a[i * 4 + k] * b[k * 4 + j];
|
|
15
|
-
return o;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const translate = (x: number, y: number, z = 0): M4 => [1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1];
|
|
20
|
-
export const scale = (x: number, y = x, z = x): M4 => [x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1];
|
|
21
|
-
|
|
22
|
-
const rad = (deg: number) => (deg * Math.PI) / 180;
|
|
23
|
-
|
|
24
|
-
/** Positive tilts the top edge away from the viewer. */
|
|
25
|
-
export function rotateX(deg: number): M4 {
|
|
26
|
-
const c = Math.cos(rad(deg));
|
|
27
|
-
const s = Math.sin(rad(deg));
|
|
28
|
-
return [1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** Positive turns the right edge away from the viewer. */
|
|
32
|
-
export function rotateY(deg: number): M4 {
|
|
33
|
-
const c = Math.cos(rad(deg));
|
|
34
|
-
const s = Math.sin(rad(deg));
|
|
35
|
-
return [c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Positive rolls clockwise on screen. */
|
|
39
|
-
export function rotateZ(deg: number): M4 {
|
|
40
|
-
const c = Math.cos(rad(deg));
|
|
41
|
-
const s = Math.sin(rad(deg));
|
|
42
|
-
return [c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** CSS perspective(d): the viewer sits at z = d. */
|
|
46
|
-
export const perspective = (d: number): M4 => [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1 / d, 1];
|
|
47
|
-
|
|
48
|
-
export function apply(m: M4, x: number, y: number, z = 0): [number, number, number, number] {
|
|
49
|
-
return [
|
|
50
|
-
m[0] * x + m[1] * y + m[2] * z + m[3],
|
|
51
|
-
m[4] * x + m[5] * y + m[6] * z + m[7],
|
|
52
|
-
m[8] * x + m[9] * y + m[10] * z + m[11],
|
|
53
|
-
m[12] * x + m[13] * y + m[14] * z + m[15],
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** CSS matrix3d() takes columns. */
|
|
58
|
-
export function toCss(m: M4) {
|
|
59
|
-
const cols: number[] = [];
|
|
60
|
-
for (let j = 0; j < 4; j++) for (let i = 0; i < 4; i++) cols.push(m[i * 4 + j]);
|
|
61
|
-
return `matrix3d(${cols.map((v) => (Math.abs(v) < 1e-12 ? 0 : +v.toPrecision(10))).join(",")})`;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** Object placement shared by planes and groups. */
|
|
65
|
-
export interface Placement {
|
|
66
|
-
/** World px from the frame center (y down, z toward the viewer). */
|
|
67
|
-
x?: number;
|
|
68
|
-
y?: number;
|
|
69
|
-
z?: number;
|
|
70
|
-
/** Degrees. tilt: top edge leans back; turn: right edge goes back; roll: clockwise. */
|
|
71
|
-
tilt?: number;
|
|
72
|
-
turn?: number;
|
|
73
|
-
roll?: number;
|
|
74
|
-
scale?: number;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function placementMatrix(p: Placement): M4 {
|
|
78
|
-
return mul(
|
|
79
|
-
translate(p.x ?? 0, p.y ?? 0, p.z ?? 0),
|
|
80
|
-
rotateZ(p.roll ?? 0),
|
|
81
|
-
rotateX(p.tilt ?? 0),
|
|
82
|
-
rotateY(p.turn ?? 0),
|
|
83
|
-
scale(p.scale ?? 1),
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export const EASES = {
|
|
88
|
-
linear: (t: number) => t,
|
|
89
|
-
in: Easing.bezier(0.55, 0, 0.75, 0.25),
|
|
90
|
-
out: Easing.bezier(0.22, 1, 0.36, 1),
|
|
91
|
-
inOut: Easing.bezier(0.65, 0, 0.35, 1),
|
|
92
|
-
/** Fast start, very long landing: the premium glide. */
|
|
93
|
-
expo: Easing.bezier(0.16, 1, 0.3, 1),
|
|
94
|
-
/** Overshoots a little, then settles. */
|
|
95
|
-
back: Easing.bezier(0.34, 1.4, 0.64, 1),
|
|
96
|
-
/** Slow out, very fast middle, slow in: whip pans between subjects. */
|
|
97
|
-
whip: Easing.bezier(0.8, 0, 0.2, 1),
|
|
98
|
-
} as const;
|
|
99
|
-
|
|
100
|
-
export type EaseName = keyof typeof EASES;
|
|
1
|
+
// 4×4 matrix math for the cinematic camera (row-major, column vectors, CSS axes: x right, y down,
|
|
2
|
+
// z toward the viewer). No DOM, no React: the stage computes one matrix3d() per plane.
|
|
3
|
+
import { Easing } from "remotion";
|
|
4
|
+
|
|
5
|
+
export type M4 = number[];
|
|
6
|
+
|
|
7
|
+
export const identity = (): M4 => [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
8
|
+
|
|
9
|
+
export function mul(...ms: M4[]): M4 {
|
|
10
|
+
return ms.reduce((a, b) => {
|
|
11
|
+
const o = new Array<number>(16).fill(0);
|
|
12
|
+
for (let i = 0; i < 4; i++)
|
|
13
|
+
for (let j = 0; j < 4; j++)
|
|
14
|
+
for (let k = 0; k < 4; k++) o[i * 4 + j] += a[i * 4 + k] * b[k * 4 + j];
|
|
15
|
+
return o;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const translate = (x: number, y: number, z = 0): M4 => [1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1];
|
|
20
|
+
export const scale = (x: number, y = x, z = x): M4 => [x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1];
|
|
21
|
+
|
|
22
|
+
const rad = (deg: number) => (deg * Math.PI) / 180;
|
|
23
|
+
|
|
24
|
+
/** Positive tilts the top edge away from the viewer. */
|
|
25
|
+
export function rotateX(deg: number): M4 {
|
|
26
|
+
const c = Math.cos(rad(deg));
|
|
27
|
+
const s = Math.sin(rad(deg));
|
|
28
|
+
return [1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Positive turns the right edge away from the viewer. */
|
|
32
|
+
export function rotateY(deg: number): M4 {
|
|
33
|
+
const c = Math.cos(rad(deg));
|
|
34
|
+
const s = Math.sin(rad(deg));
|
|
35
|
+
return [c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Positive rolls clockwise on screen. */
|
|
39
|
+
export function rotateZ(deg: number): M4 {
|
|
40
|
+
const c = Math.cos(rad(deg));
|
|
41
|
+
const s = Math.sin(rad(deg));
|
|
42
|
+
return [c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** CSS perspective(d): the viewer sits at z = d. */
|
|
46
|
+
export const perspective = (d: number): M4 => [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1 / d, 1];
|
|
47
|
+
|
|
48
|
+
export function apply(m: M4, x: number, y: number, z = 0): [number, number, number, number] {
|
|
49
|
+
return [
|
|
50
|
+
m[0] * x + m[1] * y + m[2] * z + m[3],
|
|
51
|
+
m[4] * x + m[5] * y + m[6] * z + m[7],
|
|
52
|
+
m[8] * x + m[9] * y + m[10] * z + m[11],
|
|
53
|
+
m[12] * x + m[13] * y + m[14] * z + m[15],
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** CSS matrix3d() takes columns. */
|
|
58
|
+
export function toCss(m: M4) {
|
|
59
|
+
const cols: number[] = [];
|
|
60
|
+
for (let j = 0; j < 4; j++) for (let i = 0; i < 4; i++) cols.push(m[i * 4 + j]);
|
|
61
|
+
return `matrix3d(${cols.map((v) => (Math.abs(v) < 1e-12 ? 0 : +v.toPrecision(10))).join(",")})`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Object placement shared by planes and groups. */
|
|
65
|
+
export interface Placement {
|
|
66
|
+
/** World px from the frame center (y down, z toward the viewer). */
|
|
67
|
+
x?: number;
|
|
68
|
+
y?: number;
|
|
69
|
+
z?: number;
|
|
70
|
+
/** Degrees. tilt: top edge leans back; turn: right edge goes back; roll: clockwise. */
|
|
71
|
+
tilt?: number;
|
|
72
|
+
turn?: number;
|
|
73
|
+
roll?: number;
|
|
74
|
+
scale?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function placementMatrix(p: Placement): M4 {
|
|
78
|
+
return mul(
|
|
79
|
+
translate(p.x ?? 0, p.y ?? 0, p.z ?? 0),
|
|
80
|
+
rotateZ(p.roll ?? 0),
|
|
81
|
+
rotateX(p.tilt ?? 0),
|
|
82
|
+
rotateY(p.turn ?? 0),
|
|
83
|
+
scale(p.scale ?? 1),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const EASES = {
|
|
88
|
+
linear: (t: number) => t,
|
|
89
|
+
in: Easing.bezier(0.55, 0, 0.75, 0.25),
|
|
90
|
+
out: Easing.bezier(0.22, 1, 0.36, 1),
|
|
91
|
+
inOut: Easing.bezier(0.65, 0, 0.35, 1),
|
|
92
|
+
/** Fast start, very long landing: the premium glide. */
|
|
93
|
+
expo: Easing.bezier(0.16, 1, 0.3, 1),
|
|
94
|
+
/** Overshoots a little, then settles. */
|
|
95
|
+
back: Easing.bezier(0.34, 1.4, 0.64, 1),
|
|
96
|
+
/** Slow out, very fast middle, slow in: whip pans between subjects. */
|
|
97
|
+
whip: Easing.bezier(0.8, 0, 0.2, 1),
|
|
98
|
+
} as const;
|
|
99
|
+
|
|
100
|
+
export type EaseName = keyof typeof EASES;
|