Open daiedy opened 3 years ago
I believe the fcn's arg is just the controllers value.
gui.add(controller, 'width', 100, 1000, 25).onChange(width => {
view.setWidth(width)
})
Oh, and many times with an onChange, you really don't care about the actual controller.width value, you only want to call a function with that value like above.
A sneaky trick is to just have a one-parameter "controller" that is not used elsewhere:
gui.add({ width: 700 }, 'width', 100, 1000, 25).onChange(val => {
view.setWidth(val)
})
Please add parameters and what this function should return to the documentation