dataarts / dat.gui

Lightweight controller library for JavaScript.
Apache License 2.0
7.46k stars 1.08k forks source link

How to change a button's value when clicked? #315

Open e-motiv opened 2 years ago

e-motiv commented 2 years ago

I have a pause/play button as a controller inside gui, but I am not sure if this is the right code for changing its value (pause vs play) when clicked. I didn't find any function parameters on the function itself or onChange function. So, is this it or is there better?

gui.__controllers[0].__li.querySelector(".property-name").textContent=stop?"▶️":"⏸︎"