Hi all, first, <3<3<3 for p5js -- 馃帀 i love this community! Thanks in advance.
I'm updating/fixing an old script which used v0.8.0, here: https://github.com/publiclab/webjack/blob/gh-pages/examples/index.html and I noticed the old CDN was no longer available:
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js"></script>
I couldn't find dom.js or anything like it in https://cdn.jsdelivr.net/npm/[email protected]/lib/addons/ or https://cdnjs.com/libraries/p5.js so I went looking...
I tried looking for docs about if it had been merged with the core library or deprecated, but mostly found old tutorials and docs like this page: https://www.courses.tegabrain.com/cc18/p5js-dom/
which point at a missing page in the docs here: https://p5js.org/reference/#/libraries/p5.dom
and I also found some references to dom.js here: https://github.com/processing/p5.js/blob/main/contributor_docs/creating_libraries.md#you-can-extend-p5-core-functionality-by-adding-methods-to-p5prototype
I guess I wanted to both ask if those functions have been merged into the core library, and suggest we put a deprecation notice or explainer at some of the documentation spots mentioned above? What do you think? I'm happy to open PRs and help out!
Thanks again!!
hi @jywarren, you are on the right track, we merged p5.dom.js into p5.js,
it was announced for v1.0 release on this article
https://medium.com/processing-foundation/p5-js-1-0-is-here-b7267140753a
i didn't understand the problem with the CDN, i opened the link
https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js
and there was a file there, is that not p5.dom.min.js?
and yes, you are right, the document at
https://github.com/processing/p5.js/blob/main/contributor_docs/creating_libraries.md
needs to be updated to reflect that p5.dom.js was merged in the core, the example mentioned should be taken from the p5.sound.js, (p5 accesibility as far as i know is being merged into p5.js so no need to mention it on this doc).
Strange... i'm sorry, you're right, the CDNs seem to be working now. I've changed my demo now so it's hard to backtrack and see, but the CDN files themselves seem to load fine. Maybe it was intermittent? Sorry to bother!
Would you like me to take on the docs changes in a PR? I'm happy to just cut out the parts about the independent dom.js file and perhaps put a parenthetical note that it is now part of the core lib. Or do this another way if you prefer.
For the missing https://p5js.org/reference/#/libraries/p5.dom, is there a way to leave an entry for a deprecated section, as is sometimes done in for example RubyDoc? Just a suggestion but whatever you think is best!
Thanks!
@jywarren thanks for pointing all of that out!
about the docs changes, they need to be updated, and for that we need to have an example that uses the p5.sound.js library, and remove the DOM ones, it seems like a long fix, if you want to tackle it please submit a PR and mention this issue :)
as for leaving a deprecation notice on the p5.dom.js old link, i have no idea, i'm tagging @limzykenneth who most probably knows this :)
OK, i'll try to dive into this in the next day or two but leaving it open to anyone else too if someone is faster 馃槃 -- anyone can just leave a comment here so we don't overlap! Thanks!
A deprecation notice could be misleading, a redirect to p5.Element could be considered though I can't think of an elegant way to do it except for redirecting with JS.
@jywarren is this issue up for grabs? I would like to work on this :)
Most helpful comment
OK, i'll try to dive into this in the next day or two but leaving it open to anyone else too if someone is faster 馃槃 -- anyone can just leave a comment here so we don't overlap! Thanks!