Skip to content

Commit 702830a

Browse files
committed
Add ability to disable MIDI.
1 parent 5e1cf1a commit 702830a

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

dist/gui.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@malven/gui",
3-
"version": "1.4.1",
3+
"version": "1.5.0",
44
"description": "An abstraction layer over dat.gui that simplifies use and adds automatic support through MIDI devices.",
55
"main": "dist/gui.umd.js",
66
"scripts": {

src/gui.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const Gui = function(options) {
2020
enabled: true,
2121
gui: new dat.GUI,
2222
midiPerColor: 4,
23+
midi: true,
2324
colors: [
2425
'#ee907b',
2526
'#2ed9c3',
@@ -82,6 +83,8 @@ const Gui = function(options) {
8283
};
8384

8485
const _addMidi = function() {
86+
if (!self.midi) return;
87+
8588
midiReady = new Promise((res) => {
8689
const webmidiEnabled = navigator.requestMIDIAccess;
8790

0 commit comments

Comments
 (0)