mirror of
https://codeberg.org/armin/tcdweb.git
synced 2026-09-01 05:30:45 +02:00
Add peak hold decay rate selector
Introduce a new dropdown to control how fast the peak-hold line decays on the live spectrum. Options: Off — peaks never decay (manual reset only) Slow — slow fade (0.005/frame) Medium — moderate fade (0.015/frame, matches previous fixed rate) Fast — quick fade (0.03/frame) Previously the decay rate was hardcoded at 0.015/frame.
This commit is contained in:
parent
210b4c2d3d
commit
e159b76e0d
2 changed files with 9 additions and 1 deletions
|
|
@ -616,7 +616,9 @@ const App = {
|
|||
ctx.stroke();
|
||||
|
||||
if (this.holdPeaks) {
|
||||
const decay = 0.015;
|
||||
const decaySel = document.getElementById('peakHoldDecay');
|
||||
const decayMap = { off: 0, slow: 0.005, medium: 0.015, fast: 0.03 };
|
||||
const decay = decaySel ? (decayMap[decaySel.value] ?? 0.015) : 0.015;
|
||||
ctx.beginPath();
|
||||
let started = false;
|
||||
for (let x = 0; x < chartW; x++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue