Skip to content

Commit e931e5b

Browse files
committed
another video
1 parent b35ddfe commit e931e5b

File tree

9 files changed

+117
-2
lines changed

9 files changed

+117
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"title": "p5.js 2.0",
33
"description": "A collection of videos exploring the new features and capabilities introduced in p5.js 2.0, including loading with async and await, fonts and typography, custom shapes and curves, and more!",
4-
"videos": ["p5js-2.0/async-await", "livestreams/p5js-2.0"]
4+
"videos": ["p5js-2.0/async-await", "p5js-2.0/loading-data", "livestreams/p5js-2.0"]
55
}

β€Žcontent/videos/p5js-2.0/async-await/index.jsonβ€Ž

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474
{
7575
"title": "Videos",
7676
"links": [
77+
{
78+
"icon": "πŸš‚",
79+
"title": "Loading Data with p5.js 2.0",
80+
"url": "/tracks/p5js-2.0/p5js-2.0/loading-data",
81+
"description": "Learn more about loading data in p5.js 2.0."
82+
},
7783
{
7884
"icon": "πŸš‚",
7985
"title": "Promises Part 1",
@@ -89,5 +95,8 @@
8995
]
9096
}
9197
],
92-
"credits": []
98+
"credits": [
99+
{ "title": "Editing", "name": "Mathieu Blanchette" },
100+
{ "title": "Animations", "name": "Jason Heglund" }
101+
]
93102
}
35.2 KB
Loading
405 KB
Loading
450 KB
Loading
213 KB
Loading
667 KB
Loading
88.4 KB
Loading
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"title": "p5.js 2.0: Loading Data (Images, APIs, JSON)",
3+
"description": "This video covers how to load external assets like images, JSON files, and data from APIs into your p5.js 2.0 sketches. Learn the fundamentals of asynchronous operations in p5.js using Promises with async/await.",
4+
"videoId": "25omXt_OjD4",
5+
"nebulaSlug": "codingtrain-how-to-load-data-with-p5js-20",
6+
"date": "2025-10-03",
7+
"languages": ["p5.js", "JavaScript"],
8+
"topics": ["async/await", "promises", "p5.js 2", "loading images", "API", "JSON", "Promise.all"],
9+
"canContribute": true,
10+
"relatedChallenges": [],
11+
"timestamps": [
12+
{ "time": "0:00:00", "title": "Hello!" },
13+
{ "time": "0:00:54", "title": "How to Load an Image in p5.js" },
14+
{ "time": "0:02:16", "title": "Asynchronous Code: promises, async, and await" },
15+
{ "time": "0:04:10", "title": "Common Mistakes to Avoid" },
16+
{ "time": "0:05:51", "title": "Loading Data from a Live API" },
17+
{ "time": "0:08:21", "title": "Loading Multiple Items in a Sequence" },
18+
{ "time": "0:09:12", "title": "Creating a Custom Loading Animation" },
19+
{ "time": "0:13:39", "title": "Faster Parallel Loading with Promise.all()" },
20+
{ "time": "0:16:48", "title": "Challenge for you!" }
21+
],
22+
"codeExamples": [
23+
{
24+
"title": "Loading a Single Image",
25+
"description": "A basic example of loading an image into a p5.js 2.0 sketch using async and await in setup().",
26+
"image": "choochoo.png",
27+
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/NPKPIYhBR" }
28+
},
29+
{
30+
"title": "Sequential Loading",
31+
"description": "Demonstrates JSON from the Dog API and then loading an image from the JSON.",
32+
"image": "dogs1.png",
33+
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/lQxT7PTKC" }
34+
},
35+
{
36+
"title": "API and Loading Animation",
37+
"description": "Demonstrates loading JSON from the Dog API and then creating a loading bar while fetching multiple images.",
38+
"image": "dogs2.png",
39+
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/M_NGGyqr4" }
40+
},
41+
{
42+
"title": "Parallel Loading with Promise.all",
43+
"description": "An example showing how to load multiple images in parallel for better performance using Promise.all().",
44+
"image": "kittens1.png",
45+
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/MgrJuSvJt" }
46+
},
47+
{
48+
"title": "Loading images with placeholders exercise",
49+
"description": "A demonstration of loading images from an array of files, displaying a placeholder while each image loads.",
50+
"image": "kittens2.png",
51+
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/Ur6plDyKK" }
52+
}
53+
],
54+
"groupLinks": [
55+
{
56+
"title": "References",
57+
"links": [
58+
{
59+
"icon": "πŸ“–",
60+
"title": "p5.js 2.0 Beta",
61+
"url": "https://beta.p5js.org/",
62+
"description": "The beta website for p5.js 2.0 with updated references and examples."
63+
},
64+
{
65+
"icon": "πŸ“–",
66+
"title": "Promise.all",
67+
"url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all",
68+
"description": "MDN documentation on Promise.all for handling multiple promises in parallel."
69+
},
70+
{
71+
"icon": "🎨",
72+
"title": "Dog API",
73+
"url": "https://dog.ceo/dog-api/",
74+
"description": "A public API for dog images used in the examples."
75+
}
76+
]
77+
},
78+
{
79+
"title": "Videos",
80+
"links": [
81+
{
82+
"icon": "πŸš‚",
83+
"title": "p5.js 2.0: async and await",
84+
"url": "/tracks/p5js-2.0/p5js-2.0/async-await",
85+
"description": "How to transition from p5.js 1.0 to 2.0 with async and await."
86+
},
87+
{
88+
"icon": "πŸš‚",
89+
"title": "Promises Part 1",
90+
"url": "/tracks/topics-in-native-javascript/js/promises-part-1",
91+
"description": "Learn more about JavaScript Promises in depth."
92+
},
93+
{
94+
"icon": "πŸš‚",
95+
"title": "Promises Part 2",
96+
"url": "/tracks/topics-in-native-javascript/js/promises-part-2",
97+
"description": "Continue learning about JavaScript Promises."
98+
}
99+
]
100+
}
101+
],
102+
"credits": [
103+
{ "title": "Editing", "name": "Mathieu Blanchette" },
104+
{ "title": "Animations", "name": "Jason Heglund" }
105+
]
106+
}

0 commit comments

Comments
Β (0)