-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drawing without a (draw) #47
Comments
I have been thinking about this issue, but haven't come to a conclusion yet. On one hand allowing the user to leave out On the other, as I see it, allowing no call to setup complicates at least two things:
The user calls If a user writes this:
he is in principle calling The P5.js project decided not to allow any uses at all of Processing functions outside They explain why here: But what about the original Java version of Processing? https://github.com/processing/processing4/tree/master/core
It seems they regretted allowing programs to run without calling I believe I heard Schiffman say something similar in one of the videos. Now I still think it is a good idea to make it simple to make a static sketch easily without needing to use a Maybe Another possibility is to detect that both But then again - if the Processing project is moving towards a non-optional |
I might be getting out of the loop (pun intended) with where Processing is going. The examples that I'm rewriting are from 2014/2015. I'm not sure that I have any knowledge of Processing other than being able to manipulate my existing code. I've been thinking about this setup/draw issue a bit. I'm a huge functional programming fanboy, so I like the idea of starting people out inside functions. While I'm talking about functions, I want to mention the defsketch function in the quil (clojure) flavor of Processing. That is a way of spelling out how the sketch will run. (I might be talking about 2014/2015 again) (q/defsketch trigonometry |
@all-contributors please add @ericcervin for documentation |
I've put up a pull request to add @ericcervin! 🎉 |
In many of the most basic Processing tutorials that I've worked through, drawing is done without setup/draw. This is an example:
https://processing.org/examples/shapeprimitives.html
I've been using (no-loop) to recreate this in sketching but it would be better if I could leave draw and setup out. If I was teaching Sketching to beginners, I'd have them drawing some rectangles, lines, and ellipses before introducing the draw loop.
One of my own examples using (no-loop):
https://github.com/ericcervin/getting-started-with-sketching/blob/main/pg023.rkt
The text was updated successfully, but these errors were encountered: