-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
change load order preload method #3536
Comments
@stalgiag I feel we could use |
I'm thinking it would either be explicit or implecit. Explicit meaning that we choose as a default Implicit would mean that we will need to somehow detect which case would be the best, such as if the user have code that references assets in the DOM then uses |
Yes @limzykenneth I was suggesting something explicit but if anyone has any thoughts on how it might be done implicitly that would be really neat. I am not sure how that detection could be written. |
I have no idea either about how to implement the implicit one (not off the top of my head anyway) but I feel that the explicit route may be a bit much for a beginner to handle if the default is |
i would recommend retaining the current default and adding an explicit switch (maybe |
This feature request is based on the discussion in #3347.
Essentially some users may want a p5 sketch to load first when used as an element on a page with a high number of external assets. @calebegg proposed that this could be achieved by initializing p5 with the DOMContentLoaded event rather than the load event which is the current default.
Here is a visual explanation of the difference between the two events..
What do people think about this as a feature?
The text was updated successfully, but these errors were encountered: