Local Storage in JavaScript with p5.js

Subscribers:
1,750,000
Published on ● Video Link: https://www.youtube.com/watch?v=_SRS8b4LcZ8



Duration: 12:04
34,828 views
1,098


What's the easiest and quickest way to have a p5 sketch re-start from where it last left off? Local Storage!

p5.js Web Editor Sketches:
πŸ•ΉοΈ Local Storage: https://editor.p5js.org/codingtrain/sketches/R-Z_q_4c3
πŸ•ΉοΈ Local Storage w/ Canvas: https://editor.p5js.org/codingtrain/sketches/cLOmL8Td0

Links discussed in this video:
πŸ”— Local Storage: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
πŸ”— storeItem(): https://p5js.org/reference/#/p5/storeItem
πŸ”— getItem(): https://p5js.org/reference/#/p5/getItem
πŸ”— Storage for the Web: https://web.dev/storage-for-the-web/

Other videos mentioned in this video:
πŸŽ₯ 6.1: Introduction to Object-Oriented Programming with ES6 - p5.js Tutorial
https://youtu.be/xG2Vbnv0wvg

Timestamps:
0:00 Hello! What is Local Storage?
1:15 Color sliders p5 sketch
2:16 p5 local storage code
7:57 Debug storage with developer tools
8:50 Storing JavaScript objects
10:26 Downsides of local storage
11:15 More examples!

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/Guides/community-contribution-guide.html
🚩 Suggest Topics: https://github.com/CodingTrain/Rainbow-Topics
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ“š Books: https://www.amazon.com/shop/thecodingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/website/issues/new