Thank you GoToLoop. I found the website and downloaded p5.js. Problem is that I don't want to learn the Processing language. I want to do away with the setup()- and draw()-functions and use p5.js as a 'pure' JavaScript library.
What about the type specifiers like 'int' and 'class' that are not in the JavaScript language (yet)? I don't want p5.js to act like a transpiler from one language to another. Just a tutorial on using p5.js in a JavaScript environment. No added language features but with the processing abilities of Processing.
Thank you for that. Still, I can use a tutorial. The functions setup() and draw() are not automatically called. Everything is put in the global namespace (yuk). The tutorial I am looking for will address things like code structure, patterns and typical use cases for Processing. All without prior knowledge of Processing the language.
Answers
I mean, pure JavaScript without added types like int and class. I get that from TypeScript.
http://p5js.org/reference/
Thank you GoToLoop. I found the website and downloaded p5.js. Problem is that I don't want to learn the Processing language. I want to do away with the setup()- and draw()-functions and use p5.js as a 'pure' JavaScript library.
Is that possible?
I don't think so. The core of every Processing spin-off is 1 canvas + setup() + draw().
What about the type specifiers like 'int' and 'class' that are not in the JavaScript language (yet)? I don't want p5.js to act like a transpiler from one language to another. Just a tutorial on using p5.js in a JavaScript environment. No added language features but with the processing abilities of Processing.
https://GitHub.com/processing/p5.js/wiki/Processing-transition
This link is pretty good:
(http://GitHub.com/processing/p5.js/wiki/Processing-transition)
Thank you for that. Still, I can use a tutorial. The functions setup() and draw() are not automatically called. Everything is put in the global namespace (yuk). The tutorial I am looking for will address things like code structure, patterns and typical use cases for Processing. All without prior knowledge of Processing the language.
https://vimeo.com/channels/learningp5js
@Datura said:
Agreed. Use instance mode to avoid this.
Lotsa examples for avoiding "polluting" JS global namespace:
https://forum.Processing.org/two/discussion/14798/how-to-split-a-p5-js-sketch-into-multiple-files