diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-11 14:56:28 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-11 14:56:28 +0100 |
| commit | e28171ff3679e8e172d438c796751bf823dfe7f8 (patch) | |
| tree | c167b9d67b8950b85c5037f6c5ede3bf84fdf697 /animism-align/frontend/app/views/editor/timeline | |
| parent | 37896f6960f8145a13e2943fbb0cde52da430d30 (diff) | |
loading peaks correctly
Diffstat (limited to 'animism-align/frontend/app/views/editor/timeline')
| -rw-r--r-- | animism-align/frontend/app/views/editor/timeline/components/waveform.component.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/animism-align/frontend/app/views/editor/timeline/components/waveform.component.js b/animism-align/frontend/app/views/editor/timeline/components/waveform.component.js index 0161129..992f0d5 100644 --- a/animism-align/frontend/app/views/editor/timeline/components/waveform.component.js +++ b/animism-align/frontend/app/views/editor/timeline/components/waveform.component.js @@ -68,13 +68,13 @@ class Waveform extends Component { for (i = 0; i < pixelWidth; i++) { step = i * stepsPerPixel + stepMin peak = peaks[step] - y = (1 - peak) * waveformPeak + y = (1 - peak / 127) * waveformPeak ctx.lineTo(y, i) } for (i = pixelWidth - 1; i > 0; i--) { step = i * stepsPerPixel + stepMin peak = peaks[step] - y = (1 + peak) * waveformPeak + y = (1 + peak / 127) * waveformPeak ctx.lineTo(y, i) } ctx.lineTo(origin, 0) |
