Skip to content

Commit 289c176

Browse files
authored
fixing wording of setup() by removing preload
1 parent bf86b77 commit 289c176

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,10 @@ for (const k in constants) {
462462
* ```
463463
*
464464
* Code placed in `setup()` will run once before code placed in
465-
* <a href="#/p5/draw">draw()</a> begins looping. If the
466-
* <a href="#/p5/preload">preload()</a> is declared, then `setup()` will
467-
* run immediately after <a href="#/p5/preload">preload()</a> finishes
465+
* <a href="#/p5/draw">draw()</a> begins looping. When `setup()` is declared async,
466+
* execution pauses at each `await` until the promise resolves, ensuring all assets
467+
* are loaded before the sketch continues.
468+
*
468469
* loading assets.
469470
*
470471
* Note: `setup()` doesn’t have to be declared, but it’s common practice to do so.
@@ -535,7 +536,6 @@ for (const k in constants) {
535536
* </code>
536537
* </div>
537538
*/
538-
539539
/**
540540
* A function that's called repeatedly while the sketch runs.
541541
*

0 commit comments

Comments
 (0)