agentcut 0.2.14 → 0.2.16
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/studio/bundler.js +3 -1
- package/dist/studio/bundler.js.map +1 -1
- package/dist/studio/chat.js +2 -1
- package/dist/studio/chat.js.map +1 -1
- package/dist/studio/host.d.ts +2 -0
- package/dist/studio/host.js +17 -5
- package/dist/studio/host.js.map +1 -1
- package/dist/studio/projects.d.ts +1 -0
- package/dist/studio/projects.js +3 -1
- package/dist/studio/projects.js.map +1 -1
- package/dist/studio/providers/http.d.ts +4 -0
- package/dist/studio/providers/http.js +23 -0
- package/dist/studio/providers/http.js.map +1 -0
- package/dist/studio/providers/settings.d.ts +20 -0
- package/dist/studio/providers/settings.js +84 -0
- package/dist/studio/providers/settings.js.map +1 -0
- package/dist/studio/render-memory.d.ts +7 -0
- package/dist/studio/render-memory.js +31 -0
- package/dist/studio/render-memory.js.map +1 -0
- package/dist/studio/render-metadata.d.ts +3 -0
- package/dist/studio/render-metadata.js +16 -0
- package/dist/studio/render-metadata.js.map +1 -0
- package/dist/studio/render-policy.d.ts +16 -0
- package/dist/studio/render-policy.js +53 -0
- package/dist/studio/render-policy.js.map +1 -0
- package/dist/studio/render.d.ts +1 -0
- package/dist/studio/render.js +80 -22
- package/dist/studio/render.js.map +1 -1
- package/dist/studio/schema.d.ts +1134 -36
- package/dist/studio/schema.js +10 -0
- package/dist/studio/schema.js.map +1 -1
- package/dist/studio/tools.js +11 -5
- package/dist/studio/tools.js.map +1 -1
- package/dist/studio/transcription/assemblyai.d.ts +11 -0
- package/dist/studio/transcription/assemblyai.js +123 -0
- package/dist/studio/transcription/assemblyai.js.map +1 -0
- package/dist/studio/transcription/local.d.ts +2 -0
- package/dist/studio/transcription/local.js +57 -0
- package/dist/studio/transcription/local.js.map +1 -0
- package/dist/studio/transcription/registry.d.ts +3 -0
- package/dist/studio/transcription/registry.js +5 -0
- package/dist/studio/transcription/registry.js.map +1 -0
- package/dist/studio/transcription/service.d.ts +130 -0
- package/dist/studio/transcription/service.js +235 -0
- package/dist/studio/transcription/service.js.map +1 -0
- package/dist/studio/transcription/types.d.ts +68 -0
- package/dist/studio/transcription/types.js +2 -0
- package/dist/studio/transcription/types.js.map +1 -0
- package/dist/studio/voice/audio.d.ts +1 -0
- package/dist/studio/voice/audio.js +18 -0
- package/dist/studio/voice/audio.js.map +1 -0
- package/dist/studio/voice/elevenlabs.d.ts +2 -0
- package/dist/studio/voice/elevenlabs.js +76 -0
- package/dist/studio/voice/elevenlabs.js.map +1 -0
- package/dist/studio/voice/gemini.d.ts +2 -0
- package/dist/studio/voice/gemini.js +95 -0
- package/dist/studio/voice/gemini.js.map +1 -0
- package/dist/studio/voice/openai.d.ts +2 -0
- package/dist/studio/voice/openai.js +75 -0
- package/dist/studio/voice/openai.js.map +1 -0
- package/dist/studio/voice/registry.d.ts +4 -0
- package/dist/studio/voice/registry.js +18 -0
- package/dist/studio/voice/registry.js.map +1 -0
- package/dist/studio/voice/types.d.ts +42 -0
- package/dist/studio/voice/types.js +2 -0
- package/dist/studio/voice/types.js.map +1 -0
- package/dist/studio/voice/xai.d.ts +2 -0
- package/dist/studio/voice/xai.js +80 -0
- package/dist/studio/voice/xai.js.map +1 -0
- package/dist/studio/voice.d.ts +32 -58
- package/dist/studio/voice.js +52 -308
- package/dist/studio/voice.js.map +1 -1
- package/package.json +53 -53
- package/template/components/CATALOG.md +2 -0
- package/template/components/STYLES.md +108 -7
- package/template/components/catalog.json +29 -0
- package/template/components/cinematic/Cinematic.tsx +37 -7
- package/template/components/cinematic/PreviewFloor.tsx +39 -0
- package/template/components/cinematic/project-line.ts +23 -0
- package/template/components/cinematic/visibility.ts +12 -0
- package/template/components/hook-card/HookCard.tsx +11 -5
- package/template/components/hook-card/meta.json +29 -0
- package/template/components/sticker-badge/StickerBadge.tsx +4 -2
- package/template/components/styles.json +354 -3
- package/template/runtime/composition.tsx +10 -2
- package/template/runtime/framing.ts +29 -0
- package/template/runtime/types.ts +4 -0
- package/template/skill/SKILL.md +13 -2
- package/template/skill/references/person-framing.md +13 -0
- package/template/skill/references/style-editing.md +20 -0
- package/template/skill/references/transcription.md +15 -0
|
@@ -14,15 +14,16 @@ consistent and switches style in one edit. Set one only to break the style on pu
|
|
|
14
14
|
|
|
15
15
|
## Applying a style ("use the Voltrox style", or the Restyle button)
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
17
|
+
1. Read `references/style-editing.md`. Transcribe and review the source, then make the speech edit before graphics. Retiming must also update captions and audio.
|
|
18
|
+
2. Set `style` in project.json. This changes visual defaults; it does not remove speech or create B-roll.
|
|
19
|
+
3. Re-cut the graphics the style's way: follow its pacing and its "Reach for" list (component,
|
|
19
20
|
layout and position per job). Swap scene clips that do the same job for those components,
|
|
20
21
|
keep the words and timings, and drop color/font props they carried.
|
|
21
|
-
|
|
22
|
+
4. Hooks frame the speaker the style's way (`hook-card` layout top, stack, collage, window, hud or
|
|
22
23
|
inset): split the speaker's video clip at the hook's end and give the first part the box (and
|
|
23
24
|
radius) listed for that layout in hook-card's useWhen, so the face shows through the hole.
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
5. Captions: remove `style.preset`, colors and fonts from the captions clip so the style draws them.
|
|
26
|
+
6. Capture frames across the video and fix overlaps (word pops vs. captions: keep one in the lower third).
|
|
26
27
|
|
|
27
28
|
## Voltrox (`voltrox`)
|
|
28
29
|
|
|
@@ -148,7 +149,7 @@ Explainer: big bold centered captions, black-and-white line diagrams, punch-in c
|
|
|
148
149
|
- Captions carry the video: huge, uppercase, centered, one or two words at a time, the key word in yellow.
|
|
149
150
|
- Explain every idea with a black full-frame Line Diagram (venn, one to many, growth, cycle, small vs big, stairs) while it is said.
|
|
150
151
|
- Jump-cut punch-ins every ~2 s; no texture, no color besides the yellow.
|
|
151
|
-
- Open with
|
|
152
|
+
- Open with a centered full-frame title in the line-art look. Use centered diagrams for the explanation, then return to the speaker. Do not use a split header for this opening.
|
|
152
153
|
|
|
153
154
|
Look: `line` · camera: punch (zoom 1.14, every 60 frames) · overlay: none · captions: center, 2 words per line.
|
|
154
155
|
|
|
@@ -157,7 +158,7 @@ Fallback captions (older pages): Montserrat 900, #ffffff, highlight #ffe600, pre
|
|
|
157
158
|
Tokens: look `line` · font `heavy,condensed,archivo` · weight `900` · text `#ffffff` · accent `#ffe600` · onAccent `#000000` · panel `#000000` · panelText `#ffffff` · line `#ffffff` · theme `dark` · backdrop `#000000`
|
|
158
159
|
|
|
159
160
|
Reach for:
|
|
160
|
-
- Hook: `hook-card` {"layout":"
|
|
161
|
+
- Hook: `hook-card` {"layout":"full","tagline":"","position":"center","align":"center"}
|
|
161
162
|
- Explain an idea: `line-diagram` {"background":"#000000"}
|
|
162
163
|
- A count or price: `sticker-badge` {"position":"top-right","label":""}
|
|
163
164
|
- List item: `list-card` {"layout":"full"}
|
|
@@ -210,6 +211,106 @@ Reach for:
|
|
|
210
211
|
- Before / after: `before-after` {"layout":"card"}
|
|
211
212
|
- Proof: `quote-card` {"layout":"card"}
|
|
212
213
|
|
|
214
|
+
## Signal (`signal`)
|
|
215
|
+
|
|
216
|
+
Direct business advice: charcoal, lime emphasis, bold captions and clear proof.
|
|
217
|
+
|
|
218
|
+
- First transcribe the source with agentcut_transcribe. Review word timings and listen before removing dead air, repeated takes or filler words. Keep breaths, intentional pauses and the meaning of each sentence. Do not remove speech from transcript guesses alone.
|
|
219
|
+
- Build the speech edit first with source trims and split clips. Close the resulting gaps and remap captions, B-roll and audio to the edited timeline. Keep the source files unchanged.
|
|
220
|
+
- Review the picture about every 4–6 seconds for a useful change at a new idea, example or emphasis. Use a modest punch-in, wider reset or relevant B-roll only when it helps. Never insert cuts on a fixed five-second timer. The preset leaves the camera still so shot-level edits control the framing.
|
|
221
|
+
- Use only supplied or approved B-roll and licensed audio. If footage is missing, use a useful text or diagram insert. Keep speech clear above music; measure the mix and check cuts for clicks. A color filter does not restore missing detail or upscale footage.
|
|
222
|
+
- Lead with one useful claim, support it with an example, then give the next action. Keep the speaker prominent. Avoid decorative transitions and constant stickers.
|
|
223
|
+
- Use short three-word caption groups, with lime on the key word. Use one stat counter for a real number and a compact list for actionable steps. Prefer straight cuts; return to the wider shot after an emphasis.
|
|
224
|
+
- Keep skin tones neutral and the backdrop quiet. Use a low, steady music bed only if it helps; silence is valid for direct advice.
|
|
225
|
+
- Open over full-frame footage with a compact left-aligned title card in the lower third (hook-card layout:card, position:lower, align:left). Keep it below the face and above the bottom safe zone; hide captions during this title.
|
|
226
|
+
|
|
227
|
+
Look: `clean` · camera: still · overlay: none · captions: bottom, 3 words per line.
|
|
228
|
+
|
|
229
|
+
Fallback captions (older pages): Montserrat 800, #ffffff, highlight #cbef59, preset pop. Text clips: Montserrat 800, #ffffff.
|
|
230
|
+
|
|
231
|
+
Tokens: look `clean` · font `heavy,condensed` · weight `800` · text `#ffffff` · accent `#cbef59` · onAccent `#ffffff` · panel `#171b18` · panelText `#ffffff` · line `#455241` · theme `dark` · backdrop `#101511`
|
|
232
|
+
|
|
233
|
+
Reach for:
|
|
234
|
+
- Opening promise: `hook-card` {"layout":"card","size":15,"position":"lower","align":"left"}
|
|
235
|
+
- Evidence: `stat-counter` {"suffix":"%","label":"verified result"}
|
|
236
|
+
- Steps: `list-card` {"layout":"card"}
|
|
237
|
+
- Next action: `word-pop` {"position":"lower","tilt":false}
|
|
238
|
+
|
|
239
|
+
## Studyroom (`studyroom`)
|
|
240
|
+
|
|
241
|
+
Warm lessons: cream pages, teal notes, calm type and clear chapter cards.
|
|
242
|
+
|
|
243
|
+
- First transcribe the source with agentcut_transcribe. Review word timings and listen before removing dead air, repeated takes or filler words. Keep breaths, intentional pauses and the meaning of each sentence. Do not remove speech from transcript guesses alone.
|
|
244
|
+
- Build the speech edit first with source trims and split clips. Close the resulting gaps and remap captions, B-roll and audio to the edited timeline. Keep the source files unchanged.
|
|
245
|
+
- Review the picture about every 4–6 seconds for a useful change at a new idea, example or emphasis. Use a modest punch-in, wider reset or relevant B-roll only when it helps. Never insert cuts on a fixed five-second timer. The preset leaves the camera still so shot-level edits control the framing.
|
|
246
|
+
- Use only supplied or approved B-roll and licensed audio. If footage is missing, use a useful text or diagram insert. Keep speech clear above music; measure the mix and check cuts for clicks. A color filter does not restore missing detail or upscale footage.
|
|
247
|
+
- Organize the lesson into a question, a worked example and a short recap. Keep natural thinking pauses; remove only delays that do not help comprehension.
|
|
248
|
+
- Use warm cream chapter cards with teal emphasis, a rounded speaker inset and six-word caption lines. Show screen recordings or diagrams during the explanation, then return to the face.
|
|
249
|
+
- Apply only a slight warm grade after checking white balance. Use soft music and sparse, quiet reveal sounds. Let each example stay visible long enough to read.
|
|
250
|
+
|
|
251
|
+
Look: `clean` · camera: still · overlay: none · captions: bottom, 6 words per line.
|
|
252
|
+
|
|
253
|
+
Fallback captions (older pages): Inter 600, #ffffff, highlight #1b766b, preset plain. Text clips: Inter 600, #ffffff.
|
|
254
|
+
|
|
255
|
+
Tokens: look `clean` · font `display,sans` · weight `600` · text `#ffffff` · accent `#1b766b` · onAccent `#202b28` · panel `#fff8e8` · panelText `#202b28` · line `#b7c9b6` · theme `light` · backdrop `#f2e8d4`
|
|
256
|
+
|
|
257
|
+
Reach for:
|
|
258
|
+
- Opening promise: `hook-card` {"layout":"inset","size":20}
|
|
259
|
+
- Chapter: `list-card` {"layout":"card"}
|
|
260
|
+
- Worked example: `before-after` {"layout":"full"}
|
|
261
|
+
- Takeaway: `quote-card` {"layout":"card"}
|
|
262
|
+
|
|
263
|
+
## Afterglow (`afterglow`)
|
|
264
|
+
|
|
265
|
+
Product stories: dark plum, copper titles, detail shots and restrained motion.
|
|
266
|
+
|
|
267
|
+
- First transcribe the source with agentcut_transcribe. Review word timings and listen before removing dead air, repeated takes or filler words. Keep breaths, intentional pauses and the meaning of each sentence. Do not remove speech from transcript guesses alone.
|
|
268
|
+
- Build the speech edit first with source trims and split clips. Close the resulting gaps and remap captions, B-roll and audio to the edited timeline. Keep the source files unchanged.
|
|
269
|
+
- Review the picture about every 4–6 seconds for a useful change at a new idea, example or emphasis. Use a modest punch-in, wider reset or relevant B-roll only when it helps. Never insert cuts on a fixed five-second timer. The preset leaves the camera still so shot-level edits control the framing.
|
|
270
|
+
- Use only supplied or approved B-roll and licensed audio. If footage is missing, use a useful text or diagram insert. Keep speech clear above music; measure the mix and check cuts for clicks. A color filter does not restore missing detail or upscale footage.
|
|
271
|
+
- Build a short product story: reveal, useful detail, demonstration, payoff. Keep the voice edit clean and use supplied close-ups to show the claim.
|
|
272
|
+
- Alternate wide, detail and action shots at meaningful beats. Use match cuts where the source supports them. Use a brief light leak only at a scene change; avoid a transition on every cut.
|
|
273
|
+
- Use large copper serif titles with generous empty space. Reserve captions for spoken explanation. Keep highlights below clipping and avoid heavy orange skin tones.
|
|
274
|
+
- Place music hits and subtle source-backed Foley on actual actions. Do not add fake product sounds or claim speed ramps without source frames and an explicit timeline edit.
|
|
275
|
+
|
|
276
|
+
Look: `clean` · camera: still · overlay: vignette · captions: bottom, 6 words per line.
|
|
277
|
+
|
|
278
|
+
Fallback captions (older pages): Inter 400, #fff5ec, highlight #efa879, preset plain. Text clips: Inter 400, #fff5ec.
|
|
279
|
+
|
|
280
|
+
Tokens: look `clean` · font `serif,display` · weight `400` · text `#fff5ec` · accent `#efa879` · onAccent `#ffffff` · panel `#211923` · panelText `#ffffff` · line `#71545d` · theme `dark` · backdrop `#130f16`
|
|
281
|
+
|
|
282
|
+
Reach for:
|
|
283
|
+
- Opening promise: `hook-card` {"layout":"frame","size":20}
|
|
284
|
+
- Reveal: `light-leak` {"strength":0.35,"hueShift":20}
|
|
285
|
+
- Product contrast: `before-after` {"layout":"full"}
|
|
286
|
+
- Payoff: `word-pop` {"position":"center","tilt":false}
|
|
287
|
+
|
|
288
|
+
## Fieldnote (`fieldnote`)
|
|
289
|
+
|
|
290
|
+
Documentary notes: ivory serif titles, rust markers, source cards and light grain.
|
|
291
|
+
|
|
292
|
+
- First transcribe the source with agentcut_transcribe. Review word timings and listen before removing dead air, repeated takes or filler words. Keep breaths, intentional pauses and the meaning of each sentence. Do not remove speech from transcript guesses alone.
|
|
293
|
+
- Build the speech edit first with source trims and split clips. Close the resulting gaps and remap captions, B-roll and audio to the edited timeline. Keep the source files unchanged.
|
|
294
|
+
- Review the picture about every 4–6 seconds for a useful change at a new idea, example or emphasis. Use a modest punch-in, wider reset or relevant B-roll only when it helps. Never insert cuts on a fixed five-second timer. The preset leaves the camera still so shot-level edits control the framing.
|
|
295
|
+
- Use only supplied or approved B-roll and licensed audio. If footage is missing, use a useful text or diagram insert. Keep speech clear above music; measure the mix and check cuts for clicks. A color filter does not restore missing detail or upscale footage.
|
|
296
|
+
- Build a setup, a question or conflict, and a supported resolution. Preserve pauses that carry emotion. Use captions as access to the speech, not as invented narration.
|
|
297
|
+
- Use ivory serif chapter titles, rust markers and source labels. Show evidence as supplied images or screen recordings, with a clear source caption. Never invent a quote, date, map or statistic.
|
|
298
|
+
- Use a wider speaker frame for context and a modest closer crop for a personal point. Hold on documents long enough to read. Use light grain and neutral color; preserve natural room tone.
|
|
299
|
+
- Use quote cards only for exact verified words. Keep music sparse under testimony, and finish with the answer to the opening question rather than an unrelated call to action.
|
|
300
|
+
- Open with a centered, full-frame ivory serif chapter card, not torn paper, tape or collage. Cut to the speaker once the question is clear. Keep rust markers small and evidence cards square and quiet.
|
|
301
|
+
|
|
302
|
+
Look: `clean` · camera: still · overlay: grain · captions: bottom, 6 words per line.
|
|
303
|
+
|
|
304
|
+
Fallback captions (older pages): Instrument Serif 400, #ffffff, highlight #b94d32, preset plain. Text clips: Inter 400, #ffffff.
|
|
305
|
+
|
|
306
|
+
Tokens: look `clean` · font `serif,fraunces` · weight `400` · text `#ffffff` · accent `#b94d32` · onAccent `#24251f` · panel `#f4f0e5` · panelText `#24251f` · line `#41463e` · theme `light` · backdrop `#e8e2d4`
|
|
307
|
+
|
|
308
|
+
Reach for:
|
|
309
|
+
- Opening promise: `hook-card` {"layout":"full","position":"center","align":"center","size":18}
|
|
310
|
+
- Verified quote: `quote-card` {"layout":"full"}
|
|
311
|
+
- Evidence summary: `list-card` {"layout":"full"}
|
|
312
|
+
- Chapter marker: `word-pop` {"position":"lower","tilt":false}
|
|
313
|
+
|
|
213
314
|
## Props that follow the style
|
|
214
315
|
|
|
215
316
|
| component | props (token) |
|
|
@@ -3291,6 +3291,26 @@
|
|
|
3291
3291
|
"style": "text",
|
|
3292
3292
|
"label": "Text on video",
|
|
3293
3293
|
"default": "#ffffff"
|
|
3294
|
+
},
|
|
3295
|
+
"position": {
|
|
3296
|
+
"type": "select",
|
|
3297
|
+
"label": "Title position",
|
|
3298
|
+
"default": "center",
|
|
3299
|
+
"options": [
|
|
3300
|
+
{
|
|
3301
|
+
"value": "top",
|
|
3302
|
+
"label": "Top"
|
|
3303
|
+
},
|
|
3304
|
+
{
|
|
3305
|
+
"value": "center",
|
|
3306
|
+
"label": "Center"
|
|
3307
|
+
},
|
|
3308
|
+
{
|
|
3309
|
+
"value": "lower",
|
|
3310
|
+
"label": "Lower third"
|
|
3311
|
+
}
|
|
3312
|
+
],
|
|
3313
|
+
"help": "Title position for full-frame and floating-card layouts. Framed speaker layouts keep the title beside their footage."
|
|
3294
3314
|
}
|
|
3295
3315
|
},
|
|
3296
3316
|
"examples": [
|
|
@@ -3329,6 +3349,15 @@
|
|
|
3329
3349
|
"sub": "",
|
|
3330
3350
|
"tagline": ""
|
|
3331
3351
|
}
|
|
3352
|
+
},
|
|
3353
|
+
{
|
|
3354
|
+
"name": "Lower title over footage",
|
|
3355
|
+
"props": {
|
|
3356
|
+
"layout": "card",
|
|
3357
|
+
"position": "lower",
|
|
3358
|
+
"align": "left",
|
|
3359
|
+
"size": 14
|
|
3360
|
+
}
|
|
3332
3361
|
}
|
|
3333
3362
|
]
|
|
3334
3363
|
},
|
|
@@ -8,6 +8,8 @@ import { Video } from "@remotion/media";
|
|
|
8
8
|
import { createContext, useContext, useId, useState, type ComponentProps, type CSSProperties, type ReactNode } from "react";
|
|
9
9
|
import { AbsoluteFill, Img, interpolate, useCurrentFrame, useRemotionEnvironment, useVideoConfig } from "remotion";
|
|
10
10
|
import { alpha, glowStyle } from "../lib";
|
|
11
|
+
import { outsideViewport } from "./visibility";
|
|
12
|
+
import { PreviewFloor } from "./PreviewFloor";
|
|
11
13
|
import {
|
|
12
14
|
apply,
|
|
13
15
|
EASES,
|
|
@@ -252,11 +254,27 @@ export function Stage({ camera, float = 0, motionBlur = 0, seed = 1, background,
|
|
|
252
254
|
// flicker under memory pressure. Captures and exports draw exactly as before.
|
|
253
255
|
const steady = motionBlur > 0 && env.isPlayer && !env.isRendering;
|
|
254
256
|
const blurStyle = blurred || steady ? { filter: `blur(${blurred ? blur.toFixed(2) : 0}px)` } : undefined;
|
|
257
|
+
// Keep the export tree stable when the camera stops, so videos and stateful scenes stay mounted.
|
|
258
|
+
const clipExport = env.isRendering && motionBlur > 0;
|
|
259
|
+
const gutter = blurred ? Math.ceil(blur * 3 + 2) : 0;
|
|
255
260
|
|
|
256
261
|
return (
|
|
257
262
|
<AbsoluteFill style={{ overflow: "hidden", background, ...style }}>
|
|
258
263
|
<StageCtx.Provider value={ctx}>
|
|
259
|
-
<AbsoluteFill style={blurStyle}>
|
|
264
|
+
<AbsoluteFill style={blurStyle}>
|
|
265
|
+
{/* Clip projected planes BEFORE the stage filter. A plane near the lens can project to
|
|
266
|
+
thousands of pixels outside the frame; clipping only the filter's output still makes
|
|
267
|
+
Chromium allocate that enormous intermediate surface and can blank the editor. */}
|
|
268
|
+
{clipExport ? (
|
|
269
|
+
// Keep a blur-sized gutter so off-screen pixels still contribute at the frame edge.
|
|
270
|
+
// Clip BEFORE filtering: a plane near the camera can otherwise allocate a huge surface.
|
|
271
|
+
<div style={{ position: "absolute", inset: -gutter, overflow: "hidden", contain: "paint" }}>
|
|
272
|
+
<div style={{ position: "absolute", inset: gutter }}>{children}</div>
|
|
273
|
+
</div>
|
|
274
|
+
) : steady ? (
|
|
275
|
+
<AbsoluteFill style={{ overflow: "hidden", contain: "paint" }}>{children}</AbsoluteFill>
|
|
276
|
+
) : children}
|
|
277
|
+
</AbsoluteFill>
|
|
260
278
|
</StageCtx.Provider>
|
|
261
279
|
</AbsoluteFill>
|
|
262
280
|
);
|
|
@@ -598,7 +616,12 @@ function PlaneBody({
|
|
|
598
616
|
key: string,
|
|
599
617
|
m: M4,
|
|
600
618
|
o: { blur: number; pad: number; mask?: CSSProperties; opacity: number; copy: boolean; body?: ReactNode },
|
|
601
|
-
) =>
|
|
619
|
+
) => {
|
|
620
|
+
const projected = mul(ctx.project, m, translate(-o.pad, -o.pad, 0));
|
|
621
|
+
// Keep content mounted (especially video), but don't allocate filtered surfaces outside the shot.
|
|
622
|
+
// The padded box includes lens blur; the margin also covers Stage's motion blur.
|
|
623
|
+
const hidden = outsideViewport(projected, width + o.pad * 2, height + o.pad * 2, ctx.width, ctx.height, 96 * ctx.u);
|
|
624
|
+
return (
|
|
602
625
|
<div
|
|
603
626
|
key={key}
|
|
604
627
|
style={{
|
|
@@ -608,7 +631,8 @@ function PlaneBody({
|
|
|
608
631
|
width: width + o.pad * 2,
|
|
609
632
|
height: height + o.pad * 2,
|
|
610
633
|
transformOrigin: "0 0",
|
|
611
|
-
transform:
|
|
634
|
+
transform: toCss(projected),
|
|
635
|
+
display: hidden ? "none" : undefined,
|
|
612
636
|
...o.mask,
|
|
613
637
|
}}
|
|
614
638
|
>
|
|
@@ -618,7 +642,8 @@ function PlaneBody({
|
|
|
618
642
|
</div>
|
|
619
643
|
</div>
|
|
620
644
|
</div>
|
|
621
|
-
|
|
645
|
+
);
|
|
646
|
+
};
|
|
622
647
|
|
|
623
648
|
const layers: ReactNode[] = [];
|
|
624
649
|
|
|
@@ -1181,6 +1206,10 @@ export function Floor({
|
|
|
1181
1206
|
glow?: string;
|
|
1182
1207
|
}) {
|
|
1183
1208
|
const id = `floor${useId().replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
1209
|
+
const ctx = useStageContext("Floor");
|
|
1210
|
+
const env = useRemotionEnvironment();
|
|
1211
|
+
const lightPreview = env.isPlayer && !env.isRendering;
|
|
1212
|
+
if (lightPreview) return <PreviewFloor ctx={ctx} y={y} size={size} near={near} spacing={spacing} color={color} opacity={opacity} />;
|
|
1184
1213
|
// Tiles of at most ~1250 px: each one blurs with its own depth, the part at the lens drops out alone,
|
|
1185
1214
|
// and no layer gets bigger than a GPU texture.
|
|
1186
1215
|
const n = Math.max(1, Math.ceil(size / 1250));
|
|
@@ -1199,16 +1228,17 @@ export function Floor({
|
|
|
1199
1228
|
if (p >= y0 - 2 && p <= y0 + tile + 2) lines.push(<line key={`h${l}`} x1={x0} y1={p} x2={x0 + tile} y2={p} />);
|
|
1200
1229
|
}
|
|
1201
1230
|
const tid = `${id}-${i}-${j}`;
|
|
1231
|
+
const x = x0 + tile / 2 - size / 2;
|
|
1232
|
+
const z = z0 + y0 + tile / 2 - size / 2;
|
|
1202
1233
|
tiles.push(
|
|
1203
1234
|
<Plane
|
|
1204
1235
|
key={tid}
|
|
1205
|
-
x={
|
|
1236
|
+
x={x}
|
|
1206
1237
|
y={y}
|
|
1207
|
-
z={
|
|
1238
|
+
z={z}
|
|
1208
1239
|
tilt={90}
|
|
1209
1240
|
width={tile}
|
|
1210
1241
|
height={tile}
|
|
1211
|
-
dof
|
|
1212
1242
|
>
|
|
1213
1243
|
<svg width={tile} height={tile} viewBox={`${x0} ${y0} ${tile} ${tile}`} style={{ position: "absolute", inset: 0 }}>
|
|
1214
1244
|
<defs>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbsoluteFill } from "remotion";
|
|
2
|
+
import { mul } from "./math";
|
|
3
|
+
import { projectLine } from "./project-line";
|
|
4
|
+
import type { StageContext } from "./Cinematic";
|
|
5
|
+
|
|
6
|
+
/** A bounded screen-space grid. No perspective CSS layers, SVG masks, or filtered floor tiles. */
|
|
7
|
+
export function PreviewFloor({ ctx, y, size, near, spacing, color, opacity }: {
|
|
8
|
+
ctx: StageContext; y: number; size: number; near: number; spacing: number; color: string; opacity: number;
|
|
9
|
+
}) {
|
|
10
|
+
if (![y, size, near, spacing, opacity].every(Number.isFinite) || size <= 0 || spacing <= 0) return null;
|
|
11
|
+
const matrix = mul(ctx.project, ctx.view, ctx.model);
|
|
12
|
+
const paths = Array.from({ length: 16 }, () => "");
|
|
13
|
+
const steps = 48;
|
|
14
|
+
const count = Math.min(200, Math.floor(size / spacing));
|
|
15
|
+
for (let line = 0; line <= count; line++) {
|
|
16
|
+
const fixed = line * spacing;
|
|
17
|
+
for (let step = 0; step < steps; step++) {
|
|
18
|
+
const from = size * step / steps, to = size * (step + 1) / steps;
|
|
19
|
+
for (const horizontal of [false, true]) {
|
|
20
|
+
const x = horizontal ? (from + to) / 2 : fixed;
|
|
21
|
+
const z = horizontal ? fixed : (from + to) / 2;
|
|
22
|
+
const fade = Math.max(0, 1 - Math.hypot(x - size / 2, z - size / 2) / (size * 0.35));
|
|
23
|
+
const bucket = Math.round(fade * 15);
|
|
24
|
+
if (!bucket) continue;
|
|
25
|
+
const a: [number, number, number] = horizontal ? [from - size / 2, y, near - size + fixed] : [fixed - size / 2, y, near - size + from];
|
|
26
|
+
const b: [number, number, number] = horizontal ? [to - size / 2, y, near - size + fixed] : [fixed - size / 2, y, near - size + to];
|
|
27
|
+
const points = projectLine(matrix, a, b, ctx.width, ctx.height);
|
|
28
|
+
if (!points) continue;
|
|
29
|
+
const [x0, y0, x1, y1] = points.map((v) => v.toFixed(2));
|
|
30
|
+
paths[bucket] += `M${x0},${y0}L${x1},${y1}`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return <AbsoluteFill style={{ overflow: "hidden", pointerEvents: "none" }}>
|
|
35
|
+
<svg width={ctx.width} height={ctx.height} viewBox={`0 0 ${ctx.width} ${ctx.height}`} style={{ overflow: "hidden" }}>
|
|
36
|
+
{paths.map((d, i) => d ? <path key={i} d={d} fill="none" stroke={color} strokeWidth={Math.max(0.5, ctx.u)} opacity={opacity * i / 15} /> : null)}
|
|
37
|
+
</svg>
|
|
38
|
+
</AbsoluteFill>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { apply, type M4 } from "./math";
|
|
2
|
+
|
|
3
|
+
/** Clip in homogeneous space before dividing by w. Never send unbounded coordinates to SVG. */
|
|
4
|
+
export function projectLine(matrix: M4, a: [number, number, number], b: [number, number, number], width: number, height: number) {
|
|
5
|
+
let p = apply(matrix, ...a);
|
|
6
|
+
let q = apply(matrix, ...b);
|
|
7
|
+
if ([...p, ...q].some((v) => !Number.isFinite(v))) return null;
|
|
8
|
+
const planes = [
|
|
9
|
+
(v: number[]) => v[3] - 0.001,
|
|
10
|
+
(v: number[]) => v[0], (v: number[]) => width * v[3] - v[0],
|
|
11
|
+
(v: number[]) => v[1], (v: number[]) => height * v[3] - v[1],
|
|
12
|
+
];
|
|
13
|
+
for (const plane of planes) {
|
|
14
|
+
const d0 = plane(p), d1 = plane(q);
|
|
15
|
+
if (d0 < 0 && d1 < 0) return null;
|
|
16
|
+
if (d0 < 0 || d1 < 0) {
|
|
17
|
+
const t = d0 / (d0 - d1);
|
|
18
|
+
const cut = p.map((v, i) => v + (q[i] - v) * t) as typeof p;
|
|
19
|
+
if (d0 < 0) p = cut; else q = cut;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return [p[0] / p[3], p[1] / p[3], q[0] / q[3], q[1] / q[3]];
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { apply, type M4 } from "./math";
|
|
2
|
+
|
|
3
|
+
/** Conservative bounds, including blur spill. Keep planes that cross the camera plane. */
|
|
4
|
+
export function outsideViewport(matrix: M4, width: number, height: number, viewportWidth: number, viewportHeight: number, margin = 0) {
|
|
5
|
+
const corners = [[0, 0], [width, 0], [0, height], [width, height]]
|
|
6
|
+
.map(([x, y]) => apply(matrix, x, y));
|
|
7
|
+
if (corners.some((p) => p.some((v) => !Number.isFinite(v)) || p[3] <= 0)) return false;
|
|
8
|
+
const xs = corners.map((p) => p[0] / p[3]);
|
|
9
|
+
const ys = corners.map((p) => p[1] / p[3]);
|
|
10
|
+
return Math.max(...xs) < -margin || Math.min(...xs) > viewportWidth + margin ||
|
|
11
|
+
Math.max(...ys) < -margin || Math.min(...ys) > viewportHeight + margin;
|
|
12
|
+
}
|
|
@@ -10,7 +10,8 @@ type Props = MotionBaseProps &
|
|
|
10
10
|
lines: string[];
|
|
11
11
|
sub: string;
|
|
12
12
|
tagline: string;
|
|
13
|
-
layout: string;
|
|
13
|
+
layout: string;
|
|
14
|
+
position?: string;
|
|
14
15
|
split: number;
|
|
15
16
|
align: string;
|
|
16
17
|
size: number;
|
|
@@ -404,7 +405,12 @@ export function HookCard(props: Props) {
|
|
|
404
405
|
const centered = props.align === "center" || layout === "stack" || layout === "window" || layout === "inset" || layout === "hud" || layout === "frame" || layout === "tv";
|
|
405
406
|
const align = centered ? "center" : "left";
|
|
406
407
|
const headSize = (props.size / 100) * Math.min(width, height) * (layout === "card" ? 0.72 : box && !vertical ? 0.8 : 1);
|
|
407
|
-
const pad = (vertical ? 70 : 110) * u;
|
|
408
|
+
const pad = (vertical ? 70 : 110) * u;
|
|
409
|
+
const placement: CSSProperties = {
|
|
410
|
+
justifyContent: props.position === "top" ? "flex-start" : props.position === "lower" ? "flex-end" : "center",
|
|
411
|
+
paddingTop: props.position === "top" ? height * 0.1 : 0,
|
|
412
|
+
paddingBottom: props.position === "lower" ? height * 0.18 : 0,
|
|
413
|
+
};
|
|
408
414
|
|
|
409
415
|
const content = (
|
|
410
416
|
<div
|
|
@@ -425,16 +431,16 @@ export function HookCard(props: Props) {
|
|
|
425
431
|
|
|
426
432
|
if (layout === "full") {
|
|
427
433
|
return (
|
|
428
|
-
<AbsoluteFill style={{ opacity: out }}>
|
|
434
|
+
<AbsoluteFill style={{ opacity: out, background: kit.backdrop }}>
|
|
429
435
|
<Backdrop kit={kit} width={width} height={height} />
|
|
430
|
-
<AbsoluteFill style={
|
|
436
|
+
<AbsoluteFill style={placement}>{content}</AbsoluteFill>
|
|
431
437
|
</AbsoluteFill>
|
|
432
438
|
);
|
|
433
439
|
}
|
|
434
440
|
if (!box) {
|
|
435
441
|
const e = enter(kit, frame, fps, 0, kit.look === "ink" || kit.look === "paper" ? -2 : 0);
|
|
436
442
|
return (
|
|
437
|
-
<AbsoluteFill style={{ alignItems: "center"
|
|
443
|
+
<AbsoluteFill style={{ ...placement, alignItems: centered ? "center" : "flex-start", paddingLeft: centered ? 0 : pad, opacity: out }}>
|
|
438
444
|
<div style={{ opacity: e.opacity, transform: e.transform, maxWidth: width * (vertical ? 0.88 : 0.62) }}>
|
|
439
445
|
<Panel kit={kit} title="~/hook.txt">
|
|
440
446
|
{content}
|
|
@@ -261,6 +261,26 @@
|
|
|
261
261
|
"style": "text",
|
|
262
262
|
"label": "Text on video",
|
|
263
263
|
"default": "#ffffff"
|
|
264
|
+
},
|
|
265
|
+
"position": {
|
|
266
|
+
"type": "select",
|
|
267
|
+
"label": "Title position",
|
|
268
|
+
"default": "center",
|
|
269
|
+
"options": [
|
|
270
|
+
{
|
|
271
|
+
"value": "top",
|
|
272
|
+
"label": "Top"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"value": "center",
|
|
276
|
+
"label": "Center"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"value": "lower",
|
|
280
|
+
"label": "Lower third"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"help": "Title position for full-frame and floating-card layouts. Framed speaker layouts keep the title beside their footage."
|
|
264
284
|
}
|
|
265
285
|
},
|
|
266
286
|
"examples": [
|
|
@@ -299,6 +319,15 @@
|
|
|
299
319
|
"sub": "",
|
|
300
320
|
"tagline": ""
|
|
301
321
|
}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "Lower title over footage",
|
|
325
|
+
"props": {
|
|
326
|
+
"layout": "card",
|
|
327
|
+
"position": "lower",
|
|
328
|
+
"align": "left",
|
|
329
|
+
"size": 14
|
|
330
|
+
}
|
|
302
331
|
}
|
|
303
332
|
]
|
|
304
333
|
}
|
|
@@ -33,13 +33,15 @@ export function StickerBadge(props: Props) {
|
|
|
33
33
|
justifyContent: vertical === "top" ? "flex-start" : vertical === "bottom" ? "flex-end" : "center",
|
|
34
34
|
}}
|
|
35
35
|
>
|
|
36
|
-
|
|
36
|
+
{/* column-reverse: the tag sits above the badge but comes later in the DOM, so it paints on top
|
|
37
|
+
where they overlap (the export renderer has no z-index). */}
|
|
38
|
+
<div style={{ position: "relative", display: "flex", flexDirection: "column-reverse", alignItems: horizontal === "right" ? "flex-end" : "flex-start" }}>
|
|
39
|
+
<Sticker kit={kit} text={props.text} size={size} frame={frame} fps={fps} start={props.label ? 6 : 0} />
|
|
37
40
|
{props.label ? (
|
|
38
41
|
<div style={{ position: "relative", marginBottom: -size * 0.12, marginRight: horizontal === "right" ? size * 0.55 : 0 }}>
|
|
39
42
|
<Tag kit={kit} text={props.label} fontSize={size * 0.17} frame={frame} fps={fps} start={0} />
|
|
40
43
|
</div>
|
|
41
44
|
) : null}
|
|
42
|
-
<Sticker kit={kit} text={props.text} size={size} frame={frame} fps={fps} start={props.label ? 6 : 0} />
|
|
43
45
|
</div>
|
|
44
46
|
</AbsoluteFill>
|
|
45
47
|
);
|