mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 12:38:35 +00:00
fix: scope pos
This commit is contained in:
parent
62eb9ce598
commit
52e2b90eef
@ -22,10 +22,9 @@ export function drawTimeScope(
|
|||||||
|
|
||||||
const sliceWidth = (canvas.width * 1.0) / bufferSize;
|
const sliceWidth = (canvas.width * 1.0) / bufferSize;
|
||||||
let x = 0;
|
let x = 0;
|
||||||
|
|
||||||
for (let i = triggerIndex; i < bufferSize; i++) {
|
for (let i = triggerIndex; i < bufferSize; i++) {
|
||||||
const v = dataArray[i] + 1;
|
const v = dataArray[i] + 1;
|
||||||
const y = (1 - (scale * (v - 1) + pos)) * canvas.height;
|
const y = (pos - scale * (v - 1)) * canvas.height;
|
||||||
|
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
ctx.moveTo(x, y);
|
ctx.moveTo(x, y);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user