Uploaded April 2025 | Updated November 2026, 11 hours ago
LET'S CONNECT
β¨ Sign up for my newsletter at pattvira.com
β¨ Instagram: instagram.com/pattvira
β¨ Twitter: twitter.com/pattvira
--
Links:
π p5.js editor: editor.p5js.org
π Pastel Gradient Screensaver Code: editor.p5js.org/pattvira/sketches/QOtQJc5H7
π Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn
References:
π Javascript Canvas API: developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
Timestamps:
0:00 Intro
1:32 Explain Canvas API (CanvasRenderingContext2D)
2:37 Access Canvas API through p5.js
3:37 Create a radial gradient using createRadialGradient()
7:49 Create a glowing effect
10:14 Generate random pastel colors
11:21 Create an animating gradient Ball class
17:39 Write a detection collision method
18:51 Create multiple moving gradient ball objects
LET'S CONNECT
β¨ Sign up for my newsletter at pattvira.com
β¨ Instagram: instagram.com/pattvira
β¨ Twitter: twitter.com/pattvira
--
Links:
π p5.js editor: editor.p5js.org
π Pastel Gradient Screensaver Code: editor.p5js.org/pattvira/sketches/QOtQJc5H7
π Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn
References:
π Javascript Canvas API: developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
Timestamps:
0:00 Intro
1:32 Explain Canvas API (CanvasRenderingContext2D)
2:37 Access Canvas API through p5.js
3:37 Create a radial gradient using createRadialGradient()
7:49 Create a glowing effect
10:14 Generate random pastel colors
11:21 Create an animating gradient Ball class
17:39 Write a detection collision method
18:51 Create multiple moving gradient ball objects







![βοΈ Code With Me | cute cozy lofi beats
Another code with me video! For a full tutorial, check it out here:
π Collisions without a Physics Library tutorial: https://youtu.be/EFDesKpLCG0?si=GvFj7oLF9-8jo8CF
LETS CONNECT
β¨ Sign up for my newsletter at https://www.pattvira.com
β¨ Instagram: https://www.instagram.com/pattvira
β¨ Twitter: https://twitter.com/pattvira
πΆ Music by:
Oneul - Cozy Night: https://www.youtube.com/watch?v=mWTZu5yuCi0
Oneul - Starlight ice cream: https://www.youtube.com/watch?v=vLgf6prOGjA
shushubobo - oh my cat
[no copyright music] Β Β https://www.youtube.com/watch?v=UHwEZPDXR2Y
shushubobo - λμ무λ°νκΉ
[no copyright music] https://www.youtube.com/watch?v=RuAVyZwZdoU
shushubobo - favorite things
[no copyright music] https://www.youtube.com/watch?v=8EdHQKn7HM4
Chillpeach - Gameplay : https://www.youtube.com/watch?v=w4oLP7fa9Vk βοΈ Code With Me | cute cozy lofi beats](https://i.ytimg.com/vi/OQpsy2IjQnI/mqdefault.jpg)


