setInterval の機能が動作している間に速度を変更する方法がわかりません..
コード内:
var timeout, count = 0, speed = 5000;
$('#stage').mousedown(function() {
timeout = setInterval(function() {
speed = parseInt(speed / 1.3); // HERE I want change speed
create(speed); // Some Function
}, speed); // This speed, I don't know how to change
});
$('#stage').mouseup(function() {
count = 0;
clearInterval(timeout);
});
これは機能しますが、速度は関数外です const (5000)
すべての助けに感謝します!