light-spotlight-render
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLight Spotlight Render
聚光灯文字揭示动画渲染
Workflow
工作流程
- Collect the animation parameters:
label_textswing_angle_degreesswing_cycle_secondslamp_scaleglow_opacitymask_colortext_colorbackground_colorvideo_widthvideo_height- optional
output
- Resolve the installed skill directory and run .
scripts/render_light_spotlight.py - Return the final absolute HTML path printed by the script.
- 收集动画参数:
label_textswing_angle_degreesswing_cycle_secondslamp_scaleglow_opacitymask_colortext_colorbackground_colorvideo_widthvideo_height- 可选参数
output
- 解析已安装技能的目录并运行 。
scripts/render_light_spotlight.py - 返回脚本输出的最终HTML文件绝对路径。
Command
命令示例
bash
python3 scripts/render_light_spotlight.py \
--label-text "vibe-motion" \
--output "out/light-spotlight-vibe-motion.html"bash
python3 scripts/render_light_spotlight.py \
--label-text "vibe-motion" \
--output "out/light-spotlight-vibe-motion.html"Installed Skill Resolution
已安装技能路径解析
Use the installed skill copy, not the source repo checkout:
bash
skill_dir=""
for base in "${AGENTS_HOME:-$HOME/.agents}" "${CLAUDE_HOME:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}"; do
if [ -d "$base/skills/light-spotlight-render" ]; then
skill_dir="$base/skills/light-spotlight-render"
break
fi
done
[ -n "$skill_dir" ] || { echo "light-spotlight-render skill not found under ~/.agents, ~/.claude, or ~/.codex"; exit 1; }
python3 "$skill_dir/scripts/render_light_spotlight.py" \
--label-text "vibe-motion" \
--output "$(pwd)/out/light-spotlight-vibe-motion.html"使用已安装的技能副本,而非源码仓库检出版本:
bash
skill_dir=""
for base in "${AGENTS_HOME:-$HOME/.agents}" "${CLAUDE_HOME:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}"; do
if [ -d "$base/skills/light-spotlight-render" ]; then
skill_dir="$base/skills/light-spotlight-render"
break
fi
done
[ -n "$skill_dir" ] || { echo "light-spotlight-render skill not found under ~/.agents, ~/.claude, or ~/.codex"; exit 1; }
python3 "$skill_dir/scripts/render_light_spotlight.py" \
--label-text "vibe-motion" \
--output "$(pwd)/out/light-spotlight-vibe-motion.html"Behavior
功能特性
- Read .
assets/light_spotlight_template.html - Replace template placeholders with sanitized parameter values.
- Keep the SVG spotlight animation self-contained in one HTML file.
- Default output name is derived from .
label_text - Preserve the top-vertex lamp scale pivot so the spotlight grows from the lamp tip rather than the swing axis.
- Allow for transparent-background workflows.
background_color=transparent
- 读取 模板文件。
assets/light_spotlight_template.html - 将模板中的占位符替换为经过安全处理的参数值。
- 将SVG聚光灯动画封装为独立的HTML文件。
- 默认输出文件名由 生成。
label_text - 保留灯具顶部顶点作为缩放支点,使聚光灯从灯头而非摇摆轴处向外扩散。
- 支持设置 ,以实现透明背景的使用场景。
background_color=transparent
Output
输出说明
- Primary output: a standalone animation file.
.html - Tell the user to open the HTML file in a browser to preview the animation.
- If the user wants video output after generating the HTML, suggest rendering it with another tool or browser capture flow rather than rewriting the skill.
- 主要输出:一个独立的 动画文件。
.html - 告知用户可在浏览器中打开该HTML文件预览动画效果。
- 若用户在生成HTML后需要视频输出,建议使用其他工具或浏览器录屏流程进行渲染,而非修改本技能。