Repository navigation
Expand file tree
/
Copy pathviewer.html
More file actions
144 lines (136 loc) · 3.79 KB
/
Copy pathviewer.html
File metadata and controls
144 lines (136 loc) · 3.79 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Animation Viewer - Clash Royale</title>
<style>
body {
margin: 0;
padding: 20px;
background-color: #1a1a2e;
color: white;
font-family: 'Inter', sans-serif;
}
.controls {
display: flex;
gap: 15px;
margin-bottom: 20px;
flex-wrap: wrap;
}
select, button, input {
padding: 8px 12px;
border-radius: 6px;
border: 1px solid #4a4e69;
background: #22223b;
color: white;
font-size: 14px;
outline: none;
}
select:focus, button:hover, input:focus {
border-color: #9d4edd;
}
button {
cursor: pointer;
background: #9d4edd;
font-weight: bold;
}
button:hover {
background: #7b2cbf;
}
.preview-area {
position: relative;
width: 300px;
height: 300px;
background: #22223b;
border: 2px dashed #4a4e69;
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
border-radius: 12px;
overflow: hidden;
}
/* Center crosshair */
.preview-area::before {
content: '';
position: absolute;
width: 100%;
height: 1px;
background: rgba(255,255,255,0.2);
top: 50%;
}
.preview-area::after {
content: '';
position: absolute;
width: 1px;
height: 100%;
background: rgba(255,255,255,0.2);
left: 50%;
}
.sprite-display {
position: absolute;
width: 150px;
height: 150px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
#frameInfo {
margin-top: 10px;
font-size: 14px;
color: #a9afd1;
}
.timeline {
margin-top: 20px;
display: flex;
gap: 5px;
flex-wrap: wrap;
max-width: 600px;
}
.frame-dot {
width: 15px;
height: 15px;
border-radius: 50%;
background: #4a4e69;
cursor: pointer;
}
.frame-dot.active {
background: #9d4edd;
transform: scale(1.2);
}
</style>
</head>
<body>
<h1>🎬 Animation Viewer</h1>
<div class="controls">
<select id="charSelect">
<option value="chr_giant">Giant</option>
<option value="chr_knight">Knight</option>
<option value="chr_archer">Archer</option>
</select>
<select id="animSelect">
<option value="Walk_Up">Walk Up</option>
<option value="Walk_UpRight">Walk Up-Right</option>
<option value="Walk_Right">Walk Right</option>
<option value="Walk_DownRight">Walk Down-Right</option>
<option value="Walk_Down">Walk Down</option>
<option value="Attack_Up">Attack Up</option>
<option value="Attack_UpRight">Attack Up-Right</option>
<option value="Attack_Right">Attack Right</option>
<option value="Attack_DownRight">Attack Down-Right</option>
<option value="Attack_Down">Attack Down</option>
</select>
<button id="playBtn">Play / Pause</button>
<label style="display:flex; align-items:center; gap:5px;">
FPS: <input type="number" id="fpsInput" value="15" style="width: 60px;" min="1" max="60" />
</label>
</div>
<div class="preview-area">
<div class="sprite-display" id="spriteDisplay"></div>
</div>
<div id="frameInfo">Loading mappings...</div>
<div class="timeline" id="timeline"></div>
<script type="module" src="/src/viewer.ts"></script>
</body>
</html>