Spaces:
Sleeping
Sleeping
ui: collapsible raw-model-output section
Browse files- static/app.js +24 -0
- static/styles.css +28 -0
static/app.js
CHANGED
|
@@ -260,6 +260,7 @@ function renderSeedCard(s, rank) {
|
|
| 260 |
</div>
|
| 261 |
</div>
|
| 262 |
|
|
|
|
| 263 |
<div class="seed-concept">${escapeHtml(seed.concept)}</div>
|
| 264 |
|
| 265 |
<div class="seed-section-title">Pixar Story Spine · ${seed.duration}s · ${seed.beats.length} beats</div>
|
|
@@ -279,6 +280,8 @@ function renderSeedCard(s, rank) {
|
|
| 279 |
`).join('')}
|
| 280 |
</div>
|
| 281 |
|
|
|
|
|
|
|
| 282 |
<div class="scores-section">
|
| 283 |
<div class="radar-wrap"><canvas></canvas></div>
|
| 284 |
<div class="scores-table">
|
|
@@ -330,6 +333,27 @@ function renderSeedCard(s, rank) {
|
|
| 330 |
return card;
|
| 331 |
}
|
| 332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
function renderBeatBar(beats, duration) {
|
| 334 |
return beats.map((b, i) => {
|
| 335 |
const pct = ((b.time_range[1] - b.time_range[0]) / duration) * 100;
|
|
|
|
| 260 |
</div>
|
| 261 |
</div>
|
| 262 |
|
| 263 |
+
<div class="seed-section-title">Concept</div>
|
| 264 |
<div class="seed-concept">${escapeHtml(seed.concept)}</div>
|
| 265 |
|
| 266 |
<div class="seed-section-title">Pixar Story Spine · ${seed.duration}s · ${seed.beats.length} beats</div>
|
|
|
|
| 280 |
`).join('')}
|
| 281 |
</div>
|
| 282 |
|
| 283 |
+
${renderRawDetails(seed)}
|
| 284 |
+
|
| 285 |
<div class="scores-section">
|
| 286 |
<div class="radar-wrap"><canvas></canvas></div>
|
| 287 |
<div class="scores-table">
|
|
|
|
| 333 |
return card;
|
| 334 |
}
|
| 335 |
|
| 336 |
+
function renderRawDetails(seed) {
|
| 337 |
+
const parts = [];
|
| 338 |
+
if (seed.raw_collision) {
|
| 339 |
+
parts.push(`
|
| 340 |
+
<details class="raw-details">
|
| 341 |
+
<summary>📝 모델 원본 출력 · Concept (참고자료)</summary>
|
| 342 |
+
<pre class="raw-body">${escapeHtml(seed.raw_collision)}</pre>
|
| 343 |
+
</details>
|
| 344 |
+
`);
|
| 345 |
+
}
|
| 346 |
+
if (seed.raw_spine) {
|
| 347 |
+
parts.push(`
|
| 348 |
+
<details class="raw-details">
|
| 349 |
+
<summary>📝 모델 원본 출력 · Pixar Spine (참고자료)</summary>
|
| 350 |
+
<pre class="raw-body">${escapeHtml(seed.raw_spine)}</pre>
|
| 351 |
+
</details>
|
| 352 |
+
`);
|
| 353 |
+
}
|
| 354 |
+
return parts.join('');
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
function renderBeatBar(beats, duration) {
|
| 358 |
return beats.map((b, i) => {
|
| 359 |
const pct = ((b.time_range[1] - b.time_range[0]) / duration) * 100;
|
static/styles.css
CHANGED
|
@@ -538,6 +538,34 @@ input[type="range"] { padding: 0; width: 100%; accent-color: var(--primary); }
|
|
| 538 |
font-variant-numeric: tabular-nums;
|
| 539 |
}
|
| 540 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 541 |
/* Beat color palette (6 beats, indigo → rose) */
|
| 542 |
.beat-color-0 { background: #6366f1; }
|
| 543 |
.beat-color-1 { background: #8b5cf6; }
|
|
|
|
| 538 |
font-variant-numeric: tabular-nums;
|
| 539 |
}
|
| 540 |
|
| 541 |
+
/* Raw model output (collapsible reference) */
|
| 542 |
+
.raw-details {
|
| 543 |
+
margin-top: 14px;
|
| 544 |
+
border: 1px dashed var(--border-strong);
|
| 545 |
+
border-radius: var(--radius-sm);
|
| 546 |
+
background: #fbfbfd;
|
| 547 |
+
padding: 10px 14px;
|
| 548 |
+
}
|
| 549 |
+
.raw-details summary {
|
| 550 |
+
cursor: pointer; font-weight: 600;
|
| 551 |
+
color: var(--text-muted); font-size: 12px;
|
| 552 |
+
letter-spacing: 0.02em;
|
| 553 |
+
user-select: none;
|
| 554 |
+
}
|
| 555 |
+
.raw-details[open] summary { margin-bottom: 10px; color: var(--primary); }
|
| 556 |
+
.raw-body {
|
| 557 |
+
font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
|
| 558 |
+
font-size: 11.5px; line-height: 1.55;
|
| 559 |
+
color: var(--text);
|
| 560 |
+
white-space: pre-wrap; word-break: break-word;
|
| 561 |
+
max-height: 320px; overflow-y: auto;
|
| 562 |
+
padding: 10px 12px;
|
| 563 |
+
background: #ffffff;
|
| 564 |
+
border: 1px solid var(--border);
|
| 565 |
+
border-radius: 6px;
|
| 566 |
+
margin: 0;
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
/* Beat color palette (6 beats, indigo → rose) */
|
| 570 |
.beat-color-0 { background: #6366f1; }
|
| 571 |
.beat-color-1 { background: #8b5cf6; }
|