-
Notifications
You must be signed in to change notification settings - Fork 515
Expand file tree
/
Copy pathtest-mini.sh
More file actions
43 lines (38 loc) · 1004 Bytes
/
Copy pathtest-mini.sh
File metadata and controls
43 lines (38 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# 极简模式 SVG 动画测试脚本
# 用法: bash test-mini.sh [每个动画秒数,默认6]
# 注意: 先 npm start 启动应用,再运行此脚本
DELAY=${1:-6}
SVGS=(
"clawd-mini-idle.svg"
"clawd-mini-enter.svg"
"clawd-mini-peek.svg"
"clawd-mini-alert.svg"
"clawd-mini-happy.svg"
"clawd-mini-crabwalk.svg"
)
STATES=(
"mini-idle"
"mini-enter"
"mini-peek"
"mini-alert"
"mini-happy"
"mini-crabwalk"
)
echo "=== Mini Mode Demo: ${#SVGS[@]} animations, ${DELAY}s each ==="
for i in "${!SVGS[@]}"; do
svg="${SVGS[$i]}"
state="${STATES[$i]}"
echo "[$((i+1))/${#SVGS[@]}] $state → $svg"
curl -s -X POST http://127.0.0.1:23333/state \
-H "Content-Type: application/json" \
-d "{\"state\":\"$state\",\"svg\":\"$svg\"}"
sleep "$DELAY"
done
echo ""
echo "Returning to idle..."
curl -s -X POST http://127.0.0.1:23333/state \
-H "Content-Type: application/json" \
-d '{"state":"idle","svg":"clawd-idle-follow.svg"}'
echo ""
echo "=== DONE ==="