-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
added option for textToPoints() to allow separated paths #4087
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page! |
I added a couple of questions on the original ticket |
…lipse() allows 3 params
Temp closing this PR while awaiting approval for |
@ffd8 You can have separate PRs, you just need to have your changes on different branches on your fork. We don't directly point to that in the contributors docs as in most cases it's not necessary in most cases and make the barrier for entry a bit higher than necessary, but it is what github usually recommends (forking then branching before making changes). |
@limzykenneth True - normally I'd work with separate branches, but was following the contributors docs manual a little too closely. I think it's worth suggesting people make a branch for each edit – then make a PR to the master branch from it... since any rejected/paused PR on the master branch causes tricky issues to undo it and re-sync with the official p5.js master. As I followed the suggest workflow (normally using Github GUI.. but enjoyed following manual for CLI git), I ran into the following issue: had been working on this PR – then while awaiting review, wanted to add a possible fix/extension to
|
@ffd8 Yeah it may be necessary to reconsider whether we should suggest branching first. However to fix your particular issue I would just branch from the origin HEAD. (I only use CLI but similar should be possible from GUI as well). In
|
Resolves #4086
Changes:
Adds additional option for
textToPoints()
, calledseparatePaths: true
, which will instead export a 2D Array[paths][points]
rather than only the current 1D Array[points]
. An example has also been added to demonstrate how one should use it.Screenshots of the change:

textToPoints()
with 1D array (current function):textToPoints()
with 2D array (proposed update):PR Checklist
npm run lint
passesQuestion
Regarding the JSDoc, not sure how to deal with the fact the
@return
changes if requesting separatePaths? Hopefully it's clear from the description of that option and example, but maybe there's a format for suggesting a 2nd type of return if the option is set?