processing / p5.js-editor

Deprecated desktop editor for p5.js
https://p5js.org
MIT License
338 stars 91 forks source link

Error when trying to draw a simple shape outside of setup or draw functions #192

Closed geoffalday closed 8 years ago

geoffalday commented 8 years ago

It looks like trying to draw a simple shape outside of the setup() or draw() functions causes an error (see attached). This works fine when placed in those functions. I realize it's not a best practice to structure sketches like this but wanted to let you know. I found this while working through the new P5.js course on Kadenze. Thanks!

p5-error-ellipse

antiboredom commented 8 years ago

Thanks for posting. This is actually just part of p5 - the functions only work within setup and draw (or functions that are called from within setup and draw)

geoffalday commented 8 years ago

@antiboredom Thanks! Excited about this project.