Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p5.Vector in LocalStorage #3990

Closed
4 of 14 tasks
Exifers opened this issue Sep 6, 2019 · 6 comments · Fixed by #4034
Closed
4 of 14 tasks

p5.Vector in LocalStorage #3990

Exifers opened this issue Sep 6, 2019 · 6 comments · Fixed by #4034

Comments

@Exifers
Copy link

Exifers commented Sep 6, 2019

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Most appropriate sub-area of p5.js?

  • Color
  • Core/Environment/Rendering
  • Data
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

New feature details:

Hi,
I'm making a small web app where I store some data in localStorage. storeitem and getitem are very handy for this, but somehow it is not supposed to work with p5.Vector (only String|Number|Object|Boolean|p5.Color).

I thought it would be cool if p5 would provide this feature so that we don't have to serialize/deserialize the vectors in the code.

Thanks

@welcome
Copy link

welcome bot commented Sep 6, 2019

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@singhvisha
Copy link
Contributor

singhvisha commented Sep 9, 2019

@outofambit ,
Hi, Can I work on this issue?

@stalgiag
Copy link
Contributor

stalgiag commented Sep 9, 2019

@Exifers I like that idea!

This should be relatively straightforward. The serialization happens here and deserialization would be a new switch case here..

@singhvisha it is a good idea to only be assigned to one issue at a time, at least for your first few contributions. If you no longer want to work on #3897, that is definitely okay, just let us know so we can pass the task on to other people that are interested in helping.

@singhvisha
Copy link
Contributor

@stalgiag
hi ,Sorry for the delay. I will be submitting it soon.

@singhvisha
Copy link
Contributor

Hi @stalgiag ,I commited for this issue on my previous fork in which I made commit for #3978.
Should I delete that fork and do the same for this issue?

@stalgiag
Copy link
Contributor

Hi @singhvisha! I highly recommend that you work in a branch within your fork. This allows you to work on different parts of p5 independently. So this means that you should have a different branch for every new issue that you work on. Such as:

singhvisha/p5.js:basicJSDocs
and
singhvisha/p5.js:vectorLocalStorage

So for that second branch above, you would make a new branch with something like:
git branch vectorLocalStorage
then you would switch to it with
git checkout vectorLocalStorage
Then any changes you make, commit, and push will go to that specific branch. Once you have made changes you can open a pull request with a specific branch of your fork.

I think the easiest way to clean up this work is to make backups, create new branches, add your work back in, and then open new separate pull requests. I will give detailed instructions in #3978 in order to keep this issue thread somewhat on topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants