Skip to content

_setupDone flag not set properly #7818

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

Open
1 of 17 tasks
quinton-ashley opened this issue May 15, 2025 · 2 comments
Open
1 of 17 tasks

_setupDone flag not set properly #7818

quinton-ashley opened this issue May 15, 2025 · 2 comments

Comments

@quinton-ashley
Copy link
Contributor

quinton-ashley commented May 15, 2025

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

1.11.7

Web browser and version

Chrome

Operating system

macOS

Steps to reproduce this

_setupDone flag is not being set to true after setup finishes.

Seems to only be an issue in global mode, not with p5 instances.

Example:
https://editor.p5js.org/quinton-ashley/sketches/tJkTywzxu

@davepagurek
Copy link
Contributor

Looks like it works as expected if you access it like this:

function setup() {
  createCanvas(400, 400);
  console.log(_renderer._pInst._setupDone);
}

function draw() {
  console.log(_renderer._pInst._setupDone);
  noLoop();
}

So it seems like it's just that the global _setupDone isn't updated. Which might be ok since it's a piece of internal state?

@quinton-ashley
Copy link
Contributor Author

If _setupDone isn't properly updated globally, or as a property of the p5 instance itself, maybe it should be removed if not repaired?

Even though it's internal state, I didn't expect it to break so late in p5 v1's development.

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

No branches or pull requests

2 participants