Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
updating loadImage()
  • Loading branch information
perminder-17 authored Mar 31, 2025
commit 82d0ab636d27f1d58fdaa841e11133719f23e159
10 changes: 5 additions & 5 deletions src/image/loading_displaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ function loadingDisplaying(p5, fn){
*
* <div>
* <code>
* function setup() {
* async function setup() {
* // Call handleImage() once the image loads.
* loadImage('assets/laDefense.jpg', handleImage);
* await loadImage('assets/laDefense.jpg', handleImage);
*
* describe('Image of the underside of a white umbrella and a gridded ceiling.');
* }
Expand All @@ -82,10 +82,10 @@ function loadingDisplaying(p5, fn){
*
* <div>
* <code>
* function setup() {
* async function setup() {
* // Call handleImage() once the image loads or
* // call handleError() if an error occurs.
* loadImage('assets/laDefense.jpg', handleImage, handleError);
* await loadImage('assets/laDefense.jpg', handleImage, handleError);
* }
*
* // Display the image.
Expand Down Expand Up @@ -995,7 +995,7 @@ function loadingDisplaying(p5, fn){
*
* async function setup() {
* // Load the image.
* img = await loadImage('assets/laDefense50.jpg');
* img = await loadImage('assets/laDefense50.png');
*
* createCanvas(100, 100);
*
Expand Down