Use external value in canvas

Hey guys,

Very new to p5js but finding it quite fun!

Anyways...I have an element above my canvas but I need to pass that value into my canvas when a button (within the canvas) is pressed...how do I go about doing this?

Also I am aware that I can create the input using p5js and then get the value that way but I can not do this because of the way the site is structured.

If you are familiar with jQuery what I am essentially trying to do is var input = $('input').val(); but from within p5js.

Thanks!

Cleanboy

Tagged:
Sign In or Register to comment.