georgealways / lil-gui

Makes a floating panel for controllers on the web. Works as a drop-in replacement for dat.gui in most projects.
https://lil-gui.georgealways.com/
MIT License
1.14k stars 46 forks source link

Drag-Controls without min/max values #145

Closed GniLudio closed 4 hours ago

GniLudio commented 5 hours ago

It would be nice if the number field could have drag-controls without a minimum and maximum value.

Version 1

Allow the name next to the default number field to be dragged when step is set.

Version 2

Add two new parameter dragStart and dragEnd that can be used instead of min and max. When dragging the mouse over the edge, the value keeps increasing/decreasing, but the value isn't limited to specified range.

georgealways commented 5 hours ago

You should already be able to drag the field for number controllers, even if they don't have min & max. If you can't drag the fields in the first panel here, let me know what browser and OS you're using.

GniLudio commented 4 hours ago

You should already be able to drag the field for number controllers, even if they don't have min & max. If you can't drag the fields in the first panel here, let me know what browser and OS you're using.

I always only tried horizontal dragging (like the slider), but now realized that the normal number field allows vertical dragging. Thanks for your help.