@real-music-packages/web-core 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scene/index.js +2 -2
- package/dist/scene/index.js.map +1 -1
- package/package.json +1 -1
package/dist/scene/index.js
CHANGED
|
@@ -651,7 +651,7 @@ function audioPlayheadLine(layout, onsetsMs, tMs, barDurMs, noteCols) {
|
|
|
651
651
|
a = anchors[lo];
|
|
652
652
|
b = anchors[lo + 1];
|
|
653
653
|
const dt = b.onsetMs - a.onsetMs;
|
|
654
|
-
frac = dt > 0 ?
|
|
654
|
+
frac = dt > 0 ? (tMs - a.onsetMs) / dt : 0;
|
|
655
655
|
}
|
|
656
656
|
const x = a.x + (b.x - a.x) * frac;
|
|
657
657
|
const y0 = a.y0 + (b.y0 - a.y0) * frac;
|
|
@@ -684,7 +684,7 @@ function vstackAudioPlayheadLine(layout, onsetsMs, tMs, nBars) {
|
|
|
684
684
|
if (onsetsMs[mid] <= tMs) lo = mid;
|
|
685
685
|
else hi = mid - 1;
|
|
686
686
|
}
|
|
687
|
-
const segFrac =
|
|
687
|
+
const segFrac = (tMs - onsetsMs[lo]) / (onsetsMs[lo + 1] - onsetsMs[lo]);
|
|
688
688
|
progress = (lo + segFrac) / (n - 1);
|
|
689
689
|
}
|
|
690
690
|
const colX = (m2, f) => {
|