JacobLinCool commited on
Commit
e97569f
·
verified ·
1 Parent(s): 68877f9

Fix SVG stage geometry and motion anchors

Browse files
Files changed (2) hide show
  1. static/app.css +17 -20
  2. static/index.html +22 -12
static/app.css CHANGED
@@ -926,7 +926,7 @@ audio {
926
  .stage-canvas {
927
  position: relative;
928
  overflow: hidden;
929
- aspect-ratio: 1.55 / 1;
930
  color: var(--red);
931
  background:
932
  radial-gradient(circle at 32% 38%, rgba(217, 71, 62, .18), transparent 45%),
@@ -961,6 +961,7 @@ audio {
961
  }
962
 
963
  .stage-visual.is-active {
 
964
  visibility: visible;
965
  opacity: 1;
966
  transform: scale(1);
@@ -1101,8 +1102,8 @@ audio {
1101
 
1102
  /* Audio */
1103
  .audio-line {
1104
- stroke-dasharray: 720;
1105
- stroke-dashoffset: 720;
1106
  }
1107
  .is-active .audio-line { animation: draw-line 2.4s var(--ease) infinite; }
1108
  .audio-playhead { transform: translateX(24px); }
@@ -1112,15 +1113,15 @@ audio {
1112
  .metronome { transform-origin: 0 100%; }
1113
  .is-active .metronome { animation: metronome 1s ease-in-out infinite alternate; }
1114
  .is-active .beat-pulses circle { animation: beat-pulse 2s ease-out infinite; }
1115
- .is-active .beat-pulses circle:nth-child(2) { animation-delay: .4s; }
1116
- .is-active .beat-pulses circle:nth-child(3) { animation-delay: .8s; }
1117
- .is-active .beat-pulses circle:nth-child(4) { animation-delay: 1.2s; }
1118
- .is-active .beat-pulses circle:nth-child(5) { animation-delay: 1.6s; }
1119
 
1120
  /* Plan */
1121
  .plan-bars rect { fill: currentColor; opacity: .13; }
1122
  .plan-bars .plan-climax { fill: var(--red); opacity: .42; }
1123
- .is-active .plan-bars rect { animation: plan-rise 1.9s var(--ease) infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
1124
  .is-active .plan-bars rect:nth-child(2) { animation-delay: .12s; }
1125
  .is-active .plan-bars rect:nth-child(3) { animation-delay: .24s; }
1126
  .is-active .plan-bars rect:nth-child(4) { animation-delay: .36s; }
@@ -1137,10 +1138,10 @@ audio {
1137
  .note .ka,
1138
  .export-dots .ka { fill: var(--blue); }
1139
  .is-active .note { animation: note-travel 3.2s linear infinite; }
1140
- .is-active .note-2 { animation-delay: -.65s; }
1141
- .is-active .note-3 { animation-delay: -1.3s; }
1142
- .is-active .note-4 { animation-delay: -1.95s; }
1143
- .is-active .note-5 { animation-delay: -2.6s; }
1144
  .is-active .generate-gate { animation: gate-pulse 1.05s ease-out infinite; transform-box: fill-box; transform-origin: center; }
1145
 
1146
  /* Export */
@@ -1461,15 +1462,15 @@ footer a:hover {
1461
  @keyframes dot-breathe { 50% { opacity: .3; transform: scale(.6); } }
1462
 
1463
  @keyframes draw-line {
1464
- 0% { stroke-dashoffset: 720; }
1465
  55%, 100% { stroke-dashoffset: 0; }
1466
  }
1467
 
1468
  @keyframes audio-scan {
1469
  0% { transform: translateX(24px); opacity: 0; }
1470
  10% { opacity: 1; }
1471
- 80% { transform: translateX(472px); opacity: 1; }
1472
- 100% { transform: translateX(472px); opacity: 0; }
1473
  }
1474
 
1475
  @keyframes metronome {
@@ -1507,7 +1508,7 @@ footer a:hover {
1507
 
1508
  @keyframes note-travel {
1509
  from { transform: translate(560px, 140px); }
1510
- to { transform: translate(25px, 140px); }
1511
  }
1512
 
1513
  @keyframes gate-pulse {
@@ -1676,10 +1677,6 @@ footer a:hover {
1676
  padding: 11px 9px;
1677
  }
1678
 
1679
- .stage-canvas {
1680
- aspect-ratio: 4 / 3;
1681
- }
1682
-
1683
  .metrics-grid {
1684
  gap: 6px;
1685
  }
 
926
  .stage-canvas {
927
  position: relative;
928
  overflow: hidden;
929
+ aspect-ratio: 13 / 7;
930
  color: var(--red);
931
  background:
932
  radial-gradient(circle at 32% 38%, rgba(217, 71, 62, .18), transparent 45%),
 
961
  }
962
 
963
  .stage-visual.is-active {
964
+ z-index: 1;
965
  visibility: visible;
966
  opacity: 1;
967
  transform: scale(1);
 
1102
 
1103
  /* Audio */
1104
  .audio-line {
1105
+ stroke-dasharray: 1;
1106
+ stroke-dashoffset: 1;
1107
  }
1108
  .is-active .audio-line { animation: draw-line 2.4s var(--ease) infinite; }
1109
  .audio-playhead { transform: translateX(24px); }
 
1113
  .metronome { transform-origin: 0 100%; }
1114
  .is-active .metronome { animation: metronome 1s ease-in-out infinite alternate; }
1115
  .is-active .beat-pulses circle { animation: beat-pulse 2s ease-out infinite; }
1116
+ .is-active .beat-pulses circle:nth-child(2) { animation-delay: -.4s; }
1117
+ .is-active .beat-pulses circle:nth-child(3) { animation-delay: -.8s; }
1118
+ .is-active .beat-pulses circle:nth-child(4) { animation-delay: -1.2s; }
1119
+ .is-active .beat-pulses circle:nth-child(5) { animation-delay: -1.6s; }
1120
 
1121
  /* Plan */
1122
  .plan-bars rect { fill: currentColor; opacity: .13; }
1123
  .plan-bars .plan-climax { fill: var(--red); opacity: .42; }
1124
+ .is-active .plan-bars rect { animation: plan-rise 1.9s var(--ease) infinite alternate both; transform-box: fill-box; transform-origin: center bottom; }
1125
  .is-active .plan-bars rect:nth-child(2) { animation-delay: .12s; }
1126
  .is-active .plan-bars rect:nth-child(3) { animation-delay: .24s; }
1127
  .is-active .plan-bars rect:nth-child(4) { animation-delay: .36s; }
 
1138
  .note .ka,
1139
  .export-dots .ka { fill: var(--blue); }
1140
  .is-active .note { animation: note-travel 3.2s linear infinite; }
1141
+ .is-active .note-2 { animation-delay: -.64s; }
1142
+ .is-active .note-3 { animation-delay: -1.28s; }
1143
+ .is-active .note-4 { animation-delay: -1.92s; }
1144
+ .is-active .note-5 { animation-delay: -2.56s; }
1145
  .is-active .generate-gate { animation: gate-pulse 1.05s ease-out infinite; transform-box: fill-box; transform-origin: center; }
1146
 
1147
  /* Export */
 
1462
  @keyframes dot-breathe { 50% { opacity: .3; transform: scale(.6); } }
1463
 
1464
  @keyframes draw-line {
1465
+ 0% { stroke-dashoffset: 1; }
1466
  55%, 100% { stroke-dashoffset: 0; }
1467
  }
1468
 
1469
  @keyframes audio-scan {
1470
  0% { transform: translateX(24px); opacity: 0; }
1471
  10% { opacity: 1; }
1472
+ 80% { transform: translateX(496px); opacity: 1; }
1473
+ 100% { transform: translateX(496px); opacity: 0; }
1474
  }
1475
 
1476
  @keyframes metronome {
 
1508
 
1509
  @keyframes note-travel {
1510
  from { transform: translate(560px, 140px); }
1511
+ to { transform: translate(-36px, 140px); }
1512
  }
1513
 
1514
  @keyframes gate-pulse {
 
1677
  padding: 11px 9px;
1678
  }
1679
 
 
 
 
 
1680
  .metrics-grid {
1681
  gap: 6px;
1682
  }
static/index.html CHANGED
@@ -216,7 +216,7 @@
216
  <div class="stage-visual" data-stage="audio" aria-hidden="true">
217
  <svg viewBox="0 0 520 280">
218
  <path class="audio-line-back" d="M24 140C54 140 61 112 84 112s28 68 51 68 31-115 55-115 30 150 53 150 33-104 57-104 30 59 55 59 29-76 52-76 29 46 49 46h40" fill="none" stroke="currentColor" stroke-width="2" opacity=".14"/>
219
- <path class="audio-line" d="M24 140C54 140 61 112 84 112s28 68 51 68 31-115 55-115 30 150 53 150 33-104 57-104 30 59 55 59 29-76 52-76 29 46 49 46h40" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"/>
220
  <g class="audio-playhead"><path d="M0 48v184" stroke="currentColor" stroke-width="1.5" opacity=".45"/><circle cy="140" r="7" fill="currentColor"/></g>
221
  <g fill="currentColor" opacity=".22"><circle cx="84" cy="112" r="4"/><circle cx="190" cy="65" r="4"/><circle cx="300" cy="111" r="4"/><circle cx="407" cy="94" r="4"/></g>
222
  </svg>
@@ -227,9 +227,11 @@
227
  <path d="M72 205h376" stroke="currentColor" stroke-width="2" opacity=".14"/>
228
  <g class="beat-ticks" stroke="currentColor" opacity=".26"><path d="M100 192v26M180 192v26M260 185v40M340 192v26M420 192v26"/></g>
229
  <path class="beat-arc" d="M182 199a78 78 0 0 1 156 0" fill="none" stroke="currentColor" stroke-width="3" opacity=".18"/>
230
- <g class="metronome" transform="translate(260 199)">
231
- <path d="M0 0 54-118" stroke="currentColor" stroke-width="5" stroke-linecap="round"/>
232
- <circle cx="54" cy="-118" r="10" fill="currentColor"/>
 
 
233
  </g>
234
  <g class="beat-pulses" fill="currentColor"><circle cx="100" cy="205" r="7"/><circle cx="180" cy="205" r="7"/><circle cx="260" cy="205" r="10"/><circle cx="340" cy="205" r="7"/><circle cx="420" cy="205" r="7"/></g>
235
  </svg>
@@ -263,17 +265,21 @@
263
  <g class="note note-4"><circle r="20" class="ka"/><circle r="11" fill="#fff8ed" opacity=".2"/></g>
264
  <g class="note note-5"><circle r="20"/><circle r="11" fill="#fff8ed" opacity=".2"/></g>
265
  </g>
266
- <g class="generate-gate" transform="translate(93 140)"><circle r="42" fill="none" stroke="currentColor" stroke-width="2" opacity=".22"/><circle r="31" fill="none" stroke="currentColor" stroke-width="2" opacity=".38"/><path d="M0-49v98" stroke="currentColor" stroke-width="3"/></g>
 
 
267
  </svg>
268
  </div>
269
 
270
  <div class="stage-visual" data-stage="export" aria-hidden="true">
271
  <svg viewBox="0 0 520 280">
272
- <g class="export-sheet" transform="translate(175 34)">
273
- <path d="M8 0h126l42 42v189H8z" fill="currentColor" opacity=".08"/>
274
- <path d="M134 0v42h42" fill="none" stroke="currentColor" stroke-width="2" opacity=".35"/>
275
- <g class="export-lines" stroke="currentColor" stroke-width="3" stroke-linecap="round"><path d="M38 77h108M38 104h78M38 131h108M38 158h91"/></g>
276
- <g class="export-dots" fill="currentColor"><circle cx="48" cy="194" r="8"/><circle cx="76" cy="194" r="8" class="ka"/><circle cx="104" cy="194" r="8"/><circle cx="132" cy="194" r="8" class="ka"/></g>
 
 
277
  </g>
278
  <path class="export-arrow" d="M366 91v105m0 0-20-20m20 20 20-20" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
279
  </svg>
@@ -283,14 +289,18 @@
283
  <svg viewBox="0 0 520 280">
284
  <g class="mix-wave wave-top" fill="none" stroke="currentColor" stroke-width="3"><path d="M35 93c26 0 26-32 52-32s26 64 52 64 26-64 52-64 26 64 52 64 26-64 52-64 26 64 52 64 26-64 52-64 26 32 52 32h46"/></g>
285
  <g class="mix-wave wave-bottom" fill="none" stroke="currentColor" stroke-width="3"><path d="M35 187c34 0 34-22 68-22s34 44 68 44 34-44 68-44 34 44 68 44 34-44 68-44 34 22 68 22h72"/></g>
286
- <g class="mix-drum" transform="translate(260 140)"><circle r="48" fill="#fff8ed" stroke="currentColor" stroke-width="4"/><circle r="35" fill="currentColor" opacity=".12"/><circle r="13" fill="currentColor"/></g>
 
 
287
  <g class="mix-spark" fill="currentColor"><circle cx="201" cy="119" r="5"/><circle cx="319" cy="161" r="5"/><circle cx="312" cy="100" r="3"/><circle cx="211" cy="177" r="3"/></g>
288
  </svg>
289
  </div>
290
 
291
  <div class="stage-visual" data-stage="complete" aria-hidden="true">
292
  <svg viewBox="0 0 520 280">
293
- <g class="complete-rings" transform="translate(260 140)"><circle r="81" fill="none" stroke="currentColor" stroke-width="2" opacity=".12"/><circle r="64" fill="currentColor" opacity=".1"/><circle r="47" fill="currentColor"/></g>
 
 
294
  <path class="complete-check" d="m235 140 17 17 35-38" fill="none" stroke="#fff8ed" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>
295
  <g class="confetti" fill="currentColor"><rect x="165" y="65" width="7" height="18" rx="3" transform="rotate(-35 168 74)"/><rect x="350" y="70" width="7" height="18" rx="3" transform="rotate(28 353 79)"/><circle cx="177" cy="201" r="6"/><circle cx="350" cy="207" r="5"/><path d="m387 139 12-7-1 14z"/><path d="m126 132 13-5-3 14z"/></g>
296
  </svg>
 
216
  <div class="stage-visual" data-stage="audio" aria-hidden="true">
217
  <svg viewBox="0 0 520 280">
218
  <path class="audio-line-back" d="M24 140C54 140 61 112 84 112s28 68 51 68 31-115 55-115 30 150 53 150 33-104 57-104 30 59 55 59 29-76 52-76 29 46 49 46h40" fill="none" stroke="currentColor" stroke-width="2" opacity=".14"/>
219
+ <path class="audio-line" pathLength="1" d="M24 140C54 140 61 112 84 112s28 68 51 68 31-115 55-115 30 150 53 150 33-104 57-104 30 59 55 59 29-76 52-76 29 46 49 46h40" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"/>
220
  <g class="audio-playhead"><path d="M0 48v184" stroke="currentColor" stroke-width="1.5" opacity=".45"/><circle cy="140" r="7" fill="currentColor"/></g>
221
  <g fill="currentColor" opacity=".22"><circle cx="84" cy="112" r="4"/><circle cx="190" cy="65" r="4"/><circle cx="300" cy="111" r="4"/><circle cx="407" cy="94" r="4"/></g>
222
  </svg>
 
227
  <path d="M72 205h376" stroke="currentColor" stroke-width="2" opacity=".14"/>
228
  <g class="beat-ticks" stroke="currentColor" opacity=".26"><path d="M100 192v26M180 192v26M260 185v40M340 192v26M420 192v26"/></g>
229
  <path class="beat-arc" d="M182 199a78 78 0 0 1 156 0" fill="none" stroke="currentColor" stroke-width="3" opacity=".18"/>
230
+ <g class="stage-anchor" transform="translate(260 199)">
231
+ <g class="metronome">
232
+ <path d="M0 0 54-118" stroke="currentColor" stroke-width="5" stroke-linecap="round"/>
233
+ <circle cx="54" cy="-118" r="10" fill="currentColor"/>
234
+ </g>
235
  </g>
236
  <g class="beat-pulses" fill="currentColor"><circle cx="100" cy="205" r="7"/><circle cx="180" cy="205" r="7"/><circle cx="260" cy="205" r="10"/><circle cx="340" cy="205" r="7"/><circle cx="420" cy="205" r="7"/></g>
237
  </svg>
 
265
  <g class="note note-4"><circle r="20" class="ka"/><circle r="11" fill="#fff8ed" opacity=".2"/></g>
266
  <g class="note note-5"><circle r="20"/><circle r="11" fill="#fff8ed" opacity=".2"/></g>
267
  </g>
268
+ <g class="stage-anchor" transform="translate(93 140)">
269
+ <g class="generate-gate"><circle r="42" fill="none" stroke="currentColor" stroke-width="2" opacity=".22"/><circle r="31" fill="none" stroke="currentColor" stroke-width="2" opacity=".38"/><path d="M0-49v98" stroke="currentColor" stroke-width="3"/></g>
270
+ </g>
271
  </svg>
272
  </div>
273
 
274
  <div class="stage-visual" data-stage="export" aria-hidden="true">
275
  <svg viewBox="0 0 520 280">
276
+ <g class="stage-anchor" transform="translate(175 34)">
277
+ <g class="export-sheet">
278
+ <path d="M8 0h126l42 42v189H8z" fill="currentColor" opacity=".08"/>
279
+ <path d="M134 0v42h42" fill="none" stroke="currentColor" stroke-width="2" opacity=".35"/>
280
+ <g class="export-lines" stroke="currentColor" stroke-width="3" stroke-linecap="round"><path d="M38 77h108M38 104h78M38 131h108M38 158h91"/></g>
281
+ <g class="export-dots" fill="currentColor"><circle cx="48" cy="194" r="8"/><circle cx="76" cy="194" r="8" class="ka"/><circle cx="104" cy="194" r="8"/><circle cx="132" cy="194" r="8" class="ka"/></g>
282
+ </g>
283
  </g>
284
  <path class="export-arrow" d="M366 91v105m0 0-20-20m20 20 20-20" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
285
  </svg>
 
289
  <svg viewBox="0 0 520 280">
290
  <g class="mix-wave wave-top" fill="none" stroke="currentColor" stroke-width="3"><path d="M35 93c26 0 26-32 52-32s26 64 52 64 26-64 52-64 26 64 52 64 26-64 52-64 26 64 52 64 26-64 52-64 26 32 52 32h46"/></g>
291
  <g class="mix-wave wave-bottom" fill="none" stroke="currentColor" stroke-width="3"><path d="M35 187c34 0 34-22 68-22s34 44 68 44 34-44 68-44 34 44 68 44 34-44 68-44 34 22 68 22h72"/></g>
292
+ <g class="stage-anchor" transform="translate(260 140)">
293
+ <g class="mix-drum"><circle r="48" fill="#fff8ed" stroke="currentColor" stroke-width="4"/><circle r="35" fill="currentColor" opacity=".12"/><circle r="13" fill="currentColor"/></g>
294
+ </g>
295
  <g class="mix-spark" fill="currentColor"><circle cx="201" cy="119" r="5"/><circle cx="319" cy="161" r="5"/><circle cx="312" cy="100" r="3"/><circle cx="211" cy="177" r="3"/></g>
296
  </svg>
297
  </div>
298
 
299
  <div class="stage-visual" data-stage="complete" aria-hidden="true">
300
  <svg viewBox="0 0 520 280">
301
+ <g class="stage-anchor" transform="translate(260 140)">
302
+ <g class="complete-rings"><circle r="81" fill="none" stroke="currentColor" stroke-width="2" opacity=".12"/><circle r="64" fill="currentColor" opacity=".1"/><circle r="47" fill="currentColor"/></g>
303
+ </g>
304
  <path class="complete-check" d="m235 140 17 17 35-38" fill="none" stroke="#fff8ed" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>
305
  <g class="confetti" fill="currentColor"><rect x="165" y="65" width="7" height="18" rx="3" transform="rotate(-35 168 74)"/><rect x="350" y="70" width="7" height="18" rx="3" transform="rotate(28 353 79)"/><circle cx="177" cy="201" r="6"/><circle cx="350" cy="207" r="5"/><path d="m387 139 12-7-1 14z"/><path d="m126 132 13-5-3 14z"/></g>
306
  </svg>