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.
Files changed (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -2
  3. package/dist/bridge.d.ts +45 -0
  4. package/dist/bridge.js +691 -0
  5. package/dist/bridge.js.map +1 -0
  6. package/dist/config.d.ts +13 -0
  7. package/dist/config.js +50 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +35 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/log.d.ts +1 -0
  13. package/dist/log.js +14 -0
  14. package/dist/log.js.map +1 -0
  15. package/dist/studio/agents/claude.d.ts +7 -0
  16. package/dist/studio/agents/claude.js +155 -0
  17. package/dist/studio/agents/claude.js.map +1 -0
  18. package/dist/studio/agents/codex.d.ts +4 -0
  19. package/dist/studio/agents/codex.js +169 -0
  20. package/dist/studio/agents/codex.js.map +1 -0
  21. package/dist/studio/agents/index.d.ts +8 -0
  22. package/dist/studio/agents/index.js +50 -0
  23. package/dist/studio/agents/index.js.map +1 -0
  24. package/dist/studio/agents/types.d.ts +131 -0
  25. package/dist/studio/agents/types.js +11 -0
  26. package/dist/studio/agents/types.js.map +1 -0
  27. package/dist/studio/bundler.d.ts +29 -0
  28. package/dist/studio/bundler.js +136 -0
  29. package/dist/studio/bundler.js.map +1 -0
  30. package/dist/studio/chat.d.ts +147 -0
  31. package/dist/studio/chat.js +681 -0
  32. package/dist/studio/chat.js.map +1 -0
  33. package/dist/studio/cli.d.ts +2 -0
  34. package/dist/studio/cli.js +194 -0
  35. package/dist/studio/cli.js.map +1 -0
  36. package/dist/studio/components.d.ts +4 -0
  37. package/dist/studio/components.js +36 -0
  38. package/dist/studio/components.js.map +1 -0
  39. package/dist/studio/host.d.ts +105 -0
  40. package/dist/studio/host.js +634 -0
  41. package/dist/studio/host.js.map +1 -0
  42. package/dist/studio/http.d.ts +21 -0
  43. package/dist/studio/http.js +240 -0
  44. package/dist/studio/http.js.map +1 -0
  45. package/dist/studio/music.d.ts +35 -0
  46. package/dist/studio/music.js +130 -0
  47. package/dist/studio/music.js.map +1 -0
  48. package/dist/studio/proc.d.ts +11 -0
  49. package/dist/studio/proc.js +69 -0
  50. package/dist/studio/proc.js.map +1 -0
  51. package/dist/studio/projects.d.ts +84 -0
  52. package/dist/studio/projects.js +369 -0
  53. package/dist/studio/projects.js.map +1 -0
  54. package/dist/studio/render.d.ts +24 -0
  55. package/dist/studio/render.js +197 -0
  56. package/dist/studio/render.js.map +1 -0
  57. package/dist/studio/reveal.d.ts +7 -0
  58. package/dist/studio/reveal.js +49 -0
  59. package/dist/studio/reveal.js.map +1 -0
  60. package/dist/studio/schema.d.ts +4152 -0
  61. package/dist/studio/schema.js +358 -0
  62. package/dist/studio/schema.js.map +1 -0
  63. package/dist/studio/tools.d.ts +2 -0
  64. package/dist/studio/tools.js +165 -0
  65. package/dist/studio/tools.js.map +1 -0
  66. package/dist/studio/voice.d.ts +150 -0
  67. package/dist/studio/voice.js +434 -0
  68. package/dist/studio/voice.js.map +1 -0
  69. package/dist/studio/workspace.d.ts +31 -0
  70. package/dist/studio/workspace.js +187 -0
  71. package/dist/studio/workspace.js.map +1 -0
  72. package/package.json +50 -4
  73. package/template/AGENTS.md +13 -0
  74. package/template/components/CATALOG.md +1306 -0
  75. package/template/components/README.md +61 -0
  76. package/template/components/STYLES.md +246 -0
  77. package/template/components/arcade-title/ArcadeTitle.tsx +860 -0
  78. package/template/components/arcade-title/meta.json +28 -0
  79. package/template/components/aurora/Aurora.tsx +63 -0
  80. package/template/components/aurora/meta.json +28 -0
  81. package/template/components/bar-wipe-title/BarWipeTitle.tsx +94 -0
  82. package/template/components/bar-wipe-title/meta.json +29 -0
  83. package/template/components/before-after/BeforeAfter.tsx +89 -0
  84. package/template/components/before-after/meta.json +233 -0
  85. package/template/components/bento-grid/BentoGrid.tsx +202 -0
  86. package/template/components/bento-grid/meta.json +25 -0
  87. package/template/components/blur-in-title/BlurInTitle.tsx +121 -0
  88. package/template/components/blur-in-title/meta.json +32 -0
  89. package/template/components/catalog.json +8730 -0
  90. package/template/components/catalog.ts +103 -0
  91. package/template/components/chat-thread/ChatThread.tsx +128 -0
  92. package/template/components/chat-thread/meta.json +24 -0
  93. package/template/components/checklist/Checklist.tsx +129 -0
  94. package/template/components/checklist/meta.json +25 -0
  95. package/template/components/confetti/Confetti.tsx +109 -0
  96. package/template/components/confetti/meta.json +28 -0
  97. package/template/components/countdown/Countdown.tsx +166 -0
  98. package/template/components/countdown/meta.json +28 -0
  99. package/template/components/cut-and-paste/CutAndPaste.tsx +654 -0
  100. package/template/components/cut-and-paste/meta.json +29 -0
  101. package/template/components/decode-text/DecodeText.tsx +97 -0
  102. package/template/components/decode-text/meta.json +29 -0
  103. package/template/components/editorial-quote/EditorialQuote.tsx +122 -0
  104. package/template/components/editorial-quote/meta.json +28 -0
  105. package/template/components/glitch-title/GlitchTitle.tsx +171 -0
  106. package/template/components/glitch-title/meta.json +32 -0
  107. package/template/components/halftone-wave/HalftoneWave.tsx +106 -0
  108. package/template/components/halftone-wave/meta.json +28 -0
  109. package/template/components/highlighter/Highlighter.tsx +142 -0
  110. package/template/components/highlighter/meta.json +28 -0
  111. package/template/components/hook-card/HookCard.tsx +552 -0
  112. package/template/components/hook-card/meta.json +304 -0
  113. package/template/components/index.ts +149 -0
  114. package/template/components/iris-wipe/IrisWipe.tsx +76 -0
  115. package/template/components/iris-wipe/meta.json +24 -0
  116. package/template/components/kinetic-poster/KineticPoster.tsx +437 -0
  117. package/template/components/kinetic-poster/meta.json +31 -0
  118. package/template/components/kinetic-punch/KineticPunch.tsx +80 -0
  119. package/template/components/kinetic-punch/meta.json +30 -0
  120. package/template/components/lava-lamp/LavaLamp.tsx +92 -0
  121. package/template/components/lava-lamp/meta.json +28 -0
  122. package/template/components/letter-cascade/LetterCascade.tsx +102 -0
  123. package/template/components/letter-cascade/meta.json +29 -0
  124. package/template/components/lib.ts +179 -0
  125. package/template/components/light-leak/LightLeakTransition.tsx +43 -0
  126. package/template/components/light-leak/meta.json +74 -0
  127. package/template/components/line-diagram/LineDiagram.tsx +205 -0
  128. package/template/components/line-diagram/meta.json +217 -0
  129. package/template/components/list-card/ListCard.tsx +104 -0
  130. package/template/components/list-card/meta.json +232 -0
  131. package/template/components/logo-sting/LogoSting.tsx +129 -0
  132. package/template/components/logo-sting/meta.json +29 -0
  133. package/template/components/looks.tsx +1447 -0
  134. package/template/components/lower-third/LowerThird.tsx +100 -0
  135. package/template/components/lower-third/meta.json +24 -0
  136. package/template/components/marquee/Marquee.tsx +100 -0
  137. package/template/components/marquee/meta.json +30 -0
  138. package/template/components/notification/Notification.tsx +115 -0
  139. package/template/components/notification/meta.json +27 -0
  140. package/template/components/outline-fill/OutlineFill.tsx +106 -0
  141. package/template/components/outline-fill/meta.json +28 -0
  142. package/template/components/panel-sweep/PanelSweep.tsx +86 -0
  143. package/template/components/panel-sweep/meta.json +25 -0
  144. package/template/components/prompt-box/PromptBox.tsx +131 -0
  145. package/template/components/prompt-box/meta.json +24 -0
  146. package/template/components/props.ts +73 -0
  147. package/template/components/quote-card/QuoteCard.tsx +71 -0
  148. package/template/components/quote-card/meta.json +216 -0
  149. package/template/components/shape-shift/ShapeShift.tsx +420 -0
  150. package/template/components/shape-shift/meta.json +31 -0
  151. package/template/components/slide-zoom-message/SlideZoomMessage.tsx +179 -0
  152. package/template/components/slide-zoom-message/meta.json +199 -0
  153. package/template/components/social-post/SocialPost.tsx +185 -0
  154. package/template/components/social-post/meta.json +30 -0
  155. package/template/components/split-flap/SplitFlap.tsx +191 -0
  156. package/template/components/split-flap/meta.json +29 -0
  157. package/template/components/spotlight-grid/SpotlightGrid.tsx +84 -0
  158. package/template/components/spotlight-grid/meta.json +25 -0
  159. package/template/components/stat-counter/StatCounter.tsx +117 -0
  160. package/template/components/stat-counter/meta.json +27 -0
  161. package/template/components/sticker-badge/StickerBadge.tsx +46 -0
  162. package/template/components/sticker-badge/meta.json +220 -0
  163. package/template/components/sticker-slam/StickerSlam.tsx +941 -0
  164. package/template/components/sticker-slam/meta.json +34 -0
  165. package/template/components/style-layer.tsx +233 -0
  166. package/template/components/styles.json +762 -0
  167. package/template/components/styles.ts +113 -0
  168. package/template/components/target-lock/TargetLock.tsx +662 -0
  169. package/template/components/target-lock/meta.json +32 -0
  170. package/template/components/text-reveal/TextReveal.tsx +99 -0
  171. package/template/components/text-reveal/meta.json +28 -0
  172. package/template/components/tile-wipe/TileWipe.tsx +75 -0
  173. package/template/components/tile-wipe/meta.json +24 -0
  174. package/template/components/type-zoom/TypeZoom.tsx +103 -0
  175. package/template/components/type-zoom/meta.json +27 -0
  176. package/template/components/types.ts +66 -0
  177. package/template/components/typewriter/Typewriter.tsx +112 -0
  178. package/template/components/typewriter/meta.json +29 -0
  179. package/template/components/word-pop/WordPop.tsx +59 -0
  180. package/template/components/word-pop/meta.json +237 -0
  181. package/template/components/word-stack/WordStack.tsx +122 -0
  182. package/template/components/word-stack/meta.json +27 -0
  183. package/template/components/word-swap/WordSwap.tsx +127 -0
  184. package/template/components/word-swap/meta.json +30 -0
  185. package/template/presets/charcoal-sketch/PROMPT.md +48 -0
  186. package/template/presets/charcoal-sketch/assets/paper/grain-0.png +0 -0
  187. package/template/presets/charcoal-sketch/assets/paper/grain-1.png +0 -0
  188. package/template/presets/charcoal-sketch/assets/paper/grain-2.png +0 -0
  189. package/template/presets/charcoal-sketch/assets/paper/sketch-paper.jpg +0 -0
  190. package/template/presets/charcoal-sketch/assets/paper/smudge.png +0 -0
  191. package/template/presets/charcoal-sketch/poster.jpg +0 -0
  192. package/template/presets/charcoal-sketch/preset.json +17 -0
  193. package/template/presets/charcoal-sketch/preview.mp4 +0 -0
  194. package/template/presets/charcoal-sketch/scenes/Grain.tsx +23 -0
  195. package/template/presets/charcoal-sketch/scenes/Paper.tsx +17 -0
  196. package/template/presets/charcoal-sketch/scenes/examples/Agents.tsx +100 -0
  197. package/template/presets/charcoal-sketch/scenes/examples/Approvals.tsx +110 -0
  198. package/template/presets/charcoal-sketch/scenes/examples/Blog.tsx +105 -0
  199. package/template/presets/charcoal-sketch/scenes/examples/EndCard.tsx +41 -0
  200. package/template/presets/charcoal-sketch/scenes/examples/Hook.tsx +130 -0
  201. package/template/presets/charcoal-sketch/scenes/examples/Ideas.tsx +92 -0
  202. package/template/presets/charcoal-sketch/scenes/examples/Posting.tsx +128 -0
  203. package/template/presets/charcoal-sketch/scenes/lib/painfix.tsx +119 -0
  204. package/template/presets/charcoal-sketch/scenes/lib/sketch.tsx +291 -0
  205. package/template/presets/charcoal-sketch/scripts/build_layers.example.py +193 -0
  206. package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -0
  207. package/template/presets/charcoal-sketch/scripts/make_textures.py +93 -0
  208. package/template/presets/punk-cut-paper/PROMPT.md +37 -0
  209. package/template/presets/punk-cut-paper/assets/paper/desk-cream.jpg +0 -0
  210. package/template/presets/punk-cut-paper/assets/paper/grain-overlay.png +0 -0
  211. package/template/presets/punk-cut-paper/assets/paper/halftone-black.png +0 -0
  212. package/template/presets/punk-cut-paper/assets/paper/halftone-red.png +0 -0
  213. package/template/presets/punk-cut-paper/assets/paper/halftone-yellow.png +0 -0
  214. package/template/presets/punk-cut-paper/assets/paper/kraft.jpg +0 -0
  215. package/template/presets/punk-cut-paper/assets/paper/newsprint.jpg +0 -0
  216. package/template/presets/punk-cut-paper/assets/paper/paper-cream.jpg +0 -0
  217. package/template/presets/punk-cut-paper/assets/paper/paper-white.jpg +0 -0
  218. package/template/presets/punk-cut-paper/assets/paper/tape.png +0 -0
  219. package/template/presets/punk-cut-paper/build_layers.example.py +150 -0
  220. package/template/presets/punk-cut-paper/poster.jpg +0 -0
  221. package/template/presets/punk-cut-paper/preset.json +15 -0
  222. package/template/presets/punk-cut-paper/preview.mp4 +0 -0
  223. package/template/presets/punk-cut-paper/scenes/Backdrop.tsx +76 -0
  224. package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -0
  225. package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -0
  226. package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -0
  227. package/template/presets/punk-cut-paper/scenes/Xerox.tsx +31 -0
  228. package/template/presets/punk-cut-paper/scenes/lib/punk.tsx +208 -0
  229. package/template/runtime/composition.tsx +918 -0
  230. package/template/runtime/helpers.tsx +228 -0
  231. package/template/runtime/index.tsx +22 -0
  232. package/template/runtime/types.ts +248 -0
  233. package/template/skill/SKILL.md +149 -0
  234. package/template/skill/references/browser-export.md +61 -0
  235. package/template/skill/references/components.md +38 -0
  236. package/template/skill/references/craft.md +53 -0
  237. package/template/skill/references/cursor.md +91 -0
  238. package/template/skill/references/footage.md +73 -0
  239. package/template/skill/references/format.md +140 -0
  240. package/template/skill/references/presets.md +56 -0
  241. package/template/skill/references/sound.md +128 -0
  242. package/template/starter/.studio/chat.json +1 -0
  243. package/template/starter/assets/.keep +0 -0
  244. package/template/starter/layers.json +46 -0
  245. package/template/starter/notes.md +4 -0
  246. package/template/starter/project.json +13 -0
  247. package/template/starter/renders/.keep +0 -0
  248. package/template/starter/scenes/Title.tsx +38 -0
@@ -0,0 +1,29 @@
1
+ {
2
+ "id": "cut-and-paste",
3
+ "name": "Cut & Paste",
4
+ "category": "Text & Titles",
5
+ "description": "A stop-motion cut-paper collage: torn color blocks, a constructivist wedge, a halftone sun and cut-outs get slapped onto newsprint by hand, then the headline lands as ransom-note scraps with a pointing hand, a speech bubble and scribbles.",
6
+ "useWhen": "Loud, crafty, retro moments: music and streetwear drops, event posters, a zine-style title card, an announcement that should feel handmade rather than slick. Pass your own photos in images to cut them in as paper scraps.",
7
+ "durationInFrames": 120,
8
+ "layer": "full",
9
+ "tags": ["collage", "cut paper", "ransom note", "zine", "stop motion", "halftone", "constructivist", "retro", "poster", "streetwear", "music"],
10
+ "props": {
11
+ "headline": { "type": "lines", "label": "Headline", "default": ["Cut it", "*LOUD*"], "max": 4, "help": "One to four short lines. *Starred* words are cut letter by letter." },
12
+ "kicker": { "type": "text", "label": "Kicker", "default": "Vol. 03 · Out now", "help": "Taped above the headline. Leave empty for none." },
13
+ "bubble": { "type": "text", "label": "Speech bubble", "default": "Wow!", "maxLength": 10, "help": "Leave empty to hide the bubble." },
14
+ "paper": { "type": "color", "label": "Paper", "default": "#ece2cc" },
15
+ "ink": { "type": "color", "label": "Ink", "default": "#1b1714" },
16
+ "accent": { "type": "color", "label": "Accent", "default": "#e2402b" },
17
+ "accent2": { "type": "color", "label": "Second accent", "default": "#f2b92f" },
18
+ "rate": { "type": "number", "label": "Frame rate", "default": 12, "min": 6, "max": 15, "step": 1, "unit": "fps", "help": "Drawings per second: lower feels more hand-animated." },
19
+ "jitter": { "type": "number", "label": "Hand jitter", "default": 2, "min": 0, "max": 6, "step": 0.5, "unit": "px", "help": "How much pieces shift between drawings." },
20
+ "images": { "type": "lines", "label": "Images", "default": [], "max": 3, "help": "Up to 3 image URLs cut in as photo scraps (must allow cross-origin loading)." },
21
+ "seed": { "type": "number", "label": "Shuffle", "default": 3, "min": 0, "max": 999, "step": 1, "help": "Another mix of fonts, scraps and tilts." }
22
+ },
23
+ "examples": [
24
+ { "name": "Poster", "props": {} },
25
+ { "name": "Blue riot", "props": { "headline": ["The *NEW* sound", "of Friday"], "kicker": "Live at Hall 4", "bubble": "Yeah!", "paper": "#e9e4d8", "accent": "#2f5bd3", "accent2": "#ff5a36", "rate": 8, "seed": 21 } },
26
+ { "name": "Launch zine", "props": { "headline": ["Made by hand.", "Shipped *FAST*"], "kicker": "agentcut", "bubble": "", "paper": "#f1ead9", "ink": "#121212", "accent": "#ff3d7f", "accent2": "#3dd6b5", "jitter": 1, "seed": 9 } }
27
+ ],
28
+ "stillAt": 0.7
29
+ }
@@ -0,0 +1,97 @@
1
+ import { AbsoluteFill, random, useCurrentFrame } from "remotion";
2
+ import { FONTS, exitOut, fill, splitHighlights, unit } from "../lib";
3
+ import type { MotionBaseProps } from "../types";
4
+
5
+ type Props = MotionBaseProps & {
6
+ lines: string[];
7
+ glyphs: string;
8
+ color: string;
9
+ accent: string;
10
+ background: string;
11
+ size: number;
12
+ weight: string;
13
+ font: string;
14
+ align: string;
15
+ speed: number;
16
+ seed: number;
17
+ };
18
+
19
+ const GLYPHS: Record<string, string> = {
20
+ symbols: "!<>-_\\/[]{}=+*^?#%&$@",
21
+ binary: "01",
22
+ letters: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
23
+ katakana: "アイウエオカキクケコサシスセソタチツテトナニヌネノ",
24
+ };
25
+
26
+ /** The decoder: text scrambles through random glyphs and locks in letter by letter, left to right. */
27
+ export function DecodeText(props: Props) {
28
+ const frame = useCurrentFrame();
29
+ const { width, height, fps, durationInFrames: d } = props;
30
+ const u = unit(width, height);
31
+ const vertical = height > width;
32
+ const fontSize = (props.size / 100) * Math.min(width, height) * (vertical ? 1.1 : 1);
33
+ const out = exitOut(frame, d, 10);
34
+ const pool = GLYPHS[props.glyphs] ?? GLYPHS.symbols;
35
+ const justify = props.align === "left" ? "flex-start" : "center";
36
+ // Glyphs change every 2 frames (every frame looks like noise, not decoding).
37
+ const tick = Math.floor(frame / 2);
38
+ // Scramble starts appearing ahead of the locked letters (a wave front).
39
+ const lead = 8;
40
+ let index = 0;
41
+
42
+ return (
43
+ <AbsoluteFill
44
+ style={{
45
+ background: fill(props.background),
46
+ alignItems: justify,
47
+ justifyContent: "center",
48
+ padding: `0 ${Math.round((vertical ? 60 : 120) * u)}px`,
49
+ opacity: out,
50
+ }}
51
+ >
52
+ <div
53
+ style={{
54
+ display: "flex",
55
+ flexDirection: "column",
56
+ alignItems: justify,
57
+ fontFamily: FONTS[props.font] ?? FONTS.mono,
58
+ fontWeight: Number(props.weight) || 600,
59
+ fontSize,
60
+ lineHeight: 1.15,
61
+ letterSpacing: "0.02em",
62
+ }}
63
+ >
64
+ {props.lines.map((line, lineIndex) => (
65
+ <div key={lineIndex} style={{ display: "flex", flexWrap: "wrap", justifyContent: justify, whiteSpace: "pre" }}>
66
+ {splitHighlights(line).map((word, wordIndex) => (
67
+ <span key={wordIndex} style={{ whiteSpace: "pre" }}>
68
+ {wordIndex > 0 ? " " : ""}
69
+ {Array.from(word.text).map((char, charIndex) => {
70
+ const i = index++;
71
+ const lockAt = 6 + (i * fps) / props.speed;
72
+ const appearAt = lockAt - lead;
73
+ if (frame < appearAt) return <span key={charIndex} style={{ opacity: 0 }}>{char}</span>;
74
+ const locked = frame >= lockAt;
75
+ const glyph = locked
76
+ ? char
77
+ : pool[Math.floor(random(`${props.seed}-${i}-${tick}`) * pool.length)];
78
+ return (
79
+ <span
80
+ key={charIndex}
81
+ style={{
82
+ color: locked ? (word.highlighted ? props.accent : props.color) : props.accent,
83
+ opacity: locked ? 1 : 0.55 + 0.45 * random(`o${props.seed}-${i}-${tick}`),
84
+ }}
85
+ >
86
+ {glyph}
87
+ </span>
88
+ );
89
+ })}
90
+ </span>
91
+ ))}
92
+ </div>
93
+ ))}
94
+ </div>
95
+ </AbsoluteFill>
96
+ );
97
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "id": "decode-text",
3
+ "name": "Decode Text",
4
+ "category": "Text & Titles",
5
+ "description": "Text scrambles through random glyphs and locks in letter by letter, like a message being decrypted.",
6
+ "useWhen": "Tech, AI, security and developer moments: a model name, \"Access granted\", a reveal of a feature or a secret, a glitchy title. Monospace keeps the line steady while it scrambles.",
7
+ "durationInFrames": 90,
8
+ "layer": "overlay",
9
+ "tags": ["decode", "scramble", "hacker", "glitch", "terminal", "ai", "matrix", "tech"],
10
+ "props": {
11
+ "lines": { "type": "lines", "label": "Text", "default": ["Decoding the *future*"], "max": 4, "help": "One line per row. *Starred* words lock into the accent." },
12
+ "glyphs": { "type": "select", "label": "Glyphs", "default": "symbols", "options": [{ "value": "symbols", "label": "Symbols" }, { "value": "letters", "label": "Letters" }, { "value": "binary", "label": "Binary" }, { "value": "katakana", "label": "Katakana" }] },
13
+ "color": { "type": "color", "label": "Text", "default": "#ffffff" },
14
+ "accent": { "type": "color", "label": "Accent", "default": "#22d3ee", "help": "Scrambling glyphs and starred words." },
15
+ "background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." },
16
+ "size": { "type": "number", "label": "Size", "default": 7.5, "min": 3, "max": 18, "step": 0.5, "unit": "% of frame" },
17
+ "weight": { "type": "select", "label": "Weight", "default": "600", "options": [{ "value": "400", "label": "Regular" }, { "value": "600", "label": "Semibold" }, { "value": "700", "label": "Bold" }] },
18
+ "font": { "type": "select", "label": "Font", "default": "mono", "options": [{ "value": "mono", "label": "Mono" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "wide", "label": "Unbounded" }, { "value": "sans", "label": "Inter" }] },
19
+ "align": { "type": "select", "label": "Align", "default": "center", "options": [{ "value": "left", "label": "Left" }, { "value": "center", "label": "Center" }] },
20
+ "speed": { "type": "number", "label": "Speed", "default": 30, "min": 4, "max": 120, "step": 1, "unit": "letters/s" },
21
+ "seed": { "type": "number", "label": "Pattern", "default": 1, "min": 0, "max": 99, "step": 1 }
22
+ },
23
+ "examples": [
24
+ { "name": "Decrypt", "props": {} },
25
+ { "name": "Access granted", "props": { "lines": ["ACCESS", "*GRANTED*"], "glyphs": "binary", "accent": "#4ade80", "background": "#050805", "size": 10 } },
26
+ { "name": "Neo Tokyo", "props": { "lines": ["*Hello*, operator"], "glyphs": "katakana", "accent": "#f472b6", "font": "grotesk", "weight": "700" } }
27
+ ],
28
+ "stillAt": 0.85
29
+ }
@@ -0,0 +1,122 @@
1
+ import { AbsoluteFill, useCurrentFrame } from "remotion";
2
+ import { FONTS, blurStyle, easeOutExpo, exitOut, fill, mix, ramp, splitHighlights, unit } from "../lib";
3
+ import type { MotionBaseProps } from "../types";
4
+
5
+ type Props = MotionBaseProps & {
6
+ quote: string[];
7
+ author: string;
8
+ role: string;
9
+ color: string;
10
+ accent: string;
11
+ background: string;
12
+ size: number;
13
+ font: string;
14
+ italic: boolean;
15
+ marks: boolean;
16
+ };
17
+
18
+ /** A magazine pull quote: big serif lines drift up out of a blur, then the attribution draws in. */
19
+ export function EditorialQuote(props: Props) {
20
+ const frame = useCurrentFrame();
21
+ const { width, height, durationInFrames: d } = props;
22
+ const u = unit(width, height);
23
+ const vertical = height > width;
24
+ const fontSize = (props.size / 100) * Math.min(width, height) * (vertical ? 1.05 : 1);
25
+ const out = exitOut(frame, d, 18);
26
+ const markIn = ramp(frame, 0, 26, easeOutExpo);
27
+ const lineDelay = 9;
28
+ const afterLines = 10 + props.quote.length * lineDelay;
29
+ const rule = ramp(frame, afterLines, 18, easeOutExpo);
30
+ const byIn = ramp(frame, afterLines + 6, 18, easeOutExpo);
31
+
32
+ return (
33
+ <AbsoluteFill
34
+ style={{
35
+ background: fill(props.background),
36
+ justifyContent: "center",
37
+ padding: `0 ${Math.round((vertical ? 80 : 200) * u)}px`,
38
+ opacity: out,
39
+ filter: out < 0.98 ? `blur(${((1 - out) * 10 * u).toFixed(2)}px)` : undefined,
40
+ }}
41
+ >
42
+ <div style={{ position: "relative" }}>
43
+ {props.marks ? (
44
+ <div
45
+ style={{
46
+ position: "absolute",
47
+ left: -fontSize * 0.1,
48
+ top: -fontSize * 1.1,
49
+ fontFamily: FONTS.serif,
50
+ fontSize: fontSize * 2.6,
51
+ lineHeight: 1,
52
+ color: props.accent,
53
+ opacity: markIn * 0.9,
54
+ transform: `translateY(${mix(fontSize * 0.4, 0, markIn)}px)`,
55
+ }}
56
+ >
57
+ “
58
+ </div>
59
+ ) : null}
60
+ <div
61
+ style={{
62
+ fontFamily: FONTS[props.font] ?? FONTS.serif,
63
+ fontStyle: props.italic ? "italic" : undefined,
64
+ fontWeight: 400,
65
+ fontSize,
66
+ lineHeight: 1.12,
67
+ letterSpacing: "-0.015em",
68
+ color: props.color,
69
+ }}
70
+ >
71
+ {props.quote.map((line, i) => {
72
+ const t = ramp(frame, 8 + i * lineDelay, 30, easeOutExpo);
73
+ return (
74
+ <div
75
+ key={i}
76
+ style={{
77
+ display: "flex",
78
+ flexWrap: "wrap",
79
+ columnGap: fontSize * 0.25,
80
+ opacity: t,
81
+ transform: `translateY(${mix(fontSize * 0.45, 0, t)}px)`,
82
+ ...blurStyle((1 - t) * fontSize * 0.12),
83
+ }}
84
+ >
85
+ {splitHighlights(line).map((word, j) => (
86
+ <span key={j} style={{ color: word.highlighted ? props.accent : undefined }}>
87
+ {word.text}
88
+ </span>
89
+ ))}
90
+ </div>
91
+ );
92
+ })}
93
+ </div>
94
+ {props.author ? (
95
+ <div style={{ display: "flex", alignItems: "center", gap: 24 * u, marginTop: fontSize * 0.7 }}>
96
+ <div style={{ width: 90 * u * rule, height: Math.max(2, 3 * u), background: props.accent }} />
97
+ <div style={{ opacity: byIn, transform: `translateX(${mix(-20 * u, 0, byIn)}px)` }}>
98
+ <div style={{ fontFamily: FONTS.sans, fontWeight: 600, fontSize: Math.max(16, fontSize * 0.42), color: props.color }}>
99
+ {props.author}
100
+ </div>
101
+ {props.role ? (
102
+ <div
103
+ style={{
104
+ fontFamily: FONTS.mono,
105
+ fontSize: Math.max(12, fontSize * 0.26),
106
+ letterSpacing: "0.14em",
107
+ textTransform: "uppercase",
108
+ color: props.color,
109
+ opacity: 0.6,
110
+ marginTop: 6 * u,
111
+ }}
112
+ >
113
+ {props.role}
114
+ </div>
115
+ ) : null}
116
+ </div>
117
+ </div>
118
+ ) : null}
119
+ </div>
120
+ </AbsoluteFill>
121
+ );
122
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "id": "editorial-quote",
3
+ "name": "Editorial Quote",
4
+ "category": "Text & Titles",
5
+ "description": "A magazine-style pull quote: large serif lines drift up out of a soft blur, then the author's name draws in under a rule.",
6
+ "useWhen": "Testimonials, a customer or press quote, a founder's line, a manifesto sentence. Give it time to be read: about 1 second per 4 words, plus 1.5 seconds.",
7
+ "durationInFrames": 150,
8
+ "layer": "overlay",
9
+ "tags": ["quote", "testimonial", "serif", "editorial", "magazine", "review", "blur"],
10
+ "props": {
11
+ "quote": { "type": "lines", "label": "Quote", "default": ["The fastest way I've found", "to make a demo look *expensive*."], "max": 5, "help": "One line per row. *Starred* words use the accent." },
12
+ "author": { "type": "text", "label": "Author", "default": "Maya Chen" },
13
+ "role": { "type": "text", "label": "Role", "default": "Founder, Northwind" },
14
+ "color": { "type": "color", "style": "text", "label": "Text", "default": "#f5f5f4" },
15
+ "accent": { "type": "color", "style": "accent", "label": "Accent", "default": "#fbbf24" },
16
+ "background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." },
17
+ "size": { "type": "number", "label": "Size", "default": 8, "min": 3, "max": 14, "step": 0.5, "unit": "% of frame" },
18
+ "font": { "type": "select", "style": "font", "label": "Font", "default": "serif", "options": [{ "value": "serif", "label": "Instrument Serif" }, { "value": "fraunces", "label": "Fraunces" }, { "value": "sans", "label": "Inter" }, { "value": "display", "label": "Bricolage" }, { "value": "grotesk", "label": "Space Grotesk" }, { "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" }] },
19
+ "italic": { "type": "boolean", "label": "Italic", "default": false },
20
+ "marks": { "type": "boolean", "label": "Quote mark", "default": true }
21
+ },
22
+ "examples": [
23
+ { "name": "Testimonial", "props": {} },
24
+ { "name": "Italic on cream", "props": { "quote": ["Good design is", "as little design", "as *possible*."], "author": "Dieter Rams", "role": "", "italic": true, "color": "#1c1917", "accent": "#b91c1c", "background": "#f5f1e8", "size": 8 } },
25
+ { "name": "Fraunces", "props": { "font": "fraunces", "accent": "#a78bfa", "background": "#0f0a1f" } }
26
+ ],
27
+ "stillAt": 0.7
28
+ }
@@ -0,0 +1,171 @@
1
+ import { useId, type CSSProperties } from "react";
2
+ import { AbsoluteFill, random, useCurrentFrame } from "remotion";
3
+ import { FONTS, exitOut, fill, mix, ramp, splitHighlights, unit } from "../lib";
4
+ import type { MotionBaseProps } from "../types";
5
+
6
+ type Props = MotionBaseProps & {
7
+ lines: string[];
8
+ color: string;
9
+ accent: string;
10
+ splitLeft: string;
11
+ splitRight: string;
12
+ background: string;
13
+ size: number;
14
+ font: string;
15
+ weight: string;
16
+ uppercase: boolean;
17
+ intensity: number;
18
+ bursts: number;
19
+ scanlines: boolean;
20
+ seed: number;
21
+ };
22
+
23
+ const SLICES = 7;
24
+
25
+ /**
26
+ * A glitch title: the text arrives torn into horizontal slices with red and cyan copies split off
27
+ * it, flickers, snaps clean, then catches small glitch bursts every so often while it holds.
28
+ */
29
+ export function GlitchTitle(props: Props) {
30
+ const frame = useCurrentFrame();
31
+ const { width, height, fps, durationInFrames: d } = props;
32
+ const u = unit(width, height);
33
+ const id = `gl${useId().replace(/[^a-zA-Z0-9]/g, "")}`;
34
+ const vertical = height > width;
35
+ const fontSize = (props.size / 100) * Math.min(width, height) * (vertical ? 1.1 : 1);
36
+ const out = exitOut(frame, d, 10);
37
+ const strength = props.intensity / 100;
38
+ // Glitch values change every 2 frames: every frame reads as noise, slower reads as a stutter.
39
+ const tick = Math.floor(frame / 2);
40
+ const r = (k: string) => random(`${props.seed}-${tick}-${k}`);
41
+
42
+ // How torn the text is (0 clean → 1 fully torn): high on entry, then short bursts while it holds,
43
+ // and a last tear as it leaves.
44
+ const entry = 1 - ramp(frame, 4, 20);
45
+ let burst = 0;
46
+ if (props.bursts > 0) {
47
+ const every = Math.max(8, Math.round(fps / props.bursts));
48
+ const local = frame - 30;
49
+ if (local >= 0) {
50
+ const phase = local % every;
51
+ const n = Math.floor(local / every);
52
+ const len = 3 + Math.floor(random(`len${props.seed}-${n}`) * 5);
53
+ if (phase < len) burst = 0.35 + 0.35 * random(`amt${props.seed}-${n}`);
54
+ }
55
+ }
56
+ const leave = ramp(frame, d - 12, 8);
57
+ const tear = Math.min(1, Math.max(entry, burst, leave)) * strength;
58
+ // Entry flicker: the text blinks a few times before it holds.
59
+ const visible = frame < 3 ? 0 : frame < 14 ? (r("blink") > 0.28 ? 1 : 0.15) : 1;
60
+
61
+ const split = tear * fontSize * 0.09 * (0.6 + 0.8 * r("split"));
62
+ const jitterX = tear > 0.05 ? (r("jx") - 0.5) * fontSize * 0.12 * tear : 0;
63
+ const jitterY = tear > 0.05 ? (r("jy") - 0.5) * fontSize * 0.04 * tear : 0;
64
+
65
+ const textStyle: CSSProperties = {
66
+ fontFamily: FONTS[props.font] ?? FONTS.condensed,
67
+ fontWeight: Number(props.weight) || 400,
68
+ fontSize,
69
+ lineHeight: 1.02,
70
+ letterSpacing: props.font === "condensed" ? "0.01em" : "-0.02em",
71
+ textTransform: props.uppercase ? "uppercase" : undefined,
72
+ textAlign: "center",
73
+ whiteSpace: "nowrap",
74
+ };
75
+
76
+ const text = (tint?: string) => (
77
+ <div style={{ ...textStyle, color: tint ?? props.color }}>
78
+ {props.lines.map((line, i) => (
79
+ <div key={i}>
80
+ {splitHighlights(line).map((word, w) => (
81
+ <span key={w} style={{ color: tint ?? (word.highlighted ? props.accent : props.color) }}>
82
+ {w > 0 ? " " : ""}
83
+ {word.text}
84
+ </span>
85
+ ))}
86
+ </div>
87
+ ))}
88
+ </div>
89
+ );
90
+
91
+ // The torn layer: the text cut into horizontal bands, each pushed sideways by its own amount.
92
+ const torn = (tint: string | undefined, dx: number, key: string) => {
93
+ if (tear < 0.04)
94
+ return (
95
+ <div key={key} style={{ position: dx === 0 ? "relative" : "absolute", inset: 0, transform: `translateX(${dx}px)` }}>
96
+ {text(tint)}
97
+ </div>
98
+ );
99
+ return Array.from({ length: SLICES }, (_, s) => {
100
+ const top = (s / SLICES) * 100;
101
+ const bottom = 100 - ((s + 1) / SLICES) * 100;
102
+ const shift = r(`s${s}`) > 0.45 ? (r(`sx${s}`) - 0.5) * fontSize * 0.7 * tear : 0;
103
+ return (
104
+ <div
105
+ key={`${key}${s}`}
106
+ style={{
107
+ position: s === 0 && dx === 0 ? "relative" : "absolute",
108
+ inset: 0,
109
+ clipPath: `inset(${top}% 0 ${bottom}% 0)`,
110
+ transform: `translateX(${dx + shift}px)`,
111
+ }}
112
+ >
113
+ {text(tint)}
114
+ </div>
115
+ );
116
+ });
117
+ };
118
+
119
+ return (
120
+ <AbsoluteFill
121
+ style={{
122
+ background: fill(props.background),
123
+ alignItems: "center",
124
+ justifyContent: "center",
125
+ padding: `0 ${Math.round((vertical ? 50 : 100) * u)}px`,
126
+ opacity: out,
127
+ }}
128
+ >
129
+ <div
130
+ style={{
131
+ position: "relative",
132
+ opacity: visible,
133
+ transform: `translate(${jitterX}px, ${jitterY}px) scale(${mix(1.06, 1, ramp(frame, 0, 18))})`,
134
+ }}
135
+ >
136
+ {split > 0.5 ? (
137
+ <>
138
+ <div style={{ position: "absolute", inset: 0, opacity: 0.85 }}>{torn(props.splitLeft, -split, "l")}</div>
139
+ <div style={{ position: "absolute", inset: 0, opacity: 0.85 }}>{torn(props.splitRight, split, "r")}</div>
140
+ </>
141
+ ) : null}
142
+ <div style={{ position: "relative" }}>{torn(undefined, 0, "m")}</div>
143
+ {/* A bright bar that flashes across a slice during a tear. */}
144
+ {tear > 0.2 && r("bar") > 0.4 ? (
145
+ <div
146
+ style={{
147
+ position: "absolute",
148
+ left: "-6%",
149
+ right: "-6%",
150
+ top: `${r("bary") * 90}%`,
151
+ height: Math.max(2, fontSize * 0.05 * (0.5 + r("barh"))),
152
+ background: r("barc") > 0.5 ? props.splitRight : props.accent,
153
+ opacity: 0.7,
154
+ transform: `translateX(${(r("barx") - 0.5) * fontSize}px)`,
155
+ }}
156
+ />
157
+ ) : null}
158
+ </div>
159
+ {props.scanlines ? (
160
+ <svg width={width} height={height} style={{ position: "absolute", inset: 0 }}>
161
+ <defs>
162
+ <pattern id={`${id}-scan`} width={4} height={Math.max(3, Math.round(4 * u))} patternUnits="userSpaceOnUse">
163
+ <rect width={4} height={Math.max(1, Math.round(1.5 * u))} fill="#000000" opacity={0.28} />
164
+ </pattern>
165
+ </defs>
166
+ <rect width={width} height={height} fill={`url(#${id}-scan)`} />
167
+ </svg>
168
+ ) : null}
169
+ </AbsoluteFill>
170
+ );
171
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "id": "glitch-title",
3
+ "name": "Glitch Title",
4
+ "category": "Text & Titles",
5
+ "description": "A title that arrives torn into shifting slices with red and cyan copies split off it, snaps clean, then catches small glitch bursts while it holds.",
6
+ "useWhen": "Edgy, tech and gaming moments: a launch name, \"System online\", a hacked or broken-screen beat, a drop in a music video, a hook that should feel like a signal cutting in. Turn bursts to 0 for a single entry glitch.",
7
+ "durationInFrames": 90,
8
+ "layer": "overlay",
9
+ "tags": ["glitch", "rgb split", "chromatic", "distortion", "tech", "gaming", "cyberpunk", "vhs", "error"],
10
+ "props": {
11
+ "lines": { "type": "lines", "label": "Text", "default": ["System *online*"], "max": 2, "help": "One or two lines. *Starred* words take the accent." },
12
+ "color": { "type": "color", "label": "Text", "default": "#ffffff" },
13
+ "accent": { "type": "color", "label": "Accent", "default": "#a3e635", "help": "Starred words and the flash bars." },
14
+ "splitLeft": { "type": "color", "label": "Split left", "default": "#ff2d55" },
15
+ "splitRight": { "type": "color", "label": "Split right", "default": "#00e5ff" },
16
+ "background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." },
17
+ "size": { "type": "number", "label": "Size", "default": 14, "min": 4, "max": 30, "step": 0.5, "unit": "% of frame" },
18
+ "font": { "type": "select", "label": "Font", "default": "condensed", "options": [{ "value": "condensed", "label": "Anton" }, { "value": "wide", "label": "Unbounded" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "sans", "label": "Inter" }, { "value": "display", "label": "Bricolage" }, { "value": "syne", "label": "Syne" }, { "value": "mono", "label": "Mono" }] },
19
+ "weight": { "type": "select", "label": "Weight", "default": "400", "options": [{ "value": "400", "label": "Regular" }, { "value": "700", "label": "Bold" }, { "value": "800", "label": "Extra bold" }, { "value": "900", "label": "Black" }] },
20
+ "uppercase": { "type": "boolean", "label": "Uppercase", "default": true },
21
+ "intensity": { "type": "number", "label": "Intensity", "default": 70, "min": 10, "max": 100, "step": 5, "unit": "%" },
22
+ "bursts": { "type": "number", "label": "Bursts", "default": 0.75, "min": 0, "max": 3, "step": 0.25, "unit": "per second", "help": "Small glitches while the title holds. 0 for none." },
23
+ "scanlines": { "type": "boolean", "label": "Scanlines", "default": false },
24
+ "seed": { "type": "number", "label": "Pattern", "default": 1, "min": 0, "max": 99, "step": 1 }
25
+ },
26
+ "examples": [
27
+ { "name": "Signal", "props": {} },
28
+ { "name": "CRT broadcast", "props": { "lines": ["LIVE", "*Tonight* 9PM"], "scanlines": true, "background": "#07070a", "font": "wide", "weight": "800", "size": 11, "accent": "#f43f5e" } },
29
+ { "name": "Subtle", "props": { "lines": ["Something's *different*"], "intensity": 35, "bursts": 0.25, "font": "grotesk", "weight": "700", "uppercase": false, "size": 9 } }
30
+ ],
31
+ "stillAt": 0.45
32
+ }
@@ -0,0 +1,106 @@
1
+ import { useId } from "react";
2
+ import { AbsoluteFill, random, useCurrentFrame } from "remotion";
3
+ import { alpha, easeOutExpo, exitOut, glowStyle, ramp, unit } from "../lib";
4
+ import type { MotionBaseProps } from "../types";
5
+
6
+ type Props = MotionBaseProps & {
7
+ mode: string;
8
+ background: string;
9
+ dotColor: string;
10
+ gradient: boolean;
11
+ secondColor: string;
12
+ accent: string;
13
+ density: number;
14
+ dotSize: number;
15
+ speed: number;
16
+ seed: number;
17
+ };
18
+
19
+ const MAX_DOTS = 2600;
20
+
21
+ /**
22
+ * A halftone dot matrix that breathes: each dot's size follows a field that moves over time
23
+ * (diagonal waves, rings rippling out from the middle, or drifting organic noise). Optionally the
24
+ * dots blend from one color to another across the frame, under a soft accent glow and vignette.
25
+ */
26
+ export function HalftoneWave(props: Props) {
27
+ const frame = useCurrentFrame();
28
+ const { width, height, fps, durationInFrames: d } = props;
29
+ const u = unit(width, height);
30
+ const id = `ht${useId().replace(/[^a-zA-Z0-9]/g, "")}`;
31
+ const t = (frame / fps) * props.speed;
32
+ const enter = ramp(frame, 0, 30, easeOutExpo);
33
+ const out = exitOut(frame, d, 12);
34
+
35
+ // Spacing from the density (dots across the short side), widened if the frame would need too many.
36
+ let spacing = Math.min(width, height) / props.density;
37
+ const needed = (width / spacing + 1) * (height / spacing + 1);
38
+ if (needed > MAX_DOTS) spacing *= Math.sqrt(needed / MAX_DOTS);
39
+ const cols = Math.ceil(width / spacing) + 1;
40
+ const rows = Math.ceil(height / spacing) + 1;
41
+ const ox = (width - (cols - 1) * spacing) / 2;
42
+ const oy = (height - (rows - 1) * spacing) / 2;
43
+ const maxR = spacing * 0.5 * (props.dotSize / 100);
44
+ const minR = Math.max(0.6 * u, maxR * 0.06);
45
+ const short = Math.min(width, height);
46
+
47
+ // Seeded phases and directions, so each seed is its own pattern but every render matches.
48
+ const r = (k: string) => random(`${props.seed}-${k}`);
49
+ const a1 = r("a1") * Math.PI * 2;
50
+ const a2 = a1 + 0.9 + r("a2") * 1.4;
51
+ const p = [r("p0"), r("p1"), r("p2"), r("p3")].map((v) => v * Math.PI * 2);
52
+ const cxr = 0.5 + (r("cx") - 0.5) * 0.2;
53
+ const cyr = 0.5 + (r("cy") - 0.5) * 0.2;
54
+
55
+ const field = (x: number, y: number) => {
56
+ const nx = x / short;
57
+ const ny = y / short;
58
+ if (props.mode === "ripple") {
59
+ const dist = Math.hypot(x / width - cxr, (y / height - cyr) * (height / width)) * (width / short);
60
+ const ring = Math.sin(dist * 16 - t * 3.2 + p[0]);
61
+ return 0.5 + 0.5 * ring * (1 - Math.min(1, dist * 0.55));
62
+ }
63
+ if (props.mode === "noise") {
64
+ // A few slow, crossing sines read as drifting organic blobs.
65
+ const v =
66
+ Math.sin(nx * 3.1 + t * 0.7 + p[0]) * Math.cos(ny * 2.7 - t * 0.5 + p[1]) +
67
+ 0.6 * Math.sin((nx * Math.cos(a1) + ny * Math.sin(a1)) * 5.3 - t * 0.9 + p[2]) +
68
+ 0.4 * Math.sin((nx * Math.cos(a2) + ny * Math.sin(a2)) * 8.1 + t * 1.1 + p[3]);
69
+ return Math.min(1, Math.max(0, 0.5 + v * 0.42));
70
+ }
71
+ const w1 = Math.sin((nx * Math.cos(a1) + ny * Math.sin(a1)) * 6.5 - t * 2 + p[0]);
72
+ const w2 = Math.sin((nx * Math.cos(a2) + ny * Math.sin(a2)) * 4.2 - t * 1.3 + p[1]);
73
+ return 0.5 + 0.32 * w1 + 0.18 * w2;
74
+ };
75
+
76
+ const dots = [];
77
+ for (let j = 0; j < rows; j++) {
78
+ for (let i = 0; i < cols; i++) {
79
+ const x = ox + i * spacing;
80
+ const y = oy + j * spacing;
81
+ const v = field(x, y);
82
+ const rad = (minR + (maxR - minR) * v * v) * enter;
83
+ if (rad < 0.35) continue;
84
+ dots.push(<circle key={j * cols + i} cx={x} cy={y} r={Math.round(rad * 100) / 100} />);
85
+ }
86
+ }
87
+
88
+ return (
89
+ <AbsoluteFill style={{ background: props.background, overflow: "hidden", opacity: out }}>
90
+ <div style={glowStyle(width / 2, height / 2, width * 1.1, height * 1.1, props.accent, 0.28 * enter)} />
91
+ <svg width={width} height={height} style={{ position: "absolute", inset: 0 }}>
92
+ <defs>
93
+ <linearGradient id={`${id}-g`} gradientUnits="userSpaceOnUse" x1={0} y1={0} x2={width} y2={height}>
94
+ <stop offset="0%" stopColor={props.dotColor} />
95
+ <stop offset="100%" stopColor={props.gradient ? props.secondColor : props.dotColor} />
96
+ </linearGradient>
97
+ </defs>
98
+ <g fill={`url(#${id}-g)`}>{dots}</g>
99
+ </svg>
100
+ {/* Vignette: the dots sink into the background toward the edges. */}
101
+ <AbsoluteFill
102
+ style={{ background: `radial-gradient(${alpha(props.background, 0)} 45%, ${alpha(props.background, 0.85)} 95%)` }}
103
+ />
104
+ </AbsoluteFill>
105
+ );
106
+ }