bitcraftlab / p5.gui

p5.gui magically generates a graphical user interface for your p5.js sketches
https://bitcraftlab.github.io/p5.gui
MIT License
357 stars 91 forks source link

addObject with arguments #3

Closed audiocommander closed 7 years ago

audiocommander commented 7 years ago

Hi there Martin,

just stumbled upon this awesome library. I want to be able to not only add globals, but objects and their parameters, which seems to be already present in your code - except that the argument list is not an array and therefore has no method splice (at least on webkit). So I added this argument object to array conversion, now it works pretty fine.

Cheers, Michael

craftoid commented 7 years ago

Hey Michael!

Thanks for your pull request and sorry for the delay. I took some time off during the holidays, but know I'm ready to rock :)

Yes, adding objects is intended and makes a lot of sense. Especially when running p5.js in instance mode.

If you have a simple example, feel free to add it. The most important part of this library are probably the examples + good documentation :)

Cheers,
Martin

audiocommander commented 7 years ago

Hey Martin, sure thing! I would surely write an example as soon as function calls are also supported. I tried to look into that, but somehow got lost a bit. If I'd knew where to add this functionality, I might have another look.

Cheers, Michael

gregberger commented 7 years ago

I added an example in PR #11