Local Storage in JavaScript with p5.js

preview_player
Показать описание
What's the easiest and quickest way to have a p5 sketch re-start from where it last left off? Local Storage!

Links discussed in this video:

Other videos mentioned in this video:

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!

Рекомендации по теме
Комментарии
Автор

There are two more functions dealing with local storage in p5.js: clearStorage(), which erases everything from local storage for the current domain, and removeItem(key) which removes a specific element from local storage. Handy if you're running out of room in local storage, or simply want to get rid of obsolete clutter.

kenhaley
Автор

No way I recently came to know about Local Storage and I thought you might have uploaded a video on it . And it's been 45 minutes since youve uploaded. I'm freaking out.

arpanacharya
Автор

I have been a JavaScript developer for a decade now, and have known about localStorage since it wasn't even supported by most of the major browsers, but I am still watching this video, for the fun of it and the way he teaches. Really cool.

crewrangergaming
Автор

The only channel on YouTube where I like every video before it starts. Thank you for everything you have done for us my dear mentor Daniel <3

chrismorris
Автор

A while back I created a simple minigame for my coworkers and wanted to persist some data between replays. At the time I didn't know about localstorage and in the end I didn't add such functionality. I might revisit that little project and add it. 2.0 update woop woop!

pasemek
Автор

Thank’s for saving one of my exams for the second year in a row!

shrek
Автор

A really good use for this is storing API keys and then pulling them for use in API sketches. API keys kept in sketches are easily findable and compromised.

StevesMakerspace
Автор

This is exactly what I have trying to figure out for a project. Thanks man!

DeniceKnuts
Автор

Very nice video. It is of particular interest to people using p5.js without a backend!

CodingAdventures
Автор

Keep doing amazing work, big love for you

hussainsalih
Автор

as always, thanks !! we love the content

runtimejpp
Автор

So very useful for storing some data say for a repetitive game score

thehappycoder
Автор

Our Dan our HOPE! YOU'VE BEEN HELPFUL!

mansirrabiu
Автор

Side note, in some situations the security settings of a system/browser will prohibit access to the browser's local storage object.

jasondunken
Автор

Many thanks for this wonderful video. I would love to see a video on adding local storage to Wordle.

GloriaHoliday
Автор

I'd like if you did a Delaunay Triangulation tutorial like you had mentioned in the past, at the end of the convex hull algorithm video.

Jova
Автор

no waaaay. this video was so good, i watched it twice, then etched it into my skin

dinglerdangler
Автор

I feel like this can lead to vulnerabilities, specifically in the case of wordle. If someone created a new fun game using the same local storage val that wordle uses, it can be overidden (in the same browser), correct? Still such an awesome concept and will definitely find use cases for this in future projects!

RicoGalassi
Автор

i often use localstorage but i tend to use indexeddb instead with fallback to localstorage if browser doesnt support it

Muphet
Автор

Can you make a video on the file API please?

isaacbaptista