@efectoapp/mcp-server 0.1.24 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +63 -2
- package/dist/cli.js.map +1 -1
- package/dist/tools/state.d.ts.map +1 -1
- package/dist/tools/state.js +53 -9
- package/dist/tools/state.js.map +1 -1
- package/package.json +2 -1
- package/skills/SKILL.md +381 -0
- package/skills/recipes.md +490 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efectoapp/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "MCP server for Efecto - create stunning visual designs with ASCII effects, glitch art, and more from your CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
+
"skills",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
14
15
|
"scripts": {
|
package/skills/SKILL.md
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
# Efecto — Create Visual Poster Designs
|
|
2
|
+
|
|
3
|
+
Efecto is a real-time visual effects application that renders posters with ASCII art, dither, halftone, glitch, and artistic effects. This skill teaches the design workflow, typography rules, font pairings, effect combos, and layout patterns for creating professional-looking posters using the Efecto MCP server tools.
|
|
4
|
+
|
|
5
|
+
**Prerequisite**: The `efecto` MCP server must be configured. Tools are prefixed with `mcp__efecto__` (e.g., `mcp__efecto__create_poster`).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Design Workflow
|
|
10
|
+
|
|
11
|
+
Follow these 7 steps in order for every poster:
|
|
12
|
+
|
|
13
|
+
### Step 1: Create the Poster
|
|
14
|
+
Pick the aspect ratio for the use case:
|
|
15
|
+
- `9:16` — Instagram Stories, TikTok, mobile wallpaper (default)
|
|
16
|
+
- `16:9` — YouTube thumbnails, presentations, desktop wallpaper
|
|
17
|
+
- `1:1` — Instagram posts, profile pictures, album art
|
|
18
|
+
- `4:3` / `3:4` — Print, editorial, magazine covers
|
|
19
|
+
- `full` — Full viewport
|
|
20
|
+
|
|
21
|
+
### Step 2: Set the Background
|
|
22
|
+
Choose one: solid color, gradient, image, or video.
|
|
23
|
+
- **Solid**: Simple dark (`#0a0a0a`) or light (`#f5f5f0`) backgrounds
|
|
24
|
+
- **Gradient**: Linear (set `gradientAngle`) or radial (set `gradientCenterX/Y`). Use `gradientStops` for multi-color gradients
|
|
25
|
+
- **Image**: Use `search_images` first to find stock photos, then pass the URL
|
|
26
|
+
- **Video**: Use `list_sample_videos` or `search_gifs` for animated backgrounds. Video backgrounds give effects (especially ASCII and dither) much richer source material than solid colors or gradients
|
|
27
|
+
|
|
28
|
+
### Step 3: Add Text with Typography Hierarchy
|
|
29
|
+
Always use `add_group` for multi-text layouts (headline + subheadline, title + date, etc.). Groups handle positioning via flexbox — never set child x/y positions inside a group.
|
|
30
|
+
|
|
31
|
+
### Step 4: Add Visual Elements
|
|
32
|
+
Shapes (rectangle, ellipse, polygon, star, line), images, or videos as decorative elements.
|
|
33
|
+
|
|
34
|
+
### Step 5: Apply the Main Effect
|
|
35
|
+
One effect per poster. Choose based on mood (see Effect Selection Guide below).
|
|
36
|
+
|
|
37
|
+
### Step 6: Add Post-Processing (WebGPU effects only)
|
|
38
|
+
Stack enhancements like bloom, grain, vignette, scanlines. **Critical**: post-processes do NOT work with dither effects — use dither's built-in `paletteId`/`bloomEnabled` params instead.
|
|
39
|
+
|
|
40
|
+
### Step 7: Preview and Share
|
|
41
|
+
- `render_image` — Render to see the result visually. Always render to check your work.
|
|
42
|
+
- `generate_url` — Get a shareable URL
|
|
43
|
+
|
|
44
|
+
### Quick Start — Minimal 4-Call Poster
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
1. create_poster → aspectRatio: "9:16"
|
|
48
|
+
2. set_background → type: "gradient", gradientStyle: "linear", gradientStartColor: "#0a0a0a", gradientEndColor: "#1a1a3e", gradientAngle: 160
|
|
49
|
+
3. add_group → children: [{type: "text", content: "HELLO", fontSize: 120, fontWeight: "900", color: "#ffffff"}, {type: "text", content: "WORLD", fontSize: 32, fontWeight: "400", color: "#888888"}], y: 50
|
|
50
|
+
4. apply_effect → effectId: "ascii-standard", cellSize: 8, color: true
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Typography System
|
|
56
|
+
|
|
57
|
+
### Size Guidelines
|
|
58
|
+
| Role | Size (px) | Weight | Use case |
|
|
59
|
+
|------|-----------|--------|----------|
|
|
60
|
+
| Hero headline | 96–140 | 700–900 | Single word or short phrase |
|
|
61
|
+
| Headline | 64–96 | 700–900 | Main title, 2-4 words |
|
|
62
|
+
| Subheadline | 28–48 | 400–600 | Supporting text |
|
|
63
|
+
| Body | 16–24 | 300–400 | Descriptions, paragraphs |
|
|
64
|
+
| Label / Caption | 12–16 | 500–700 | Dates, categories, credits |
|
|
65
|
+
|
|
66
|
+
### Auto-Fit Behavior
|
|
67
|
+
The MCP server automatically shrinks font size when the longest word in the content exceeds the frame width. This prevents mid-word text wrapping. You can trust that large font sizes will fit — the system adjusts down as needed.
|
|
68
|
+
|
|
69
|
+
### Line Height
|
|
70
|
+
- **Tight headlines**: `0.9` to `1.0` — for large display text where lines should stack closely
|
|
71
|
+
- **Normal text**: `1.2` (default) — balanced readability
|
|
72
|
+
- **Body text**: `1.3` to `1.5` — comfortable reading for longer text
|
|
73
|
+
|
|
74
|
+
### Letter Spacing
|
|
75
|
+
- **Large headlines (80px+)**: `-1` to `-3` — tighten for visual density
|
|
76
|
+
- **Normal text**: `0` (default)
|
|
77
|
+
- **Uppercase labels**: `2` to `6` — spread for elegance (pair with `textTransform: "uppercase"`)
|
|
78
|
+
|
|
79
|
+
### Text in Groups
|
|
80
|
+
Always use `add_group` for multi-text layouts. The group handles all positioning:
|
|
81
|
+
- `layoutMode: "column"` stacks text vertically (most common)
|
|
82
|
+
- `layoutMode: "row"` places text side-by-side
|
|
83
|
+
- `gap: 2` (2% of canvas) for tight spacing, `4` for medium, `6` for generous
|
|
84
|
+
- Children inherit alignment from the group — don't set child x/y
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Font Pairing Guide
|
|
89
|
+
|
|
90
|
+
Use `fontFamily` values exactly as shown. All fonts below are available in Efecto.
|
|
91
|
+
|
|
92
|
+
### 1. Modern / Clean — Space Grotesk + DM Sans
|
|
93
|
+
```
|
|
94
|
+
Headline: fontFamily: "Space Grotesk" fontSize: 96 fontWeight: "700"
|
|
95
|
+
Body: fontFamily: "DM Sans" fontSize: 24 fontWeight: "400"
|
|
96
|
+
```
|
|
97
|
+
Geometric, techy, contemporary. Great for SaaS, tech events, product launches.
|
|
98
|
+
|
|
99
|
+
### 2. Editorial / Luxury — Playfair Display + DM Sans
|
|
100
|
+
```
|
|
101
|
+
Headline: fontFamily: "Playfair Display" fontSize: 80 fontWeight: "900"
|
|
102
|
+
Body: fontFamily: "DM Sans" fontSize: 20 fontWeight: "300"
|
|
103
|
+
```
|
|
104
|
+
Elegant contrast between serif display and clean sans. Magazines, fashion, luxury brands.
|
|
105
|
+
|
|
106
|
+
### 3. Retro / Gaming — Bungee + Space Mono
|
|
107
|
+
```
|
|
108
|
+
Headline: fontFamily: "Bungee" fontSize: 72 fontWeight: "400"
|
|
109
|
+
Body: fontFamily: "Space Mono" fontSize: 18 fontWeight: "400"
|
|
110
|
+
```
|
|
111
|
+
Blocky, arcade-inspired. Retro gaming, pixel art, 8-bit aesthetics. Pair with dither + gameboy palette.
|
|
112
|
+
|
|
113
|
+
### 4. Bold / Event — Bebas Neue + Inter
|
|
114
|
+
```
|
|
115
|
+
Headline: fontFamily: "Bebas Neue" fontSize: 120 fontWeight: "400"
|
|
116
|
+
Body: fontFamily: "Inter" fontSize: 20 fontWeight: "400"
|
|
117
|
+
```
|
|
118
|
+
Tall condensed headlines with maximum impact. Events, concerts, sports, announcements.
|
|
119
|
+
|
|
120
|
+
### 5. Handwritten / Creative — Permanent Marker + Work Sans
|
|
121
|
+
```
|
|
122
|
+
Headline: fontFamily: "Permanent Marker" fontSize: 80 fontWeight: "400"
|
|
123
|
+
Body: fontFamily: "Work Sans" fontSize: 20 fontWeight: "400"
|
|
124
|
+
```
|
|
125
|
+
Informal, energetic, personal. Art shows, music, street culture.
|
|
126
|
+
|
|
127
|
+
### 6. Ultra Bold / Impact — Anton + Outfit
|
|
128
|
+
```
|
|
129
|
+
Headline: fontFamily: "Anton" fontSize: 110 fontWeight: "400"
|
|
130
|
+
Body: fontFamily: "Outfit" fontSize: 22 fontWeight: "300"
|
|
131
|
+
```
|
|
132
|
+
Massive condensed headlines that command attention. Sales, promos, bold statements.
|
|
133
|
+
|
|
134
|
+
### 7. Monospace / Hacker — JetBrains Mono + IBM Plex Mono
|
|
135
|
+
```
|
|
136
|
+
Headline: fontFamily: "JetBrains Mono" fontSize: 56 fontWeight: "700"
|
|
137
|
+
Body: fontFamily: "IBM Plex Mono" fontSize: 16 fontWeight: "400"
|
|
138
|
+
```
|
|
139
|
+
Technical, code-inspired. Developer events, hacker culture, terminal aesthetics. Pair with ASCII effects.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Color & Background Strategy
|
|
144
|
+
|
|
145
|
+
### Dark Backgrounds (most common for effects)
|
|
146
|
+
- Pure dark: `#0a0a0a` or `#000000` — maximum contrast for effects
|
|
147
|
+
- Warm dark: `#1a0f0a` — subtle warmth
|
|
148
|
+
- Cool dark: `#0a0a1a` — cinematic depth
|
|
149
|
+
- Use light text (`#ffffff`, `#f0f0f0`) on dark backgrounds
|
|
150
|
+
|
|
151
|
+
### Light Backgrounds
|
|
152
|
+
- Off-white: `#f5f5f0` or `#fafafa` — softer than pure white
|
|
153
|
+
- Warm cream: `#f5f0e8` — editorial, vintage
|
|
154
|
+
- Use dark text (`#1a1a1a`, `#0a0a0a`) on light backgrounds
|
|
155
|
+
|
|
156
|
+
### Gradient Tips
|
|
157
|
+
- **Linear**: `gradientAngle: 160` for top-left to bottom-right diagonal (most versatile)
|
|
158
|
+
- **Radial**: `gradientCenterX: 0.5, gradientCenterY: 0.3` for a vignette from upper-center
|
|
159
|
+
- **Multi-stop**: Use `gradientStops` for rich color transitions (3-5 stops)
|
|
160
|
+
|
|
161
|
+
### Image Backgrounds
|
|
162
|
+
Use `search_images` with filters for best results:
|
|
163
|
+
- Match `orientation` to aspect ratio: "vertical" for 9:16, "horizontal" for 16:9, "square" for 1:1
|
|
164
|
+
- Use `luminance: "dark"` for dramatic designs with light text overlay
|
|
165
|
+
- Use `type: "photo"` for photographs, `"illustration"` for artwork
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Effect Selection Guide
|
|
170
|
+
|
|
171
|
+
Choose effects based on the desired mood:
|
|
172
|
+
|
|
173
|
+
| Mood | Effect | Key Settings |
|
|
174
|
+
|------|--------|-------------|
|
|
175
|
+
| **Retro / Vintage** | `dither-atkinson` | `paletteId: "gameboy"`, `pixelation: 4` |
|
|
176
|
+
| **Cyberpunk / Neon** | `glitch-digital` | `intensity: 0.6`, `speed: 1.2` |
|
|
177
|
+
| **Technical / Hacker** | `ascii-standard` | `cellSize: 8`, `color: true` |
|
|
178
|
+
| **Terminal / Matrix** | `ascii-matrix` | `cellSize: 6`, `color: true` |
|
|
179
|
+
| **Print / Editorial** | `halftone-mono` | `dotSize: 0.3` |
|
|
180
|
+
| **Painterly** | `art-kuwahara` | (defaults work well) |
|
|
181
|
+
| **Sketch / Hand-drawn** | `art-crosshatch` | (defaults work well) |
|
|
182
|
+
| **Engraving / Currency** | `art-engraving` | (defaults work well) |
|
|
183
|
+
| **Stipple / Pointillist** | `art-stipple` | (defaults work well) |
|
|
184
|
+
| **VHS / Lo-fi** | `glitch-vhs` | `intensity: 0.5`, `speed: 0.8` |
|
|
185
|
+
| **Editorial / Risograph** | `dither-floyd-steinberg` | `paletteId: "ink"`, `pixelation: 3` |
|
|
186
|
+
| **Warm Retro** | `dither-floyd-steinberg` | `paletteId: "sunset-blvd"`, `pixelation: 3` |
|
|
187
|
+
| **Synthwave** | `dither-atkinson` | `paletteId: "synthwave"`, `bloomEnabled: true`, `bloomIntensity: 1.5` |
|
|
188
|
+
| **Clean / Minimal** | `none` | Use post-processes only |
|
|
189
|
+
| **Line Art** | `art-lineart` | (defaults work well) |
|
|
190
|
+
|
|
191
|
+
### The Two Effect Pipelines (Critical!)
|
|
192
|
+
|
|
193
|
+
**Dither effects (WebGL)** — 9 dither-* effects + color-separation:
|
|
194
|
+
- Have BUILT-IN palette and bloom controls
|
|
195
|
+
- Set `paletteId`, `colors`, `bloomEnabled`, `bloomIntensity`, `bloomRadius` directly in `apply_effect`
|
|
196
|
+
- `add_postprocess` does NOT work with dither effects
|
|
197
|
+
|
|
198
|
+
**All other effects (WebGPU)** — ASCII, Glitch, Halftone, Art, Special:
|
|
199
|
+
- Use `add_postprocess` for palette, bloom, and all other enhancements
|
|
200
|
+
- Support unlimited stackable post-processes
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Post-Process Combos
|
|
205
|
+
|
|
206
|
+
Tested combinations that work well together. Only use with WebGPU effects (not dither).
|
|
207
|
+
|
|
208
|
+
| Combo Name | Post-Processes | Key Params |
|
|
209
|
+
|-----------|----------------|------------|
|
|
210
|
+
| **CRT Monitor** | scanlines + curvature + vignette + chromatic-aberration | `count: 400`, `curvature: 0.3`, `radius: 0.8`, `strength: 0.02` |
|
|
211
|
+
| **Cyberpunk Glow** | bloom + chromatic-aberration + scanlines | `intensity: 1.5, radius: 0.4, threshold: 0.2` / `strength: 0.03` / `count: 300` |
|
|
212
|
+
| **Film Grain** | grain + vignette + brightness-contrast | `size: 1.5, speed: 0.8` / `radius: 0.7` / `contrast: 1.1` |
|
|
213
|
+
| **Vaporwave** | palette + bloom + chromatic-aberration | `paletteId: "vaporwave"` / `intensity: 1.0` / `strength: 0.02` |
|
|
214
|
+
| **Terminal** | color-tint + scanlines + curvature | `palette: "green"` / `count: 500` / `curvature: 0.2` |
|
|
215
|
+
| **Noir** | brightness-contrast + grain + vignette | `contrast: 1.3, saturation: 0` / `size: 2.0` / `radius: 0.6` |
|
|
216
|
+
| **Dream / Soft** | bloom + wave + grain | `intensity: 2.0, radius: 0.6` / `amplitude: 0.05, frequency: 3` / `size: 1.0` |
|
|
217
|
+
| **Print Texture** | grain + dot-screen | `size: 1.5, speed: 0` / (defaults) |
|
|
218
|
+
| **Glitch Overlay** | rgb-glitch + jitter + noise | (defaults for all) |
|
|
219
|
+
| **Amber Terminal** | color-tint + scanlines + bloom | `palette: "amber"` / `count: 400` / `intensity: 0.8` |
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Layout Patterns
|
|
224
|
+
|
|
225
|
+
### Page Layout — justifyContent Controls Vertical Position
|
|
226
|
+
Use `set_page_layout` to control where content sits on the canvas:
|
|
227
|
+
- `justifyContent: "center"` — vertically centered (default)
|
|
228
|
+
- `justifyContent: "end"` — pushes content to the bottom third (most popular for photo/video backgrounds — lets the image breathe above)
|
|
229
|
+
- `justifyContent: "start"` — anchors content to the top
|
|
230
|
+
- `justifyContent: "space-between"` — spreads content evenly (great for header + body + footer)
|
|
231
|
+
|
|
232
|
+
### Centered Title Block (most common)
|
|
233
|
+
```
|
|
234
|
+
add_group:
|
|
235
|
+
x: 50, y: 50, width: 80
|
|
236
|
+
layoutMode: "column", alignItems: "center", justifyContent: "center", gap: 3
|
|
237
|
+
children: [headline, subheadline]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Bottom-Anchored Content (best for photo/video backgrounds)
|
|
241
|
+
```
|
|
242
|
+
set_page_layout: justifyContent: "end"
|
|
243
|
+
|
|
244
|
+
add_group:
|
|
245
|
+
x: 50, y: 50, width: 80
|
|
246
|
+
layoutMode: "column", alignItems: "center", gap: 2
|
|
247
|
+
children: [title, subtitle, date]
|
|
248
|
+
```
|
|
249
|
+
Note: With `justifyContent: "end"`, the group automatically flows to the bottom — no need to set `y: 82` manually.
|
|
250
|
+
|
|
251
|
+
### Left-Aligned Editorial
|
|
252
|
+
```
|
|
253
|
+
add_group:
|
|
254
|
+
x: 50, y: 75, width: 80
|
|
255
|
+
layoutMode: "column", alignItems: "start", gap: 2
|
|
256
|
+
children: [headline (textAlign: "left"), body (textAlign: "left")]
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Header + Body + Footer
|
|
260
|
+
```
|
|
261
|
+
set_page_layout:
|
|
262
|
+
layoutMode: "column", justifyContent: "space-between", alignItems: "center", padding: 8
|
|
263
|
+
|
|
264
|
+
Then add_layer for header, main content group, and footer — they flow automatically.
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Two-Column Row
|
|
268
|
+
```
|
|
269
|
+
add_group:
|
|
270
|
+
layoutMode: "row", gap: 4, alignItems: "center", justifyContent: "center"
|
|
271
|
+
children: [left text, right text]
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Shapes & Decorative Elements
|
|
277
|
+
|
|
278
|
+
### Line Separator
|
|
279
|
+
```
|
|
280
|
+
add_layer: type: "line", startX: 20, startY: 50, endX: 80, endY: 50
|
|
281
|
+
strokeColor: "#ffffff", strokeWidth: 0.003, strokeOpacity: 0.5
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Decorative Circle
|
|
285
|
+
```
|
|
286
|
+
add_layer: type: "ellipse", width: 30, height: 30, x: 50, y: 50
|
|
287
|
+
strokeColor: "#ffffff", strokeWidth: 0.005, fillOpacity: 0
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Background Rectangle (for text contrast)
|
|
291
|
+
```
|
|
292
|
+
add_layer: type: "rectangle", width: 80, height: 20, x: 50, y: 80
|
|
293
|
+
fillColor: "#000000", fillOpacity: 0.6, cornerRadius: 0.02
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Text Animations
|
|
299
|
+
|
|
300
|
+
Add character-level animations to text layers for dynamic posters. Set `animationType` on any text layer.
|
|
301
|
+
|
|
302
|
+
| Animation | Best For | Key Params |
|
|
303
|
+
|-----------|----------|------------|
|
|
304
|
+
| `wave` | Fluid, ocean-like motion | `animationFrequency: 3`, `animationAxis: "vertical"` |
|
|
305
|
+
| `typewriter` | Reveals, intros | `animationSpeed: 2`, `animationCursor: true` |
|
|
306
|
+
| `glitch` | Cyberpunk, hacker | `animationColorSplit: true`, `animationSliceChance: 0.3` |
|
|
307
|
+
| `neon` | Signs, nightlife | `animationGlowIntensity: 1.5`, `animationFlickerChance: 0.3` |
|
|
308
|
+
| `bounce` | Playful, fun | `animationHeight: 60`, `animationElasticity: 0.6` |
|
|
309
|
+
| `cascade` | Dramatic reveals | `animationFallHeight: 100`, `animationBounceOnLand: true` |
|
|
310
|
+
| `elastic` | Snappy entrances | `animationTension: 1.5`, `animationOvershoot: 1.0` |
|
|
311
|
+
| `shake` | Urgency, alerts | `animationIntensity: 20`, `animationIncludeRotation: true` |
|
|
312
|
+
|
|
313
|
+
Common settings for all animations:
|
|
314
|
+
- `animationSpeed: 1.0` (0.1 = very slow, 5.0 = very fast)
|
|
315
|
+
- `animationStaggerDelay: 150` (ms between characters, 0 = all at once)
|
|
316
|
+
- `animationStaggerMode: "sequential"` (or "random", "center-out", "edges-in")
|
|
317
|
+
- `animationLoop: true`
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Image & Video Integration
|
|
322
|
+
|
|
323
|
+
### Stock Images
|
|
324
|
+
```
|
|
325
|
+
1. search_images: query: "cyberpunk city", orientation: "vertical", luminance: "dark"
|
|
326
|
+
2. Use the returned URL in set_background (type: "image") or add_layer (type: "image")
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Sample Videos
|
|
330
|
+
```
|
|
331
|
+
1. list_sample_videos: category: "portrait"
|
|
332
|
+
2. Use the returned URL in set_background (type: "video") or add_layer (type: "video")
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Animated GIFs
|
|
336
|
+
```
|
|
337
|
+
1. search_gifs: query: "abstract loop"
|
|
338
|
+
2. Use the mp4Url (NOT gifUrl) for better performance
|
|
339
|
+
3. set_background: type: "video", videoUrl: <mp4Url>
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
For images/videos as layers, use `objectFit: "cover"` (fills frame, may crop) or `"contain"` (fits within frame, may letterbox).
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Rendering & Output
|
|
347
|
+
|
|
348
|
+
### Render to Check Your Work
|
|
349
|
+
Always call `render_image` after building a poster to visually verify the design. The image is returned inline so you can see it.
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
render_image: format: "png" # Preview only
|
|
353
|
+
render_image: format: "png", savePath: "~/Downloads/poster.png" # Save to disk
|
|
354
|
+
render_image: format: "jpeg", quality: 85 # Smaller file size
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Generate Shareable URL
|
|
358
|
+
```
|
|
359
|
+
generate_url # Returns an efecto.app URL that opens the poster in a browser
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Dimensions
|
|
363
|
+
Output dimensions are calculated from the aspect ratio. For custom sizes:
|
|
364
|
+
```
|
|
365
|
+
render_image: width: 1080, height: 1920 # Instagram Story size
|
|
366
|
+
render_image: width: 1920, height: 1080 # Full HD landscape
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## 37 Available Color Palettes (for dither effects)
|
|
372
|
+
|
|
373
|
+
Use these with `apply_effect` → `paletteId`:
|
|
374
|
+
|
|
375
|
+
**Classic**: noir, ink, terminal, amber-glow
|
|
376
|
+
**Retro Gaming**: gameboy, commodore, nes, cga
|
|
377
|
+
**Warm**: sunset-blvd, campfire, autumn-leaves, terracotta, golden-hour, rose-gold
|
|
378
|
+
**Cool**: deep-sea, arctic-night, moonlight, frozen, twilight
|
|
379
|
+
**Neon**: synthwave, vaporwave, cyberpunk, tokyo-night, arcade, retrowave, electric
|
|
380
|
+
**Earth**: forest, moss, desert, clay, ocean-floor
|
|
381
|
+
**Monochrome**: grayscale, sepia, blueprint, cyanotype, green-phosphor, amber-phosphor
|