Open hex-spell opened 1 year ago
Hey @hex-spell, thanks for the contribution! Though there's a few things I would like changed before merging this.
The major thing being that once the throttle is enabled, the UI update feels slow. I would apply the throttle directly to the MIDI message output somehow instead of just the mouse move.
The throttle also doesn't apply to the DraggableSelect
and MDMWaveform
components, which can have the same issue as the MDMDial
component as they have mouse inputs.
The import of lodash should be a named import (import { throttle } from "lodash";
) to allow webpack to tree-shake the unused lodash modules from the resulting JavaScript bundle.
And lastly, the naming of "Knob Throttle". I'd prefer something like "Mouse Throttle" as it's only to do with the mouse input and should be applied to the MDMDial
, DraggableSelect
and MDMWaveform
components.
And also, once complete and explanation of the Mouse Throttle feature in the README would be appreciated.
Add knob throttle feature
This fixes #176, the change is more noticeable in poly mode.