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

Correct implementation of no_loop() #176

Merged
merged 1 commit into from
Jun 7, 2020
Merged

Conversation

tushar5526
Copy link
Member

@tushar5526 tushar5526 commented May 31, 2020

Closes #175

#158 had problem of draw() being called two times if we use no_loop() inside draw() function, which was fixed by a PR by me but it led to #175, that is no_loop() when used in setup() don't call draw() once, as per Processing original documentation

This PR calls draw() once when used in setup() and don't call draw() again if no_loop() is used in draw() again, also I have tested the frame_count for each call and frame_count is being incremented as described by @jeremydouglass in #162 comments,

The issue #158 and #162 is taken care by this PR , I have tested the code for loop(), no_loop(), redraw() for both in setup() and draw() functions and some other codes from examples of p5

But you can test it for some other scenarios too :)

PS : size() when used in setup() along with no_loop() is still buggy, but I don't think it is happening due to no_loop()

@ziyaointl ziyaointl force-pushed the master branch 2 times, most recently from cd51361 to e2a7bf9 Compare June 2, 2020 08:05
@arihantparsoya arihantparsoya merged commit b8a2a63 into p5py:master Jun 7, 2020
@arihantparsoya
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

no_loop() when used in setup() don't call draw() but it should call draw() only once
2 participants