text-rain-generatorlisted
Install: claude install-skill AIPMAndy/Andy-Video-Skill
# Text Rain Generator
将诗句/文字转换成艺术化的"文字雨"动效,参考景桐的 Vibe Coding 风格。
## 核心能力
1. **智能生图**:通过 `/andy-relay` 调度 ChatGPT 生成黑白老照片风格的背景图
2. **物理引擎**:p5.js 粒子系统模拟真实雨滴效果(重力、风、碰撞)
3. **参数化控制**:可调节雨速、倾斜、颜色、布局等
4. **即开即用**:输出完整 HTML 文件,浏览器直接运行
## 使用方式
### 基础模式(最快)
```
/text-rain-generator "床前明月光,疑是地上霜" --scene "江南老宅屋檐"
```
### 高级模式(精细调参)
```
/text-rain-generator "山重水复疑无路,柳暗花明又一村" \
--scene "苏州园林青瓦屋檐,斑驳墙壁" \
--speed 3 \
--tilt 15 \
--color "#e8d5b7" \
--no-preview
```
## 参数说明
| 参数 | 默认值 | 说明 |
|------|--------|------|
| `--scene` | "中式老宅屋檐" | 背景场景描述,传递给 ChatGPT 生图 |
| `--speed` | 2.5 | 雨滴下落速度(1-5) |
| `--tilt` | 10 | 最大倾斜角度(度) |
| `--color` | "#d4c5a9" | 文字颜色(十六进制) |
| `--font-size` | 24 | 字体大小(px) |
| `--canvas-width` | 1080 | 画布宽度 |
| `--canvas-height` | 1920 | 画布高度(默认竖屏) |
| `--no-preview` | false | 不自动打开浏览器预览 |
| `--output` | `./text-rain-output/` | 输出目录 |
## 工作流程
### 第1步:解析输入
- 拆解诗句为字符数组
- 验证参数合法性
- 生成项目文件夹结构
### 第2步:生成背景图(通过 andy-relay)
调用 `/andy-relay` 发送任务到 ChatGPT:
```json
{
"objective": "Generate background image for text rain animation",
"deliverable": "One PNG image, 1080x1920, black and white old photo style",
"context": {
"scene": "{用户提供的场景描述}",
"style": "monochrome, vintage, film grain, high contrast",
"composition": "bottom 2/3 shows roof tiles/eaves, top 1/3 empty for rain"
},
"prompt": "Generate a black and white vintage photograph: {scene}. Composition: traditional Chinese roof tiles occupy bottom 60%, weathered texture with vis