Skip to content

Commit 82d0ab6

Browse files
authored
updating loadImage()
1 parent 7dcafb7 commit 82d0ab6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/image/loading_displaying.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ function loadingDisplaying(p5, fn){
6666
*
6767
* <div>
6868
* <code>
69-
* function setup() {
69+
* async function setup() {
7070
* // Call handleImage() once the image loads.
71-
* loadImage('assets/laDefense.jpg', handleImage);
71+
* await loadImage('assets/laDefense.jpg', handleImage);
7272
*
7373
* describe('Image of the underside of a white umbrella and a gridded ceiling.');
7474
* }
@@ -82,10 +82,10 @@ function loadingDisplaying(p5, fn){
8282
*
8383
* <div>
8484
* <code>
85-
* function setup() {
85+
* async function setup() {
8686
* // Call handleImage() once the image loads or
8787
* // call handleError() if an error occurs.
88-
* loadImage('assets/laDefense.jpg', handleImage, handleError);
88+
* await loadImage('assets/laDefense.jpg', handleImage, handleError);
8989
* }
9090
*
9191
* // Display the image.
@@ -995,7 +995,7 @@ function loadingDisplaying(p5, fn){
995995
*
996996
* async function setup() {
997997
* // Load the image.
998-
* img = await loadImage('assets/laDefense50.jpg');
998+
* img = await loadImage('assets/laDefense50.png');
999999
*
10001000
* createCanvas(100, 100);
10011001
*

0 commit comments

Comments
 (0)