dataarts / dat.gui

Lightweight controller library for JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Display formatter

Donitzo opened this issue · comments

Hello!

The ability of adding a display formatter function for a controller would be extremely helpful when working with real units, like meters, seconds etc..

That is, adding a function which takes a boolean/number/string, and returns the string to display. For example:
gui.add(params, 'distanceToTarget').onFormat(value => value + ' m');

Donitzo super cool idea!