mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 10:15:31 +00:00
Use constants
This commit is contained in:
parent
d01c143250
commit
b302f5046b
1 changed files with 5 additions and 2 deletions
|
|
@ -3,6 +3,9 @@ import screenfull from "screenfull";
|
|||
import butterchurn from "butterchurn";
|
||||
import reactionDiffusion2 from "butterchurn-presets/presets/converted/Geiss - Reaction Diffusion 2";
|
||||
|
||||
const PRESET_TRANSITION_SECONDS = 2.7;
|
||||
const MILLISECONDS_BETWEEN_PRESET_TRANSITIONS = 15000;
|
||||
|
||||
class MilkdropWindow extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
|
@ -29,8 +32,8 @@ class MilkdropWindow extends React.Component {
|
|||
this.cycleInterval = setInterval(() => {
|
||||
const presetIdx = Math.floor(presetKeys.length * Math.random());
|
||||
const preset = presets[presetKeys[presetIdx]];
|
||||
this.visualizer.loadPreset(preset, 2.7);
|
||||
}, 15000);
|
||||
this.visualizer.loadPreset(preset, PRESET_TRANSITION_SECONDS);
|
||||
}, MILLISECONDS_BETWEEN_PRESET_TRANSITIONS);
|
||||
});
|
||||
}
|
||||
componentWillUnmount() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue