Skip to content
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

p5: retain state from draw-to-draw #9

Open
sbinet opened this issue Nov 14, 2020 · 0 comments
Open

p5: retain state from draw-to-draw #9

sbinet opened this issue Nov 14, 2020 · 0 comments

Comments

@sbinet
Copy link
Contributor

sbinet commented Nov 14, 2020

in Processing and in p5js, the state of the display is retained from iteration to iteration.

right now, in p5, we don't (so, for example, in the mouse-pressed example, the circle around the mouse follows the mouse but doesn't leave a trail of circles across its path, as the p5js example does.)

that's actually a feature of Gio.

to "simulate" the same behaviour, we could have an image.Image field that is drawn to at the end of each draw cycle.
at cycle+1, we draw that last image.Image before invoking the user's draw function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant