light-spotlight-render

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Light Spotlight Render

聚光灯文字揭示动画渲染

Workflow

工作流程

  1. Collect the animation parameters:
    • label_text
    • swing_angle_degrees
    • swing_cycle_seconds
    • lamp_scale
    • glow_opacity
    • mask_color
    • text_color
    • background_color
    • video_width
    • video_height
    • optional
      output
  2. Resolve the installed skill directory and run
    scripts/render_light_spotlight.py
    .
  3. Return the final absolute HTML path printed by the script.
  1. 收集动画参数:
    • label_text
    • swing_angle_degrees
    • swing_cycle_seconds
    • lamp_scale
    • glow_opacity
    • mask_color
    • text_color
    • background_color
    • video_width
    • video_height
    • 可选参数
      output
  2. 解析已安装技能的目录并运行
    scripts/render_light_spotlight.py
  3. 返回脚本输出的最终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
    background_color=transparent
    for transparent-background workflows.
  • 读取
    assets/light_spotlight_template.html
    模板文件。
  • 将模板中的占位符替换为经过安全处理的参数值。
  • 将SVG聚光灯动画封装为独立的HTML文件。
  • 默认输出文件名由
    label_text
    生成。
  • 保留灯具顶部顶点作为缩放支点,使聚光灯从灯头而非摇摆轴处向外扩散。
  • 支持设置
    background_color=transparent
    ,以实现透明背景的使用场景。

Output

输出说明

  • Primary output: a standalone
    .html
    animation file.
  • 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后需要视频输出,建议使用其他工具或浏览器录屏流程进行渲染,而非修改本技能。