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

setup() and preload() runs only when VR is entered for first time #26

Open
vedhant opened this issue May 30, 2019 · 0 comments
Open

setup() and preload() runs only when VR is entered for first time #26

vedhant opened this issue May 30, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@vedhant
Copy link
Contributor

vedhant commented May 30, 2019

When VR is exited by clicking the little cross on the corner and when it is entered again by clicking "Enter VR" (without page refreshing), setup() and preload() do not run. Only draw() loop runs on subsequent VR sessions.
This is happening because p5 global object is being made only once. Exiting out of VR session does not remove p5 global instance.

Also, VR continues from where it left off when re entered. This is because the global variables are not reset on the next VR session.

@vedhant vedhant added the bug Something isn't working label May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant