7. August 2014 at 0:22 #1045
Today it was announced: http://p5js.org. What about supporting this also… or away that processing.js and this could be complementary to each other. And maybe even the use of it in Procoding.
pablillo josé7. August 2014 at 4:14 #1046
Hi pablillo josé,
thanks for notifying me, this looks great!
I’m currently on vacation, but I’ll definitely look into this as soon as I’m back. Until then you can always create an HTML5 or HTML5/Canvas project and add p5.js manually as resource.
best, Michael20. August 2014 at 6:27 #1047
Great! Thanks to you Michael!
Have a great time in vacation!
pablillo josé28. August 2014 at 22:28 #1050
Any research done? It would be interesting how these two efforts, your included… could be merge and work together…
How you tried to implement this in procoding?29. August 2014 at 0:40 #1051
p5 seems to do some unknown things in the background to get a reference to the “sketch.js” file. While in theory it should be fully compatible to Procoding, I could not make it work yet by just adding the p5.js as a resource (which usually works).
Unfortunately there are also some licensing issues with P5 that will prevent me from adding P5 as a general template to Procoding. While the library itself is under GNU which is debatable but should be okay for an integration in Procoding (there were massive problems with GNU in the past for apps in the AppStore). However, the p5 reference is licensed under a non-commercial creative commons, which means I will not be able to include the ref in Procoding, which is a required necessity for any library I’m going to add. As soon as I charge 1 $ for my app, it is considered commercial, so I cannot use anything under CC-NC. I know that there are many developers ignoring this (e.g. providing an offline Processing reference in the AppStore for 99 ct), but I’m very strict about licensing issues. That is also the reason btw, why the processing.js reference is not included for offline usage and only accessible online with kind permission from the guys from processingjs.org.
Sorry about that, it looked really promising until I studied the licensing terms ;-(
Nevertheless, I’ll have to look and see if I may find a workaround, so that you can at least add p5.js to a default HTML project sketch via Procoding’s resource loader. Will keep you updated!
Michael29. August 2014 at 0:51 #1052
okay, that wasn’t too complicated.
1. create a new HTML5 Sketch (not a canvas based one, as P5 creates its own canvas)
2. just add p5.js as a resource (you might want to add the dom and sound as well, though sound will only work on iOS and on OSX only as preview and not within Procoding OSX)
3. add these lines at the beginning of your sketch:
// instantiate p5 in global mode
the jshint option comments are just to silence some jshint warnings.
The relevant line of code is new p5(); that starts p5 in global mode.
I tried the Interactivity demo: http://p5js.org/learn/demos/Hello_P5_Interactivity_1.php
Hope this helps,
The topic ‘PS5.js’ is closed to new replies.