-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathplay.html
More file actions
272 lines (260 loc) · 10.8 KB
/
Copy pathplay.html
File metadata and controls
272 lines (260 loc) · 10.8 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Posecode Playground: Write and Preview 3D Human Movement as Text</title>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://www.posecode.org/favicon-192.png"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://www.posecode.org/apple-touch-icon.png"
/>
<meta
name="description"
content="Try Posecode live: paste a valid .posecode document from a capable model and watch it animate a 3D figure. Browse movements across fitness, physiotherapy, yoga, and dance."
/>
<link rel="canonical" href="https://www.posecode.org/play" />
<meta name="theme-color" content="#0a0d12" />
<meta property="og:title" content="Posecode Playground: live editor for movement as text" />
<meta
property="og:description"
content="Paste a valid .posecode document and watch a 3D figure animate it, with joint targets constrained to configured reference ranges and unresolved reach targets reported."
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.posecode.org/play" />
<meta property="og:site_name" content="Posecode" />
<meta property="og:image" content="https://www.posecode.org/og.png" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<!-- Load fonts without blocking render: fetch as a low-priority stylesheet
(media="print") then flip to "all" once loaded. display=swap paints
text in the fallback immediately, so first paint isn't font-gated. -->
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap"
/>
<link
href="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap"
rel="stylesheet"
media="print"
onload="this.media='all'"
/>
<noscript>
<link
href="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap"
rel="stylesheet"
/>
</noscript>
<link rel="stylesheet" href="./src/style.css" />
</head>
<body>
<!-- Ambient studio backdrop: layered glow + grain, purely decorative -->
<div class="bg-fx" aria-hidden="true"></div>
<header class="topbar">
<a class="brand" href="/" aria-label="Posecode home">
<svg class="logo" aria-hidden="true" viewBox="0 0 100 100" width="18" height="18" fill="none"><g stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"><path d="M50 34V55"/><path d="M50 35L34 26L23 15"/><path d="M50 35L66 26L77 15"/><path d="M50 54L36 72L28 88"/><path d="M50 54L64 72L72 88"/></g><circle cx="50" cy="20" r="10" fill="currentColor"/></svg>
<span class="wordmark">Posecode</span>
<span class="tag">playground</span>
</a>
<div class="topbar-actions">
<button
id="lib-open"
class="lib-btn"
type="button"
aria-haspopup="dialog"
title="Browse the movement library"
>
<span class="lib-btn-kicker">Movement</span>
<span id="lib-current" class="lib-btn-name"></span>
<span id="lib-current-status" class="lib-current-status" hidden>Experimental</span>
<span class="lib-caret" aria-hidden="true"></span>
</button>
<span class="tb-divider" aria-hidden="true"></span>
<button
id="new-doc"
class="btn ghost"
aria-label="New movement"
title="Clear the editor so you can paste a movement from your AI chat"
>
<span class="ico-plus" aria-hidden="true"></span><span class="lbl">New</span>
</button>
<button id="how-to" class="btn ghost" aria-label="How to use">
<span class="ico-help" aria-hidden="true"></span><span class="lbl">How to use</span>
</button>
<a
id="feedback"
href="https://github.com/posecode-dev/posecode/issues/new"
class="btn ghost"
target="_blank"
rel="noreferrer"
aria-label="Report an issue on GitHub"
title="Report an issue on GitHub"
>
<span class="ico-github" aria-hidden="true"></span><span class="lbl">GitHub</span>
</a>
<a
href="https://github.com/posecode-dev/posecode/blob/main/LICENSING.md"
class="btn ghost"
target="_blank"
rel="noreferrer"
aria-label="View source code and licensing"
title="View source code and licensing"
>
<span class="lbl">Source</span>
</a>
<button
id="share"
class="btn ghost"
aria-label="Copy link"
title="Copy a shareable link that renders this exact movement"
>
<span class="ico-link" aria-hidden="true"></span
><span class="lbl" aria-live="polite">Share</span>
</button>
<button
id="copy-prompt"
class="btn primary"
title="Copy a system prompt that teaches an LLM to write .posecode"
>
<span class="lbl">Copy LLM prompt</span>
</button>
</div>
</header>
<div id="intro" class="intro">
<span class="intro-text">
<b>Make something move.</b> Pick a movement or edit the instructions; the
figure updates as you type.
</span>
<button id="intro-open" class="link">Show me how →</button>
<button id="intro-dismiss" class="x" aria-label="Dismiss">×</button>
</div>
<!-- Mobile-only: swap between the editor and the 3D viewer (each full-height) -->
<nav class="mobile-tabs" aria-label="Panel">
<button id="tab-editor" class="mtab" type="button" aria-selected="false">
Editor
</button>
<button id="tab-viewer" class="mtab" type="button" aria-selected="true">
Viewer
</button>
</nav>
<main class="layout">
<section class="editor-pane">
<div class="pane-head">
<span class="traffic" aria-hidden="true"></span>
<span class="file-name">movement.posecode</span>
<span class="live" aria-hidden="true"><i></i>live</span>
</div>
<div class="editor-wrap">
<div id="editor"></div>
</div>
<div id="warnings" class="warnings" aria-live="polite"></div>
</section>
<section class="viewer-pane">
<canvas id="canvas"></canvas>
<div class="viewer-veil" aria-hidden="true"></div>
<div class="hud">
<div id="phase" class="phase"></div>
<div id="cue" class="cue"></div>
</div>
<div id="reps" class="reps"></div>
<div id="ribbon" class="ribbon"></div>
<div class="transport">
<button id="playpause" class="btn-play" data-playing="false">
<span class="ico" aria-hidden="true"></span>
<span class="lbl">Play</span>
</button>
<div class="scrub-wrap">
<input id="scrub" type="range" min="0" max="1000" value="0" />
<div id="markers" class="markers"></div>
</div>
<span id="clock" class="clock">0.0s</span>
<label class="loop"
><input id="loop" type="checkbox" checked /><span>loop</span></label
>
<label class="speed">
<span>speed</span>
<div class="select-wrap sm">
<select id="speed">
<option value="0.5">0.5×</option>
<option value="1" selected>1×</option>
<option value="2">2×</option>
</select>
</div>
</label>
</div>
</section>
</main>
<!-- How-to slide-over -->
<div id="scrim" class="scrim" hidden></div>
<aside id="howto" class="slideover" hidden aria-label="How to use Posecode">
<header class="slideover-head">
<h2>How to use Posecode</h2>
<button id="howto-close" class="x" aria-label="Close">×</button>
</header>
<div class="slideover-body">
<ol class="steps">
<li>
<span class="step-n">1</span>
<div>
<b>Copy the prompt.</b> Click <em>Copy LLM prompt</em> (top right). It teaches
a capable model how to write the Posecode language.
</div>
</li>
<li>
<span class="step-n">2</span>
<div>
<b>Ask an LLM for a movement.</b> Paste the prompt, then ask for what you want:
<em>“write a deadlift”</em>, <em>“a hamstring stretch”</em>, <em>“cat-cow”</em>.
For a representable request, it should reply with only the raw
<code>.posecode</code> document.
</div>
</li>
<li>
<span class="step-n">3</span>
<div>
<b>Paste it here.</b> Drop the raw <code>.posecode</code> text into the editor on
the left. Valid documents animate; parse errors, range clamps, and unresolved
reach targets appear below the editor.
</div>
</li>
</ol>
<div class="prompt-block">
<div class="prompt-head">
<span>The prompt you’ll paste into the LLM</span>
<button id="howto-copy" class="btn ghost sm">Copy</button>
</div>
<pre id="prompt-text"></pre>
</div>
</div>
</aside>
<!-- Movement library: one place to search, filter, and pick an example -->
<aside id="library" class="slideover library" hidden aria-label="Movement library">
<header class="slideover-head">
<h2>Movement library <span id="lib-count" class="count"></span></h2>
<button id="library-close" class="x" aria-label="Close">×</button>
</header>
<div class="lib-tools">
<input
id="lib-search"
type="search"
placeholder="Search: squat, hamstrings, yoga, chair…"
aria-label="Search movements"
autocomplete="off"
/>
<div id="lib-readiness" class="chip-row" role="group" aria-label="Filter by launch readiness"></div>
<div id="lib-domains" class="chip-row" role="group" aria-label="Filter by practice"></div>
<div id="lib-levels" class="chip-row" role="group" aria-label="Filter by level"></div>
</div>
<div id="lib-list" class="lib-list"></div>
</aside>
<script type="module" src="./src/main.ts"></script>
</body>
</html>