agentcut 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +11 -2
- package/dist/bridge.d.ts +45 -0
- package/dist/bridge.js +691 -0
- package/dist/bridge.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.js +50 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/log.d.ts +1 -0
- package/dist/log.js +14 -0
- package/dist/log.js.map +1 -0
- package/dist/studio/agents/claude.d.ts +7 -0
- package/dist/studio/agents/claude.js +155 -0
- package/dist/studio/agents/claude.js.map +1 -0
- package/dist/studio/agents/codex.d.ts +4 -0
- package/dist/studio/agents/codex.js +169 -0
- package/dist/studio/agents/codex.js.map +1 -0
- package/dist/studio/agents/index.d.ts +8 -0
- package/dist/studio/agents/index.js +50 -0
- package/dist/studio/agents/index.js.map +1 -0
- package/dist/studio/agents/types.d.ts +131 -0
- package/dist/studio/agents/types.js +11 -0
- package/dist/studio/agents/types.js.map +1 -0
- package/dist/studio/bundler.d.ts +29 -0
- package/dist/studio/bundler.js +136 -0
- package/dist/studio/bundler.js.map +1 -0
- package/dist/studio/chat.d.ts +147 -0
- package/dist/studio/chat.js +681 -0
- package/dist/studio/chat.js.map +1 -0
- package/dist/studio/cli.d.ts +2 -0
- package/dist/studio/cli.js +194 -0
- package/dist/studio/cli.js.map +1 -0
- package/dist/studio/components.d.ts +4 -0
- package/dist/studio/components.js +36 -0
- package/dist/studio/components.js.map +1 -0
- package/dist/studio/host.d.ts +105 -0
- package/dist/studio/host.js +634 -0
- package/dist/studio/host.js.map +1 -0
- package/dist/studio/http.d.ts +21 -0
- package/dist/studio/http.js +240 -0
- package/dist/studio/http.js.map +1 -0
- package/dist/studio/music.d.ts +35 -0
- package/dist/studio/music.js +130 -0
- package/dist/studio/music.js.map +1 -0
- package/dist/studio/proc.d.ts +11 -0
- package/dist/studio/proc.js +69 -0
- package/dist/studio/proc.js.map +1 -0
- package/dist/studio/projects.d.ts +84 -0
- package/dist/studio/projects.js +369 -0
- package/dist/studio/projects.js.map +1 -0
- package/dist/studio/render.d.ts +24 -0
- package/dist/studio/render.js +197 -0
- package/dist/studio/render.js.map +1 -0
- package/dist/studio/reveal.d.ts +7 -0
- package/dist/studio/reveal.js +49 -0
- package/dist/studio/reveal.js.map +1 -0
- package/dist/studio/schema.d.ts +4152 -0
- package/dist/studio/schema.js +358 -0
- package/dist/studio/schema.js.map +1 -0
- package/dist/studio/tools.d.ts +2 -0
- package/dist/studio/tools.js +165 -0
- package/dist/studio/tools.js.map +1 -0
- package/dist/studio/voice.d.ts +150 -0
- package/dist/studio/voice.js +434 -0
- package/dist/studio/voice.js.map +1 -0
- package/dist/studio/workspace.d.ts +31 -0
- package/dist/studio/workspace.js +187 -0
- package/dist/studio/workspace.js.map +1 -0
- package/package.json +50 -4
- package/template/AGENTS.md +13 -0
- package/template/components/CATALOG.md +1306 -0
- package/template/components/README.md +61 -0
- package/template/components/STYLES.md +246 -0
- package/template/components/arcade-title/ArcadeTitle.tsx +860 -0
- package/template/components/arcade-title/meta.json +28 -0
- package/template/components/aurora/Aurora.tsx +63 -0
- package/template/components/aurora/meta.json +28 -0
- package/template/components/bar-wipe-title/BarWipeTitle.tsx +94 -0
- package/template/components/bar-wipe-title/meta.json +29 -0
- package/template/components/before-after/BeforeAfter.tsx +89 -0
- package/template/components/before-after/meta.json +233 -0
- package/template/components/bento-grid/BentoGrid.tsx +202 -0
- package/template/components/bento-grid/meta.json +25 -0
- package/template/components/blur-in-title/BlurInTitle.tsx +121 -0
- package/template/components/blur-in-title/meta.json +32 -0
- package/template/components/catalog.json +8730 -0
- package/template/components/catalog.ts +103 -0
- package/template/components/chat-thread/ChatThread.tsx +128 -0
- package/template/components/chat-thread/meta.json +24 -0
- package/template/components/checklist/Checklist.tsx +129 -0
- package/template/components/checklist/meta.json +25 -0
- package/template/components/confetti/Confetti.tsx +109 -0
- package/template/components/confetti/meta.json +28 -0
- package/template/components/countdown/Countdown.tsx +166 -0
- package/template/components/countdown/meta.json +28 -0
- package/template/components/cut-and-paste/CutAndPaste.tsx +654 -0
- package/template/components/cut-and-paste/meta.json +29 -0
- package/template/components/decode-text/DecodeText.tsx +97 -0
- package/template/components/decode-text/meta.json +29 -0
- package/template/components/editorial-quote/EditorialQuote.tsx +122 -0
- package/template/components/editorial-quote/meta.json +28 -0
- package/template/components/glitch-title/GlitchTitle.tsx +171 -0
- package/template/components/glitch-title/meta.json +32 -0
- package/template/components/halftone-wave/HalftoneWave.tsx +106 -0
- package/template/components/halftone-wave/meta.json +28 -0
- package/template/components/highlighter/Highlighter.tsx +142 -0
- package/template/components/highlighter/meta.json +28 -0
- package/template/components/hook-card/HookCard.tsx +552 -0
- package/template/components/hook-card/meta.json +304 -0
- package/template/components/index.ts +149 -0
- package/template/components/iris-wipe/IrisWipe.tsx +76 -0
- package/template/components/iris-wipe/meta.json +24 -0
- package/template/components/kinetic-poster/KineticPoster.tsx +437 -0
- package/template/components/kinetic-poster/meta.json +31 -0
- package/template/components/kinetic-punch/KineticPunch.tsx +80 -0
- package/template/components/kinetic-punch/meta.json +30 -0
- package/template/components/lava-lamp/LavaLamp.tsx +92 -0
- package/template/components/lava-lamp/meta.json +28 -0
- package/template/components/letter-cascade/LetterCascade.tsx +102 -0
- package/template/components/letter-cascade/meta.json +29 -0
- package/template/components/lib.ts +179 -0
- package/template/components/light-leak/LightLeakTransition.tsx +43 -0
- package/template/components/light-leak/meta.json +74 -0
- package/template/components/line-diagram/LineDiagram.tsx +205 -0
- package/template/components/line-diagram/meta.json +217 -0
- package/template/components/list-card/ListCard.tsx +104 -0
- package/template/components/list-card/meta.json +232 -0
- package/template/components/logo-sting/LogoSting.tsx +129 -0
- package/template/components/logo-sting/meta.json +29 -0
- package/template/components/looks.tsx +1447 -0
- package/template/components/lower-third/LowerThird.tsx +100 -0
- package/template/components/lower-third/meta.json +24 -0
- package/template/components/marquee/Marquee.tsx +100 -0
- package/template/components/marquee/meta.json +30 -0
- package/template/components/notification/Notification.tsx +115 -0
- package/template/components/notification/meta.json +27 -0
- package/template/components/outline-fill/OutlineFill.tsx +106 -0
- package/template/components/outline-fill/meta.json +28 -0
- package/template/components/panel-sweep/PanelSweep.tsx +86 -0
- package/template/components/panel-sweep/meta.json +25 -0
- package/template/components/prompt-box/PromptBox.tsx +131 -0
- package/template/components/prompt-box/meta.json +24 -0
- package/template/components/props.ts +73 -0
- package/template/components/quote-card/QuoteCard.tsx +71 -0
- package/template/components/quote-card/meta.json +216 -0
- package/template/components/shape-shift/ShapeShift.tsx +420 -0
- package/template/components/shape-shift/meta.json +31 -0
- package/template/components/slide-zoom-message/SlideZoomMessage.tsx +179 -0
- package/template/components/slide-zoom-message/meta.json +199 -0
- package/template/components/social-post/SocialPost.tsx +185 -0
- package/template/components/social-post/meta.json +30 -0
- package/template/components/split-flap/SplitFlap.tsx +191 -0
- package/template/components/split-flap/meta.json +29 -0
- package/template/components/spotlight-grid/SpotlightGrid.tsx +84 -0
- package/template/components/spotlight-grid/meta.json +25 -0
- package/template/components/stat-counter/StatCounter.tsx +117 -0
- package/template/components/stat-counter/meta.json +27 -0
- package/template/components/sticker-badge/StickerBadge.tsx +46 -0
- package/template/components/sticker-badge/meta.json +220 -0
- package/template/components/sticker-slam/StickerSlam.tsx +941 -0
- package/template/components/sticker-slam/meta.json +34 -0
- package/template/components/style-layer.tsx +233 -0
- package/template/components/styles.json +762 -0
- package/template/components/styles.ts +113 -0
- package/template/components/target-lock/TargetLock.tsx +662 -0
- package/template/components/target-lock/meta.json +32 -0
- package/template/components/text-reveal/TextReveal.tsx +99 -0
- package/template/components/text-reveal/meta.json +28 -0
- package/template/components/tile-wipe/TileWipe.tsx +75 -0
- package/template/components/tile-wipe/meta.json +24 -0
- package/template/components/type-zoom/TypeZoom.tsx +103 -0
- package/template/components/type-zoom/meta.json +27 -0
- package/template/components/types.ts +66 -0
- package/template/components/typewriter/Typewriter.tsx +112 -0
- package/template/components/typewriter/meta.json +29 -0
- package/template/components/word-pop/WordPop.tsx +59 -0
- package/template/components/word-pop/meta.json +237 -0
- package/template/components/word-stack/WordStack.tsx +122 -0
- package/template/components/word-stack/meta.json +27 -0
- package/template/components/word-swap/WordSwap.tsx +127 -0
- package/template/components/word-swap/meta.json +30 -0
- package/template/presets/charcoal-sketch/PROMPT.md +48 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-0.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-1.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-2.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/sketch-paper.jpg +0 -0
- package/template/presets/charcoal-sketch/assets/paper/smudge.png +0 -0
- package/template/presets/charcoal-sketch/poster.jpg +0 -0
- package/template/presets/charcoal-sketch/preset.json +17 -0
- package/template/presets/charcoal-sketch/preview.mp4 +0 -0
- package/template/presets/charcoal-sketch/scenes/Grain.tsx +23 -0
- package/template/presets/charcoal-sketch/scenes/Paper.tsx +17 -0
- package/template/presets/charcoal-sketch/scenes/examples/Agents.tsx +100 -0
- package/template/presets/charcoal-sketch/scenes/examples/Approvals.tsx +110 -0
- package/template/presets/charcoal-sketch/scenes/examples/Blog.tsx +105 -0
- package/template/presets/charcoal-sketch/scenes/examples/EndCard.tsx +41 -0
- package/template/presets/charcoal-sketch/scenes/examples/Hook.tsx +130 -0
- package/template/presets/charcoal-sketch/scenes/examples/Ideas.tsx +92 -0
- package/template/presets/charcoal-sketch/scenes/examples/Posting.tsx +128 -0
- package/template/presets/charcoal-sketch/scenes/lib/painfix.tsx +119 -0
- package/template/presets/charcoal-sketch/scenes/lib/sketch.tsx +291 -0
- package/template/presets/charcoal-sketch/scripts/build_layers.example.py +193 -0
- package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -0
- package/template/presets/charcoal-sketch/scripts/make_textures.py +93 -0
- package/template/presets/punk-cut-paper/PROMPT.md +37 -0
- package/template/presets/punk-cut-paper/assets/paper/desk-cream.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/grain-overlay.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-black.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-red.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-yellow.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/kraft.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/newsprint.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/paper-cream.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/paper-white.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/tape.png +0 -0
- package/template/presets/punk-cut-paper/build_layers.example.py +150 -0
- package/template/presets/punk-cut-paper/poster.jpg +0 -0
- package/template/presets/punk-cut-paper/preset.json +15 -0
- package/template/presets/punk-cut-paper/preview.mp4 +0 -0
- package/template/presets/punk-cut-paper/scenes/Backdrop.tsx +76 -0
- package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -0
- package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -0
- package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -0
- package/template/presets/punk-cut-paper/scenes/Xerox.tsx +31 -0
- package/template/presets/punk-cut-paper/scenes/lib/punk.tsx +208 -0
- package/template/runtime/composition.tsx +918 -0
- package/template/runtime/helpers.tsx +228 -0
- package/template/runtime/index.tsx +22 -0
- package/template/runtime/types.ts +248 -0
- package/template/skill/SKILL.md +149 -0
- package/template/skill/references/browser-export.md +61 -0
- package/template/skill/references/components.md +38 -0
- package/template/skill/references/craft.md +53 -0
- package/template/skill/references/cursor.md +91 -0
- package/template/skill/references/footage.md +73 -0
- package/template/skill/references/format.md +140 -0
- package/template/skill/references/presets.md +56 -0
- package/template/skill/references/sound.md +128 -0
- package/template/starter/.studio/chat.json +1 -0
- package/template/starter/assets/.keep +0 -0
- package/template/starter/layers.json +46 -0
- package/template/starter/notes.md +4 -0
- package/template/starter/project.json +13 -0
- package/template/starter/renders/.keep +0 -0
- package/template/starter/scenes/Title.tsx +38 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
2
|
+
import { FONTS, exitOut, mix, pop, ramp, unit } from "../lib";
|
|
3
|
+
import type { MotionBaseProps } from "../types";
|
|
4
|
+
|
|
5
|
+
type Props = MotionBaseProps & {
|
|
6
|
+
name: string;
|
|
7
|
+
title: string;
|
|
8
|
+
accent: string;
|
|
9
|
+
textColor: string;
|
|
10
|
+
panel: string;
|
|
11
|
+
position: string;
|
|
12
|
+
font: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** A name and role card that slides in at the bottom of the frame, holds, and slides out. */
|
|
16
|
+
export function LowerThird(props: Props) {
|
|
17
|
+
const frame = useCurrentFrame();
|
|
18
|
+
const { width, height, fps, durationInFrames } = props;
|
|
19
|
+
const u = unit(width, height);
|
|
20
|
+
const vertical = height > width;
|
|
21
|
+
const right = props.position.endsWith("right");
|
|
22
|
+
const top = props.position.startsWith("top");
|
|
23
|
+
const bar = pop(frame, fps, 0, 200);
|
|
24
|
+
const card = pop(frame, fps, 4);
|
|
25
|
+
const titleIn = ramp(frame, 12, 14);
|
|
26
|
+
const out = exitOut(frame, durationInFrames, 14);
|
|
27
|
+
const exitShift = (1 - out) * 60 * u * (right ? 1 : -1);
|
|
28
|
+
const nameSize = (vertical ? 54 : 46) * u;
|
|
29
|
+
const margin = (vertical ? 64 : 80) * u;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<AbsoluteFill
|
|
33
|
+
style={{
|
|
34
|
+
justifyContent: top ? "flex-start" : "flex-end",
|
|
35
|
+
alignItems: right ? "flex-end" : "flex-start",
|
|
36
|
+
padding: `${margin * (vertical ? 2.6 : 1)}px ${margin}px`,
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
style={{
|
|
41
|
+
display: "flex",
|
|
42
|
+
flexDirection: right ? "row-reverse" : "row",
|
|
43
|
+
alignItems: "stretch",
|
|
44
|
+
gap: 14 * u,
|
|
45
|
+
opacity: out,
|
|
46
|
+
transform: `translateX(${exitShift}px)`,
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
style={{
|
|
51
|
+
width: 8 * u,
|
|
52
|
+
borderRadius: 8 * u,
|
|
53
|
+
background: props.accent,
|
|
54
|
+
transform: `scaleY(${bar})`,
|
|
55
|
+
transformOrigin: "bottom",
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
<div
|
|
59
|
+
style={{
|
|
60
|
+
background: props.panel,
|
|
61
|
+
borderRadius: 18 * u,
|
|
62
|
+
padding: `${18 * u}px ${28 * u}px`,
|
|
63
|
+
boxShadow: `0 ${18 * u}px ${48 * u}px rgba(0,0,0,0.28)`,
|
|
64
|
+
transform: `translateX(${mix(right ? 40 : -40, 0, card) * u}px)`,
|
|
65
|
+
opacity: Math.min(1, card * 1.3),
|
|
66
|
+
textAlign: right ? "right" : "left",
|
|
67
|
+
}}
|
|
68
|
+
>
|
|
69
|
+
<div
|
|
70
|
+
style={{
|
|
71
|
+
fontFamily: FONTS[props.font] ?? FONTS.sans,
|
|
72
|
+
fontWeight: 800,
|
|
73
|
+
fontSize: nameSize,
|
|
74
|
+
lineHeight: 1.08,
|
|
75
|
+
letterSpacing: "-0.02em",
|
|
76
|
+
color: props.textColor,
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
{props.name}
|
|
80
|
+
</div>
|
|
81
|
+
{props.title ? (
|
|
82
|
+
<div
|
|
83
|
+
style={{
|
|
84
|
+
marginTop: 6 * u,
|
|
85
|
+
fontFamily: FONTS.sans,
|
|
86
|
+
fontWeight: 500,
|
|
87
|
+
fontSize: nameSize * 0.52,
|
|
88
|
+
color: props.textColor,
|
|
89
|
+
opacity: 0.72 * titleIn,
|
|
90
|
+
transform: `translateY(${mix(10, 0, titleIn) * u}px)`,
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
{props.title}
|
|
94
|
+
</div>
|
|
95
|
+
) : null}
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</AbsoluteFill>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lower-third",
|
|
3
|
+
"name": "Lower Third",
|
|
4
|
+
"category": "Overlays",
|
|
5
|
+
"description": "A name and role card with an accent bar that slides in near the bottom of the frame.",
|
|
6
|
+
"useWhen": "Introducing a speaker, a customer quote's author, a product or feature name over footage. Keep it on screen 3–5 seconds.",
|
|
7
|
+
"durationInFrames": 120,
|
|
8
|
+
"layer": "overlay",
|
|
9
|
+
"tags": ["name", "speaker", "title card", "caption", "interview"],
|
|
10
|
+
"props": {
|
|
11
|
+
"name": { "type": "text", "label": "Name", "default": "Vlad Palacio" },
|
|
12
|
+
"title": { "type": "text", "label": "Role", "default": "Founder, Agentcut", "help": "Leave empty for a name-only card." },
|
|
13
|
+
"accent": { "type": "color", "style": "accent", "label": "Accent bar", "default": "#34d399" },
|
|
14
|
+
"textColor": { "type": "color", "style": "panelText", "label": "Text", "default": "#ffffff" },
|
|
15
|
+
"panel": { "type": "color", "style": "panel", "label": "Card", "default": "rgba(12,14,18,0.82)" },
|
|
16
|
+
"position": { "type": "select", "label": "Position", "default": "bottom-left", "options": [{ "value": "bottom-left", "label": "Bottom left" }, { "value": "bottom-right", "label": "Bottom right" }, { "value": "top-left", "label": "Top left" }, { "value": "top-right", "label": "Top right" }] },
|
|
17
|
+
"font": { "type": "select", "style": "font", "label": "Font", "default": "sans", "options": [{ "value": "sans", "label": "Inter" }, { "value": "display", "label": "Bricolage" }, { "value": "serif", "label": "Instrument Serif" }, { "value": "fraunces", "label": "Fraunces" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "syne", "label": "Syne" }, { "value": "wide", "label": "Unbounded" }, { "value": "condensed", "label": "Anton" }, { "value": "mono", "label": "Mono" }, { "value": "archivo", "label": "Archivo Black" }, { "value": "caveat", "label": "Caveat" }, { "value": "pixel", "label": "VT323" }, { "value": "tech", "label": "Orbitron" }, { "value": "heavy", "label": "Montserrat" }, { "value": "retro", "label": "Bungee" }] }
|
|
18
|
+
},
|
|
19
|
+
"examples": [
|
|
20
|
+
{ "name": "Speaker", "props": {} },
|
|
21
|
+
{ "name": "Light card", "props": { "panel": "#ffffff", "textColor": "#0b0d10", "accent": "#f43f5e", "name": "Maya Chen", "title": "Head of Design" } },
|
|
22
|
+
{ "name": "Feature tag", "props": { "name": "Snaps workspace", "title": "Screenshots on the canvas", "position": "bottom-right", "accent": "#60a5fa" } }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
2
|
+
import { FONTS, easeOutExpo, exitOut, fill, mix, ramp, unit } from "../lib";
|
|
3
|
+
import type { MotionBaseProps } from "../types";
|
|
4
|
+
|
|
5
|
+
type Props = MotionBaseProps & {
|
|
6
|
+
rows: string[];
|
|
7
|
+
separator: string;
|
|
8
|
+
color: string;
|
|
9
|
+
accent: string;
|
|
10
|
+
background: string;
|
|
11
|
+
size: number;
|
|
12
|
+
font: string;
|
|
13
|
+
weight: string;
|
|
14
|
+
uppercase: boolean;
|
|
15
|
+
outline: boolean;
|
|
16
|
+
speed: number;
|
|
17
|
+
tilt: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Rows of big type scrolling in alternating directions, endlessly. Each row is its phrase repeated
|
|
22
|
+
* twice over; moving it by half its own width loops it seamlessly at any text length.
|
|
23
|
+
*/
|
|
24
|
+
export function Marquee(props: Props) {
|
|
25
|
+
const frame = useCurrentFrame();
|
|
26
|
+
const { width, height, fps, durationInFrames: d } = props;
|
|
27
|
+
const u = unit(width, height);
|
|
28
|
+
const vertical = height > width;
|
|
29
|
+
const fontSize = (props.size / 100) * Math.min(width, height) * (vertical ? 1.1 : 1);
|
|
30
|
+
const enter = ramp(frame, 0, 20, easeOutExpo);
|
|
31
|
+
const out = exitOut(frame, d, 12);
|
|
32
|
+
const rows = props.rows.length ? props.rows : [""];
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<AbsoluteFill style={{ background: fill(props.background), overflow: "hidden", opacity: out }}>
|
|
36
|
+
<AbsoluteFill
|
|
37
|
+
style={{
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
gap: fontSize * 0.12,
|
|
40
|
+
transform: `rotate(${props.tilt}deg) scale(${1 + Math.abs(props.tilt) * 0.025})`,
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
{rows.map((row, i) => {
|
|
44
|
+
const dir = i % 2 === 0 ? -1 : 1;
|
|
45
|
+
const outlined = props.outline && i % 2 === 1;
|
|
46
|
+
// Repeat the phrase enough times that half the row is wider than the (tilted) frame.
|
|
47
|
+
const phraseWidth = Math.max(1, (row.length + 3) * fontSize * 0.55);
|
|
48
|
+
const repeats = Math.max(2, Math.ceil((width * 1.8) / phraseWidth));
|
|
49
|
+
const phrase = Array.from({ length: repeats }, () => row);
|
|
50
|
+
// About a quarter of the frame width per second at 1×; the loop itself is exact (percent of the row).
|
|
51
|
+
const progress = (((frame / fps) * props.speed * width * 0.25) / (repeats * phraseWidth)) % 1;
|
|
52
|
+
const shift = dir < 0 ? -progress * 50 : -50 + progress * 50;
|
|
53
|
+
const rowIn = ramp(frame, i * 3, 22, easeOutExpo);
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
key={i}
|
|
57
|
+
style={{
|
|
58
|
+
display: "flex",
|
|
59
|
+
width: "max-content",
|
|
60
|
+
marginLeft: -width * 0.3,
|
|
61
|
+
whiteSpace: "nowrap",
|
|
62
|
+
fontFamily: FONTS[props.font] ?? FONTS.condensed,
|
|
63
|
+
fontWeight: Number(props.weight) || 800,
|
|
64
|
+
fontSize,
|
|
65
|
+
lineHeight: 1,
|
|
66
|
+
letterSpacing: "-0.01em",
|
|
67
|
+
textTransform: props.uppercase ? "uppercase" : undefined,
|
|
68
|
+
color: outlined ? "transparent" : props.color,
|
|
69
|
+
WebkitTextStrokeWidth: outlined ? Math.max(1.5, 2.5 * u) : undefined,
|
|
70
|
+
WebkitTextStrokeColor: outlined ? props.color : undefined,
|
|
71
|
+
transform: `translateX(${shift}%) translateX(${mix(dir * width * 0.15, 0, rowIn)}px)`,
|
|
72
|
+
opacity: enter * rowIn,
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
{[0, 1].map((half) => (
|
|
76
|
+
<span key={half} style={{ display: "flex" }}>
|
|
77
|
+
{phrase.map((text, k) => (
|
|
78
|
+
<span key={k} style={{ display: "flex", alignItems: "center" }}>
|
|
79
|
+
<span>{text}</span>
|
|
80
|
+
<span
|
|
81
|
+
style={{
|
|
82
|
+
color: props.accent,
|
|
83
|
+
WebkitTextStrokeWidth: 0,
|
|
84
|
+
margin: `0 ${fontSize * 0.3}px`,
|
|
85
|
+
fontSize: fontSize * 0.6,
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
{props.separator}
|
|
89
|
+
</span>
|
|
90
|
+
</span>
|
|
91
|
+
))}
|
|
92
|
+
</span>
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
})}
|
|
97
|
+
</AbsoluteFill>
|
|
98
|
+
</AbsoluteFill>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "marquee",
|
|
3
|
+
"name": "Marquee",
|
|
4
|
+
"category": "Backgrounds",
|
|
5
|
+
"description": "Rows of huge type scrolling endlessly in alternating directions, solid and outlined, with an optional tilt.",
|
|
6
|
+
"useWhen": "Energetic backdrops and breaks: behind a product shot or a speaker cut-out, a brand-name wall, a list of features or integrations streaming by, an end card. Works full screen or as a band (fewer rows, transparent background).",
|
|
7
|
+
"durationInFrames": 150,
|
|
8
|
+
"layer": "full",
|
|
9
|
+
"tags": ["marquee", "ticker", "scrolling text", "loop", "background", "big type", "brand"],
|
|
10
|
+
"props": {
|
|
11
|
+
"rows": { "type": "lines", "label": "Rows", "default": ["Record", "Edit", "Export", "Share"], "max": 8, "help": "One phrase per row; rows alternate direction." },
|
|
12
|
+
"separator": { "type": "text", "label": "Separator", "default": "✦", "maxLength": 3 },
|
|
13
|
+
"color": { "type": "color", "style": "text", "label": "Text", "default": "#ffffff" },
|
|
14
|
+
"accent": { "type": "color", "style": "accent", "label": "Separator color", "default": "#f97316" },
|
|
15
|
+
"background": { "type": "color", "style": "backdrop", "label": "Background", "default": "#0b0d10", "help": "\"transparent\" to sit over other layers." },
|
|
16
|
+
"size": { "type": "number", "label": "Size", "default": 20, "min": 5, "max": 40, "step": 0.5, "unit": "% of frame" },
|
|
17
|
+
"font": { "type": "select", "style": "font", "label": "Font", "default": "condensed", "options": [{ "value": "condensed", "label": "Anton" }, { "value": "wide", "label": "Unbounded" }, { "value": "sans", "label": "Inter" }, { "value": "display", "label": "Bricolage" }, { "value": "syne", "label": "Syne" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "fraunces", "label": "Fraunces" }, { "value": "serif", "label": "Instrument Serif" }, { "value": "mono", "label": "Mono" }, { "value": "archivo", "label": "Archivo Black" }, { "value": "caveat", "label": "Caveat" }, { "value": "pixel", "label": "VT323" }, { "value": "tech", "label": "Orbitron" }, { "value": "heavy", "label": "Montserrat" }, { "value": "retro", "label": "Bungee" }] },
|
|
18
|
+
"weight": { "type": "select", "style": "weight", "label": "Weight", "default": "400", "options": [{ "value": "400", "label": "Regular" }, { "value": "700", "label": "Bold" }, { "value": "800", "label": "Extra bold" }, { "value": "900", "label": "Black" }] },
|
|
19
|
+
"uppercase": { "type": "boolean", "label": "Uppercase", "default": true },
|
|
20
|
+
"outline": { "type": "boolean", "label": "Outline every other row", "default": true },
|
|
21
|
+
"speed": { "type": "number", "label": "Speed", "default": 1, "min": 0.1, "max": 4, "step": 0.1, "unit": "×" },
|
|
22
|
+
"tilt": { "type": "number", "label": "Tilt", "default": -6, "min": -20, "max": 20, "step": 1, "unit": "°" }
|
|
23
|
+
},
|
|
24
|
+
"examples": [
|
|
25
|
+
{ "name": "Tilted wall", "props": {} },
|
|
26
|
+
{ "name": "Single band", "props": { "rows": ["New in Agentcut"], "tilt": 0, "background": "transparent", "size": 12, "font": "wide", "weight": "800", "outline": false, "uppercase": false, "accent": "#a3e635" } },
|
|
27
|
+
{ "name": "Editorial", "props": { "rows": ["Launch", "Tutorial", "Demo"], "font": "serif", "uppercase": false, "background": "#f5f1e8", "color": "#1c1917", "accent": "#dc2626", "tilt": 0, "separator": "—" } }
|
|
28
|
+
],
|
|
29
|
+
"stillAt": 0.4
|
|
30
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { AbsoluteFill, spring, useCurrentFrame } from "remotion";
|
|
2
|
+
import { FONTS, blurStyle, exitOut, mix, onColor, ramp, unit } from "../lib";
|
|
3
|
+
import type { MotionBaseProps } from "../types";
|
|
4
|
+
|
|
5
|
+
type Props = MotionBaseProps & {
|
|
6
|
+
app: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
title: string;
|
|
9
|
+
message: string;
|
|
10
|
+
time: string;
|
|
11
|
+
accent: string;
|
|
12
|
+
theme: string;
|
|
13
|
+
position: string;
|
|
14
|
+
stack: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** A phone-style notification that drops in with a spring, with optional earlier ones stacked behind. */
|
|
18
|
+
export function Notification(props: Props) {
|
|
19
|
+
const frame = useCurrentFrame();
|
|
20
|
+
const { width, height, fps, durationInFrames: d } = props;
|
|
21
|
+
const u = unit(width, height);
|
|
22
|
+
const vertical = height > width;
|
|
23
|
+
const dark = props.theme === "dark";
|
|
24
|
+
const cardWidth = Math.min(width * (vertical ? 0.9 : 0.42), 980 * u * (vertical ? 1.15 : 1));
|
|
25
|
+
const s = cardWidth / 760;
|
|
26
|
+
const drop = spring({ frame, fps, config: { damping: 15, stiffness: 140, mass: 0.9 } });
|
|
27
|
+
const leave = 1 - exitOut(frame, d, 14);
|
|
28
|
+
const top = props.position === "top";
|
|
29
|
+
const fromY = top ? -260 * s : 120 * s;
|
|
30
|
+
const y = mix(fromY, 0, drop) + (top ? -leave * 300 * s : leave * 60 * s);
|
|
31
|
+
const stack = Math.round(props.stack);
|
|
32
|
+
const stackIn = ramp(frame, 10, 14);
|
|
33
|
+
const bg = dark ? "rgba(32, 33, 38, 0.94)" : "rgba(250, 250, 252, 0.96)";
|
|
34
|
+
const fg = dark ? "#f4f4f5" : "#111114";
|
|
35
|
+
const muted = dark ? "rgba(244,244,245,0.55)" : "rgba(17,17,20,0.5)";
|
|
36
|
+
const radius = 44 * s;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<AbsoluteFill
|
|
40
|
+
style={{
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
justifyContent: top ? "flex-start" : "center",
|
|
43
|
+
paddingTop: top ? (vertical ? 120 : 60) * u : 0,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
style={{
|
|
48
|
+
position: "relative",
|
|
49
|
+
width: cardWidth,
|
|
50
|
+
transform: `translateY(${y}px) scale(${mix(0.92, 1, drop)})`,
|
|
51
|
+
opacity: Math.min(1, drop * 1.5) * (1 - leave),
|
|
52
|
+
...blurStyle((1 - Math.min(1, drop)) * 12 * s + leave * 10 * s),
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{/* Older notifications peeking out underneath. */}
|
|
56
|
+
{Array.from({ length: stack }, (_, i) => (
|
|
57
|
+
<div
|
|
58
|
+
key={i}
|
|
59
|
+
style={{
|
|
60
|
+
position: "absolute",
|
|
61
|
+
left: (i + 1) * 26 * s,
|
|
62
|
+
right: (i + 1) * 26 * s,
|
|
63
|
+
bottom: -(i + 1) * 18 * s * stackIn,
|
|
64
|
+
height: 80 * s,
|
|
65
|
+
borderRadius: radius,
|
|
66
|
+
background: bg,
|
|
67
|
+
opacity: (0.7 - i * 0.25) * stackIn,
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
))}
|
|
71
|
+
<div
|
|
72
|
+
style={{
|
|
73
|
+
position: "relative",
|
|
74
|
+
display: "flex",
|
|
75
|
+
gap: 26 * s,
|
|
76
|
+
padding: `${28 * s}px ${32 * s}px`,
|
|
77
|
+
borderRadius: radius,
|
|
78
|
+
background: bg,
|
|
79
|
+
boxShadow: `0 ${24 * s}px ${70 * s}px rgba(0,0,0,${dark ? 0.5 : 0.25})`,
|
|
80
|
+
fontFamily: FONTS.sans,
|
|
81
|
+
color: fg,
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
style={{
|
|
86
|
+
flexShrink: 0,
|
|
87
|
+
width: 96 * s,
|
|
88
|
+
height: 96 * s,
|
|
89
|
+
borderRadius: 24 * s,
|
|
90
|
+
background: props.accent,
|
|
91
|
+
color: onColor(props.accent),
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
fontSize: 50 * s,
|
|
96
|
+
fontWeight: 800,
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
{props.icon}
|
|
100
|
+
</div>
|
|
101
|
+
<div style={{ flex: 1, minWidth: 0 }}>
|
|
102
|
+
<div style={{ display: "flex", alignItems: "baseline", gap: 12 * s }}>
|
|
103
|
+
<span style={{ fontSize: 25 * s, fontWeight: 600, letterSpacing: "0.04em", textTransform: "uppercase", color: muted }}>
|
|
104
|
+
{props.app}
|
|
105
|
+
</span>
|
|
106
|
+
<span style={{ marginLeft: "auto", fontSize: 25 * s, color: muted }}>{props.time}</span>
|
|
107
|
+
</div>
|
|
108
|
+
<div style={{ marginTop: 6 * s, fontSize: 33 * s, fontWeight: 700, lineHeight: 1.2 }}>{props.title}</div>
|
|
109
|
+
<div style={{ marginTop: 4 * s, fontSize: 31 * s, lineHeight: 1.3, color: fg, opacity: 0.85 }}>{props.message}</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</AbsoluteFill>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "notification",
|
|
3
|
+
"name": "Notification",
|
|
4
|
+
"category": "Overlays",
|
|
5
|
+
"description": "A phone-style notification that springs in from the top (or pops up in the middle), with optional earlier ones stacked behind it.",
|
|
6
|
+
"useWhen": "Showing an event happening: a sale, a signup, a new message, a deploy finishing, a payment, a review coming in. Stack a few in a row (staggered clips) for \"the notifications keep coming\".",
|
|
7
|
+
"durationInFrames": 90,
|
|
8
|
+
"layer": "overlay",
|
|
9
|
+
"tags": ["notification", "toast", "push", "ios", "alert", "message", "sale", "phone"],
|
|
10
|
+
"props": {
|
|
11
|
+
"app": { "type": "text", "label": "App", "default": "Stripe" },
|
|
12
|
+
"icon": { "type": "text", "label": "Icon", "default": "$", "maxLength": 2, "help": "A letter or emoji on the app icon." },
|
|
13
|
+
"title": { "type": "text", "label": "Title", "default": "New payment" },
|
|
14
|
+
"message": { "type": "text", "label": "Message", "default": "You received $49.00 from a new customer.", "multiline": true, "maxLength": 120 },
|
|
15
|
+
"time": { "type": "text", "label": "Time", "default": "now" },
|
|
16
|
+
"accent": { "type": "color", "style": "accent", "label": "Icon color", "default": "#635bff" },
|
|
17
|
+
"theme": { "type": "select", "style": "theme", "label": "Theme", "default": "light", "options": [{ "value": "light", "label": "Light" }, { "value": "dark", "label": "Dark" }] },
|
|
18
|
+
"position": { "type": "select", "label": "Position", "default": "top", "options": [{ "value": "top", "label": "Top" }, { "value": "center", "label": "Center" }] },
|
|
19
|
+
"stack": { "type": "number", "label": "Stacked behind", "default": 1, "min": 0, "max": 2, "step": 1 }
|
|
20
|
+
},
|
|
21
|
+
"examples": [
|
|
22
|
+
{ "name": "Payment", "props": {} },
|
|
23
|
+
{ "name": "Dark, centered", "props": { "app": "GitHub", "icon": "✓", "title": "Deploy succeeded", "message": "agentcut.synteq.app is live on production.", "accent": "#22c55e", "theme": "dark", "position": "center", "stack": 0 } },
|
|
24
|
+
{ "name": "Message", "props": { "app": "Messages", "icon": "💬", "title": "Sam", "message": "ok this video is insane 🔥", "accent": "#34c759", "stack": 2 } }
|
|
25
|
+
],
|
|
26
|
+
"stillAt": 0.5
|
|
27
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
3
|
+
import { FONTS, easeInOut, easeOutExpo, exitOut, fill, mix, ramp, unit } from "../lib";
|
|
4
|
+
import type { MotionBaseProps } from "../types";
|
|
5
|
+
|
|
6
|
+
type Props = MotionBaseProps & {
|
|
7
|
+
text: string;
|
|
8
|
+
color: string;
|
|
9
|
+
fillColor: string;
|
|
10
|
+
background: string;
|
|
11
|
+
size: number;
|
|
12
|
+
font: string;
|
|
13
|
+
weight: string;
|
|
14
|
+
uppercase: boolean;
|
|
15
|
+
stroke: number;
|
|
16
|
+
echo: boolean;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// Rough width of one character, in em, so the word always fits the frame.
|
|
20
|
+
const CHAR_WIDTH: Record<string, number> = { wide: 0.9, condensed: 0.46, serif: 0.5, syne: 0.72, mono: 0.62 };
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Giant outlined type that fills up from the bottom like liquid, with optional echo copies of the
|
|
24
|
+
* outline stacked above and below that drift apart. A poster look for a single word.
|
|
25
|
+
*/
|
|
26
|
+
export function OutlineFill(props: Props) {
|
|
27
|
+
const frame = useCurrentFrame();
|
|
28
|
+
const { width, height, durationInFrames: d } = props;
|
|
29
|
+
const u = unit(width, height);
|
|
30
|
+
const vertical = height > width;
|
|
31
|
+
const chars = Math.max(1, props.text.length);
|
|
32
|
+
const fontSize = Math.min(
|
|
33
|
+
(props.size / 100) * Math.min(width, height) * (vertical ? 1.2 : 1),
|
|
34
|
+
(width * 0.86) / (chars * (CHAR_WIDTH[props.font] ?? 0.66) * (props.uppercase ? 1.12 : 1)),
|
|
35
|
+
);
|
|
36
|
+
const strokeWidth = Math.max(1, props.stroke * u);
|
|
37
|
+
const enter = ramp(frame, 0, 24, easeOutExpo);
|
|
38
|
+
const fillT = ramp(frame, 14, Math.max(10, d * 0.3), easeInOut);
|
|
39
|
+
const spread = ramp(frame, 8, Math.max(12, d * 0.5), easeOutExpo);
|
|
40
|
+
const out = exitOut(frame, d, 14);
|
|
41
|
+
|
|
42
|
+
const word = (style: CSSProperties, key: string) => (
|
|
43
|
+
<div
|
|
44
|
+
key={key}
|
|
45
|
+
style={{
|
|
46
|
+
position: "absolute",
|
|
47
|
+
whiteSpace: "nowrap",
|
|
48
|
+
fontFamily: FONTS[props.font] ?? FONTS.wide,
|
|
49
|
+
fontWeight: Number(props.weight) || 800,
|
|
50
|
+
fontSize,
|
|
51
|
+
lineHeight: 1,
|
|
52
|
+
letterSpacing: `${mix(0.12, -0.02, enter)}em`,
|
|
53
|
+
textTransform: props.uppercase ? "uppercase" : undefined,
|
|
54
|
+
...style,
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
{props.text}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const outline: CSSProperties = { color: "transparent", WebkitTextStrokeWidth: strokeWidth, WebkitTextStrokeColor: props.color };
|
|
62
|
+
const echoes = props.echo ? [-2, -1, 1, 2] : [];
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<AbsoluteFill
|
|
66
|
+
style={{
|
|
67
|
+
background: fill(props.background),
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
overflow: "hidden",
|
|
71
|
+
opacity: out,
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
<AbsoluteFill
|
|
75
|
+
style={{
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
transform: `scale(${mix(1.25, 1, enter)})`,
|
|
79
|
+
opacity: enter,
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
{echoes.map((n) =>
|
|
83
|
+
word(
|
|
84
|
+
{
|
|
85
|
+
...outline,
|
|
86
|
+
opacity: (0.5 / Math.abs(n)) * spread,
|
|
87
|
+
transform: `translateY(${n * fontSize * 0.92 * spread}px)`,
|
|
88
|
+
},
|
|
89
|
+
`echo${n}`,
|
|
90
|
+
),
|
|
91
|
+
)}
|
|
92
|
+
{word(outline, "outline")}
|
|
93
|
+
{/* The fill: a solid copy clipped from the top, the clip line rising. */}
|
|
94
|
+
{word(
|
|
95
|
+
{
|
|
96
|
+
color: props.fillColor,
|
|
97
|
+
WebkitTextStrokeWidth: strokeWidth,
|
|
98
|
+
WebkitTextStrokeColor: props.fillColor,
|
|
99
|
+
clipPath: `inset(${((1 - fillT) * 100).toFixed(2)}% 0 0 0)`,
|
|
100
|
+
},
|
|
101
|
+
"fill",
|
|
102
|
+
)}
|
|
103
|
+
</AbsoluteFill>
|
|
104
|
+
</AbsoluteFill>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "outline-fill",
|
|
3
|
+
"name": "Outline Fill",
|
|
4
|
+
"category": "Text & Titles",
|
|
5
|
+
"description": "One giant outlined word that fills up with color from the bottom, with optional echo outlines spreading above and below.",
|
|
6
|
+
"useWhen": "A poster-style moment for one word: the product or brand name, a theme (\"FAST\", \"2026\"), the title card of a reel. Keep it to one short word; it sizes itself to the frame.",
|
|
7
|
+
"durationInFrames": 90,
|
|
8
|
+
"layer": "overlay",
|
|
9
|
+
"tags": ["outline", "stroke", "fill", "poster", "echo", "big type", "title"],
|
|
10
|
+
"props": {
|
|
11
|
+
"text": { "type": "text", "label": "Word", "default": "MOTION", "maxLength": 14 },
|
|
12
|
+
"color": { "type": "color", "label": "Outline", "default": "#ffffff" },
|
|
13
|
+
"fillColor": { "type": "color", "label": "Fill", "default": "#ffffff" },
|
|
14
|
+
"background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." },
|
|
15
|
+
"size": { "type": "number", "label": "Size", "default": 26, "min": 8, "max": 50, "step": 1, "unit": "% of frame", "help": "Largest size; long words shrink to fit." },
|
|
16
|
+
"font": { "type": "select", "label": "Font", "default": "wide", "options": [{ "value": "wide", "label": "Unbounded" }, { "value": "condensed", "label": "Anton" }, { "value": "sans", "label": "Inter" }, { "value": "display", "label": "Bricolage" }, { "value": "syne", "label": "Syne" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "fraunces", "label": "Fraunces" }, { "value": "serif", "label": "Instrument Serif" }] },
|
|
17
|
+
"weight": { "type": "select", "label": "Weight", "default": "800", "options": [{ "value": "400", "label": "Regular" }, { "value": "700", "label": "Bold" }, { "value": "800", "label": "Extra bold" }, { "value": "900", "label": "Black" }] },
|
|
18
|
+
"uppercase": { "type": "boolean", "label": "Uppercase", "default": true },
|
|
19
|
+
"stroke": { "type": "number", "label": "Outline width", "default": 3, "min": 1, "max": 10, "step": 0.5, "unit": "px" },
|
|
20
|
+
"echo": { "type": "boolean", "label": "Echo outlines", "default": true }
|
|
21
|
+
},
|
|
22
|
+
"examples": [
|
|
23
|
+
{ "name": "Echo stack", "props": {} },
|
|
24
|
+
{ "name": "Acid", "props": { "text": "2026", "fillColor": "#d9f99d", "color": "#d9f99d", "background": "#0b0d10", "font": "condensed", "weight": "400" } },
|
|
25
|
+
{ "name": "Clean", "props": { "text": "Studio", "uppercase": false, "echo": false, "font": "fraunces", "weight": "700", "fillColor": "#fb923c", "color": "#fed7aa" } }
|
|
26
|
+
],
|
|
27
|
+
"stillAt": 0.7
|
|
28
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { AbsoluteFill, Easing, interpolate, useCurrentFrame } from "remotion";
|
|
2
|
+
import type { MotionBaseProps } from "../types";
|
|
3
|
+
|
|
4
|
+
type Props = MotionBaseProps & {
|
|
5
|
+
color1: string;
|
|
6
|
+
color2: string;
|
|
7
|
+
color3: string;
|
|
8
|
+
panels: number;
|
|
9
|
+
direction: string;
|
|
10
|
+
angle: number;
|
|
11
|
+
streaks: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const glide = Easing.bezier(0.83, 0, 0.17, 1);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Stacked color panels sweep across the frame one after another (slanted, like a whip pan), the
|
|
18
|
+
* last one covering it at the midpoint, then all of them carry on out the other side.
|
|
19
|
+
* Center the clip on the cut.
|
|
20
|
+
*/
|
|
21
|
+
export function PanelSweep(props: Props) {
|
|
22
|
+
const frame = useCurrentFrame();
|
|
23
|
+
const { width, height, durationInFrames: d } = props;
|
|
24
|
+
const horizontal = props.direction === "left" || props.direction === "right";
|
|
25
|
+
const sign = props.direction === "left" || props.direction === "up" ? -1 : 1;
|
|
26
|
+
const span = horizontal ? width : height;
|
|
27
|
+
const cross = horizontal ? height : width;
|
|
28
|
+
const count = Math.round(props.panels);
|
|
29
|
+
const colors = [props.color1, props.color2, props.color3];
|
|
30
|
+
const skew = Math.tan((props.angle * Math.PI) / 180) * cross;
|
|
31
|
+
// Panels are wide enough to cover the frame plus the slant on both sides.
|
|
32
|
+
const size = span + Math.abs(skew) + 4;
|
|
33
|
+
const stagger = Math.max(1, (d * 0.16) / Math.max(1, count - 1));
|
|
34
|
+
const phase = Math.max(1, d / 2 - (count - 1) * stagger);
|
|
35
|
+
const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp", easing: glide } as const;
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<AbsoluteFill style={{ overflow: "hidden" }}>
|
|
39
|
+
{Array.from({ length: count }, (_, i) => {
|
|
40
|
+
// In: back panels first, the front one landing exactly at the midpoint.
|
|
41
|
+
// Out: the front one leaves first, uncovering the stack, the back one leaves at the end.
|
|
42
|
+
const inT = interpolate(frame, [i * stagger, i * stagger + phase], [0, 1], clamp);
|
|
43
|
+
const outStart = d / 2 + (count - 1 - i) * stagger;
|
|
44
|
+
const outT = interpolate(frame, [outStart, outStart + phase], [0, 1], clamp);
|
|
45
|
+
// -1: off the near side, 0: covering, +1: off the far side.
|
|
46
|
+
const pos = (inT + outT - 1) * ((span + size + Math.abs(skew)) / 2);
|
|
47
|
+
const offset = sign * pos;
|
|
48
|
+
const color = colors[i % colors.length];
|
|
49
|
+
const style = horizontal
|
|
50
|
+
? {
|
|
51
|
+
left: (span - size) / 2,
|
|
52
|
+
top: 0,
|
|
53
|
+
width: size,
|
|
54
|
+
height: cross,
|
|
55
|
+
transform: `translateX(${offset}px) skewX(${-props.angle * sign}deg)`,
|
|
56
|
+
}
|
|
57
|
+
: {
|
|
58
|
+
left: 0,
|
|
59
|
+
top: (span - size) / 2,
|
|
60
|
+
width: cross,
|
|
61
|
+
height: size,
|
|
62
|
+
transform: `translateY(${offset}px) skewY(${-props.angle * sign}deg)`,
|
|
63
|
+
};
|
|
64
|
+
return (
|
|
65
|
+
<div key={i} style={{ position: "absolute", background: color, ...style }}>
|
|
66
|
+
{props.streaks
|
|
67
|
+
? [0.2, 0.55, 0.8].map((at, k) => (
|
|
68
|
+
<div
|
|
69
|
+
key={k}
|
|
70
|
+
style={{
|
|
71
|
+
position: "absolute",
|
|
72
|
+
background: colors[(i + 1) % colors.length],
|
|
73
|
+
opacity: 0.5,
|
|
74
|
+
...(horizontal
|
|
75
|
+
? { top: `${at * 100}%`, height: Math.max(2, cross * 0.006), width: size * 0.35, [sign > 0 ? "left" : "right"]: -size * 0.3 }
|
|
76
|
+
: { left: `${at * 100}%`, width: Math.max(2, cross * 0.006), height: size * 0.35, [sign > 0 ? "top" : "bottom"]: -size * 0.3 }),
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
79
|
+
))
|
|
80
|
+
: null}
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
})}
|
|
84
|
+
</AbsoluteFill>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "panel-sweep",
|
|
3
|
+
"name": "Panel Sweep",
|
|
4
|
+
"category": "Transitions",
|
|
5
|
+
"description": "Slanted color panels sweep across one after another, the stack covering the frame at the midpoint, then peel off the other side.",
|
|
6
|
+
"useWhen": "Fast, branded cuts between scenes, like a whip pan in color: between features, before a title, on a beat drop. Use the brand colors. Put it on a track above both clips and center it on the cut (from = cut frame − half its length).",
|
|
7
|
+
"durationInFrames": 30,
|
|
8
|
+
"layer": "overlay",
|
|
9
|
+
"tags": ["transition", "wipe", "panels", "slide", "whip", "swipe", "brand"],
|
|
10
|
+
"props": {
|
|
11
|
+
"color1": { "type": "color", "label": "Back panel", "default": "#fde047" },
|
|
12
|
+
"color2": { "type": "color", "label": "Middle panel", "default": "#fb7185" },
|
|
13
|
+
"color3": { "type": "color", "label": "Front panel", "default": "#111111" },
|
|
14
|
+
"panels": { "type": "number", "label": "Panels", "default": 3, "min": 1, "max": 6, "step": 1 },
|
|
15
|
+
"direction": { "type": "select", "label": "Direction", "default": "right", "options": [{ "value": "right", "label": "Left to right" }, { "value": "left", "label": "Right to left" }, { "value": "down", "label": "Top to bottom" }, { "value": "up", "label": "Bottom to top" }] },
|
|
16
|
+
"angle": { "type": "number", "label": "Slant", "default": 14, "min": 0, "max": 35, "step": 1, "unit": "°" },
|
|
17
|
+
"streaks": { "type": "boolean", "label": "Speed lines", "default": false }
|
|
18
|
+
},
|
|
19
|
+
"examples": [
|
|
20
|
+
{ "name": "Pop", "props": {} },
|
|
21
|
+
{ "name": "Mono", "props": { "color1": "#3f3f46", "color2": "#a1a1aa", "color3": "#fafafa", "angle": 0, "direction": "up" } },
|
|
22
|
+
{ "name": "Brand streak", "props": { "color1": "#1d4ed8", "color2": "#60a5fa", "color3": "#0b1220", "streaks": true, "angle": 22 } }
|
|
23
|
+
],
|
|
24
|
+
"stillAt": 0.3
|
|
25
|
+
}
|